C
Improving Hierarchical DRC Performance
This appendix describes two methods for improving hierarchical DRC performance.
- An extended methodology is available for improving performance when you have nonrectangular cells whose bounding boxes overlap significantly but whose data overlaps by a small amount.
- Switches are available that let DRC address a small but difficult class of design rule checks. DRC has switch names that you can test during certain phases of program execution.
Assigning the hdrc boundary Layer
To improve performance when you have nonrectangular cells whose bounding boxes overlap significantly but whose data overlaps by a small amount, you need to create a layer in your technology file lkcalled hdrc boundary. You can assign any number between 0 and 127 to the hdrc layer. Only the name and purpose are essential for identifying the layer.
DRC checks for the existence of layers only when the rules are compiled. DRC is not aware of the hdrc layer if you add it during an interactive session unless you update the library by reloading the rules or by closing and reopening the library.
How the hdrc boundary Layer Works
With the extended methodology, a polygonal boundary shape is created for each cell on the hdrc boundary layer. The shape is always manhattan, containing no slanted edges. The boundary is formed by merging all shapes in the cell with all boundary shapes of lower level cells. The shapes are converted into trapezoids in the same manner as the tile option for saveDerived commands. Each trapezoid is converted into a rectangle by using the bounding box of the trapezoid. This shape is then “grown” by the halo distance of the rules. The grow process removes small notches and holes. Lastly, the shape is shrunk by the halo distance and stored in the database on the hdrc layer with a boundary purpose.
The hierarchical DRC program uses these boundary shapes to determine interactions between cells or between instances and polygons in the cell. When cells are not rectangular, the area that is rechecked is greatly reduced. This improves performance significantly.
- There might be multiple boundary shapes and the shapes might have holes. The boundary shapes are available for use during DRC execution by using the geomGetPurpose command.
- Small cells whose size is less than twice the halo distance are treated as polygons and not as real cells, meaning they are processed as flat data. Small cells do not have boundary shapes placed in them.
Hierarchical DRC Switch Names
DRC has three switches you can set during certain phases of program execution. These switches let DRC address a very specific class of design rule checks.
-
hier?
This switch lets you use a different set of rules in hierarchical mode than in flat mode. In hierarchical mode, the hier? switch is automatically on. -
currentCell?
This feature lets you write rules that are cell based and not truly hierarchical. The currentCell? switch is toggled on and off as the design is checked. In hierarchical mode, checking occurs in two passes. The first pass uses only the polygons in the current cell. The second pass runs in flat mode, from the current cell down, rechecking small areas where two instances overlap or where an instance and a polygon overlap in the current cell. The currentCell? switch is set on in the first pass and set off in the second pass. -
topCell?
This switch, when present, instructs Diva verification to perform a flat DRC analysis on the top cell after all hierarchical checking is done. You can use this feature to check sparse data, for example pads, to improve execution speed.
In the final pass, you can run a rules check in flat mode on data that is best checked in flat mode. For example, pad checks have limited data and do not check efficiently in hierarchical mode.
Rules File Example
To understand how the switches can be used, consider four simple checks on a design.
- Flag any metal spacing less than 0.5 microns.
- Flag any pad spacing that is less than 10 microns. The pad layer is a sparse layer and is better checked in flat mode. This check can be done in hierarchical mode, but it increases the size of the halo, which makes the program run slow even when there is no pad layer in the vicinity.
- Check that any cell containing layer Q also contains layer R and that layer R is exactly 0.4 micron larger than layer Q. This is where the currentCell? switch comes into play.
-
Check that no part of the design is more than 1 micron from a piece of metal. This check is easily done in flat mode.
m1g = geomSize( "m1" 0.5 ) err = geomAndNot( geomBkgnd() m1g ) saveDerived( err "m1 coverage error" )
The problem in hierarchical mode is that instances form an area where no polygonal data exists and a large error is generated. It is necessary to find errors that are not over instances, yet errors must also be found that are between instance polygons and cell polygons.
This problem is solved by introducing a new layer in the data base, m1 boundary. As the design is processed, a boundary shape for m1 is created. The check is done by looking at shapes at the current level and m1 boundaries from instances that have already been processed.
The rules for the check follow. The rules apply only to hierarchical mode.
drcExtractRules(
ivIf( switch( "drc?" ) then
ivIf( switch( "hier?" ) then
ivIf( switch( "topCell?" ) then
; check 2
pad = geomOr( "pad" )
drc( pad sep < 10 "pad spacing less than 10" )
else
m1 = geomOr( "m1" )
; check 1
drc( m1 sep < 0.5 "m1 spacing less than 0.5" )
ivIf( switch( "currentCell?" ) then
; check 3
check3 = geomXor( geomSize( "Q" 0.4 ) "R" )
saveDerived( check3 "R and Q check" )
; check 4
; Remove any m1 boundary shapes because they are
; going to be rederived
geomErase( "m1" "boundary" )
; Collect m1 in the current cell with m1 boundary
; polygons from one level down in the hierarchy.
m1b = geomOr( "m1" geomGetPurpose( "m1" "boundary" 1 1 ) )
; Grow the m1 shapes by 0.5 microns to find areas
; that are not covered.
m1bg = geomSize( m1b 0.5 )
; Get the cell boundary to
; (1) determine where a coverage error should be flagged.
; This gets rid of errors on the boundary of the cells.
; (2) build the m1 boundary for the current cell.
;
; The hdrc boundary shapes were calculated just prior
; to rules execution in the current cell.
cell_bnd = geomGetPurpose( "hdrc" "boundary" 0 0 )
cell_bnd_shrunk = geomSize( cell_bnd -0.5 )
check4 = geomAndNot( cell_bnd_shrunk m1bg )
saveDerived( check4 "m1 coverage error" )
; Derive the m1 boundary for the next level of hierarchy.
m1_bnd_next = geomOr( "m1" cell_bnd_shrunk )
saveDerived( m1_bnd_next ( "m1" "boundary" ) )
)
)
else
/*
* Rules to run in flat mode.
*/
m1 = geomOr( "m1" )
drc( m1 sep < 0.5 )
/*
... other flat checks ...
*/ .....
)
)
)
Return to top