DIRECTORY CD, CDSimpleRules, CMosB, CMosBObjects, SymTab; CMosBSimpleRulesImpl: CEDAR PROGRAM IMPORTS CDSimpleRules, CMosB, CMosBObjects, SymTab = BEGIN lambda: CD.Number = CMosB.lambda; MinWidth: PROC [layer: CD.Layer] RETURNS [CD.Number] = BEGIN RETURN [SELECT layer FROM CMosB.met => 3*lambda, CMosB.met2 => 4*lambda, CMosB.pol => 2*lambda, CMosB.ndif, CMosB.pdif, CMosB.wndif, CMosB.wpdif => 2*lambda, CMosB.pwellCont, CMosB.nwellCont => 2*lambda, CMosB.nwell, CMosB.pwell => 12*lambda, ENDCASE => 0 ] END; IsDiff: PROC [layer: CD.Layer] RETURNS [BOOL] = INLINE BEGIN RETURN[layer=CMosB.ndif OR layer=CMosB.pdif OR layer=CMosB.wndif OR layer=CMosB.wpdif OR layer=CMosB.pwellCont OR layer=CMosB.nwellCont]; END; MinDist: PROC [l1, l2: CD.Layer] RETURNS [CD.Number] = BEGIN BaseLayer: PROC [layer: CD.Layer] RETURNS [CD.Layer] = INLINE BEGIN IF layer=CMosB.wndif THEN RETURN [CMosB.ndif]; IF layer=CMosB.wpdif THEN RETURN [CMosB.pdif]; RETURN [layer] END; l1 _ BaseLayer[l1]; l2 _ BaseLayer[l2]; IF l1=CMosB.comment OR l2=CMosB.comment THEN RETURN [0]; IF l1=l2 THEN RETURN [SELECT l1 FROM CMosB.met => 3*lambda, CMosB.met2 => 4*lambda, CMosB.pol => 2*lambda+lambda/2, CMosB.ndif, CMosB.pdif, CMosB.pwellCont, CMosB.nwellCont => 3*lambda+lambda/2, CMosB.pwell, CMosB.nwell => 10*lambda, CMosB.cut => 3*lambda, CMosB.cut2 => 4*lambda, CMosB.imp, CMosB.ovg, CMosB.bur => 0, ENDCASE => 0 ]; IF l2=CMosB.pol THEN {l2 _ l1; l1 _ CMosB.pol}; IF l1=CMosB.pol THEN { IF IsDiff[l2] THEN RETURN[lambda]; IF l2=CMosB.cut THEN RETURN[2*lambda]; RETURN[0]; }; IF l2=CMosB.ndif THEN {l2 _ l1; l1 _ CMosB.ndif}; IF l1=CMosB.ndif THEN { RETURN [SELECT l2 FROM CMosB.pdif => 10*lambda, CMosB.nwell => 5*lambda, CMosB.pwellCont => 7*lambda/2, CMosB.nwellCont => 9*lambda, CMosB.cut => 2*lambda, ENDCASE => 0 ]; }; IF l2=CMosB.pdif THEN {l2 _ l1; l1 _ CMosB.pdif}; IF l1=CMosB.pdif THEN { RETURN [SELECT l2 FROM CMosB.pwell => 5*lambda, CMosB.pwellCont => 9*lambda, CMosB.nwellCont => 7*lambda/2, CMosB.cut => 2*lambda, ENDCASE => 0 ]; }; IF l2=CMosB.pwellCont THEN {l2 _ l1; l1 _ CMosB.pwellCont}; IF l1=CMosB.pwellCont THEN { RETURN [SELECT l2 FROM CMosB.nwell => 4*lambda, CMosB.nwellCont => 8*lambda, CMosB.cut => 2*lambda, ENDCASE => 0 ]; }; IF l2=CMosB.nwellCont THEN {l2 _ l1; l1 _ CMosB.nwellCont}; IF l1=CMosB.nwellCont THEN { RETURN [SELECT l2 FROM CMosB.pwell => 4*lambda, CMosB.cut => 2*lambda, ENDCASE => 0 ]; }; IF l2=CMosB.cut THEN {l2 _ l1; l1 _ CMosB.pdif}; IF l1=CMosB.cut THEN { IF l2=CMosB.cut2 THEN RETURN[2*lambda]; RETURN [0]; }; RETURN [0] END; Contact: PROC [l1, l2: CD.Layer] RETURNS [ob: CD.Object _ NIL] = BEGIN IF l1#CMosB.met AND l2=CMosB.met THEN RETURN [Contact[l2, l1]]; IF l1=CMosB.met THEN { IF l2=CMosB.pol THEN RETURN [CMosBObjects.CreatePolyCon[]]; IF l2=CMosB.met2 THEN RETURN [CMosBObjects.CreateVia[]]; IF l2=CMosB.ndif OR l2=CMosB.pdif OR l2=CMosB.wpdif OR l2=CMosB.wndif THEN RETURN [CMosBObjects.CreateDifCon[difLayer: l2]]; }; END; Init: PROC [] = BEGIN layerTable: SymTab.Ref _ SymTab.Create[case: FALSE]; [] _ layerTable.Insert["n-diff", $ndif]; [] _ layerTable.Insert["p-diff", $wpdif]; [] _ layerTable.Insert["n-well", $nwel]; [] _ layerTable.Insert["nwell", $nwel]; [] _ layerTable.Insert["p-well", $pwel]; [] _ layerTable.Insert["pwell", $pwel]; [] _ layerTable.Insert["poly", $pol]; [] _ layerTable.Insert["metal", $met]; [] _ layerTable.Insert["metal2", $met2]; [] _ layerTable.Insert["pwellCont", $pwelCont]; [] _ layerTable.Insert["nwellCont", $nwellCont]; CDSimpleRules.ImplementTechnology[ technology: CMosB.cmosB, minWidth: MinWidth, minDist: MinDist, contact: Contact, layerTable: layerTable ]; END; Init[]; END. ¬CMosBSimpleRulesImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. by Ch. Jacobi, July 5, 1985 4:58:37 pm PDT last edited Christian Jacobi, March 18, 1986 6:32:56 pm PST BaseLayer: PROC [layer: CD.Layer] RETURNS [CD.Layer] = INLINE BEGIN IF layer=CMosB.wndif OR layer=CMosB.pwellCont THEN RETURN [CMosB.ndif]; IF layer=CMosB.wpdif OR layer=CMosB.nwellCont THEN RETURN [CMosB.pdif]; RETURN [layer] END; Κ˜codešœ™Kšœ Οmœ1™˜>Kšœ-˜-Kšœ&˜&Kšžœ˜ K˜—Kšžœ˜—š   œžœ žœžœžœ ™6Kšžœž™ Kšžœžœžœžœ™GKšžœžœžœžœ™GKšžœ™Kšžœ™—K˜š  œžœ žœžœžœ˜/Kšž ˜ šžœ˜Kšžœ˜Kšžœ˜Kšžœ˜Kšžœ˜Kšžœ˜—Kšžœ˜—K˜š  œžœ žœžœžœ ˜6Kšž˜š   œžœ žœžœžœ ˜6Kšžœž˜ Kšžœžœžœ˜.Kšžœžœžœ˜.Kšžœ˜Kšžœ˜—Kšœ˜Kšœ˜Kšžœžœžœžœ˜8šžœžœ˜šžœžœž˜Kšœ˜Kšœ˜Kšœ ˜ KšœO˜OKšœ&˜&Kšœ˜Kšœ˜Kšœ%˜%Kšžœ˜ K˜——Kšžœžœ˜/šžœžœ˜Kšžœ žœžœ ˜"Kšžœžœžœ ˜&Kšžœ˜ Kšœ˜—Kšžœžœ˜1šžœžœ˜šžœžœž˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšžœ˜ K˜—Kšœ˜—Kšžœžœ˜1šžœžœ˜šžœžœž˜Kšœ˜Kšœ˜Kšœ˜Kšœ˜Kšžœ˜ K˜—Kšœ˜—Kšžœžœ!˜;šžœžœ˜šžœžœž˜Kšœ˜Kšœ˜Kšœ˜Kšžœ˜ K˜—Kšœ˜—Kšžœžœ!˜;šžœžœ˜šžœžœž˜Kšœ˜Kšœ˜Kšžœ˜ K˜—Kšœ˜—Kšžœžœ˜0šžœžœ˜Kšžœžœžœ ˜'Kšžœ˜ Kšœ˜—Kšžœ˜ Kšžœ˜K˜—š  œžœ žœžœžœ žœ˜@Kšž˜Kšžœžœžœžœ˜@šžœžœ˜Kšžœžœžœ!˜