Skip to content

Commit

Permalink
Finished the fix started in the previous commit, to get spi2xspice
Browse files Browse the repository at this point in the history
working properly with the sky130 technology PDK (issue with pins
in quotes in the liberty files).
  • Loading branch information
RTimothyEdwards committed Nov 24, 2020
1 parent 95a1786 commit 6dff67c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.88
1.4.89
14 changes: 8 additions & 6 deletions scripts/spi2xspice.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -504,29 +504,31 @@ 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:
inlist.append(pins[i])
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:
outlist.append(pins[i])
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)
Expand Down

0 comments on commit 6dff67c

Please sign in to comment.