Merge pull request #186 from openroadie/master

Latest OpenSTA to fix OR 3615
This commit is contained in:
Harsh Vardhan 2023-07-14 16:22:19 -07:00 committed by GitHub
commit 3c67f34e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 25 deletions

View File

@ -48,8 +48,8 @@ netlist data structures without duplicating them.
* Query based incremental update of delays, arrival and required times
* Simulator to propagate constants from constraints and netlist tie high/low
See doc/OpenSTA.pdf for command documentiaton.
See doc/StaApi.txt for timing engine API documentiaton.
See doc/OpenSTA.pdf for command documentation.
See doc/StaApi.txt for timing engine API documentation.
See doc/ChangeLog.txt for changes to commands.
OpenSTA is dual licensed. It is released under GPL v3 as OpenSTA and

View File

@ -605,6 +605,7 @@ proc get_lib_cell_arg { arg_name arg error_proc } {
return $lib_cell
}
# Not used by OpenSTA
proc get_lib_cells_arg { arg_name arglist error_proc } {
set lib_cells {}
# Copy backslashes that will be removed by foreach.
@ -612,16 +613,16 @@ proc get_lib_cells_arg { arg_name arglist error_proc } {
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set lib_cells [concat $lib_cells [get_lib_cells_arg $arg_name $arg $warn_error]]
set lib_cells [concat $lib_cells [get_lib_cells_arg $arg_name $arg $error_proc]]
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "LibertyCell" } {
lappend lib_cells $arg
} else {
sta_warn_error 306 $warn_error "unsupported object type $object_type."
$error_proc 306 "unsupported object type $object_type."
}
} elseif { $arg != {} } {
set arg_lib_cells [get_lib_cells -quiet $arg]
set arg_lib_cells [get_lib_cells1 $arg $error_proc]
if { $arg_lib_cells != {} } {
set lib_cells [concat $lib_cells $arg_lib_cells]
}
@ -630,6 +631,36 @@ proc get_lib_cells_arg { arg_name arglist error_proc } {
return $lib_cells
}
# Based on get_lib_cells
proc get_lib_cells1 { patterns error_proc } {
global hierarchy_separator
set cells {}
set cell_regexp [cell_regexp_hsc $hierarchy_separator]
foreach pattern $patterns {
if { ![regexp $cell_regexp $pattern ignore lib_name cell_pattern]} {
set lib_name "*"
set cell_pattern $pattern
}
# Allow wildcards in the library name (incompatible).
set libs [get_libs -quiet $lib_name]
if { $libs == {} } {
$error_proc 375 "library '$lib_name' not found."
} else {
foreach lib $libs {
set matches [$lib find_liberty_cells_matching $cell_pattern 0 0]
if {$matches != {}} {
set cells [concat $cells $matches]
}
}
if { $cells == {} } {
$error_proc 376 "cell '$cell_pattern' not found."
}
}
}
return $cells
}
proc get_instance_error { arg_name arg } {
set inst "NULL"
if {[llength $arg] > 1} {
@ -661,16 +692,16 @@ proc get_instances_error { arg_name arglist } {
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Instance" } {
lappend insts $arg
lappend insts $arg
} else {
sta_error 486 "$arg_name type '$object_type' is not an instance."
sta_error 486 "$arg_name type '$object_type' is not an instance."
}
} elseif { $arg != {} } {
set arg_insts [get_cells -quiet $arg]
if { $arg_insts != {} } {
set insts [concat $insts $arg_insts]
set insts [concat $insts $arg_insts]
} else {
sta_error 487 "instance '$arg' not found."
sta_error 487 "instance '$arg' not found."
}
}
}
@ -726,19 +757,19 @@ proc get_port_pins_error { arg_name arglist } {
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Pin" } {
lappend pins $arg
lappend pins $arg
} elseif { $object_type == "Port" } {
# Convert port to pin.
lappend pins [find_pin [get_name $arg]]
# Convert port to pin.
lappend pins [find_pin [get_name $arg]]
} else {
sta_error 488 "$arg_name type '$object_type' is not a pin or port."
sta_error 488 "$arg_name type '$object_type' is not a pin or port."
}
} elseif { $arg != {} } {
set arg_pins [get_ports_or_pins $arg]
if { $arg_pins != {} } {
set pins [concat $pins $arg_pins]
set pins [concat $pins $arg_pins]
} else {
sta_error 489 "pin '$arg' not found."
sta_error 489 "pin '$arg' not found."
}
}
}
@ -756,14 +787,14 @@ proc get_ports_error { arg_name arglist } {
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Port" } {
lappend ports $arg
lappend ports $arg
} else {
sta_error 490 "$arg_name type '$object_type' is not a port."
sta_error 490 "$arg_name type '$object_type' is not a port."
}
} elseif { $arg != {} } {
set arg_ports [get_ports $arg]
if { $arg_ports != {} } {
set ports [concat $ports $arg_ports]
set ports [concat $ports $arg_ports]
}
}
}
@ -837,14 +868,14 @@ proc get_clocks_warn { arg_name arglist } {
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Clock" } {
lappend clks $arg
lappend clks $arg
} else {
sta_warn 313 "unsupported object type $object_type."
sta_warn 313 "unsupported object type $object_type."
}
} elseif { $arg != {} } {
set arg_clocks [get_clocks $arg]
if { $arg_clocks != {} } {
set clks [concat $clks $arg_clocks]
set clks [concat $clks $arg_clocks]
}
}
}
@ -890,14 +921,14 @@ proc get_nets_arg { arg_name arglist warn_error } {
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Net" } {
lappend nets $arg
lappend nets $arg
} else {
sta_warn_error 317 $warn_error "unsupported object type $object_type."
sta_warn_error 317 $warn_error "unsupported object type $object_type."
}
} elseif { $arg != {} } {
set arg_nets [get_nets -quiet $arg]
if { $arg_nets != {} } {
set nets [concat $nets $arg_nets]
set nets [concat $nets $arg_nets]
}
}
}

View File

@ -836,7 +836,7 @@ proc parse_rise_fall_arg { arg } {
if { $arg eq "r" || $arg eq "^" || $arg eq "rise" } {
return "rise"
} elseif { $arg eq "f" || $arg eq "v" || $arg eq "fall" } {
retur "fall"
return "fall"
} else {
error "unknown rise/fall transition name."
}