CmosDesignRules:
PUBLIC
PROC [designRuleParms: Route.DesignRulesParameters]
RETURNS[designRules: Route.DesignRules ←
NEW[Route.DesignRulesRec]] = {
Define the routing design rules for CMOS double or single layer metal.
cndObj: CD.Object;
designRules.trunkDirection ← designRuleParms.trunkDirection;
designRules.branchDirection ← IF designRuleParms.trunkDirection = horizontal THEN vertical ELSE horizontal;
designRules.trunkLayer ← IF designRuleParms.trunkDirection = horizontal THEN designRuleParms.horizLayer ELSE designRuleParms.vertLayer;
designRules.branchLayer ← IF designRuleParms.trunkDirection = horizontal THEN designRuleParms.vertLayer ELSE designRuleParms.horizLayer;
cndObj ← GetContact[designRules.trunkLayer, designRules.branchLayer];
designRules.branchWidth ← GetWidth[designRules.branchLayer];
designRules.branchSpacing ← GetSpacing[designRules.branchLayer];
designRules.branchToContact ← GetMaterialToContact[designRules.branchLayer, cndObj];
designRules.trunkToTrunk ← designRuleParms.trunkToTrunk;
designRules.branchToBranch ← MAX[designRules.branchWidth + designRules.branchSpacing, designRules.branchToContact];
designRules.branchOffset ← designRules.branchSpacing;
designRules.trunkWidth ← GetWidth[designRules.trunkLayer];
designRules.trunkSpacing ← GetSpacing[designRules.trunkLayer];
designRules.trunkToContact ← GetMaterialToContact[designRules.trunkLayer, cndObj];
designRules.trunkOffset ← designRules.trunkSpacing;
designRules.contactSize ← ContactSize[cndObj];
designRules.contactToContact ← designRules.contactSize + MAX[designRules.trunkSpacing, designRules.branchSpacing];
designRules.pinSpacing ← designRuleParms.pinSpacing;
designRules.trunkToEdge ← designRuleParms.trunkToEdge};
DesignRulesParameters:
PUBLIC
PROC [technology:
CD.Technology, horizLayer, vertLayer:
CD.Layer, trunkDirection: DABasics.Direction]
RETURNS[designRuleParms: Route.DesignRulesParameters] = {
Define the routing design rules for CMOS double or single layer metal.
trunkLayer: CD.Layer ← IF trunkDirection = horizontal THEN horizLayer ELSE vertLayer;
branchLayer: CD.Layer ← IF trunkDirection = horizontal THEN vertLayer ELSE horizLayer;
cndObj: CD.Object ← GetContact[trunkLayer, branchLayer];
contactToContact: DABasics.Number ← ContactSize[cndObj] + MAX[GetSpacing[trunkLayer], GetSpacing[branchLayer]];
trunkToTrunk: DABasics.Number ← MAX[GetWidth[trunkLayer] + GetSpacing[trunkLayer], GetMaterialToContact[trunkLayer, cndObj], contactToContact];
pinSpacing: DABasics.Number ← ContactSize[cndObj]/2 + GetWidth[branchLayer]/2 + GetWidth[branchLayer];
trunkToEdge: DABasics.Number ← MAX[GetSpacing[branchLayer], GetSpacing[trunkLayer]] + MAX[ContactSize[cndObj], GetWidth[trunkLayer]]/2;
designRuleParms ← NEW[Route.DesignRulesParametersRec ← [technology: technology, horizLayer: horizLayer, vertLayer: vertLayer, trunkDirection: trunkDirection, trunkToTrunk: trunkToTrunk, pinSpacing: pinSpacing, trunkToEdge: trunkToEdge]]};
}.