UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
1,430 Views
Registered: ‎08-30-2018

Number of configuration bits used by design in Vivado

Jump to solution

Hi,

 

I am using Vivado 2017.3 targeting a Zedboard with a Zynq FPGA.

 

I have designed and implemented a design and generated bitstream that works properly. I am wondering whether it is possible to decode the number of configuration bits in FPGA that are used by the implemented design in the Vivado tool or any corresponding output file. Is it possible to extract this information?

 

Thanks in advance for your help and support.

 

Bests,

Daryon

1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
1,326 Views
Registered: ‎08-30-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

Hi,

Thanks for your replies. I found the solution toward the number of configuration bitsusedin a design. I share it here for the other people who may have the same question.

 

In Vivado tool, inside the XDC file we can set the following constraint:

set_property essential.bits.seu yes [get_pots current_design]

By using this constraint, while the bitstream generation and .EBD file will also be generated. This file contains 0's and 1's. We write an script to count the number of 1's that will give us the number of bits used in design implementation.

 

Hope it can help.

Daryon

12 Replies
Xilinx Employee
Xilinx Employee
1,417 Views
Registered: ‎06-06-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

Hi @daryon,

 

Vivado IDE can verify and/or readback the configuration data (i.e., .bit file) downloaded into an FPGA.

 

For more information please refer Chapter 7  of UG908 (v2018.2).

 

Regards,

Deepak D N

---------------------------------------------------------------------------------------------------------------------------------------------

Please reply or Give Kudos or Mark it as an Accepted Solution.

---------------------------------------------------------------------------------------------------------------------------------------------

0 Kudos
1,394 Views
Registered: ‎09-17-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

You can assume a bit in the bitstream that is a 1 is used, (rough first guess)

 

As the default for all bits is a 0.  The bits that would affect the result if flipped, are called critical bits and the only way to find them is to flip every bit, one at a time, and see which ones break things (there is no tool, nor means to find these ).  Bits that must change to create the bitstream are called essential bits.  They may not affect operation as they are masked in space (not used by the function) or time (not used at this clock edge).  The ratio of bits that matter to operation is called the Architectual Vulnerability Factor (AVF) or Design Vulnerability Factor (DVF).  So for most designs, it is from 2 to 10%.

 

Essential bits are ~ 10 to 35% of the bitstream;  Critical bits are ~ 2 to 10% of a bitstream (for a design > 80% of resources full).

 

Look at the SEM IP if interested in how to protect against bit flips or tampering.

Highlighted
Adventurer
Adventurer
1,327 Views
Registered: ‎08-30-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

Hi,

Thanks for your replies. I found the solution toward the number of configuration bitsusedin a design. I share it here for the other people who may have the same question.

 

In Vivado tool, inside the XDC file we can set the following constraint:

set_property essential.bits.seu yes [get_pots current_design]

By using this constraint, while the bitstream generation and .EBD file will also be generated. This file contains 0's and 1's. We write an script to count the number of 1's that will give us the number of bits used in design implementation.

 

Hope it can help.

Daryon

Scholar drjohnsmith
Scholar
1,320 Views
Registered: ‎07-09-2009

Re: Number of configuration bits used by design in Vivado

Jump to solution

What are you expecting to get out of knowing the number of bits set to '1' ?

 

It tells you not a lot, 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Tags (1)
Adventurer
Adventurer
1,313 Views
Registered: ‎08-30-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

@drjohnsmith, Good question. We will use the number of configuration bits set to 1 to calculate the cross-section of the implemented design that is a metric for robustness of the system.

Scholar drjohnsmith
Scholar
1,301 Views
Registered: ‎07-09-2009

Re: Number of configuration bits used by design in Vivado

Jump to solution
Robustness of the design ? Against bit flipping ?
Is this a standard metric ?

My thought is a '0' is just as valuable as a '1',
if either gets toggle the design may or may not be broken,
I'd have thought its the total number of bits , times by a factor to take account of the design , and how critical a bit flip would be .
i.e. a flip in a shift register might be critical if its used as a counter, but less critical if its used as a delay of video data say.
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
1,298 Views
Registered: ‎09-17-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

Well,

That will be an over estimate by a factor of 5 to 10, as the actual cross section of your design is likely between 2 and 10% of the bits, and almost never more than 10%.  Vivado reports the essential bits (still 2 to 4 x larger than the actual critical bits).

 

As an example, typical microblaze designs run 2%, while a crypto design might run 10%.

0 Kudos
1,295 Views
Registered: ‎09-17-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

The default is 0,

So all unused interconnect, LUT are 0's.  0's might be essential, and a few critical, but in the grand scheme, statistics takes over.

As mentioned, report essential bits (TCL command) is really the best.  Also using the SEU FIT spreadsheet.

0 Kudos
Adventurer
Adventurer
1,289 Views
Registered: ‎08-30-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

@lowearthorbit,

 

Thanks for your reply. Regarding your statement : " report essential bits (TCL command)". I do not know this command and how it works. Can you please elaborate more on it with an example using the correct and functional Tcl command?

Thanks,

1,276 Views
Registered: ‎09-17-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

For that,

I leave you to read the documentation.  SEU mitigation, all the tools that Xilinx offers, all the features, too numerous to detail here.  Search in the search icon (top of this site).  

 

0 Kudos
1,274 Views
Registered: ‎09-17-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

"set_property bitstream.seu.essentialbits yet [current_design]"

The build process now generated .edc file and give a statement in the log window saying 30% are essential bits.

 

(found by searching as directed in previous post)

Adventurer
Adventurer
1,254 Views
Registered: ‎08-30-2018

Re: Number of configuration bits used by design in Vivado

Jump to solution

Thanks @lowearthorbit, this is exactly what I haveusedin my XDC file. I think it should be "yes" instead of "yet" which I know it is just a small typo.

 

"set_property bitstream.seu.essentialbits yes [current_design]"