From 6dff67c0fcd4092158f62f87be760b46dd271132 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 24 Nov 2020 16:27:29 -0500 Subject: [PATCH] Finished the fix started in the previous commit, to get spi2xspice working properly with the sky130 technology PDK (issue with pins in quotes in the liberty files). --- VERSION | 2 +- scripts/spi2xspice.py.in | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index d95ef96..3a7fa28 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.88 +1.4.89 diff --git a/scripts/spi2xspice.py.in b/scripts/spi2xspice.py.in index e991221..fcd8b0b 100755 --- a/scripts/spi2xspice.py.in +++ b/scripts/spi2xspice.py.in @@ -504,8 +504,9 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing): outlist = [] if 'inputs' in cellrec: for subpin in cellrec['inputs']: - if subpin in cellrec['spicepins']: - i = cellrec['spicepins'].index(subpin) + subpinname = subpin.strip('"') + if subpinname in cellrec['spicepins']: + i = cellrec['spicepins'].index(subpinname) # "pins[i]" is the name of the connecting net # on the top level if len(pins) > i: @@ -513,12 +514,13 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing): if pins[i] in pindefs: pindefs[pins[i]] = 'input' else: - print('Pin ' + subpin + ' of subckt ' + cellname + ' does not have a connecting net', file=sys.stderr) + print('Pin ' + subpinname + ' of subckt ' + cellname + ' does not have a connecting net', file=sys.stderr) if 'outputs' in cellrec: for subpin in cellrec['outputs']: - if subpin in cellrec['spicepins']: - i = cellrec['spicepins'].index(subpin) + subpinname = subpin.strip('"') + if subpinname in cellrec['spicepins']: + i = cellrec['spicepins'].index(subpinname) # "pins[i]" is the name of the connecting net # on the top level if len(pins) > i: @@ -526,7 +528,7 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing): if pins[i] in pindefs: pindefs[pins[i]] = 'output' else: - print('Pin ' + subpin + ' of subckt ' + cellname + ' does not have a connecting net', file=sys.stderr) + print('Pin ' + subpinname + ' of subckt ' + cellname + ' does not have a connecting net', file=sys.stderr) intext = ' '.join(inlist) outtext = ' '.join(outlist)