Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 4/01/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.4.3.1. Saving Report Data in csv Format

You can create a Comma Separated Value (.csv) file from any Quartus® Prime report to open with a spreadsheet editor.

The following Tcl code shows a simple way to create a .csv file with data from the Fitter panel in a report.

Create .csv Files from Reports

load_package report
project_open my-project
load_report
# This is the name of the report panel to save as a CSV file
set panel_name "Fitter||Fitter Settings"
set csv_file "output.csv"
set fh [open $csv_file w]
set num_rows [get_number_of_rows -name $panel_name]
# Go through all the rows in the report file, including the
# row with headings, and write out the comma-separated data
for { set i 0 } { $i < $num_rows } { incr i } {
	set row_data [get_report_panel_row -name $panel_name \
		-row $i]
	puts $fh [join $row_data ","]
}
close $fh
unload_report

You can modify the script to use command-line arguments to pass in the name of the project, report panel, and output file to use. You can run this script example with any executable that supports the report package.