Additional change to readspice script to handle various issues with
pins not matching between netlist and layout due to delimiter changes or case sensitivity.
This commit is contained in:
parent
0b17bcdb86
commit
bf061f0012
|
|
@ -1254,7 +1254,7 @@ lefWriteMacro(def, f, scale, hide)
|
||||||
lefWriteGeometry, (ClientData) &lc) == 1)
|
lefWriteGeometry, (ClientData) &lc) == 1)
|
||||||
{
|
{
|
||||||
/* needHeader was set and there was something to write, */
|
/* needHeader was set and there was something to write, */
|
||||||
/* so write the headr and then re-run the search. */
|
/* so write the header and then re-run the search. */
|
||||||
|
|
||||||
ispwrrail = LefWritePinHeader(f, lab);
|
ispwrrail = LefWritePinHeader(f, lab);
|
||||||
if (ispwrrail == FALSE)
|
if (ispwrrail == FALSE)
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,9 @@ proc readspice {netfile} {
|
||||||
set n 1
|
set n 1
|
||||||
set changed false
|
set changed false
|
||||||
foreach pin [lrange $ftokens 2 end] {
|
foreach pin [lrange $ftokens 2 end] {
|
||||||
|
# Tcl "split" will not group spaces and tabs but leaves
|
||||||
|
# empty strings.
|
||||||
|
if {$pin == {}} {continue}
|
||||||
|
|
||||||
# NOTE: Should probably check for CDL-isms, global bang
|
# NOTE: Should probably check for CDL-isms, global bang
|
||||||
# characters, case insensitive matches, etc. This routine
|
# characters, case insensitive matches, etc. This routine
|
||||||
|
|
@ -98,9 +101,34 @@ proc readspice {netfile} {
|
||||||
# name, only the one triggered by "goto" will be made into
|
# name, only the one triggered by "goto" will be made into
|
||||||
# a port.
|
# a port.
|
||||||
|
|
||||||
set pinidx [port $pin index]
|
set testpin $pin
|
||||||
|
set pinidx [port $testpin index]
|
||||||
|
|
||||||
|
# Test a few common delimiter translations. This list
|
||||||
|
# is by no means exhaustive.
|
||||||
|
|
||||||
|
if {$pinidx == ""} {
|
||||||
|
set testpin [string map {\[ < \] >]} $pin
|
||||||
|
set pinidx [port $testpin index]
|
||||||
|
}
|
||||||
|
if {$pinidx == ""} {
|
||||||
|
set testpin [string map {< \[ > \]} $pin
|
||||||
|
set pinidx [port $testpin index]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Also test some case sensitivity issues (also not exhaustive)
|
||||||
|
|
||||||
|
if {$pinidx == ""} {
|
||||||
|
set testpin [string tolower $pin]
|
||||||
|
set pinidx [port $testpin index]
|
||||||
|
}
|
||||||
|
if {$pinidx == ""} {
|
||||||
|
set testpin [string toupper $pin]
|
||||||
|
set pinidx [port $testpin index]
|
||||||
|
}
|
||||||
|
|
||||||
if {$pinidx != ""} {
|
if {$pinidx != ""} {
|
||||||
port $pin index $n
|
port $testpin index $n
|
||||||
if {$pinidx != $n} {
|
if {$pinidx != $n} {
|
||||||
set changed true
|
set changed true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue