DAUserCmdsImpl.mesa
Copyright Ó 1986, 1987 by Xerox Corporation. All rights reserved.
Last Edited by: Louis Monier January 7, 1987 8:15:20 pm PST
Last Edited by: Christian Jacobi, January 7, 1987 11:41:28 am PST
Bertrand Serlet January 27, 1987 2:07:32 pm PST
DIRECTORY CD, CDDebug, CDSequencer, CDSimpleOps, Core, CoreFlat, CoreOps, CoreProperties, IO, PWCore, Rope, SinixOps, Sisyph, Static, TerminalIO;
DAUserCmdsImpl: CEDAR PROGRAM
IMPORTS CDDebug, CDSequencer, CDSimpleOps, CoreFlat, CoreOps, CoreProperties, IO, PWCore, Rope, SinixOps, Sisyph, Static, TerminalIO
= BEGIN
ExtractAndLayout: PROC [comm: CDSequencer.Command] = {
ob: CD.Object; badDesign: CD.Design;
root, cellType: Core.CellType;
[root: root, cell: cellType] ← SinixOps.SelectedCellType[comm.design, Sisyph.mode];
IF root=NIL THEN RETURN; -- Extraction ended in error, message already printed
TerminalIO.PutF["\nGenerating layout for %g.\n", IO.rope[CoreOps.GetCellTypeName[cellType]]];
ob ← PWCore.Layout[cellType];
badDesign ← CDDebug.Draw[ob].dummyDesign;
[] ← CDSimpleOps.RenameDesign[badDesign, Rope.Cat["view only """, badDesign.name, """"]]
};
-- We use the cutsets specified by Logic
ExtractAndStatic: PROC [comm: CDSequencer.Command] = {
root, cellType: Core.CellType;
[root: root, cell: cellType] ← SinixOps.SelectedCellType[comm.design, Sisyph.mode];
IF root=NIL THEN RETURN; -- Extraction ended in error, message already printed
TerminalIO.PutF["\nStatic checking %g.\n", IO.rope[CoreOps.GetCellTypeName[cellType]]];
Static.CountDirectConnections[cellType, Static.CheckCount, IF CoreProperties.GetCellTypeProp[cellType, Static.staticCutSetProp]=NIL THEN CoreFlat.CreateCutSet[labels: LIST["Logic", "LogicMacro"]] ELSE NIL];
TerminalIO.PutF["Finished static checking %g.\n", IO.rope[CoreOps.GetCellTypeName[cellType]]];
};
CDSequencer.ImplementCommand[key: $DAUserXNLayout, proc: ExtractAndLayout, queue: doQueue];
CDSequencer.ImplementCommand[key: $DAUserXNStatic, proc: ExtractAndStatic, queue: doQueue];
END.