field: Dragon.HexWord, -- aliased with RAM[fieldAdr]. Any write is performed in all physical locations under control of writeFieldBA (from the RAM). External read is from the RAM.
kBusAB: Dragon.HexWord -- a temporary latch to hold ConstBus during one phase
EvalSimple
fd: DragOpsCross.FieldDescriptor;
IF PhA AND NOT rejectBA THEN {
IF writeFieldBA THEN field ← LFD[cBus]; --same thing happens in the RAM
kBusAB ← LFD[ConstBus];
};
IF PhB THEN { -- control signals fired during PhB
fd ← DragOpsCrossUtils.CardToFieldDescriptor[(IF EUAluOpAB = FOPK THEN kBusAB ELSE field) MOD 65536];
insert ← fd.insert;
fdshift ← fd.shift;
fdmask ← fd.mask;
};
ENDCELL;
FUMaskGen: CELL [
Width
width < INT[6],
Mask
mask > INT[32],
Timing and housekeeping interface
PhA, PhB<BOOL,
ResetAB<BOOL,
Vdd, Gnd, PadVdd, PadGnd<BOOL
]
EvalSimple
No problem of range: width is properly typed. Tested by interp.
mask ← BitOps.doubleMasks[width]; -- a cloud of zeros followed by "width" ones
ENDCELL;
FUShifter: CELL [
Source of data
LeftOpBus < INT[32],
RightOpBus < INT[32],
Control
fdshift < INT[6],
Shifter output
shiftout > INT[32],
Timing and housekeeping interface
PhA, PhB<BOOL,
ResetAB<BOOL,
Vdd, Gnd, PadVdd, PadGnd<BOOL
]
EvalSimple
IF PhB THEN { -- shift left the double word (OpLeftBus,OpRightBus)