資源描述:
《電子技術(shù)課程設(shè)計(jì)報(bào)告》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、電子技術(shù)課程設(shè)計(jì)報(bào)告必選題(一):7段LED譯碼顯示電路設(shè)計(jì)一、程序代碼:LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYDECLEDISPORT(CLK:INSTD_LOGIC;DOUT:OUTSTD_LOGIC_VECTOR(6DOWNTO0));ENDDECLED;ARCHITECTUREbehavOFDECLEDISSIGNALCNT4B:STD_LOGIC_VECTOR(3DOWNTO0);BEGINPROCESS(CLK)BEGINIFCLK'EVENTANDC
2、LK='1'THENCNT4B<=CNT4B+1;ENDIF;ENDPROCESS;PROCESS(CNT4B)BEGINCASECNT4BISWHEN"0000"=>DOUT<="";WHEN"0001"=>DOUT<="";WHEN"0010"=>DOUT<="";WHEN"0011"=>DOUT<="";WHEN"0100"=>DOUT<="";WHEN"0101"=>DOUT<="";WHEN"0110"=>DOUT<="";WHEN"0111"=>DOUT<="";WHEN"1000"=>DOUT<="";WHEN"1001"=>DOUT<="";WHEN"1010
3、"=>DOUT<="";WHEN"1011"=>DOUT<="";WHEN"1100"=>DOUT<="";WHEN"1101"=>DOUT<="";WHEN"1110"=>DOUT<="";WHEN"1111"=>DOUT<="";WHENOTHERS=>DOUT<="";ENDCASE;ENDPROCESS;ENDbehav;二、時(shí)序仿真結(jié)果:必選題(二):數(shù)字頻率計(jì)設(shè)計(jì)一、程序代碼:1、十進(jìn)制計(jì)數(shù)器CNT10LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;ENTITYCNT10ISPORT(CLK:INSTD_LOGIC;CLR:INSTD
4、_LOGIC;ENA:INSTD_LOGIC;CQ:OUTINTEGERRANGE0TO15;CARRY_OUT:OUTSTD_LOGIC);ENDCNT10;ARCHITECTUREbehavOFCNT10ISSIGNALCQI:INTEGERRANGE0TO15;BEGINPROCESS(CLK,CLR,ENA)BEGINIFCLR='1'THENCQI<=0;ELSIFCLK'EVENTANDCLK='1'THENIFENA='1'THENIFCQI<9THENCQI<=CQI+1;ELSECQI<=0;ENDIF;ENDIF;ENDIF;ENDPROCESS;PROC
5、ESS(CQI)BEGINIFCQI=9THENCARRY_OUT<='1';ELSECARRY_OUT<='0';ENDIF;ENDPROCESS;CQ<=CQI;ENDbehav;2、鎖存器REG32BLIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;ENTITYREG32BISPORT(load:INSTD_LOGIC;DIN:INSTD_LOGIC_VECTOR(31DOWNTO0);DOUT:OUTSTD_LOGIC_VECTOR(31DOWNTO0));ENDREG32B;ARCHITECTUREbehavOFREG32BISBEGIN
6、PROCESS(load,DIN)BEGINIFload'EVENTANDload='1'THENDOUT<=DIN;ENDIF;ENDPROCESS;ENDbehav;3、側(cè)頻控制信號(hào)發(fā)生器TESTCTLLIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;ENTITYTESTCTLISPORT(CLK:INSTD_LOGIC;TSTEN:OUTSTD_LOGIC;CLR_CNT:OUTSTD_LOGIC;load:OUTSTD_LOGIC);ENDTESTCTL;ARCHITECTUREbehavOFTESTCTLISSIGNALDiv2CLK:S
7、TD_LOGIC;BEGINPROCESS(CLK)BEGINIFCLK'EVENTANDCLK='1'THENDiv2CLK<=NOTDiv2CLK;ENDIF;ENDPROCESS;PROCESS(CLK,Div2CLK)BEGINIFCLK='0'ANDDiv2CLK='0'THENCLR_CNT<='1';ELSECLR_CNT<='0';ENDIF;ENDPROCESS;load<=NOTDiv2CLK;TSTEN<=Div2CLK;ENDbehav;4、頂層文件LIBRARYIEEE;USE