資源描述:
《VHDL設(shè)計(jì)初步簡課件.ppt》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、EDA技術(shù)實(shí)用教程第4章VHDL設(shè)計(jì)初步原理圖輸入與VHDL文本輸入設(shè)計(jì)的區(qū)別Graphiciswhatyoudrawiswhatyouget“tellmewhathardwareyouwantandIwillgiveittoyou”VHDLiswhatyouwriteiswhatfunctionalyouget“tellmehowyourcircuitshouldbehaveandtheVHDLcompilerwillgiveyouthehardwarethatdoesthejob”butthedesignercannotcontrolhowth
2、ecircuitimplement什么是VHDL?VeryhighspeedintegratedHardwareDescriptionLanguage(VHDL)是IEEE、工業(yè)標(biāo)準(zhǔn)硬件描述語言用語言的方式而非圖形等方式描述硬件電路容易修改容易保存特別適合于設(shè)計(jì)的電路有:復(fù)雜組合邏輯電路,如:譯碼器、編碼器、加減法器、多路選擇器、地址譯碼器…...狀態(tài)機(jī)等等……..VHDL的功能和標(biāo)準(zhǔn):VHDL描述輸入端口輸出端口電路的行為和功能VHDL有過兩個標(biāo)準(zhǔn):IEEEStd1076-1987(calledVHDL1987)IEEEStd1076-1993(
3、calledVHDL1993)VHDLSynthesisvs.otherHDLsSynthesisVHDL:“tellmehowyourcircuitshouldbehaveandIwillgiveyouhardwarethatdoesthejob”ABEL,PALASM,AHDL:“tellmewhathardwareyouwantandIwillgiveittoyou”WhyusingVHDLinsteadofGraphicEasytoModifyItismorepowerfulthanGraphicVHDLisaportablelanguag
4、ebecauseisdeviceindependentthesamecodecanbeappliedtoDevicemanufacturedbyCompanyAorCompanyB【例4-1】ENTITYmux21aISPORT(a,b:INBIT;s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISBEGINy<=aWHENs='0'ELSEb;ENDARCHITECTUREone;實(shí)體結(jié)構(gòu)體4.1多路選擇器VHDL描述圖4-1mux21a實(shí)體圖4-2mux21a結(jié)構(gòu)體4.1.12
5、選1多路選擇器的VHDL描述實(shí)體描述的是電路器件的端口構(gòu)成和信號屬性。結(jié)構(gòu)體描述的是電路器件的內(nèi)部邏輯功能或電路結(jié)構(gòu)。WHEN_ELSE并行語句對照1對照2【例4-2】ENTITYmux21aISPORT(a,b:INBIT;s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISSIGNALd,e:BIT;BEGINd<=aAND(NOTS);e<=bANDs;y<=dORe;ENDARCHITECTUREone;【例4-3】...ARCHITECTUREoneOFmux21aISBE
6、GINy<=(aAND(NOTs))OR(bANDs);ENDARCHITECTUREone;AND、OR、NOT等布爾方程表達(dá)式并行語句對照4.1.12選1多路選擇器的VHDL描述【例4-4】ENTITYmux21aISPORT(a,b,s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISBEGINPROCESS(a,b,s)BEGINIFs='0'THENy<=a;ELSEy<=b;ENDIF;ENDPROCESS;ENDARCHITECTUREone;IF_THEN_ELSE順
7、序語句對照4.1.12選1多路選擇器的VHDL描述圖4-3mux21a功能時序波形4.1.12選1多路選擇器的VHDL描述4.1.2VHDL相關(guān)語法說明1.實(shí)體表達(dá)【例4-5】ENTITYe_nameISPORT(p_name:port_mdata_type;...p_namei:port_midata_type);ENDENTITYe_name;或:【例4-5’】ENTITY實(shí)體名ISPORT(端口名:端口模式數(shù)據(jù)類型;...端口名:端口模式數(shù)據(jù)類型);END實(shí)體名;關(guān)鍵詞不分大小寫2.實(shí)體名(不能用中文或全用數(shù)字,不能以數(shù)字開頭,不能應(yīng)用與ED
8、A工具庫中已定義好的元件名)3.PORT語句和端口信號名4.端口模式INOUTINOUTBUFFER5.數(shù)據(jù)類型BIT4.