《EDA课后作业》PPT课件

《EDA课后作业》PPT课件

ID:45087844

大小:305.50 KB

页数:31页

时间:2019-11-09

《EDA课后作业》PPT课件_第1页
《EDA课后作业》PPT课件_第2页
《EDA课后作业》PPT课件_第3页
《EDA课后作业》PPT课件_第4页
《EDA课后作业》PPT课件_第5页
资源描述:

《《EDA课后作业》PPT课件》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、4-1画出与下例实体描述对应的原理图符号元件:ENTITYbuf3sIS--实体1:三态缓冲器PORT(input:INSTD_LOGIC;--输入端enable:INSTD_LOGIC;--使能端output:OUTSTD_LOGIC);--输出端ENDbuf3x;ENTITYmux21IS--实体2:2选1多路选择器PORT(in0,in1,sel:INSTD_LOGIC;output:OUTSTD_LOGIC);4-2.图4-17所示的是4选1多路选择器,试分别用IF_THEN语句和CASE语句的表达方式写出此电路的VHDL程序。选择控制的信号s

2、1和s0的数据类型为STD_LOGIC_VECTOR;当s1='0',s0='0';s1='0',s0='1';s1='1',s0='0'和s1='1',s0='1'分别执行y<=a、y<=b、y<=c、y<=d。图4-174选1多路选择器使用IF…THEN语句:Libraryieee;useieee.std_logic_1164.alll;Entitymux41isPort(s0,s1,a,b,c,d:instd_logic;y:outstd_logic);Endmux41;Architectureoneofmux41isSignals10:std_

3、logic_vector(1downto0);Begins10<=s1&s0;process(s10,a,b,c,d)beginifs10=“00”theny<=a;elsifs10=“01theny<=b;elsifs10=“10”theny<=c;elsey<=d;endif;endprocess;Endone;使用CASE语句:Libraryieee;useieee.std_logic_1164.alll;Entitymux41isPort(s0,s1,a,b,c,d:instd_logic;y:outstd_logic);Endmux41;Ar

4、chitectureoneofmux41isSignals10:std_logic_vector(1downto0);Begins10<=s1&s0;process(s10,a,b,c,d)begincases10iswhen“00”=>y<=a;when“01”=>y<=b;when“10”=>y<=c;whenothers=>y<=a;endcase;endprocess;Endone;KX康芯科技4-3.图4-18所示的是双2选1多路选择器构成的电路MUXK,对于其中MUX21A,当s='0'和'1'时,分别有y<='a'和y<='b'。试在一个

5、结构体中用两个进程来表达此电路,每个进程中用CASE语句描述一个2选1多路选择器MUX21A。图4-18双2选1多路选择器Libraryieee;useieee.std_logic_1164.alll;EntitymuxkisPort(s0,s1,a1,a2,a3:instd_logic;outy:outstd_logic);Endmuxk;ArchitectureoneofmuxkisSignaltmp:std_logic;Beginprocess(s0,a2,a3)begincases0iswhen‘0’=>tmp<=a2;when‘1’=>tmp

6、<=a3;endcase;endprocess;process(s1,a1,tmp)begincases1iswhen‘0’=>outy<=a1;when‘1’=>outy<=tmp;endcase;endprocess;Endone;Libraryieee;useieee.std_logic_1164.alll;Entitymux21isport(s,a,b:instd_logic;y:outstd_logic);Endmux21;Architectureoneofmux21isBeginy<=awhens=‘0’elseb;Endone;Libra

7、ryieee;useieee.std_logic_1164.alll;EntitymuxkisPort(s0,s1,a1,a2,a3:instd_logic;outy:outstd_logic);Endmuxk;ArchitecturebehofmuxkisComponentmux21port(s,a,b:instd_logic;y:outstd_logic);Endcomponent;Signaltmp:std_logic;BeginU1:mux21portmap(a=>a2,b=>a3,s=>s0,y=>tmp);U2:mux21portmap(a

8、=>a1,b=>tmp,s=>s1,y=>outy);Endbeh;4-4.图4-19是一个含

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。