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

📄 registro.vhd

📁 This sources implement a 8-bit FIR Filter with selectable coefficent rom.
💻 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 + -