com.sun.electric.technology
Class DRCTemplate

java.lang.Object
  extended by com.sun.electric.technology.DRCTemplate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XMLRules.XMLRule

public class DRCTemplate
extends java.lang.Object
implements java.io.Serializable

Class to define rules from TSCM files...

See Also:
Serialized Form

Nested Class Summary
static class DRCTemplate.DRCMode
           
static class DRCTemplate.DRCRuleType
           
static class DRCTemplate.DRCTemplateSort
          Auxiliar class to sort areas in array
static class DRCTemplate.DRCXMLBucket
          Class used to store read rules and foundry associated to them
static class DRCTemplate.DRCXMLParser
          Public XML Parser for DRC decks
 
Field Summary
 java.lang.String condition
           
 double maxWidth
           
 double minLength
           
 int multiCuts
           
 java.lang.String name1
           
 java.lang.String name2
           
 java.lang.String nodeName
           
 java.lang.String ruleName
           
 DRCTemplate.DRCRuleType ruleType
           
static DRCTemplate.DRCTemplateSort templateSort
           
 double[] values
           
 int when
           
 
Constructor Summary
DRCTemplate(DRCTemplate rule)
           
DRCTemplate(java.lang.String rule, int when, DRCTemplate.DRCRuleType ruleType, double maxW, double minLen, double[] vals, int multiCut)
          For different spacing depending on wire length and multi cuts.
DRCTemplate(java.lang.String rule, int when, DRCTemplate.DRCRuleType ruleType, double maxW, double minLen, java.lang.String name1, java.lang.String name2, double[] vals, int multiCut)
          For different spacing depending on wire length and multi cuts.
DRCTemplate(java.lang.String rule, int when, DRCTemplate.DRCRuleType ruleType, java.lang.String name1, java.lang.String name2, double[] vals, java.lang.String nodeName, java.lang.String condition)
           
 
Method Summary
static java.lang.String covertToXMLFormat(java.lang.String orig)
          Method to transform strings into XML-compatible characters.
static void exportDRCDecks(java.lang.String fileName, Technology tech)
          Method to export DRC rules in XML format
static void exportDRCRule(java.io.PrintWriter out, DRCTemplate rule)
           
static java.lang.String getSpacingCombinedName(Layer layer, Geometric geo)
          Method to build combined name in special spacing rules
 double getValue(int i)
           
static DRCTemplate.DRCXMLParser importDRCDeck(java.net.URL fileURL, boolean verbose)
          Method to import DRC deck from a file provided by URL.
 boolean isRuleIgnoredInPWellProcess(boolean pWellProcess)
          Method to detect if a given rule could be ignored if the process is a PWell process
static boolean parseXmlElement(java.util.List<DRCTemplate> drcRules, java.lang.String qName, org.xml.sax.Attributes attributes, java.lang.String localName)
           
 void setValue(int i, double val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templateSort

public static final DRCTemplate.DRCTemplateSort templateSort

ruleName

public java.lang.String ruleName

when

public int when

ruleType

public DRCTemplate.DRCRuleType ruleType

name1

public java.lang.String name1

name2

public java.lang.String name2

values

public double[] values

maxWidth

public double maxWidth

minLength

public double minLength

nodeName

public java.lang.String nodeName

multiCuts

public int multiCuts

condition

public java.lang.String condition
Constructor Detail

DRCTemplate

public DRCTemplate(DRCTemplate rule)

DRCTemplate

public DRCTemplate(java.lang.String rule,
                   int when,
                   DRCTemplate.DRCRuleType ruleType,
                   java.lang.String name1,
                   java.lang.String name2,
                   double[] vals,
                   java.lang.String nodeName,
                   java.lang.String condition)

DRCTemplate

public DRCTemplate(java.lang.String rule,
                   int when,
                   DRCTemplate.DRCRuleType ruleType,
                   double maxW,
                   double minLen,
                   double[] vals,
                   int multiCut)
For different spacing depending on wire length and multi cuts.


DRCTemplate

public DRCTemplate(java.lang.String rule,
                   int when,
                   DRCTemplate.DRCRuleType ruleType,
                   double maxW,
                   double minLen,
                   java.lang.String name1,
                   java.lang.String name2,
                   double[] vals,
                   int multiCut)
For different spacing depending on wire length and multi cuts.

Method Detail

isRuleIgnoredInPWellProcess

public boolean isRuleIgnoredInPWellProcess(boolean pWellProcess)
Method to detect if a given rule could be ignored if the process is a PWell process

Parameters:
pWellProcess -
Returns:
true if a given rule could be ignored if the process is a PWell process.

getValue

public double getValue(int i)

setValue

public void setValue(int i,
                     double val)

importDRCDeck

public static DRCTemplate.DRCXMLParser importDRCDeck(java.net.URL fileURL,
                                                     boolean verbose)
Method to import DRC deck from a file provided by URL. Note: it has to be URL otherwise it won't file the file in Electric jar file.

Parameters:
fileURL -
verbose -
Returns:
parsed information

covertToXMLFormat

public static java.lang.String covertToXMLFormat(java.lang.String orig)
Method to transform strings into XML-compatible characters.

Parameters:
orig - Original string
Returns:
Modified string that is XML-compatible.

exportDRCDecks

public static void exportDRCDecks(java.lang.String fileName,
                                  Technology tech)
Method to export DRC rules in XML format

Parameters:
fileName -
tech -

exportDRCRule

public static void exportDRCRule(java.io.PrintWriter out,
                                 DRCTemplate rule)

getSpacingCombinedName

public static java.lang.String getSpacingCombinedName(Layer layer,
                                                      Geometric geo)
Method to build combined name in special spacing rules

Parameters:
layer -
geo -
Returns:
combined name in special spacing rules

parseXmlElement

public static boolean parseXmlElement(java.util.List<DRCTemplate> drcRules,
                                      java.lang.String qName,
                                      org.xml.sax.Attributes attributes,
                                      java.lang.String localName)