<> <> <> <<>> DIRECTORY CCDUtils, CDOrient, 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: "(FetchWtIndexCtlHoldBA FetchWtIndexCtlIncBA FetchWtIndexCtlClearBA)", in: "(WtAB. WtSumB. GND)", 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) (GND GND OpLengthAB.0 OpLengthAB.1 OpLengthAB.2) 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"]; IF (cellType _ CoreFrame.ReadFrameCache[name])=NIL THEN { leftRouting: Core.CellType _ CoreGlue.ChanSideCell [side: left, layer: CCDUtils.cmosMet, list: LIST["GND/50", "VDD/50"] ]; cellType _ CoreFrame.NewFrameCells[ name: "FetchIndexingMain", rec: [first: top, orient: CDOrient.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] ]]; CoreFrame.WriteFrameCache[cellType]} }; 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"]; IF (cellType _ CoreFrame.ReadFrameCache[name])=NIL THEN { PLAD: TYPE = IFUCoreCtl.PLADescriptionRec; FetchSection: TYPE = {pre, ctl, idx, 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] ]], idx: NIL, ctl: NEW[PLAD _ [name: "IFUPLAFetchControl", plaPhs: [BA, A, AB, B, BA] ]], pre: NEW[PLAD _ [name: "IFUPLAFetchPreDecode", plaPhs: [AB, A, ABB, A, AB] ]] ]; <> <> sOut _ sIn; FOR p: FetchSection IN FetchSection DO OPEN DR: IFUCoreDrive; drs: IFUCoreDrive.Drives; dr: IFUCoreDrive.Drive; IF plaDscs[p]=NIL THEN LOOP; plaDscs[p].inSh _ sOut; plaDscs[p].plaType _ hot; IFUCoreCtl.MakePLA1[plaDscs[p]]; IF p=ctl THEN { drs _ plaDscs[p].inDrs; dr_DR.FindDrive[drs, "JumpPendingBA"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchingBA"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchBytesM1BA.4"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchBytesM1BA.3"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchBytesM1BA.2"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchBytesM1BA.1"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "FetchBytesM1BA.0"]; dr.in.ph _ AB; dr_DR.FindDrive[drs, "IPFaultedBA"]; dr.in.ph _ AB; drs _ plaDscs[p].outDrs; dr_DR.FindDrive[drs, "JumpPendingBA"]; dr.ref.ph _ A; dr.out.ph _ AB; dr_DR.FindDrive[drs, "FetchingBA"]; dr.ref.ph _ A; dr.out.ph _ AB; dr_DR.FindDrive[drs, "IPFaultedBA"]; dr.ref.ph _ A; dr.out.ph _ AB}; IF p=pre THEN { drs _ plaDscs[p].inDrs; dr_DR.FindDrive[drs, "IPFaultingAB"]; dr.in.ph _ BA; drs _ plaDscs[p].outDrs; dr_DR.FindDrive[drs, "OpLengthbAB.0"]; dr.ref.ph _ B; dr.out.ph _ BA; dr_DR.FindDrive[drs, "OpLengthbAB.1"]; dr.ref.ph _ B; dr.out.ph _ BA; dr_DR.FindDrive[drs, "OpLengthbAB.2"]; dr.ref.ph _ B; dr.out.ph _ BA; dr_DR.FindDrive[drs, "InstFault0AB"]; dr.ref.ph _ B; dr.out.ph _ BA}; 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 ]] ]], CoreFrame.NewFrameCells[name: "ExtendedFetchPreCtl", rec: [first: left], cells: LIST[ CoreGlue.CellProc[l: ext, r: conn], IFUCoreCtl.CellProc[ complete, plaDscs[ pre ]] ]] ]]; IFUCoreDrive.SetDShiftIO[cellType, sIn, sOut]; CoreFrame.WriteFrameCache[cellType]}; [sIn, sOut] _ IFUCoreDrive.GetDShiftIO[cellType]; cellType _ CoreFrame.NewFrameCells[ name: "FetchControlerFillX", rec: [first: left], cells: LIST[ CoreGlue.CellProc[l: ext, r: conn], cellType ]]}; <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> END. <<>> <<>>