《EDA作业答案》.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
《EDA作业答案》.doc

作业 讲解P92:3-2、3-3、3-4(1)、3-5、3-12、3-14 P92:3-2 Library ieee; Use ieee.std-logic-1164.all; Entity mux41 is Port(s0,s1,a,b,c,d: in std-logic; y: out std-logic); end mux41; architecture one of mux41 is begin process(s0,s1,a,b,c,d) begin if s0=‘0’and s1=‘0’then y﹤=a; elsif s0=‘1’and s1=‘0’then y﹤=b; elsif s0=‘0’and s1=‘1’then y﹤=c; else y﹤=d; end if; end process; end one; Library ieee; Use ieee.std-logic-1164.all; Entity mux41 is Port(s0,s1,a,b,c,d: in std-logic; y: out std-logic); end mux41; architecture one of mux41 is signal stmp: std-logic-vector(1 downto 0); begin stmp﹤=s1s0; process(s0,s1,a,b,c,d) begin case stmp is when“00”=﹥y﹤=a; when“01”=﹥y﹤=b; when“10”=﹥y﹤=c; when“11”=﹥y﹤=d; when others=﹥null; end case; end process; end one; P92:3-3 Entity muxk is Port(s0,s1,a1,a2,a3: in bit; outy: out bit); end muxk; architecture one of muxk is signal tmp :bit; begin process(s0,a2,a3) begin case s0 is when‘0’=﹥tmp﹤=a2; when‘1’=﹥tmp﹤=a3; when others=﹥null; end case; end process; process(s1,tmp,a1) begin case s1 is when‘0’=﹥outy﹤=a1; when‘1’=﹥outy﹤=tmp; when others=﹥null; end case; end process; end one; P92:3-4(1) x1 0 0 1 1 y1 0 1 0 1 diff 0 1 1 0 s-out 0 1 0 0 Library ieee; Use ieee.std-logic-1164.all; Entity h-suber is Port(x1, y1: in std-logic; diff, s-out : out std-logic); end h-suber; architecture one of h-suber is begin diff﹤=x1 xor y1; s-out﹤=(not x1) and y1; end one; Library ieee; Use ieee.std-logic-1164.all; Entity or2a is Port(a, b: in std-logic; c : out std-logic); end or2a; architecture two of or2a is begin c﹤=a or b; end two; Library ieee; Use ieee.std-logic-1164.all; Entity f-suber is Port(x, y, sub-in: in std-logic; diffr, sub-out : out std-logic); end f-suber; architecture three of f-suber is component h-suber port(x1,y1: in std-logic; diff, s-out: out std-logic); end component; component or2a port(a, b: in std-logic; c: out std-logic); end component; signal t0, t1, t2: std-logic; begin u1: h-suber port map(x1=﹥x, y1

文档评论(0)

ghfa + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档