⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shift_2.vhd

📁 thats the CPU source made by JI FENG
💻 VHD
字号:
library ieee;use ieee.std_logic_1164.all;entity shift_1 is  generic (N : integer := 16);  port (Hsel : in  std_logic_vector(1 downto 0);        B    : in  std_logic_vector (N-1 downto 0);        H    : out std_logic_vector (N-1 downto 0));end shift_1;architecture rtl of shift_1 isbegin  process(Hsel,B)  begin    case Hsel is      when "00"   => H <= B;      when "01"   => H <= '0' & B(N-1 downto 1);  -- shift right      when "10"   => H <= B(N-2 downto 0) &'0';   -- shift left;      when others => null;    end case;  end process;  end rtl;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -