Quartus, timing closure: Obtaining a concise multi-corner timing path report

This post was written by eli on May 8, 2018
Posted Under: Altera,FPGA

Introduction

The natural thing to do when an FPGA design fails timing is to take a detailed look at the critical paths, based upon a timing report showing the logic elements and their delays of this path.

If you’re not a heavy user of Intel’s FPGAs (a.k.a. Altera), it may not be so trivial to figure out how to obtain this report. And even worse, you might unknowingly be looking at the wrong report.

The first thing to have sorted out is the concept of multi-corner timing analysis. Without proving that this is sufficient and/or necessary (mainly because I don’t know. Can anyone present a solid proof?), the common practice is to verify an FPGA’s timing validity by ensuring that the timing constraints are met in four cases: The minimal and maximal temperature, and a “slow” and “fast” model, which makes four combinations, or as they are referred to, four corners.

When looking at the critical paths, it’s therefore important to look at the paths at all four corners. This is often overlooked: For example, just generating a timing report in TimeQuest, typically produces the report for a single corner.

So this post describes how to get the report that says something. It relates to Quartus Prime 17.1 Lite.

Everything the said below (including the scripts) works on Quartus Prime 15.1 Lite as well, except that this version (and earlier, I suppose) doesn’t generate any multi-corner reports in any form. This makes the HTML report generation option attractive, as these reports are easier to work with.

I should mention two other related posts in this blog: One taking a look on the relation between input / output constraints and the timing report, and another experimenting a bit with Tcl scripting with TimeQuest.

Getting a multi-corner report: Scripted & quick

First, copy the following Tcl script into a file, say, timing.tcl:

create_timing_netlist
read_sdc
update_timing_netlist

foreach_in_collection op [get_available_operating_conditions] {
  set_operating_conditions $op

  report_timing -setup -npaths 20 -detail full_path -multi_corner \
    -panel_name "Critical paths"
}

Don’t let the “multi_corner” flag confuse you: Each call to report_timing covers one corner. It’s not clear if this flag does anything.

Now to action:

  • In Quartus, expand the TimeQuest group in the Task pane, and open TimeQuest Timing Analyzer.
  • In TimeQuest Timing Analyzer, pick Script > Run Tcl Script… from the menu bar, and select the Tcl script (e.g. timing.tcl).
  • An entry named “Critical paths” is added to the TimeQuest Timing Analyzer’s Report pane. Click on Multi-Corner Summary. A list of paths and their details now fill the main panes.
  • To export all path information into a textual file, right-click Multi-Corner Summary, and select “Export…”. Choose a name for an output file with a .rpt suffix. HTML reports are not supported (they will be empty).

There will also be four separate reports in the same entry, one for each corner. On earlier versions of Quartus, only these will appear (i.e., no Multi-Corner Summary).

Generate HTML / text reports only

The tools can generate neat HTML reports, which are considerably more comfortable to read than TimeQuest’s own GUI. Alas, these reports only cover one corner each. This script generates four HTML reports (it’s a whole bunch of files, JQuery script files, CSS and whatnot. Bells and whistles, but not a multi-corner report).

Suppose the following script as timing-html.tcl

#project_open myproj
create_timing_netlist
read_sdc
update_timing_netlist

foreach_in_collection op [get_available_operating_conditions] {
  set_operating_conditions $op

  report_timing -setup -npaths 20 -detail full_path -multi_corner \
    -file "timing_paths_$op.html" \
    -panel_name "Critical paths for $op"
}

For a plain textual report, change the -file flag’s argument, so the suffix is .rpt or .txt instead of .html.

Note the “project_open” command which is commented out at the top of the script. If it’s uncommented and “myproj” is replaced with the actual project name, a plain shell command line can be used to generate the HTML reports with something like

$ /path/to/quartus/bin/quartus_sta -t timing-html.tcl

I haven’t however found a way to generate a multi-corner report like this.

In order to have these reports generated in each implementation (which is recommended), add a line like the following to the QSF file:

set_global_assignment -name TIMEQUEST_REPORT_SCRIPT relative/path/to/timing-html.tcl

When included in a QSF file, the said Tcl script should not call project_open (comment it out or delete it).

The GUI only method

A multi-corner report can be obtained with just pointing and clicking:

  • In Quartus, expand the TimeQuest group in the Task pane, and open TimeQuest Timing Analyzer.
  • Inside the Timing Analyzer’s Tasks pane, double-click “Update Timing Netlist” .
  • In the same pane, scroll down to “Custom Reports” and double-click “Report Timing…”
  • A dialog box opens. Accept the defaults, and click “Report Timing” below.
  • In the Report pane, an “Report Timing” entry will be added. Expand it and right-click it. In the menu that opens, click “Generate in All Corners”
  • Click on the “Multi Corner Summary” group and possibly export the report as outlined above.

Add a Comment

required, use real name
required, will not be published
optional, your blog address