📄 register_16bits.vhd
字号:
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date: 12:23:01 04/02/2009 -- Design Name: -- Module Name: register_16bits - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: ---- Dependencies: ---- Revision: -- Revision 0.01 - File Created-- Additional Comments: ------------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;---- Uncomment the following library declaration if instantiating---- any Xilinx primitives in this code.--library UNISIM;--use UNISIM.VComponents.all;entity register_16bits isPort (
clk, we : in std_logic;
reset : in std_logic;
indata : in std_logic_vector( 15 downto 0);
outdata : out std_logic_vector(15 downto 0)
);end register_16bits;architecture Behavioral of register_16bits issignal data : std_logic_vector(15 downto 0);
beginprocess(clk, reset, we , indata)
begin
if reset = '0' then
data <= (others => '0');
elsif rising_edge(clk) then
if we ='1' then
data <= indata;
else
data <= data;
end if;
end if;
end process;
outdata <= data;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -