欢迎来到天天文库
浏览记录
ID:27207424
大小:6.39 MB
页数:99页
时间:2018-11-29
《eda技术实用教程第五章_vhdl设计初步》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、EDA技术实用教程第5章VHDL设计初步原理图输入与VHDL文本输入设计的区别Graphiciswhatyoudrawiswhatyouget“tellmewhathardwareyouwantandIwillgiveittoyou”VHDLiswhatyouwriteiswhatfunctionalyouget“tellmehowyourcircuitshouldbehaveandtheVHDLcompilerwillgiveyouthehardwarethatdoesthejob”butthedesig
2、nercannotcontrolhowthecircuitimplement是什么是VHDL?VeryhighspeedintegratedHardwareDescriptionLanguage(VHDL)是IEEE、工业标准硬件描述语言用语言的方式而非图形等方式描述硬件电路容易修改容易保存特别适合于设计的电路有:复杂组合逻辑电路,如:译码器、编码器、加减法器、多路选择器、地址译码器…...状态机等等……..VHDL的功能和标准VHDL描述输入端口输出端口电路的行为和功能VHDL有过两个标准:IEEEStd
3、1076-1987(calledVHDL1987)IEEEStd1076-1993(calledVHDL1993)VHDLSynthesisvs.otherHDLsSynthesisVHDL:“tellmehowyourcircuitshouldbehaveandIwillgiveyouhardwarethatdoesthejob”ABEL,PALASM,AHDL:“tellmewhathardwareyouwantandIwillgiveittoyou”WhyusingVHDLinsteadofGraph
4、icEasytoModifyItismorepowerfulthanGraphicVHDLisaportablelanguagebecauseisdeviceindependentthesamecodecanbeappliedtoDevicemanufacturedbyCompanyAorCompanyB【例5-1】ENTITYmux21aISPORT(a,b:INBIT;s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISBEGINy<=a
5、WHENs='0'ELSEb;ENDARCHITECTUREone;实体结构体5.1多路选择器VHDL描述图5-1mux21a实体图5-2mux21a结构体5.1.12选1多路选择器的VHDL描述5.1.12选1多路选择器的VHDL描述【例5-2】ENTITYmux21aISPORT(a,b:INBIT;s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISSIGNALd,e:BIT;BEGINd<=aAND(NOTS);e<=bANDs;y<
6、=dORe;ENDARCHITECTUREone;【例5-3】...ARCHITECTUREoneOFmux21aISBEGINy<=(aAND(NOTs))OR(bANDs);ENDARCHITECTUREone;5.1.12选1多路选择器的VHDL描述【例5-4】ENTITYmux21aISPORT(a,b,s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISBEGINPROCESS(a,b,s)BEGINIFs='0'THENy<=a;
7、ELSEy<=b;ENDIF;ENDPROCESS;ENDARCHITECTUREone;5.1.12选1多路选择器的VHDL描述图5-3mux21a功能时序波形5.1.2VHDL相关语句说明1.实体表达【例5-5】ENTITYe_nameISPORT(p_name:port_mdata_type;...p_namei:port_midata_type);ENDENTITYe_name;或:【例5-6】ENTITYe_nameISPORT(p_name:port_mdata_type;...p_namei:
8、port_midata_type);ENDe_name;5.1.2VHDL相关语句说明2.实体名3.PORT语句和端口信号名4.端口模式INOUTINOUTBUFFER5.数据类型BIT5.1.2VHDL相关语句说明6.结构体表达【例5-7】ARCHITECTUREarch_nameOFe_nameIS(说明语句)BEGIN(功能描述语句)ENDARCHITECTUREarch_name;或:【例5-8】ARCH
此文档下载收益归作者所有