要求在QUARTUSII上完成功能仿真波形,并在EDA实验箱上实现

来源:百度知道 编辑:UC知道 时间:2024/06/17 05:46:09
1、 用VHDL语言设计一个3-8译码器,功能如下:

E1
E2a
E2b
A B C
Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

1
0
0
0 0 0
1 1 1 1 1 1 1 0

1
0
0
0 0 1
1 1 1 1 1 1 0 1

1
0
0
0 1 0
1 1 1 1 1 0 1 1

1
0
0
0 1 1
1 1 1 1 0 1 1 1

1
0
0
1 0 0
1 1 1 0 1 1 1 1

1
0
0
1 0 1
1 1 0 1 1 1 1 1

1
0
0
1 1 0
1 0 1 1 1 1 1 1

1
0
0
1 1 1
0 1 1 1 1 1 1 1

其他
任意
1 1 1 1 1 1 1 1

2、用VHDL语言设计一个带异步清0的4位二进制加法计数器。

参考引脚分配:

clear
1

clock
236

library ieee;
use ieee.std_logic_1164.all;
entity decoder3_8 is
port(a,b,c,e1,e2a,e2b:in std_logic;
y:out std_logic_vector(7 downto 0));
end decoder 3_8;
architecture decoder1 of decoder3_8 is
signal indata:std_logic_vector(2 downto 0);
begin
indata<=c&b&a;
process(indata,e1,e2a,e2b)
begin
if(e1=1 and e2a=0 and e2b=0)then
case indata is
when"000"=>y<="11111110";
when"001"=>y<="11111101";
when"010"=>y<="11111011";
when"011"=>y<="11110111";
when"100"=>y<="11101111";
when"101"=>y<="11011111";
when"110"=>y<="10111111";
when"111"=>y<="01111111";
when others=>y<="XXXXXXXX";
end case;<