conkeep.vhd
来自「电子抢答器 系统复位后进行抢答.超前抢答显示犯规信号」· VHDL 代码 · 共 33 行
VHD
33 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity conkeep is port
(
reset :in std_logic;
s :in std_logic_vector(3 downto 0);
decodeout :buffer std_logic_vector(6 downto 0);
f :buffer std_logic
);
end conkeep;
architecture truthtable of conkeep is
begin
f<='0'when(decodeout="1111110")else'1';
process(s,reset)
begin
if(reset='1')then
decodeout<="1111110";
elsif(f='0')then
case s is
when "0000"=>decodeout<="1111110";
when "0001"=>decodeout<="0110000";
when "0010"=>decodeout<="1101101";
when "0100"=>decodeout<="1111001";
when "1000"=>decodeout<="0110011";
when others=>decodeout<="1111011";
end case;
end if;
end process;
end truthtable;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?