CachePInterfacePPads.Mesa
created by RoseTranslate from CachePInterfacePPads.Rose of January 29, 1985 9:29:35 pm PST for curry.pa at January 29, 1985 9:34:05 pm PST
DIRECTORY
RoseTypes, RoseCreate, Dragon;
CachePInterfacePPads: CEDAR PROGRAM
IMPORTS RoseCreate, Dragon =
BEGIN OPEN
RoseTypes, Dragon;
Signal Type decls
PBusCommands: TYPE = Dragon.PBusCommands;
PBusFaults: TYPE = Dragon.PBusFaults;
RegisterCells: PROC =
BEGIN
[] ← RoseCreate.RegisterCellType[name: "PPads",
expandProc: NIL,
ioCreator: CreatePPadsIO, initializer: NIL,
evals: [EvalSimple: PPadsEvalSimple],
blackBox: NIL, stateToo: NIL,
ports: CreatePPadsPorts[],
drivePrototype: NEW [PPadsDrive]];
END;
otherss: SymbolTable ← RoseCreate.GetOtherss["CachePInterfacePPads.pass"];
CreatePPadsPorts: PROC RETURNS [ports: Ports] = {ports ← RoseCreate.PortsFromFile["CachePInterfacePPads.PPads.rosePorts"]};
PPadsIORef: TYPE = REF PPadsIORec;
PPadsIORec: TYPE = MACHINE DEPENDENT RECORD [
fill0(0:0..14): [0..32767],
Vdd(0:15..15): BOOLEAN,
fill1(1:0..14): [0..32767],
Gnd(1:15..15): BOOLEAN,
fill2(2:0..14): [0..32767],
PadVdd(2:15..15): BOOLEAN,
fill3(3:0..14): [0..32767],
PadGnd(3:15..15): BOOLEAN,
PData(4:0..31): ARRAY [0..2) OF CARDINAL,
fill5(6:0..14): [0..32767],
PParityB(6:15..15): BOOLEAN,
fill6(7:0..11): [0..4095],
PCmdA(7:12..15): PBusCommands,
fill7(8:0..14): [0..32767],
PRejectB(8:15..15): BOOLEAN,
fill8(9:0..11): [0..4095],
PFaultB(9:12..15): PBusFaults,
fill9(10:0..14): [0..32767],
PNPError(10:15..15): BOOLEAN,
PDataI(11:0..31): ARRAY [0..2) OF CARDINAL,
fill11(13:0..14): [0..32767],
PParityI(13:15..15): BOOLEAN,
fill12(14:0..14): [0..32767],
DrivePDataB(14:15..15): BOOLEAN,
fill13(15:0..14): [0..32767],
DrivePDataI(15:15..15): BOOLEAN,
fill14(16:0..11): [0..4095],
PCmdI(16:12..15): PBusCommands,
fill15(17:0..14): [0..32767],
PRejectDriveHigh(17:15..15): BOOLEAN,
fill16(18:0..14): [0..32767],
PRejectDriveLow(18:15..15): BOOLEAN,
fill17(19:0..14): [0..32767],
PFaultDrive(19:15..15): BOOLEAN,
fill18(20:0..11): [0..4095],
PFaultI(20:12..15): PBusFaults,
fill19(21:0..14): [0..32767],
PNPErrorDriveLow(21:15..15): BOOLEAN];
port indices:
PPadsDrive: TYPE = MACHINE DEPENDENT RECORD [
fill0(0:0..14): [0 .. 32768),
Vdd(0:15..15): BOOLEAN,
fill1(1:0..14): [0 .. 32768),
Gnd(1:15..15): BOOLEAN,
fill2(2:0..14): [0 .. 32768),
PadVdd(2:15..15): BOOLEAN,
fill3(3:0..14): [0 .. 32768),
PadGnd(3:15..15): BOOLEAN,
fill4(4:0..14): [0 .. 32768),
PData(4:15..15): BOOLEAN,
fill5(5:0..14): [0 .. 32768),
PParityB(5:15..15): BOOLEAN,
fill6(6:0..14): [0 .. 32768),
PCmdA(6:15..15): BOOLEAN,
fill7(7:0..14): [0 .. 32768),
PRejectB(7:15..15): BOOLEAN,
fill8(8:0..14): [0 .. 32768),
PFaultB(8:15..15): BOOLEAN,
fill9(9:0..14): [0 .. 32768),
PNPError(9:15..15): BOOLEAN,
fill10(10:0..14): [0 .. 32768),
PDataI(10:15..15): BOOLEAN,
fill11(11:0..14): [0 .. 32768),
PParityI(11:15..15): BOOLEAN,
fill12(12:0..14): [0 .. 32768),
DrivePDataB(12:15..15): BOOLEAN,
fill13(13:0..14): [0 .. 32768),
DrivePDataI(13:15..15): BOOLEAN,
fill14(14:0..14): [0 .. 32768),
PCmdI(14:15..15): BOOLEAN,
fill15(15:0..14): [0 .. 32768),
PRejectDriveHigh(15:15..15): BOOLEAN,
fill16(16:0..14): [0 .. 32768),
PRejectDriveLow(16:15..15): BOOLEAN,
fill17(17:0..14): [0 .. 32768),
PFaultDrive(17:15..15): BOOLEAN,
fill18(18:0..14): [0 .. 32768),
PFaultI(18:15..15): BOOLEAN,
fill19(19:0..14): [0 .. 32768),
PNPErrorDriveLow(19:15..15): BOOLEAN];
CreatePPadsIO: PROC [cell: Cell] --IOCreator-- = {
cell.realCellStuff.newIO ← NEW [PPadsIORec];
cell.realCellStuff.oldIO ← NEW [PPadsIORec];
};
PPadsEvalSimple: CellProc =
BEGIN
newIO: PPadsIORef ← NARROW[cell.realCellStuff.newIO];
BEGIN OPEN newIO;
Assert[NOT MoreThanOneOf[DrivePDataB, DrivePDataI]];
PCmdI ← PCmdA;
IF PRejectDriveHigh THEN PRejectB ← TRUE;
IF PRejectDriveLow THEN PRejectB ← FALSE;
IF PFaultDrive THEN PFaultB ← PFaultI;
IF PNPErrorDriveLow THEN PNPError ← FALSE;
IF DrivePDataB THEN {
PData ← PDataI;
PParityB ← PParityI;
};
IF DrivePDataI THEN {
PDataI ← PData;
PParityI ← PParityB;
};
END;
END;
RegisterCells[];
END.