EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

elektroda.net NewsGroups Forum Index - FPGA - **Sharing a single Lookup Table**

Guest

Wed Sep 28, 2016 3:31 am

I am implementing the gamma correction LUT as in https://ptpb.pw/ZwYS

if I want to share a single combinatorial lookup table with multiple input, it is not possible, right ?

because in this case, the lookup table would just assign to one output reg

say all r, g and b channels want to use the same combinatorial lookup table, how would I do it ?

Someone suggested the following, could anyone advice ?

mux -> lut -> demux

But my friend told me the following instead:

A 256-sized table can be done in one slice, containing 4-luts--for every output bit. It will consume all 4 luts of the slice.

So ... we're talking about 8 slices, or 32-luts, per color.

96 LUTs is reasonable. Now, if you wished to somehow re-use those 96 LUTs to get your logic down to a smaller size, be prepared for the fact that it will cost logic to make any logic change--perhaps as much as the 96 LUTs that you would originally need.

Guest

Fri Sep 30, 2016 8:43 pm

On Tuesday, September 27, 2016 at 7:31:56 PM UTC-6, Marvin L wrote:

I am implementing the gamma correction LUT as in https://ptpb.pw/ZwYS

if I want to share a single combinatorial lookup table with multiple input, it is not possible, right ?

because in this case, the lookup table would just assign to one output reg

say all r, g and b channels want to use the same combinatorial lookup table, how would I do it ?

if I want to share a single combinatorial lookup table with multiple input, it is not possible, right ?

because in this case, the lookup table would just assign to one output reg

say all r, g and b channels want to use the same combinatorial lookup table, how would I do it ?

You can share a blockRAM-based lookup table between two users. A LUT-ram-based lookup can't be shared unless you timeslice it. Yes, you can do a 256->1 lookup in one Virtex-7 slice (using 4 LUTs, 2 F7, and 1 F8 mux).

I looked at your function and it doesn't look like you can use a lookup table. There is a 3x3 matrix multiplication so the output is a function of R, G, and B, so if you wanted to do a lookup the table would have to be 3-dimensional and have 256^3 elements. I think you actually have to implement the logic in this case. Because the R,G,B inputs are only 8 bits each, you can still implement the multiplications in 256-deep lookup tables, but you'd still need to sum the results together to get the result of the matrix mult.

elektroda.net NewsGroups Forum Index - FPGA - **Sharing a single Lookup Table**