rm get_object_type
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
5b9d0f3aa8
commit
20af8fdaf6
143
tcl/CmdUtil.tcl
143
tcl/CmdUtil.tcl
|
|
@ -238,91 +238,64 @@ proc delete_objects_from_list_cmd { list delete } {
|
||||||
return $list
|
return $list
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
proc set_cmd_namespace { namespc } {
|
proc set_cmd_namespace { namespc } {
|
||||||
if { $namespc == "sdc" || $namespc == "sta" } {
|
if { $namespc == "sdc" || $namespc == "sta" } {
|
||||||
set_cmd_namespace_cmd $namespc
|
set_cmd_namespace_cmd $namespc
|
||||||
} else {
|
} else {
|
||||||
sta_error 165 "unknown namespace $namespc."
|
sta_error 165 "unknown namespace $namespc."
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
################################################################
|
|
||||||
|
################################################################
|
||||||
define_cmd_args "report_object_full_names" {objects}
|
|
||||||
|
define_cmd_args "report_object_full_names" {objects}
|
||||||
proc report_object_full_names { objects } {
|
|
||||||
foreach obj [sort_by_full_name $objects] {
|
proc report_object_full_names { objects } {
|
||||||
report_line [get_full_name $obj]
|
foreach obj [sort_by_full_name $objects] {
|
||||||
}
|
report_line [get_full_name $obj]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
define_cmd_args "report_object_names" {objects}
|
|
||||||
|
define_cmd_args "report_object_names" {objects}
|
||||||
proc report_object_names { objects } {
|
|
||||||
foreach obj [sort_by_name $objects] {
|
proc report_object_names { objects } {
|
||||||
report_line [get_name $obj]
|
foreach obj [sort_by_name $objects] {
|
||||||
}
|
report_line [get_name $obj]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
################################################################
|
|
||||||
|
################################################################
|
||||||
define_cmd_args "get_name" {object}
|
|
||||||
define_cmd_args "get_full_name" {object}
|
define_cmd_args "get_name" {object}
|
||||||
|
define_cmd_args "get_full_name" {object}
|
||||||
################################################################
|
|
||||||
|
################################################################
|
||||||
proc get_name { object } {
|
|
||||||
return [get_object_property $object "name"]
|
proc get_name { object } {
|
||||||
}
|
return [get_object_property $object "name"]
|
||||||
|
}
|
||||||
proc get_full_name { object } {
|
|
||||||
return [get_object_property $object "full_name"]
|
proc get_full_name { object } {
|
||||||
}
|
return [get_object_property $object "full_name"]
|
||||||
|
}
|
||||||
proc sort_by_name { objects } {
|
|
||||||
return [lsort -command name_cmp $objects]
|
proc sort_by_name { objects } {
|
||||||
}
|
return [lsort -command name_cmp $objects]
|
||||||
|
}
|
||||||
proc name_cmp { obj1 obj2 } {
|
|
||||||
return [string compare [get_name $obj1] [get_name $obj2]]
|
proc name_cmp { obj1 obj2 } {
|
||||||
}
|
return [string compare [get_name $obj1] [get_name $obj2]]
|
||||||
|
}
|
||||||
proc sort_by_full_name { objects } {
|
|
||||||
return [lsort -command full_name_cmp $objects]
|
proc sort_by_full_name { objects } {
|
||||||
}
|
return [lsort -command full_name_cmp $objects]
|
||||||
|
}
|
||||||
proc full_name_cmp { obj1 obj2 } {
|
|
||||||
return [string compare [get_full_name $obj1] [get_full_name $obj2]]
|
proc full_name_cmp { obj1 obj2 } {
|
||||||
}
|
return [string compare [get_full_name $obj1] [get_full_name $obj2]]
|
||||||
|
}
|
||||||
proc get_object_type { obj } {
|
|
||||||
set object_type [object_type $obj]
|
# namespace sta
|
||||||
if { $object_type == "Clock" } {
|
|
||||||
return "clock"
|
|
||||||
} elseif { $object_type == "LibertyCell" } {
|
|
||||||
return "lib_cell"
|
|
||||||
} elseif { $object_type == "LibertyPort" } {
|
|
||||||
return "lib_pin"
|
|
||||||
} elseif { $object_type == "Cell" } {
|
|
||||||
return "cell"
|
|
||||||
} elseif { $object_type == "Instance" } {
|
|
||||||
return "instance"
|
|
||||||
} elseif { $object_type == "Port" } {
|
|
||||||
return "port"
|
|
||||||
} elseif { $object_type == "Pin" } {
|
|
||||||
return "pin"
|
|
||||||
} elseif { $object_type == "Net" } {
|
|
||||||
return "net"
|
|
||||||
} elseif { $object_type == "Edge" } {
|
|
||||||
return "timing_arc"
|
|
||||||
} elseif { $object_type == "TimingArcSet" } {
|
|
||||||
return "timing_arc"
|
|
||||||
} else {
|
|
||||||
return "?"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# sta namespace end.
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue