Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Lookup tables

 
Thread Tools Search this Thread
Old 11-29-2007, 02:01 PM   #1
Default Lookup tables


Hi

I just wonder what is a proper way to implement lookup tables in VHDL?
I was thinking of using a Register. The thing is that I have 4 32 bit
input values. So each output bit is determined by the corresponding 4
single input bits which could be mapped than to 16 potentital values.
As I have 32 bit input values I would need a register that is 32*16
times big so that I could make the look up tables in parallel is that
right?

Cheers!


Mike
  Reply With Quote
Old 11-29-2007, 02:13 PM   #2
Andy
 
Posts: n/a
Default Re: Lookup tables
On Nov 29, 8:01 am, Mike <M...@yahoo.co.uk> wrote:
> Hi
>
> I just wonder what is a proper way to implement lookup tables in VHDL?
> I was thinking of using a Register. The thing is that I have 4 32 bit
> input values. So each output bit is determined by the corresponding 4
> single input bits which could be mapped than to 16 potentital values.
> As I have 32 bit input values I would need a register that is 32*16
> times big so that I could make the look up tables in parallel is that
> right?
>
> Cheers!


So you would need 32 sixteen-entry constant arrays. Index each array
with the 4 input bits.

VHDL constants can be initialized discretely, or with a function call,
if that helps. Depending on surrounding registers, etc. they can be
implemented as distributed rams(roms), or combined as a block
ram(rom).

Andy

Andy


Andy
  Reply With Quote
Old 11-29-2007, 02:55 PM   #3
Mike
 
Posts: n/a
Default Re: Lookup tables

> So you would need 32 sixteen-entry constant arrays. Index each array
> with the 4 input bits.
>
> VHDL constants can be initialized discretely, or with a function call,
> if that helps. Depending on surrounding registers, etc. they can be
> implemented as distributed rams(roms), or combined as a block
> ram(rom).


Thanks for your comment. But all this lookup table have the same
content, so I could just use one lookup table and then multiplexors to
get the right values out of the array?



Mike
  Reply With Quote
Old 11-29-2007, 07:12 PM   #4
Andy
 
Posts: n/a
Default Re: Lookup tables
On Nov 29, 8:55 am, Mike <M...@yahoo.co.uk> wrote:
> > So you would need 32 sixteen-entry constant arrays. Index each array
> > with the 4 input bits.

>
> > VHDL constants can be initialized discretely, or with a function call,
> > if that helps. Depending on surrounding registers, etc. they can be
> > implemented as distributed rams(roms), or combined as a block
> > ram(rom).

>
> Thanks for your comment. But all this lookup table have the same
> content, so I could just use one lookup table and then multiplexors to
> get the right values out of the array?


Depends on whether you need to use the table for more than one value
simultaneously. If not, then yes, a multiplexer would work. If it is
used simultaneously, the synthesis tool should figure it out and make
multiple copies.

Andy


Andy
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Look-up tables Sine-Cosine rony Software 0 06-16-2009 09:04 AM
*$600 FREE At FULL-TILT POKER, Sign-Up with no C.C. to play on our free tables 24-7! bigpokerjackpotsonlyatpartypoker DVD Video 0 01-07-2006 05:00 AM
multidisc player that does internet lookup? cowboy DVD Video 0 11-27-2004 04:56 AM
Fruit Machines Pool Tables Arcade Video's 2 news1@bellfruits.com A+ Certification 0 07-01-2003 05:40 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46