📄 reg8.vhd
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity reg8 is -- an 8-bit register
port(
CLK : in std_logic;
Rst : in std_logic;
enable : in std_logic;
Data_in : in std_logic_vector(7 downto 0);
Data_out : out std_logic_vector(7 downto 0)
);
end reg8;
architecture arch_reg8 of reg8 is
signal temp : std_logic_vector(7 downto 0);
begin
process( CLK, Rst)
begin
if Rst = '1' then
temp <= (others => '0');
elsif
enable = '1' and CLK'event and CLK = '1' then
temp <= data_in;
end if;
end process;
data_out <= temp;
end arch_reg8;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -