📄 tap_lut.vhd
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity tap_lut is
Port ( clk : in std_logic;
write_en : in std_logic;
Write_Data : in std_logic_vector(14 downto 0);
lut_input : in std_logic_vector(3 downto 0);
lut_output : out std_logic_vector(14 downto 0) );
end;
-- tap_lut Component
architecture Behavioral of tap_lut is
type lut_array is array (0 to 15) of std_logic_vector(14 downto 0);
signal lut_contents : lut_array;
begin
process(clk, write_en)
variable addr : integer range 0 to 15;
begin
if clk'event and clk = '1' then
addr := CONV_INTEGER(lut_input);
if write_en = '1' then
lut_contents(addr) <= Write_Data;
lut_output <= (others => '0');
else
lut_output <= lut_contents(addr);
end if;
end if;
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -