📄 registro.vhd
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity registro is
Generic ( tam : integer :=8);
Port ( inbus : in std_logic_vector(tam-1 downto 0);
outbus : out std_logic_vector(tam-1 downto 0);
reset : in std_logic;
load : in std_logic;
clk : in std_logic);
end registro;
architecture Behavioral of registro is
signal M : std_logic_vector(tam-1 downto 0);
begin
process(reset,clk)
begin
if (reset='1') then
M<=(others=>'0');
elsif (rising_edge(clk)) then
if load='1' then
M<=inbus;
end if;
end if;
end process;
outbus<=M;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -