# measure.tcl: load a post-CTS checkpoint, optionally apply one allowlisted step, report timing and area. # env: CKPT (odb), SDC, PLATFORM_DIR, STEP_TCL (optional file with the step), OUT_ODB (optional) read_liberty $::env(PLATFORM_DIR)/lib/NangateOpenCellLibrary_typical.lib read_db $::env(CKPT) read_sdc $::env(SDC) source $::env(PLATFORM_DIR)/setRC.tcl set_propagated_clock [all_clocks] estimate_parasitics -placement proc emit {tag} { puts "METRIC $tag setup_wns [sta::format_time [sta::worst_slack_cmd max] 4]" puts "METRIC $tag setup_tns [sta::format_time [sta::total_negative_slack_cmd max] 4]" puts "METRIC $tag hold_wns [sta::format_time [sta::worst_slack_cmd min] 4]" puts "METRIC $tag hold_tns [sta::format_time [sta::total_negative_slack_cmd min] 4]" puts "METRIC $tag area [format %.2f [expr {[rsz::design_area] * 1e12}]]" puts "METRIC $tag instances [llength [get_cells *]]" } emit before if {[info exists ::env(STEP_TCL)] && $::env(STEP_TCL) ne ""} { if {[catch {source $::env(STEP_TCL)} err]} { puts "STEP_ERROR $err" exit 2 } estimate_parasitics -placement emit after report_checks -path_delay max -format full_clock_expanded -fields {slew cap fanout} -digits 3 } exit 0