DIRECTORY
CD, CDIO, CDOps, Core, PWCore, Rope, SC, RTTestUtil;
BEGIN
result: SC.Result;
libName: Rope.ROPE ←"PLTCELLTest.dale";
hMaterial: Rope.ROPE ← "metal";
vMaterial: Rope.ROPE ← "metal2";
libDesign: CD.Design ← CDIO.ReadDesign[libName, NIL, CDIO.GetWorkingDirectory[]];
cellType: Core.CellType ← RTTestUtil.CreateCore[libName];
cdDesign: CD.Design ← CDOps.CreateDesign[libDesign.technology];
rules: SC.DesignRules ← SC.CreateDesignRules[cdDesign.technology.key, hMaterial, vMaterial, horizontal];
handle: SC.Handle ← SC.CreateHandle[cellType: cellType, flattenCellType: NIL, libName: libName, designRules: rules, name: "SCTestFSM", decoration: PWCore.extractMode.decoration];
SC.InitialPlace[handle, 0];
SC.SAPlaceImprove[handle: handle, saParms: SC.SAGetParms[handle, SC.SAInitialPlace[handle], cellType]];
SC.GlobalRoute[handle];
SC.PosImprove[handle, 2];
SC.OrientImprove[handle, 2];
result ← SC.DetailRoute[handle];
RTTestUtil.WriteLayout[result.object, handle.name, cdDesign];
SC.Destroy[handle];
END.