sreg8b.vhd

来自「用VHDL语言仿真乘法器设计。能够实现一般乘法运算。」· VHDL 代码 · 共 20 行

VHD
20
字号
library ieee;
use ieee.std_logic_1164.all;
entity sreg8b is
port(clk,load:in std_logic;
din:in std_logic_vector(7 downto 0);
qb:out std_logic);
end sreg8b;
architecture behav of sreg8b is
signal reg8:std_logic_vector(7 downto 0);
begin
	process(clk,load)
	begin
		if clk'event and clk='1' then
			if load='1' then reg8<=din;
			else reg8(6 downto 0)<=reg8(7 downto 1);
			end if;
		end if;
	end process;
qb<=reg8(0);
end behav;

⌨️ 快捷键说明

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