GCTest:
CEDAR
PROGRAM
IMPORTS CDDirectory, GC, -- IPMainViewer, -- RTStructure, PW =
BEGIN
TestBasicGC: PROC[design: CD.Design] RETURNS[obj: CD.Object] =
BEGIN
hMaterial: Rope.ROPE ← "metal2";
vMaterial: Rope.ROPE ← "metal";
technologyKey: ATOM ← $cmosB; -- $cmosA or $cmosB
result: GC.Result;
rulesKey: ATOM ← $cmosB;
rules: GC.DesignRules ← GC.CreateDesignRules[rulesKey, technologyKey, hMaterial, vMaterial];
block1: CD.Object ← PW.Get[design, "Block1"];
block2: CD.Object ← PW.Get[design, "Block2"];
block3: CD.Object ← PW.Get[design, "Block3"];
pos1: CD.Position ← [0, 0];
pos2: CD.Position ← [800, 0];
pos3: CD.Position ← [0, 800];
structure: RTStructure.Structure ← GetStructure[name: "GCTest", design: design, o1: block1, o2: block2, o3: block3, p1: pos1, p2: pos2, p3: pos3];
gcContext: GC.Context ← GC.CreateContext["GCTest", structure, rules];
GC.DoInitialGlobalRoute[gcContext, power, goodInternal];
-- IPMainViewer.BuildViewer["GCTest"];
-- IPMainViewer.SetTopTo[NARROW[gcContext.topology], structure.name, FALSE];
result ← GC.DoDetailRoute[gcContext, generalCell];
RETURN[result.object];
END;
GetStructure:
PROC [name: Rope.
ROPE, design: CD.Design, o1, o2, o3, o4, o5:
CD.Object ←
NIL, p1, p2, p3, p4, p5:
CD.Position ← [0, 0]]
RETURNS [structure: RTStructure.Structure] ~ {
UseAll: RTStructure.CDPinFilterProc ~ {keepIt ← TRUE};
structure ← RTStructure.CreateForRopes[name];
IF o1 # NIL THEN RTStructure.InsertInstance[structure: structure, name: CDDirectory.Name[o1, design], position: p1, orientation: original, cdObject: o1, pinFilter: UseAll, userData: NIL, makeHashKey: NIL];
IF o2 # NIL THEN RTStructure.InsertInstance[structure: structure, name: CDDirectory.Name[o2, design], position: p2, orientation: original, cdObject: o2, pinFilter: UseAll, userData: NIL, makeHashKey: NIL];
IF o3 # NIL THEN RTStructure.InsertInstance[structure: structure, name: CDDirectory.Name[o3, design], position: p3, orientation: original, cdObject: o3, pinFilter: UseAll, userData: NIL, makeHashKey: NIL];
IF o4 # NIL THEN RTStructure.InsertInstance[structure: structure, name: CDDirectory.Name[o4, design], position: p4, orientation: original, cdObject: o4, pinFilter: UseAll, userData: NIL, makeHashKey: NIL];
IF o5 # NIL THEN RTStructure.InsertInstance[structure: structure, name: CDDirectory.Name[o5, design], position: p5, orientation: original, cdObject: o5, pinFilter: UseAll, userData: NIL, makeHashKey: NIL];
};
END.