SchematicModeComm:
PROC [comm: CDSequencer.Command] = {
GetGrid:
PROC [viewer: ViewerClasses.Viewer]
RETURNS [i:
INT ← -1] = {
WITH ViewerOps.GetViewer[viewer, $Grid]
SELECT
FROM
ri: REF INT => i ← ri^;
ENDCASE => NULL;
};
font: CDTexts.CDFont ← CDPanelFonts.CurrentFont[comm.design];
viewer: ViewerClasses.Viewer ← CDViewer.GetViewer[comm];
IF viewer#
NIL
THEN {
is: INT ← GetGrid[viewer];
goal: INT ← MAX[2*CMosB.lambda, is];
IF goal#is THEN ViewerOps.SetViewer[viewer: viewer, data: NEW[INT←goal], op: $Grid];
};
CDValue.StoreInt[comm.design, $PanelLayerMode, 0];
CDValue.StoreInt[comm.design, $CDxStepValue, 0];
[] ← CDPanel.PutUp[comm.design, $CDxStepValue];
CDLayers.SetCurrentLayer[comm.design, CD.commentLayer];
CDLayers.SetLayerWidth[comm.design, CD.commentLayer, CMosB.lambda/2];
[] ← CDPanel.PutUp[comm.design, $PanelLayerMode];
[] ← CDPanelFonts.SetCurrentFont[comm.design, CDTexts.MakeFont[font.supposedName, CMosB.lambda/2]];
TerminalIO.PutRope["schematics mode\n"];
};
Init:
PROC [] = {
MakeComm:
PROC [key:
ATOM, p: CDSequencer.CommandProc, qm: CDSequencer.QueueMethod𡤍oQueue] = {
CDSequencer.ImplementCommand[key, p, CMosB.cmosB, qm];
};
fontNames:
LIST
OF Rope.
ROPE =
LIST[
"4 Helvetica8", "4 Helvetica8B", "4 Helvetica12", "4 Helvetica6", "4 Helvetica6B",
"4 TimesRoman8", "2 Helvetica8", "1 Helvetica8", "8 Helvetica8", "4 Gates32"];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerComment, CD.commentLayer, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNWell, CMosB.nwell, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPWell, CMosB.pwell, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNDif, CMosB.ndif, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPol, CMosB.pol, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerMet2, CMosB.met2, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerMet, CMosB.met, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPDif, CMosB.wpdif, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNWCnt, CMosB.nwellCont, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPWCnt, CMosB.pwellCont, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerWNWCnt, CMosB.wnwellCont, CMosB.cmosB];
CDCommandOps.RegisterCurrentLayerCommand[$SetLayerWPWCnt, CMosB.wpwellCont, CMosB.cmosB];
MakeComm[$TestDifFlipToPWorld, DiffToPWorld];
MakeComm[$TestDifFlipToNWorld, DiffToNWorld];
MakeComm[$DiffToPWorld, DiffToPWorld];
MakeComm[$DiffToNWorld, DiffToNWorld];
MakeComm[$DrawNXstr, CreateXstr, doQueueAndMark];
MakeComm[$DrawPXstr, CreateXstr, doQueueAndMark];
MakeComm[$DrawWNXstr, CreateXstr, doQueueAndMark];
MakeComm[$DrawWPXstr, CreateXstr, doQueueAndMark];
MakeComm[$DrawAngleNXstr, CreateLXstr, doQueueAndMark];
MakeComm[$DrawAnglePXstr, CreateLXstr, doQueueAndMark];
MakeComm[$DrawAngleWNXstr, CreateLXstr, doQueueAndMark];
MakeComm[$DrawAngleWPXstr, CreateLXstr, doQueueAndMark];
MakeComm[$DrawNDifCon, CreateCont, doQueueAndMark];
MakeComm[$DrawWNDifCon, CreateCont, doQueueAndMark];
MakeComm[$DrawPDifCon, CreateCont, doQueueAndMark];
MakeComm[$DrawWPDifCon, CreateCont, doQueueAndMark];
MakeComm[$DrawPolCon, CreateCont, doQueueAndMark];
MakeComm[$DrawNWCntCon, CreateCont, doQueueAndMark];
MakeComm[$DrawPWCntCon, CreateCont, doQueueAndMark];
MakeComm[$DrawWNWCntCon, CreateCont, doQueueAndMark];
MakeComm[$DrawWPWCntCon, CreateCont, doQueueAndMark];
MakeComm[$DrawLNDifCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLWNDifCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLPDifCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLWPDifCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLPolCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLNWCntCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLPWCntCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLWNWCntCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawLWPWCntCon, CreateLargeCont, doQueueAndMark];
MakeComm[$DrawNDifShortCon, CreateDiffShortCont, doQueueAndMark];
MakeComm[$DrawWNDifShortCon, CreateDiffShortCont, doQueueAndMark];
MakeComm[$DrawPDifShortCon, CreateDiffShortCont, doQueueAndMark];
MakeComm[$DrawWPDifShortCon, CreateDiffShortCont, doQueueAndMark];
MakeComm[$DrawMm2Con, CreateVia, doQueueAndMark];
MakeComm[$DrawLVia, CreateLargeVia, doQueueAndMark];
MakeComm[$SetLayoutMode, LayoutModeComm];
MakeComm[$SetSchematicMode, SchematicModeComm];
CDPanelFonts.ImplementIt[tech: CMosB.cmosB, layerProc: CommentLayer, defaultFonts: fontNames];
CDCommandOps.RegisterCommanderNewDesign[CMosB.cmosB];
};