Init4BitBricks:
PROC [] =
BEGIN
CDTechnology.TeachColor[cut, 4, [7*ss, 11*ss, 7*ss, 11*ss]];
CDTechnology.TeachColor[ndif, 4, CDTechnology.Brick4[green]];
CDTechnology.TeachColor[pdif, 4, [1*ss, 3*ss, 1*ss, 1*ss]];
CDTechnology.TeachColor[pwelCont, 4, [1*ss, 1*ss, 0*ss, 1*ss]];
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, CDTechnology.Brick4[yellow, 8800H]];
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[snerd, 4, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[cut2, 4, [3*ss, 14*ss, 3*ss, 14*ss]];
CDTechnology.TeachColor[pwel, 4, [4*s1, 0, 0, 0]];
END;
tipTable: Rope.ROPE ← NIL;
Init:
PROC [] =
BEGIN
TerminalIO.WriteRope["cmos impl\n"];
cmos ← CD.RegisterTechnology[$cmos, "cmos"];
IF cmos=NIL THEN ERROR;
cut ← CD.NewLevel[cmos, $cut];
pol ← CD.NewLevel[cmos, $pol];
ndif ← CD.NewLevel[cmos, $ndif];
met ← CD.NewLevel[cmos, $met];
imp ← CD.NewLevel[cmos, $imp];
ovg ← CD.NewLevel[cmos, $ovg];
bur ← CD.NewLevel[cmos, $bur];
snerd ← CD.NewLevel[cmos, $snerd];
pdif ← CD.NewLevel[cmos, $pdif];
pwelCont ← CD.NewLevel[cmos, $pwelCont];
met2 ← CD.NewLevel[cmos, $met2];
pwel ← CD.NewLevel[cmos, $pwel];
nwel ← CD.NewLevel[cmos, $nwel];
nwelCont ← CD.NewLevel[cmos, $nwelCont];
NOcOL ← CD.NewLevel[cmos, $NOcOL];
cut2 ← CD.NewLevel[cmos, $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[ndif, 1, [4*ss, ss, 4*ss, ss]];
CDTechnology.TeachColor[ndif, 8, CDTechnology.Brick8[green]];
CDTechnology.TeachColor[pdif, 1, [5*ss, ss, 4*ss, ss]];
CDTechnology.TeachColor[pdif, 8, [1*sf, 3*sf, 1*sf, 1*sf]];
CDTechnology.TeachColor[pwelCont, 1, [0*ss, ss, 4*ss, ss]];
CDTechnology.TeachColor[pwelCont, 8, [1*sf, 1*sf, 0*sf, 1*sf]];
CDTechnology.TeachColor[nwelCont, 1, [2*ss, ss, 4*ss, ss]];
CDTechnology.TeachColor[nwelCont, 8, [1*sf, 1*sf, 2*sf, 1*sf]];
CDTechnology.TeachColor[pol, 1, [8*ss, 4*ss, 2*ss, 1*ss]];
CDTechnology.TeachColor[pol, 8, CDTechnology.Brick8[red]];
CDTechnology.TeachColor[met, 1, [8*ss, 2*ss, 0, 0]];
CDTechnology.TeachColor[met, 8, CDTechnology.Brick8[blue]];
CDTechnology.TeachColor[imp, 1, [2*ss, 0, 2*ss, 0]];
CDTechnology.TeachColor[imp, 8, [14, 14, 0, 0]];
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[bur, 1, [4*ss, 14*ss, 4*ss, 0*ss]];
CDTechnology.TeachColor[bur, 8, [11*sf, 11*sf, 11*sf, 11*sf]];
CDTechnology.TeachColor[ovg, 1, [4*ss, 14*ss, 4*ss, 0*ss]];
CDTechnology.TeachColor[ovg, 8, [8*sf, 8*sf, 8*sf, 8*sf]];
CDTechnology.TeachColor[snerd, 1, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[snerd, 8, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[snerd, 1, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[snerd, 8, [12345, 7865, 543, 0]];
CDTechnology.TeachColor[cut2, 1, [3*ss, 14*ss, 3*ss, 14*ss]];
CDTechnology.TeachColor[cut2, 8, [2*ss, 10*ss, 4*ss, 5*ss]];
CDTechnology.TeachColor[pwel, 1, [2*ss, 0, 0, 0]];
CDTechnology.TeachColor[pwel, 8, [4*s1, 0, 0, 0]];
Init4BitBricks[];
CifName[cut, "$NC"];
CifName[ndif, "$N"];
CifName[pol, "$NP"];
CifName[met, "$NM"];
CifName[imp, "$NI"];
CifName[nwel, "$Y"];
CifName[ovg, "$NG"];
CifName[bur, "$NB"];
CifName[snerd, "$U"];
CifName[nwelCont, "$W"];
CifName[NOcOL, "$X"];
CifName[met2, "$NM2"];
CifName[cut2, "$NC2"];
CifName[pdif, "$Q"];
CifName[pwelCont, "$$V"];
CifName[pwel, "$NX"];
CDPanel.DefineLevelEntry[cmos, ndif, "ndif", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[cmos, pdif, "pdif", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[cmos, pwelCont, "p-wCnt", 0, 0];
CDPanel.DefineLevelEntry[cmos, nwelCont, "n-wCnt", 0, 0];
CDPanel.DefineLevelEntry[cmos, pol, "pol", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[cmos, met, "met", 0, 3*CD.lambda];
CDPanel.DefineLevelEntry[cmos, cut, "cut", 0, 0];
CDPanel.DefineLevelEntry[cmos, met2, "met2", 0, 3*CD.lambda];
CDPanel.DefineLevelEntry[cmos, cut2, "cut2", 0, 0];
CDPanel.DefineLevelEntry[cmos, ovg, "ovg", 0, 0];
CDPanel.DefineLevelEntry[cmos, nwel, "nwel", 0, 0];
CDPanel.DefineLevelEntry[cmos, bur, "bur", 0, 0];
CDPanel.DefineIntEntry[cdValueKey: $CDxSelectNewMode, tech: cmos,
text: "select new:", min: 0, max: 1, default: 1];
CDPanel.DefineNewLine[cmos];
CDPanel.DefineIntEntry[cdValueKey: $CDxStepValue, tech: cmos, text: "step moves size:", min: 1, default: 1];
CDPanel.DefineIntEntry[cdValueKey: $CDxStretchyMove, tech: cmos,
text: " stretchy:", min: 0, max: 1, default: 0];
CDPanel.DefineNewLine[cmos];
CDSequencer.ImplementCommand[$SetLayerNDif, SetLevelDif, cmos];
CDSequencer.ImplementCommand[$SetLayerPol, SetLevelPol, cmos];
CDSequencer.ImplementCommand[$SetLayerMet, SetLevelMet, cmos];
CDSequencer.ImplementCommand[$SetLayerMet2, SetLevelMet2, cmos];
CDSequencer.ImplementCommand[$SetLayerPDif, SetLevelPDif, cmos];
CDSequencer.ImplementCommand[$SetLayerNWCnt, SetLevelNWCnt, cmos];
CDSequencer.ImplementCommand[$SetLayerPWCnt, SetLevelPWCnt, cmos];
CDEvents.RegisterEventProc[$WriteTechnologyPrivate, WriteTechnologyKey, cmos];
CDEvents.RegisterEventProc[$ReadTechnologyPrivate, ReadTechnologyKey, cmos];
BEGIN
patNo: INT ← UserProfile.Number[key: "Chipndale.ChipmonkColorPatternNum", default: 0];
IF patNo=0 THEN patNo ← UserProfile.Number[key: "Chipndale.CMos.ChipmonkColorPatternNum", default: 0];
IF patNo#0 THEN {ReadCMPatterns[]; SetChipmonkPatterns[patNo]}
END;
Commander.Register[
key: "CDNewCmos",
proc: NewCWorld,
doc: "Creates new cmos design"
];
Commander.Register[
key: "CDCMosPatterns",
proc: CMPatterns,
doc: "Read chipndale color patterns"
];
Commander.Register[
key: "CDPatterns",
proc: CMPatterns,
doc: "Read chipndale color patterns"
];
END;