idreadback.vhd

来自「CNC 的开放码,EMC2 V2.2.8版」· VHDL 代码 · 共 31 行

VHD
31
字号
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;



entity idreadback is
    Generic ( id : std_logic_vector(31 downto 0);
	           mc : std_logic_vector(31 downto 0));

	 Port ( readid : in std_logic;
           readmc : in std_logic;
           obus : out std_logic_vector(31 downto 0));
end idreadback;

architecture Behavioral of idreadback is
begin

areadidprocess: process (readid, readmc)

begin
	if readid = '1' and readmc = '0' then 
		obus <= id; 
	 elsif readmc = '1' and readid = '0' then 
		obus <= mc; 
	else
		obus <= (others => 'Z');
	end if;
end process areadidprocess;

end Behavioral;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?