FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2007, 03:01 PM
Mike
Guest
 
Posts: n/a
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!
Reply With Quote
  #2 (permalink)  
Old 11-29-2007, 03:13 PM
Andy
Guest
 
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
Reply With Quote
  #3 (permalink)  
Old 11-29-2007, 03:55 PM
Mike
Guest
 
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?

Reply With Quote
  #4 (permalink)  
Old 11-29-2007, 08:12 PM
Andy
Guest
 
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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
have some problems with Lookup Table.. MiP VHDL 3 08-29-2006 09:15 AM
implementing a lookup table [email protected] Verilog 4 04-19-2006 05:44 PM
MAP: what are route-through look up tables [email protected] FPGA 2 07-07-2004 12:13 AM
spartan3 pin tables John Williams FPGA 5 09-18-2003 12:19 AM


All times are GMT +1. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved