public class XMLRules
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
XMLRules.XMLRule
Local class to store information
|
Modifier and Type | Field and Description |
---|---|
java.util.HashMap<Layer,java.util.Set<Layer>> |
layersWithRules
Layers with spacing rules to speed up the process
|
java.util.HashMap<XMLRules.XMLRule,XMLRules.XMLRule>[] |
matrix
Hash map to store rules per matrix index
|
Constructor and Description |
---|
XMLRules(Technology t) |
Modifier and Type | Method and Description |
---|---|
void |
addRelationship(Layer lay1,
Layer lay2)
Method to add relationship between layers with spacing rules.
|
void |
addRule(int index,
DRCTemplate rule)
Method to add a rule based on template
|
void |
addRule(int index,
DRCTemplate rule,
DRCTemplate.DRCRuleType spacingCase,
boolean wideRules)
OLD FUNCTION
|
void |
applyDRCOverrides(java.lang.String override,
Technology tech)
Method to apply overrides to a set of rules.
|
void |
deleteRule(int index,
DRCTemplate rule)
Method to delete a given spacing rule
|
boolean |
doesAllowMultipleWideRules(int index)
Method to tell UI if multiple wide rules are allowed
|
DRCTemplate |
getEdgeRule(Layer layer1,
Layer layer2)
Method to find the edge spacing rule between two layer.
|
DRCTemplate |
getExtensionRule(Layer layer1,
Layer layer2,
boolean isGateExtension)
Method to find the extension rule between two layer.
|
boolean |
getMaxSurround(Layer layer,
double maxSize,
MutableDouble worstLayerRule)
Method to find the maximum design-rule distance around a layer.
|
DRCTemplate |
getMinValue(Layer layer,
DRCTemplate.DRCRuleType type)
Method to get the minimum
|
java.lang.String[] |
getNodesWithRules()
To retrieve those nodes whose have rules
|
int |
getNumberOfRules()
Method to get total number of rules stored
|
XMLRules.XMLRule |
getRule(int index,
DRCTemplate.DRCRuleType type)
Method to retrieve simple layer or node rules
|
XMLRules.XMLRule |
getRule(int index,
DRCTemplate.DRCRuleType type,
java.lang.String nodeName)
Method to retrieve specific SURROUND rules stored per node that involve two layers
|
int |
getRuleIndex(int index1,
int index2)
Method to determine the index in the upper-left triangle array for two layers/nodes.
|
java.util.List<DRCTemplate> |
getRules(Layer layer1,
DRCTemplate.DRCRuleType type)
Method to find all rules of specified type associated to Layer layer1
|
DRCTemplate |
getSpacingRule(Layer layer1,
Geometric geo1,
Layer layer2,
Geometric geo2,
boolean connected,
int multiCut,
double wideS,
double length)
Method to find the spacing rule between two layer.
|
java.util.List<DRCTemplate> |
getSpacingRules(int index,
DRCTemplate.DRCRuleType spacingCase,
boolean wideRules)
Method to retrieve different spacing rules depending on spacingCase.
|
Technology |
getTechnology()
Method to determine the technology associated with this rules set.
|
boolean |
getWorstSpacingDistance(int lastMetal,
MutableDouble worstDistance)
Method to find the worst spacing distance in the design rules.
|
boolean |
getWorstSpacingDistance(java.util.Set<Layer> layers,
MutableDouble worstDistance)
Method to find the worst spacing distance in the design rules.
|
boolean |
hasLayerRules(Layer layer)
Fast method to know if a layer has any DRC rule associated with it
|
boolean |
isAnySpacingRule(Layer layer1,
Layer layer2)
Method to tell whether there are any design rules between two layers.
|
DRCTemplate |
isForbiddenNode(int nodeIndex,
DRCTemplate.DRCRuleType type)
Method to determine if given node is not allowed by foundry
|
void |
loadDRCRules(Technology tech,
Foundry foundry,
DRCTemplate theRule,
boolean pSubstrateProcess)
Method to build "factory" design rules, given the current technology settings.
|
void |
setMinValue(Layer layer,
java.lang.String name,
double value,
DRCTemplate.DRCRuleType type)
Method to set the minimum
|
void |
setSpacingRules(int index,
java.util.List<DRCTemplate> newRules,
DRCTemplate.DRCRuleType spacingCase,
boolean wideRules) |
void |
setWideLimits(double[] values)
To set wide limit for old techs
// * @param values
|
public java.util.HashMap<XMLRules.XMLRule,XMLRules.XMLRule>[] matrix
public XMLRules(Technology t)
public Technology getTechnology()
public int getRuleIndex(int index1, int index2)
index1
- the first layer/node index.index2
- the second layer/node index.public DRCTemplate getEdgeRule(Layer layer1, Layer layer2)
layer1
- the first layer.layer2
- the second layer.public boolean doesAllowMultipleWideRules(int index)
index
- public int getNumberOfRules()
public java.lang.String[] getNodesWithRules()
public java.util.List<DRCTemplate> getSpacingRules(int index, DRCTemplate.DRCRuleType spacingCase, boolean wideRules)
index
- spacingCase
- wideRules
- public void setSpacingRules(int index, java.util.List<DRCTemplate> newRules, DRCTemplate.DRCRuleType spacingCase, boolean wideRules)
index
- newRules
- spacingCase
- SPACING for normal case, SPACINGW for wide case, CUTSPA for multi cutswideRules
- public XMLRules.XMLRule getRule(int index, DRCTemplate.DRCRuleType type)
index
- the index of the layer or nodetype
- the rule type.public XMLRules.XMLRule getRule(int index, DRCTemplate.DRCRuleType type, java.lang.String nodeName)
index
- the combined index of the two layers involvedtype
- nodeName
- list containing the name of the primitivepublic DRCTemplate getMinValue(Layer layer, DRCTemplate.DRCRuleType type)
layer
- the Layer to examine.type
- rule typepublic void setMinValue(Layer layer, java.lang.String name, double value, DRCTemplate.DRCRuleType type)
layer
- the Layer to examine.name
- the rule namevalue
- the new rule valuetype
- rule typepublic void setWideLimits(double[] values)
public void deleteRule(int index, DRCTemplate rule)
index
- rule
- public void addRule(int index, DRCTemplate rule, DRCTemplate.DRCRuleType spacingCase, boolean wideRules)
public void addRule(int index, DRCTemplate rule)
index
- rule
- public void addRelationship(Layer lay1, Layer lay2)
public DRCTemplate getSpacingRule(Layer layer1, Geometric geo1, Layer layer2, Geometric geo2, boolean connected, int multiCut, double wideS, double length)
layer1
- the first layer.layer2
- the second layer.connected
- true to find the distance when the layers are connected.multiCut
- true to find the distance when this is part of a multicut contact.wideS
- widest polygonlength
- length of the intersectionpublic java.util.List<DRCTemplate> getRules(Layer layer1, DRCTemplate.DRCRuleType type)
layer1
- layertype
- rule typepublic DRCTemplate getExtensionRule(Layer layer1, Layer layer2, boolean isGateExtension)
layer1
- the first layer.layer2
- the second layer.isGateExtension
- to decide between the rule EXTENSIONGATE or EXTENSIONpublic boolean isAnySpacingRule(Layer layer1, Layer layer2)
layer1
- the first Layer to check.layer2
- the second Layer to check.public DRCTemplate isForbiddenNode(int nodeIndex, DRCTemplate.DRCRuleType type)
nodeIndex
- index of node in DRC rules map to examinetype
- rule typepublic boolean getWorstSpacingDistance(int lastMetal, MutableDouble worstDistance)
lastMetal
- last metal to check if only metal values are requestedworstDistance
- the largest spacing distance in the Technology. Zero if nothing foundpublic boolean getWorstSpacingDistance(java.util.Set<Layer> layers, MutableDouble worstDistance)
worstDistance
- the largest spacing distance in the Technology. Zero if nothing foundpublic boolean hasLayerRules(Layer layer)
layer
- Layer object to analyzepublic boolean getMaxSurround(Layer layer, double maxSize, MutableDouble worstLayerRule)
layer
- the Layer to examine.maxSize
- the maximum design-rule distance around the layer.worstLayerRule
- -1 if nothing found.public void applyDRCOverrides(java.lang.String override, Technology tech)
override
- the override string.tech
- the Technology in which these rules live.public void loadDRCRules(Technology tech, Foundry foundry, DRCTemplate theRule, boolean pSubstrateProcess)