4
\$\begingroup\$

Reports from synthesis and implementation phases that Vivado generates for a project are text files with ASCII tables like this:

+-------------------------+------+-------+------------+-----------+-------+
|        Site Type        | Used | Fixed | Prohibited | Available | Util% |
+-------------------------+------+-------+------------+-----------+-------+
| Slice LUTs*             |   10 |     0 |          0 |    101400 | <0.01 |
|   LUT as Logic          |   10 |     0 |          0 |    101400 | <0.01 |
|   LUT as Memory         |    0 |     0 |          0 |     35000 |  0.00 |
| Slice Registers         |   15 |     0 |          0 |    202800 | <0.01 |
|   Register as Flip Flop |   15 |     0 |          0 |    202800 | <0.01 |
|   Register as Latch     |    0 |     0 |          0 |    202800 |  0.00 |
| F7 Muxes                |    0 |     0 |          0 |     50700 |  0.00 |
| F8 Muxes                |    0 |     0 |          0 |     25350 |  0.00 |
+-------------------------+------+-------+------------+-----------+-------+

How do people usually parse them?

Can these reports be obtained in a more easy-to-parse form?
Like CSV, XML, JSON or something?

I have a bunch of very small designs with a set of reports for each of them.
In the utilization report from synthesis phase, most fields show 0%.
I wished to extract only the fields which are not 0%.
Is there a good way to do that?

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

You'd script vivado using its Tcl interface. There, you get report_design_analysis, which can output things as CSV or JSON. Function Documentation, with you run after you run synth_design (or manually clicked the synthesis button).

You'll want to read Chapter 7 (and probably the others, as well) of Xilinx' UG906, Design Analysis and Closure Techniques.

\$\endgroup\$
3
  • \$\begingroup\$ What does UG mean in all these documents? Like UG906. I'm new to vivado. And are those documents available as pdf? The website is not that pleasant to browse through. \$\endgroup\$
    – J...S
    Commented Aug 2 at 19:26
  • \$\begingroup\$ Oh.. I guess UG is user guide...🤦 \$\endgroup\$
    – J...S
    Commented Aug 2 at 19:27
  • \$\begingroup\$ What format do you get on docs.amd.com/v/u/2017.3-English/ug906-vivado-design-analysis ? For me it /is/ a pdf. \$\endgroup\$
    – MrGerber
    Commented Aug 3 at 15:50
3
\$\begingroup\$

Built in report formats

Looking at the Vivado Design Suite Tcl Command Reference Guide (UG835) for the 2024.1 version the available formats for reports seems a bit mixed:

  1. report_ssn has a -format argument which allows CSV, HTML or TXT formats

  2. report_power_opt, report_io,report_high_fanout_nets and report_power have a -format argument which allows text or xml formats.

  3. report_bd_diffs has a format argument which allows html or text formats.

  4. report_utilization has the -spreadsheet_file argument with the description:

    Export utilization tables to the specified XLSX format spreadsheet. The ability to export a spreadsheet file is only available when the -name option is also specified and the report is generated in the GUI.

    The note about the XLSX spreadsheet report generation only being available when the report is generated in the GUI suggests Vivado may be calling an external program, and not sure if only works under Windows.

  5. report_design_analysis has options to create a vsv on json format file.

Possibility for TCL to create custom reports

Given Vivado uses TCL, rather than having to parse a standard reported generated by Vivado it may be easier to write TCL to create a custom report. The Vivado Design Suite User Guide: Using Tcl Scripting (UG894) has the following in the introduction:

The Tcl interpreter inside the Vivado Design Suite provides the full power and flexibility of Tcl to control the application, access design objects and their properties, and create custom reports.

And Details of the Sample Script contains:

This sample script uses a custom command, reportCriticalPaths, to report the TNS/WNS/Violators into a CSV file. This provides the ability for you to quickly identify which paths are critical.

The source for reportCriticalPaths is shown the linked User Guide.

Having seen this, might have a go at creating a TCL script to create a utilisation report which only shows fields which are not 0% (as requested in the question)..

\$\endgroup\$
1
  • \$\begingroup\$ If project flow is chosen in tcl, can the report format still be selected? Or does it have to be non-project? \$\endgroup\$
    – J...S
    Commented Aug 2 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.