1《EDA技术》课程大作业专业班级:12级农电学号:学生姓名:李小何授课教师:成绩:2013年7月2日2一、(1)EDA:狭义上指:大规模可编程逻辑器件为设计载体,以硬件描述语言为系统逻辑描的主要表达方式,以计算机、大规模可编程逻辑器件的开发软件及实验开发为设计工具,通过有关的开发软件,自动完成用软件方式设计的电子系统的逻辑编译、逻辑简化、逻辑分割、逻辑综合及优化、逻辑布局布线、逻辑仿真,直至对于特定目标芯片的适配编译、逻辑映射、变成下载工作。广义上除狭义外还包括计算机辅助分析CAA技术。(2)ASIC:是相对于通用集成电路而言的,ASIC主要指用于某一专门用途的集成电路。ASIC大致可分为数字ASIC、模拟ASIC、和数/模混合ASIC。(3)VHDL:主要用于描述数字系统的结构、行为、功能和接口,出来了含有许多具有硬件特这位那个的语句外,VHDL语言形式和描述风格与句法时分类似与一般的计算机高级语言(4)CPLD:一般把所有超过某一集成度的PLD器件都称为CPLD。(5)可编程门阵列FPGA器件。FPGA器件采用逻辑单元阵列结构和静态随机存取存储器工艺,设计灵活,集成度高,可无限反复编程,并可现场模拟调试验证。二、LIBRARYIEEE;LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;ENTITYm2_142420016ISPORT(CLK_16,RST_16:INSTD_LOGIC;SR_16,SL_16:INSTD_LOGIC;EN_16:INSTD_LOGIC_VECTOR(1DOWNTO0);DATA_16:INSTD_LOGIC_VECTOR(15DOWNTO0);Q_16:BUFFERSTD_LOGIC;QUOT_16:BUFFERSTD_LOGIC_VECTOR(15DOWNTO0));ENDENTITYm2_142420016;ARCHITECTUREARTOFm2_142420016ISBEGINPROCESSBEGINWAITUNTIL(RISING_EDGE(CLK_16));IF(RST_16='1')THENQUOT_16=0000000000000000;ELSECASEEN_16ISWHEN01=QUOT_16=SR_16"_16(15DOWNTO1);Q_16=QUOT_16(0);WHEN10=QUOT_16=QUOT_16(14DOWNTO0)&SL_16;Q_16=QUOT_16(15);WHEN11=QUOT_16=DATA_16;WHENOTHERS=NULL;3ENDCASE;ENDIF;ENDPROCESS;ENDARCHITECTUREART;三.LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYd16_16_46ISPORT(EN_16:INSTD_LOGIC;RST_16:INSTD_LOGIC;CLK_16:INSTD_LOGIC;LOAD_16:INSTD_LOGIC;DATA_16:INSTD_LOGIC_VECTOR(5DOWNTO0);Q_16:BUFFERSTD_LOGIC_VECTOR(5DOWNTO0);CO_16:OUTSTD_LOGIC);ENDENTITYd16_16_46;ARCHITECTUREARTOFd16_16_46ISBEGINCO_16='1'WHEN(Q_16=000000ANDEN_16='1')ELSE'0';PROCESS(CLK_16,RST_16)ISBEGINIF(RST_16='1')THENQ_16=000000;ELSIF(CLK_16'EVENTANDCLK_16='1')THENIF(LOAD_16='1')THENQ_16=DATA_16;ELSIF(EN_16='1')THENIF(Q_16=101101)thenQ_16=000000;ELSEQ_16=Q_16+1;ENDIF;ENDIF;4ENDIF;ENDPROCESS;ENDARCHITECTUREART;四.LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYd16_16_42ISPORT(CP_16:INSTD_LOGIC;cont_16:BUFFERSTD_lOGIC);ENDENTITYd16_16_42;ARCHITECTUREARTOFd16_16_42ISSIGNALdata:STD_LOGIC_VECTOR(5DOWNTO0);SIGNALQ:STD_LOGIC;BEGINPROCESS(CP_16)BEGINIF(rising_edge(cp_16))THENIF(data=101001)THENdata=000000;Q=notQ;elsedata=data+1;endif;endif;cont_16=Q;endprocess;ENDARCHITECTUREART;5五.小时:LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYhourISPORT(HCO:INSTD_LOGIC;KQL:BUFFERSTD_LOGIC_VECTOR(3DOWNTO0);KQH:BUFFERSTD_lOGIC_VECTOR(7DOWNTO4));ENDENTITYhour;ARCHITECTUREARTOFhourISBEGINPROCESS(HCO)BEGINIF(HCO'EVENTANDHCO='1')THENIF(KQH=0010ANDKQL=0011)thenKQH=0000;KQL=0000;ELSIFKQL=1001thenKQH=KQH+1;KQL=0000;ELSEKQL=KQL+1;ENDIF;ENDIF;ENDPROCESS;ENDARCHITECTUREART;分钟:LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYminuteISPORT(CP:INSTD_LOGIC;QL:BUFFERSTD_LOGIC_VECTOR(3DOWNTO0);QH:BUFFERSTD_lOGIC_VECTOR(7DOWNTO4);CO:BUFFERSTD_lOGIC);ENDENTITYminute;ARCHITECTUREARTOFminuteISBEGINPROCESS(CP)BEGINIFCP'EVENTANDCP='1'THENIF(QH=0101ANDQL=1001)THENQH=0000;QL=0000;CO='1';ELSIFQL=1001then6QH=QH+1;QL=0000;CO='0';ELSEQL=QL+1;CO='0';ENDIF;ENDIF;ENDPROCESS;ENDARCHITECTUREART;秒钟:LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYsecondISPORT(CP:INSTD_LOGIC;QL:BUFFERSTD_LOGIC_VECTOR(3DOWNTO0);QH:BUFFERSTD_lOGIC_VECTOR(7DOWNTO4);CO:BUFFERSTD_lOGIC);ENDENTITYsecond;ARCHITECTUREARTOFsecondISBEGINPROCESS(CP)BEGINIFCP'EVENTANDCP='1'THENIF(QH=0101ANDQL=1001)THENQH=0000;QL=0000;CO='1';ELSIFQL=1001thenQH=QH+1;QL=0000;CO='0';ELSEQL=QL+1;CO='0';ENDIF;ENDIF;ENDPROCESS;ENDARCHITECTUREART;7