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.

lookup table in vhdl?

Status
Not open for further replies.

asic1984

Full Member level 5
Full Member level 5
Joined
Nov 15, 2003
Messages
257
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,340
vhdl lut

hi all

what is look up table......how can i use it in vhdl .....to reduce a "case statements"........................



thanks for your help
 

lookup table vhdl

lookup table is simply a method to get certain output according to certain input varaible as you get for example telephone number according to input name in your telephone index. it can be implemented in VHDL in many ways for example
1- case starment (as you mention)
2- instantiate a block ram, the address is the input and the memory content is the output. (FPGA functions are implemented in this way)
3- creat an array and use the input as the index. ...etc
 

vhdl lookup table

a look up table "LUT" is actually an Sram or a flash memory (or at least the first LUT was), most LUTs nowaday are 4X1 which means that they are capable of implmenting any 4 -input to 1-output function. "4-address RAM with one bit o/p".
Virtually any combinational logic can be implemented with cascaded and parallel LUTs.
for example if you have a 16 case statement with only one o/p that have a discrete value ('1' or '0') at each statement this can be implemented in 1 LUT "which is by the way a ROM".
Note that in FPGAs LUTs doesn't exist alone they usually exists with other configurable blocks which may contain FF, MUXs, other connection defining modules "not related to routing matrix" and arithematic acceleration logic.
this Configurable Logic Blocks are named "CLB", the CLB may contain several LUTs, FFs, MUXs and arithemtic acceleration logic.

In VHDL you can usualy instantiate or infer any element the FPGA offers including LUT, any compinational statements can be implemented with LUT "doesn't mean that they actually is implemented in LUT", to instantiate a LUt all what you do is describe the data in the RAM "uaully in hexadecimal" but this is the hardway on the other hand you can just let the synthesis tool configure the data of the LUT.

Some extra features may be added to a LUT for example it can be configured to work as a "ROM, RAM and even sometimes as a shift register"

thats all folks,
 
Re: vhdl lookup table

Can we store binary values into a Look-up table?

I am doing a project on 4-tap Distributed Arithematic FIR Filter.

The filter input is given to the parallel-in serial out shift register.The outputs of shift block(block of 4 shift registers) is used as index to the LUT.
I have to store the partial products in LUT. I have four 4-bit fixed coefficients.

Do we need to do required calculations offline and then store the values into the LUT?

How to use the shift block outputs to calculate the partial products? Please help.
or with
 

Do we need to do required calculations offline and then store the values into the LUT?

2 methods.

You can make a module and explicitely tell XST to map this to a LUT.

You can instantiate a LUT, and then use a function for the value of the INIT value.

The latter method sounds like the best way for your particular project.

The function for the INIT value is simply a for loop that iterates over all possible input values, and stores the output in the proper bit of the LUT INIT.

---------- Post added at 19:02 ---------- Previous post was at 18:55 ----------

Just noticed your other post...

Or if you really want offline offline, then you can just write the INIT values for the instantiated LUTs to a .ucf file.

As in, your whatever .exe calculated the init values and writes these values to a .ucf file for the proper LUT INST names...

So you need to generate a .ucf file with something like:

INST "*/my_lut_module/lut_instance_of_the_day" INIT = <value_goes_here> ;

You will need to code your HDL such that you get easy to use systematic names for the LUT instances.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top