Init4BitBricks:
PROC [] =
BEGIN
CDTechnology.TeachColor[cut, 4, [7*ss, 11*ss, 7*ss, 11*ss]];
CDTechnology.TeachColor[dif, 4, CDTechnology.Brick4[green]];
CDTechnology.TeachColor[nwelCont, 4, [1*ss, 1*ss, 2*ss, 1*ss]];
CDTechnology.TeachColor[pol, 4, CDTechnology.Brick4[red]];
CDTechnology.TeachColor[met, 4, CDTechnology.Brick4[blue]];
CDTechnology.TeachColor[imp, 4, [14, 14, 0, 0]];
CDTechnology.TeachColor[imp0, 4, [14, 14, 0, 1]];
CDTechnology.TeachColor[impWeak, 4, [14, 14, 0, 2]];
CDTechnology.TeachColor[met2, 4, [2*(s1+s2+s3), 2*ss, 2*(s1+s2+s3)+15*s4, 2*ss]];
CDTechnology.TeachColor[nwel, 4, [8*s1, 0, 0, 0]];
CDTechnology.TeachColor[bur, 4, [11*ss, 11*ss, 11*ss, 11*ss]];
CDTechnology.TeachColor[ovg, 4, [8*ss, 8*ss, 8*ss, 8*ss]];
CDTechnology.TeachColor[snerd, 4, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[cut2, 4, [3*ss, 14*ss, 3*ss, 14*ss]];
END;
tipTable: Rope.ROPE ← NIL;
Init:
PROC [] =
BEGIN
TerminalIO.WriteRope["nmos impl\n"];
nmos ← CD.RegisterTechnology[$nmos, "nmos"];
IF nmos=NIL THEN ERROR;
cut ← CD.NewLevel[nmos, $cut];
pol ← CD.NewLevel[nmos, $pol];
dif ← CD.NewLevel[nmos, $dif];
met ← CD.NewLevel[nmos, $met];
imp ← CD.NewLevel[nmos, $imp];
imp0 ← CD.NewLevel[nmos, $imp0];
impWeak ← CD.NewLevel[nmos, $impWeak];
ovg ← CD.NewLevel[nmos, $ovg];
bur ← CD.NewLevel[nmos, $bur];
snerd ← CD.NewLevel[nmos, $snerd];
nwel ← CD.NewLevel[nmos, $nwel];
nwelCont ← CD.NewLevel[nmos, $nwelCont];
NOcOL ← CD.NewLevel[nmos, $NOcOL];
met2 ← CD.NewLevel[nmos, $met2];
cut2 ← CD.NewLevel[nmos, $cut2];
UserProfile.CallWhenProfileChanges[NoteProfileChange];
CDTechnology.TeachColor[cut, 1, [7*ss, 11*ss, 7*ss, 11*ss]];
CDTechnology.TeachColor[cut, 8, [7*sf, 11*sf, 7*sf, 11*sf]];
CDTechnology.TeachColor[cut2, 1, [3*ss, 14*ss, 3*ss, 14*ss]];
CDTechnology.TeachColor[cut2, 8, [3*ss, 14*ss, 3*ss, 14*ss]];
CDTechnology.TeachColor[dif, 1, [4*ss, ss, 4*ss, ss]];
CDTechnology.TeachColor[dif, 8, [1*sf, 1*sf, 1*sf, 1*sf]];
CDTechnology.TeachColor[pol, 1, [8*ss, 4*ss, 2*ss, 1*ss]];
CDTechnology.TeachColor[pol, 8, [4*sf, 4*sf, 4*sf, 4*sf]];
CDTechnology.TeachColor[met, 1, [8*ss, 2*ss, 0, 0]];
CDTechnology.TeachColor[met, 8, [2*sf, 2*sf, 2*sf, 2*sf]];
CDTechnology.TeachColor[imp, 1, [2*ss, 0, 2*ss, 0]];
CDTechnology.TeachColor[imp, 8, [14, 14, 0, 0]];
CDTechnology.TeachColor[imp0, 1, [2*ss, 0, 2*ss, 1]];
CDTechnology.TeachColor[imp0, 8, [14, 14, 0, 1]];
CDTechnology.TeachColor[impWeak, 1, [2*ss, 0, 2*ss, 2]];
CDTechnology.TeachColor[impWeak, 8, [14, 14, 0, 2]];
CDTechnology.TeachColor[met2, 1, [8*ss, 8*ss, 2*ss, 2*ss]];
CDTechnology.TeachColor[met2, 8, [2*sf, 29*sf, 2*sf, 37*sf]];
CDTechnology.TeachColor[nwel, 1, [4*ss, 0, 0, 0]];
CDTechnology.TeachColor[nwel, 8, [8*s1, 0, 0, 0]];
CDTechnology.TeachColor[ovg, 1, [4*ss, 14*ss, 4*ss, 0*ss]];
CDTechnology.TeachColor[ovg, 8, [8*sf, 8*sf, 8*sf, 8*sf]];
CifName[cut, "$NC"];
CifName[dif, "$N"];
CifName[pol, "$NP"];
CifName[met, "$NM"];
CifName[imp, "$NI"];
CifName[imp0, "$ERROR"];
CifName[impWeak, "$ERROR"];
CifName[nwel, "$Y"];
CifName[ovg, "$NG"];
CifName[bur, "$NB"];
CifName[snerd, "$U"];
CifName[nwelCont, "$W"];
CifName[NOcOL, "$X"];
CifName[met2, "$NM2"];
CifName[cut2, "$NC2"];
CDPanel.DefineLevelEntry[nmos, dif, "dif", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[nmos, pol, "pol", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[nmos, met, "met", 0, 3*CD.lambda];
CDPanel.DefineLevelEntry[nmos, cut, "cut", 0, 0];
CDPanel.DefineLevelEntry[nmos, ovg, "ovg", 0, 0];
CDPanel.DefineLevelEntry[nmos, met2, "met2", 0, 3*CD.lambda];
CDPanel.DefineLevelEntry[nmos, cut2, "cut2", 0, 0];
CDPanel.DefineIntEntry[cdValueKey: $CDxSelectNewMode, tech: nmos,
text: "select new:", min: 0, max: 1, default: 1];
CDPanel.DefineNewLine[nmos];
CDPanel.DefineIntEntry[cdValueKey: $CDxStepValue, tech: nmos, text: "step moves size:", min: 1, default: 1];
CDPanel.DefineIntEntry[cdValueKey: $CDxStretchyMove, tech: nmos,
text: "stretchy:", min: 0, max: 1, default: 0];
CDPanel.DefineNewLine[nmos];
BEGIN
patNo: INT = UserProfile.Number[key: "Chipndale.NMos.ChipmonkColorPatternNum", default: 0];
IF patNo#0 THEN {ReadCMPatterns[]; SetChipmonkPatterns[patNo]}
END;
CDEvents.RegisterEventProc[$WriteTechnologyPrivate, WriteTechnologyKey, nmos];
CDEvents.RegisterEventProc[$ReadTechnologyPrivate, ReadTechnologyKey, nmos];
CDSequencer.ImplementCommand[$SetLayerDif, SetLevelDif, nmos];
CDSequencer.ImplementCommand[$SetLayerPol, SetLevelPol, nmos];
CDSequencer.ImplementCommand[$SetLayerMet, SetLevelMet, nmos];
CDSequencer.ImplementCommand[$SetLayerMet2, SetLevelMet2, nmos];
Commander.Register[
key: "CDNewNmos",
proc: NewNWorld,
doc: "Creates new nmos design"
];
Commander.Register[
key: "CDNMosPatterns",
proc: CMPatterns,
doc: "Read chipndale color patterns"
];