get_lib_cells don't require library/
This commit is contained in:
parent
658be26021
commit
6d06cb22d8
25
tcl/Cmds.tcl
25
tcl/Cmds.tcl
|
|
@ -1475,6 +1475,31 @@ proc get_lib_cell_arg { arg_name arg error_proc } {
|
||||||
return $lib_cell
|
return $lib_cell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc get_lib_cells_arg { arg_name arglist error_proc } {
|
||||||
|
set lib_cells {}
|
||||||
|
# Copy backslashes that will be removed by foreach.
|
||||||
|
set arglist [string map {\\ \\\\} $arglist]
|
||||||
|
foreach arg $arglist {
|
||||||
|
if {[llength $arg] > 1} {
|
||||||
|
# Embedded list.
|
||||||
|
set lib_cells [concat $lib_cells [get_lib_cells_arg $arg_name $arg $warn_error]]
|
||||||
|
} elseif { [is_object $arg] } {
|
||||||
|
set object_type [object_type $arg]
|
||||||
|
if { $object_type == "LibertyCell" } {
|
||||||
|
lappend lib_cells $arg
|
||||||
|
} else {
|
||||||
|
sta_warn_error $warn_error "unsupported object type $object_type."
|
||||||
|
}
|
||||||
|
} elseif { $arg != {} } {
|
||||||
|
set arg_lib_cells [get_lib_cells -quiet $arg]
|
||||||
|
if { $arg_lib_cells != {} } {
|
||||||
|
set lib_cells [concat $lib_cells $arg_lib_cells]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $lib_cells
|
||||||
|
}
|
||||||
|
|
||||||
proc get_instance_error { arg_name arg } {
|
proc get_instance_error { arg_name arg } {
|
||||||
set inst "NULL"
|
set inst "NULL"
|
||||||
if {[llength $arg] > 1} {
|
if {[llength $arg] > 1} {
|
||||||
|
|
|
||||||
88
tcl/Sdc.tcl
88
tcl/Sdc.tcl
|
|
@ -629,30 +629,28 @@ proc get_lib_cells { args } {
|
||||||
set cell_regexp [cell_wild_regexp $divider]
|
set cell_regexp [cell_wild_regexp $divider]
|
||||||
set quiet [info exists flags(-quiet)]
|
set quiet [info exists flags(-quiet)]
|
||||||
foreach pattern $patterns {
|
foreach pattern $patterns {
|
||||||
if {[regexp $cell_regexp $pattern ignore lib_name cell_pattern]} {
|
if { ![regexp $cell_regexp $pattern ignore lib_name cell_pattern]} {
|
||||||
# SDC does not allow wildcards in the library name.
|
set lib_name "*"
|
||||||
set libs [get_libs -quiet $lib_name]
|
set cell_pattern $pattern
|
||||||
if { $libs == {} } {
|
}
|
||||||
if {!$quiet} {
|
# Allow wildcards in the library name (incompatible).
|
||||||
sta_warn "library '$lib_name' not found."
|
set libs [get_libs -quiet $lib_name]
|
||||||
}
|
if { $libs == {} } {
|
||||||
} else {
|
if {!$quiet} {
|
||||||
foreach lib $libs {
|
sta_warn "library '$lib_name' not found."
|
||||||
set matches [$lib find_liberty_cells_matching $cell_pattern \
|
|
||||||
$regexp $nocase]
|
|
||||||
if {$matches != {}} {
|
|
||||||
set cells [concat $cells $matches]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if { $cells == {} } {
|
|
||||||
if {!$quiet} {
|
|
||||||
sta_warn "cell '$cell_pattern' not found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if {!$quiet} {
|
foreach lib $libs {
|
||||||
sta_warn "library/cell not found in $pattern."
|
set matches [$lib find_liberty_cells_matching $cell_pattern \
|
||||||
|
$regexp $nocase]
|
||||||
|
if {$matches != {}} {
|
||||||
|
set cells [concat $cells $matches]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if { $cells == {} } {
|
||||||
|
if {!$quiet} {
|
||||||
|
sta_warn "cell '$cell_pattern' not found."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1598,21 +1596,21 @@ proc set_clock_transition { args } {
|
||||||
# -rise/-fall are obsolete.
|
# -rise/-fall are obsolete.
|
||||||
define_cmd_args "set_clock_uncertainty" \
|
define_cmd_args "set_clock_uncertainty" \
|
||||||
{[-from|-rise_from|-fall_from from_clock]\
|
{[-from|-rise_from|-fall_from from_clock]\
|
||||||
[-to|-rise_to|-fall_to to_clock] [-rise] [-fall]\
|
[-to|-rise_to|-fall_to to_clock] [-rise] [-fall]\
|
||||||
[-setup] [-hold] uncertainty [objects]}
|
[-setup] [-hold] uncertainty [objects]}
|
||||||
|
|
||||||
proc set_clock_uncertainty { args } {
|
proc set_clock_uncertainty { args } {
|
||||||
parse_key_args "set_clock_uncertainty" args \
|
parse_key_args "set_clock_uncertainty" args \
|
||||||
keys {-from -rise_from -fall_from -to -rise_to -fall_to} \
|
keys {-from -rise_from -fall_from -to -rise_to -fall_to} \
|
||||||
flags {-rise -fall -setup -hold}
|
flags {-rise -fall -setup -hold}
|
||||||
|
|
||||||
if { [llength $args] == 0 } {
|
if { [llength $args] == 0 } {
|
||||||
sta_error "missing uncertainty value."
|
sta_error "missing uncertainty value."
|
||||||
}
|
}
|
||||||
set uncertainty [lindex $args 0]
|
set uncertainty [lindex $args 0]
|
||||||
check_float "uncertainty" $uncertainty
|
check_float "uncertainty" $uncertainty
|
||||||
set uncertainty [time_ui_sta $uncertainty]
|
set uncertainty [time_ui_sta $uncertainty]
|
||||||
|
|
||||||
set min_max "min_max"
|
set min_max "min_max"
|
||||||
if { [info exists flags(-setup)] && ![info exists flags(-hold)] } {
|
if { [info exists flags(-setup)] && ![info exists flags(-hold)] } {
|
||||||
set min_max "max"
|
set min_max "max"
|
||||||
|
|
@ -1620,7 +1618,7 @@ proc set_clock_uncertainty { args } {
|
||||||
if { [info exists flags(-hold)] && ![info exists flags(-setup)] } {
|
if { [info exists flags(-hold)] && ![info exists flags(-setup)] } {
|
||||||
set min_max "min"
|
set min_max "min"
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [info exists keys(-from)] } {
|
if { [info exists keys(-from)] } {
|
||||||
set from_key "-from"
|
set from_key "-from"
|
||||||
set from_rf "rise_fall"
|
set from_rf "rise_fall"
|
||||||
|
|
@ -1633,7 +1631,7 @@ proc set_clock_uncertainty { args } {
|
||||||
} else {
|
} else {
|
||||||
set from_key "none"
|
set from_key "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [info exists keys(-to)] } {
|
if { [info exists keys(-to)] } {
|
||||||
set to_key "-to"
|
set to_key "-to"
|
||||||
set to_rf "rise_fall"
|
set to_rf "rise_fall"
|
||||||
|
|
@ -1646,7 +1644,7 @@ proc set_clock_uncertainty { args } {
|
||||||
} else {
|
} else {
|
||||||
set to_key "none"
|
set to_key "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
if { $from_key != "none" && $to_key == "none" \
|
if { $from_key != "none" && $to_key == "none" \
|
||||||
|| $from_key == "none" && $to_key != "none" } {
|
|| $from_key == "none" && $to_key != "none" } {
|
||||||
sta_error "-from/-to must be used together."
|
sta_error "-from/-to must be used together."
|
||||||
|
|
@ -1695,12 +1693,12 @@ proc set_data_check { args } {
|
||||||
keys {-from -rise_from -fall_from -to -rise_to -fall_to -clock} \
|
keys {-from -rise_from -fall_from -to -rise_to -fall_to -clock} \
|
||||||
flags {-setup -hold}
|
flags {-setup -hold}
|
||||||
check_argc_eq1 "set_data_check" $args
|
check_argc_eq1 "set_data_check" $args
|
||||||
|
|
||||||
set margin [time_ui_sta $args]
|
set margin [time_ui_sta $args]
|
||||||
set from_rf "rise_fall"
|
set from_rf "rise_fall"
|
||||||
set to_rf "rise_fall"
|
set to_rf "rise_fall"
|
||||||
set clk "NULL"
|
set clk "NULL"
|
||||||
|
|
||||||
if [info exists keys(-from)] {
|
if [info exists keys(-from)] {
|
||||||
set from [get_port_pin_error "from_pin" $keys(-from)]
|
set from [get_port_pin_error "from_pin" $keys(-from)]
|
||||||
} elseif [info exists keys(-rise_from)] {
|
} elseif [info exists keys(-rise_from)] {
|
||||||
|
|
@ -1712,7 +1710,7 @@ proc set_data_check { args } {
|
||||||
} else {
|
} else {
|
||||||
sta_error "missing -from, -rise_from or -fall_from argument."
|
sta_error "missing -from, -rise_from or -fall_from argument."
|
||||||
}
|
}
|
||||||
|
|
||||||
if [info exists keys(-to)] {
|
if [info exists keys(-to)] {
|
||||||
set to [get_port_pin_error "to_pin" $keys(-to)]
|
set to [get_port_pin_error "to_pin" $keys(-to)]
|
||||||
} elseif [info exists keys(-rise_to)] {
|
} elseif [info exists keys(-rise_to)] {
|
||||||
|
|
@ -1724,11 +1722,11 @@ proc set_data_check { args } {
|
||||||
} else {
|
} else {
|
||||||
sta_error "missing -to, -rise_to or -fall_to argument."
|
sta_error "missing -to, -rise_to or -fall_to argument."
|
||||||
}
|
}
|
||||||
|
|
||||||
if [info exists keys(-clock)] {
|
if [info exists keys(-clock)] {
|
||||||
set clk [get_clock_warn "clock" $keys(-clock)]
|
set clk [get_clock_warn "clock" $keys(-clock)]
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [info exists flags(-setup)] && ![info exists flags(-hold)] } {
|
if { [info exists flags(-setup)] && ![info exists flags(-hold)] } {
|
||||||
set setup_hold "setup"
|
set setup_hold "setup"
|
||||||
} elseif { [info exists flags(-hold)] && ![info exists flags(-setup)] } {
|
} elseif { [info exists flags(-hold)] && ![info exists flags(-setup)] } {
|
||||||
|
|
@ -1736,7 +1734,7 @@ proc set_data_check { args } {
|
||||||
} else {
|
} else {
|
||||||
set setup_hold "setup_hold"
|
set setup_hold "setup_hold"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_data_check_cmd $from $from_rf $to $to_rf $clk $setup_hold $margin
|
set_data_check_cmd $from $from_rf $to $to_rf $clk $setup_hold $margin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1917,9 +1915,9 @@ proc set_false_path { args } {
|
||||||
if [info exists flags(-reset_path)] {
|
if [info exists flags(-reset_path)] {
|
||||||
reset_path_cmd $from $thrus $to $min_max
|
reset_path_cmd $from $thrus $to $min_max
|
||||||
}
|
}
|
||||||
|
|
||||||
set comment [parse_comment_key keys]
|
set comment [parse_comment_key keys]
|
||||||
|
|
||||||
make_false_path $from $thrus $to $min_max $comment
|
make_false_path $from $thrus $to $min_max $comment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2060,15 +2058,15 @@ proc set_path_delay { cmd args min_max } {
|
||||||
} else {
|
} else {
|
||||||
sta_warn "'$args' ignored."
|
sta_warn "'$args' ignored."
|
||||||
}
|
}
|
||||||
|
|
||||||
set ignore_clk_latency [info exists flags(-ignore_clock_latency)]
|
set ignore_clk_latency [info exists flags(-ignore_clock_latency)]
|
||||||
|
|
||||||
if [info exists flags(-reset_path)] {
|
if [info exists flags(-reset_path)] {
|
||||||
reset_path_cmd $from $thrus $to "all"
|
reset_path_cmd $from $thrus $to "all"
|
||||||
}
|
}
|
||||||
|
|
||||||
set comment [parse_comment_key keys]
|
set comment [parse_comment_key keys]
|
||||||
|
|
||||||
make_path_delay $from $thrus $to $min_max $ignore_clk_latency \
|
make_path_delay $from $thrus $to $min_max $ignore_clk_latency \
|
||||||
$delay $comment
|
$delay $comment
|
||||||
}
|
}
|
||||||
|
|
@ -2190,7 +2188,7 @@ proc set_multicycle_path { args } {
|
||||||
} else {
|
} else {
|
||||||
sta_warn "'$args' ignored."
|
sta_warn "'$args' ignored."
|
||||||
}
|
}
|
||||||
|
|
||||||
set start [info exists flags(-start)]
|
set start [info exists flags(-start)]
|
||||||
set end [info exists flags(-end)]
|
set end [info exists flags(-end)]
|
||||||
if { $start && $end } {
|
if { $start && $end } {
|
||||||
|
|
@ -2201,13 +2199,13 @@ proc set_multicycle_path { args } {
|
||||||
} elseif { $end } {
|
} elseif { $end } {
|
||||||
set use_end_clk 1
|
set use_end_clk 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [info exists flags(-reset_path)] {
|
if [info exists flags(-reset_path)] {
|
||||||
reset_path_cmd $from $thrus $to $min_max
|
reset_path_cmd $from $thrus $to $min_max
|
||||||
}
|
}
|
||||||
|
|
||||||
set comment [parse_comment_key keys]
|
set comment [parse_comment_key keys]
|
||||||
|
|
||||||
make_multicycle_path $from $thrus $to $min_max $use_end_clk \
|
make_multicycle_path $from $thrus $to $min_max $use_end_clk \
|
||||||
$path_multiplier $comment
|
$path_multiplier $comment
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue