CmosDesignRules:
PUBLIC
PROC [rules: DesignRules.Rules, 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 ← DesignRules.MinWidth[rules, designRules.branchLayer].w;
designRules.branchSpacing ← DesignRules.MinSpace[rules, designRules.branchLayer, designRules.branchLayer].s;
designRules.branchToContact ← GetMaterialToContact[rules, designRules.branchLayer, cndObj];
designRules.trunkToTrunk ← designRuleParms.trunkToTrunk;
designRules.branchToBranch ← MAX[designRules.branchWidth + designRules.branchSpacing, designRules.branchToContact];
designRules.branchOffset ← designRules.branchSpacing;
designRules.trunkWidth ← DesignRules.MinWidth[rules, designRules.trunkLayer].w;
designRules.trunkSpacing ← DesignRules.MinSpace[rules, designRules.trunkLayer, designRules.trunkLayer].s;
designRules.trunkToContact ← GetMaterialToContact[rules, 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 [rules: DesignRules.Rules, 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[DesignRules.MinSpace[rules, trunkLayer, trunkLayer].s, DesignRules.MinSpace[rules, branchLayer, branchLayer].s];
trunkToTrunk: DABasics.Number ←
MAX[DesignRules.MinWidth[rules, trunkLayer].w + DesignRules.MinSpace[rules, trunkLayer, trunkLayer].s, GetMaterialToContact[rules, trunkLayer, cndObj], contactToContact];
pinSpacing: DABasics.Number ← ContactSize[cndObj]/2 + DesignRules.MinWidth[rules, branchLayer].w/2 + DesignRules.MinSpace[rules, branchLayer, branchLayer].s;
trunkToEdge: DABasics.Number ←
MAX[DesignRules.MinSpace[rules, branchLayer, branchLayer].s, DesignRules.MinSpace[rules, trunkLayer, trunkLayer].s] + MAX[ContactSize[cndObj], DesignRules.MinWidth[rules, trunkLayer].w]/2;
designRuleParms ← NEW[Route.DesignRulesParametersRec ← [technology: rules.technology, horizLayer: horizLayer, vertLayer: vertLayer, trunkDirection: trunkDirection, trunkToTrunk: trunkToTrunk, pinSpacing: pinSpacing, trunkToEdge: trunkToEdge]]};
}.