TestPipalCD.cm
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Louis Monier January 18, 1988 10:40:55 am PST
Bertrand Serlet May 26, 1988 2:18:45 pm PDT
Install PipalCD
Run -a PipalCDPackage
Run -a TestPipalCD
← &cdobj ← CDCurves.CreateLine[LIST [[0, 0], [100, 64]], 4, CMosB.pol].ob
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ov ← Pipal.CreateOverlay[LIST [&ob]]
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ov]]
← TestPipalCD.Draw[&ob]
← &ob2 ← TestPipalCD.InOut[&ob]
← &ov2 ← Pipal.CreateOverlay[LIST [&ob2]]
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ov2]]
← TestPipalCD.Draw[&ob2]
← &master ← RopeFile.SimpleCreate["WavesColor.ip"]
← &ob ← PipalMos.CreatePictureFromInterpress[[100, 100], &master]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob2]
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← CDImports.LoadAndBindAll[&design]
← &cdobj ← PW.Get[&design, "nand2.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← &design ← PW.OpenDesign["Logic"]
← &cdobj ← PW.Get[&design, "CounterUp.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &ob ← PipalReal.CreateTransform[ImagerTransformation.Scale[0.2], &ob]
← &viewer ← PipalEdit.CreateViewer[&ob]
← BasicTime.PulsesToSeconds[PipalEditImpl.lastViewerPaintTime]
big object!
TakeHeapStats
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
TakeHeapStats -d
← &ob ← PipalReal.CreateTransform[ImagerTransformation.Scale[0.2], &ob]
← &viewer ← PipalEdit.CreateViewer[&ob]
← BasicTime.PulsesToSeconds[PipalEditImpl.lastViewerPaintTime]
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ob.child.child]]
IO test
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← CDImports.LoadAndBindAll[&design]
← &cdobj ← PW.Get[&design, "nand2.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob]
← TestPipalCD.Draw[&ob2]
← &design ← PW.OpenDesign["Logic"]
← &cdobj ← PW.Get[&design, "CounterUp.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob]
← TestPipalCD.Draw[&ob2]
-- Directory/Import test
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &import ← PipalIO.CreateRefereedImport["Foo.Bar.sch", FALSE, &ob]
← &child ← PipalInt.NthChild[&import].nthChild
← IF LOOPHOLE[&import.creationTime, INT]=LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &bidon ← Pipal.CreateOverlay[LIST[&import]]
← PipalIO.SaveObject["Bidon.sch", &bidon]
← IF LOOPHOLE[&import.creationTime, INT]#LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &table ← RefTab.Create[3, NIL, NIL]
← RefTab.Store[&table, &ob, &ob2]
← PipalOps.TransitiveReplace[&bidon, &table]
← IF RefTab.Fetch[&table, &ob].val=&ob2 THEN $OK ELSE ERROR
← &import2 ← RefTab.Fetch[&table, &import].val
← IF &import2=NIL OR &import2#&import THEN $OK ELSE ERROR
← IF LOOPHOLE[&import2.creationTime, INT]=LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &bidon2 ← RefTab.Fetch[&table, &bidon].val
← IF &bidon2=NIL OR &bidon2#&bidon THEN $OK ELSE ERROR
← PipalIO.SaveObject["Bidon.sch", &bidon2]
← IF LOOPHOLE[&import2.creationTime, INT]#LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
Stats
Statistics on
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← TestPipalCD.Stats[&ob]
← PipalOpsImpl.simpleReplace ← TRUE
← &map1 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map1]
← &ob1 ← RefTab.Fetch[&map1, &ob].val
← IF Pipal.Equal[&ob1, &ob] THEN $OK ELSE ERROR
← &map2 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map2]
← &ob2 ← RefTab.Fetch[&map2, &ob].val
← IF Pipal.Equal[&ob2, &ob] THEN $OK ELSE ERROR
← PipalOpsImpl.simpleReplace ← FALSE
← &map3 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map3]
← &ob3 ← RefTab.Fetch[&map3, &ob].val
← IF Pipal.Equal[&ob3, &ob] THEN $OK ELSE ERROR
← &map4 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map4]
← &ob4 ← RefTab.Fetch[&map4, &ob].val
← IF Pipal.Equal[&ob4, &ob] THEN $OK ELSE ERROR
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← TestPipalCD.Stats[&ob]
← &map ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map]
← &ob ← RefTab.Fetch[&map, &ob].val
← &design ← PW.OpenDesign["TestSinixB"]
← &cdobj ← PW.Get[&design, "TestPinCheckpoint"]
← &ct ← PipalSinix.Extract[&cdobj, PipalSinix.layoutMode].result
← IF PipalCore.GetPins[PipalSinix.layoutMode.decoration, &ct.public[0]].first.obj=PipalCore.GetPins[PipalSinix.layoutMode.decoration, &ct.public[1]].first.obj THEN ERROR ELSE NIL
← &shell ← PipalCore.CreateShell[PipalSinix.layoutMode.decoration, &ct, TRUE]
← &shellCT ← PipalSinix.Extract[&shell, PipalSinix.layoutMode].result
← IF &shellCT.public.size=2 THEN NIL ELSE ERROR
← IF PipalCore.GetPins[PipalSinix.layoutMode.decoration, &shellCT.public[0]].first.obj=PipalCore.GetPins[PipalSinix.layoutMode.decoration, &shellCT.public[1]].first.obj THEN ERROR ELSE NIL
← &shellDesign ← CDOps.CreateDesign[CD.FetchTechnology[$cmosB]]
← CDOps.IncludeObjectI[&shellDesign, &shell, [0, 0], original]
← CDIO.WriteDesign[&shellDesign, "TestPinCheckpoint"]
← &shellDesign ← PW.OpenDesign["TestPinCheckpoint.dale"]
← &shell ← &shellDesign.actual.first.dummyCell.ob.specific.contents.first.ob
← &shellCT ← PipalSinix.Extract[&shell, PipalSinix.layoutMode].result
← IF &shellCT.public.size=2 THEN NIL ELSE ERROR
← IF PipalCore.GetPins[PipalSinix.layoutMode.decoration, &shellCT.public[0]].first.obj=PipalCore.GetPins[PipalSinix.layoutMode.decoration, &shellCT.public[1]].first.obj THEN ERROR ELSE NIL
And the writing of decorations on file
← &design ← PW.OpenDesign["TestSinixB"]
← &cdobj ← PW.Get[&design, "TestIO"]
← &ct ← PipalSinix.Extract[&cdobj, PipalSinix.layoutMode].result
← CoreIO.ReportSaveCellType[&ct]
← &rct ← CoreIO.RestoreCellType["TestIO"]
← &rrct ← CoreOps.Recast[&rct]
← &robj ← PipalCore.GetObject[PipalSinix.layoutMode.decoration, &rrct]
← PW.Draw[&robj]
← &design ← PW.OpenDesign["TestSinixB"]
← &cdobj ← PW.Get[&design, "TestPinCheckpoint"]
← &ct ← PipalSinix.Extract[&cdobj, PipalSinix.layoutMode].result
← CoreIO.ReportSaveCellType[&ct]
← &rct ← CoreIO.RestoreCellType["TestPinCheckpoint"]
← &rrct ← CoreOps.Recast[&rct]
← &robj ← PipalCore.GetObject[PipalSinix.layoutMode.decoration, &rrct]
← PW.Draw[&robj]