Regs:
PROC
RETURNS [regs:
PW.ObPtr] =
BEGIN
regD: EUtils.RegDescr;
listOb: PW.ListOb ← NIL;
genericCtrl, ctrl, kBusAB, field, fd, dp: PW.ObPtr;
-- The 4 inverters for DStateAddress, 8 inverters for EUAluLeftSrc1BA, EUAluRightSrc1BA, EUStore2ASrc1BA, EUSt3AisCBus2BA and EURes3AisCBus2BA, then 13 inverters for the fd, 5 for EUAluOp2AB, 1 for EUWriteToPBus3AB, and 1 for EURes3BisPBus3AB
regscdpd ← EmptyDescrRegsPD[];
regscdpu ← EmptyDescrRegsPU[];
PWDescr.SetInt[regscdpd, "DStateAddress", PWDescr.allOnes];
PWDescr.SetInt[regscdpd, "EUAluLeftSrc1BA", PWDescr.allOnes];
PWDescr.SetInt[regscdpd, "EUAluRightSrc1BA", PWDescr.allOnes];
PWDescr.SetInt[regscdpd, "EUStore2ASrc1BA", PWDescr.allOnes];
PWDescr.SetBool[regscdpd, "EUSt3AisCBus2BA", TRUE];
PWDescr.SetBool[regscdpd, "EURes3AisCBus2BA", TRUE];
PWDescr.SetBool[regscdpd, "FDInsert", TRUE];
PWDescr.SetInt[regscdpd, "FDMask", PWDescr.allOnes];
PWDescr.SetInt[regscdpd, "FDShift", PWDescr.allOnes];
PWDescr.SetInt[regscdpd, "EUAluOp2AB", PWDescr.allOnes];
PWDescr.SetBool[regscdpd, "EUWriteToPBus3AB", TRUE];
PWDescr.SetBool[regscdpd, "EURes3BisPBus3AB", TRUE];
listOb ← CONS[EuControl.Inverters[design, regscdpd, regscdpu, TRUE], listOb];
-- The 2 nand decoders for fd
regscdpd ← EmptyDescrRegsPD[];
regscdpu ← EmptyDescrRamPU[];
PWDescr.SetBit[regscdpu, "nPhB", TRUE];
PWDescr.SetBit[regscdpu, "Vbias", TRUE];
PWDescr.SetBit[regscdpd, "PhA", TRUE];
PWDescr.SetInt[regscdpd, "EUAluOp2AB", fop]; -- EUAluOp2AB=FOP
listOb ← CONS[EuControl.Nand[design, regscdpd, regscdpu], listOb];
PWDescr.SetInt[regscdpd, "EUAluOp2AB", fopk]; -- EUAluOp2AB=FOPK
listOb ← CONS[EuControl.Nand[design, regscdpd, regscdpu, TRUE], listOb];
PWDescr.SetInt[regscdpd, "EUAluOp2AB", 0, 0]; -- clean-up
-- The 2 nand decoders for field and kBusAB (reject???)
-- just PhA.nrejectBA for kBusAB
PWDescr.SetBit[regscdpd, "nrejectBA", TRUE];
PWDescr.SetBit[regscdpd, "nhold2BA", TRUE];
listOb ← CONS[EuControl.Nand[design, regscdpd, regscdpu], listOb];
PWDescr.SetBit[regscdpd, "EULoadField3BA", TRUE]; -- for field
genericCtrl ← EuControl.Nand[design, regscdpd, regscdpu, TRUE];
listOb ← CONS[genericCtrl, listOb];
PWDescr.SetBit[regscdpd, "nrejectBA", FALSE];
PWDescr.SetBit[regscdpd, "nhold2BA", FALSE];
ctrl ← PW.AbutListY[design, listOb];
-- Generate the three registers
regD ← NEW[EUtils.RegDescrRec ← [inListOb: LIST["k"], out: "opL"]];
kBusAB ← EUtils.MakeRegDP[design, regD];
regD ← NEW[EUtils.RegDescrRec ← [inListOb: LIST["c"], out: "opR", interruptBuses: LIST["opLBus", "opRBus", "downBus"]]];
field ← EUtils.MakeRegDP[design, regD];
regD ← NEW[EUtils.RegDescrRec ← [inListOb: LIST["opL", "opR"], out: "down"]];
fd ← EUtils.MakeRegDP[design, regD];
dp ← PW.AbutY[design, field, kBusAB, fd];
regs ← EUtils.Assemble[design, ctrl, dp];
END;