+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Full Member level 5
    Points: 3,928, Level: 14
    asic1984's Avatar
    Join Date
    Nov 2003
    Posts
    257
    Helped
    4 / 4
    Points
    3,928
    Level
    14

    vhdl lut

    hi all

    what is look up table......how can i use it in vhdl .....to reduce a "case statements"........................



    thanks for your help

    •   Alt22nd June 2004, 12:30

      advertising

        
       

  2. #2
    Full Member level 4
    Points: 3,620, Level: 14
    Al Farouk's Avatar
    Join Date
    Jan 2003
    Location
    Egypt
    Posts
    191
    Helped
    16 / 16
    Points
    3,620
    Level
    14

    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



    •   Alt22nd June 2004, 14:55

      advertising

        
       

  3. #3
    Full Member level 4
    Points: 2,651, Level: 12
    bibo1978's Avatar
    Join Date
    May 2004
    Posts
    210
    Helped
    12 / 12
    Points
    2,651
    Level
    12

    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.

    •   Alt22nd June 2004, 17:25

      advertising

        
       

  4. #4
    Newbie level 5
    Points: 341, Level: 3

    Join Date
    Apr 2011
    Posts
    10
    Helped
    0 / 0
    Points
    341
    Level
    3

    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.
    or with



  5. #5
    Advanced Member level 5
    Points: 14,946, Level: 29
    mrflibble's Avatar
    Join Date
    Apr 2010
    Posts
    2,724
    Helped
    686 / 682
    Points
    14,946
    Level
    29

    Re: lookup table in vhdl?

    Do we need to do required calculations offline and then store the values into the LUT?
    2 methods.

    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.



--[[ ]]--