+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Advanced Member level 5
    Points: 12,344, Level: 26

    Join Date
    Aug 2011
    Posts
    2,501
    Helped
    288 / 288
    Points
    12,344
    Level
    26

    What FPGA logic do constants consume

    Hello,

    Suppose I have a large set of ~6000 vectors ( 16 bits each ) which I use as coefficients in my design.
    There's no address decoding (each set is connected to a specific logic block) and all sets are constant during compile time.

    Will these be implemented as simple wires to VCC / GND or there's a chance that the tool will use LUTs / Registers / RAM for some reason ?

    •   Alt11th July 2017, 22:20

      advertising

        
       

  2. #2
    Advanced Member level 5
    Points: 35,892, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,567
    Helped
    1914 / 1914
    Points
    35,892
    Level
    46

    Re: What FPGA logic do constants consume

    They just get connected to VCC/GND



  3. #3
    Super Moderator
    Points: 241,827, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    41,992
    Helped
    12772 / 12772
    Points
    241,827
    Level
    100

    Re: What FPGA logic do constants consume

    If it's appropriate to store the constants in ROM (initialized RAM), you can do that. The tools won't do that "for some reason" rather than your decision.



    •   Alt11th July 2017, 22:30

      advertising

        
       

  4. #4
    Advanced Member level 5
    Points: 12,344, Level: 26

    Join Date
    Aug 2011
    Posts
    2,501
    Helped
    288 / 288
    Points
    12,344
    Level
    26

    Re: What FPGA logic do constants consume

    If it's appropriate to store the constants in ROM (initialized RAM), you can do that.
    I don't want to do that.
    I need all values to be accessible simultaneously and (obviously) would prefer it consumes no resources other then routing to VCC / GND.

    Again,
    I have a large array of N vectors and N circuits.
    Each vector is connected to a different circuit.
    The vectors are all constant during compile time.

    Intuitively, I see no reason why these constant vectors shall be implemented by something other than simple wires to either VCC or GND.
    And this is exactly what I want...but I'm not 100% sure.

    Do you agree that that's what would happen ?



  5. #5
    Advanced Member level 5
    Points: 35,892, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,567
    Helped
    1914 / 1914
    Points
    35,892
    Level
    46

    Re: What FPGA logic do constants consume

    Why not compile the design, and take a look?



  6. #6
    Super Moderator
    Points: 241,827, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    41,992
    Helped
    12772 / 12772
    Points
    241,827
    Level
    100

    Re: What FPGA logic do constants consume

    I need all values to be accessible simultaneously and (obviously) would prefer it consumes no resources other then routing to VCC / GND.
    Why did you ask about RAM then?

    You'll surely get GND/VCC wires in RTL netlist. During synthesis, all possible logic minimizations will be made, pulling the constants into the logic terms. (Unless the logic blocks are locked).


    1 members found this post helpful.

    •   Alt12th July 2017, 08:09

      advertising

        
       

  7. #7
    Advanced Member level 4
    Points: 5,810, Level: 18

    Join Date
    Apr 2016
    Posts
    1,223
    Helped
    218 / 218
    Points
    5,810
    Level
    18

    Re: What FPGA logic do constants consume

    Quote Originally Posted by TrickyDicky View Post
    They just get connected to VCC/GND
    Not really, it is more complicated than that. You don't want to have any logic lumped to the ground/vdd wires as they would bounce a lot. You'd typically provide a constant that comes from a special gate called tiecell. There are cells for tie high and tie low. The FPGA vendor might hide that from you, but internally that is how it works.
    Really, I am not Sam.


    1 members found this post helpful.

  8. #8
    Super Moderator
    Points: 28,629, Level: 41
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,562
    Helped
    1586 / 1586
    Points
    28,629
    Level
    41

    Re: What FPGA logic do constants consume

    Quote Originally Posted by ThisIsNotSam View Post
    Not really, it is more complicated than that. You don't want to have any logic lumped to the ground/vdd wires as they would bounce a lot. You'd typically provide a constant that comes from a special gate called tiecell. There are cells for tie high and tie low. The FPGA vendor might hide that from you, but internally that is how it works.
    Exactly this....

    Shown implemented in Vivado like this:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	7 
Size:	5.4 KB 
ID:	139887
    Click image for larger version. 

Name:	Capture2.PNG 
Views:	13 
Size:	25.2 KB 
ID:	139888


    1 members found this post helpful.

--[[ ]]--