SELECT state.cycle
FROM
1 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
setMode => m ← [getNextMacro: TRUE];
sglUnCom, sglUnAlu, sglUnCvt => m ← NoOpMicro;
dblUnCom, dblUnAlu, dblUnCvt,
sglBiCom, sglBiAlu, sglBiMult => m ← [
getNextMacro: FALSE,
xBSource: pc,
bReg: [ s, minus1 ],
xASource: fpLdAMsw,
euPBusCmd: StoreFP ];
dblBiCom, dblBiAlu, dblBiMult => m ← [
getNextMacro: FALSE,
xBSource: pc,
bReg: [ s, minus1 ],
xASource: fpLdBMsw,
euPBusCmd: StoreFP ];
ENDCASE => Dragon.Assert[FALSE];
2 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
sglUnCom, sglUnAlu, sglUnCvt,
dblUnCom, dblUnAlu, dblUnCvt,
sglBiCom, sglBiAlu, sglBiMult => m ← NoOpMicro;
dblBiCom, dblBiAlu, dblBiMult => m ← [
getNextMacro: FALSE,
xBSource: pc,
bReg: [ s, minus2 ],
xASource: fpLdALsw,
euPBusCmd: StoreFP ];
ENDCASE => Dragon.Assert[FALSE];
3 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
sglUnCom, sglUnAlu, sglUnCvt,
dblUnCom, dblUnAlu, dblUnCvt,
sglBiCom, sglBiAlu, sglBiMult => m ← NoOpMicro;
dblBiCom, dblBiAlu, dblBiMult => m ← [
getNextMacro: FALSE,
xBSource: pc,
bReg: [ s, minus3 ],
xASource: fpLdAMsw,
euPBusCmd: StoreFP ];
ENDCASE => Dragon.Assert[FALSE];
4 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
sglUnCom => m ← [
getNextMacro: TRUE,
deltaS: -1,
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
sglUnAlu => m ← [
getNextMacro: TRUE,
cReg: [ s, zero ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
sglUnCvt => m ← [
getNextMacro: FALSE,
xBSource: pc,
cReg: [ s, zero ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblUnCom, dblUnAlu, dblUnCvt,
sglBiCom, sglBiAlu, sglBiMult,
dblBiCom, dblBiAlu, dblBiMult => m ← NoOpMicro;
ENDCASE => Dragon.Assert[FALSE];
5 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
sglUnCvt => m ← [
getNextMacro: TRUE,
deltaS: +1,
cReg: [ s, one ],
xASource: fpUnldLsw,
euPBusCmd: FetchFPAlu ];
dblUnCom, sglBiCom => m ← [
getNextMacro: TRUE,
deltaS: -2,
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblUnAlu => m ← [
getNextMacro: FALSE,
xBSource: pc,
cReg: [ s, minus1 ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblUnCvt, sglBiAlu => m ← [
getNextMacro: TRUE,
deltaS: -1,
cReg: [ s, minus1 ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
sglBiMult => m ← [
getNextMacro: TRUE,
deltaS: -1,
cReg: [ s, minus1 ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPMult ];
dblBiCom, dblBiAlu, dblBiMult => m ← NoOpMicro;
ENDCASE => Dragon.Assert[FALSE];
6 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
dblUnAlu => m ← [
getNextMacro: TRUE,
cReg: [ s, zero ],
xASource: fpUnldLsw,
euPBusCmd: FetchFPAlu ];
dblBiCom, dblBiAlu, dblBiMult => m ← NoOpMicro;
ENDCASE => Dragon.Assert[FALSE];
7 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
dblBiCom => m ← [
getNextMacro: FALSE,
xBSource: pc,
deltaS: -2, -- Two more left for next cycle
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblBiAlu => m ← [
getNextMacro: FALSE,
xBSource: pc,
cReg: [ s, minus3 ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblBiMult => m ← NoOpMicro;
ENDCASE => Dragon.Assert[FALSE];
8 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
dblBiCom => m ← [
getNextMacro: TRUE,
deltaS: -2, -- Last two
xASource: fpUnldMsw,
euPBusCmd: FetchFPAlu ];
dblBiAlu => m ← [
getNextMacro: TRUE,
deltaS: -2,
cReg: [ s, minus2 ],
xASource: fpUnldLsw,
euPBusCmd: FetchFPAlu ];
dblBiMult => m ← [
getNextMacro: FALSE,
xBSource: pc,
cReg: [ s, minus3 ],
xASource: fpUnldMsw,
euPBusCmd: FetchFPMult ];
ENDCASE => Dragon.Assert[FALSE];
9 =>
SELECT DragonFP.GetFPOpType[alpha]
FROM
dblBiMult => m ← [
getNextMacro: TRUE,
deltaS: -2,
cReg: [ s, minus2 ],
xASource: fpUnldLsw,
euPBusCmd: FetchFPMult ];
ENDCASE => Dragon.Assert[FALSE];
ENDCASE => Dragon.Assert[ FALSE, "Unimplemented Dragon microcode" ] };