IFUPLAMainPipeControl.mesa
Copyright c 1984 by Xerox Corporation. All rights reserved.
Last edited by McCreight, June 6, 1986 5:43:43 pm PDT
Last edited by Curry, September 14, 1986 2:28:18 pm PDT
Don Curry March 9, 1987 5:04:14 pm PST
IFUPLAMainPipeControl: CEDAR DEFINITIONS =
BEGIN
MainPipeControlIn: TYPE = RECORD [ -- default must be zero
PhB latched inputs
reset:      BOOLFALSE,
dPReject:     BOOLFALSE,
dPFaulting:    BOOLFALSE,
protMicroCycle:   BOOLFALSE,
microExcptJmpBubble: BOOLFALSE,   -- feedback
stage2BAbort:   BOOLFALSE,   -- feedback
stage1BHold:    BOOLFALSE,
condEffect1:    CondEffect ← VAL[0], -- for detecting bubble in 1B
condEffect2:    CondEffect ← VAL[0],
eUCondition2:   BOOLFALSE,
trapsEnabled2:   BOOLFALSE,
eStkOverflow2:   BOOLFALSE,
instStarting2:    BOOLFALSE,
reschedule:    BOOLFALSE,
rschWaitingIn:   BOOLFALSE,
push2:     BOOLFALSE,
instFault2:    BOOLFALSE,
iStkNearlyFull:   BOOLFALSE,
PhA latched inputs
rschClearIn:    BOOLFALSE ]; -- from output
MainPipeControlOut: TYPE = RECORD [
PhB latched outputs
stage2A:     NormalBubble ← normal,
stage3A:     NormalAbort  ← normal,
loadStage1:    BOOL    ← FALSE,
loadStage2:    BOOL    ← FALSE,
loadStage3:    BOOL    ← FALSE,
PhA latched outputs
stage1BHolding:   BOOL    ← FALSE,
notBcLoadStage1:  BOOL    ← FALSE,  -- really just stage1BHolding again
stage2B:     NormalAbort  ← normal, -- to input next phase (abort)
stage3BCPipe:   NormalAbort  ← normal,
microExcptJmp:   MicroExcptJmp ← none,  -- to input next phase (bubble)
except:     Exception   ← [specialCode, none],
rschClear:    BOOL    ← FALSE,  -- to input same phase
rschWaiting:    BOOL    ← FALSE ]; -- to input next phase
NormalBubble: TYPE = MACHINE DEPENDENT {normal(0), bubble(1)};
NormalAbort:  TYPE = MACHINE DEPENDENT {normal(0), abort(1)};
CondEffect: TYPE = MACHINE DEPENDENT {macroTrap(0), macroJump, microJump, bubble(3)};
fixedMicroJump: [0..256) = 48;
MicroExcptJmp: TYPE = MACHINE DEPENDENT {
none(0),   -- microcycle = CurrentCycle MOD 128
bubble(3),  -- microcycle = CurrentCycle MOD 128 + 128
microJump(5), -- microcycle = 48 = fixedMicroJump
resetting(9),  -- microcycle = 112
trap(17),   -- microcycle = 116
cJump(33)};  -- microcycle = 120
Exception: TYPE = RECORD
[type: ExceptType, code: ExceptCode ← none]; -- for Trap PC generator
ExceptType: TYPE = MACHINE DEPENDENT {specialCode(0), condCode(3), dpFault(5)};
ExceptCode: TYPE = MACHINE DEPENDENT {
none   (0),
ipFault  (1),
bubble  (2),
cJump  (3),
reseting  (6),
reset   (7),
iStkOFlow (8),
eStkOFlow (9),
rschlWait  (0AH),
trapCycle1 (0BH)};
A decoded enumerated type can be used to directly generate multiplex controls.
The type can be coded as {0, 1} or {0, 1, 2, 4, 8 ...} or {0, 3, 5, 9, 17 ...}.
The first and last cases have the advantage that zero can be used a default multiplex control (lsb = 0 => no other bit is true).
In all cases it's possible to name the bits and/or their inverses using the enumerated type element names.
END.