ImageVerifierCode 换一换
格式:DOCX , 页数:41 ,大小:23.44KB ,
资源ID:25432373      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/25432373.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(EDA考试用纸.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

EDA考试用纸.docx

1、EDA考试用纸目录-5种格式加法器 1-布尔代数法 1-use when_else sentences 1-use with_select_when sentences 3-use if_elsif_else sentence 3-use case_when sentence 438译码器 5JK触发器 5D触发器 6-D所存 6-div 6-交通灯 7-jiaotongdeng 7-div_miao 9-mux2 9-state_ctrl 10- scan_cnt 13-scan_div 14数码管 14-shumaguan_47 14-div 15-cnt8 16-shumaguan to

2、p 16数字钟 17-count8 17-fenpin 19-boma 19-shuzizhong 20点阵显示 24-点阵 24-cnt16 25-div 26 -5种格式加法器-布尔代数法library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity adder_01 is port( ai,bi,ci_1:in bit; si,ci:out bit); end entity adder_01;architecture beheave of adder_01 is begin si=ci_1 x

3、or ( ai xor bi ); ci=(ai and bi) or (ci_1 and ( ai xor bi ) ; end architecture beheave ;-use when_else sentenceslibrary ieee;use ieee.std_logic_1164.all;entity adder_02 isport( ai,bi,ci_1:in std_logic; si,ci:out std_logic ); end entity adder_02;architecture beheave of adder_02 issignal n2:std_logic_

4、vector(1 downto 0);signal n3:std_logic_vector(2 downto 0); begin n3 = ci_1 & ai & bi; n2=00 when n3=000 else 10 when n3=001 else 10 when n3=010 else 01 when n3=011 else 10 when n3=100 else 01 when n3=101 else 01 when n3=110 else 11 ; si=n2(1); ci=n2(0); end beheave;-use with_select_when sentenceslib

5、rary ieee;use ieee.std_logic_1164.all;entity adder_03 is port( ai,bi,ci_1:in std_logic; si,ci:out std_logic); end entity adder_03 ;architecture dataflow of adder_03 is signal n2:std_logic_vector(1 downto 0);signal n3:std_logic_vector(2 downto 0); begin n3=ci_1 & ai & bi ; with n3 select n2=00 when 0

6、00, 10 when 001, 10 when 010, 01 when 011, 10 when 100, 01 when 101, 01 when 110, 11 when others; si=n2(1); ci=n2(0); end dataflow;-use if_elsif_else sentencelibrary ieee;use ieee.std_logic_1164.all;entity adder_04 isport ( ai,bi,ci_1:in std_logic ; si,ci:out std_logic ) ; end entity adder_04 ; arch

7、itecture beheave of adder_04 is signal n3:std_logic_vector(2 downto 0); signal n2:std_logic_vector(1 downto 0);begin n3= ci_1 & ai & bi ; process ( n3 ) begin if n3=000 then n2=00; elsif n3=001 then n2=10; elsif n3=010 then n2=10; elsif n3=011 then n2=01; elsif n3=100 then n2=10; elsif n3=101 then n

8、2=01; elsif n3=110 then n2=01; else n2=11; end if; si=n2(1); ci=n2(0); end process; end beheave;-use case_when sentencelibrary ieee;use ieee.std_logic_1164.all;entity adder_05 is port ( ai,bi,ci_1:in std_logic ; si,ci:out std_logic); end entity adder_05; architecture beheave of adder_05 is signal n3

9、:std_logic_vector(2 downto 0);signal n2:std_logic_vector(1 downto 0);begin n3 n2 n2 n2 n2 n2 n2 n2 n2=11; end case ; si=n2(1); ci=n2(0); end process; end beheave;38译码器library ieee;use ieee.std_logic_1164.all;entity decoder is port ( inp: in std_logic_vector(2 downto 0); outp: out std_logic_vector(7

10、downto 0);end decoder;architecture behave of decoder is beginoutp(0) = 1 when inp = 000 else 0;outp(1) = 1 when inp = 001 else 0;outp(2) = 1 when inp = 010 else 0;outp(3) = 1 when inp = 011 else 0;outp(4) = 1 when inp = 100 else 0;outp(5) = 1 when inp = 101 else 0;outp(6) = 1 when inp = 110 else 0;o

11、utp(7) = 1 when inp = 111 else 0;end behave;JK触发器library ieee;use ieee.std_logic_1164.all;entity JK is port (j,k,sd,rd,clk: in std_logic; qo,qbo: out std_logic);end JK;architecture behave of JK issignal q,qb : std_logic;begin process(sd,rd,clk,q,qb) begin if (sd=0 and rd=1) then q=1;qb=0; elsif (sd=

12、1 and rd=0) then q=0;qb=1; - elsif (sd=1 and rd=1 and clk=1 ) then - q=q; qb=not q; -elsif (sd=1 and rd=1 and clk=0 ) then - q=q; qb=not q; elsif (sd=1 and rd=1 and rising_edge(clk) then q=(j and (not q) or (not k)and q); qb=not q; end if;qo=q; qbo=qb; end process;end behave;D触发器-D所存library ieee;use

13、 ieee.std_logic_1164.all; entity D_suochun isport( d,clk:in std_logic; q :out std_logic);end D_suochun;architecture behave of D_suochun is begin process (clk) begin if (rising_edge(clk) then q=d; end if; end process;end behave;-divlibrary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.

14、all;entity div_1 isport ( clk20m :in std_logic; clkout :out std_logic ); end div_1;architecture bhv of div_1 is signal n :std_logic_vector(24 downto 0);begin process(clk20m) begin if rising_edge(clk20m) then if n=20000000 then n0); else n=n+1; end if; if n10000000 then clkout=0; else clkout clk,scan

15、_clk = scan_clk);U2 : div_miao port map(clk = clk,miao_clk = miao_clk);U3 : scan_cnt port map(scan_clk = scan_clk,dig_out = dig_out);U4 : state_ctrl port map(miao_clk = miao_clk,rst_n = rst_n,seg_out1 = seg_out1, seg_out2 = seg_out2,led_out = led_out);U5 : mux_2 port map(seg_out1 = seg_out1,seg_out2

16、 = seg_out2,sel = dig_out,seg_out = seg_out);end behave;-div_miao library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity div_miao isport ( clk : in std_logic; miao_clk : out std_logic);end div_miao;architecture behave of div_miao issignal cnt : s

17、td_logic_vector(27 downto 0);begin process(clk) begin if clkevent and clk = 1 then if(cnt = 10000000-1) then cnt 0); else cnt = cnt + 1; end if; if cnt 5000000 then miao_clk = 1; else miao_clk seg_out seg_out seg_out = 10111111; end case; end process; end behave;-state_ctrllibrary ieee;use ieee.std_

18、logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity state_ctrl isport ( miao_clk : in std_logic; rst_n : in std_logic; seg_out1 : out std_logic_vector(7 downto 0); seg_out2 : out std_logic_vector(7 downto 0); led_out : out std_logic_vector(11 downto 0);end state_ctrl;a

19、rchitecture behave of state_ctrl issignal qh : std_logic_vector(3 downto 0);signal ql : std_logic_vector(3 downto 0);type state_type is(s0,s1,s2,s3);signal state : state_type;begin process(miao_clk) begin if(rst_n = 0) then state = s0; qh = 0011; ql = 0100; led_out if(ql = 0) then ql = 1001; if(qh =

20、 0) then state = s1; led_out = 010001010001; qh = 0000; ql = 0010; else qh = qh - 1; end if; else ql = ql - 1; state if(ql = 0) then ql = 1001; if(qh = 0) then state = s2; led_out = 001100001100; qh = 0101; ql = 1001; else qh = qh - 1; end if; else ql = ql - 1; state if(ql = 0) then ql = 1001; if(qh = 0) then state = s3; led_out = 001010001010; qh = 0000; ql = 0010; else qh = qh - 1; end if; else ql = ql - 1; state if(ql = 0) then ql = 1001; if(qh = 0) then state = s0; led_out = 100001100001; qh = 0011; ql = 0100; else qh = qh - 1; end if; else

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1