Area:
PROC [ct: Core.CellType, testName:
ROPE ←
NIL]
RETURNS [area:
REAL] ~ {
Uses LogicUtilsImpl (horribile visu) to compute SC cell area in sq mm. The first-level instance named testName is the one for which the size is returned, except that if testName is NIL, then the size of the whole celltype is returned.
table: HashTable.Table ← HashTable.Create[equal: HashTable.RopeEqual, hash: HashTable.HashRope];
target: Core.CellType ← NIL;
IF testName#
NIL
THEN {
-- locate named instance in RCT
record: CoreClasses.RecordCellType ← NARROW [ct.data];
FOR i:
NAT
IN [0..record.size)
DO
IF Rope.Equal[CoreClasses.GetCellInstanceName[record.instances[i]], testName] THEN target ← record.instances[i].type;
ENDLOOP;
IF target=NIL THEN ERROR;
}
ELSE target ← ct; -- use ct itself
area ← LogicUtilsImpl.Size[target, table].size*1040.0/1000000.0; -- in sq mm
};
Delay:
PROC [ct: Core.CellType]
RETURNS [delay:
REAL] ~ {
Uses Mint to compute worst case delay through a cell, in ns
circuit: Mint.Circuit;
clkList: Mint.NodeList;
gndNode, vddNode: Mint.Node;
WriteCapa.WriteWireCapa[ct];
circuit ← Mint.InputData[ct, FALSE];
vddNode ← Mint.NodeFromRope["public.Vdd", circuit];
Mint.SetNode[vddNode, TRUE];
gndNode ← Mint.NodeFromRope["public.Gnd", circuit];
Mint.SetNode[gndNode, FALSE];
Mint.PrepareSets[circuit, LIST[gndNode, vddNode]];
clkList ← LIST[ Mint.NodeFromRope["CK", circuit]];
delay ← Mint.MaxFreqEvaluate[circuit: circuit, clkList: clkList, numberOfPaths: 1, from: 0.0, histOk: FALSE].worst/1000.0; -- in ns
Mint.KillCircuit[circuit];
};