<> <> <> <<>> DIRECTORY CD, CDCells, CDCommandOps, CDSequencer, TerminalIO, WireIcons; WIGenerator: CEDAR PROGRAM IMPORTS CDCells, CDCommandOps, TerminalIO, WireIcons = BEGIN ExtractorGenerator: PROC [comm: CDSequencer.Command] = { index, increment, count, size: INT; deltaX: INT _ comm.pos.x-comm.sPos.x; deltaY: INT _ comm.pos.y-comm.sPos.y; index _ TerminalIO.RequestInt["Starting index of the extracted wire? "]; increment _ TerminalIO.RequestInt["Index increment? "]; count _ TerminalIO.RequestInt["Number of repititions? "]; size _ TerminalIO.RequestInt["Size of the structured wire? "]; FOR i: INT IN [0..count) DO [] _ CDCells.IncludeOb[ design: comm.design, ob: WireIcons.MakeExtractor[comm.design, index+i*increment, size].obj, trans: [off: [comm.sPos.x+i*deltaX, comm.sPos.y+i*deltaY]] ]; ENDLOOP; }; RangeExtractorGenerator: PROC [comm: CDSequencer.Command] = { index, increment, count, subSize, size: INT; deltaX: INT _ comm.pos.x-comm.sPos.x; deltaY: INT _ comm.pos.y-comm.sPos.y; index _ TerminalIO.RequestInt["Starting index of the extracted wire? "]; increment _ TerminalIO.RequestInt["Index increment? "]; subSize _ TerminalIO.RequestInt["Size of the extracted wire? "]; count _ TerminalIO.RequestInt["Number of repititions? "]; size _ TerminalIO.RequestInt["Size of the structured wire? "]; FOR i: INT IN [0..count) DO [] _ CDCells.IncludeOb[ design: comm.design, ob: WireIcons.MakeRangeExtractor[comm.design, index+i*increment, subSize, size].obj, trans: [off: [comm.sPos.x+i*deltaX, comm.sPos.y+i*deltaY]] ]; ENDLOOP; }; CDCommandOps.RegisterWithMenu[ menu: $ProgramMenu, entry: "Range Extractor Generator", doc: "", proc: RangeExtractorGenerator ]; CDCommandOps.RegisterWithMenu[ menu: $ProgramMenu, entry: "Extractor Generator", doc: "", proc: ExtractorGenerator ]; END. <<>>