@@ -415,6 +415,8 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing):
415
415
if 'funcpos' in cellrec:
416
416
if cellrec['funcpos'] == function:
417
417
dq = pins[i]
418
+ elif debug:
419
+ print('Pin ' + subpin + ' not in pin list of ' + instname)
418
420
419
421
print('A' + instname + ' ' + ddata + ' ' + dclk + ' ' + dset + ' ' + dreset + ' ' + dq + ' ' + dqbar + ' ddflop', file=ofile)
420
422
@@ -605,6 +607,7 @@ def read_spice(filein, fileout, celldefs, debug, modelfile, timing):
605
607
606
608
# Write d_dff, d_dlatch, d_pullup, and d_pulldown models
607
609
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)
608
611
print(".model dzero d_pulldown(load=" + cload + ")", file=ofile)
609
612
print(".model done d_pullup(load=" + cload + ")", file=ofile)
610
613
print("", file=ofile)
@@ -755,7 +758,7 @@ def read_liberty(filein, debug):
755
758
756
759
pmatch = pinrex.match(line)
757
760
if pmatch:
758
- pinname = pmatch.group(1)
761
+ pinname = pmatch.group(1).strip('"')
759
762
if debug:
760
763
print("Found input pin " + pinname)
761
764
cellrec['inputs'].append(pinname)
@@ -764,7 +767,7 @@ def read_liberty(filein, debug):
764
767
765
768
bmatch = busrex.match(line)
766
769
if bmatch:
767
- pinname = bmatch.group(1)
770
+ pinname = bmatch.group(1).strip('"')
768
771
if debug:
769
772
print("Found input bus " + pinname)
770
773
cellrec['inputs'].append(pinname)
@@ -776,34 +779,34 @@ def read_liberty(filein, debug):
776
779
if debug:
777
780
print("Found latch");
778
781
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('"')
781
784
continue
782
785
783
786
lmatch = lat2rex.match(line)
784
787
if lmatch:
785
788
if debug:
786
789
print("Found latch");
787
790
cellrec['type'] = 'latch'
788
- cellrec['funcpos'] = lmatch.group(1)
791
+ cellrec['funcpos'] = lmatch.group(1).strip('"')
789
792
continue
790
793
791
794
rmatch = ff2rex.match(line)
792
795
if rmatch:
793
796
if debug:
794
797
print("Found flop");
795
798
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('"')
806
801
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
807
810
808
811
fmatch = funcrex.match(line)
809
812
if fmatch:
0 commit comments