資源描述:
《eda源程序與仿真波形》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、十六位加法器源程序:LIBRARYIEEE;USEIEEE?STD_LOGIC_1164?ALL;USEIEEE?STD_LOGIC__UNSIGNED.ALL;ENTITYadderISPORT(A:INSTD_LOGIC_VECTOR(15DOWNTO0);B:INSTD_LOGIC_VECTOR(15DOWNTO0);C:OUTSTD_LOGIC_VECTOR(15DOWNTO0));ENDadder;ARCHITECTUREXOFadderISBEGINC<=A+B;ENDX;十六位加法器仿真波形:Simulati
2、onWaveformsSimulationmode:Functional亠NMasletTimeBar:15.075n$<
3、?
4、Pointer:2.95nsInterval:-12.13r?Start:EndValue15.05100ns20.0ns300ns173415.075ns四位的二選一多路選擇器源程:LIBRARYIEEE;USEIEEE?STD_LOGIC_1164?ALL;ENTITYMUX4ISPORT(AZB:INSTD_LOGIC_VECTOR(3DOWNTO0);SEL:INBIT;Y:OUTSTD_
5、LOGIC_VECTOR(3DOWNTO0));ENDMUX4;ARCHITECTUREZOFMUX4ISBEGINPROCESS(A,B,SEL)BEGINIFSEL=101THENY<=A;ELSEY<=B;ENDIF;ENDPROCESS;ENDZ;四位的二選一多路選擇器仿真波形:QMasterTimeBaiA16.475reValue)PS10.ns20-9ns30.ns40.0ns50.9ns60.9ns709ns80.9ns90.0ns1000nsNone16.16.41■r5nsJ諄0AV0X1X2Xwx_4
6、X5X6X7zxz8DG9X10聲5BV:2X3"X4"7ET67x8"X9zxz10X11X12■10SELUr-1111-11-1LI311Tu:0X3X2XsX4X7X6X98~X~11X107、>
8、Pointer:Interval:End:Start:8.3n$?8.18ns七段數(shù)碼管譯碼器源程序:LIBRARYIEEE;USEIEEE?STD_LOGIC_1164?ALL;ENTITYsevenISPORT(INPUT:INSTD_LOGIC_VECTOR(2DOWNTO0);AZBZCZD,E,FZ
9、G:OUTSTD_LOGIC);ENDseven;ARCHITECTUREthreeOFsevenISBEGINPROCESS(INPUT)BEGINCASEINPUTISWHEN"000',=>A<=,11;B<=f11;C<=*11;D<=f11;E<=f1*;F<=f11;G<=101;WHENn001',=>A<=,01;B<=111;C<=111;D<=f0f;E<=f01;F<=f01;G<=101;WHENn010n=>A<=111;B<=11f;C<=f01;D<=f11;E<=111;F<=101;G<=
10、111;WHENn011',=>A<=,11;B<=f11;C<=f1f;D<=!1f;E<=f0';F<=f01;G<=111;WHENOTHERS=>A<=f11;Bv=O;C<=101;D<=111;E<=11f;F<=111;G<=1;ENDCASE;ENDPROCESS;ENDthree;七段數(shù)碼管譯碼器仿真波形:A英罠士日PointerInterval:Start:MasterTimeBar:T八?八位到十六位移位器源程序:LIBRARYIEEE;USEIEEE?STD_LOGIC_1164?ALL;ENTIT
11、YYIWEIQIISPORT(im:INSTD_LOGIC_VECTOR(7DOWNTO0);ent:INSTD_LOGIC_VECTOR(1DOWNTO0);result:OUTSTD_LOGIC_VECTOR(15DOWNTO0));ENDYIWEIQI;ARCHITECTUREbehaveOFYIWEIQIISBEGINPROCESS(im,ent)BEGINIF(ent=n00n)OK(ent=n11n)THENFORiIN0TO15LOOPIFi>=8THENresult(i)<=101;ELSIFi<=7THE
12、Nresult(i)<=im(i);ENDIF;ENDLOOP;ELSIFcnt=n01nTHENFORiIN0TO15LOOPIF(i>=12)OK(i<=3)THENresult(i)<=101;ELSIF(i>=4)A2VD(i<=ll)THENresult(i)<=im(i-4);ENDIF;E