IFUInstrDecode.rose
Herrmann, September 12, 1985 11:32:44 am PDT
Curry, September 8, 1985 1:09:18 pm PDT
McCreight, February 26, 1986 11:24:34 am PST
Copyright © 1984 by Xerox Corporation. All rights reserved.
Last edited by: McCreight, September 11, 1984 5:58:58 pm PDT
Last edited by: Curry, January 15, 1985 11:56:04 am PST
Directory Dragon, DragOpsCross;
TranslationNeeds Dragon, IFUPLAInstrDecode;
Imports IFUPLAInstrDecode;
CELLTYPE "InstrDecode"
PORTS [
MicroCycleAB    < INT[8],
InstReadyAB    < BOOL,
OpAB      < INT[8],
AlphaAB     < INT[8],
BetaAB      < INT[8],
PushPendingAB   < BOOL,
PopPendingAB    < BOOL,
UserMode0AB    < BOOL,
GetNextInstBA    > BOOL,
MacroJumpBA    > BOOL,
InstStarting0BA    > BOOL,
MicroCycleNextBA   > EnumType["IFUPLAInstrDecode.MicroCycleNext"],
PCNextBA     > EnumType["IFUPLAInstrDecode.PCNext"],
PCBusSrcB    > EnumType["IFUPLAInstrDecode.PCBusSrc"],
PCPipeSrcBA   > EnumType["IFUPLAInstrDecode.PCPipeSrc"],
Push0BA      > BOOL,
Pop0BA     > BOOL,
X1ASrcStackBA   > BOOL,
X1ADstStackBA   > BOOL,
XBusStackEldestBA  > BOOL,
XBusStackLBA   > BOOL,
X1ASrcSLimitAc   > BOOL,
X1ADstSLimitAc   > BOOL,
X2ASrcStatusBA   > BOOL,
X1ADstStatusBA   > BOOL,
ASourceLtBA    > EnumType["IFUPLAInstrDecode.ABCSourceLt"],
ASourceRtBA    > EnumType["IFUPLAInstrDecode.ABCSourceRt"],
ASourceOffBA   > EnumType["IFUPLAInstrDecode.PlusOffset"],
BSourceLtBA    > EnumType["IFUPLAInstrDecode.ABCSourceLt"],
BSourceRtBA    > EnumType["IFUPLAInstrDecode.ABCSourceRt"],
BSourceOffBA   > EnumType["IFUPLAInstrDecode.PlusOffset"],
CSourceLtBA    > EnumType["IFUPLAInstrDecode.ABCSourceLt"],
CSourceRtBA    > EnumType["IFUPLAInstrDecode.ABCSourceRt"],
CSourceOffBA   > EnumType["IFUPLAInstrDecode.MinusOffset"],
C0IsFieldCtlBA   > BOOL,
LSourceLtBA    > EnumType["IFUPLAInstrDecode.LSourceLt"],
LSourceRtBA    > EnumType["IFUPLAInstrDecode.LSourceRt"],
SSourceLtBA    > EnumType["IFUPLAInstrDecode.SSourceLt"],
SSourceRtBA    > EnumType["IFUPLAInstrDecode.SSourceRt"],
PopSa0BA     > BOOL,
PopSb0BA     > BOOL,
PushSc0BA     > BOOL,
X2ALitSourceBA   > EnumType["IFUPLAInstrDecode.X2ALitSource"],
KIsRtOp0BA    > BOOL,
FCtlIsRtOp0BA   > BOOL,
EUAluOp0BA    > EnumType["Dragon.ALUOps"],
EUCondSel0BA   > EnumType["Dragon.CondSelects"],
EUCondEffect0BA   > EnumType["IFUPLAInstrDecode.CondEffect"],
DPCmnd0BA    > EnumType["Dragon.PBusCommands"],
DPCmndRd0BA    > BOOL,
ClearTrapsEnbledBA  > BOOL,
ClearUserModeBA  > BOOL,
KPadsIn0BA    > BOOL,
X2ASrcLit0BA    > BOOL, -- derived
PhA      < BOOL,
PhB      < BOOL ]
State
nextMacroBA:   IFUPLAInstrDecode.NextMacro,
preEUAluOp0BA:  Dragon.ALUOps,
aluOpIs47BA:   BOOL,
preEUCondSel0BA:  Dragon.CondSelects,
condSelIsOp57BA:  BOOL,
preDPCmnd0BA:   Dragon.PBusCommands,
preDPCmndSel0BA:  IFUPLAInstrDecode.DPCmndSel,
x1ASrcSLimitBA:  BOOL,
x1ADstSLimitBA:  BOOL,
phALast:     BOOL
EvalSimple
IF PhA THEN {
PCBusSrcB ← offSetPC; -- precharge
phALast ← TRUE};
IF PhB AND phALast THEN {
[ [
nextMacro:   nextMacroBA,
macroJump:   MacroJumpBA,
microCycleNext:  MicroCycleNextBA,
pcNext:    PCNextBA,
pcBusSrc:    PCBusSrcB,
pcPipeSrc:   PCPipeSrcBA,
kPadsIn:    KPadsIn0BA,
push:     Push0BA,
pop:     Pop0BA,
x1ASrcSLimit:  x1ASrcSLimitBA,
x2ASrcStatus:   X2ASrcStatusBA,
x1ASrcStack:   X1ASrcStackBA,
x1ADstSLimit:  x1ADstSLimitBA,
x1ADstStatus:  X1ADstStatusBA,
x1ADstStack:   X1ADstStackBA,
xBusStackEldest:  XBusStackEldestBA,
xBusStackL:   XBusStackLBA,
aReg:     [ASourceLtBA, ASourceRtBA, ASourceOffBA],
bReg:     [BSourceLtBA, BSourceRtBA, BSourceOffBA],
cReg:     [CSourceLtBA, CSourceRtBA, CSourceOffBA],
cRegIsField:   C0IsFieldCtlBA,
lSource:    [LSourceLtBA, LSourceRtBA],
sSource:    [SSourceLtBA, SSourceRtBA],
popSa:     PopSa0BA,
popSb:    PopSb0BA,
pushSc:    PushSc0BA,
x2ALitSource:  X2ALitSourceBA,
kIsRtOp:    KIsRtOp0BA,
fCtlIsRtOp:   FCtlIsRtOp0BA,
aluOp:    preEUAluOp0BA,
aluOpIsOp47:   aluOpIs47BA,
condSel:    preEUCondSel0BA,
condSelIsOp57:  condSelIsOp57BA,
condEffect:   EUCondEffect0BA,
dpCmnd:    preDPCmnd0BA,
dpCmndIsRd:   DPCmndRd0BA,
dpCmndSel:   preDPCmndSel0BA,
clearTrapsEnbled: ClearTrapsEnbledBA,
clearUserMode:  ClearUserModeBA
] ] ← IFUPLAInstrDecode.InstrDecodeProc[ [
state:    MicroCycleAB,
instReady:  InstReadyAB,
op:    DragOpsCross.Inst[VAL[OpAB]],
alpha:    AlphaAB,
beta:    BetaAB,
pushPending: PushPendingAB,
popPending:  PopPendingAB,
userMode:  UserMode0AB ] ];
DPCmnd0BA ← SELECT preDPCmndSel0BA FROM
beta  => LOOPHOLE[BetaAB],
ENDCASE => preDPCmnd0BA;
EUAluOp0BA ← IF aluOpIs47BA
THENLOOPHOLE[OpAB MOD 16] ELSE preEUAluOp0BA;
EUCondSel0BA ← IF condSelIsOp57BA
THENLOOPHOLE[OpAB MOD 8] ELSE preEUCondSel0BA;
X2ASrcLit0BA ← X2ALitSourceBA # none;
GetNextInstBA ← nextMacroBA=get;
InstStarting0BA ← MicroCycleAB=0;
phALast ← FALSE;
};
X1ASrcSLimitAc ← PhA AND x1ASrcSLimitBA;
X1ADstSLimitAc ← PhA AND x1ADstSLimitBA;
ENDCELLTYPE