IFUAsmComplete.mesa
Copyright c 1985 by Xerox Corporation. All rights reserved.
Last Edited by Curry, January 27, 1986 8:20:11 am PST
DIRECTORY
CD,
CDFrame,
CDOrient,
Commander,
IFUAsm,
IFUPW,
IO,
Rope;
IFUAsmComplete: CEDAR PROGRAM
IMPORTS CDFrame, CDOrient, IFUAsm, IFUPW, IO, Rope
EXPORTS IFUAsm =
BEGIN OPEN IFUAsm;
Pad: PROC[
design: CD.Design,
side:  IFUPW.Side,
index:  INT,
pad:  IFUPW.Pad144Type,
data1:  Rope.ROPENIL,
data2:  Rope.ROPENIL,
enable: Rope.ROPENIL] RETURNS[frame: IFUPW.Frame] = {
test: INT  ← SELECT side FROM right=>34-index, top=>36-index ENDCASE=>index;
Error: BOOLSELECT test FROM
0   => pad#vddcnr AND (side=bottom OR side=top),
17   => pad#padgnd,
18   => pad#padvdd,
36   => pad#gndcnr AND (side=bottom OR side=top),
ENDCASE => FALSE;
IF Error THEN ERROR;
RETURN[IFUPW.Pad144[design, side, index, pad, data1, data2, enable]]};
PadLtProc: CDFrame.ExpandProc = {
ii: INT ← 34;
new ← CDFrame.NewFrame[ii+1+1, y, frame.shell.name];
FOR jj: INT DECREASING IN [0..8) DO
data: ROPEIO.PutFR["IPCmnd3A.%g", IO.int[jj] ];
new[ii+1] ← Pad[design, left, ii, out,  data];       ii ← ii-1;
ENDLOOP;
FOR jj: INT DECREASING IN [0..4) DO
data: ROPEIO.PutFR["IPFaultB.%g", IO.int[jj] ];
new[ii+1] ← Pad[design, left, ii, in,   data];       ii ← ii-1;
ENDLOOP;
new[ii+1] ← Pad[design, left, ii, in,   "IPRejectB"];     ii ← ii-1;
new[ii+1] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+1] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+1] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+1] ← Pad[design, left, ii, padvdd, "VDD"];      ii ← ii-1;
new[ii+1] ← CDFrame.Glue[t: conn, b: ext];
new[ii+0] ← Pad[design, left, ii, padgnd, "GND"];      ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "Reset"];      ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "Reschedule"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, clock,  "Clock"];      ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "PhaseClockSel"];   ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, clock,  "ExplicitPhA"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, clock,  "ExplicitPhB"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "DHoldAB"];     ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "DShiftAB"];     ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "DExecuteAB"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "DNSelectAB"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, in,   "DDataInAB"];    ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, out, NIL, "DDataOutAB", "VDD"]; ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, empty];          ii ← ii-1;
new[ii+0] ← Pad[design, left, ii, empty];
IF ii#0 THEN ERROR };
PadLt: PUBLIC IFUPW.Frame ← CDFrame.NewExpandFrame["IFUAsmPadLt", PadLtProc];
PadRtProc: CDFrame.ExpandProc = {
ii: INT ← 34;
new ← CDFrame.NewFrame[ii+1+1, y, frame.shell.name];
FOR jj: INT DECREASING IN [0..8) DO
data: ROPEIO.PutFR["DpCmnd3A.%g", IO.int[jj] ];
new[ii+1] ← Pad[design, right, ii, out,  data];      ii ← ii-1;
ENDLOOP;
FOR jj: INT DECREASING IN [0..4) DO
data: ROPEIO.PutFR["DpFaultB.%g", IO.int[jj] ];
new[ii+1] ← Pad[design, right, ii, in, data];        ii ← ii-1;
ENDLOOP;
new[ii+1] ← Pad[design, right, ii, in,   "DpRejectB"];   ii ← ii-1;
new[ii+1] ← Pad[design, right, ii, empty];         ii ← ii-1;
new[ii+1] ← Pad[design, right, ii, empty];         ii ← ii-1;
new[ii+1] ← Pad[design, right, ii, empty];         ii ← ii-1;
new[ii+1] ← Pad[design, right, ii, empty];         ii ← ii-1;
new[ii+1] ← Pad[design, right, ii, padgnd, "GND"];       ii ← ii-1;
new[ii+1] ← CDFrame.Glue[t: conn, b: ext];
new[ii] ← Pad[design, right, ii, padvdd, "VDD"];        ii ← ii-1;
FOR jj: INT DECREASING IN [0..5) DO
data: ROPEIO.PutFR["EuAluOp2AB.%g", IO.int[jj] ];
new[ii] ← Pad[design, right, ii, out, NIL,  data, "VDD"];  ii ← ii-1;
ENDLOOP;
FOR jj: INT DECREASING IN [0..4) DO
data: ROPEIO.PutFR["EuCondSel2AB.%g", IO.int[jj] ];
new[ii] ← Pad[design, right, ii, out, NIL,  data, "VDD"];  ii ← ii-1;
ENDLOOP;
new[ii] ← Pad[design, right, ii, out, NIL, "EuSt3AisCBus2BA", "VDD"]; ii ← ii-1;
new[ii] ← Pad[design, right, ii, out, NIL, "EuRes3AisCBus2BA", "VDD"]; ii ← ii-1;
new[ii] ← Pad[design, right, ii, out, NIL, "EuCondition2BA", "VDD"];  ii ← ii-1;
new[ii] ← Pad[design, right, ii, out, NIL, "EuRes3BisPBus3AB", "VDD"]; ii ← ii-1;
new[ii] ← Pad[design, right, ii, out, NIL, "EuWriteToPBus3AB", "VDD"]; ii ← ii-1;
new[ii] ← Pad[design, right, ii, out, NIL, "EuWriteField3BA", "VDD"];  ii ← ii-1;
new[ii] ← Pad[design, right, ii, in,  "AuConnected"]; IF ii#0 THEN ERROR };
PadRt: PUBLIC IFUPW.Frame ← CDFrame.NewExpandFrame["IFUAsmPadRt", PadRtProc];
PadTopProc: CDFrame.ExpandProc = {
new ← CDFrame.NewFrame[3, x, frame.shell.name];
new[0] ← Pad[design, top, 0, gndcnr, "GND"];
new[1] ← CDFrame.NewFrame[36, x, frame.shell.name.Cat["Mid"]];
new[1][0] ← Pad[design, top, 1, empty];
FOR i: INT IN [0..16) DO
data: ROPEIO.PutFR["IPBus.%02b", IO.int[i] ];
new[1][i+1] ← Pad[design, top, i+2, tri, data, data, "PhA"];
ENDLOOP;
new[1][17] ← Pad[design, top, 18, padvdd, "VDD"];
new[1][17+1] ← CDFrame.Glue[l: conn, r: ext];
new[1][18+1] ← Pad[design, top, 19, padgnd, "GND"];
FOR i: INT IN [0..16) DO
data: ROPEIO.PutFR["IPBus.%02b", IO.int[i+16] ];
new[1][i+19+1] ← Pad[design, top, i+20, tri, data, data, "PhA"];
ENDLOOP;
new[2] ← Pad[design, top, 36, vddcnr, "VDD"] };
PadTop: PUBLIC IFUPW.Frame ← CDFrame.NewExpandFrame["IFUAsmPadTop", PadTopProc];
PadBotProc: CDFrame.ExpandProc = {
new ← CDFrame.NewFrame[3, x, frame.shell.name];
new[0] ← Pad[design, bottom, 0, vddcnr, "VDD"];
new[1] ← CDFrame.NewFrame[36, x, frame.shell.name.Cat["Mid"]];
FOR i: INT IN [0..16) DO
data: ROPEIO.PutFR["XBus.%02b", IO.int[i] ];
new[1][i] ← Pad[design, bottom, i+1, tri, data, data, "KBusOutEnA"];
ENDLOOP;
new[1][17-1] ← Pad[design, bottom, 17, padgnd, "GND"];
new[1][17] ← CDFrame.Glue[l: conn, r: ext];
new[1][18] ← Pad[design, bottom, 18, padvdd, "VDD"];
FOR i: INT IN [0..16) DO
data: ROPEIO.PutFR["XBus.%02b", IO.int[i+16] ];
new[1][i+19] ← Pad[design, bottom, i+19, tri, data, data, "KBusOutEnA"];
ENDLOOP;
new[1][35] ← Pad[design, bottom, 35, empty];
new[2] ← Pad[design, bottom, 36, gndcnr, "GND"] };
PadBot: PUBLIC IFUPW.Frame ← CDFrame.NewExpandFrame["IFUAsmPadBot", PadBotProc];
PadExt: PROC[side1, side2: CDFrame.Side]
RETURNS[frame: CDFrame.Frame] = {
frame ← IFUPW.NFS[CDFrame.ID["PadExt"], x, LIST[
CDFrame.NewObjectFrame[IFUPW.RawPad[ext]], CDFrame.Glue[r: ext, l: conn] ],
CDOrient.ComposeOrient[
SELECT side1 FROM
top  => CDOrient.rotate90,
bottom => CDOrient.rotate270X,
left  => CDOrient.mirrorX,
right  => CDOrient.original, ENDCASE => ERROR,
SELECT side2 FROM
top  => CDOrient.original,
bottom => CDOrient.mirrorY,
left  => CDOrient.original,
right  => CDOrient.mirrorX, ENDCASE => ERROR] ];
frame[1].shell.name ← "PadExtension"};
Core:   PUBLIC IFUPW.Frame ← IFUPW.NFS["IFUAsmCore", x, LIST[
LeftColumn,
CDFrame.Glue[name: "LtColumnRoute", l: conn, r: conn, tDir: vertical],
CDFrame.Glue[        l: ext,  r: conn, xlate: TRUE],
DataColumn,
CDFrame.Glue[        l: conn, r: ext,  xlate: TRUE],
CDFrame.Glue[name: "RtColumnRoute", l: conn, r: conn, tDir: vertical],
RightColumn ] ];
PadCore:  PUBLIC IFUPW.Frame ← IFUPW.NFS["IFUAsmPadCore", x, LIST[
PadLt,
IFUPW.NFS["IFUAsmPadCoreMid", x, LIST[
CDFrame.Glue[name: "LtPadRoute", l: pwr, b: diff, r: conn, tDir: vertical],
Core,
CDFrame.Glue[name: "RtPadRoute", l: conn, b: diff, r: pwr, tDir: vertical] ] ],
PadRt ] ];
Complete:  PUBLIC IFUPW.Frame ← IFUPW.NFS["IFUAsmComplete", y, LIST[
PadTop,
IFUPW.NFS["TopPadGlue", x, LIST[
PadExt[top, left],
CDFrame.Glue[name: "TopPadRoute", t: pwr, b: conn, tDir: horizontal],
PadExt[top, right] ] ],
PadCore,
IFUPW.NFS["BotPadGlue", x, LIST[
PadExt[bottom, left],
CDFrame.Glue[name: "BotPadRoute", t: conn, b: pwr, tDir: horizontal],
PadExt[bottom, right] ] ],
PadBot ] ];
PadTopCT: Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], PadTop, cmd ] };
PadBotCT: Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], PadBot, cmd ] };
PadLtCT:  Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], PadLt, cmd ] };
PadRtCT:  Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], PadRt, cmd ] };
CoreCT:  Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], Core, cmd ] };
PadCoreCT: Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], PadCore, cmd ] };
CompleteCT: Commander.CommandProc = {
IFUPW.AssembleFrame[IFUAsm.RefDesign[], Complete, cmd ] };
PadTopCD: IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[PadTop, design]]};
PadBotCD: IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[PadBot, design]]};
PadLtCD:  IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[PadLt, design]]};
PadRtCD:  IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[PadRt, design]]};
CoreCD:  IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[Core, design]]};
PadCoreCD: IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[PadCore, design]]};
CompleteCD: IFUPW.PWUserProc =
{RETURN[IFUPW.FrameToObject[Complete, design]]};
Commander.Register  [proc:   PadTopCT, key: "IFUAsmPadTop"];
Commander.Register  [proc:   PadBotCT, key: "IFUAsmPadBot"];
Commander.Register  [proc:   PadLtCT,  key: "IFUAsmPadLt"];
Commander.Register  [proc:   PadRtCT,  key: "IFUAsmPadRt"];
Commander.Register  [proc:   CoreCT,  key: "IFUAsmCore"];
Commander.Register  [proc:   PadCoreCT, key: "IFUAsmPadCore"];
Commander.Register  [proc:   CompleteCT, key: "IFUAsmComplete"];
IFUPW.Register   [userProc: PadTopCD, name: "IFUAsmPadTop"];
IFUPW.Register   [userProc: PadBotCD, name: "IFUAsmPadBot"];
IFUPW.Register   [userProc: PadLtCD,  name: "IFUAsmPadLt"];
IFUPW.Register   [userProc: PadRtCD,  name: "IFUAsmPadRt"];
IFUPW.Register   [userProc: CoreCD,  name: "IFUAsmCore"];
IFUPW.Register   [userProc: PadCoreCD, name: "IFUAsmPadCore"];
IFUPW.Register   [userProc: CompleteCD, name: "IFUAsmComplete"];
END.