aregister.vhd

来自「the booth algorithm to implement the 32b」· VHDL 代码 · 共 29 行

VHD
29
字号
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 + =
减小字号Ctrl + -
显示快捷键?