# Read-only fitted-design audit. Optional last argument is an experimental SDC. # quartus_sta -t SCRIPT PROJECT REVISION OUTPUT [EXTRA_SDC] package require ::quartus::project package require ::quartus::sta set project [file normalize [lindex $quartus(args) 0]] set revision [lindex $quartus(args) 1] set output [file normalize [lindex $quartus(args) 2]] set extra [lindex $quartus(args) 3] set mode [lindex $quartus(args) 4] file mkdir $output cd [file dirname $project] project_open [file tail $project] -revision $revision if {$mode eq "replace-external"} { # In-memory settings only: retrospective analysis of an identical fitted # netlist with a corrected constraint guard. Never export these assignments. set_global_assignment -remove -name SDC_FILE external-io.sdc set_global_assignment -name SDC_FILE $extra set f [open [file join $output constraint-override.txt] w] puts $f $extra close $f set extra "" } foreach model {slow fast} { create_timing_netlist -model $model read_sdc if {$extra ne ""} {read_sdc $extra} update_timing_netlist foreach {name pattern} { sdram_dq {SDRAM_DQ[*]} sdram_command {SDRAM_A[*] SDRAM_BA[*] SDRAM_n* SDRAM_DQM*} hdmi_video {HDMI_TX_D[*] HDMI_TX_DE HDMI_TX_HS HDMI_TX_VS} hdmi_audio {HDMI_I2S HDMI_LRCLK HDMI_SCLK} mcp_i2c {IO_SDA IO_SCL} } { set ports [get_ports $pattern] puts "EXTERNAL_IO_SCOPE $model $name [get_collection_size $ports]" foreach check {setup hold} { report_timing -$check -from $ports -npaths 32 -detail full_path -file [file join $output ${name}-in-${model}-${check}.rpt] report_timing -$check -to $ports -npaths 40 -detail full_path -file [file join $output ${name}-out-${model}-${check}.rpt] } } foreach {mode launch latch} { scaled {pll_hdmi|pll_hdmi_inst|altera_pll_i|cyclonev_pll|counter[0].output_counter|divclk} hdmi_scaled_forward direct {emu|pll|pll_inst|altera_pll_i|general[1].gpll~PLL_OUTPUT_COUNTER|divclk} hdmi_direct_forward } { if {[get_collection_size [get_clocks $latch]] == 1} { foreach check {setup hold} { report_timing -$check -from_clock [get_clocks $launch] -to_clock [get_clocks $latch] -to [get_ports {HDMI_TX_D[*] HDMI_TX_DE HDMI_TX_HS HDMI_TX_VS}] -npaths 40 -detail full_path -file [file join $output hdmi-${mode}-${model}-${check}.rpt] } } } if {[get_collection_size [get_clocks coco_pixel]] == 1} { foreach check {setup hold} { report_timing -$check -from_clock [get_clocks coco_pixel] -npaths 40 -detail full_path -file [file join $output pixel-out-${model}-${check}.rpt] report_timing -$check -to_clock [get_clocks coco_pixel] -npaths 40 -detail full_path -file [file join $output pixel-in-${model}-${check}.rpt] } } foreach check {setup hold recovery removal} { report_timing -$check -npaths 40 -detail full_path -file [file join $output global-${model}-${check}.rpt] } if {$model eq "slow"} { report_clocks -file [file join $output clocks.rpt] report_ucp -file [file join $output unconstrained.rpt] report_exceptions -file [file join $output exceptions.rpt] report_clock_transfers -setup -file [file join $output transfers.rpt] set f [open [file join $output clock-nodes.txt] w] foreach_in_collection n [get_pins -hierarchical {*divclk* *MISTER_COCOVID*PIX_CLK* *sdramclk_ddr*}] {puts $f [get_node_info -name $n]} close $f } delete_timing_netlist } project_close -dont_export_assignments