|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.DRC.DesignRuleChecker
This class performs checks against design rules. It contains DesignRule objects. It also manages violation reports.
Field Summary | |
protected CellList |
descendents
descendents is a list of all of the children of topCell |
static int |
FULLDETAIL
|
protected static JHDLOutput |
jout
Use joutDRC for outputting messages about warnings and errors. |
static int |
LONGLIST
|
static int |
SHORTLIST
|
static int |
SUMMARY
|
protected Cell |
topCell
topCell is the Cell to be checked; all descendents of this cell are (generally) checked also. |
protected CellList |
violatingCells
Contains a list of all cells that have a rule violation flagged |
static int |
VIOLATIONS
|
Constructor Summary | |
DesignRuleChecker()
Initializes the DesignRuleChecker without a Cell to check initially. |
|
DesignRuleChecker(Cell topCell)
Initializes the DesignRuleChecker to check the Cell topCell. |
|
DesignRuleChecker(Cell parentCell,
Cell topCell)
|
Method Summary | |
protected void |
addToCellList(CellList list,
Cell cl)
I wasn't sure it would be a good idea to make the insert method of the CellList class public. |
void |
addViolatingCell(Cell cell)
Adds a violating cell to the internal list of violating cells. |
void |
addViolatingCells(java.util.Vector violatingCells)
Adds the elements from the Vector passed in to the master Vector containing violating cells. |
static boolean |
checkRule(Cell parent,
Cell toCheck,
DesignRule rule)
A static utility methods to check one rule against a component set. |
static boolean |
checkRule(Cell parent,
Cell toCheck,
DesignRule rule,
boolean drbFlag)
A static utility methods to check one rule against a component set. |
static boolean |
checkRule(Cell parent,
Cell toCheck,
DesignRule rule,
DesignRuleBrowser drb)
A static utility methods to check one rule against a component set. |
static boolean |
checkRules(Cell parent,
Cell toCheck,
DesignRule[] rules)
A static utility methods to check a set of rules against a component set. |
static boolean |
checkRules(Cell parent,
Cell toCheck,
DesignRule rule,
boolean useBrowser)
A static utility methods to check a set of rules against a component set. |
static boolean |
checkRules(Cell parent,
Cell toCheck,
java.util.Vector rules)
A static utility methods to check a set of rules against a component set. |
static boolean |
checkRules(Cell parent,
Cell toCheck,
java.util.Vector rules,
boolean useBrowser)
A static utility methods to check a set of rules against a component set. |
protected static boolean |
displayMsgHeader(boolean display)
|
boolean |
doCheck()
Initiates the design rule check on topCell |
boolean |
doCheck(Cell newCell)
Initiates the design rule check on a new topCell |
protected static int |
getCurrentMsgType()
Returns the current message outputting mode/type. |
DesignRuleViolation[] |
getDesignRuleViolations()
Returns an array of violations to the previous design rule check routine |
DesignRuleViolation[] |
getDesignRuleViolations(int[] drcvIds)
Returns an array of violations to the previous design rule check routine. |
DesignRuleViolation[] |
getDesignRuleViolationsArray()
Returns an array of violations to the previous design rule check routine. |
DesignRuleViolation[] |
getDesignRuleViolationsArray(int[] drcvIds)
Returns an array of violations to the previous design rule check routine. |
DesignRuleViolation[] |
getDesignRuleViolationsForCells(Cell[] cells)
Returns the set of design rule violations associated with a specific set of cells. |
DesignRuleViolation[] |
getDesignRuleViolationsForSeverityLevel(int severityLevel)
Returns the set of design rule violations for a specific severity level. |
java.util.Vector |
getDesignRuleViolationsVector()
Returns a Vector of violations to the previous design rule check routine. |
java.util.Vector |
getDesignRuleViolationsVector(int[] drcvIds)
This uses an algorithm of O(n^2). |
int |
getNumRulesChecked()
Returns the number of design rules checked. |
int |
getNumRulesFailed()
Returns the number of design rules checked and failed. |
int |
getNumRulesPassed()
Returns the number of design rules checked and passed. |
java.lang.String |
getReport()
Returns the full report from the last check routine. |
java.lang.String |
getReport(int reportFormat)
Returns a complete report of the test(s) performed. |
Cell |
getTopCell()
Returns a reference to the top-level cell which this DesignRuleChecker is checking |
void |
initDRC(Cell topCell)
Common constructor code for initialization. |
static void |
msg(JHDLException je)
Outputs the stack trace of je to the user based on the value of currentMessageType. |
static void |
msg(JHDLException je,
int type)
Outputs the stack trace of je to the user based on the value of type. |
protected static void |
msg(java.lang.String msg)
Outputs the message msg to the user based on the value of currentMessageType. |
static void |
msg(java.lang.String msg,
int type)
Outputs the message msg to the user based on the value of type. |
static void |
msgln(java.lang.String msg)
Outputs the message msg to the user based on the value of currentMessageType. |
static void |
msgln(java.lang.String msg,
int type)
Outputs the message msg to the user based on the value of type. |
void |
registerDesignRule(DesignRule dr)
Registers new DesignRules with this DesignRuleChecker. |
void |
registerRule(DesignRule dr)
Registers new DesignRules with this DesignRuleChecker. |
void |
registerViolation(DesignRule dr)
Registers a violation of a rule. |
static boolean |
runTest(Cell parent,
Cell toCheck,
java.util.Vector rules)
A static utility methods to check a set of rules against a component set for the purpose of checking the integrity of this class. |
void |
setCell(Cell newCell)
Set the topCell to the new cell specified |
protected static int |
setCurrentMsgType(int type)
Sets the current format of message output to that dictated by type |
static boolean |
setExpertMode(boolean newMode)
Use this method to turn expert mode on or off. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SUMMARY
public static final int SHORTLIST
public static final int LONGLIST
public static final int FULLDETAIL
public static final int VIOLATIONS
protected Cell topCell
protected CellList descendents
protected static JHDLOutput jout
protected CellList violatingCells
Constructor Detail |
public DesignRuleChecker()
public DesignRuleChecker(Cell topCell)
topCell
- The Cell to check.public DesignRuleChecker(Cell parentCell, Cell topCell)
parentCell
- topCell
- The Cell to check.Method Detail |
public void initDRC(Cell topCell)
public void registerRule(DesignRule dr)
dr
- A new DesignRule register with this DesignRuleChecker.public void registerDesignRule(DesignRule dr)
dr
- A new DesignRule register with this DesignRuleChecker.public boolean doCheck(Cell newCell)
newCell
- The new cell to check.
public boolean doCheck()
public java.lang.String getReport(int reportFormat)
public java.lang.String getReport()
public int getNumRulesChecked()
public int getNumRulesPassed()
public int getNumRulesFailed()
protected void addToCellList(CellList list, Cell cl)
list
- The CellList to which cl will be addedcl
- A Cell to add to listpublic void setCell(Cell newCell)
newCell
- New Cell to be checked by this DRCpublic Cell getTopCell()
public static boolean setExpertMode(boolean newMode)
newMode
- If true expert mode will be turned on.
protected static int setCurrentMsgType(int type)
type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.protected static int getCurrentMsgType()
protected static boolean displayMsgHeader(boolean display)
display
- If true, the message header will be displayed,
otherwise, it won't.
protected static void msg(java.lang.String msg)
msg
- Message to be outputted to the user.public static void msgln(java.lang.String msg)
msg
- Message to be outputted to the user.public static void msg(java.lang.String msg, int type)
msg
- Message to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.public static void msgln(java.lang.String msg, int type)
msg
- Message to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.public static void msg(JHDLException je)
public static void msg(JHDLException je, int type)
je
- JHDLException to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.public static boolean checkRule(Cell parent, Cell toCheck, DesignRule rule)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rule
- An instance of the rule class to check against.
public static boolean checkRule(Cell parent, Cell toCheck, DesignRule rule, DesignRuleBrowser drb)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rule
- An instance of the rule class to check against.drb
- An instance of a DesignRuleBrowser in which to display the results.
public static boolean checkRule(Cell parent, Cell toCheck, DesignRule rule, boolean drbFlag)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rule
- An instance of the rule class to check against.
public static boolean checkRules(Cell parent, Cell toCheck, DesignRule[] rules)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rules
- An array of instances of the rule class to check against.
public static boolean checkRules(Cell parent, Cell toCheck, java.util.Vector rules)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rules
- A Vector of instances of the rule class to check against.
public static boolean checkRules(Cell parent, Cell toCheck, java.util.Vector rules, boolean useBrowser)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rules
- A Vector of instances of the rule class to check against.useBrowser
- The fact that this parameter exists makes this method get called. This method opens the Design Rule Browser to report on violations.
public static boolean checkRules(Cell parent, Cell toCheck, DesignRule rule, boolean useBrowser)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rule
- A an instance of the rule class to check against.useBrowser
- The fact that this parameter exists makes this method get called. This method opens the Design Rule Browser to report on violations.
public static boolean runTest(Cell parent, Cell toCheck, java.util.Vector rules)
parent
- A reference to the Cell that calls this method.toCheck
- A reference to the Cell to check the rule against.rules
- A Vector of instances of the rule class to check against.
public void registerViolation(DesignRule dr)
dr
- The design rule that contains the violation information.public void addViolatingCells(java.util.Vector violatingCells)
violatingCells
- A Vector contains violating cells to add to the master Vector
containing violating cells.public DesignRuleViolation[] getDesignRuleViolations()
public DesignRuleViolation[] getDesignRuleViolationsArray()
public java.util.Vector getDesignRuleViolationsVector()
public DesignRuleViolation[] getDesignRuleViolations(int[] drcvIds)
public DesignRuleViolation[] getDesignRuleViolationsArray(int[] drcvIds)
public java.util.Vector getDesignRuleViolationsVector(int[] drcvIds)
public DesignRuleViolation[] getDesignRuleViolationsForSeverityLevel(int severityLevel)
severityLevel
- The severity level of the rule set to return.
public DesignRuleViolation[] getDesignRuleViolationsForCells(Cell[] cells)
cells
- The cells that have violations associated with it them.
public void addViolatingCell(Cell cell)
cell
- Cell object to add to the internal list of violating cells.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |