SmallCachePrechImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Jean-Marc Frailong, May 9, 1988
Pradeep Sindhu May 11, 1988 0:18:46 am PDT
Eval proc for special 2.5V precharge cell so that Rosemary won't loop until the end of times...
DIRECTORY
Core, CoreFlat, CoreProperties, Logic, Ports, Rosemary, Sisyph, SmallCacheLogic;
SmallCachePrechImpl: CEDAR PROGRAM
IMPORTS CoreFlat, CoreProperties, Logic, Ports, Rosemary, Sisyph
EXPORTS SmallCacheLogic
~ BEGIN OPEN SmallCacheLogic;
Prech
transistor: PUBLIC CoreFlat.CutSet ← CoreFlat.CreateCutSet[labels: LIST ["Prech"]];
Prech: PUBLIC PROC [cx: Context, ds: Ports.Drive] RETURNS [ct: CellType] ~ {
Return the cell with the right eval proc set
ct ← Sisyph.ES["Prech.sch", cx];
[] ← CoreFlat.CellTypeCutLabels[Rosemary.BindCellType[ct, "Prech"], "Prech", Logic.logicCutSet];
CoreProperties.PutCellTypeProp[ct, $DriveStrength, NEW[Ports.Drive ← ds]];
Ports.InitPorts[ct, l, none, "In", "Prech", "Vdd", "Gnd"]; Ports.InitPorts[ct, l, drive, "nX"];
};
PrechRef: TYPE ~ REF PrechRep;
PrechRep: TYPE ~ RECORD [in, nx, prech: NATLAST [NAT], ds: Ports.Drive ← none];
PrechInit: Rosemary.InitProc ~ {
state: PrechRef ← IF oldStateAny=NIL THEN NEW[PrechRep] ELSE NARROW[oldStateAny];
ds: Ports.Drive ← NARROW[CoreProperties.GetCellTypeProp[cellType, $DriveStrength], REF Ports.Drive]^;
[state.in, state.nx, state.prech] ← Ports.PortIndexes[cellType.public, "In", "nX", "Prech"];
state.ds ← ds;
stateAny ← state
};
PrechSimple: Rosemary.EvalProc ~ {
state: PrechRef ← NARROW[stateAny];
SELECT p[state.prech].l FROM
L => p[state.in].d ← none; -- normal state
H => {p[state.in].l ← H; p[state.in].d ← state.ds}; -- drive an H on the INPUT
X => {p[state.in].l ← X; p[state.in].d ← state.ds}; -- drive an X on the INPUT
ENDCASE => ERROR;
p[state.nx].l ← Ports.NotL[p[state.in].l]; -- always
};
[] ← Rosemary.Register["Prech", PrechInit, PrechSimple];
END.