PWPLA.mesa
Copyright c 1984, 1985, 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Monier, February 28, 1985 12:13:16 pm PST
Bertrand Serlet June 17, 1986 5:56:43 pm PDT
Make a PLA module. Borrowed more than heavily from Bob Mayo's code.
DIRECTORY BoolOps, CD, PW;
PWPLA: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE = PW.ROPE;
ProgTile: TYPE = REF ProgTileRec;
ProgTileRec: TYPE = ARRAY BOOL --and plane-- OF
ARRAY BOOL --upper row-- OF
ARRAY BOOL -- left col-- OF
ARRAY BoolOps.TruthBit --bit-- OF CD.Object;
AllTiles: TYPE = REF AllTilesRec;
AllTilesRec: TYPE = RECORD[
rowTab: ProgTile, -- set of core tiles arranged in an array
-- tiles outside of the core of the PLA, and extra tiles in the core
Aul, AUleft, ADleft, All, ALtop, ARtop, ALbot, ARbot, AHleft, ALH, ARH, AHV, AVtop, AUV, ADV, AVbot, Btop, BU, BD, BH, Bbot, OLtop, ORtop, Our, OUright, ODright, Olr, ORbot, OLbot, OVtop, OUV, ODV, OHV, OVbot, OLH, ORH, OHright,
-- major tiles in the core of the PLA
AUL1, AUL0, AULx, AUR1, AUR0, AURx, ADL1, ADL0, ADLx, ADR1, ADR0, ADRx, OUL1, OUL0, OUR1, OUR0, ODL1, ODL0, ODR1, ODR0: CD.Object ← NIL];
-- The good old PLA
PLADescription: TYPE = REF PLADescriptionRec;
PLADescriptionRec: TYPE = RECORD [
truthTableFile: ROPENIL,
truthTable: BoolOps.TruthTable ← NIL,
tileSet: ROPENIL,
optimize: BOOLFALSE,
haveHorizontalExtras, haveVerticalAndExtras, haveVerticalOrExtras: BOOLFALSE,
extraRows, extraAndColumns, extraOrColumns: INTINT.LAST-100, -- SPACING (in number of minterms) between extra ground rows and columns; large => no extra
printRows: INT ← 5, -- If PLA has more than this many rows, list them on the screen.
dumpFile: ROPENIL, -- if non-NIL then truth table (after optimization) -> dumpFile.
inputNames, outputNames: LIST OF ROPENIL -- every input and output MUST be named
];
-- create a PLA from a file description
CreatePLAFromFile: PUBLIC PROC [fileName: ROPE] RETURNS [pla: CD.Object];
-- create a PLA from a record
CreatePLA: PROC [desc: PLADescription, allTiles: AllTiles] RETURNS [pla: CD.Object];
END.