📄 aregister.vhd.bak
字号:
library IEEE;use IEEE.std_logic_1164.all;entity ARegister is port( op: in std_logic_vector(1 downto 0); clk: in std_logic; din: in std_logic_vector(31 downto 0); dout: out std_logic_vector(31 downto 0) );end ARegister;architecture behav of ARegister issignal data: std_logic_vector(31 downto 0);beginreg: process(clk)begin if (clk'event and clk = '1') then if (op = "01") then --data <= din>>1; data := (31 downto 31 => '0') & din(31 downto 1); elsif (op = "10" or op = "11") then data <= (others=>'0'); end if; dout <= data; end if;end process;end behav;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -