DIRECTORY Commander USING [CommandProc, Register], ExpertPinRead USING [PinTable, PinInfoList, ReadPinFile], IO USING [card, Close, GetTokenRope, int, PutF, RIS, rope, STREAM], FS USING [StreamOpen], Rope USING [Cat, ROPE], SymTab USING [EachPairAction, Pairs]; ExpertSinglePinNets: CEDAR PROGRAM IMPORTS Commander, ExpertPinRead, FS, IO, Rope, SymTab = BEGIN ROPE: TYPE = Rope.ROPE; ExpertSinglePinNetsProc: Commander.CommandProc = BEGIN PrintSinglePinNets: SymTab.EachPairAction ~ { pinInfoList: ExpertPinRead.PinInfoList _ NARROW[val]; IF pinInfoList.rest = NIL THEN { singlePinNetNumber _ singlePinNetNumber + 1; IO.PutF[out, "%g \t%g \tpin %g \tpage %g\n", IO.rope[key], IO.rope[pinInfoList.first.refDes], IO.int[pinInfoList.first.pinNumber], IO.int[pinInfoList.first.pageNumber]]; }; }; pinTable: ExpertPinRead.PinTable; singlePinNetNumber: CARD _ 0; stream: IO.STREAM _ IO.RIS[cmd.commandLine]; name: ROPE _ IO.GetTokenRope[stream].token; inputName: ROPE _ Rope.Cat[name, ".pinlist"]; outputName: ROPE _ Rope.Cat[name, ".singlepinnets"]; out: IO.STREAM _ FS.StreamOpen[outputName, $create]; IO.PutF[cmd.out, "Reading %g\n", IO.rope[inputName]]; pinTable _ ExpertPinRead.ReadPinFile[inputName]; IO.PutF[cmd.out, "Writing %g\n", IO.rope[outputName]]; [] _ SymTab.Pairs[pinTable, PrintSinglePinNets]; IO.Close[out]; IO.PutF[cmd.out, "\nNumber of single pin nets: %g\n\n", IO.card[singlePinNetNumber]]; END; Commander.Register[ key: "ExpertSinglePinNets", proc: ExpertSinglePinNetsProc, doc: "Read an Expert .pinlist file and generates a .singlepinnets file\n"]; END. ŽExpertSinglePinNets.mesa Christophe Cuenod February 7, 1988 0:51:42 am PST Reads a .pinlist file and output the results on the screen Κ—–i(firstHeadersAfterPage) {1} .cvx .def (firstPageNumber) {1} .cvx .def (oneSidedFormat) {.false} .cvx .def– "Cedar" style˜– "Cedar" stylešœ™Icodešœ1™1—J™Iunit™:šΟk ˜ Kšœ œ˜(Kšœœ&˜9Kšœœ(œœ˜CKšœœ˜Kšœœœ˜Kšœœ˜%—šΟnœœ˜"Kšœœœ˜9—Lš˜Lšœœœ˜K– "cedar" style˜– "cedar" stylešžœ˜6K˜šžœ˜-Kšœ)œ˜5šœœœ˜ K˜,Kš œ-œ œ!œ#œ$˜«K˜—K˜—K˜Kšœ!˜!K˜Kš œœœœœ˜,Kšœœœ˜+Kšœ œ˜-Kšœ œ$˜4Kšœœœœ!˜4Jšœœ˜5Jšœ0˜0Jšœœ˜6Jšœ0˜0Jšœ ˜Jšœ6œ˜UJšœ˜—šœ˜Jšœ†˜†—Iprocšœ˜—…—* O