+ Post New Thread
Results 1 to 5 of 5
22nd June 2004, 12:30 #1
what is look up table......how can i use it in vhdl .....to reduce a "case statements"........................
thanks for your help
22nd June 2004, 12:30
22nd June 2004, 14:55 #2
- Join Date
- Jan 2003
- 16 / 16
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
22nd June 2004, 14:55
22nd June 2004, 17:25 #3
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,
1 members found this post helpful.
22nd June 2004, 17:25
21st April 2011, 08:04 #4
- Join Date
- Apr 2011
- 0 / 0
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.
21st April 2011, 18:02 #5
Re: lookup table in vhdl?
2 methods.Do we need to do required calculations offline and then store the values into the LUT?
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.