DIRECTORY Atom, CCDUtils, CD, Commander, CommandTool, Core, CoreFrame, CoreGlue, CoreName, CoreXform, DragOpsCross, IFUCoreData, IFUSrc, IO, PW, Process, Rope; IFUSrcImpl: CEDAR PROGRAM IMPORTS CCDUtils, Commander, CommandTool, CoreFrame, CoreGlue, CoreName, CoreXform, IFUCoreData, IFUSrc, IO, PW, Process, Rope EXPORTS IFUSrc = BEGIN ROPE: TYPE = Core.ROPE; ifuContext: PUBLIC CoreName.Context _ CoreName.NewContext[]; dShIn: PUBLIC ROPE _ CoreName.RopeNm["DShIn"]; dShLeftOut: PUBLIC ROPE _ CoreName.RopeNm["DShLeftOut"]; dShRightOut: PUBLIC ROPE _ CoreName.RopeNm["DShRightOut"]; dShOut: PUBLIC ROPE _ CoreName.RopeNm["DShOut"]; ProcRegToList: PUBLIC PROC [reg: DragOpsCross.ProcessorRegister] RETURNS[LIST OF REF] = {val: CARDINAL _ LOOPHOLE[reg]; RETURN[CardToList[val, 8]]}; CardToList: PUBLIC PROC [val, size: CARDINAL] RETURNS[new: LIST OF REF] = { new _ NIL; THROUGH [0..size) DO new _ CONS[(IF (val MOD 2)=1 THEN "VDD" ELSE "GND"), new]; val _ val/2; ENDLOOP}; TestSwitching: PROC RETURNS[cellType: Core.CellType] = { cellType _ IFUCoreData.CellProc[ subClass: "SwitchBox", name: "TestSwitching", top: "(A.)", bot: "(NIL A.)", xform: CoreXform.GenXform[LIST[ [2, 0] ]] ]}; TranslateCellName: PROC[name: ROPE] RETURNS[cell: Core.CellType] = { cell _ SELECT CoreName.RopeNm[name] FROM CoreName.RopeNm[ "Complete" ] => IFUSrc.Complete[], CoreName.RopeNm[ "PadTop" ] => IFUSrc.PadTop[], CoreName.RopeNm[ "PadHeart" ] => IFUSrc.PadHeart[], CoreName.RopeNm[ "PadBot" ] => IFUSrc.PadBot[], CoreName.RopeNm[ "PadLt" ] => IFUSrc.PadLt[], CoreName.RopeNm[ "HeartLt" ] => IFUSrc.HeartLt[], CoreName.RopeNm[ "Heart" ] => IFUSrc.Heart[], CoreName.RopeNm[ "PadRt" ] => IFUSrc.PadRt[], CoreName.RopeNm[ "LeftColumn" ] => IFUSrc.LeftColumn[], CoreName.RopeNm[ "DataColumn" ] => IFUSrc.DataColumn[], CoreName.RopeNm[ "RightColumn" ] => IFUSrc.RightColumn[], CoreName.RopeNm[ "LeftColumnTop" ] => IFUSrc.LeftColumnTop[], CoreName.RopeNm[ "FetchIndexing" ] => IFUSrc.FetchIndexing[], CoreName.RopeNm[ "FetchControler" ] => IFUSrc.FetchControler ["testing", dShLeftOut].cellType, CoreName.RopeNm[ "LtDrPadIO" ] => IFUSrc.LtDrPadIO["testing"].cellType, CoreName.RopeNm[ "LeftColumnBot" ] => IFUSrc.LeftColumnBot[], CoreName.RopeNm[ "StackControler" ] => IFUSrc.StackControler["testing"].cellType, CoreName.RopeNm[ "Interlock" ] => IFUSrc.Interlock[dShIn].cellType, CoreName.RopeNm[ "MainPipeControl" ] => IFUSrc.MainPipeControl["testing"].cellType, CoreName.RopeNm[ "StackIndexing" ] => IFUSrc.StackIndexing[], CoreName.RopeNm[ "InstrDecode" ] => IFUSrc.InstrDecode ["testing", dShRightOut].cellType, CoreName.RopeNm[ "RtDrPadIO" ] => IFUSrc.RtDrPadIO[dShLeftOut].cellType, CoreName.RopeNm[ "StatusControl" ] => IFUSrc.StatusControl[], CoreName.RopeNm[ "DataColumnTop" ] => IFUSrc.DataColumnTop[], CoreName.RopeNm[ "Fetch" ] => IFUSrc.Fetch[], CoreName.RopeNm[ "FetchBuf" ] => IFUSrc.FetchBuf[], CoreName.RopeNm[ "XaForm" ] => IFUSrc.XaForm[], CoreName.RopeNm[ "PCFormTop" ] => IFUSrc.PCFormTop[], CoreName.RopeNm[ "PCFormBot" ] => IFUSrc.PCFormBot[], CoreName.RopeNm[ "DataColumnBot" ] => IFUSrc.DataColumnBot[], CoreName.RopeNm[ "StackBuf" ] => IFUSrc.StackBuf[], CoreName.RopeNm[ "LSForm" ] => IFUSrc.LSForm[], CoreName.RopeNm[ "ABForm" ] => IFUSrc.ABForm[], CoreName.RopeNm[ "ControlPipe" ] => IFUSrc.ControlPipe[], ENDCASE => NIL}; IFUBatchBuildRun: Commander.CommandProc = { log: IO.STREAM _ CoreFrame.GetLog[]; cell: Core.CellType _ NIL; line: ROPE _ "RollBackAnd IFUPack; IFUBatchBuild "; list: LIST OF ROPE _ CommandTool.ParseToList[cmd].list; IF list=NIL THEN RETURN[$Done, "\nIFUBatchBuild Loaded\n"]; cell _ TranslateCellName[ list.first]; log.Close[]; IF cell=NIL THEN cmd.err.PutRope[" -- Unknown name\n"]; IF list.rest=NIL THEN { [ ] _ CommandTool.DoCommand["Source IFUBatchBuildFinish.cm", cmd]; RETURN[$Done, "\nIFUBatchBuild Complete\n"]}; FOR list _ list.rest, list.rest WHILE list#NIL DO line _ Rope.Cat[line, " ", list.first] ENDLOOP; [ ] _ CommandTool.DoCommand[line, cmd]}; IFUBatchPlotRun: Commander.CommandProc = { cell: Core.CellType _ NIL; line: ROPE _ "RollBackAnd IFUBatchPlot"; list: LIST OF ROPE _ CommandTool.ParseToList[cmd].list; FOR list _ list, list.rest WHILE list#NIL DO [ ] _ CommandTool.DoCommand[IO.PutFR ["CDPlot -n /Indigo/Dragon/IFUModules/%g.dale", IO.rope[list.first]], cmd]; [ ] _ CommandTool.DoCommand[IO.PutFR ["Copy /Indigo/Dragon/IFUModules/%g.pd _ PD/Plot1.pd", IO.rope[list.first]], cmd]; [ ] _ CommandTool.DoCommand[IO.PutFR ["PeachPrint -n /Indigo/Dragon/IFUModules/%g.pd", IO.rope[list.first]], cmd]; ENDLOOP; RETURN[$Done, "\nIFUBatchPlot Complete\n"]}; RunCTSoft: Commander.CommandProc = { log: IO.STREAM _ CoreFrame.GetLog[]; nofArgs: INT _ CommandTool.NumArgs[cmd]; top: Core.CellType _ NIL; recCell: Core.CellType _ NIL; obj: CD.Object _ NIL; cleanUp: BOOL _ FALSE; status: CoreGlue.Status; build: LIST OF ROPE; list: LIST OF ROPE; comlist: LIST OF ROPE _ CommandTool.ParseToList[cmd].list; FOR list _ comlist, list.rest WHILE list#NIL DO Next: PROC RETURNS[next: ROPE] = {IF list.rest=NIL THEN ERROR; list _ list.rest; next _ list.first}; SELECT list.first.Fetch[0] FROM '- => SELECT list.first.Fetch[1] FROM 'B, 'b => build _ CONS[Next[], build]; 'C, 'c => cleanUp _ TRUE; ENDCASE; ENDCASE => build _ CONS[list.first, build]; ENDLOOP; top _ IFUSrc.ABForm[]; CoreFrame.Expand[hard, top]; status _ CoreGlue.RouteHard[top]; IF status#complete2 THEN Signal[]; obj _ CCDUtils.Layout[top]; [] _ PW.Draw[obj] }; Signal: SIGNAL = CODE; Commander.Register[proc: IFUBatchBuildRun, key: "IFUBatchBuild"]; Commander.Register[proc: IFUBatchPlotRun, key: "IFUBatchPlot"]; Commander.Register[proc: RunCTSoft, key: "IFUSrc"]; Process.SetPriority[Process.priorityBackground] END. hIFUSrcImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited by Curry, July 23, 1986 7:02:10 pm PDT IF build.rest # NIL THEN RETURN [$Failure, "\nWhat did you hope to accomplish with multiple frame names?\n"]; IF build.first=NIL THEN build _ CONS["Complete", build]; top _ NARROW[Atom.GetProp[$IFUFrames, build.first]]; top _ IFUSrc.FetchControler[]; top _ TestSwitching[]; IF status#complete2 THEN RETURN[$Failure, "Routing Errors"]; IF CoreConnect.Connect[top]#TRUE THEN RETURN[$Failure, "Connection Errors"]; top _ CoreOps.Recast[top]; CoreOps.PrintCellType[top, log]; }; ʘšœ™Jšœ<™