deepthi.reddy.912
Newbie level 5
Hi,
Is there any possibility to calculate the values to be stored in LUT in separate file like .exe and then automatically the contents have to be retrieved into the .vhdl code when compiled or simulated?
I am working on 4-tap Distributed Arithmetic FIR Filter in which the set of four parallel-in serial out shift register inputs are given to the LUT in which I need to store the partial products of constant coefficients(4) and input(4-bit).
I have one more question that how to use the shift input data given to LUT to calculate the partial products in case of 4-tap Serial Distributed arithmetic FIR Filter in particular.
The following is the LUT code I am using now.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
ENTITY ROM_new is
--GENERIC (n: INTEGER :=4);
-- no. of address inputs to ROM
PORT( ROM_addr: in std_logic_vector(3 downto 0);
clk,rst: in std_logic;
ROM_out: out std_logic_vector(7 downto 0));
end ROM_new;
Architecture arc_ROMnew of ROM_new is
--component shift_block
--port (clk,rst:in std_logic;
-- data_in:in std_logic_vector( n-1 downto 0);
-- data_outut std_logic_vector( n-1 downto 0));
--end component;
begin
Process(ROM_addr)
begin
-- if rst='1' then
-- ROM_out<="00000000";
-- else
CASE ROM_addr IS
WHEN "0001" => ROM_out <= "00000111";
WHEN "0010" => ROM_out <= "00001110";
WHEN "0011" => ROM_out <= "00000101";
WHEN "0100" => ROM_out <= "00011100";
WHEN OTHERS => ROM_out <= "00000000";
END CASE;
-- end if;
END PROCESS;
END arc_ROMnew;
Can anybody help me ASAP?
thankyou.
Is there any possibility to calculate the values to be stored in LUT in separate file like .exe and then automatically the contents have to be retrieved into the .vhdl code when compiled or simulated?
I am working on 4-tap Distributed Arithmetic FIR Filter in which the set of four parallel-in serial out shift register inputs are given to the LUT in which I need to store the partial products of constant coefficients(4) and input(4-bit).
I have one more question that how to use the shift input data given to LUT to calculate the partial products in case of 4-tap Serial Distributed arithmetic FIR Filter in particular.
The following is the LUT code I am using now.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
ENTITY ROM_new is
--GENERIC (n: INTEGER :=4);
-- no. of address inputs to ROM
PORT( ROM_addr: in std_logic_vector(3 downto 0);
clk,rst: in std_logic;
ROM_out: out std_logic_vector(7 downto 0));
end ROM_new;
Architecture arc_ROMnew of ROM_new is
--component shift_block
--port (clk,rst:in std_logic;
-- data_in:in std_logic_vector( n-1 downto 0);
-- data_outut std_logic_vector( n-1 downto 0));
--end component;
begin
Process(ROM_addr)
begin
-- if rst='1' then
-- ROM_out<="00000000";
-- else
CASE ROM_addr IS
WHEN "0001" => ROM_out <= "00000111";
WHEN "0010" => ROM_out <= "00001110";
WHEN "0011" => ROM_out <= "00000101";
WHEN "0100" => ROM_out <= "00011100";
WHEN OTHERS => ROM_out <= "00000000";
END CASE;
-- end if;
END PROCESS;
END arc_ROMnew;
Can anybody help me ASAP?
thankyou.