Skip to content

Commit

Permalink
Merge branch 'master' into qflow-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
RTimothyEdwards committed Oct 26, 2024
2 parents 58f3433 + 52ecda1 commit cbb751b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.103
1.4.104
8 changes: 8 additions & 0 deletions scripts/spi2xspice.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,17 @@ def write_models(cellsused, celldefs, ofile, timing):
for triidx in range(0, nin):
if cellrec['inputs'][triidx] == tripin:
break
# Index into binstring is the reverse of the pin order
triidx = nin - triidx - 1
else:
triidx = nin

pstring = parse_pin(cellrec['function'][k])
nvals = 2**nin
for i in range(0, nvals):
# binstring is the binary count of input bits. Note that
# the index into binstring is reverse of the pin order.
# (e.g., "000", "001", "010", "011", ...)
binstring = '{0:{fill}{width}b}'.format(i, fill='0', width=nin)

psubs = pstring
Expand Down Expand Up @@ -168,6 +173,9 @@ def write_models(cellsused, celldefs, ofile, timing):
else:
bitstr = '0'

# For tristate gates, the function will not include the
# tristate condition, so determine if tristate is active
# for this set of inputs and set the output to 'Z' if so.
if triidx < nin:
if binstring[triidx] == '1' and tripos == True:
bitstr = 'Z'
Expand Down

0 comments on commit cbb751b

Please sign in to comment.