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

    Join Date
    Aug 2011
    Posts
    2,442
    Helped
    281 / 281
    Points
    11,980
    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: 34,876, Level: 45
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,390
    Helped
    1861 / 1861
    Points
    34,876
    Level
    45

    Re: What FPGA logic do constants consume

    They just get connected to VCC/GND



  3. #3
    Super Moderator
    Points: 236,416, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    40,889
    Helped
    12495 / 12495
    Points
    236,416
    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: 11,980, Level: 26

    Join Date
    Aug 2011
    Posts
    2,442
    Helped
    281 / 281
    Points
    11,980
    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: 34,876, Level: 45
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,390
    Helped
    1861 / 1861
    Points
    34,876
    Level
    45

    Re: What FPGA logic do constants consume

    Why not compile the design, and take a look?



  6. #6
    Super Moderator
    Points: 236,416, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    40,889
    Helped
    12495 / 12495
    Points
    236,416
    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: 4,901, Level: 16

    Join Date
    Apr 2016
    Posts
    1,034
    Helped
    184 / 184
    Points
    4,901
    Level
    16

    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: 27,697, Level: 40
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,323
    Helped
    1535 / 1535
    Points
    27,697
    Level
    40

    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.

--[[ ]]--