-
Notifications
You must be signed in to change notification settings - Fork 0
/
palasm.f
1971 lines (1968 loc) · 73.8 KB
/
palasm.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
C**PALASM20**PALASM20**PALASM20**PALASM20**PALASM20**PALASM20**PALASM20
C
C P A L A S M 2 0 - TRANSLATES SYMBOLIC EQUATIONS INTO PAL OBJECT
C CODE FORMATTED FOR DIRECT INPUT TO STANDARD
C PROM PROGRAMMERS.
C
C REV LEVEL: VERSION 1.6C (08/16/83)
C (C) COPYRIGHT 1983 MONOLITHIC MEMORIES
C
C
C *********************************************
C * *
C * APPROVAL *
C * *
C * 1:JOHN BIRKNER *
C * *
C * PROGRAMMABLE LOGIC PLANNER *
C * *
C * *
C * 2:VINCENT COLI *
C * *
C * APPLICATIONS ENGINEER *
C * *
C * *
C * 3:MANOUCHEHR VAFAI *
C * *
C * APPLICATIONS ENGINEER *
C * *
C * *
C *********************************************
C
C
C
C INPUT: PAL DESIGN SPECIFICATION ASSIGNED
C TO RPD(1). OPERATION CODES ARE
C ASSIGNED TO ROP(5).
C
C OUTPUT: ECHO, SIMULATION, AND FUSE PATTERN
C ARE ASSIGNED TO *(6). HEX AND
C BINARY PROGRAMMING FORMATS ARE
C ASSIGNED TO *(6). PROMPTS AND
C ERROR MESSAGES ARE ASSIGNED TO
C *(6).
C
C PART NUMBER: THE PAL PART NUMBER MUST APPEAR
C IN COLUMN ONE OF LINE ONE.
C
C PIN LIST: 20 SYMBOLIC PIN NAMES MUST APPEAR
C STARTING ON LINE FIVE.
C
C EQUATIONS: STARTING FIRST LINE AFTER THE
C PIN LIST IN THE FOLLOWING FORMS:
C
C A = B*C + D
C
C A := B*C + D
C
C IF( A*B ) C = D + E
C
C A2 := (A1:*:B1) + /C
C
C
C ALL CHARACTERS FOLLOWING ';' ARE
C IGNORED UNTIL THE NEXT LINE.
C
C
C BLANKS ARE IGNORED.
C
C OPERATORS: ( IN HIERARCHY OF EVALUATION )
C
C ; COMMENT FOLLOWS
C / COMPLEMENT
C * AND (PRODUCT)
C + OR (SUM)
C :+: XOR (EXCLUSIVE OR)
C :*: XNOR (EXCLUSIVE NOR)
C ( ) CONDITIONAL THREE-STATE
C OR FIXED SYMBOL
C = EQUALITY
C := REPLACED BY (AFTER CLOCK)
C
C FIXED SYMBOLS
C FOR PAL16X4
C AND PAL16A4
C ONLY: (AN+/BN) WHERE N = 0,1,2,3
C (AN+BN) FOR OUTPUT PINS
C (AN) 17,16,15,14, RESP
C (/AN+/BN) A IS OUTPUT
C (/BN) B IS INPUT
C (AN:+:BN)
C (AN*/BN)
C (/AN+BN)
C (AN:*:BN)
C (BN)
C (AN*BN)
C (/AN)
C (/AN*/BN)
C (/AN*BN)
C
C FUNCTION L, H, X, Z, AND C ARE VALID
C TABLE: FUNCTION TABLE VECTOR ENTRIES.
C
C REFERENCE: A COMPLETE USERS GUIDE TO
C DESIGNING WITH PALS USING PALASM
C IS PROVIDED IN THE MONOLITHIC
C MEMORIES PAL HANDBOOK.
C
C SUBROUTINES: INITLZ,GETSYM,INCR,MATCH,FIXSYM,
C IXLATE,ECHO,CAT,PINOUT,PLOT,TWEEK,
C BINR,HEX,SLIP,FANTOM,IODC2,IODC4,
C TEST,FIXTST,PLOTF,SUMCHK,INTEL
C
C AUTHORS: JOHN BIRKNER AND VINCENT COLI
C FAULT TESTING BY IMTIAZ BENGALI
C JEDEC FORMAT BY MANO VAFAI
C MONOLITHIC MEMORIES INC.
C 1165 EAST ARQUES AVENUE
C
C SUNNYVALE, CALIFORNIA 94043
C (408) 739-3535
C
C FINE PRINT: MONOLITHIC MEMORIES TAKES NO
C RESPONSIBILITY FOR THE OPERATION
C OR MAINTENANCE OF THIS PROGRAM.
C THE SOURCE CODE AS PRINTED HERE
C PRODUCED THE OBJECT CODE OF THE
C EXAMPLES IN THE APPLICATIONS
C SECTION ON A VAX/VMS 11/780
C COMPUTER AND A NATIONAL CSS IBM
C SYSTEM/370 FORTRAN IV(G).
C
C***********************************************************************
C
C
C***********************************************************************
C
C
C MAIN PROGRAM
C
IMPLICIT NONE
LOGICAL LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR,
1 LFIX,LFIRST,LFUSES(32,64),LPHASE(20),LBUF(20),
2 LPROD(80),LSAME,LACT,LOPERR,LINP,LPRD,LERR,LSA11,LSA01,
3 LPHANT(32,64),IFIX
INTEGER IPROD
CHARACTER INOO,IOT,INOAI,IPAL(4),E,O,T,P,B,H,S,L,N,C,Q,F,A,
1 JJ,BB,CC,DD,EE,FF,II,NN,OO,PP,RR,SS,TT,UU,
2 IPAGE(80,200),REST(73),IOP,TITLE(80),ISYM(8,20)
3 ,IBUF(8,20),PATNUM(80),COMP(80)
INTEGER BEL,IFUNCT,IDESC,IEND
INTEGER J,I,IC,IL,IBLOW,IPCTR,ILE,COUNT,ILE,ITYPE,ILL
1 ,IMATCH,IPRD,I88PRO,IINPUT,I8PRO,ILERR,ISAF
2 ,IPCTR1,IPCTR0,ISA0,ISA1,IFAULT
COMMON LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR
COMMON /PGE/ IPAGE
COMMON /LFUSES/LFUSES,LPHANT
COMMON /FTEST/ IFUNCT,IDESC,IEND
DATA E/'E'/,O/'O'/,T/'T'/,P/'P'/,B/'B'/,H/'H'/,S/'S'/,L/'L'/,
1 N/'N'/,C/'C'/,Q/'Q'/,F/'F'/,A/'A'/,JJ/'J'/
DATA BB/'B'/,CC/'C'/,DD/'D'/,EE/'E'/,FF/'F'/,II/'I'/,NN/'N'/,
1 OO/'O'/,PP/'P'/,RR/'R'/,SS/'S'/,TT/'T'/,UU/'U'/
DATA BEL /007/
C
C
C ASSIGNMENT OF DATA SET REFERENCES
C RPD - PAL DESIGN SPECIFICATION (INPUT)
C ROC - OPERATION CODE (INPUT)
C * - ECHO, PINOUT, TEST, AND PLOT (OUTPUT)
C * - HEX AND BINARY FORMAT PROGRAM TAPES (OUTPUT)
C * - PROMPTS AND ERROR MESSAGES (OUTPUT)
WRITE(6,3)
3 FORMAT(/,' MONOLITHIC MEMORIES INC. PALASM VERSION 1.6C')
WRITE(6,33)
33 FORMAT(' (C) COPYRIGHT 1983 MONOLITHIC MEMORIES')
WRITE(6,1)
1 FORMAT(/,' WHAT IS THE LOGICAL UNIT NUMBER FOR OUTPUT(6)?: '$)
C
C READ(5,2) LUN
C 2 FORMAT(I4)
C
C
IFUNCT=0
IDESC=0
C INITIALIZE LSAME AND LACT TO FALSE (ACTIVE HIGH/LOW ERROR)
LSAME=.FALSE.
LACT=.FALSE.
C INITIALIZE LOPERR TO FALSE (OUTPUT PIN ERROR)
LOPERR=.FALSE.
C INITIALIZE LINP TO FALSE (INPUT PIN ERROR)
LINP=.FALSE.
C INITIALIZE LPRD TO FALSE (PRODUCT LINE ERROR)
LPRD=.FALSE.
C
C
C
C
C READ IN FIRST 4 LINES OF THE PAL DESIGN SPECIFICATION
C READ(*,10) IPAL,INOAI,IOT,INOO,REST,PATNUM,TITLE,COMP
C 10 FORMAT(4A1,A1,A1,A1,73A1,/,80A1,/,80A1,/,80A1)
IPAL(1)='P'
IPAL(2)='A'
IPAL(3)='L'
IPAL(4)='1'
INOAI='6'
IOT='L'
INOO='8'
C READ IN PIN LIST (LINE 5) THROUGH THE END OF THE PAL DESIGN
C SPECIFICATION
DO 15 J=1,200
READ(*,11,END=16) (IPAGE(I,J),I=1,80)
11 FORMAT(80A1)
C CHECK FOR 'FUNCTION TABLE' AND SAVE ITS LINE NUMBER
IF( IFUNCT.EQ.0 .AND.IPAGE(1,J).EQ.FF.AND.
1 IPAGE(2,J).EQ.UU.AND.IPAGE(3,J).EQ.NN.AND.
2 IPAGE(4,J).EQ.CC.AND.IPAGE(5,J).EQ.TT.AND.
3 IPAGE(6,J).EQ.II.AND.IPAGE(7,J).EQ.OO.AND.
4 IPAGE(8,J).EQ.NN.AND.IPAGE(10,J).EQ.TT.AND.
5 IPAGE(12,J).EQ.BB.AND.IPAGE(14,J).EQ.EE ) IFUNCT=J
C CHECK FOR 'DESCRIPTION' AND SAVE ITS LINE NUMBER
IF( IDESC.EQ.0 .AND.IPAGE(1,J).EQ.DD.AND.
1 IPAGE(2,J).EQ.EE.AND.IPAGE(3,J).EQ.SS.AND.
2 IPAGE(4,J).EQ.CC.AND.IPAGE(5,J).EQ.RR.AND.
3 IPAGE(6,J).EQ.II.AND.IPAGE(7,J).EQ.PP.AND.
4 IPAGE(8,J).EQ.TT.AND.IPAGE(9,J).EQ.II.AND.
5 IPAGE(10,J).EQ.OO.AND.IPAGE(11,J).EQ.NN ) IDESC=J
15 CONTINUE
C SAVE THE LAST LINE NUMBER OF THE PAL DESIGN SPECIFICATION
16 IEND=J-1
CALL INITLZ(INOAI,IOT,INOO,ITYPE,LFUSES,LPHANT,IC,IL,IBLOW,
1 LFIX,IPCTR)
ILE=IL+1
C PRINT ERROR MESSAGE FOR INVALID PAL PART TYPE
IF(ITYPE.NE.0) GO TO 17
WRITE(*,18) IPAL,INOAI,IOT,INOO
C
18 FORMAT(/,' PAL PART TYPE ',4A1,A1,A1,A1,' IS INCORRECT')
CALL EXIT1
C GET 20 PIN NAMES
17 DO 20 J=1,20
20 CALL GETSYM(LPHASE,ISYM,J,IC,IL,LFIX)
IF(.NOT.(LEQUAL.OR.LLEFT.OR.LAND.OR.LOR.OR.LRIGHT)) GO TO 24
WRITE(*,23)
23 FORMAT(/,' LESS THAN 20 PIN NAMES IN PIN LIST')
CALL EXIT1
24 ILE=IL
C BYPASS FUSE PLOT ASSEMBLY IF HAL (H IN COLUMN 1, LINE 1)
IF( IPAL(1).EQ.H ) GO TO 108
25 CALL GETSYM(LBUF,IBUF,1,IC,IL,LFIX)
28 IF(.NOT.LEQUAL) GO TO 25
COUNT=0
ILL=IL
CALL MATCH(IMATCH,IBUF,ISYM)
IF( IMATCH.EQ.0 ) GO TO 100
IPRD=IMATCH
C CHECK FOR VALID POLARITY
LSAME = ( ( LPHASE(IMATCH)).AND.( LBUF(1)).OR.
1 (.NOT.LPHASE(IMATCH)).AND.(.NOT.LBUF(1)) )
IF( IOT.EQ.H.AND.(.NOT.LSAME) ) LACT=.TRUE.
IF( (.NOT.(IOT.EQ.H.OR.IOT.EQ.C)).AND.(LSAME) ) LACT=.TRUE.
C CHECK FOR VALID OUTPUT PIN
IF( (ITYPE.EQ.1.OR.ITYPE.EQ.5.OR.ITYPE.EQ.6).AND.IOT.NE.A.
1 AND.(IMATCH.LT.12.OR.IMATCH.GT.19) ) LOPERR=.TRUE.
IF( ITYPE.EQ.2.AND.(IMATCH.LT.13.OR.IMATCH.GT.18) )
1 LOPERR=.TRUE.
IF( ITYPE.EQ.3.AND.(IMATCH.LT.14.OR.IMATCH.GT.17) )
1 LOPERR=.TRUE.
IF( ITYPE.EQ.4.AND.(IMATCH.LT.15.OR.IMATCH.GT.16) )
1 LOPERR=.TRUE.
IF( (LACT).OR.(LOPERR) ) GO TO 100
I88PRO=(19-IMATCH)*8 + 1
C START PAL16C1 ON PRODUCT LINE 24 (I88PRO=25)
IF(IOT.EQ.C) I88PRO=25
IC=0
30 CALL INCR(IC,IL,LFIX)
IF( .NOT.(LEQUAL.OR.LLEFT) ) GO TO 30
LPROD(I88PRO)=.TRUE.
IF( (.NOT.LLEFT).AND.(REST(3).NE.PP) ) CALL SLIP(LFUSES,
1 I88PRO,INOAI,IOT,INOO,IBLOW)
DO 70 I8PRO=1,16
COUNT = COUNT + 1
IF( (LXOR).AND.I8PRO.NE.5 ) GO TO 70
IPROD = I88PRO + I8PRO - 1
LPROD(IPROD)=.TRUE.
LFIRST=.TRUE.
50 ILL=IL
CALL GETSYM(LBUF,IBUF,1,IC,IL,LFIX)
IF( (ITYPE.EQ.1.OR.ITYPE.EQ.2.AND.IPRD.GT.13
1 .AND.IPRD.LT.18).AND.COUNT.GT.2 ) LPRD=.TRUE.
IF( (ITYPE.EQ.3.OR.ITYPE.EQ.2.AND.(IPRD.EQ.13.OR.
1 IPRD.EQ.18)).AND.COUNT.GT.4 ) LPRD=.TRUE.
C
IF( IOT.NE.A.AND.IOT.NE.C.AND.COUNT.GT.8 ) LPRD=.TRUE.
IF( .NOT.LPRD ) GO TO 69
IF(IL.NE.IFUNCT.AND.IL.NE.IDESC) ILL=IL
IPROD = IPROD - 1
GO TO 118
69 IF(LFIX) GO TO 59
CALL MATCH(IMATCH,IBUF,ISYM)
C CHECK FOR INVALID INPUT PIN
IF( ITYPE.EQ.1.AND.(IMATCH.GE.12.AND.IMATCH.LE.19) )
1 LINP=.TRUE.
IF( ITYPE.EQ.2.AND.(IMATCH.GE.13.AND.IMATCH.LE.18) )
1 LINP=.TRUE.
IF( ITYPE.EQ.3.AND.(IMATCH.GE.14.AND.IMATCH.LE.17) )
1 LINP=.TRUE.
IF( ITYPE.EQ.4.AND.(IMATCH.EQ.15.OR.IMATCH.EQ.16) )
1 LINP=.TRUE.
IF( ITYPE.EQ.5.AND.(IMATCH.EQ.12.OR.IMATCH.EQ.19) )
1 LINP=.TRUE.
IF( ITYPE.EQ.6.AND.(IMATCH.EQ.1.OR.IMATCH.EQ.11) )
1 LINP=.TRUE.
ILL=IL
IF(LINP) GO TO 100
IF( IMATCH.EQ.0 ) GO TO 100
IF( IMATCH.EQ.10.OR.IMATCH.EQ.99 ) GO TO 64
IF(.NOT.LFIRST) GO TO 58
LFIRST=.FALSE.
DO 56 I=1,32
IBLOW = IBLOW + 1
56 LFUSES(I,IPROD)=.TRUE.
58 CALL IXLATE(IINPUT,IMATCH,LPHASE,LBUF,ITYPE)
IF(IINPUT.LE.0) GO TO 60
IBLOW = IBLOW - 1
LFUSES(IINPUT,IPROD)=.FALSE.
CALL PLOT(LBUF,IBUF,LFUSES,IPROD,TITLE,.FALSE.,ITYPE,
1 LPROD,IOP,IBLOW,IPCTR)
GO TO 60
59 CALL FIXSYM(LBUF,IBUF,IC,IL,LFIRST,LFUSES,IBLOW,
1 IPROD,LFIX,TITLE,LPROD)
60 IF(LAND) GO TO 50
64 IF(.NOT.LRIGHT) GO TO 68
66 CALL INCR(IC,IL,LFIX)
IF(.NOT.LEQUAL) GO TO 66
68 IF( .NOT.(LOR.OR.LEQUAL) ) GO TO 74
70 CONTINUE
74 ILL=IL
CALL GETSYM(LBUF,IBUF,1,IC,IL,LFIX)
IF(LLEFT.OR.LEQUAL) GO TO 28
100 IF( ILL.EQ.IFUNCT.OR.ILL.EQ.IDESC ) GO TO 102
C PRINT AN ERROR MESSAGE IF UNRECOGNIZABLE SYMBOL
ILERR=ILL+4
WRITE(*,99) BEL
99 FORMAT(' ',A1)
WRITE(*,101) (IBUF(I,1),I=1,8),ILERR,(IPAGE(I,ILL),I=1,80)
101 FORMAT(/,' ERROR SYMBOL = ',8A1,' IN LINE NUMBER ',I4,
1 /,' ',80A1)
C
C PRINT AN ERROR MESSAGE FOR ACTIVE HIGH/LOW PART
IF( (LACT).AND.( LSAME).AND.(.NOT.LOPERR) )
1 WRITE(*,103) IPAL,INOAI,IOT,INOO
103 FORMAT(' OUTPUT MUST BE INVERTED SINCE ',4A1,A1,A1,A1,
1 ' IS AN ACTIVE LOW DEVICE')
IF( (LACT).AND.(.NOT.LSAME).AND.(.NOT.LOPERR) )
1 WRITE(*,109) IPAL,INOAI,IOT,INOO
109 FORMAT(' OUTPUT CANNOT BE INVERTED SINCE ',4A1,A1,A1,A1,
1 ' IS AN ACTIVE HIGH DEVICE')
C PRINT AN ERROR MESSAGE FOR AN INVALID OUTPUT PIN
IF( (LOPERR).AND.IMATCH.NE.0 )
1 WRITE(*,105) IMATCH,IPAL,INOAI,IOT,INOO
105 FORMAT(' THIS PIN NUMBER ',I2,' IS AN INVALID OUTPUT PIN',
1 ' FOR ',4A1,A1,A1,A1)
C PRINT AN ERROR MESSAGE FOR AN INVALID INPUT PIN
IF(LINP) WRITE(*,115) IMATCH,IPAL,INOAI,IOT,INOO
115 FORMAT(' THIS PIN NUMBER ',I2,' IS AN INVALID INPUT PIN',
1 ' FOR ',4A1,A1,A1,A1)
C PRINT AN ERROR MESSAGE FOR INVALID PRODUCT LINE
118 ILERR=ILL+4
IF(LPRD) WRITE(*,119)
1 (ISYM(I,IPRD),I=1,8),IPRD,ILERR,(IPAGE(I,ILL),I=1,80)
119 FORMAT(/,' OUTPUT PIN NAME = ',8A1,' OUTPUT PIN NUMBER = ',I2,
1 /,' MINTERM IN LINE NUMBER ',I4,/,' ',80A1)
IF( LPRD.AND.COUNT.LT.8 )
1 WRITE(*,116) IPROD,IPAL,INOAI,IOT,INOO
116 FORMAT(' THIS PRODUCT LINE NUMBER ',I2,' IS NOT VALID',
1 ' FOR ',4A1,A1,A1,A1)
IF( LPRD.AND.COUNT.GT.8 )
1 WRITE(*,117) IPAL,INOAI,IOT,INOO
117 FORMAT(' MAXIMUM OF 8 PRODUCT LINES ARE VALID FOR ',4A1,A1,A1,A1,
1 /,' TOO MANY MINTERMS ARE SPECIFIED IN THIS EQUATION')
CALL EXIT1
102 IF(ITYPE.LE.4) CALL TWEEK(ITYPE,IOT,LFUSES,LPHANT)
108 WRITE(6,106)
106 FORMAT(/,' OPERATION CODES:')
WRITE(6,107)
107 FORMAT(/,' E=ECHO INPUT O=PINOUT T=SIMULATE P=PLOT ',
1 /,' B=BRIEF H=HEX S=SHORT L=BHLF N=BNPF ',
2 /,' C=CATALOG Q=QUIT F=FAULT TESTING ',
3 /,' J=JEDEC FORMAT I= INTEL HEX')
WRITE(6,110)
110 FORMAT(/,' ENTER OPERATION CODE: ',$)
READ(*,120) IOP
120 FORMAT(A1)
C CALL IODC2
C IF(*.NE.6) WRITE(*,125)
C 125 FORMAT('1')
IF(IOP.EQ.E) CALL ECHO(IPAL,INOAI,IOT,INOO,REST,PATNUM,TITLE,
1 COMP)
IF(IOP.EQ.O) CALL PINOUT(IPAL,INOAI,IOT,INOO,TITLE)
IF(IOP.EQ.T) CALL TEST(LPHASE,LBUF,TITLE,IC,IL,ILE,ISYM,IBUF,
1 ITYPE,INOO,LFIX,IPCTR,LERR,ISAF,IPCTR1,
2 .FALSE.,.FALSE.,IOP.NE.JJ)
C THE FOLLOWING IS ADDED FOR SA1 TEST
C
C INITIALIZING THE TOTAL FAULTS. CALLING FOR SA1/SA0 TEST
ISAF=0
IF(IOP.EQ.F) GO TO 200
C END OF ADDITION
C
C ADDITIONS MADE TO GENERATE TEST VECTORS
C FOR JEDEC FORMAT
C
IF (IOP.NE.JJ) GOTO 135
CALL TEST(LPHASE,LBUF,TITLE,IC,IL,ILE,ISYM,IBUF,
1 ITYPE,INOO,LFIX,IPCTR,LERR,ISAF,IPCTR1,
2 .FALSE.,.FALSE.,IOP.NE.JJ)
CALL PLOTF(ITYPE,IOT)
C
C
C
135 IF(IOP.EQ.P) CALL PLOT(LBUF,IBUF,LFUSES,IPROD,TITLE,.TRUE.,ITYPE,
1 LPROD,IOP,IBLOW,IPCTR0)
IF(IOP.EQ.B) CALL PLOT(LBUF,IBUF,LFUSES,IPROD,TITLE,.TRUE.,ITYPE,
1 LPROD,IOP,IBLOW,IPCTR0)
IF(IOP.EQ.H) CALL HEX(LFUSES,H)
IF(IOP.EQ.S) CALL HEX(LFUSES,S)
IF(IOP.EQ.L) CALL BINR(LFUSES,H,L)
IF(IOP.EQ.N) CALL BINR(LFUSES,P,N)
IF(IOP.EQ.C) CALL CAT
C CALL IODC4
C
C
C
C - Dmitriy - commented out IF(G.EQ.II) CALL INTEL(LFUSES,II)
IF(IOP.NE.Q ) GO TO 108
CALL EXIT1
C ADDITION FOR SA1/SA0 TESTS
C SETTING THE PARAMETERS FOR SA1/SA0 TESTS
200 IPCTR=0
CALL TEST(LPHASE,LBUF,TITLE,IC,IL,ILE,ISYM,IBUF,ITYPE,INOO,
1 IFIX,IPCTR,LERR,ISAF,IPCTR1,.FALSE.,.FALSE.,IOP.NE.JJ)
IF(IFUNCT.EQ.0) GO TO 135
IPCTR0=IPCTR
C LOOPING FOR SA1 TEST
DO 210 IPCTR1=1,IPCTR0
LSA11=.TRUE.
CALL TEST(LPHASE,LBUF,TITLE,IC,IL,ILE,ISYM,IBUF,ITYPE,INOO,
1 IFIX,IPCTR,LERR,ISAF,IPCTR1,LSA11,.FALSE.,IOP.NE.JJ)
210 CONTINUE
ISA1=ISAF
C LOOPING FOR SA0 TEST
DO 215 IPCTR1=1,IPCTR0
LSA01=.TRUE.
CALL TEST(LPHASE,LBUF,TITLE,IC,IL,ILE,ISYM,IBUF,ITYPE,INOO,
1 IFIX,IPCTR,LERR,ISAF,IPCTR1,.FALSE.,LSA01,IOP.NE.JJ)
215 CONTINUE
ISA0=ISAF-ISA1
IFAULT=(ISAF*100)/(IPCTR0*2)
WRITE(*,220) ISA1
C
220 FORMAT(/,' NUMBER OF STUCK AT ONE (SA1) FAULTS ARE =' I3)
WRITE(*,225) ISA0
225 FORMAT(/,' NUMBER OF STUCK AT ZERO (SA0) FAULTS ARE =' I3)
WRITE(*,230) IFAULT
230 FORMAT(/,' PRODUCT TERM COVERAGE =' I3,'%',//)
GO TO 135
C END OF ADDITION FOR SA1/SA0 TEST
END
C**************************************************
C
C
CHARACTER FUNCTION CNV(KK)
IMPLICIT NONE
INTEGER KK
CHARACTER A,B,C,D,E,F,G,H
1 ,I,J,X,L,M,N,O,P
DATA A/'0'/,B/'1'/,C/'2'/,D/'3'/,E/'4'/,F/'5'/,G/'6'/,H/'7'/
DATA I/'8'/,J/'9'/,X/'A'/,L/'B'/,M/'C'/,N/'D'/,O/'E'/,P/'F'/
IF(KK.EQ.0) CNV=A
IF(KK.EQ.1) CNV=B
IF(KK.EQ.2) CNV=C
IF(KK.EQ.3) CNV=D
IF(KK.EQ.4) CNV=E
IF(KK.EQ.5) CNV=F
IF(KK.EQ.6) CNV=G
IF(KK.EQ.7) CNV=H
IF(KK.EQ.8) CNV=I
IF(KK.EQ.9) CNV=J
IF(KK.EQ.10)CNV=X
IF(KK.EQ.11)CNV=L
IF(KK.EQ.12)CNV=M
IF(KK.EQ.13)CNV=N
IF(KK.EQ.14)CNV=O
IF(KK.EQ.15)CNV=P
RETURN
END
C
C
C***********************************************************************
C
SUBROUTINE INITLZ(INOAI,IOT,INOO,ITYPE,LFUSES,LPHANT,IC,IL,IBLOW,
1 LFIX,IPCTR)
C THIS SUBROUTINE INITIALIZES VARIABLES AND MATCHES PAL PART
C NUMBER WITH ITYPE
IMPLICIT INTEGER (A-Z)
LOGICAL LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR,
1 LFIX,LFUSES(32,64),LPHANT(32,64)
CHARACTER H,L,C,R,X,A,IOT,INOAI,INOO
1 ,I0,I2,I4,I6,I8
CHARACTER TSTVEC(20,50),IPAGE(80,200)
COMMON LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR
COMMON /PGE/ IPAGE
COMMON /TSTVEC/ NTEST, TSTVEC
DATA H/'H'/,L/'L'/,C/'C'/,R/'R'/,X/'X'/,A/'A'/,
1 I0/'0'/,I2/'2'/,I4/'4'/,I6/'6'/,I8/'8'/
C INITIALIZE LFUSES ARRAY (FUSE ARRAY)
C
DO 20 J=1,64
DO 20 I=1,32
LFUSES(I,J)=.FALSE.
20 LPHANT(I,J)=.FALSE.
C INITIALIZE NUMBER OF TEST VECTORS FOR JEDEC FORMAT
NTEST = 0
C INITIALIZE IBLOW (NUMBER OF FUSES BLOWN)
IBLOW=0
C INITIALIZE IPCTR (NUMBER OF PRODUCT TERMS)
IPCTR=0
C INITIALIZE IC AND IL (COLUMN AND LINE POINTERS)
IC=0
IL=1
C INITIALIZE ITYPE (PAL PART TYPE)
ITYPE=0
C ITYPE IS ASSIGNED THE FOLLOWING VALUES FOR THESE PAL TYPES:
C PAL10H8,PAL10L8 ITYPE=1
C PAL12H6,PAL12L6 ITYPE=2
C PAL14H4,PAL14L4 ITYPE=3
C PAL16H2,PAL16L2,PAL16C1 ITYPE=4
C PAL16L8 ITYPE=5
C PAL16R4,PAL16R6,PAL16R8,PAL16X4,PAL16A4 ITYPE=6
C DETERMINE ITYPE
IF( INOAI.EQ.I0 ) ITYPE=1
IF( INOAI.EQ.I2 ) ITYPE=2
IF( INOAI.EQ.I4 ) ITYPE=3
IF( (INOAI.EQ.I6) ) ITYPE=4
IF( (INOAI.EQ.I6).AND.(INOO.EQ.I8) ) ITYPE=5
IF( (IOT.EQ.R).OR.(IOT.EQ.X).OR.(IOT.EQ.A) ) ITYPE=6
IF( .NOT.(IOT.EQ.H.OR.IOT.EQ.L.OR.IOT.EQ.C
1 .OR.IOT.EQ.R.OR.IOT.EQ.X.OR.IOT.EQ.A) ) ITYPE=0
CALL INCR(IC,IL,LFIX)
RETURN
END
C
C***********************************************************************
C
SUBROUTINE GETSYM(LPHASE,ISYM,J,IC,IL,LFIX)
C THIS SUBROUTINE GETS THE PIN NAME, / IF COMPLEMENT LOGIC, AND
C THE FOLLOWING OPERATION SYMBOL IF ANY
IMPLICIT INTEGER (A-Z)
LOGICAL LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR,
1 LFIX,LPHASE(20)
CHARACTER IPAGE(80,200),ISYM(8,20),IBLANK
COMMON LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR
COMMON /PGE/ IPAGE
DATA IBLANK/' '/
LFIX=.FALSE.
IF( .NOT.(LLEFT.OR.LAND.OR.LOR.OR.LEQUAL.OR.LRIGHT) ) GO TO 10
CALL INCR(IC,IL,LFIX)
IF(LLEFT) GO TO 60
10 LPHASE(J)=( .NOT.LSLASH )
IF(LPHASE(J)) GO TO 15
CALL INCR(IC,IL,LFIX)
C
15 DO 20 I=1,8
20 ISYM(I,J)=IBLANK
25 DO 30 I=1,7
30 ISYM(I,J)=ISYM(I+1,J)
ISYM(8,J)=IPAGE(IC,IL)
CALL INCR(IC,IL,LFIX)
IF( LLEFT.OR.LBLANK.OR.LAND.OR.LOR.OR.LRIGHT.OR.LEQUAL ) RETURN
GO TO 25
60 LFIX=.TRUE.
RETURN
END
C
C**********************************************************************
C
SUBROUTINE INCR(IC,IL,LFIX)
C THIS SUBROUTINE INCREMENTS COLUMN AND LINE POINTERS
C BLANKS AND CHARACTERS AFTER ';' ARE IGNORED
IMPLICIT INTEGER (A-Z)
LOGICAL LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR,
1 LFIX,LX1
CHARACTER IBLANK,ILEFT,IAND,IOR,COMENT
1 ,ISLASH,IEQUAL,IRIGHT,ICOLON,TAB
CHARACTER IPAGE(80,200)
COMMON LBLANK,LLEFT,LAND,LOR,LSLASH,LEQUAL,LRIGHT,LXOR,LXNOR
COMMON /PGE/ IPAGE
DATA IBLANK/' '/,ILEFT/'('/,IAND/'*'/,IOR/'+'/,COMENT/';'/,
1 ISLASH/'/'/,IEQUAL/'='/,IRIGHT/')'/,ICOLON/':'/,TAB/' '/
LBLANK=.FALSE.
LXOR=.FALSE.
LXNOR=.FALSE.
LX1=.FALSE.
LRIGHT=.FALSE.
10 IC=IC+1
IF(IC .LE.79 .AND. IPAGE(IC,IL).NE.COMENT) GO TO 30
IL=IL+1
IF(IL.LE.200) GO TO 20
WRITE(*,15)
15 FORMAT(/,' SOURCE FILE EXCEEDS 200 LINES OR MISSING',
1 ' DESCRIPTION OR FUNCTION TABLE KEY WORD')
CALL EXIT1
20 IC=0
GO TO 10
30 IF( IPAGE(IC,IL).EQ.ICOLON.AND.(LFIX) ) RETURN
IF(( IPAGE(IC,IL).NE.IBLANK ).AND.( IPAGE(IC,IL).NE.TAB)) GOTO 31
LBLANK=.TRUE.
GO TO 10
31 IF( IPAGE(IC,IL).NE.ICOLON ) GO TO 32
IF( (LXOR).OR.(LXNOR) ) GO TO 33
LX1=.TRUE.
GO TO 10
33 IF(LXOR) LOR=.TRUE.
IF(LXNOR) LAND=.TRUE.
RETURN
32 IF( .NOT.(LX1.AND.(IPAGE(IC,IL).EQ.IOR.OR.IPAGE(IC,IL).EQ.IAND)) )
1 GO TO 34
C
IF( IPAGE(IC,IL).EQ.IOR ) LXOR=.TRUE.
IF( IPAGE(IC,IL).EQ.IAND ) LXNOR=.TRUE.
GO TO 10
34 LLEFT =( IPAGE(IC,IL).EQ.ILEFT )
LAND =( IPAGE(IC,IL).EQ.IAND )
LOR =( IPAGE(IC,IL).EQ. IOR )
LSLASH=( IPAGE(IC,IL).EQ.ISLASH )
LEQUAL=( IPAGE(IC,IL).EQ.IEQUAL )
LRIGHT=( IPAGE(IC,IL).EQ.IRIGHT )
RETURN
END
C
C***********************************************************************
C
SUBROUTINE MATCH(IMATCH,IBUF,ISYM)
C THIS SUBROUTINE FINDS A MATCH BETWEEN THE PIN NAME IN THE EQUATION
C AND THE PIN NAME IN THE PIN LIST OR FUNCTION TABLE PIN LIST
IMPLICIT INTEGER (A-Z)
LOGICAL LMATCH
CHARACTER C,A,R,Y,IBUF(8,20),ISYM(8,20)
DATA C/'C'/,A/'A'/,R/'R'/,Y/'Y'/
IMATCH=0
DO 20 J=1,20
LMATCH=.TRUE.
DO 10 I=1,8
10 LMATCH=LMATCH.AND.(IBUF(I,1).EQ.ISYM(I,J))
IF(LMATCH) IMATCH=J
20 CONTINUE
C MATCH CARRY WHICH IS FOUND IN THE PAL16A4
IF( IBUF(3,1).EQ.C.AND.IBUF(4,1).EQ.A.AND.IBUF(5,1).EQ.R.AND.
1 IBUF(6,1).EQ.R.AND.IBUF(7,1).EQ.Y ) IMATCH=99
RETURN
END
C
C***********************************************************************
C
SUBROUTINE IXLATE(IINPUT,IMATCH,LPHASE,LBUF,ITYPE)
C THIS SUBROUTINE FINDS A MATCH BETWEEN THE INPUT PIN NUMBER AND
C THE INPUT LINE NUMBER FOR A SPECIFIC PAL. ADD 1 TO THE INPUT
C LINE NUMBER IF THE PIN IS A COMPLEMENT
IMPLICIT INTEGER (A-Z)
INTEGER ITABLE(20,6)
LOGICAL LPHASE(20),LBUF(20)
DATA ITABLE/
1 3, 1, 5, 9,13,17,21,25,29,-10,31,-1,-1,-1,-1,-1,-1,-1,-1,-20,
2 3, 1, 5, 9,13,17,21,25,29,-10,31,27,-1,-1,-1,-1,-1,-1, 7,-20,
3 3, 1, 5, 9,13,17,21,25,29,-10,31,27,23,-1,-1,-1,-1,11, 7,-20,
4 3, 1, 5, 9,13,17,21,25,29,-10,31,27,23,19,-1,-1,15,11, 7,-20,
5 3, 1, 5, 9,13,17,21,25,29,-10,31,-1,27,23,19,15,11, 7,-1,-20,
6 -1, 1, 5, 9,13,17,21,25,29,-10,-1,31,27,23,19,15,11, 7, 3,-20/
IINPUT=0
IBUBL=0
IF((( LPHASE(IMATCH)).AND.(.NOT.LBUF(1))).OR.
1 ((.NOT.LPHASE(IMATCH)).AND.( LBUF(1)))) IBUBL=1
IF( ITABLE(IMATCH,ITYPE).GT.0 ) IINPUT=ITABLE(IMATCH,ITYPE)+IBUBL
C
RETURN
END
C
C***********************************************************************
C
SUBROUTINE FIXSYM(LBUF,IBUF,IC,IL,LFIRST,LFUSES,IBLOW,IPROD,LFIX
1 ,TITLE,LPROD)
C THIS SUBROUTINE EVALUATES THE FIXED SYMBOLS FOUND IN THE
C PAL16X4 AND PAL16A4
IMPLICIT INTEGER (A-Z)
LOGICAL LBUF(20),LFUSES(32,64),LFIRST,LMATCH,LFIX,LPROD(80)
CHARACTER A,B,ISLASH,IOR,IBLANK,IRIGHT,TITLE(80)
1 ,IAND,N,Q,N0,N1,N2,N3,CI
2 ,ICOLON,IOP
3 ,TABLE(5,14),IBUF(8,20),FIXBUF(8)
CHARACTER IPAGE(80,200)
COMMON /PGE/ IPAGE
DATA A/'A'/,B/'B'/,ISLASH/'/'/,IOR/'+'/,IBLANK/' '/,IRIGHT/')'/,
1 IAND/'*'/,N/'N'/,Q/'Q'/,N0/'0'/,N1/'1'/,N2/'2'/,N3/'3'/,
2 ICOLON/':'/,
3 TABLE / ' ','A','+','/','B',' ',' ','A','+','B',
4 ' ',' ',' ',' ','A','/','A','+','/','B',' ',' ',' ','/','B',
5 'A',':','+',':','B',' ','A','*','/','B',' ','/','A','+','B',
6 'A',':','*',':','B',' ',' ',' ',' ','B',' ',' ','A','*','B',
7 ' ',' ',' ','/','A','/','A','*','/','B',' ','/','A','*','B'/
IINPUT=0
DO 20 I=1,8
IBUF(I,1)=IBLANK
20 FIXBUF(I)=IBLANK
21 CALL INCR(IC,IL,LFIX)
CI=IPAGE(IC,IL)
IF(CI.EQ.IRIGHT) GO TO 40
IF(CI.EQ.N0) IINPUT=8
IF(CI.EQ.N1) IINPUT=12
IF(CI.EQ.N2) IINPUT=16
IF(CI.EQ.N3) IINPUT=20
DO 24 J=1,7
24 IBUF(J,1)=IBUF(J+1,1)
IBUF(8,1)=CI
IF(.NOT. ( (CI.EQ.A).OR.(CI.EQ.B).OR.(CI.EQ.ISLASH).OR.(CI.EQ.IOR)
1 .OR.(CI.EQ.IAND).OR.(CI.EQ.ICOLON) ) ) GO TO 21
DO 30 I=1,4
30 FIXBUF(I)=FIXBUF(I+1)
FIXBUF(5)=IPAGE(IC,IL)
GO TO 21
40 IMATCH=0
DO 60 J=1,14
LMATCH=.TRUE.
DO 50 I=1,5
50 LMATCH=LMATCH .AND. ( FIXBUF(I).EQ.TABLE(I,J) )
60 IF(LMATCH) IMATCH=J
IF(IMATCH.EQ.0) GO TO 100
IF(.NOT.LFIRST) GO TO 85
LFIRST=.FALSE.
DO 80 I=1,32
LFUSES(I,IPROD)=.TRUE.
80 IBLOW = IBLOW + 1
C
85 DO 90 I=1,4
IF( (IMATCH-7).LE.0 ) GO TO 90
ISUM1=IINPUT+I
LFUSES(ISUM1,IPROD)=.FALSE.
IBLOW = IBLOW - 1
IMATCH=IMATCH-8
90 IMATCH=IMATCH+IMATCH
LBUF(1)=.TRUE.
CALL PLOT(LBUF,IBUF,LFUSES,IPROD,TITLE,.FALSE.,ITYPE,
1 LPROD,IOP,IBLOW,IPCTR)
100 LFIX=.FALSE.
CALL INCR(IC,IL,LFIX)
RETURN
END
C
C***********************************************************************
C
SUBROUTINE ECHO(IPAL,INOAI,IOT,INOO,REST,PATNUM,TITLE,COMP)
C THIS SUBROUTINE PRINTS THE PAL DESIGN SPECIFICATION INPUT FILE
IMPLICIT INTEGER (A-Z)
CHARACTER IPAL(4),IOT,INOAI,INOO
1, PATNUM(80),TITLE(80),COMP(80),REST(73)
CHARACTER IPAGE(80,200),IBLANK
COMMON /PGE/ IPAGE
COMMON /FTEST/ IFUNCT,IDESC,IEND
DATA IBLANK/' '/
WRITE(*,5) IPAL,INOAI,IOT,INOO,REST,PATNUM,TITLE,COMP
5 FORMAT(/,' ',4A1,A1,A1,A1,73A1,/,' ',80A1,/,' ',80A1,/,' ',80A1)
DO 20 IL=1,IEND
IC=81
10 IC=IC-1
IF( IPAGE(IC,IL).EQ.IBLANK.AND.IC.GT.1 ) GO TO 10
WRITE(*,15) (IPAGE(I,IL),I=1,IC)
15 FORMAT(' ',80A1)
20 CONTINUE
RETURN
END
C
C***********************************************************************
C
SUBROUTINE CAT
C THIS SUBROUTINE PRINTS THE PALASM CATOLOG
IMPLICIT INTEGER (A-Z)
WRITE(*,10)
10 FORMAT(/,' MONOLITHIC MEMORIES 20-PIN PALASM VERSION 1.6C')
WRITE(*,15)
15 FORMAT(' (C) COPYRIGHT 1983 MONOLITHIC MEMORIES')
WRITE(*,20)
20 FORMAT(/,' ECHO (E) - PRINTS THE PAL DESIGN',
4 ' SPECIFICATION',
5 /,' PINOUT (O) - PRINTS THE PINOUT OF THE PAL',
6 /,' SIMULATE (T) - EXERCISES THE FUNCTION TABLE',
7 ' VECTORS IN THE LOGIC',/,' ',
8 ' EQUATIONS AND GENERATES TEST VECTORS',
9 /,' PLOT (P) - PRINTS THE ENTIRE FUSE PLOT')
C
WRITE(*,30)
30 FORMAT(' BRIEF (B) - PRINTS ONLY THE USED PRODUCT LINES',
1 ' OF THE FUSE PLOT',/,' PHANTOM',
2 ' FUSES ARE OMITTED',
3 /,' SHORT (S) - GENERATES SHORT VERSION'
3 ' OF HEX PROGRAMMING FORMAT',
4 /,' HEX (H) - GENERATES HEX PROGRAMMING FORMAT',
5 /,' BHLF (L) - GENERATES BHLF PROGRAMMING FORMAT',
6 /,' BNPF (N) - GENERATES BNPF PROGRAMMING FORMAT',
7 /,' CATALOG (C) - PRINTS THE PALASM CATALOG',
8 /,' QUIT (Q) - EXIT1 PALASM',
A /,' FAULT (F) - FAULT TESTING ',
9 /,' JEDEC (J) - JEDEC FORMAT FOR DATA I/O PROGRAMMER',
B /,' INTEL (I) - INTEL HEX PROGRAMMING FORMAT')
RETURN
END
C
C***********************************************************************
C
SUBROUTINE PINOUT(IPAL,INOAI,IOT,INOO,TITLE)
C THIS SUBROUTINE PRINTS THE PINOUT OF THE PAL
IMPLICIT INTEGER (A-Z)
CHARACTER IBLANK,ISTAR,IPAL(4),IIN(7,2),IOT,INOAI
1 ,INOO,PIN(12,20)
2 ,TITLE(80)
CHARACTER IPAGE(80,200)
COMMON /PGE/ IPAGE
DATA IBLANK/' '/,ISTAR/'*'/
DO 10 J=1,20
DO 5 I=1,12
5 PIN(I,J)=IBLANK
10 CONTINUE
15 DO 25 J=1,2
DO 20 I=1,7
20 IIN(I,J)=IBLANK
25 CONTINUE
IIN(2,1)=IPAL(1)
IIN(4,1)=IPAL(2)
IIN(6,1)=IPAL(3)
IIN(1,2)=IPAL(4)
IIN(3,2)=INOAI
IIN(5,2)=IOT
IIN(7,2)=INOO
J=0
IL=0
30 IC=0
IL=IL+1
35 IC=IC+1
40 IF( IC.GT.80 ) GO TO 30
IF( IPAGE(IC,IL).EQ.IBLANK ) GO TO 35
J=J+1
IF(J.GT.20) GO TO 60
DO 55 I=1,12
PIN(I,J)=IPAGE(IC,IL)
IC=IC+1
IF( IC.GT.80 ) GO TO 40
IF( IPAGE(IC,IL).EQ.IBLANK ) GO TO 40
C
55 CONTINUE
60 DO 75 J=1,10
II=0
65 II=II+1
IF(II.EQ.13) GO TO 75
IF( PIN(II,J).NE.IBLANK ) GO TO 65
I=13
70 I=I-1
II=II-1
PIN(I,J)=PIN(II,J)
PIN(II,J)=IBLANK
IF(II.NE.1) GO TO 70
75 CONTINUE
WRITE(*,76) TITLE
76 FORMAT(/,' ',80A1)
WRITE(*,78) ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
1 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
2 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
3 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR
78 FORMAT(/,' ',18X,14A1,3X,14A1,
1 /,' ',18X,A1,13X,A1,1X,A1,13X,A1)
JJ=20
DO 88 J=1,10
WRITE(*,80) ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR
80 FORMAT(' ',15X,4A1,29X,4A1)
WRITE(*,81) (PIN(I,J),I=1,12),ISTAR,J,ISTAR,
1 (IIN(I,1),I=1,7),ISTAR,JJ,ISTAR,(PIN(I,JJ),I=1,12)
81 FORMAT(' ',12A1,3X,A1,I2,A1,11X,7A1,11X,A1,I2,A1,3X,12A1)
WRITE(*,82) ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR
82 FORMAT(' ',15X,4A1,29X,4A1)
WRITE(*,84) ISTAR,(IIN(I,2),I=1,7),ISTAR
84 FORMAT(' ',18X,A1,11X,7A1,11X,A1)
DO 86 II=1,2
DO 85 I=1,7
85 IIN(I,II)=IBLANK
86 CONTINUE
JJ=JJ-1
88 CONTINUE
WRITE(*,90) ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
1 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
2 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,
3 ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR,ISTAR
90 FORMAT(' ',18X,31A1)
RETURN
END
C
C***********************************************************************
C
SUBROUTINE PLOT(LBUF,IBUF,LFUSES,IPROD,TITLE,LDUMP,ITYPE,
1 LPROD,IOP,IBLOW,IPCTR0)
C THIS THIS SUBROUTINE PRODUCES THE FUSE PLOT
IMPLICIT INTEGER (A-Z)
CHARACTER ISAVE(64,32),IAND,IOR,ISLASH,IBUF(8,20),IOUT(64),IOP
1 ,IDASH,X,IBLANK,P,B
2 ,HIFANT
C
3 ,TITLE(80)
LOGICAL LBUF(20),LFUSES(32,64),LDUMP,LPROD(80)
DATA ISAVE/2048*' '/,IAND/'*'/,IOR/'+'/,ISLASH/'/'/,
1 IDASH/'-'/,X/'X'/,IBLANK/' '/,P/'P'/,B/'B'/,
2 HIFANT/'O'/
IF(LDUMP) GO TO 60
IF(ISAVE(IPROD,1).NE.IBLANK) RETURN
IF( LBUF(1) ) GO TO 5
DO 30 J=1,31
30 ISAVE(IPROD,J)=ISAVE(IPROD,J+1)
ISAVE(IPROD,32)=ISLASH
5 DO 20 I=1,8
IF( ISAVE(IPROD,1).NE.IBLANK ) RETURN
IF( IBUF(I,1).EQ.IBLANK ) GO TO 20
DO 10 J=1,31
10 ISAVE(IPROD,J)=ISAVE(IPROD,J+1)
ISAVE(IPROD,32)=IBUF(I,1)
20 CONTINUE
IF(ISAVE(IPROD,1).NE.IBLANK) RETURN
40 DO 50 J=1,31
50 ISAVE(IPROD,J)=ISAVE(IPROD,J+1)
ISAVE(IPROD,32)=IAND
RETURN
C PRINT FUSE PLOT
60 WRITE(*,62) TITLE
62 FORMAT(/,' ',80A1,//,
1 ' 11 1111 1111 2222 2222 2233',/,
2 ' 0123 4567 8901 2345 6789 0123 4567 8901',/)
DO 100 I88PRO=1,57,8
DO 94 I8PRO=1,8
IPROD=I88PRO+I8PRO-1
ISAVE(IPROD,32)=IBLANK
DO 70 I=1,32
IF( ISAVE(IPROD,1).NE.IBLANK ) GO TO 70
DO 65 J=1,31
ISAVE(IPROD,J)=ISAVE(IPROD,J+1)
65 CONTINUE
ISAVE(IPROD,32)=IBLANK
70 CONTINUE
DO 80 I=1,32
IOUT(I)=X
IF( LFUSES(I,IPROD) ) IOUT(I)=IDASH
IOUT(I+32)=ISAVE(IPROD,I)
80 CONTINUE
IF(ITYPE.LE.4) CALL FANTOM(ITYPE,IOUT,IPROD,I8PRO)
IPROD=IPROD-1
DO 85 J=1,32
IF( IOP.EQ.B.AND.IOUT(J).EQ.HIFANT ) IOUT(J)=IBLANK
85 CONTINUE
IF( (IOP.EQ.P).OR.(IOP.EQ.B.AND.(LPROD(IPROD+1))) )
1 WRITE(*,90) IPROD,IOUT
90 FORMAT(' ',I2,8(' ',4A1),' ',32A1)
94 CONTINUE
WRITE(*,96)
C
96 FORMAT(1X)
100 CONTINUE
WRITE(*,110)
110 FORMAT(/,
1' LEGEND: X : FUSE NOT BLOWN (L,N,0) - : FUSE BLOWN (H,P,1)')
IF( IOP.EQ.P.AND.ITYPE.LE.4 ) WRITE(*,111)
111 FORMAT(
1' 0 : PHANTOM FUSE (L,N,0) O : PHANTOM FUSE (H,P,1)')
WRITE(*,112) IBLOW
112 FORMAT(/,' NUMBER OF FUSES BLOWN = ',I4)
RETURN
END
C
C***********************************************************************
C
SUBROUTINE HEX(LFUSES,IOP)
C THIS SUBROUTINE GENERATES HEX PROGRAMMING FORMATS
IMPLICIT INTEGER (A-Z)
LOGICAL LFUSES(32,64)
INTEGER SOH,STX,ETX,BEL
CHARACTER ZTABLE(16),H,S,IBLANK,IOP,ITEMP(64),ZCSUM(4)
DATA H/'H'/,S/'S'/,IBLANK/' '/,
1 ZTABLE/'0','1','2','3','4','5','6','7',
2 '8','9','A','B','C','D','E','F'/
DATA SOH/001/,STX/002/,ETX/003/,BEL/007/
CSUM=0
IF(IOP.EQ.H) WRITE(*,10)
10 FORMAT(//,' .',//)
C***** NOTE: SOME PROM PROGRAMMERS NEED A START CHARACTER.
C***** THIS PROGRAM OUTPUTS AN STX FOR THE DATA I/O MODEL 9
C***** (USE SOH FOR MODEL 5)