@@ -38,7 +38,7 @@ proc read_lef { args } {
3838 ord::read_lef_cmd $filename $lib_name $tech_name $make_tech $make_lib
3939}
4040
41- sta::define_cmd_args " read_def" {[-floorplan_initialize|-incremental|-child ]\
41+ sta::define_cmd_args " read_def" {[-floorplan_initialize|-incremental]\
4242 [-continue_on_errors]\
4343 [-tech name] \
4444 [-chip chip_name] \
@@ -47,7 +47,7 @@ sta::define_cmd_args "read_def" {[-floorplan_initialize|-incremental|-child]\
4747proc read_def { args } {
4848 sta::parse_key_args " read_def" args keys {-tech -chip} \
4949 flags {-floorplan_initialize -incremental \
50- -order_wires -continue_on_errors -child }
50+ -order_wires -continue_on_errors}
5151 sta::check_argc_eq1 " read_def" $args
5252 set filename [file nativename [lindex $args 0]]
5353 if { ![file exists $filename ] } {
@@ -56,22 +56,26 @@ proc read_def { args } {
5656 if { ![file readable $filename ] || ![file isfile $filename ] } {
5757 utl::error " ORD" 4 " $filename is not readable."
5858 }
59- set tech_name " "
6059 if { [info exists keys(-tech)] } {
6160 set tech_name $keys(-tech)
61+ set tech [[ord::get_db] findTech $tech_name ]
62+ if { $tech == " NULL" } {
63+ utl::error ORD 52 " Technology $tech_name not found."
64+ }
6265 } elseif { ![ord::db_has_tech] } {
6366 utl::error " ORD" 5 " No technology has been read."
67+ } else {
68+ set tech [[ord::get_db] getTech]
6469 }
6570 if { [info exists flags(-order_wires)] } {
6671 utl::warn " ORD" 33 " -order_wires is deprecated."
6772 }
6873 set continue_on_errors [info exists flags(-continue_on_errors)]
6974 set floorplan_init [info exists flags(-floorplan_initialize)]
7075 set incremental [info exists flags(-incremental)]
71- set child [info exists flags(-child)]
72- if { $floorplan_init + $incremental + $child > 1 } {
73- utl::error ORD 16 " Options -incremental, -floorplan_initialization,\
74- and -child are mutually exclusive."
76+ if { $floorplan_init + $incremental > 1 } {
77+ utl::error ORD 16 " Options -incremental and -floorplan_initialization\
78+ are mutually exclusive."
7579 }
7680 if { [info exists keys(-chip)] } {
7781 set chip [[ord::get_db] findChip $keys(-chip) ]
@@ -80,13 +84,13 @@ proc read_def { args } {
8084 }
8185 } else {
8286 if { [[ord::get_db] getChip] == " NULL" } {
83- set chip [odb::dbChip_create [ord::get_db]]
87+ set chip [odb::dbChip_create [ord::get_db] $tech ]
8488 } else {
8589 set chip [[ord::get_db] getChip]
8690 }
8791 }
88- ord::read_def_cmd $filename $tech_name $ continue_on_errors $floorplan_init \
89- $incremental $child $ chip
92+ ord::read_def_cmd $filename $continue_on_errors $floorplan_init \
93+ $incremental $chip
9094}
9195
9296sta::define_cmd_args " write_def" {[-version version] filename}
0 commit comments