the fair gds editor MacroClassDrc
Please Sign in

DRC Class Reference

A module with many design rule checks. More...

See also: DesignRuleChecker, List of Classes


Member

  1. addViolation(string name,double value, point p1, point p2, int type=0,int status=0)
  2. angle45OnLayer(int layer,bool mergeBefore=false)
  3. angle90OnLayer(int layer,bool mergeBefore=false)
  4. circleRadiusOnLayer(int min, int max, int layer)
  5. clearDRC()
  6. clearViolationView()
  7. densityOnLayer(int layer,int box, double min, double max)
  8. dimensionOnLayer(int lengthMin,int lengthMax,int widthMin,int widthMax, int layer, bool mergeBefore=false)
  9. error
  10. errorCount
  11. errorLayer
  12. exactDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)
  13. exactInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)
  14. getReport()
  15. getViolationName(int index)
  16. getViolationValue(int index)
  17. getViolationStatus(int index)
  18. getViolationType(int index)
  19. getViolationPoint1(int index)
  20. getViolationPoint2(int index)
  21. inside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)
  22. layerCombination(int layer1,int layer2, int layer3=-1,int layer4=-1, int layer5=-1)
  23. loadViolationList(string filename)
  24. maximumAngleOnLayer(double anglevalue, int layer, bool mergeBefore=false)
  25. maximumAreaOnLayer(int layer, double areavalue ,bool mergeBefore=false)
  26. maximumDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)
  27. maximumDistance(int distance,int layer1, int layer2)
  28. maximumInaccessibilityOnLayer(int layer, int inaccessibility,bool mergeBefore=false)
  29. maximumInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)
  30. maximumPerimeterOnLayer(int layer, int perimeter,bool mergeBefore=false)
  31. minimumAreaOnLayer(int layer, double areavalue ,bool mergeBefore=false)
  32. minimumDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)
  33. minimumDistance(int distance,int layer1, int layer2)
  34. minimumDistanceOrOverlap(int distance,int layer1, int layer2,bool mode=true)
  35. minimumElementDistance(int distance,int layer,bool mergeBefore=false)
  36. minimumElementDistanceOnActiveLayer(int distance)
  37. minimumEnclosure(int distance,int layer1,int layer2)
  38. minimumInaccessibilityOnLayer(int layer, int inaccessibility ,bool mergeBefore=false)
  39. minimumInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)
  40. minimumInsideOrOutside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)
  41. minimumNotchOnLayer(int notchsize, int layer, bool mergeBefore=false, bool testSlots=false)
  42. minimumOverlap(int overlap,int layer1, int layer2)
  43. minimumOverlapDistance(int distance,int layer1,int layer2)
  44. minimumPerimeterOnLayer(int layer, int perimetervalue ,bool mergeBefore=false)
  45. minimumSize(int size,int layer, bool mergeBefore=false, bool sharpAngles=true)
  46. noBoxOnActiveLayer()
  47. noBoxOnLayer(int layer)
  48. noCircleOnActiveLayer()
  49. noCircleOnLayer(int layer)
  50. noElementOnActiveLayer()
  51. noElementOnLayer(int layer)
  52. noHolesOnLayer(int layer,bool mergeBefore=false)
  53. noPathOnActiveLayer()
  54. noPathOnLayer(int layer)
  55. noPolygonOnActiveLayer()
  56. noPolygonOnLayer(int layer)
  57. noSelfintersectionOnActiveLayer()
  58. noSelfintersectionOnLayer(int layer)
  59. noSpikesOnLayer(int layer,bool sharpAngles=false)
  60. noTextOnActiveLayer()
  61. noTextOnLayer(int layer)
  62. noZeroWidthOnLayer(int layer)
  63. noZeroWidthOnActiveLayer()
  64. onGrid(int grid,int layer)
  65. onlyCircleOnActiveLayer()
  66. onlyCircleOnLayer(int layer)
  67. onlyRectangleOnActiveLayer()
  68. onlyRectangleOnLayer(int layer)
  69. overlapingElements(int layer)
  70. overlapingElementsOnActiveLayer()
  71. removeNoDrcViolations(int layer)
  72. result
  73. ruleName
  74. saveViolationList(string filename)
  75. setCheckCell()
  76. setCheckRegion(point min, point max)
  77. setCheckView()
  78. setErrorLayerToActiveLayer()
  79. setGraphical(bool)
  80. setList(bool)
  81. setRegionMode()
  82. showReport()
  83. widthDependentDistance(int distance,int width,int layer,bool mergeBefore=false)

Detailed Description

This class allows the access to the design rule checker. For each rule available in the graphical user interface, there is a corresponding method in this class. Please see Design Rule Checker documentation for a more detailed description of the checks. Also the reporting of violations and the drc region can be setup by using this class.

For a complete DRC a plenty of rules are required. For a complete DRC in one step please create a macro with all your rules. There you can also give each rule an individual name. This macro gives an example. It is also included in the example macros.

   1 #!/usr/bin/layout
   2 #name=Macro: drc example.layout
   3 #help=example for a drc macro
   4 
   5 
   6 int main(){
   7 
   8 layout->drcTool->result="DRC (LayoutEditor example) \r\n";
   9 
  10 // setup error layer
  11 layout->drawing->activeLayer=0;
  12 layout->drcTool->setErrorLayerToActiveLayer();
  13 
  14 // check for layer metal 1
  15 layout->drcTool->ruleName= "Minimum Size Metal1";
  16 layout->drcTool->minimumSize(800,6,true);
  17 layout->drcTool->ruleName= "Minimum Distance Metal1";
  18 layout->drcTool->minimumElementDistance(800,6,true);
  19 
  20 // check for layer metal 2
  21 layout->drcTool->ruleName= "Minimum Size Metal2";
  22 layout->drcTool->minimumSize(900,8,true);
  23 layout->drcTool->ruleName= "Minimum Distance Metal2";
  24 layout->drcTool->minimumElementDistance(900,8,true);
  25 
  26 // check for via1 (metal1 to metal2)
  27 layout->drcTool->ruleName= "Via in metal1";
  28 layout->drcTool->inside(50,7,6);
  29 layout->drcTool->ruleName= "Via in metal2";
  30 layout->drcTool->inside(60,7,8);
  31 
  32 
  33 layout->drcTool->showReport();
  34 
  35 }

Member Function Documentation

void drc::addViolation(string name,double value, point p1, point p2, int type=0,int status=0)

Add a drc violation to the list of detected violations. This feature can be used to create own drc checks or importing result of external drc checks.Please see getViolationType for a list of supported types.

void drc::angle45OnLayer(int layer,bool mergeBefore=false)

Tests for elements with non 45┬░angle to the axis.

See also: AngleCheck, DesignRuleChecker

void drc::angle90OnLayer(int layer,bool mergeBefore=false)

Tests for elements with non 90┬░angle to the axis.

See also: AngleCheck, DesignRuleChecker

void drc::circleRadiusOnLayer(int min, int max, int layer)

checkes all circles on the given layer on its radius. If min or max is zero, the minimum or maximum radius is not checked. (introduced with version 20150128)

void drc::clearDRC()

all graphical DRC results in the current cell will be removed from the current design. (introduced with version 20120824)

void drc::clearViolationView()

Clears the list of detected violations.

void drc::densityOnLayer(int layer,int box, double min, double max)

Check the densitiy of a single layer. min and max is the required density in procent. box is the rectangle size in which the density muss fit.

See also: DensityCheck, DesignRuleChecker

void drc::dimensionOnLayer(int lengthMin,int lengthMax,int widthMin,int widthMax, int layer, bool mergeBefore=false)

Tests, for element with axis dimension outside the specified range.

int drc::error

Number of errors on last check.

int drc::errorCount

Sum of detected errors.

int drc::errorLayer

On this layer all errors are marked.

void drc::exactDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)

Tests, for element with a different size than a specified value. (introduced with version 20130201)

See also: DimensionCheck, DesignRuleChecker

void drc::exactInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)

Tests, if all elements on insidelayer are inside in one of layer1 to layer3 and have a exact distance. (introduced with version 20130101)

See also: Inside, DesignRuleChecker

string drc::getReport()

Returns: result, it is crop of all no errors if it is longer than 40 lines.

string drc::getViolationName(int index)

Returns: the rule name of the violation on position index.

Example violation readout:

   1 debug->clear();
   2 int typ=1;
   3 int index=0;
   4 string location="Positions of Error 0201\n";
   5 while (typ>=0){
   6    string name=layout->drcTool->getViolationName(index).left(4);
   7    typ=layout->drcTool->getViolationType(index);
   8    if (name=="0201"){
   9       string s1,s2;
  10       point p=layout->drcTool->getViolationPoint1(index);
  11       s1.setNum(p.x()); s2.setNum(p.y());
  12       location+=s1+"/"+s2+"\n";
  13    }
  14    index++;
  15 }
  16 debug(location);
  17 debug->show();

(introduced with version 20130101)

double drc::getViolationValue(int index)

Returns: the value of the violation on position index, 0 if the index does not exists.

(introduced with version 20130101)

int drc::getViolationStatus(int index)

Returns: the status of the violation on position index, -1 if the index does not exists.

(introduced with version 20130101)

int drc::getViolationType(int index)

Returns: the type of the violation on position index, -1 if the index does not exists.

type:

DRC:

type:

DRC:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

MinimumSize
OverlappingElements
MinimumElementsDistance
MinimumNotches
NoHoles
DimensionCheck
AreaCheck
AngleCheck
PerimeterCheck
MinimumDistance
MinimumDistanceOrOverlap
Inside
Enclosure
MinimumOverlap
OverlapDistance

16
17
17
19
20
21
22
23
24
25
26
27
28
29
30

LayerCombination
OnGrid
OnlyCircle
NoElement
NoPath
NoBox
NoPolygon
NoText
NoCircle
Self-Intersection
DensityCheck
NoPathesWithSpikes
CircleDimension
OnlyRectangle
NoZeroWidth

(introduced with version 20130101)

point drc::getViolationPoint1(int index)

Returns: the position1 of the violation on position index.

(introduced with version 20130101)

point drc::getViolationPoint2(int index)

Returns: the position2 of the violation on position index.

(introduced with version 20130101)

void drc::inside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)

Tests, if all elements on insidelayer are inside in one of layer1 to layer3 and have a minimum distance.

See also: Inside, DesignRuleChecker

void drc::layerCombination(int layer1,int layer2, int layer3=-1,int layer4=-1, int layer5=-1)

Tests, if there exists regions on all layers.

See also: LayerCombination, DesignRuleChecker

void drc::loadViolationList(string filename)

Load a list of violations into the user interface.

void drc::maximumAngleOnLayer(double anglevalue, int layer, bool mergeBefore=false)

Tests for elements with angle bigger anglevalue on layer.

See also: AngleCheck, DesignRuleChecker

void drc::maximumAreaOnLayer(int layer, double areavalue ,bool mergeBefore=false)

Tests for elements with an area bigger than areavalue on layer.

See also: AreaCheck, DesignRuleChecker

void drc::maximumDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)

Tests, for element with axis dimension bigger a specified value.

See also: DimensionCheck, DesignRuleChecker

void drc::maximumDistance(int distance,int layer1, int layer2)

It is checked, if any shape on layer1 has a shape on layer2 next it with a distance less than distance.

See also: MinimumDistance, DesignRuleChecker (introduced with version 20130618)

void drc::maximumInaccessibilityOnLayer(int layer, int inaccessibility,bool mergeBefore=false)

wil check the most remote inner point of any shape. If it is located more far away from any edge as the entered value a violation is triggered. (introduced with version 20170429)

See also: InaccessibilityCheck, DesignRuleChecker

void drc::maximumInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)

Tests, if all elements on insidelayer are inside in one of layer1 to layer3 and have a maximum distance. (introduced with version 20130101)

See also: Inside, DesignRuleChecker

void drc::maximumPerimeterOnLayer(int layer, int perimeter,bool mergeBefore=false)

Tests for perimeter bigger than perimetervalue on layer.

See also: PerimeterCheck, DesignRuleChecker

void drc::minimumAreaOnLayer(int layer, double areavalue ,bool mergeBefore=false)

Tests for elements with an area smaller than areavalue on layer.

See also: AreaCheck, DesignRuleChecker

void drc::minimumDimensionOnLayer(int length,int width, int layer, bool mergeBefore=false)

Tests, for element with axis dimension smaller a specified value.

See also: DimensionCheck, DesignRuleChecker

void drc::minimumDistance(int distance,int layer1, int layer2)

Tests, if all elements between layer1 and layer2 have a minimum distance

See also: MinimumDistance, DesignRuleChecker

void drc::minimumDistanceOrOverlap(int distance,int layer1, int layer2,bool mode=true)

Tests, if all elements between layer1 and layer2 have a minimum distance, an overlap is not marked as an error.

See also: MinimumDistanceOrOverlap, DesignRuleChecker

void drc::minimumElementDistance(int distance,int layer,bool mergeBefore=false)

Tests, if there are elements on layer with a lower distance.

See also: MinimumElementsDistance, DesignRuleChecker

void drc::minimumElementDistanceOnActiveLayer(int distance)

Tests, if there are elements on active layer with a lower distance.

See also: MinimumElementsDistance, DesignRuleChecker

void drc::minimumEnclosure(int distance,int layer1,int layer2)

layer1 must enclose layer2 by minimum of distance

See also: Enclosure, DesignRuleChecker

void drc::minimumInaccessibilityOnLayer(int layer, int inaccessibility ,bool mergeBefore=false)

wil check the most remote inner point of any shape. If it is located nearer to an edge as the entered value a violation is triggered. (introduced with version 20170429)

See also: InaccessibilityCheck, DesignRuleChecker

void drc::minimumInside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)

Tests, if all elements on insidelayer are inside in one of layer1 to layer3 and have a minimum distance. (introduced with version 20130101)

See also: Inside, DesignRuleChecker

void drc::minimumInsideOrOutside(int distance,int insideLayer, int layer1, int layer2=-1, int layer3=-1)

Tests, if all elements on insidelayer are inside in one of layer1 to layer3 and have a minimum distance or alternative completely outside of any inside layer.

(introduced with version 20131223)

See also: Inside, DesignRuleChecker

void drc::minimumNotchOnLayer(int notchsize, int layer, bool mergeBefore=false, bool testSlots=false)

Tests for notches smaller notchsize in polygon/path elements on the layer. If mergeBefore is true all shapes will be merged before the check. If testSlots is true, also slots within a single element will be checked.

See also: MinimumNotches, DesignRuleChecker

void drc::minimumOverlap(int overlap,int layer1, int layer2)

Tests, if all elements between layer1 and layer2 have a minimum overlap .

See also: MinimumOverlap, DesignRuleChecker

void drc::minimumOverlapDistance(int distance,int layer1,int layer2)

Performs an boolean and operation of the two layers and tests, if its distance.

See also: OverlapDistance, DesignRuleChecker

void drc::minimumPerimeterOnLayer(int layer, int perimetervalue ,bool mergeBefore=false)

Tests for perimeter smaller than perimetervalue on layer.

See also: PerimeterCheck, DesignRuleChecker

void drc::minimumSize(int size,int layer, bool mergeBefore=false, bool sharpAngles=true)

Tests, if all elements on layer have a minimum size. If mergeBefure is true, all elements are merged. If sharpAngles is true, sharp angles will also be marked as an error.

See also: MinimumSize, DesignRuleChecker

void drc::noBoxOnActiveLayer()

Tests ,if there are box elements on the active layer.

See also: NoBox, DesignRuleChecker

void drc::noBoxOnLayer(int layer)

Tests ,if there are box elements on the layer.

See also: NoBox, DesignRuleChecker

void drc::noCircleOnActiveLayer()

Tests, if there is a polygon with a circular shape on the active layer.

See also: NoCircle, DesignRuleChecker

void drc::noCircleOnLayer(int layer)

Tests, if there is a polygon with a circular shape on the layer.

See also: NoCircle, DesignRuleChecker

void drc::noElementOnActiveLayer()

Tests ,if there are elements on the active layer.

See also: NoElement, DesignRuleChecker

void drc::noElementOnLayer(int layer)

Tests ,if there are elements on the layer.

See also: NoElement, DesignRuleChecker

void drc::noHolesOnLayer(int layer,bool mergeBefore=false)

Tests, if there is a polygon with a hole on the layer.

See also: NoHoles, DesignRuleChecker

void drc::noPathOnActiveLayer()

Tests, if there are path elements on the active layer.

See also: NoPath, DesignRuleChecker

void drc::noPathOnLayer(int layer)

Tests, if there are path elements on the layer.

See also: NoPath, DesignRuleChecker

void drc::noPolygonOnActiveLayer()

Tests, if there are polygons on the active layer.

See also: NoPolygon, DesignRuleChecker

void drc::noPolygonOnLayer(int layer)

Tests, if there are polygons on the layer.

See also: NoPolygon, DesignRuleChecker

void drc::noSelfintersectionOnActiveLayer()

Tests, if there are self-intersecting polygons on the active layer..

See also: Self-Intersection, DesignRuleChecker

void drc::noSelfintersectionOnLayer(int layer)

Tests, if there are self-intersecting polygons on the layer.

See also: Self-Intersection, DesignRuleChecker

void drc::noSpikesOnLayer(int layer,bool sharpAngles=false)

Tests, if there are pathes with spikes on the layer. That means pathes with segments in the opposite direction to the previous segement. If sharpAngles is true, it will also check for sharp angles on pathes. (introduced with version 20140409)

See also: NoPathesWithSpikes, DesignRuleChecker

void drc::noTextOnActiveLayer()

Tests, if there are text elements on the active layer.

See also: NoText, DesignRuleChecker

void drc::noTextOnLayer(int layer)

Tests, if there are text elements on the layer.

See also: NoText, DesignRuleChecker

void drc::noZeroWidthOnLayer(int layer)

Tests, if there are elements on the layer with a width of zero e.g. paths.

See also: NoZeroWidth, DesignRuleChecker

void drc::noZeroWidthOnActiveLayer()

Tests, if there are elements on the active layer with a width of zero e.g. paths.

See also: NoZeroWidth, DesignRuleChecker

void drc::onGrid(int grid,int layer)

Tests, if all points on the layer are on the grid.

See also: OnGrid, DesignRuleChecker

void drc::onlyCircleOnActiveLayer()

Tests, if there are other elements then polygons with a circular shape on the active layer.

See also: OnlyCircle, DesignRuleChecker

void drc::onlyCircleOnLayer(int layer)

Tests, if there are other elements then polygons with a circular shape on the layer.

See also: OnlyCircle, DesignRuleChecker

void drc::onlyRectangleOnActiveLayer()

Tests, if there are other elements then rectangles on the active layer. (introduced with version 20131221)

See also: OnlyRectangle, DesignRuleChecker

void drc::onlyRectangleOnLayer(int layer)

Tests, if there are other elements then pRectangles on the layer. (introduced with version 20131221)

See also: OnlyRectangle, DesignRuleChecker

void drc::overlapingElements(int layer)

Tests, if there are overlapping elements on layer.

See also: OverlappingElements, DesignRuleChecker

void drc::overlapingElementsOnActiveLayer()

Tests, if there are overlapping elements on the active layer.

void drc::removeNoDrcViolations(int layer)

Listed violations inside any shape of layer are removed from the list. The grafical display is not changed. (introduced with version 20130617)

string drc::result

This string contains a little report of the last test results.

string drc::ruleName

The name of the next rule.

void drc::saveViolationList(string filename)

Saves the list of detected violations to a file. The default file format of it is a macro which can be executed to load the violations again into the LayoutEditor.

void drc::setCheckCell()

Call the method will remove all limitation of the design rule checks and the hole cell will be tested.

void drc::setCheckRegion(point min, point max)

Call the method will limit all design rule checks to a region defined by the to given points.

void drc::setCheckView()

Call the method will limit all design rule checks to the current view.

void drc::setErrorLayerToActiveLayer()

The error Layer is set to the active Layer.

void drc::setGraphical(bool)

If bool is true, all detected violations will be marked within the design.

void drc::setList(bool)

If bool is true, all detected violations will be displayed in a list.

void drc::setRegionMode()

Sets the drawing area in a mode which will allow to define the drc region by mouse.

void drc::showReport()

Shows a messagebox with the results of the design rule checker.

void drc::widthDependentDistance(int distance,int width,int layer,bool mergeBefore=false)

A minimum distance check on layer but only for shapes having a width more than width

See also: WidthDependentDistance, DesignRuleChecker

See also


CategoryMacroClass


MacroClassDrc (last edited 2017-04-26 12:44:56 by JurgenThies)