Commit Graph

27 Commits

Author SHA1 Message Date
R. Timothy Edwards 47778971ee And one more fix to the method, for which I added a variation of
DBNMSrPaintPlane() where if "tile" is non-NULL then "plane" can be
NULL;  the hint tile does not get set but the routine can be called
without knowing the plane other than that the tile is in it somewhere.
2025-10-30 13:18:12 -04:00
R. Timothy Edwards cccd79ab0d One correction to the last commit---The additional check is not
limited to the DRC_REVERSE case but must be done in both the
forward and reverse cases.
2025-10-30 12:37:00 -04:00
R. Timothy Edwards 51b9846120 Made a correction to the DRC error checking on a non-Manhattan
edge.  This was catching geometry unrelated to the error when doing
a spacing check between geometry on different planes.  In the
reverse-edge case, magic needed to run an additional search over
the area on the other side of the original edge that triggered
the rule to effectively clip that corner of the triangle from the
search area.
2025-10-30 12:07:29 -04:00
R. Timothy Edwards 0ac4d3a465 Found a way to work around the problem of having subcell DRC
errors show up as "See error definition in subcell", which has
been the case since I modified the code to prevent showing DRC
errors in subcells that have been resolved by the hierarchy
above them.  DRC errors are now intelligently searched
downward in the heirarchy when enumerated for "drc why".
Also changed the DRC check tile definition to offset such that
there is a tile centered on the origin, instead of the origin
being between four tiles.  Since most layouts are subcells and
most subcells are small relative to the DRC check tile area,
and most subcells are placed near the origin, then most subcells
will appear in only one tile, which speeds up the DRC process
somewhat.
2025-10-23 17:11:44 -04:00
R. Timothy Edwards 0fb19e568c Extended the "spacing" and "edge"/"edge4way" rules to take an
option "manhattan_dist" that causes corner checks to assume a
manhattan distance measure.  This is useful for checking
distances involving generated edges that are created by a CIF
"grow" operator.  For "spacing", "manhattan_dist" is equivalent
to "touching_illegal", as a use-case for forcing manhattan
distance measurements in corners has not been found for other
"spacing" options.
2025-08-13 11:34:29 -04:00
R. Timothy Edwards 3472474617 Re-implemented parts of the DRC angle check to make it consider
that all layer types passed to a single "angles" statement in the
tech file are mutually non-interacting.  That is, "angles allm1 45"
will check angles on edges between metal1 and space, but not edges
between metal1 and via (which makes sense, given that a via is an
area into which to place contact cuts, and its edge is not a
physical boundary).
2025-08-06 09:22:12 -04:00
Tim Edwards 5ebbed4c12 Corrected the run-length wide-spacing rule so that it correctly
identifies areas which meet the proper definition of run-length
(both edges are parallel for the run-length distance or more).
Previously, errors were getting triggered for geometry where
only one edge exceeded the run-length distance.
2024-12-12 14:10:03 -05:00
Darryl L. Miles 967b41343b GCC14: warning: missing braces around initializer
GCC14 -Wall cleanup series [-Wmissing-braces]
2024-10-09 21:12:55 -04:00
Tim Edwards e2c3eb3e20 Corrected the previous commit, which did not fix the problem that
it claimed to fix, but caused an incorrect DRC maxwidth check
instead.  The problem appears to be correctly resolved now.
Also:  Tracked down a recently-introduced minor issue in which
the interactive DRC stops running after issuing "drc check" and
does not resume until another key or mouse even occurs.  This
turned out to be caused by the work on the "logcommands" command,
which should have used "*bypass" before "logcommands suspend"
and "logcommands resume", since the "*bypass" indicates that
the command has no impact on layout and should not interrupt
the DRC checker.
2024-10-01 21:14:12 -04:00
Darryl Miles 6cae64edc5 drc/DRCbasic.c: Multiplication result converted to larger type
Fix code scanning alert no. 35: Multiplication result converted to larger type (#53)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:13 -04:00
Tim Edwards 71f4dd2f9f Discovered that the non-Euclidean distance checks had not been
completely implemented for the "cifwidth" and "cifspacing" rules,
resulting in those rules being Manhattan distance checks.  Finished
the implementation (duplicating code from DRCbasic.c, with
appropriate scaling to CIF coordinates).
2024-04-06 16:36:31 -04:00
Tim Edwards 8e25303db4 Corrected what looks like a very long-standing error in the DRC
engine.  Rule checks of triggering rules are not subject to
clipping to the clip area.  However, they *must* be clipped to
the (larger) overall DRC check area, because no layout is valid
outside of that area.  This clipping was missed, allowing
triggering rules to trigger on areas outside the valid layout,
resulting in mysterious false-positive DRC errors.  This has
been fixed.
2023-08-27 14:21:02 -04:00
Tim Edwards a1adfaaa09 Corrected an issue with non-Manhattan tiles, caused by the fact that
the "width" rule is assumed to be symmetric, and not checked in all
four directions, as that would be redundant.  But non-Manhattan tiles
are not symmetric and must be checked all four directions.  Implemented
in a way that does not increase the DRC processing time.
2022-04-20 17:12:58 -04:00
Tim Edwards 8b2c33d8dd Added new tech DRC rule option "angles 45-only", which handles
rules such as "No 90 degree bends on transistors".
2022-04-20 16:16:20 -04:00
Tim Edwards f8a45a19bb Corrected the non-Manhattan DRC edge check, which was failing to
account for the fact that non-Manhattan tiles are processed twice
in the search, with the side mask bit 1 and 0 for each call.  The
DRC check, like the Manhattan checks, only needs to check one of
these.
2021-11-17 10:55:50 -05:00
Tim Edwards 8d647287e2 Implemented a basic DRC check on non-Manhattan edges. Previously
checks on non-Manhattan tiles were made only on the straight edges;
this was sufficient for most checks.  However, it can miss the case
of facing non-Manhattan edges.  This check does not do triggered
rules because there is no non-Manhattan maxwidth algorithm implemented,
and because the triggering clipping area is a triangle and needs an
extension to support it.
2021-05-14 18:02:34 -04:00
Tim Edwards aa88c69636 Updated from pull request #49 (required a manual merge due to
change in DRC flags type).
2021-02-17 20:53:17 -05:00
Tim Edwards e53a23de59 Added an "off-grid geometry" check, in two versions. The simple
one is an "off_grid" DRC type, which can be used to check geometry
that is below the manufacturing grid.  Normally magic prevents the
grid from being subdivided below the manufacturing grid, but this
limit can be removed and replaced by DRC checks to check for such
errors in a GDS file of unknown origin.  The second version looks
for interactions between subcells that end up with intersections
of non-manhattan geometry landing on points that are not on the
database internal grid.  Such errors cannot be seen by magic's DRC
engine by definition, and so must be detected while flattening
geometry for the DRC checks.
2021-02-04 17:35:43 -05:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 2beb5ee0e9 Modified the handling of "why" strings in the DRC mechanism, so that
DRC records contain an index into a string array instead of containing
a copy of a string.  This is preliminary to changing the way the DRC
error plane is painted, so that the types painted will mark the error
type.  This will (1) allow "drc why" to simply scan the DRC error
plane rather than running the DRC engine, (2) allow DRC errors to be
counted by area rather than by tile, and (3) let the DRC count be the
same whether done by "drc listall why" or "drc count".
2020-02-25 13:57:41 -05:00
Tim Edwards 855e4ca134 Corrected an apparently long-standing error with the triggered rules
(such as widespacing or directional surround) that will cause the
rule to be triggered without a cause due to a failure to reset the
error count from a previous triggered rule (the condition of failure
is much more rare than this explanation makes it sound, which is why
it went undiscovered for so long).
2019-11-11 15:56:17 -05:00
Tim Edwards 8e85c3a96e Corrected a long-standing error in the "widespacing" rule implementation
that was intended to avoid computing maxwidth more than necessary, but
ended up causing the widespacing rule to not be checked in certain
situations.
2019-11-01 12:01:07 -04:00
Tim Edwards d594ba8e07 Additional adjustment to ensure that "run length" means the length
shared by the material on both sides.  However, it may require a
clipping method to avoid triggering on shared lengths that are
on an offset.
2018-09-21 15:18:33 -04:00
Tim Edwards 7b3c4e8777 Refinement of run-length spacing rule analyzes all of the maximum
area rectangles returned by the "maxrect" function and so does
not get triggered simply by the length of the edge being checked.
2018-09-21 14:42:59 -04:00
Tim Edwards 005a4880a3 Modifed the DRC section of the techfile to add two additional
behaviors:  (1) An additional syntax for "widespacing" that allows
both the triggering metal's width AND run-length, which is typical
of rules in 65nm-and-below processes;  and (2) a new "option"
statement for the DRC section, with (for now) one possible flag
"wide-width-noninclusive", indicating that the metal width given
for "widespacing" rules means that a violation is only triggered
for material with a width greater than the given rule width (as
opposed to the default interpretation of a width greater than
or equal to the given rule width).
2018-09-19 17:04:13 -04:00
Tim Edwards 6492061480 Corrected two errors in the DRC checking, one of which passed a
much larger area than necessary to the interaction check, and
the other which failed to scale the tech halo distance down
after scaling all the rules.  Both of these led to huge areas
of a layout being unnecessarily checked when even a tiny part
of the layout was modified.  Corrected behavior matches
expectations for interactive DRC response.
2018-03-15 10:51:07 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00