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: EUPadFrame.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 ← EUPadFrame.AddPad[pads, "DShA", $In, Next[], ["toChip", "shiftA"]]; -- new: 11
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← EUPadFrame.AddPad[pads, "DShB", $In, Next[], ["toChip", "shiftB"]];
pads ← EUPadFrame.AddPad[pads, "DShRd", $In, Next[], ["toChip", "read"]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← EUPadFrame.AddPad[pads, "DShWt", $In, Next[], ["toChip", "write"]];
pads ← EUPadFrame.AddPad[pads, "DShIn", $In, Next[], ["toChip", "shIn"]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← EUPadFrame.AddPad[pads, "DShOut", $Out, Next[], ["fromChip", "shOut"]];
pads ← EUPadFrame.AddPad[pads, "DHold", $In, Next[], ["toChip", "hold"]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← EUPadFrame.AddPad[pads, dStAd[0], $In, Next[], ["toChip", "dStateAd[0]"]];
pads ← EUPadFrame.AddPad[pads, dStAd[1], $In, Next[], ["toChip", "dStateAd[1]"]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← EUPadFrame.AddPad[pads, dStAd[2], $In, Next[], ["toChip", "dStateAd[2]"]];
pads ← EUPadFrame.AddPad[pads, dStAd[3], $In, Next[], ["toChip", "dStateAd[3]"]];
pads ← EUPadFrame.AddPad[pads, NIL, $Copyright, Next[]];
pads ← EUPadFrame.AddPad[pads, NIL, $Logo, Next[]];
pads ← EUPadFrame.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 ← EUPadFrame.AddPad[pads, dpData[index], $IOTst, Move[2],
-- s on 43
["toChip", Index["fromPBus", index]],
["fromChip", Index["toPBus", index]],
["enWA", "enWrtPBusPhA"],
["enWB", "enWrtPBusPhB"]];
pads ← EUPadFrame.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 ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Next[]]; -- v on 42
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
-- Right side: msb(0) on the left
SetFirst[right+8];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]]; -- v on 100
pads ← EUPadFrame.AddPad[pads, "DPRejectB", $In, Next[], ["toChip", "dpRejectB"]];
pads ← EUPadFrame.AddPad[pads, "PhA", $Clk, Next[], ["Clock", "phA"], ["nClock", "nPhA"]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← EUPadFrame.AddPad[pads, "PhB", $Clk, Next[], ["Clock", "phB"], ["nClock", "nPhB"]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]]; -- former VRef
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← EUPadFrame.AddPad[pads, "EUCondition2B", $Out, Next[], ["fromChip", "condition"]];
pads ← EUPadFrame.AddPad[pads, "EURdFromPBus3AB", $In, Next[], ["toChip", "readPBus3AB"]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← EUPadFrame.AddPad[pads, "EUWriteToPBus3AB", $In, Next[], ["toChip", "writePBus"]];
pads ← EUPadFrame.AddPad[pads, aluOp[0], $In, Next[], ["toChip", "aluOp[0]"]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Next[]];
pads ← EUPadFrame.AddPad[pads, aluOp[1], $In, Next[], ["toChip", "aluOp[1]"]];
pads ← EUPadFrame.AddPad[pads, aluOp[2], $In, Next[], ["toChip", "aluOp[2]"]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Next[]];
pads ← EUPadFrame.AddPad[pads, aluOp[3], $In, Next[], ["toChip", "aluOp[3]"]];
pads ← EUPadFrame.AddPad[pads, condSel[0], $In, Next[], ["toChip", "condSel[0]"]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Next[]];
pads ← EUPadFrame.AddPad[pads, condSel[1], $In, Next[], ["toChip", "condSel[1]"]];
pads ← EUPadFrame.AddPad[pads, condSel[2], $In, Next[], ["toChip", "condSel[2]"]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Next[]];
pads ← EUPadFrame.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 ← EUPadFrame.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 ← EUPadFrame.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 ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Next[]]; -- v on 133
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadGnd", $PadGnd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Vdd", $Vdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "PadVdd", $PadVdd, Move[3]];
pads ← EUPadFrame.AddPad[pads, "Gnd", $Gnd, Move[3]];
cellType ← EUPadFrame.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
];
};