Compute_slack_on_edges, Usage, Options – Altera Quartus II Scripting User Manual

Page 605: Description, Example, Compute_slack_on_edges –475

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–475

timing

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

compute_slack_on_edges

Usage

compute_slack_on_edges [-min]

Options

-min: Option to compute minimum slack

Description

Computes slack on all edges between non-combinational nodes.

This command computes slack on every edge in all constrained data paths.The algorithm used to compute
slack is the same as that used by the Fitter.

Example

load_package advanced_timing
set max_slack "2147483.647"

project_open chiptrip
create_timing_netlist -skip_dat

# Perform timing analysis on the design
# and compute slack on every edge that is part
# of a constrained path
compute_slack_on_edges

# Iterate through all edges to display any edge with negative slack
set fail_count 0
set no_constraint_count 0
set ok_count 0
foreach_in_collection edge [get_timing_edges] {
set slack [lindex [get_timing_edge_info -info slack $edge] 0]

if { $slack < $max_slack } {
if { $slack < 0 } {
puts "$edge : Slack = $slack"
incr fail_count
} else {
incr ok_count
}
} else {
incr no_constraint_count
}
}

puts "Edges meeting timing: $ok_count"
puts "Edges failing timing: $fail_count"
puts "Edges without constraints: $no_constraint_count"

delete_timing_netlist
project_close

Advertising