OpenSTA/tcl/CmdArgs.tcl

951 lines
26 KiB
Tcl
Raw Normal View History

2018-09-28 17:54:21 +02:00
# OpenSTA, Static Timing Analyzer
# Copyright (c) 2024, Parallax Software, Inc.
2018-09-28 17:54:21 +02:00
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2018-09-28 17:54:21 +02:00
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
2018-09-28 17:54:21 +02:00
################################################################
#
# Command helper functions.
#
################################################################
namespace eval sta {
#################################################################
#
# Argument parsing functions.
#
################################################################
# Parse multiple object type args.
# For object name args the search order is as follows:
# clk
# liberty_cell
# liberty_port
# cell
# inst
# port
# pin
# net
proc get_object_args { objects clks_var libcells_var libports_var \
cells_var insts_var ports_var pins_var nets_var \
edges_var timing_arc_sets_var } {
if { $clks_var != {} } {
upvar 1 $clks_var clks
}
if { $libcells_var != {} } {
upvar 1 $libcells_var libcells
}
if { $libports_var != {} } {
upvar 1 $libports_var libports
}
if { $cells_var != {} } {
upvar 1 $cells_var cells
}
if { $insts_var != {} } {
upvar 1 $insts_var insts
}
if { $ports_var != {} } {
upvar 1 $ports_var ports
}
if { $pins_var != {} } {
upvar 1 $pins_var pins
}
if { $nets_var != {} } {
upvar 1 $nets_var nets
}
if { $edges_var != {} } {
upvar 1 $edges_var edges
}
if { $timing_arc_sets_var != {} } {
upvar 1 $timing_arc_sets_var timing_arc_sets
}
# Copy backslashes that will be removed by foreach.
set objects [string map {\\ \\\\} $objects]
foreach obj $objects {
if { [llength $obj] > 1 } {
# List arg. Recursive call without initing objects.
get_object_args $obj clks libcells libports cells insts \
ports pins nets edges timing_arc_sets
} elseif { [is_object $obj] } {
# Explicit object arg.
set object_type [object_type $obj]
if { $pins_var != {} && $object_type == "Pin" } {
lappend pins $obj
} elseif { $insts_var != {} && $object_type == "Instance" } {
lappend insts $obj
} elseif { $nets_var != {} && $object_type == "Net" } {
lappend nets $obj
} elseif { $ports_var != {} && $object_type == "Port" } {
lappend ports $obj
} elseif { $edges_var != {} && $object_type == "Edge" } {
lappend edges $obj
} elseif { $clks_var != {} && $object_type == "Clock" } {
lappend clks $obj
} elseif { $libcells_var != {} && $object_type == "LibertyCell" } {
lappend libcells $obj
} elseif { $libports_var != {} && $object_type == "LibertyPort" } {
lappend libports $obj
} elseif { $cells_var != {} && $object_type == "Cell" } {
lappend cells $obj
} elseif { $timing_arc_sets_var != {} \
&& $object_type == "TimingArcSet" } {
lappend timing_arc_sets $obj
} else {
sta_error 100 "unsupported object type $object_type."
2018-09-28 17:54:21 +02:00
}
} elseif { $obj != {} } {
# Check for implicit arg.
# Search for most general object type first.
set matches {}
if { $clks_var != {} } {
set matches [get_clocks -quiet $obj]
}
if { $matches != {} } {
set clks [concat $clks $matches]
} else {
if { $libcells_var != {} } {
set matches [get_lib_cells -quiet $obj]
}
if { $matches != {} } {
set libcells [concat $libcells $matches]
} else {
if { $libports_var != {} } {
set matches [get_lib_pins -quiet $obj]
}
if { $matches != {} } {
set libports [concat $libports $matches]
} else {
if { $cells_var != {} } {
set matches [find_cells_matching $obj 0 0]
}
if { $matches != {} } {
set cells [concat $cells $matches]
} else {
if { $insts_var != {} } {
set matches [get_cells -quiet $obj]
}
if { $matches != {} } {
set insts [concat $insts $matches]
} else {
if { $ports_var != {} } {
set matches [get_ports -quiet $obj]
}
if { $matches != {} } {
set ports [concat $ports $matches]
} else {
if { $pins_var != {} } {
set matches [get_pins -quiet $obj]
}
if { $matches != {} } {
set pins [concat $pins $matches]
} else {
if { $nets_var != {} } {
set matches [get_nets -quiet $obj]
}
if { $matches != {} } {
set nets [concat $nets $matches]
} else {
sta_warn 101 "object '$obj' not found."
2018-09-28 17:54:21 +02:00
}
}
}
}
}
}
}
}
}
}
}
proc parse_clk_cell_port_args { objects clks_var cells_var ports_var } {
upvar 1 $clks_var clks
upvar 1 $cells_var cells
upvar 1 $ports_var ports
set clks {}
set cells {}
set ports {}
get_object_args $objects clks {} {} cells {} ports {} {} {} {}
}
proc parse_clk_cell_port_pin_args { objects clks_var cells_var ports_var \
pins_arg } {
upvar 1 $clks_var clks
upvar 1 $cells_var cells
upvar 1 $ports_var ports
upvar 1 $pins_arg pins
set clks {}
set cells {}
set ports {}
set pins {}
get_object_args $objects clks {} {} cells {} ports pins {} {} {}
}
proc parse_clk_inst_pin_arg { objects clks_var insts_var pins_var } {
upvar 1 $clks_var clks
upvar 1 $insts_var insts
upvar 1 $pins_var pins
set clks {}
set insts {}
set pins {}
get_object_args $objects clks {} {} {} insts {} pins {} {} {}
}
proc parse_clk_inst_port_pin_arg { objects clks_var insts_var pins_var } {
upvar 1 $clks_var clks
upvar 1 $insts_var insts
upvar 1 $pins_var pins
set clks {}
set insts {}
set pins {}
set ports {}
get_object_args $objects clks {} {} {} insts ports pins {} {} {}
foreach port $ports {
2019-01-17 00:37:31 +01:00
lappend pins [[top_instance] find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
}
proc parse_clk_port_pin_arg { objects clks_var pins_var } {
upvar 1 $clks_var clks
upvar 1 $pins_var pins
set clks {}
set pins {}
set ports {}
get_object_args $objects clks {} {} {} {} ports pins {} {} {}
foreach port $ports {
2019-01-17 00:37:31 +01:00
lappend pins [[top_instance] find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
}
proc parse_libcell_libport_inst_port_pin_edge_timing_arc_set_arg { objects \
libcells_var \
libports_var \
insts_var \
ports_var \
pins_var \
edges_var \
timing_arc_sets_var } {
upvar 1 $libcells_var libcells
upvar 1 $libports_var libports
upvar 1 $insts_var insts
upvar 1 $ports_var ports
upvar 1 $pins_var pins
upvar 1 $edges_var edges
upvar 1 $timing_arc_sets_var timing_arc_sets
set libcells {}
set libports {}
set insts {}
set ports {}
set pins {}
set edges {}
set timing_arc_sets {}
get_object_args $objects {} libcells libports {} insts ports pins {} \
edges timing_arc_sets
}
2020-07-15 16:56:34 +02:00
proc parse_libcell_arg { objects } {
set libcells {}
get_object_args $objects {} libcells {} {} {} {} {} {} {} {}
return $libcells
}
2018-09-28 17:54:21 +02:00
proc parse_libcell_inst_arg { objects libcells_var insts_var } {
upvar 1 $libcells_var libcells
upvar 1 $insts_var insts
set libcells {}
set insts {}
get_object_args $objects {} libcells {} {} insts {} {} {} {} {}
}
proc parse_libcell_inst_net_arg { objects libcells_var insts_var nets_var } {
upvar 1 $libcells_var libcells
upvar 1 $insts_var insts
upvar 1 $nets_var nets
set libcells {}
set insts {}
set nets {}
get_object_args $objects {} libcells {} {} insts {} {} nets {} {}
}
proc parse_cell_arg { objects } {
set cells {}
get_object_args $objects {} {} {} cells {} {} {} {} {} {}
return $cells
}
2018-09-28 17:54:21 +02:00
proc parse_cell_port_args { objects cells_var ports_var } {
upvar 1 $cells_var cells
upvar 1 $ports_var ports
set cells {}
set ports {}
get_object_args $objects {} {} {} cells {} ports {} {} {} {}
}
proc parse_cell_port_pin_args { objects cells_var ports_var pins_var } {
upvar 1 $cells_var cells
upvar 1 $ports_var ports
upvar 1 $pins_var pins
set cells {}
set ports {}
set pins {}
get_object_args $objects {} {} {} cells {} ports pins {} {} {}
}
proc parse_inst_port_pin_arg { objects insts_var pins_var } {
upvar 1 $insts_var insts
upvar 1 $pins_var pins
set insts {}
set pins {}
set ports {}
get_object_args $objects {} {} {} {} insts ports pins {} {} {}
foreach port $ports {
2019-01-17 00:37:31 +01:00
lappend pins [[top_instance] find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
}
proc parse_inst_pin_arg { objects insts_var pins_var } {
upvar 1 $insts_var insts
upvar 1 $pins_var pins
set insts {}
set pins {}
get_object_args $objects {} {} {} {} insts {} pins {} {} {}
}
proc parse_inst_port_pin_net_arg { objects insts_var pins_var nets_var } {
upvar 1 $insts_var insts
upvar 1 $pins_var pins
upvar 1 $nets_var nets
set insts {}
set ports {}
set pins {}
set nets {}
get_object_args $objects {} {} {} {} insts ports pins nets {} {}
foreach port $ports {
2019-01-17 00:37:31 +01:00
lappend pins [[top_instance] find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
}
proc parse_inst_net_arg { objects insts_var nets_var } {
upvar 1 $insts_var insts
upvar 1 $nets_var nets
set insts {}
set nets {}
get_object_args $objects {} {} {} {} insts {} {} nets {} {}
}
proc parse_port_pin_net_arg { objects pins_var nets_var } {
upvar 1 $pins_var pins
upvar 1 $nets_var nets
set ports {}
set pins {}
set nets {}
get_object_args $objects {} {} {} {} {} ports pins nets {} {}
2019-01-17 00:37:31 +01:00
2018-09-28 17:54:21 +02:00
foreach port $ports {
2019-01-17 00:37:31 +01:00
lappend pins [[top_instance] find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
}
proc parse_port_net_args { objects ports_var nets_var } {
upvar 1 $ports_var ports
upvar 1 $nets_var nets
set ports {}
set nets {}
get_object_args $objects {} {} {} {} {} ports {} nets {} {}
}
proc parse_pin_net_args { objects pins_var nets_var } {
upvar 1 $pins_var pins
upvar 1 $nets_var nets
set pins {}
set nets {}
get_object_args $objects {} {} {} {} {} {} pins nets {} {}
}
proc get_ports_or_pins { pattern } {
set matches [find_port_pins_matching $pattern 0 0]
if { $matches != {} } {
return $matches
} else {
return [find_pins_matching $pattern 0 0]
}
}
################################################################
parasitics api update commit 5eb41d9304fe43d22dcf32b5346a6c9705c0d0b3 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 8 11:49:16 2024 -0700 tcl endpoint_count Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ffb0e0a083edbbdc3753b829641ba26730d3d882 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 8 10:51:36 2024 -0700 ArcDelayCalc::reduceParasitic Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ed167b218ed026b0b7427301ace67c3d22cc969a Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 7 22:46:40 2024 -0700 parasitics makeResistor/capacitor rm network arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 41244abfcfdee20ddc9aa8ac80cac2e3e7f68146 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 7 17:08:04 2024 -0700 arnoldi coupling caps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a14d6880be0dc22bf008cae63ec93880c8347ccf Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 7 07:28:31 2024 -0700 parasiticLoad Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1cacbd7da71c7f8c5ac311caabd03bb74b66e675 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 7 07:21:49 2024 -0700 parasitic resistor/capacitor index -> id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6c749158cc94e5a91376721a8ccb71a8a4d020d5 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 21:42:03 2024 -0700 arnoldi Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4ffa6002224d76321287f64448929e5ef0ec6edd Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 18:27:33 2024 -0700 arnoldi parasitic leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a9666dd7c44126b262c7bd1170db69fafa5ef327 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 17:05:24 2024 -0700 arnoldi parasitic leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit eca0e8b5ea3b4dbb22a1a2ed11018e6e40229b3f Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 14:40:38 2024 -0700 comment Signed-Off-by: James Cherry <cherry@parallaxsw.com> commit 0263245b5e2412ebefbedc67babf23e1ac047c7b Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 14:24:51 2024 -0700 CouplingCap -> Capacitor Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f9da059814fb09c44cc3529a9a787c3c2192a4e9 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 09:31:00 2024 -0700 rm parasitic network array if empty Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 28c2728e5f2859839818ef228aac51fd0100ae65 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 6 08:13:03 2024 -0700 parasitic resistor name -> id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 045fd7efa3ae8b1cf07c5aa421f3119022e3895a Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 21:09:39 2024 -0700 Map -> map Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8f7d18eed14a8173d91fd98a4e345a16d168b0ee Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 21:04:35 2024 -0700 ParasiticResistor, ParasiticCapacitor Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e2df87a10febc573c77b51a22e82d2d1f6f52af9 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 17:06:34 2024 -0700 rm ParasticNode::devices Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 07133b72b73d204d16f964472c38907c18f9758d Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 16:52:43 2024 -0700 Parsitic network nodes instead of nodeIterator Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 48c08673b11d0c328ed7d70606b6c7a979d9d0b8 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 16:34:31 2024 -0700 mv otherNode to Parasitics Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 99fccc76937c25c68454d8db667306bff2a142ae Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 16:29:23 2024 -0700 ParasiticNetwork resistor/capacitor array Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9de49992ad403d7bc3468c53201d50825d7b961c Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 09:42:01 2024 -0700 SpefNameMap Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f296850201debeb2cfe1fd0b9c61c3c196f00d65 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 09:11:17 2024 -0700 comments Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 86ca29b9bdeb732c1a596c196e0c4bf91de3ee37 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 5 08:29:53 2024 -0700 rm Parasitics::reduceTo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 880bf458d473004ee5d3dc33baa62c9e643ddaec Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 4 20:15:05 2024 -0700 loadCap Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 67322e686f4703a2a5d9cdd1dd66534814662fe4 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 4 09:39:21 2024 -0700 report_parasitic_annotation Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8ef4e9841bca62a5879e74da83cacee70fa50b2f Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 19:13:27 2024 -0700 ParasiticAnalysisPt use string Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 109a85ab37b5a869a72738ac6a6cd84e4a1d1ac4 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 18:59:02 2024 -0700 rm ParasiticAnalysisPt::min_max_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bb7874537d20a1fe905779fe46d783dba14e2db6 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 12:21:28 2024 -0700 parasitics rm pole_residue pointer Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9e1e2c484e5cd088a08afc278f25b9fcf2cc5dd9 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 11:54:22 2024 -0700 parasitics rm loads pointer Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cb4a7f870b2371a2ac6b3ce1d340bb5d3c24791a Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 08:05:55 2024 -0700 parasitics use override Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8e0f84c4fec0411ad3626c836710545531ef219d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 3 07:53:59 2024 -0700 Parasitics::unannotatedLoads Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6b45e369e7be158616219258e6e9a675e87fd8ca Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 2 12:27:23 2024 -0700 format Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 27e820b36caf7867d20307c7045e86486819db6b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 1 18:01:51 2024 -0700 rm op_cond args Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 351ed53925c7cc9815f75c34a0320b0dc50445d4 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 31 17:35:15 2024 -0700 rm GraphDelayCalc::loadPins() Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3341c7caff595dab0b7519ab5103958aadfe1510 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 31 17:31:56 2024 -0700 read_spef arg check Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d0c1e78b42e33d5298efefa87a982f28f51bc57 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 31 10:53:35 2024 -0700 arnoldi use parasitics api Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 86b39ac10e5c6556a9b0b5b7bce016884cd935ee Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 31 10:30:47 2024 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 469fad36af69cc8b76e4dfc88a085962795d7c46 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 30 16:43:46 2024 -0700 read_spef -reduce Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2b88aa471f083ae895f6277c2c844e308451fff9 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 29 20:31:47 2024 -0700 Paraasitics::connectionPin() -> pin() Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7b9ff7e228b215b3121b7e7189d9c0c18ced3ef3 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 29 17:12:32 2024 -0700 ParasiticNode::isExternal() Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 889c27af846ed1cdf76295da5262836378ab9162 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 29 11:17:59 2024 -0700 rm redundant op_cond arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d7ce5e7809bc80f36dd81cb05615a87433ed315 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 29 11:03:42 2024 -0700 mv estimatePiElmore to Parasitics Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 04e1757b3c8b4e9f5cffbe3b03214fc065fb1c2c Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 29 09:09:28 2024 -0700 ParasiticNode un-virtual Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 016ce50f82cbb68f9536d3ed5fd511b2f82f4439 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 17:26:04 2024 -0700 parasitics coupling cap api Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1748629fb462b24b43002ecd3fe1679d367752f4 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 11:12:46 2024 -0700 Parasitics::value rm ap arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1272cb86bcae5960c9af7d589f99f1488aa0b322 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 11:10:57 2024 -0700 read_spef rm -quiet arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3d86a9d86115dde5f20eb4bb8ca15f0c85de5810 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 11:01:24 2024 -0700 reduce min_max arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f7abfd5e72e0f74b9ffabf6306bbf809b62d4e98 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 10:59:29 2024 -0700 rm spef_reader Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e3550523b1964b2137419240f748a0b44c3322b6 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 10:58:24 2024 -0700 reducers rm op_cond arg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cec793accb3db5c41cdb51f85c8530ffc1e085db Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 10:08:45 2024 -0700 rm NullParastics Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6596d35f6da51cbacb2c21588715773d3b5edb64 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 28 10:03:29 2024 -0700 ArcDelayCalc::reduceParasitic Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2024-02-08 21:54:52 +01:00
# -corner keyword is optional.
2018-12-05 23:18:41 +01:00
# If -corner keyword is missing:
2018-12-11 19:47:04 +01:00
# one corner: return default
# multiple corners: error
2018-09-28 17:54:21 +02:00
proc parse_corner { keys_var } {
upvar 1 $keys_var keys
if { [info exists keys(-corner)] } {
set corner_arg $keys(-corner)
if { [is_object $corner_arg] } {
set object_type [object_type $corner_arg]
if { $object_type == "Corner" } {
return $corner_arg
} else {
sta_error 144 "corner object type '$object_type' is not a corner."
}
2018-09-28 17:54:21 +02:00
} else {
set corner [find_corner $corner_arg]
if { $corner == "NULL" } {
sta_error 102 "$corner_arg is not the name of process corner."
} else {
return $corner
}
2018-09-28 17:54:21 +02:00
}
} elseif { [multi_corner] } {
sta_error 103 "-corner keyword required with multi-corner analysis."
2018-09-28 17:54:21 +02:00
} else {
2019-04-01 18:05:07 +02:00
return [cmd_corner]
2018-09-28 17:54:21 +02:00
}
}
2018-12-11 19:47:04 +01:00
# -corner keyword is required.
2018-12-05 23:18:41 +01:00
proc parse_corner_required { keys_var } {
upvar 1 $keys_var keys
if { [info exists keys(-corner)] } {
set corner_name $keys(-corner)
set corner [find_corner $corner_name]
if { $corner == "NULL" } {
sta_error 104 "$corner_name is not the name of process corner."
2018-12-05 23:18:41 +01:00
} else {
return $corner
}
} else {
sta_error 105 "missing -corner arg."
2018-12-05 23:18:41 +01:00
}
}
2018-11-26 18:15:52 +01:00
proc parse_corner_or_default { keys_var } {
upvar 1 $keys_var keys
if { [info exists keys(-corner)] } {
set corner_name $keys(-corner)
set corner [find_corner $corner_name]
if { $corner == "NULL" } {
sta_error 106 "$corner_name is not the name of process corner."
2018-11-26 18:15:52 +01:00
} else {
return $corner
}
} else {
2019-04-01 18:05:07 +02:00
return [cmd_corner]
2018-11-26 18:15:52 +01:00
}
}
Network::id for maps/sets commit be70d30ae05665021254b0d7e69fb8d2f0a82890 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 17:04:49 2023 -0700 cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4d4ef96948afe3d6a00c4521aeb5bc74274f5737 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 16:08:50 2023 -0700 rvo, const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bb584e4264af2bea867b17d07e8d38c0e9eb0025 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 15:05:00 2023 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a08fe558bca6b769b2728882258bd85aed990a27 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 14:57:33 2023 -0700 LibertyPortPair no ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4d3bd60c109d1ce9d0589d746f4968fa7bebd90d Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 14:13:07 2023 -0700 cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit dc25ff77771cfbe26f9318bad2b3c45879614783 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 14:06:13 2023 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e81586ce11a0cc06948ed78fef99353077d69e Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 14:01:10 2023 -0700 sortByName Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9d8592aff5b246f83e47e1b94490e3cef8d8e119 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 11:57:17 2023 -0700 sort pred Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 462a8e14df8b561ddfc842addc62c4b8435b6347 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 11:09:57 2023 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 69f71505b684e88b22d395510429497e87bf1015 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 10:45:14 2023 -0700 flush ConstPortSeq Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6429d578b78eac3fe7e99fcd67a120789932b2eb Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 09:19:15 2023 -0700 rm ConstNetSet Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f247930b16e40560b957a36af68947249ed1ef04 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 17 08:50:50 2023 -0700 sortPathNames Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4ca2b0e0af7252c7bcbc65cf141d0ce40634d329 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 10:14:05 2023 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3d18640d2ebc4aae3098c7e7242a554fcb64fd42 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 09:41:27 2023 -0700 set_input/ouput_delay -reference_pin Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d4a0854dd2102f46f96a94fb9eb8749f1593a85f Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 09:13:46 2023 -0700 PinPairSet no malloc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a6f1583fc6a856c5ecc0dcb15a1d8b1f61e30718 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 08:53:33 2023 -0700 no malloc for EdgePins Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c8e4b92e8b619109d6aa3c141c720646067ccb4b Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 06:31:08 2023 +0000 leak commit abab99e0fc3e466d914f6c1705aa08cdc204df51 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 16 06:07:36 2023 +0000 leaks commit d1913b554bb6e98b89673d80d2295f552eb4ffca Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 19:48:39 2023 -0700 LibertyCell::checkCornerCell Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bcc172237d48deed647374f9592bac70bd2d5425 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 18:19:47 2023 -0700 rvo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8ef9800b87f5e5548055a13afc21397f28a6bcf7 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 18:07:46 2023 -0700 sdc net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d7235abed04ced4e2d84e91bf9968e621268567d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 16:00:27 2023 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a22f91a3c54c644574339d1126821d9bc8045bd6 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 15:52:50 2023 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 762615ce3de91d950eeaaa4680549a45b13e0e0a Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 15:42:19 2023 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7e0c531613d343d23f064c24873bf5a498f6f4ce Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 12:26:49 2023 -0700 rm removeLoadCaps, removeNetLoadCaps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f2e88c6082e2d4605e9849348008bf4065401fc8 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 12:21:03 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b5939666188c0b94dfe957e22bbd8a92f4786125 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 11:36:16 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a435081bafe10260743319f53a59cbe2ed0388b7 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 08:43:37 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit acfb247559db7b726d47f203613488df0f7add53 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 08:38:07 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7541b71da92ea15085615988a1e6ea1d4d53d8d6 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 08:00:55 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d033210132656ea68fa834228575b9def1d02d90 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 07:52:03 2023 -0700 sdc rm map ptrs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ca6e9ecb7821b83ab024c4fee6df8f7fc8fc2ce2 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 07:38:12 2023 -0700 instance_pvt_maps_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 631e4209b596386f5818045d521784db5239f58d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 07:26:42 2023 -0700 rm GroupPathIterator Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 059c32afa87617fff530c9afa1ef8005a136739d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 14 20:07:44 2023 -0700 rm ClockIterator Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c65fe873a6a6696220bbb44c4ecac87d5ca978ac Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 14 19:45:58 2023 -0700 rvo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ce15c9a0cc78915acddc2f03749573d989ae96d6 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 15 01:04:03 2023 +0000 leaks commit f97955a0c7e70b65ceb3f697ff47c0524a9b3cd4 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 14 01:17:58 2023 +0000 leaks commit 7cdd65684adeb14e02827f5d93e7fab3b19af5dd Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 16:07:47 2023 -0700 leaks Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ee97c7e50394a3927458e7ef09c5dbeb27719d15 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 11:52:48 2023 -0700 swig rm Tmp collections Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c49935da8704e41459280971b7645fccd97e3d13 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 11:18:36 2023 -0700 swig rm Tmp types Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4320b00ce700914843006f592126cd8cc1c4657a Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 10:55:10 2023 -0700 swig rm TmpPinSet, TmpPinSeq Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ff6004910980c9b09b41f63a553a4481404cc539 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 10:45:06 2023 -0700 swig rm Tmp collections Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9a5bf5c1a3e5a6d2996b3ab327fa2f3015f2ff20 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 10:15:29 2023 -0700 swig rm one TmpPinSet Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f441116b56e23849485b2393b30e7086c33165a8 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 09:16:56 2023 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 050b08df8618340b568d9cd41fd3d5f052e2c680 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 09:10:53 2023 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit be8c17f3a715ab53140748dc1d94698209965cf9 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 13 08:59:06 2023 -0700 leak Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e43b82f8fb52eaeda90e3c7e76cf350ae6735ebd Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 18:57:49 2023 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8db56209de7805ac2574fd2f76170bf68afd156d Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 18:08:54 2023 -0700 GroupPathSet net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cb7917f9827c2ea3afebd735cd4508405a0d77d4 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 12:00:15 2023 -0700 DataCheckLess net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit d9da3c62d7a76699c6ad62cebb1f5c39f89722fa Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 11:42:27 2023 -0700 rm hashPtr uses Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5bbea162bb1e023aba813598c7992c740ddf9d0b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 11:30:12 2023 -0700 EdgePins has use net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit df38405e2ebaabdd7bbf99f3b19d78b25bd95720 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 09:51:38 2023 -0700 ExceptionPath hash use net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9a6dcfa54c54c9f50b14248a2449c70c20a0d977 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 08:56:49 2023 -0700 ClockInsertion, ClockLatency net id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit dbb6dc0b8c93812458df31e93f08e0dbd74e8105 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 08:34:03 2023 -0700 ExceptionStateSet obj id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 70b8721c48ec0816289ee09b664c332ee095875f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 08:14:37 2023 -0700 ClockGroups cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4c6c4ca191a99cd8541e106fec3202ee14968f39 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Jan 12 07:38:17 2023 -0700 ClockGroup typedef to ClockSet Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 66f425315e16deee5f00b05c0a505766e7afbf01 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 20:32:38 2023 -0700 set cmps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a94866c7828af5b6714e3e4fffc13bdaf5155c0e Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 19:08:09 2023 -0700 net use id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6348320908f42ebb5262117182e13d0024f65537 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 11:52:13 2023 -0700 exception id cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0edfca41b6d6408ac17f8dfe10e697c55146c1ef Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 10:47:02 2023 -0700 range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 44ad77985da9f0b9e7f4780e3f233c8d94fa7db7 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 08:27:58 2023 -0700 non-ptr set cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 36de7d88c3fa683465604a9e16b2fc1f6bc5fdd0 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Jan 11 08:00:54 2023 -0700 range iteration Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4a31a2c8d9bdae58b09af8c05a64702ea3ac6c15 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 10 16:43:54 2023 -0700 tcl types Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 056a7447b494a4c8ecc9764650d78a5bed3d87e8 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 10 16:10:36 2023 -0700 tcl types Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 97239554c7625ba50ee729260f08eda7dec02365 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 10 13:10:42 2023 -0700 use RVO Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c3247d8937d483102e3e1f2b69d7ac1d331ba9d4 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 22:41:20 2023 -0700 swig template seq's Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5431c06feb256adb46858819fcf5d513cfa6b5ec Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 20:50:24 2023 -0700 swig set in template Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 592ad641bf01d3beb862314a0d8986f66e258642 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 17:27:25 2023 -0700 network return containers Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c95f8b77e0d6bd5ffa5ba8102413c70883c756e1 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 12:15:37 2023 -0700 PinSeq const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 702e7f9ba2f901066a38f32e67b35602b6c7bbdf Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 12:02:29 2023 -0700 InstanceSeq const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 44fc25ba4a15e4ae570d74af27c9435872a126e0 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 12:01:45 2023 -0700 NetSeq const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 03b2725c81f5d52c33c875b55056c11d482144f1 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 11:33:18 2023 -0700 rm PortPair Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3fb82a7344dc053171c9883a113764ba691ab827 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 9 11:20:53 2023 -0700 PinSet id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dd31f027e15d40d62a11d0a88ef2a115f01fb73 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 8 15:03:33 2023 -0700 InstanceSet id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a91dea5cc0af3bede36b3faed13adb05239ff907 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 8 11:40:15 2023 -0700 NetSet id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b91e4b6410134eccae7969ddcfb0b27933b2e746 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 8 10:44:47 2023 -0700 CellSet, PortSet id Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6f891f77fae5a6b19c1454a1a4b4e3dfae0b5c50 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 8 10:29:25 2023 -0700 network object sets Signed-off-by: James Cherry <cherry@parallaxsw.com> commit eb8c627a57ecc6e7c5846a01d62b090ff91c08bf Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 8 10:09:00 2023 -0700 PinSet1 Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8e864ecbdf87000fbb3c3097c39f06173c941e35 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Jan 7 17:13:03 2023 -0700 concrete network object id Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2023-01-19 19:23:45 +01:00
# Return NULL for all.
2018-09-28 17:54:21 +02:00
proc parse_corner_or_all { keys_var } {
upvar 1 $keys_var keys
if { [info exists keys(-corner)] } {
set corner_name $keys(-corner)
set corner [find_corner $corner_name]
if { $corner == "NULL" } {
sta_error 107 "$corner_name is not the name of process corner."
2018-09-28 17:54:21 +02:00
} else {
return $corner
}
} else {
return "NULL"
}
}
################################################################
proc parse_rise_fall_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-rise)] && ![info exists flags(-fall)] } {
return "rise"
} elseif { [info exists flags(-fall)] && ![info exists flags(-rise)] } {
return "fall"
} else {
return "rise_fall"
}
}
ccs ceff delay calc commit 87130be63ddbf1a7fb65986b02839eb4c0b13168 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 09:49:02 2024 -0700 ccs ceff delay calc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit de0dd38dabda2f7ef51b49c196c2787a0d3c5784 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 07:40:11 2024 -0700 dcalc public funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit dd7fcb12f929b9b0a391653cad42e617f9cbdd3b Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 26 09:08:37 2024 -0700 mv CircuitSim.hh to include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9663e46d28ece544ee1453f229990c9db9e0efec Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 17:58:57 2024 -0700 ArcDcalcArg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 76b0588034faaefd2302c865c441975f76386d3f Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:36:46 2024 -0700 ensureVoltageWaveforms Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f88e67b861c56752e5b36efe2b552ba0077a7180 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:00:02 2024 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8f32cc571dcadee0185b08f951a1f79d46e7984d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:57:51 2024 -0700 Graph::gateEdgeArc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ac3cb35cb6732d7ecbf0532d7351a3ff2a917fc9 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:31:30 2024 -0700 ConcreteParasiticSubNodeMap, ConcreteParasiticPinNodeMap use id cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cbfe4eac463036c26a64701239d7651d91a09778 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:08:41 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8b5d30f1a8b1ccb8c9cbd9d7ba93418907c41b2a Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 24 09:45:46 2024 -0700 emplace_push Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5335a2eaaf737ed7c7a8cff30654a68c4ac4c8e4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 16:19:30 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ce92f3caf28afb0e0384799f08166cfb0aecfea0 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 15:53:28 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0c591430c725a3ebd50d2892673dca76e023dc32 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:18 2024 -0700 Parsitics::name(node) const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 499c297e64d1487388f549843ff9ea05e8555cfc Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:07 2024 -0700 write_spice umr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6984c398dbce9e6266fab8377a844bc518481d9d Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 18:42:34 2024 -0700 gcc warning Signed-off-by: James Cherry <cherry@parallaxsw.com> commit edec16519806013623194d8201e804dec81a51dd Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:54:11 2024 -0700 no cuddification Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4a0e1070c179b2f8615b604c362359ce4b3a0e2e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:46 2024 -0700 sim const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2e941fafa631f6b9bc0f82784b9146de2449e9c5 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:39 2024 -0700 sdc comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1c12f56aee7115fcb06807b5b6c626d1a419ccdc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 21 13:13:29 2024 -0700 Sim use Bdd class Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b70c41d5caec56c3001b834141b6dab89bb933ed Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 20 12:18:27 2024 -0700 write_spice coupling caps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 614d2cd41a1a9cf850dbe480954a5f58ee0dc21e Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 14:37:30 2024 -0700 write_spice time offset Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f0ba1fca0dfca384e6fb0be302bba9ced71ee41c Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 10:59:18 2024 -0700 class Bdd for cudd Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 24c94756334fce5e70e97ce0ee31375ae4e59b84 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 18 08:58:30 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 47a4505d88bdfe4a85056895f8b7d842e07dce8d Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:23 2024 -0700 default sim ngspice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e279555a076e218f0a9c308e8937a6fc8fdea4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:01 2024 -0700 WriteSpice refactor Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e3f0734edbbbd69ad063e97d1d8cca92a83aea Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 15:18:35 2024 -0700 mv report_dcalc to DelayCalc.tcl Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 922056471a6d380699bbd0623f95637401d23eff Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 14:27:31 2024 -0700 WriteSpice::cell_spice_port_names_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 732922ead68097e3f7da268ecc5ae2ca2daa4492 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 13:35:13 2024 -0700 WritePathSpice.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8cd6e2ffc6ad66e831630273b5eacd192259191e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 10:11:39 2024 -0700 small Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f7f6bfb49f43ddc3e45c294f89c8814d60df5220 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 09:48:09 2024 -0700 refactor WritePathSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f74db730c3e8c67a24d531266510e4376db463d3 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 09:22:01 2024 -0700 Sta.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 051532deef203cae97e32e8af7a2348bfd8912cc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:14:44 2024 -0700 PowerClass.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bfb8357d1093e5d3da14e708acd21fc21ba3b0dd Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:08:56 2024 -0700 doc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8fe28ec91b234d9d8210019aa46a2e8107aa497a Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 07:32:34 2024 -0700 ClkSkew use seq instead of set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4e3a3a0315ab4f6160a707e838423bb734f5363 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 19:26:45 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 51fb6657d9706c7443e1c269cfe63cf080b05d50 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 11:10:11 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e639ee129d13e1c11b34bca0762b8136b18563f3 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 11:19:06 2024 -0700 ClkSkew use map Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e91d3ea8142a73b7b607dfdf53b3fce8e2f16984 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 10:18:27 2024 -0700 report_clock_skew report format Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c650b7ec63b83382ba9cec7d187ffee8a031c2ce Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 09:22:29 2024 -0700 report_clock_skew include macro clock_tree_path_delay Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cf14b230a9944b95ba43ef7c09e553d9014990eb Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 11:03:29 2024 -0700 clk skew range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e7e0342e063ac876d00d03fd1ff0eab1715cfde4 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 08:11:29 2024 -0700 write_spice sensitize and3 Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 743ceb676c763ac5bcbf05e630a4da1b507c537d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 10 18:07:04 2024 -0700 write spice Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2024-02-27 18:00:48 +01:00
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" } {
return "fall"
} else {
error "unknown rise/fall transition name."
}
}
2018-09-28 17:54:21 +02:00
proc parse_min_max_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-min)] && [info exists flags(-max)] } {
sta_error 108 "both -min and -max specified."
2018-09-28 17:54:21 +02:00
} elseif { [info exists flags(-min)] && ![info exists flags(-max)] } {
return "min"
} elseif { [info exists flags(-max)] && ![info exists flags(-min)] } {
return "max"
} else {
# Default.
return "max"
}
}
proc parse_min_max_all_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-min)] && [info exists flags(-max)] } {
sta_error 109 "both -min and -max specified."
2018-09-28 17:54:21 +02:00
} elseif { [info exists flags(-min)] && ![info exists flags(-max)] } {
return "min"
} elseif { [info exists flags(-max)] && ![info exists flags(-min)] } {
return "max"
} else {
return "min_max"
2018-09-28 17:54:21 +02:00
}
}
# parse_min_max_all_flags and require analysis type to be min/max.
proc parse_min_max_all_check_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-min)] && [info exists flags(-max)] } {
return "min_max"
2018-09-28 17:54:21 +02:00
} elseif { [info exists flags(-min)] && ![info exists flags(-max)] } {
return "min"
} elseif { [info exists flags(-max)] && ![info exists flags(-min)] } {
return "max"
} else {
return "min_max"
2018-09-28 17:54:21 +02:00
}
}
proc parse_early_late_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-early)] && [info exists flags(-late)] } {
sta_error 110 "only one of -early and -late can be specified."
2018-09-28 17:54:21 +02:00
} elseif { [info exists flags(-early)] } {
return "min"
} elseif { [info exists flags(-late)] } {
return "max"
} else {
sta_error 111 "-early or -late must be specified."
2018-09-28 17:54:21 +02:00
}
}
proc parse_early_late_all_flags { flags_var } {
upvar 1 $flags_var flags
if { [info exists flags(-early)] && [info exists flags(-late)] } {
sta_error 112 "both -early and -late specified."
2018-09-28 17:54:21 +02:00
} elseif { [info exists flags(-early)] && ![info exists flags(-late)] } {
return "min"
} elseif { [info exists flags(-late)] && ![info exists flags(-early)] } {
return "max"
} else {
return "min_max"
2018-09-28 17:54:21 +02:00
}
}
################################################################
proc get_liberty_error { arg_name arg } {
set lib "NULL"
if {[llength $arg] > 1} {
sta_error 113 "$arg_name must be a single library."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "LibertyLibrary" } {
set lib $arg
} else {
sta_error 114 "$arg_name type '$object_type' is not a library."
2018-09-28 17:54:21 +02:00
}
} else {
set lib [find_liberty $arg]
if { $lib == "NULL" } {
sta_error 115 "library '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
return $lib
}
proc get_lib_cell_warn { arg_name arg } {
2019-06-13 17:43:38 +02:00
return [get_lib_cell_arg $arg_name $arg sta_warn]
}
proc get_lib_cell_error { arg_name arg } {
return [get_lib_cell_arg $arg_name $arg sta_error]
}
proc get_lib_cell_arg { arg_name arg error_proc } {
2018-09-28 17:54:21 +02:00
set lib_cell "NULL"
if { [llength $arg] > 1 } {
sta_error 116 "$arg_name must be a single lib cell."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "LibertyCell" } {
set lib_cell $arg
} else {
$error_proc 116 "$arg_name type '$object_type' is not a liberty cell."
2018-09-28 17:54:21 +02:00
}
# Parse library_name/cell_name.
} elseif {[regexp [cell_regexp] $arg ignore lib_name cell_name]} {
set library [find_liberty $lib_name]
if { $library != "NULL" } {
set lib_cell [$library find_liberty_cell $cell_name]
if { $lib_cell == "NULL" } {
$error_proc 117 "liberty cell '$arg' not found."
2018-09-28 17:54:21 +02:00
}
} else {
$error_proc 118 "library '$lib_name' not found."
2018-09-28 17:54:21 +02:00
}
} else {
set lib_cell [find_liberty_cell $arg]
if { $lib_cell == "NULL" } {
$error_proc 119 "liberty cell '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
return $lib_cell
}
# Not used by OpenSTA
2020-04-26 17:49:09 +02:00
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 $error_proc]]
2020-04-26 17:49:09 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "LibertyCell" } {
lappend lib_cells $arg
} else {
$error_proc 120 "unsupported object type $object_type."
2020-04-26 17:49:09 +02:00
}
} elseif { $arg != {} } {
set arg_lib_cells [get_lib_cells1 $arg $error_proc]
2020-04-26 17:49:09 +02:00
if { $arg_lib_cells != {} } {
set lib_cells [concat $lib_cells $arg_lib_cells]
}
}
}
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 121 "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 122 "cell '$cell_pattern' not found."
}
}
}
return $cells
}
2018-09-28 17:54:21 +02:00
proc get_instance_error { arg_name arg } {
set inst "NULL"
if {[llength $arg] > 1} {
sta_error 123 "$arg_name must be a single instance."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Instance" } {
2019-06-02 03:41:09 +02:00
set inst $arg
2018-09-28 17:54:21 +02:00
} else {
sta_error 124 "$arg_name type '$object_type' is not an instance."
2018-09-28 17:54:21 +02:00
}
} else {
set inst [find_instance $arg]
if { $inst == "NULL" } {
sta_error 125 "instance '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
return $inst
}
proc get_instances_error { arg_name arglist } {
set insts {}
# Copy backslashes that will be removed by foreach.
set arglist [string map {\\ \\\\} $arglist]
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set insts [concat $insts [get_instances_error $arg_name $arg]]
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Instance" } {
lappend insts $arg
2018-09-28 17:54:21 +02:00
} else {
sta_error 126 "$arg_name type '$object_type' is not an instance."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set arg_insts [get_cells -quiet $arg]
if { $arg_insts != {} } {
set insts [concat $insts $arg_insts]
2018-09-28 17:54:21 +02:00
} else {
sta_error 127 "instance '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
}
return $insts
}
proc get_port_pin_warn { arg_name arg } {
return [get_port_pin_arg $arg_name $arg "warn"]
}
proc get_port_pin_error { arg_name arg } {
return [get_port_pin_arg $arg_name $arg "error"]
}
proc get_port_pin_arg { arg_name arg warn_error } {
set pin "NULL"
if {[llength $arg] > 1} {
sta_warn_error 128 $warn_error "$arg_name must be a single port or pin."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Pin" } {
set pin $arg
} elseif { $object_type == "Port" } {
# Explicit port arg - convert to pin.
2019-01-17 00:37:31 +01:00
set pin [find_pin [get_name $arg]]
2018-09-28 17:54:21 +02:00
} else {
sta_warn_error 129 $warn_error "$arg_name type '$object_type' is not a pin or port."
2018-09-28 17:54:21 +02:00
}
} else {
set top_instance [top_instance]
set top_cell [$top_instance cell]
set port [$top_cell find_port $arg]
if { $port == "NULL" } {
set pin [find_pin $arg]
} else {
2019-01-17 00:37:31 +01:00
set pin [$top_instance find_pin [get_name $port]]
2018-09-28 17:54:21 +02:00
}
if { $pin == "NULL" } {
sta_warn_error 130 $warn_error "pin $arg not found."
2018-09-28 17:54:21 +02:00
}
}
return $pin
}
proc get_port_pins_error { arg_name arglist } {
set pins {}
# Copy backslashes that will be removed by foreach.
set arglilst [string map {\\ \\\\} $arglist]
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set pins [concat $pins [get_port_pins_error $arg_name $arg]]
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Pin" } {
lappend pins $arg
2018-09-28 17:54:21 +02:00
} elseif { $object_type == "Port" } {
# Convert port to pin.
lappend pins [find_pin [get_name $arg]]
2018-09-28 17:54:21 +02:00
} else {
sta_error 131 "$arg_name type '$object_type' is not a pin or port."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set arg_pins [get_ports_or_pins $arg]
if { $arg_pins != {} } {
set pins [concat $pins $arg_pins]
2018-09-28 17:54:21 +02:00
} else {
sta_error 132 "pin '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
}
return $pins
}
proc get_ports_error { arg_name arglist } {
set ports {}
# Copy backslashes that will be removed by foreach.
set arglist [string map {\\ \\\\} $arglist]
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set ports [concat $ports [get_ports_error $arg_name $arg]]
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Port" } {
lappend ports $arg
2018-09-28 17:54:21 +02:00
} else {
sta_error 133 "$arg_name type '$object_type' is not a port."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set arg_ports [get_ports $arg]
if { $arg_ports != {} } {
set ports [concat $ports $arg_ports]
2018-09-28 17:54:21 +02:00
}
}
}
return $ports
}
proc get_pin_error { arg_name arg } {
return [get_pin_arg $arg_name $arg "error"]
}
proc get_pin_warn { arg_name arg } {
return [get_pin_arg $arg_name $arg "warn"]
}
proc get_pin_arg { arg_name arg warn_error } {
set pin "NULL"
if {[llength $arg] > 1} {
sta_warn_error 134 $warn_error "$arg_name must be a single pin."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Pin" } {
set pin $arg
} else {
sta_warn_error 135 $warn_error "$arg_name type '$object_type' is not a pin."
2018-09-28 17:54:21 +02:00
}
} else {
set pin [find_pin $arg]
if { $pin == "NULL" } {
sta_warn_error 136 $warn_error "$arg_name pin $arg not found."
2018-09-28 17:54:21 +02:00
}
}
return $pin
}
proc get_clock_warn { arg_name arg } {
return [get_clock_arg $arg_name $arg sta_warn]
}
proc get_clock_error { arg_name arg } {
return [get_clock_arg $arg_name $arg sta_error]
}
proc get_clock_arg { arg_name arg error_proc } {
set clk "NULL"
if {[llength $arg] > 1} {
$error_proc 137 "$arg_name arg must be a single clock, not a list."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Clock" } {
set clk $arg
} else {
$error_proc 138 "$arg_name arg value is a $object_type, not a clock."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set clk [find_clock $arg]
if { $clk == "NULL" } {
$error_proc 138 "$arg_name arg '$arg' clock not found."
2018-09-28 17:54:21 +02:00
}
}
return $clk
}
proc get_clocks_warn { arg_name arglist } {
set clks {}
# Copy backslashes that will be removed by foreach.
set arglist [string map {\\ \\\\} $arglist]
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set clks [concat $clks [get_clocks_warn $arg_name $arg]]
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Clock" } {
lappend clks $arg
2018-09-28 17:54:21 +02:00
} else {
sta_warn 139 "unsupported object type $object_type."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set arg_clocks [get_clocks $arg]
if { $arg_clocks != {} } {
set clks [concat $clks $arg_clocks]
2018-09-28 17:54:21 +02:00
}
}
}
return $clks
}
proc get_net_arg { arg_name arg } {
2018-09-28 17:54:21 +02:00
set net "NULL"
if {[llength $arg] > 1} {
sta_warn 140 "$arg_name must be a single net."
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Net" } {
set net $arg
} else {
sta_warn 141 "$arg_name '$object_type' is not a net."
2018-09-28 17:54:21 +02:00
}
} else {
set net [find_net $arg]
if { $net == "NULL" } {
sta_warn 143 "$arg_name '$arg' not found."
2018-09-28 17:54:21 +02:00
}
}
return $net
}
proc get_nets_arg { arg_name arglist } {
2018-09-28 17:54:21 +02:00
set nets {}
# Copy backslashes that will be removed by foreach.
set arglist [string map {\\ \\\\} $arglist]
foreach arg $arglist {
if {[llength $arg] > 1} {
# Embedded list.
set nets [concat $nets [get_nets_arg $arg_name $arg]]
2018-09-28 17:54:21 +02:00
} elseif { [is_object $arg] } {
set object_type [object_type $arg]
if { $object_type == "Net" } {
lappend nets $arg
2018-09-28 17:54:21 +02:00
} else {
sta_warn 142 "unsupported object type $object_type."
2018-09-28 17:54:21 +02:00
}
} elseif { $arg != {} } {
set arg_nets [get_nets $arg]
2018-09-28 17:54:21 +02:00
if { $arg_nets != {} } {
set nets [concat $nets $arg_nets]
2018-09-28 17:54:21 +02:00
}
}
}
return $nets
}
# sta namespace end.
}