CreateFullEU:
PROC [cx: Sisyph.Context, props: Properties ←
NIL]
RETURNS [cellType: CellType] = {
vSize: NAT = 41;
hSize: NAT = 50;
left: NAT = 0;
bottom: NAT = left+vSize; -- 41
right: NAT = bottom+hSize; -- 91
top: NAT = right+vSize; -- 132
pads: PadFrame.Pads ← NIL;
dpData: Wire ← FindWire[public, "DPData"];
aluOp: Wire ← FindWire[public, "EUAluOp2AB"];
condSel: Wire ← FindWire[public, "EUCondSel2AB"];
kBus: Wire ← FindWire[public, "KBus"];
dStAd: Wire ← FindWire[public, "DStAd"];
onlyInternal: Wire ← WireList[
LIST[
"phA", "phB", "nPhA", "nPhB",
"enWrtPBusPhA", "enWrtPBusPhB", "enWrtIFUPhA", "enWrtIFUPhB", "condition",
"writePBus", "readPBus3AB", "dpRejectB", Seq["aluOp", 4], Seq["condSel", 4],
"shiftA", "shiftB", "read", "write", "shIn", "shOut", "hold", Seq["dStateAd", 4],
Seq["fromIFU", 32], Seq["toIFU", 32], Seq["toPBus", 32], Seq["fromPBus", 32],
"reject" ]]; -- just for routing
-- Left side
SetFirst[left+10];
pads ← PadFrame.AddPad[pads, "DShA", $In, Next[], ["toChip", "shiftA"]]; -- new: 11
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← PadFrame.AddPad[pads, "DShB", $In, Next[], ["toChip", "shiftB"]];
pads ← PadFrame.AddPad[pads, "DShRd", $In, Next[], ["toChip", "read"]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← PadFrame.AddPad[pads, "DShWt", $In, Next[], ["toChip", "write"]];
pads ← PadFrame.AddPad[pads, "DShIn", $In, Next[], ["toChip", "shIn"]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← PadFrame.AddPad[pads, "DShOut", $Out, Next[], ["fromChip", "shOut"]];
pads ← PadFrame.AddPad[pads, "DHold", $In, Next[], ["toChip", "hold"]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← PadFrame.AddPad[pads, dStAd[0], $In, Next[], ["toChip", "dStateAd[0]"]];
pads ← PadFrame.AddPad[pads, dStAd[1], $In, Next[], ["toChip", "dStateAd[1]"]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← PadFrame.AddPad[pads, dStAd[2], $In, Next[], ["toChip", "dStateAd[2]"]];
pads ← PadFrame.AddPad[pads, dStAd[3], $In, Next[], ["toChip", "dStateAd[3]"]];
pads ← PadFrame.AddPad[pads, NIL, $Copyright, Next[]];
pads ← PadFrame.AddPad[pads, NIL, $Logo, Next[]];
pads ← PadFrame.AddPad[pads, NIL, $Name, Next[]];
-- Bottom side: msb(0) on the left
SetFirst[bottom]; -- 41
FOR i:
NAT
IN [0..16)
DO
index: NAT ← 2*i;
pads ← PadFrame.AddPad[pads, dpData[index], $IOTst, Move[2],
-- s on 43
["toChip", Index["fromPBus", index]],
["fromChip", Index["toPBus", index]],
["enWA", "enWrtPBusPhA"],
["enWB", "enWrtPBusPhB"]];
pads ← PadFrame.AddPad[pads, dpData[index+1], $IOTst, Next[],
-- s on 44
["toChip", Index["fromPBus", index+1]],
["fromChip", Index["toPBus", index+1]],
["enWA", "enWrtPBusPhA"],
["enWB", "enWrtPBusPhB"]];
ENDLOOP;
SetFirst[bottom]; -- 42
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Next[]]; -- v on 42
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
-- Right side: msb(0) on the left
SetFirst[right+8];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]]; -- v on 100
pads ← PadFrame.AddPad[pads, "DPRejectB", $In, Next[], ["toChip", "dpRejectB"]];
pads ← PadFrame.AddPad[pads, "PhA", $Clk, Next[], ["Clock", "phA"], ["nClock", "nPhA"]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← PadFrame.AddPad[pads, "PhB", $Clk, Next[], ["Clock", "phB"], ["nClock", "nPhB"]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]]; -- former VRef
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← PadFrame.AddPad[pads, "EUCondition2B", $Out, Next[], ["fromChip", "condition"]];
pads ← PadFrame.AddPad[pads, "EURdFromPBus3AB", $In, Next[], ["toChip", "readPBus3AB"]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← PadFrame.AddPad[pads, "EUWriteToPBus3AB", $In, Next[], ["toChip", "writePBus"]];
pads ← PadFrame.AddPad[pads, aluOp[0], $In, Next[], ["toChip", "aluOp[0]"]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← PadFrame.AddPad[pads, aluOp[1], $In, Next[], ["toChip", "aluOp[1]"]];
pads ← PadFrame.AddPad[pads, aluOp[2], $In, Next[], ["toChip", "aluOp[2]"]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← PadFrame.AddPad[pads, aluOp[3], $In, Next[], ["toChip", "aluOp[3]"]];
pads ← PadFrame.AddPad[pads, condSel[0], $In, Next[], ["toChip", "condSel[0]"]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← PadFrame.AddPad[pads, condSel[1], $In, Next[], ["toChip", "condSel[1]"]];
pads ← PadFrame.AddPad[pads, condSel[2], $In, Next[], ["toChip", "condSel[2]"]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← PadFrame.AddPad[pads, condSel[3], $In, Next[], ["toChip", "condSel[3]"]];
-- Top side
SetFirst[top]; -- 132
FOR i:
NAT
IN [0..16)
DO
index: NAT ← 31-2*i;
pads ← PadFrame.AddPad[pads, kBus[index], $IOTst, Move[2],
-- s on 134
["toChip", Index["fromIFU", index]],
["fromChip", Index["toIFU", index]],
["enWA", "enWrtIFUPhA"],
["enWB", "enWrtIFUPhB"]]; -- EU never write on KBus during PhB
pads ← PadFrame.AddPad[pads, kBus[index-1], $IOTst, Next[],
-- s on 135
["toChip", Index["fromIFU", index-1]],
["fromChip", Index["toIFU", index-1]],
["enWA", "enWrtIFUPhA"],
["enWB", "enWrtIFUPhB"]];
ENDLOOP;
SetFirst[top]; -- 132
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Next[]]; -- v on 133
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← PadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← PadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
cellType ← PadFrame.CreatePadFrame[
public: public,
onlyInternal: onlyInternal,
innerInstance: Instance[PWCore.RotateCellType[EUInner.CreateEUInner[cx], $Rot90],
["dStateAd", "dStateAd"], ["hold", "hold"], ["reject", "reject"] ],
pads: pads,
params: [
nbPadsX: hSize,
nbPadsY: vSize,
horizLayer: "metal2",
vertLayer: "metal",
centerDisplacement: [-200*CMosB.lambda, 0]],
name: EUName,
props: props
];
};