Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Help me in Look up table coding in vhdl!!!

Status
Not open for further replies.

deepthi.reddy.912

Newbie level 5
Joined
Apr 19, 2011
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,447
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_out:eek:ut 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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top