CrystalCmds.mesa
Copyright Ó 1985, 1987 by Xerox Corporation. All rights reserved.
Written by gbb September 20, 1985 11:52:24 am PDT
Louis Monier April 10, 1986 6:44:59 pm PST
Christian Le Cocq April 29, 1987 3:54:06 pm PDT
Bridge beetween ChipNDale, Core and Crystal.
DIRECTORY
CD USING [ Design, Instance, InstanceList],
CDCommandOps USING [RegisterWithMenu],
CDOps USING [InstList],
CDProperties USING [PutDesignProp],
CDSequencer USING [Command],
Core USING [CellType],
Build USING [NetFromCore],
Globals USING [GlobalVars, RunCrystal],
Rope USING [Cat, ROPE],
Sinix USING [Mode],
SinixOps USING [GetExtractMode, ExtractCDInstance],
Sisyph USING [mode],
TerminalIO USING [PutRope],
WriteCapa USING [WriteWireCapa];
CrystalCmds: CEDAR PROGRAM
IMPORTS
CDCommandOps, CDOps, CDProperties, Build, Globals, Rope, Sisyph, SinixOps, TerminalIO, WriteCapa
~ BEGIN
ExtractAndBuild: PROC [mode: Sinix.Mode, comm: CDSequencer.Command] ~ {
IF mode=NIL THEN {
TerminalIO.PutRope [Rope.Cat ["The technology ", comm.design.technology.name, " is not Crystalizable.\n"]];
RETURN
};
FOR all: CD.InstanceList ← CDOps.InstList[comm.design], all.rest WHILE all # NIL DO
IF all.first.selected THEN BEGIN
globalVars: Globals.GlobalVars;
coreCell: Core.CellType ← NARROW[SinixOps.ExtractCDInstance [all.first, comm.design, mode].result];
TerminalIO.PutRope ["\nCoreCell created\n"];
IF mode#Sisyph.mode THEN WriteCapa.WriteWireCapa[coreCell, comm.design.technology.key];
TerminalIO.PutRope ["\nCapacitances added\n"];
globalVars ← Build.NetFromCore[coreCell];
Globals.RunCrystal[globalVars];
END;
ENDLOOP
}; -- ExtractAndBuild
DoCrystalFromLayout: PROC [comm: CDSequencer.Command] ~ {
Called by ChipNDale upon activation of the command.
abort: REF BOOLNEW [BOOLFALSE];
mode: Sinix.Mode ← SinixOps.GetExtractMode[comm.design.technology];
TerminalIO.PutRope ["Crystal\n"];
CDProperties.PutDesignProp [comm.design, $Crystal2CmdDir];
ExtractAndBuild[mode, comm];
TerminalIO.PutRope ["Crystal input finished.\n"];
};
DoCrystalFromSch: PROC [comm: CDSequencer.Command] ~ {
Called by ChipNDale upon activation of the command.
abort: REF BOOLNEW [BOOLFALSE];
TerminalIO.PutRope ["Crystal\n"];
CDProperties.PutDesignProp [comm.design, $Crystal2CmdDir];
ExtractAndBuild[Sisyph.mode, comm];
TerminalIO.PutRope ["Crystal input finished.\n"];
};
CDCommandOps.RegisterWithMenu [menu: $ProgramMenu, entry: "Schema->Crystal", doc: "Critical path finder from schematics", key: $Crystal2SchSel, proc: DoCrystalFromSch];
CDCommandOps.RegisterWithMenu [menu: $ProgramMenu, entry: "Layout->Crystal", doc: "Critical path finder from layout", key: $Crystal2LaySel, proc: DoCrystalFromLayout];
TerminalIO.PutRope ["Crystal package loaded.\n"]
END.