# quartus_sta -t nmi_timing_paths.tcl PROJECT REVISION OUTPUT_DIRECTORY package require ::quartus::project package require ::quartus::sta set project [lindex $quartus(args) 0] set revision [lindex $quartus(args) 1] set output [file normalize [lindex $quartus(args) 2]] file mkdir $output project_open $project -revision $revision foreach model {slow fast} { create_timing_netlist -model $model read_sdc update_timing_netlist set nmi [get_registers {*GLBCPU09|NMI*}] if {[get_collection_size $nmi] < 5} {error "Expected complete CPU NMI register scope"} puts "NMI_REGISTERS $model [get_collection_size $nmi]" set cpu [get_registers {*GLBCPU09|*}] foreach check {setup hold} { report_timing -$check -from $cpu -to $cpu -npaths 5 -detail full_path \ -file [file join $output cpu-internal-${model}-${check}.rpt] } # Register-only endpoints would miss the effective mask/pending view. # Kept combinational nets must also be covered through to CPU consumers. if {[get_collection_size $nmi] > 5} { foreach signal {NMIMask NMILatched} { set through [get_nets *GLBCPU09|$signal] if {[get_collection_size $through] == 0} {error "Missing kept NMI net $signal"} puts "NMI_THROUGH $model $signal [get_collection_size $through]" foreach check {setup hold} { report_timing -$check -through $through -npaths 20 -detail full_path \ -file [file join $output nmi-through-${signal}-${model}-${check}.rpt] } } } foreach check {setup hold recovery removal} { report_timing -$check -to $nmi -npaths 20 -detail full_path \ -file [file join $output nmi-in-${model}-${check}.rpt] report_timing -$check -from $nmi -npaths 20 -detail full_path \ -file [file join $output nmi-out-${model}-${check}.rpt] report_timing -$check -npaths 5 -detail full_path \ -file [file join $output global-${model}-${check}.rpt] } if {$model eq "slow"} { set audit [open [file join $output nmi-register-clocks.tsv] w] puts $audit "register\tclock_pin\tclock_driver" foreach_in_collection reg $nmi { foreach edge [get_register_info -clock_edges $reg] { set pin [get_edge_info -src $edge] foreach input_edge [get_node_info -clock_edges $pin] { puts $audit "[get_register_info -name $reg]\t[get_node_info -name $pin]\t[get_node_info -name [get_edge_info -src $input_edge]]" } } } close $audit report_clocks -file [file join $output clocks.rpt] report_ucp -file [file join $output unconstrained.rpt] report_clock_transfers -file [file join $output clock-transfers.rpt] } delete_timing_netlist } project_close