Skip to content

Commit 004596f

Browse files
Merge branch 'master' into qflow-1.4
2 parents d749899 + a0e4885 commit 004596f

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.98
1+
1.4.99

scripts/spi2xspice.py.in

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing):
415415
if 'funcpos' in cellrec:
416416
if cellrec['funcpos'] == function:
417417
dq = pins[i]
418+
elif debug:
419+
print('Pin ' + subpin + ' not in pin list of ' + instname)
418420

419421
print('A' + instname + ' ' + ddata + ' ' + dclk + ' ' + dset + ' ' + dreset + ' ' + dq + ' ' + dqbar + ' ddflop', file=ofile)
420422

@@ -605,6 +607,7 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing):
605607

606608
# Write d_dff, d_dlatch, d_pullup, and d_pulldown models
607609
print(".model ddflop d_dff(ic=0 rise_delay=" + time + " fall_delay=" + time + ")", file=ofile)
610+
print(".model dlatch d_dlatch(ic=0 rise_delay=" + time + " fall_delay=" + time + ")", file=ofile)
608611
print(".model dzero d_pulldown(load=" + cload + ")", file=ofile)
609612
print(".model done d_pullup(load=" + cload + ")", file=ofile)
610613
print("", file=ofile)
@@ -755,7 +758,7 @@ def read_liberty(filein, debug):
755758

756759
pmatch = pinrex.match(line)
757760
if pmatch:
758-
pinname = pmatch.group(1)
761+
pinname = pmatch.group(1).strip('"')
759762
if debug:
760763
print("Found input pin " + pinname)
761764
cellrec['inputs'].append(pinname)
@@ -764,7 +767,7 @@ def read_liberty(filein, debug):
764767

765768
bmatch = busrex.match(line)
766769
if bmatch:
767-
pinname = bmatch.group(1)
770+
pinname = bmatch.group(1).strip('"')
768771
if debug:
769772
print("Found input bus " + pinname)
770773
cellrec['inputs'].append(pinname)
@@ -776,34 +779,34 @@ def read_liberty(filein, debug):
776779
if debug:
777780
print("Found latch");
778781
cellrec['type'] = 'latch'
779-
cellrec['funcpos'] = lmatch.group(1)
780-
cellrec['funcneg'] = lmatch.group(2)
782+
cellrec['funcpos'] = lmatch.group(1).strip('"')
783+
cellrec['funcneg'] = lmatch.group(2).strip('"')
781784
continue
782785

783786
lmatch = lat2rex.match(line)
784787
if lmatch:
785788
if debug:
786789
print("Found latch");
787790
cellrec['type'] = 'latch'
788-
cellrec['funcpos'] = lmatch.group(1)
791+
cellrec['funcpos'] = lmatch.group(1).strip('"')
789792
continue
790793

791794
rmatch = ff2rex.match(line)
792795
if rmatch:
793796
if debug:
794797
print("Found flop");
795798
cellrec['type'] = 'flop'
796-
cellrec['funcpos'] = rmatch.group(1)
797-
cellrec['funcneg'] = rmatch.group(2)
798-
continue
799-
800-
rmatch = ff1rex.match(line)
801-
if rmatch:
802-
if debug:
803-
print("Found flop");
804-
cellrec['type'] = 'flop'
805-
cellrec['funcpos'] = rmatch.group(1)
799+
cellrec['funcpos'] = rmatch.group(1).strip('"')
800+
cellrec['funcneg'] = rmatch.group(2).strip('"')
806801
continue
802+
else:
803+
rmatch = ff1rex.match(line)
804+
if rmatch:
805+
if debug:
806+
print("Found flop");
807+
cellrec['type'] = 'flop'
808+
cellrec['funcpos'] = rmatch.group(1).strip('"')
809+
continue
807810

808811
fmatch = funcrex.match(line)
809812
if fmatch:

0 commit comments

Comments
 (0)