📄 interruptor.vhd
字号:
library IEEE;
use IEEE.std_logic_1164.all;
entity Interruptor is
port (
clk: in STD_LOGIC;
resetz: in STD_LOGIC;
enable:in STD_LOGIC;
turno: out STD_LOGIC
);
end Interruptor;
architecture Interruptor_arch of Interruptor is
signal p_turno,a_turno:std_logic;
begin
p:process(a_turno,enable)
begin
if(enable='1')then
p_turno<= not a_turno;
else
p_turno<=a_turno;
end if;
end process;
sinc:process(clk, resetz)
begin
if(resetz='0')then
a_turno<='0';
elsif(clk'event and clk='1')then
a_turno<=p_turno;
end if;
end process;
turno<=a_turno;
end Interruptor_arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -