eap项目总结报告13p

上传人:re****.1 文档编号:508083765 上传时间:2022-10-17 格式:DOC 页数:14 大小:471.50KB
返回 下载 相关 举报
eap项目总结报告13p_第1页
第1页 / 共14页
eap项目总结报告13p_第2页
第2页 / 共14页
eap项目总结报告13p_第3页
第3页 / 共14页
eap项目总结报告13p_第4页
第4页 / 共14页
eap项目总结报告13p_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《eap项目总结报告13p》由会员分享,可在线阅读,更多相关《eap项目总结报告13p(14页珍藏版)》请在金锄头文库上搜索。

1、验一:译码器及计数器设计实验1、实验目的1)复习二进制译码器的功能。2)学习VHDL语言源程序输入方法。3)学习VHDL语言源程序检查和修改。4)掌握用VHDL语言设计一个3线-8线译码器和六十进制计数器的方 法。5)掌握VHDL语言编辑器的基本操作。2、实验内容1)本实验给出了有错误的3线一8线译码器的VHDL程序,请采用VHDL 编辑器,修改调试程序。2)采用VHDL设计方法,设计一个60进制计数器,采用BCD码输出。3、实验步骤(一)、38译码器1、分析3 8入译码器原理,设计相应端口以及信号输入输出变量等。2、其中为三位XG2A、G2政为三个输入控制端。只有当译码器才X处于全为高电平。

2、1111110 1 r000000000000000001111则0、0110011TTj o11G译码器将处在禁止状1010101111111011111G1、1 丰 1, G2A= 0,G2B= 0 时,译1态1态、11110111110111打11011111 .所有输出端1 0111110111111101111111(二)、设计一个60进制计数器,采用 BCD码输出。1) BCD码:用4位二进制数编码表示1位十进制数2) 一个十进制计数器即为一个4位二进制计数器,若将两个 4位二进制计数器连接起来就可构成100进制以内的计数器。实验程序1、3-8译码器library IEEE;use

3、 IEEE . STD_LOGIC_1164 .ALL;use IEEE . STD_LOGIC_ARITH .ALL;use IEEE . STD_LOGIC_UNSIGNED.ALL;-Uncomment the following lines to use the declarations that are-provided for instantiating Xilinx primitive components.-library UNISIM;-use UNISIM.VCompo nen ts.all;en tity T138 isport(A,B,C,G1,G2A,G2B:inst

4、do gic;Y:outstdo gic_vector(7 dow nto 0);end T138;architecture Behavioral of T138 issig nal DN:stdo gic_vector(2 dow nto 0);beg inD_INYYYYYYYYn ull; end case;else Y=11111111end if;end process;end Behavioral;仿真结果:1o01III IIHnIHHIIII HI Hiul IIIII| ill IIIIII H H IIIIIIIIl l|lIHilTlIIIagro烦障印吸30005- U

5、On*IpTi2.60进制计数器实验程序:library IEEE;- Un comme nt the followi ng lines to use the declarati ons that are- provided for instantiating Xilinx primitive components.-library UNISIM;-use UNISIM.VCompo nen ts.all;en tity jishuqi isport(clk:in std_logic;en ,clr:i n std_logic; q,qd:out stdogic_vector(3 downto

6、 0); end jishuqi;architecture Behavioral of jishuqi issig nal co:std_logic;signal ql,qh:stdogic_vector(3 downto 0); beg in q( 3)=qh (3);q( 2)=qh (2);q(1)=qh(1); q(0)=qh(0); qd( 3)=ql(3); qd(2) =ql (2);qd(1)=ql(1);qd(0)=ql(0);P1:process(clk,e n,clr)begi nif (clr=1) then ql=0000;elsif (clkevent and cl

7、k=1) thenif (en=1) thenif (ql=1001) the n ql=0000;elseql=ql+1; end if;end if;end if;end process P1; co=ql(3) and ql(0);P2:process(clk,clr)begi nif (clr=1) then qh=0000;elsif(clkeve nt and clk=1) the n if (co=1) the n if (qh=0101) then qh=0000;else qh=qh+1;end if;end if;end if;end process P2;end Beha

8、vioral;rjimnjiiEIJL0LTLHrLJmrLru卜国h C1J1- oo j0ETUlHrtr网ij卿廉郎醐;山切晦郦帥to車10? IBSI rl1 bLTLH和ruKVa fii1 uGct r tmcra前 k 21 - fii L (pirirLRHrun仿真结果实验二、四位全加器和8位移位寄存器设计实验1、实验目的1)学习了解加法器工作原理。2)学习用VHDL语言设计全加器的设计方法。3)学习使用元件例化的方法设计多位加法器。4)了解移位寄存器的工作原理5)学习移位寄存器设计方法2、实验内容1)用VHDL语言设计全加器。2)用元件例化方法设计一个四位二进制加法器。3)

9、用VHDL语言设计一个双向可控移位寄存器3、实验步骤1)4位二进制加法器可以由4个一位全加器通过级联的方式构成。全加器:完成加数、被加数、低位的进位数三个1位数相加,并产生本位和 及向高位进位”。2)移位寄存器是由D-型触发器构成的,将前一个触发器的输出作为下一个触发器的输入,每个触发器的时钟连接成同步方式。常用的移位寄存器有并行输入串行输出移位寄存器和串行输入并行输出移位寄存器。这些移位寄存器经常用作串并转换电路。试验程序:1. 用元件例化方法设计一个四位二进制加法器 全加器:library IEEE;- Un comme nt the followi ng lines to use the

10、 declarati ons that are - provided for instantiating Xilinx primitive components.-library UNISIM;-use UNISIM.VCompo nen ts.all;en tity qua njia isport (a,b,ci n:in stdo gic;cout,sum:out std_logic);end qua njia;architecture Behavioral of qua njia issig nal int: std_logic;beg inint = a xor b ;cout =(a

11、 and b) or (int and cin);sum = int xor cin;end Behavioral;library IEEE;- Un comme nt the followi ng lines to use the declarati ons that are - provided for instantiating Xilinx primitive components.-library UNISIM;-use UNISIM.VCompo nen ts.all;en tity siwei isgen eric (n:i nteger:= 4 );port (a,b:in s

12、tdogic_vector(n downto 1);cin: in std_logic;sum: out std_logic_vect or(n dow nto 1);cout: out std_logic); end siwei;architecture Behavioral of siwei is comp onent qua njiaport (a,b,ci n:in stdo gic; sum,cout:out std_logic);end comp onent;sig nal carry: stdo gic_vector( n dow nto 1);beg inU1: quanjia port map(a(1),b(1),ci n,sum(1),carry(1);U2: quanjia port map(a(2),b(2),carry(1),sum(2),carry(2)

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号