IFUAsmStackIndexing.mesa
Copyright c 1985 by Xerox Corporation. All rights reserved.
Last Edited by June 5, 1985 3:28:19 am PDT
Curry, January 23, 1986 7:17:19 pm PST
IFUAsmStackIndexing:
CEDAR
PROGRAM
IMPORTS CDFrame, Commander, IFUAsm, IFUPW
EXPORTS IFUAsm =
BEGIN
GND: Rope.ROPE = IFUPW.GND;
VDD: Rope.ROPE = IFUPW.VDD;
stackIndexingRP:
IFUPW.RowParams ←
NEW[
IFUPW.RowParamsRec ←
[seq: TRUE, rngByte: 1, rngBit: 5]];
AddendAB:
LIST
OF
REF =
LIST[
LIST
["AddendAB", "AddendAB", "AddendAB", "AddendAB", "AddendAB"] ];
zero: LIST OF REF = LIST[ LIST[GND, GND, GND, GND, GND] ];
one: LIST OF REF = LIST[ LIST[GND, GND, GND, GND, VDD] ];
LtArgFormTop:
LIST
OF
REF =
IFUPW.LISTn[
NIL,
NIL,
"TosAB.",
"BosAB." ];
LtArgForm:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUMuxRow[
design: design,
name: "IFUAsmStackIndexing.LtArgForm",
top: LtArgFormTop,
rightCtl: LIST["AdjTosAB", "NotAdjTosAB"],
in: LIST["TosBA.", "BosBA."],
out: LIST["LtArg."],
bot: SwitchInAddendTop,
rp: stackIndexingRP ]};
SwitchInAddendTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"LtArg." ];
SwitchInAddend:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.SwitchBoxRow[
design: design,
name: "IFUAsmStackIndexing.SwitchInAddend",
rowType: IFUPW.cmosMet2,
topRP: stackIndexingRP,
top: SwitchInAddendTop,
left: NIL,
right: LIST["AddendAB"],
bot: AdderTop,
botRP: stackIndexingRP ]};
AdderTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"LtArg.",
AddendAB ];
Adder:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.Adder",
type: IFUPW.LISTn["GPAdder"],
top: AdderTop,
rightCtl: LIST["CarryAB"],
in: LIST["LtArg.", AddendAB],
out: LIST["Sum."],
bot: PreTosMuxTop,
rp: stackIndexingRP ]};
PreTosMuxTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"Sum." ];
PreTosMux:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUMuxRow[
design: design,
name: "IFUAsmStackIndexing.PreTosMux",
top: PreTosMuxTop,
rightCtl: LIST["AdjTosAB", "NotAdjTosAB"],
in: LIST["Sum.", "TosBA."],
out: LIST["PreTosA."],
bot: PreBosMuxTop,
rp: stackIndexingRP ]};
PreBosMuxTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"Sum.",
NIL,
GND,
VDD,
"PreTosA.",
NIL ];
PreBosMux:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUMuxRow[
design: design,
name: "IFUAsmStackIndexing.PreBosMux",
top: PreBosMuxTop,
rightCtl: LIST["AdjTosAB", "NotAdjTosAB"],
in: LIST["BosBA.", "Sum."],
out: LIST["PreBosA."],
bot: TosMuxTop,
rp: stackIndexingRP ]};
TosMuxTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
NIL,
NIL,
GND,
VDD,
"PreTosA.",
"PreBosA." ];
TosMux:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUMuxRow[
design: design,
name: "IFUAsmStackIndexing.TosMux",
top: TosMuxTop,
rightCtl: LIST["ResetBA", "NotResetBA"],
in: LIST[zero, "PreTosA."],
out: LIST["TosA."],
bot: BosMuxTop,
rp: stackIndexingRP ]};
BosMuxTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"TosA.",
NIL,
GND,
VDD,
NIL,
"PreBosA." ];
BosMux:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUMuxRow[
design: design,
name: "IFUAsmStackIndexing.BosMux",
top: BosMuxTop,
rightCtl: LIST["ResetBA", "NotResetBA"],
in: LIST[one, "PreBosA."],
out: LIST["BosA."],
bot: TosLatchATop,
rp: stackIndexingRP ]};
TosLatchATop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"TosA.",
"BosA." ];
TosLatchA:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.TosLatchA",
type: IFUPW.LISTn["GPLatch"],
top: TosLatchATop,
leftCtl: LIST["PhA", "VBB"],
in: LIST["TosA."],
out: LIST["TosAB." ],
bot: BosLatchATop,
rp: stackIndexingRP ]};
BosLatchATop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
NIL,
"BosA." ];
BosLatchA:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.BosLatchA",
type: IFUPW.LISTn["GPLatch"],
top: BosLatchATop,
leftCtl: LIST["PhA", "VBB"],
in: LIST["BosA."],
out: LIST["BosAB." ],
bot: BosInvTop,
rp: stackIndexingRP ]};
BosInvTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB." ];
BosInv:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.BosInv",
type: IFUPW.LISTn["GPInv"],
top: BosInvTop,
in: LIST["BosAB."],
out: LIST["InvBosB." ],
bot: PassBoxTop,
rp: stackIndexingRP ]};
PassBoxTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"InvBosB." ];
PassBox:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.SwitchBoxRow[
design: design,
name: "IFUAsmStackIndexing.PassBox",
rowType: IFUPW.cmosMet2,
topRP: stackIndexingRP,
top: PassBoxTop,
left: LIST["NotDrShData", "DrShA", "DrShB", "DrShWt", "DrShRd", "DrA", "DrB"],
right: LIST["NotDrShData", "DrShA", "DrShB", "DrShWt", "DrShRd", "DrA", "DrB"],
bot: DiffTop,
botRP: stackIndexingRP ]};
DiffTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"InvBosB." ];
Diff:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.Diff",
type: IFUPW.LISTn["GPAdder"],
top: DiffTop,
rightCtl: LIST[VDD],
in: LIST["TosAB.", "InvBosB."],
out: LIST["DiffB."],
bot: DiffLatchBTop,
rp: stackIndexingRP ]};
DiffLatchBTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"DiffB." ];
DiffLatchB:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.DiffLatchB",
type: IFUPW.LISTn["GPLatch"],
top: DiffLatchBTop,
leftCtl: LIST["PhB", "VBB"],
in: LIST["DiffB."],
out: LIST["DiffBA." ],
bot: TosLatchBTop,
rp: stackIndexingRP ]};
TosLatchBTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
"TosAB.",
"BosAB.",
"DiffBA." ];
TosLatchB:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.TosLatchB",
type: IFUPW.LISTn["GPLatch"],
top: TosLatchBTop,
leftCtl: LIST["PhB", "VBB"],
in: LIST["TosAB."],
out: LIST["TosBA." ],
bot: BosLatchBTop,
rp: stackIndexingRP ]};
BosLatchBTop:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
NIL,
"BosAB.",
"DiffBA." ];
BosLatchB:
PROC[design:
CD.Design]
RETURNS[cell:
CD.Object] = {
cell ←
IFUPW.IFUGPCellRow[
design: design,
name: "IFUAsmStackIndexing.BosLatchB",
type: IFUPW.LISTn["GPLatch"],
top: BosLatchBTop,
leftCtl: LIST["PhB", "VBB"],
in: LIST["BosAB."],
out: LIST["BosBA." ],
bot: BosLatchBBot,
rp: stackIndexingRP ]};
BosLatchBBot:
LIST
OF
REF =
IFUPW.LISTn[
"TosBA.",
"BosBA.",
NIL,
NIL,
"DiffBA." ];
module: Rope.ROPE ← "IFUAsmStackIndexing";
StackIndexingData:
IFUPW.Frame ←
IFUPW.
NFSFUP[module, y,
LIST[
LtArgForm,
SwitchInAddend,
Adder,
PreTosMux,
PreBosMux,
TosMux,
BosMux,
TosLatchA,
BosLatchA,
BosInv,
PassBox,
Diff,
DiffLatchB,
TosLatchB,
BosLatchB ],
CDOrient.rotate90 ];
StackIndexing:
PUBLIC
IFUPW.Frame ←
IFUPW.
NFS[module, x,
LIST[
CDFrame.Glue[l: ext, r: conn],
StackIndexingData ] ];
StackIndexingCT: Commander.CommandProc =
{IFUPW.AssembleFrame[IFUAsm.RefDesign[], StackIndexing, cmd ] };
Commander.Register [proc: StackIndexingCT, key: module];
END.