用法 | 描述 |
::quartus::project | 创建一个工程,进行设置 |
::quartus::flow | 编译工程,运行标准编译流程 |
::quartus::report | 连接报告表,创建一个标准的报告 |
::quartus::timing | 估算并且报告时序路径 |
::quartus::timing_report | 列出所有的时序路径 |
set_location_assignment,set_input_delay,set_output_delay,
set_multicycle_assignment,create_base_clock,timegroup
project_new fir_filter -revision filtref -overwrite
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref
set_location_assignment -to clk Pin_G1
create_base_clock -fmax "100 MHZ" -target clk clocka
create_relative_clock -base_clock clocka -divede 2 \
-offset "500 ps" -target clkx2 clockb
set_multicycle_assignment -from clk -to clkx2 2
project_close
保存设置至QSF中
-设置不会全部自动存储在Quartus II的QSF(Quartus II的设置文件)中例子:
project_open $project_name例子:
load_package flow
project_open fir_filter -revision filtref
execute_flow -compile
project_close
load_package flow
project_new_filter -revision filtref -overwrite
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref
set_location_assignment -to clk Pin_G1
create_base_clock -fmax "100 MHz" -target clk clocka
create_relative_clock -base_clock clocka -divide 2\
-offset "500 ps" -target clkx2 clockb
set_multicycle_assignment -from clk -to clkx2 2
execute_flow -compile
project_close
::quartus::report -编译报告
-访问报告表单并且创建一个标准的报告例子:
get_report_panel_data -name "Timing Analyzer||Timing Analyzer Settings"\
-row_name "Timing Models" -col_name Setting
例子:
load_package report
project_open fit_filter -revision filtref
load_report
set panel_name "Timing Analyzer||Timing Analyzer Summary"
set num_panel_rows [get_number_of_rows -name $panel_name]
for {set i 1} {$ < $num_panel_rows} {incr i}{
set summary_type [get_report_panel_data -name $panel_name \
-row $i -col_name Type]
if{[regexp {Clock Setup:(.*)}$summary_type match clk_name]}{
set num_failed_paths [get_report_panel_data -name $panel_name \
-row $i -col_name "Failed Paths"]
puts "Clock domain $clk_name has $num_failed_paths failing paths"
}
}
unload_report
project_close
答案
#Assume project is open;don't forget to load the report load_report
if {0==[get_report_panel_data -name \
{Timing Analyzer||Timing Analyzer Summary} \
-row_name {Total number of failed paths} \
-col_name {Failed Paths}]}{
puts "Design meets timing"
}else{
puts "Design does not meets timing"
}
unload_report
-例子
report_timing -tsu
report_timing -clock_setup -clock_filter clk
report_timing -tpd -npaths 5
例子:
load_package timing
project_open fir_filter -revision filtref
create_timing_netlist
report_timing -clock_setup -src_clock_filter clk -clock_filter clkx2 \
-all_failures -file slow_corner_cross_domain_paths.txt
delete_timing_netlist
create_timing_netlist -fast_model
report_timing -clock_hold -src_clock_filter clk -clock_filter clkx2 \
-all_failures -file fast_corner_cross_domain_paths.txt
delete_timing_netlist
project_close
::quartus::timing_report -时序报告的package
-列出时序路径例子:
list_path -from inst4 -to inst5* -stdout