Modified the "-noflatten" command option to "lvs" so that it can be
given a filename as a value in addition to being passed a list of cells directly.
This commit is contained in:
parent
b1b04b8e87
commit
62d0352149
|
|
@ -389,8 +389,23 @@ proc netgen::lvs { name1 name2 {setupfile setup.tcl} {logfile comp.out} args} {
|
||||||
puts stdout "Treating empty subcircuits as black-box cells"
|
puts stdout "Treating empty subcircuits as black-box cells"
|
||||||
netgen::model blackbox on
|
netgen::model blackbox on
|
||||||
} elseif {[string first "-noflatten=" $arg] == 0} {
|
} elseif {[string first "-noflatten=" $arg] == 0} {
|
||||||
set noflat [string trim [string range $arg 11 end] \"\{\}]
|
set value [string range $arg 11 end]
|
||||||
puts stdout "Will not flatten these subcells: $noflat"
|
# If argument is a filename then read the list of cells from it;
|
||||||
|
# otherwise, argument is the list of files itself in quotes or
|
||||||
|
# braces.
|
||||||
|
if {![catch {file exists $value}]} {
|
||||||
|
if {![catch {open $value r} fnf]} {
|
||||||
|
while {[gets $fnf line] >= 0} {
|
||||||
|
lappend noflat $line
|
||||||
|
}
|
||||||
|
close $fnf
|
||||||
|
} else {
|
||||||
|
puts stderr "Cannot open file $value for reading cell list."
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
set noflat [string trim $value \"\{\}]
|
||||||
|
puts stdout "Will not flatten these subcells: $noflat"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue