📄 reg.vhd
字号:
--------------------------------锁存器用于锁存闹钟数据
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity reg is
port(lock : in std_logic;
DataIn0,DataIn1 : in std_logic_vector(3 downto 0);
DataIn2,DataIn3 : in std_logic_vector(3 downto 0);
DataOut0,DataOut1 : out std_logic_vector(3 downto 0);
DataOut2,DataOut3 : out std_logic_vector(3 downto 0));
end entity reg;
-------------------------------------------------
architecture behave of reg is
begin
process(lock,DataIn0,DataIn1,
DataIn2,DataIn3)
begin
if lock'event and lock='1' then
DataOut0 <= DataIn0;
DataOut1 <= DataIn1;
DataOut2<= DataIn2;
DataOut3 <= DataIn3;
end if;
end process;
end architecture behave;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -