DIRECTORY CDCommandOps, CDSequencer, Core, CoreOps, IO, Pipal, PipalCore, PipalEdit, PipalExtractOps, PipalInt, PipalOverlayMutant, PipalSinix, PipalUI, TerminalIO; TestPipalSinix: CEDAR PROGRAM IMPORTS CDCommandOps, CoreOps, IO, Pipal, PipalCore, PipalEdit, PipalExtractOps, PipalOverlayMutant, PipalSinix, PipalUI, TerminalIO = BEGIN Draw: PROC [object: Pipal.Object] = { om: PipalOverlayMutant.OverlayMutant; WHILE ISTYPE [object, Pipal.Annotation] DO object _ NARROW [object, Pipal.Annotation].child; ENDLOOP; om _ PipalOverlayMutant.Create[ IF ISTYPE [object, Pipal.Overlay] THEN NARROW [object] ELSE Pipal.CreateOverlay[LIST [object]] ]; [] _ PipalEdit.Edit[om]; }; DrawShell: PROC [cellType: Core.CellType] = { Draw[PipalCore.CreateShell[PipalSinix.layoutMode.decoration, cellType, TRUE]]; }; ExtractCommand: PROC [command: CDSequencer.Command] ~ { EachSelected: PipalUI.EachSelectedProc = { result: REF; nb _ nb + 1; result _ PipalExtractOps.ExtractTopObjectAndReport[child, PipalSinix.schematicsMode].result; IF result=NIL THEN TerminalIO.PutF["*** Extraction returned NIL"] ELSE CoreOps.Print[ref: result, out: TerminalIO.TOS[], level: LAST [NAT]]; TerminalIO.PutF["\n"]; }; nb: INT _ 0; PipalUI.HighlightDesign[command.design]; [] _ PipalUI.EnumerateSelectedObjects[command.design, EachSelected]; IF nb=0 THEN TerminalIO.PutF["*** No instance selected.\n"]; IF nb>1 THEN TerminalIO.PutF["%g instances extracted.\n", IO.int[nb]]; }; ConvertToP: PROC [command: CDSequencer.Command] ~ { EachSelected: PipalUI.EachSelectedProc = {Draw[child]}; [] _ PipalUI.EnumerateSelectedObjects[command.design, EachSelected]; }; CDCommandOps.RegisterWithMenu [$OtherProgramMenu, "Schematic: extract", "calls extractor", $ExtractSchematic, ExtractCommand, doQueue]; CDCommandOps.RegisterWithMenu [$OtherProgramMenu, "Convert to Pipal", "hack", $ConvertToP, ConvertToP, dontQueue]; END. TestPipalSinix.mesa Copyright Σ 1988 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet April 2, 1988 5:57:13 pm PST Bertrand Serlet May 12, 1988 10:56:59 pm PDT Debug Temporary Sch Extraction Temporary Sch Extraction Initialization MakeCMosBShell: PROC [comm: CDSequencer.Command] = { inst: CD.Instance = CDOps.TheInstance[comm.design]; IF inst=NIL THEN RETURN; [] _ CDOps.IncludeObjectI[comm.design, PipalCore.CreateShell[ decoration: mode.decoration, cellType: PipalExtractOps.ExtractCDInstanceCellTypeAndReport[inst, comm.design, mode], withCuteFonts: TRUE], comm.pos]; }; Command to see the shell CDCommandOps.RegisterWithMenu[$Debug, "Make CMosB shell", "Make a shell from the extracted object", $MakeCMosBShell, MakeCMosBShell, doQueue]; ΚΙ˜codešœ™Kšœ<™