4-bit table lookup

Discussion in 'VHDL' started by Klaus Mayer, Feb 4, 2008.

  1. Klaus Mayer

    Klaus Mayer Guest

    Hi

    I have a simple question, whats the best way of designing a lookup table
    which is 16 bit wide. It receives 4 input bits and depending of the
    values 1 bit will be selected for the output. As I have a 32 bit
    architecture, this kind of lookup table
    should have 32 instances in parallel. So I wonder what is the best
    option to implement this? I also need to configure these lookup tables
    before using them.

    Is the following approach feasable? I have one register that is 16 bits
    wide and which holds the value of my lookup table. Now I use 32 Muxes
    and each receives the 16 bits that are stored in the lookup register.
    Each mux has its own 4-input selection signal, which consists of
    the corresponing bits of the registers, and outputs the the
    corresponding bit. So I would need quite a lot of muxes, it is maybe
    better to have 32 16-bit lookup tables in parallel and read there
    directly the value out?

    Thanks for helpful tips!
     
    Klaus Mayer, Feb 4, 2008
    #1
    1. Advertising

  2. Klaus Mayer

    Guest

    >I have a simple question, whats the best way of designing a lookup table
    >which is 16 bit wide. It receives 4 input bits and depending of the
    >values 1 bit will be selected for the output. As I have a 32 bit
    >architecture, this kind of lookup table
    >should have 32 instances in parallel. So I wonder what is the best
    >option to implement this? I also need to configure these lookup tables
    >before using them.
    >
    >Is the following approach feasable? I have one register that is 16 bits
    >wide and which holds the value of my lookup table. Now I use 32 Muxes
    >and each receives the 16 bits that are stored in the lookup register.
    >Each mux has its own 4-input selection signal, which consists of
    >the corresponing bits of the registers, and outputs the the
    >corresponding bit. So I would need quite a lot of muxes, it is maybe
    >better to have 32 16-bit lookup tables in parallel and read there
    >directly the value out?


    You should express the problem abstractly for maximum clarity (e.g. in
    VHDL) and trust to the compiler to provide an efficient implementation
    in the target technology. For example, a 16-element lookup table
    yielding a one bit result is likely to be implemented as a single
    "logic element" in current technologies. But this implementation
    detail should not concern you, unless you need to squeeze out the
    maximum performance. Even then, it's not clear that you will excel
    the standard tools.

    In brief, don't think in terms of lookup tables and multiplexers.
    Think in terms of the abstract facilities provided by the design
    language which you have chosen, since it's more likely that these can
    express clearly the problem which you are solving. In the current
    pretentious terminology, they are closer to the "problem domain".

    Mike
     
    , Feb 4, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gerry
    Replies:
    0
    Views:
    550
    gerry
    Apr 24, 2004
  2. Big Dave
    Replies:
    1
    Views:
    529
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 7, 2004
  3. Replies:
    3
    Views:
    1,775
    Timothy Bendfelt
    Jan 19, 2007
  4. Replies:
    9
    Views:
    988
    Juha Nieminen
    Aug 22, 2007
  5. Jeff.M
    Replies:
    6
    Views:
    182
    Lasse Reichstein Nielsen
    May 4, 2009
Loading...

Share This Page