interruptor.vhd

来自「用VHDL实现视频控制程序,实现对图像的采集和压缩,」· VHDL 代码 · 共 42 行

VHD
42
字号
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 + =
减小字号Ctrl + -
显示快捷键?