Commit Graph

26 Commits

Author SHA1 Message Date
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
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -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
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 60a378842f Corrected one array overrun error caused by using the command
"drc printrules".  Implemented a new "drc" command option called
"drc ignore", which can be used to suppress reporting of specific
rules, for both "drc why" and "drc find".  This can help with
finding an error buried among a large number of other errors.
2023-06-26 20:47:37 -04:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
2022-10-29 06:07:46 +02: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 0c584f9e77 Modified the configure scripts and makefile per Proppy's comments
in github issue #149.  This causes magic to no longer write log files
for "make" and "make install" but will properly exit with a non-zero
return code on any error during compile.

Also:  Corrected the command "tech drc surround <type1> <type2>" so
that it now returns the correct value when <type1> and <type2> are in
the same plane.  Added new command "tech drc directional <type1> <type2>"
which works the same way as "tech drc surround" except for directional
surround rules.  Used this to generate vias from "def write" with the
correct metal surround amounts included in the via definiton.  The
route analysis then ignores tile slivers that make up the surrounding
material around contacts.  Also implemented a method that handles
routes that are made of multiple thin tiles due to the maximum horizontal
stripes rule.  Now magic handles "def write" well except for not dealing
with non-minimum-width routes unless they're specifically called out as
"special" nets.
2022-03-29 16:52:01 -04:00
Anton Blanchard 3d41b3e98b Fix a few issues with missing or incorrect prototypes
There are a few places we either don't have a variable or
function prototype and need one, or we have one and they
don't match.
2022-02-23 21:04:19 -05:00
Tim Edwards f8390b78f8 Tackling a section of code with poor performance in extraction.
The extSubtree() routine cuts a layout into squares and extracts
each separately, checking for subcell interactions.  In each
square it parses all labels looking for unconnected ones.  This
section of code not only parses all labels M x N times, but it
then marks interaction areas where there may be none, forcing
additional unnecessary processing.  This commit makes the first
quick optimization, which is to change the return value of
DRCFindInteractions() from boolean to integer, allowing it to
return a value indicating that there are no subcells in the
area.  This prevents the loop through labels from happening in
cases where there can never be interactions.  More to come.
2022-02-20 17:36:49 -05: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 114982fc72 Corrected the handling of DRC in cell instance arrays so that it matches
the handling of subcell instances generally.  Previously it would check
the interaction between neighboring cells in an array without regard to
any material in the parent cell which might remove those errors;
consequently, the array would have to be DRC clean by itself in order for
the parent cell to show as DRC clean.  The array check has been moved
inside the DRCInteractionCheck() routine, so that it runs only where
arrayed instances do not interact with anything else.  Within interaction
areas, the area is flattened and checked, so the array check is not
needed.
2020-11-11 11:50:16 -05:00
Tim Edwards 4f7567b864 Problem apparently stems from the routine not being in the header
file, so corrected that, too.
2020-11-10 11:11:41 -05:00
Tim Edwards 2a4baa82c3 Substantially overhauled the way that the DRC checker finds and
processes "interaction areas".  This should eliminate weirdnesses
where errors will fail to show up in a subcell that does not
interact with paint or other subcells in the top level edit cell.
These errors cannot be reported directly in the top level cell,
but a new error message has been created to direct the user to
check the subcell for errors.  Also:  Modified the toolkit procedures
to force DRC to be run on newly created or modified parameterized
cell layouts.  There is some oddity about the process that causes
DRC errors to be delayed unless a print statement is put before the
DRC check;  I would like to investigate this further.
2020-10-15 17:31:20 -04:00
Tim Edwards 9a5cc08d41 Made a small change to add a flag to the DRC rules to denote whether
the rule is a normal database rule or a CIF-DRC rule.  For the latter,
the flag is used when substituting for escape strings in the "why"
rule explanation to produce the correct value in microns.
2020-10-14 21:41:50 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 7e1fcc8ef6 Fixed lefWrite, which was not including drc.h and so was messing up
one of the arguments to the DRC technology query.  Also, drc/drc.h
itself did not export that particular function, so it was added.
2020-04-07 20:08:42 -04:00
Tim Edwards 1283317084 Corrected the improper use of the variable DRCErrorTable twice,
which results in conflicting hash tables and a crash, if a DRC
section is reloaded when doing an error count.
2020-03-06 13:46:40 -05: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 fba66b7dff Reverted the "drc count" command to the way it was. There is more
to be investigated here.  I am no longer sure why I removed the
cell search from DRC count, but it appears that the cell search is
non-functional, and it should be determined why.  There is no
particular reason not to have a DRC count search.  It could be
implemented such that "list" vs. "listall" counts the top cell vs.
all cells.  First it must be determined why there are no subcell
counts.
2020-02-24 21:47:44 -05:00
Tim Edwards e1783a42a9 Added a "DRC manager" window option. This allows DRC errors to be
categorized by error type and scrolled through conveniently.  However,
it needs work dealing with finding the actual error bounds.  The
"DRC count" counts tiles, which is tile-plane-geometry-specific, and
"DRC listall why" fractures errors both over tiles and over the square
areas that the interactive DRC splits the layout into, for performance.
The DRC error plane needs to be changed to hold different types for
each error class, so that errors can be scanned by boundary instead of
by tile (work to be done).
2019-11-15 10:26:04 -05:00
Tim Edwards 091d7ba2ae Corrected drcAssign for use with CIF drc rules, where the check for
plane is not relevant and can generate false-positive error messages
(although no actual errors occur).
2019-09-19 14:33:30 -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 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00