GCTestTiny.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, September 8, 1986 12:39:08 pm PDT
To run the general cell tiny test package: GCTestTiny.cm
DIRECTORY
CD, CDIO, Core, GC, IPMainViewer, PW, PWCore, Rope, RTCoreUtil, RTStructure, RTTestUtil;
GCTestTiny: CEDAR PROGRAM
IMPORTS CDIO, GC, PW, PWCore, RTCoreUtil, RTTestUtil
SHARES GC =
BEGIN
PinFilter: RTStructure.CorePinFilterProc ~ {
PROC [wire: Core.Wire, instance: CD.Instance, range: Range, side: RTBasic.Side, layer: CD.Layer, userData: REF ANY] RETURNS [keepIt: BOOLEANTRUE];
rules: GC.DesignRules ← NARROW[userData];
SELECT side FROM
bottom, top => keepIt ← rules.horizRules.branchLayer = layer;
left, right => keepIt ← rules.vertRules.branchLayer = layer;
ENDCASE => keepIt ← FALSE;
};
libName: Rope.ROPE ←"SCLibCMOSB.dale";
hMaterial: Rope.ROPE ← "metal";
vMaterial: Rope.ROPE ← "metal2";
cellType: Core.CellType ← RTTestUtil.CreateCore[libName];
technologyKey: ATOM ← $cmosB;   -- $cmosA or $cmosB
name: Rope.ROPE ← "GCTestTiny";
result: GC.Result;
context: GC.Context;
rules: GC.DesignRules ← GC.CreateDesignRules[technologyKey, hMaterial, vMaterial];
structure: RTStructure.Structure ← GC.CreateStructure[cellType, RTCoreUtil.defaultFlatten, PinFilter, rules, PWCore.extractMode.decoration, NIL];
GC.InitialPlace[structure, CDIO.MakeName[name, "init", CDIO.GetWorkingDirectory[]]];
context ← GC.CreateContext[name, structure, rules];
-- IPMainViewer.BuildViewer[name];
-- IPMainViewer.SetTopTo[NARROW[context.topology], structure.name, FALSE];
GC.DoInitialGlobalRoute[context];
result ← GC.DoDetailRoute[context];
RTStructure.PrintStructure[structure];
[] ← PW.Draw[result.object];
END.