DIRECTORY CCDUtils, Core, CoreBlock, CoreFrame, CoreGlue, CoreName, CoreXform, IFUSrc, IFUCoreCtl, IFUCoreData, IFUCoreDrive;

IFUSrcFetchControler: CEDAR PROGRAM	
IMPORTS CCDUtils, CoreFrame, CoreGlue, CoreName, CoreXform, IFUCoreData, IFUCoreCtl, IFUCoreDrive
EXPORTS IFUSrc =
BEGIN

ROPE:				TYPE = Core.ROPE;
CellType:			TYPE = Core.CellType;
Signal:			SIGNAL = CODE;
xForm:			CoreXform.Xform _ CoreXform.GenXform[ LIST[ [5, 0] ] ];
GND:				ROPE _ CoreName.RopeNm["GND"];
VDD:				ROPE _ CoreName.RopeNm["VDD"];
pcBus:			ROPE = "(NIL NIL NIL PCBus.36 PCBus.37)";
opLength:		ROPE = "(NIL NIL OpLengthAB.0 OpLengthAB.1 OpLengthAB.2)";
fetchWtAB01:	ROPE = "(NIL FetchWtAB.0 FetchWtAB.1 NIL NIL)";
fetchRdBA03:	ROPE = "(NIL FetchRdBA.0 FetchRdBA.1 FetchRdBA.2 FetchRdBA.3)";

WtAdder: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpAdderSerial",
name:		"WtAdder",
top:		NIL,
in:			"(
WtAB.
(GND		GND		VDD		GND		GND)
(WtCry.1	WtCry.2	WtCry.3	WtCry.4	GND) )",
out: 	"( WtSumB.	NIL	(NIL	WtCry.1	WtCry.2	WtCry.3 WtCry.4) )",
bot:		WtMuxTop,
xform:		xForm ]};

WtMuxTop: LIST OF REF = LIST[
"WtAB.",
NIL,
NIL,
NIL,
"WtSumB." ];

WtMux: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"Mux",
name:		"WtMux",
top:		WtMuxTop,
right:		"(FetchWtIndexCtlClearBA  FetchWtIndexCtlHoldBA  FetchWtIndexCtlIncBA)",
in:			"(GND		 WtAB.		 WtSumB.)",
out:		"(WtB.)",
bot:		WtLatchBTop,
xform:		xForm ]};

WtLatchBTop: LIST OF REF = LIST[
"WtAB.",
NIL,
NIL,
NIL,
NIL,
"WtB." ];

WtLatchB: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpLatch",
name:		"WtLatchB",
top:		WtLatchBTop,
right:		"(PhB  VBB)",
in:			"(WtB.)",
out:		"(WtBA.)",
bot:		WtLatchATop,
xform:		xForm ]};

WtLatchATop: LIST OF REF = LIST[
"WtAB.",
"WtBA."];

WtLatchA: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpLatch",
name:		"WtLatchA",
top:		WtLatchATop,
right:		"(PhA  VBB)",
in:			"(WtBA.)",
out:		"(WtAB.)",
bot:		WtLatchABot,
xform:		xForm ]};

WtLatchABot: LIST OF REF = LIST[
"WtAB.",
"WtBA."];


RdAdderTop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA."];

RdAdder: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpAdderSerial",
name:		"RdAdder",
top:		RdAdderTop,
in:			"(
RdAB.
(GND		GND		OpLengthAB.0	OpLengthAB.1	OpLengthAB.2)
(RdCry.1	RdCry.2	RdCry.3	RdCry.4	GND) )",
out: 	"( RdSumB.	NIL	(NIL	RdCry.1	RdCry.2	RdCry.3 RdCry.4) )",
bot:		RdMuxTop,
xform:		xForm ]};

RdMuxTop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
"RdSumB.",
NIL,
"RdAB."];

RdMux: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"Mux",
name:		"RdMux",
top:		RdMuxTop,
right:		"(
NextMacroJumpBA
NextMacroHoldBA
NextMacroGetBA)",
in:			"(
(GND GND GND PCBus.36 PCBus.37)
RdAB.
RdSumB. ) ",
out:		"(RdB.)",
bot:		RdLatchBTop,
xform:		xForm ]};

RdLatchBTop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
pcBus,
"RdB.",
"RdAB."];

RdLatchB: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpLatch",
name:		"RdLatchB",
top:		RdLatchBTop,
right:		"(PhB  VBB)",
in:			"(RdB.)",
out:		"(RdBA.)",
bot:		RdLatchATop,
xform:		xForm ]};

RdLatchATop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
pcBus,
"RdBA.",
"RdAB."];

RdLatchA: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpLatch",
name:		"RdLatchA",
top:		RdLatchATop,
right:		"(PhA VBB)",
in:			"(RdBA.)",
out:		"(RdAB.)",
bot:		RdInvertTop,
xform:		xForm ]};

RdInvertTop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
pcBus,
"RdBA." ];

RdInvert: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpInv",
name:		"RdInvert",
top:		RdInvertTop,
in:			"(RdBA.)",
out:		"(NotRdBA.)",
bot:		RdInvertBot,
xform:		xForm ]};

RdInvertBot: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
pcBus,
"RdBA.",
"NotRdBA." ];


DiffAdderTop: LIST OF REF = LIST[
fetchWtAB01,
"WtBA.",
opLength,
pcBus,
fetchRdBA03,
"NotRdBA." ];

DiffAdder: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpAdderSerial",
name:		"DiffAdder",
top:		DiffAdderTop,
in:			"( WtBA.	NotRdBA.
(FetchDiffCry.1	FetchDiffCry.2 FetchDiffCry.3 FetchDiffCry.4	GND) )",
out:		"( FetchBytesM1A.	NIL
(NIL				FetchDiffCry.1 FetchDiffCry.2 FetchDiffCry.3	FetchDiffCry.4) )",
bot:		DiffLatchBTop,
xform:		xForm ]};
DiffLatchBTop: LIST OF REF = LIST[
fetchWtAB01,
NIL,
opLength,
pcBus,
fetchRdBA03,
"FetchBytesM1A." ];

DiffLatchA: PROC RETURNS [cellType: CellType] = {
cellType _ IFUCoreData.CellProc[
subClass:	"GPRow",
type: 		"DpLatch",
name:		"DiffLatchA",
top:		DiffLatchBTop,
right:		"(PhA  VBB)",
in:			"(FetchBytesM1A.)",
out:		"(FetchBytesM1AB.)",
bot:		DiffLatchABot,
xform:		xForm ]};

DiffLatchABot: LIST OF REF = LIST[
fetchWtAB01,
NIL,
opLength,
pcBus,
fetchRdBA03,
"FetchBytesM1AB." ];



FetchIndexingData: PROC RETURNS[cellType: Core.CellType] = {
name:	ROPE _ CoreName.RopeNm["IFUFetchIndexingData"];
{
leftRouting: Core.CellType _ CoreGlue.ChanSideCell
[side: left, layer: CCDUtils.cmosMet, list: LIST["GND/25", "VDD/25"] ];
cellType _ CoreFrame.NewFrameCells[
name:		"FetchIndexingMain",
rec:		[first: top, orient: rotate270X],	-- adder carry at bottom
cells: LIST[
WtAdder[],
WtMux[],
WtLatchB[],
WtLatchA[],
RdAdder[],
RdMux[],
RdLatchB[],
RdLatchA[],
RdInvert[],
DiffAdder[],
DiffLatchA[] ] ];
cellType _ CoreFrame.NewFrameCells[name: name, rec: [first: top], cells: LIST[
CoreGlue.CellProc[],
cellType,
CoreGlue.CellProc[l: chan, t: conn, r: sum, lCell: leftRouting] ]];
} };

FetchIndexing: PUBLIC PROC RETURNS[cellType: Core.CellType] = {
cellType _ CoreFrame.NewFrameCells[name: "FetchIndexXFill", rec: [first: left], cells: LIST[
CoreGlue.CellProc[l: ext, r: conn], FetchIndexingData[] ]] };

FetchControler: PUBLIC PROC [sIn: ROPE, altOut: ROPE _ NIL]
RETURNS [cellType: Core.CellType, sOut: ROPE] = {
name:			ROPE _ CoreName.RopeNm["IFUFetchControler"];
{
PLAD:			TYPE = IFUCoreCtl.PLADescriptionRec;
FetchSection:	TYPE = {ctl, wt, rd};
plaDscs:		ARRAY FetchSection OF IFUCoreCtl.PLADescription _ [
rd:		NEW[PLAD _ [name: "IFUPLAFetchRdDecode",	plaPhs: [BA, B, BAA, B, Ac] ]],
wt:	NEW[PLAD _ [name: "IFUPLAFetchWtDecode",	plaPhs: [AB, A, ABB, A, Bc] ]],
ctl:	NEW[PLAD _ [name: "IFUPLAFetchControl",		plaPhs: [BA, A, AB,	 A, AB] ]] ];
sOut _ sIn;
FOR p: FetchSection IN FetchSection DO
IF plaDscs[p]=NIL THEN LOOP;
plaDscs[p].inSh _ sOut;
plaDscs[p].plaType _ hot;
IFUCoreCtl.MakePLA1[plaDscs[p]];
IF p=wt THEN {
IFUCoreDrive.AdjustDriveInPhRef[A, plaDscs[p].inDrs, "
FetchingBA
FetchWtAB.0 FetchWtAB.1 "]}; 
IF p=ctl THEN {
IFUCoreDrive.AdjustDriveInPhRef[A, plaDscs[p].inDrs, "
OpAB.0 OpAB.1 OpAB.2
FetchingBA
FetchBytesM1AB.0
FetchBytesM1AB.1
FetchBytesM1AB.2
FetchBytesM1AB.3
FetchBytesM1AB.4 "]; 
IFUCoreDrive.AdjustDriveInPhRef[B, plaDscs[p].inDrs, "
NextMacroJumpBA
ResetBA
IPRejectBA
JumpPendingAB
IPFaultedAB
IPFaultingBA "]; 
IFUCoreDrive.AdjustDriveOutPh[plaDscs[p].outDrs, "
NewFetchBA
FetchWtIndexCtlHoldBA FetchWtIndexCtlIncBA FetchWtIndexCtlClearBA
OpLengthbBA.0 OpLengthbBA.1 OpLengthbBA.2
JumpPendingAB
FetchingBA
IPFaultedAB
InstReadyAB
JumpOffsetBetaAB JumpOffsetAlphaAB JumpOffsetAlphaBetaAB JumpOffsetXaAB
OpLengthAB.0 OpLengthAB.1 OpLengthAB.2
InstFault0BA "] };
IF altOut # NIL AND p=rd THEN {
list: IFUCoreDrive.Drives _ plaDscs[rd].outDrs;
FOR list _ list, list.rest WHILE list.rest#NIL DO ENDLOOP;
plaDscs[rd].outSh	_ altOut;	-- does this work?
list.first.outSh		_ altOut};
IFUCoreCtl.MakePLA2[plaDscs[p]];
sOut _ plaDscs[p].outSh;
ENDLOOP;
cellType _ CoreFrame.NewFrameCells[
name:		name,
rec:		[first: top],
cells:		LIST[
CoreFrame.NewFrameCells[name: "ExtendedFetchRdCtl",	rec: [first: left], cells: LIST[
CoreGlue.CellProc[l: ext, r: conn],
IFUCoreCtl.CellProc[ complete, plaDscs[ rd ]] ]],
CoreFrame.NewFrameCells[name: "ExtendedFetchWtCtl",	rec: [first: left], cells: LIST[
CoreGlue.CellProc[l: ext, r: conn],
IFUCoreCtl.CellProc[ complete, plaDscs[ wt ]] ]],
CoreFrame.NewFrameCells[name: "ExtendedFetchCtl",		rec: [first: left], cells: LIST[
CoreGlue.CellProc[l: ext, r: conn],
IFUCoreCtl.CellProc[ complete, plaDscs[ ctl ]] ]] ]];
IFUCoreDrive.SetDShiftIO[cellType, sIn, sOut];
};
[sIn, sOut] _ IFUCoreDrive.GetDShiftIO[cellType];
cellType _ CoreFrame.NewFrameCells[ name: "FetchControlerFillX", rec: [first: left], cells: LIST[ CoreGlue.CellProc[l: ext, r: conn], cellType ]]};

END. 
���>��IFUSrcFetchControler.mesa 
Copyright c 1986 by Xerox Corporation.  All rights reserved.
Last Edited by Curry, October 14, 1986 6:49:53 pm PDT
Don Curry October 29, 1986 11:43:57 pm PST
Last Edited by: Louis Monier February 10, 1987 7:45:10 pm PST

FetchWtAB01 _ WtAB12
FetchRdBA03 _ RdBA14

IF (cellType _ CoreFrame.ReadFrameCache[name])=NIL THEN {
CoreFrame.WriteFrameCache[cellType]} };
IF (cellType _ CoreFrame.ReadFrameCache[name])=NIL THEN {
pre: NEW[PLAD _ [name: "IFUPLAFetchPreDecode", plaPhs: [AB, A, ABB, A, AB] ]] ];
CoreFrame.WriteFrameCache[cellType]};


Êù��˜�šœ™Icodešœ<™<Kšœ5™5K™*K™=—J™�JšÏk	œt˜}J˜�šÏnœœœ˜$JšœZ˜aJšœ	˜Jš˜J˜�Jšœœœ˜Jšœœ˜!Jšžœœœ˜Jšœ/œ
˜@Jšœœ˜&Jšœœ˜&Jšœ	œ%˜2Jšœœ6˜EJšœ
œ+˜<Jšœ
œ;˜LJ˜�šžœœœ˜.šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœœ˜
šœ˜Jšœ˜Jšœœœœœœ˜Jšœ!œ˜)—Jšœ>˜>Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�šžœœœ˜,šœ ˜ Jšœ˜Jšœ˜Jšœ˜JšœP˜PJšœ ˜ Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ	˜	—J˜�šžœœœ˜/šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ	˜	—J˜�šžœœœ˜/šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ	˜	—J˜�J™J˜�š
ž
œœœœœ˜Jšœ˜Jšœ	˜	—J˜�šžœœœ˜.šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜šœ˜Jšœ˜Jšœœœ)˜2Jšœ!œ˜)—Jšœ>˜>Jšœ˜Jšœ˜J˜�——š
žœœœœœ˜Jšœ˜Jšœ˜Jšœ	˜	Jšœ
˜
Jšœ˜Jšœ	˜	—J˜�šžœœœ˜,šœ ˜ Jšœ˜Jšœ˜Jšœ˜šœ
˜
Jšœ˜Jšœ˜Jšœ˜—šœ˜Jšœœœœ˜Jšœ˜Jšœ˜—Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ	˜	—J˜�šžœœœ˜/šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ	˜	—J˜�šžœœœ˜/šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ
˜
—J˜�šžœœœ˜/šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
žœœœœœ˜ Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ
˜
—J˜�J™J˜�š
žœœœœœ˜!Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ
˜
—J˜�šž	œœœ˜0šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜šœ˜Jšœ=œ˜E—šœ˜JšœœD˜H—Jšœ˜Jšœ˜—J™�—š
ž
œœœœœ˜"Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ˜—J˜�šž
œœœ˜1šœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—J˜�—š
ž
œœœœœ˜"Jšœ˜Jšœ˜Jšœ	˜	Jšœ˜Jšœ˜Jšœ˜J˜�—J˜�J˜�šžœœœ˜<Jšœœ+˜5Jšœ-œœ™9šœ˜šœ2˜2Jšœ,œ˜G—šœ#˜#Jšœ˜Jšœ(Ïc˜@šœœ˜Jšœ
˜
Jšœ˜Jšœ˜Jšœ˜Jšœ
˜
Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜——šœIœ˜NJšœ˜Jšœ	˜	JšœC˜C—Jšœ'™'Jšœ˜——J˜�šž
œœœœ˜?šœWœ˜\Jšœ=˜=——J˜�šžœœœœ
œœ˜;Jšœ!œ˜1Jšœœ(˜4Jšœ-œœ™9šœ˜Jšœœ ˜,Jšœœ˜#šœ
œœ˜=Jš	œœœ*œœ˜MJš	œœœ*œœ˜LJšœœœ*œœœ˜OJšœœœ+œœœ™P—Jšœ˜šœœ˜&Jšœœœœ˜Jšœ˜Jšœ˜Jšœ ˜ šœœ˜šœ Ïbœ˜6Jšœ
˜
Jšœ˜——šœœ˜šœ  œ˜6Jšœ˜Jšœ
˜
Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜—šœ  œ˜6Jšœ˜Jšœ˜Jšœ
˜
Jšœ
˜
Jšœ˜Jšœ˜—šœ2˜2Jšœ
˜
JšœA˜AJšœ)˜)Jšœ
˜
Jšœ
˜
Jšœ˜Jšœ˜JšœG˜GJšœ&˜&Jšœ˜——šœ
œœœ˜Jšœ/˜/Jš
œœœœœ˜:JšœŸ˜.Jšœ˜—Jšœ ˜ Jšœ˜Jšœ˜—šœ#˜#Jšœ˜Jšœ˜šœœ˜
šœOœ˜TJšœ#˜#Jšœ1˜1—šœOœ˜TJšœ#˜#Jšœ1˜1—šœNœ˜SJšœ#˜#Jšœ5˜5———Jšœ.˜.Jšœ%™%Jšœ˜—Jšœ1˜1Jšœ\œ3˜“—J˜�Jšœ˜—J™�J™�—�…—����!–��0Í��