-- Layer Constraints.
nDifChannel ← NEW[ CircuitConstraint ← [ $NDifChannel, 2,,,TRUE, polSpinifex]];
nDifInWellError ← NEW[ CircuitConstraint ← [ $NDifInWellError, 3]];
excludeNDifByWell ← NEW[ CircuitConstraint ← [ $ExcludeNDifByWell, 4]];
contactNDif ← NEW[ CircuitConstraint ← [ $ContactNDif, 5,,,TRUE, ndifSpinifex]];
excludeNDifByPWellCont ← NEW[ CircuitConstraint ← [ $ExcludeNDifByPWellCont, 6,,,TRUE, pdifSpinifex]];
nDifAndPDifError ← NEW[ CircuitConstraint ← [ $NDifAndPDifError, 7]];
buriedNDifPol ← NEW[ CircuitConstraint ← [ $NDifAndPDifError, 8]];
excludeNDifByPWellCont.withNode ← nDifAndPDifError.withNode ← nDifAndPDifError;
excludeNDifByWell.withNode ← nDifInWellError.withNode ← nDifInWellError;
contactNDif.withNode ← contactNDif;
ConfResSetup[ nDifAndPDifError, nDifAndPDifError,
nDifChannel, nDifInWellError, excludeNDifByWell, contactNDif, excludeNDifByPWellCont, buriedNDifPol];
ConfResSetup[ nDifAndPDifError, excludeNDifByPWellCont,
nDifChannel, nDifInWellError, contactNDif, buriedNDifPol];
excludeNDifByPWellCont.withConstraint ← CONS[ [excludeNDifByWell, excludeNDifByPWellCont], excludeNDifByPWellCont.withConstraint];
ConfResSetup[ contactNDif, contactNDif, nDifChannel,
nDifInWellError, excludeNDifByWell];
ConfResSetup[ nDifInWellError, nDifChannel,
nDifInWellError, excludeNDifByWell];
ConfResSetup[ nDifInWellError, nDifInWellError,
excludeNDifByWell, buriedNDifPol];
buriedNDifPol.withNode ← buriedNDifPol;
buriedNDifPol.withConstraint ← CONS[ [excludeNDifByWell, nDifInWellError], buriedNDifPol.withConstraint];
ConfResSetup[ buriedNDifPol, buriedNDifPol, contactNDif, nDifChannel];
pDifChannel ← NEW[ CircuitConstraint ← [ $PDifChannel, 2,,,TRUE, polSpinifex]];
contactPDif ← NEW[ CircuitConstraint ← [ $ContactPDif, 5,,,TRUE, pdifSpinifex]];
pDifAndNDifError ← NEW[ CircuitConstraint ← [ $PDifAndNDifError, 3]];
excludePDifByNWellCont ← NEW[ CircuitConstraint ← [ $ExcludePDifByNWellCont, 4,,,TRUE, ndifSpinifex]];
contactPDif.withNode ← contactPDif;
excludePDifByNWellCont.withNode ← pDifAndNDifError.withNode ← pDifAndNDifError;
pDifChannel.withConstraint ← LIST[ [contactPDif, pDifChannel]];
ConfResSetup[ pDifAndNDifError, pDifChannel, pDifAndNDifError, excludePDifByNWellCont];
ConfResSetup[ pDifAndNDifError, contactPDif, pDifAndNDifError, excludePDifByNWellCont];
ConfResSetup[ pDifAndNDifError, pDifAndNDifError, excludePDifByNWellCont];
channelEdge ← NEW[ CircuitConstraint ← [ $ChannelEdge, SpinifexCircuit.spaceIndex]];
polXorDif ← NEW[ CircuitConstraint ← [ $PolXorDif, SpinifexCircuit.spaceIndex]];
polAndDif ← NEW[ CircuitConstraint ← [ $polAndDif, SpinifexCircuit.nodeIndex]];
excludePolByNDif ← NEW[ CircuitConstraint ← [ $ExcludePolByNDif, 2,,,TRUE, ndifSpinifex]];
excludePolByPDif ← NEW[ CircuitConstraint ← [ $ExcludePolByPDif, 2,,,TRUE, pdifSpinifex]];
polDifError ← NEW[ CircuitConstraint ← [ $PolDifError, 3]];
excludePolByNDif.withNode ← channelEdge.withNode ← polDifError.withNode ← polDifError;
excludePolByPDif.withNode ← channelEdge.withNode ← polDifError.withNode ← polDifError;
ConfResSetup[ channelEdge, channelEdge,
excludePolByNDif, excludePolByPDif, polXorDif];
ConfResSetup[ polDifError, polDifError,
excludePolByNDif, excludePolByPDif, channelEdge];
ConfResSetup[ channelEdge, polXorDif,
excludePolByNDif, excludePolByPDif];
polAndDif.withNode ← polAndDif;
ConfResSetup[ polAndDif, polAndDif,
excludePolByNDif, excludePolByPDif, polXorDif, polDifError, channelEdge];
excludePolByNDif.withConstraint ← LIST[ [excludePolByPDif, excludePolByNDif]]; -- This is always an error, but the handling for it is on the pDifLayer & nDifLayer.
-- Basic cMosHandle & cdLayerMappings.
cMosHandle ← NEW[SpinifexCircuit.TechHandle ← [
errorLevel~CD.highLightError,
numSpinifexLayers~6,
layerInterestBloat~[nDifLayerSep, difSep, polSep, metSep, m2Sep, l,,],
CombineNodeProperties~CopyWellConnections,
CellPostProcess~CheckWellConnections]
];
cMosHandle.illegalLevel[CMos.nwelCont] ← FALSE;
cMosHandle.illegalLevel[CMos.pwelCont] ← FALSE;
cMosHandle.illegalLevel[CMos.ndif] ← FALSE;
cMosHandle.illegalLevel[CMos.pdif] ← FALSE;
cMosHandle.illegalLevel[CMos.nwel] ← FALSE;
cMosHandle.illegalLevel[CMos.pol] ← FALSE;
cMosHandle.illegalLevel[CMos.met] ← FALSE;
cMosHandle.illegalLevel[CMos.met2] ← FALSE;
cMosHandle.cdLayerMapping[CMos.nwelCont] ← LIST[ [ndifSpinifex, difSep], [wellSpinifex, l, NEW[ SpinifexCircuit.BoxMapProc ← AttachNWellContact]], [pdifSpinifex, difSep, excludePDifByNWellCont], [ndifSpinifex, difSep, contactNDif], [polSpinifex, difToPolExtSep, excludePolByNDif]]; -- Order Important for well plugging, node is created in first mapping, and used in second.
cMosHandle.cdLayerMapping[CMos.pwelCont] ← LIST[ [pdifSpinifex, difSep], [ndifSpinifex, difSep, excludeNDifByPWellCont], [pdifSpinifex, difSep, contactPDif], [polSpinifex, difToPolExtSep, excludePolByPDif]];
cMosHandle.cdLayerMapping[CMos.ndif] ← LIST[ [ndifSpinifex, difSep], [polSpinifex, difToPolExtSep, excludePolByNDif]];
cMosHandle.cdLayerMapping[CMos.pdif] ← LIST[ [pdifSpinifex, difSep], [polSpinifex, difToPolExtSep, excludePolByPDif]];
cMosHandle.cdLayerMapping[CMos.nwel] ← LIST[ [ndifSpinifex, nDifToWell-difSep, excludeNDifByWell], [wellSpinifex, l]]; -- INTERIM
cMosHandle.cdLayerMapping[CMos.pol] ← LIST[ [polSpinifex, polSep]];
cMosHandle.cdLayerMapping[CMos.met] ← LIST[ [metSpinifex, metSep]];
cMosHandle.cdLayerMapping[CMos.met2] ← LIST[ [m2Spinifex, m2Sep]];
CDProperties.PutPropOnTechnology[onto~ CMos.cmos, prop~SpinifexAtoms.spinifex, val~cMosHandle];
-- Technology specific objects.
CDObjectProcs.RegisterFurther[key~SpinifexAtoms.spinifex, technology~CMos.cmos ! CD.Error => IF ec = doubleRegistration THEN CONTINUE];
CDObjectProcs.RegisterFurther[key~SpinifexAtoms.thymePrint, technology~CMos.cmos ! CD.Error => IF ec = doubleRegistration THEN CONTINUE];
CDObjectProcs.RegisterFurther[key~SpinifexAtoms.rosePrint, technology~CMos.cmos ! CD.Error => IF ec = doubleRegistration THEN CONTINUE];
ObjInit[ objectType~$CMosTransistor, conv~ConvTransistor, thyme~ThymeTransistor, rose~RoseTransistor];
ObjInit[ objectType~$CMosPTypeTransistor, conv~ConvTransistor, thyme~ThymeTransistor, rose~RoseTransistor];
ObjInit[ objectType~$CMosATransistor, conv~ConvTransistor, thyme~ThymeTransistor, rose~RoseTransistor];
ObjInit[ objectType~$CMosPTypeATransistor, conv~ConvTransistor, thyme~ThymeTransistor, rose~RoseTransistor];
ObjInit[ objectType~$CMosPDifRect, conv~ConvertPDifRect];
InitContacts[];
ObjInit[ objectType~$CMosContactDifAndPol, conv~ConvertContact];
ObjInit[ objectType~$CMosContactWellDifAndPol, conv~ConvertContact];
ObjInit[ objectType~$CMosContactBut, conv~ConvertContact];
ObjInit[ objectType~$CMosContactWellBut, conv~ConvertContact];
ObjInit[ objectType~$CMosBurContact, conv~ConvertContact];
ObjInit[ objectType~$CMosWellBurContact, conv~ConvertContact];
ObjInit[ objectType~$CMosMmContact, conv~ConvertContact];