Commit Graph

1155 Commits

Author SHA1 Message Date
Tim Edwards 355399d3ef Modified the startup behavior so that if a ".tcl" script file is
presented on the command line, then all following arguments are
assumed to be arguments of the script and not additional input
to be processed by magic.  This allows arguments to be passed to
scripts passed to magic on the command line.
2021-07-08 16:03:05 -04:00
Tim Edwards 3b70c95013 Updated the version along with the fix to "cif coverage". 2021-07-04 22:34:52 -04:00
Tim Edwards bd787d2a97 Corrected the "cif coverage" command so that the coverage is not
accidentally converted from (long long) back to (int);  otherwise
the coverage is wrong on any large layouts, especially full-chip
sizes.
2021-07-04 22:33:42 -04:00
Tim Edwards 958d6f1670 Updated the version to match pull request #84 from Dan Moore. 2021-06-29 14:25:33 -04:00
Dan Moore 1aab7e5a3a parse USEMINSPACING LEF statement 2021-06-29 10:53:00 -07:00
Tim Edwards b0ed7f09a9 Modified the "flatten" command so that when used with "-dobox", it
is not necessary that the target cell not exist.  That allows a
layout to be flattened into a destination in pieces.  Also found
that the "flatten" command never frees memory for the CellUse it
creates for the copy, so fixed that as well.
2021-06-23 17:41:32 -04:00
Tim Edwards e36560fb90 Added a missing include of ctype.h to a source file that uses the
isalnum() subroutine.  Corrected an assignment in utils/tech.c
which was a syntax error that passes through the compiler.
2021-06-19 10:30:47 -04:00
Tim Edwards f001502a18 One small enhancement to the code of the previous commit: If a
cell is referenced by a GDS "addendum" file but is not in either
the tree of the root def or any other dumped GDS file, then check
the database for those files and output them if they exist.  This
allows one way to get around missing cells in the GDS output if a
cell from a GDS addendum is used but no cells from the library
that the file is an addendum of are used.
2021-06-17 12:55:45 -04:00
Tim Edwards e55c1ecbda Corrected issues with GDS write that come from two features recently
introduced:  The use of substitutions for PDKPATH and home directory
in path names for GDS files referenced in abstract views, and the
"gds addendum" option.  Both were interfering with magic's handling
of writing GDS files from abstract layout views.
2021-06-17 12:40:21 -04:00
Tim Edwards 39630ea710 Added missing function declaration for GeoCanonicalRect in
geometry.h.
2021-06-14 09:45:36 -04:00
Tim Edwards 37c5355b8f A very minor change to the code of the last commit preserves the
behavior of keeping the same first record when merging two nodes.
This does not seem to have any effect on extraction output.  But
since the order of nodes can make a difference and there is no
performance impact in the code change, I will keep it as-is.
2021-06-13 21:47:33 -04:00
Tim Edwards b335dfafff Modified the node merging in ExtHier.c to match the node merging
optimization done in ExtFlat, which is to keep a count of the
number of different node names assigned to the node so that when
merging, the one with fewer nodes can be updated to match the one
with more nodes.  Note:  This change is made on the assumption
that the names for node1 and node2 are equally preferred.
Supposedly the first name in the node list is canonical, so if
node1 is preferred in any case, it may be necessary to move
the first item of the second list to the beginning (a minor code
change).
2021-06-13 20:17:19 -04:00
Tim Edwards 6e09586c54 Changed the property attribute number used for cell instance names
from 98 (arbitrarily selected) to 61 (apparently commonly used by
other tools).  This should help increase compatibility with GDS
files output from other tools.
2021-06-13 12:23:07 -04:00
Tim Edwards df26cf1ace This corrects the issue raised in pull request #75 that breaks the
compile on clang and probably other finicky compilers (as well as
just being wrong).
2021-06-12 20:29:09 -04:00
Tim Edwards 75386e6467 Corrected the GDS read routine so that the "gds noduplicates"
option does not get undermined by GDS files that have cell
instances appear before cell definitions.
2021-06-12 11:40:13 -04:00
Tim Edwards e9f21885b3 Corrected an error in initNodeClient in ext2spice that uses
TTMaskSetMask() like = instead of |=, which doesn't work because
the mask is uninitialized.
2021-06-11 16:53:23 -04:00
Tim Edwards 36f61ca601 Modified the CIF/GDS array processing in CIFhier.c, finding that there
were incorrect assumptions made in the code from 35 years back or so,
for the case where the CIF layer halo is larger than the size/separation
of the cells in the array.  The new code will prevent the array routine
from copying hierarchical additions to the mask layers outside of the
array area.  Whether or not the new code has its own faulty assumptions
remains to be seen through thorough vetting.
2021-06-07 16:38:12 -04:00
Tim Edwards 35b60531e5 Corrected CalmaRead to remove a syntax error that managed to end up in
the last commit, unfortunately.  Thanks to Matt Guthaus for alerting me
to this.  Also updated parts of the extresist code that remove the
dependence on ResConDCS;  this is a minor update and should not affect
the operation of extresist.  It is preparatory to doing more work to
support additional device types like capacitors, bipolars, and diodes.
2021-06-06 21:44:52 -04:00
Tim Edwards 78be76a650 Corrected a potential crash condition if attempting to read a GDS
cell without any edit cell defined.
2021-06-05 17:02:39 -04:00
Tim Edwards 0503ce0ebf Corrected the "surround_ok" spacing rule, which did not prevent
the layers2->layers1 swapped case from being implemented;  the
surround_ok rule type is by definition asymmetric and the two
layer sets cannot just be swapped.
2021-06-04 12:26:11 -04:00
Tim Edwards a8fcca13ee Corrected an error in the implementation of the CIF "mask-hints"
operator that failed to set cifplane to curplane before drawing into
it.  This can cause the "mask-hints" layers to vanish, or worse,
cause a segfault.
2021-06-01 10:25:34 -04:00
Tim Edwards 7d6c7f5797 Updated the version number. 2021-05-27 16:15:56 -04:00
Tim Edwards 1c0dbc907a Recast all uses of resist-class and device class in routines using
code from extflat from type unsigned long to type TileTypeBitMask.
This increases the number of types of each to 256 and tracks the
number of types, so it should be difficult to exceed this amount.
2021-05-27 16:13:06 -04:00
Tim Edwards 7f11020ab4 Additional changes, almost all stylistic, to make the resis/ section
style conform to the rest of the database.  It is difficult to work
with code written in a sloppy, random style.
2021-05-26 22:34:36 -04:00
Tim Edwards 9aa39f820f A number of fixes to the extresist code (as well as style cleanup).
Still tracking down a problem with non-FET devices (e.g., capacitors).
So, work in progress.  Nothing should be affected outside of extresist.
2021-05-25 22:41:52 -04:00
Tim Edwards c22d584ac3 Corrected a problem with character array bound overflow when writing
values to a LEF file.
2021-05-25 11:05:33 -04:00
Tim Edwards 8d8fe2fe55 One correction to the last commit, otherwise segfaults are
essentially guaranteed. . .
2021-05-23 21:26:02 -04:00
Tim Edwards 82fada3af6 Corrected two somewhat related errors. When "getcell" finds a
name conflict and renames a cell, the name was not pointing to
the new name and immediately caused a crash condition.  However,
it got to that point by believing that cell "path/x" and "path/x.mag"
were different files.  The name was stripped of the extension but
the full file path was not, causing the confusion.
2021-05-23 20:59:00 -04:00
Tim Edwards e6f17735b8 Modified the "cmdDumpParseArgs()" routine (used, for instance, by
the "getcell" command) so that the "parent" and "child" arguments
will accept the standard syntax for coordinates used by most other
commands (will accept SI units or trailing suffix i/l for internal
or lambda units).
2021-05-23 14:09:50 -04:00
Tim Edwards 5e02726f7f Modified the cell load routine to avoid creating an "undo" record
for loading a cell after displaying an unmodified "(UNNAMED)" cell,
because "(UNNAMED)" will be deleted, leaving the undo record
invalid and causing a crash if it is attempted to be invoked.
2021-05-23 12:07:31 -04:00
Tim Edwards 0809dddbe0 Resolved an outstanding issue with extresist, which is that the
extresist extractor is less sophisticated than the standard extraction
and will not check through the list of device records belonging to a
single device type.  Therefore a device in the .res.ext may have a
different device name.  So name hashing and checks are made against
the tile type, not the device name, as the tile type + device
coordinates is sufficient to uniquely identify the device.  However,
the extresist extractor does need to be sophisticated enough to find
all the terminal types, so that needs to be fixed.
2021-05-21 22:41:51 -04:00
Tim Edwards 123219b5f1 Corrected an error in the extresist code that will cause an infinite
recursive loop and crash magic.  Corrected a number of other issues
along the way, especially one where routines in EFantenna and extresist
make use of array EFDevTypes which was only created by ext2sim and
ext2spice, and freed when done.  Having run extresist through valgrind,
there are still issues in the code.
2021-05-21 16:33:20 -04:00
Tim Edwards 032a2e7221 Merge branch 'master' of 192.168.0.7:/home/tim/gitsrc/magic 2021-05-19 17:24:04 -04:00
Tim Edwards 33edee6b42 Modified the condition under which the (UNNAMED) file is deleted
on loading a layout to avoid doing so with in a suspendall ...
resumeall block.  That avoids weird errors occurring when the
PDK toolkit scripts are run to generate a new device layout if
the top level layout is still (UNNAMED) and empty.
2021-05-19 17:21:59 -04:00
Tim Edwards ff913ddb23 Updated VERSION. 2021-05-17 15:22:27 -04:00
Tim Edwards 1c328dfe15 Corrected an error in the "cifspacing" rule check for non-Manhattan
geometry (which had gone unnoticed due to the lack of use of
"cifspacing" in any rule decks).  The rule was not checking for
all synthetic edges, because the tile type was expected to match
the rule type when the function is called, but with a non-Manhattan
tile, that may or may not be true and needs to be checked.
2021-05-17 15:18:05 -04: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 f8b6bd1525 Updated version for the last commit. 2021-05-12 22:50:53 -04:00
Tim Edwards aa9e06e498 Merge branch 'master' of 192.168.0.7:/home/tim/gitsrc/magic
Pull before push.
2021-05-12 22:50:13 -04:00
Tim Edwards d8450cf1d4 Corrected an issue with a conflict between the "gds ordering" and
"gds noduplicates" options (essentially, they were canceling each
other out).
2021-05-12 22:49:25 -04:00
Tim Edwards 693256c373 Corrected an error in extresist that caused it to lose track of any
port that has zero area for the label rectangle.
2021-05-09 16:58:49 -04:00
Tim Edwards 94a6daa9b0 Corrected the array DRC checking, which was clipping to the error
area + halo but then failing to limit overlap checks to that clip
area, resulting in bizarre errors whenever an array is made.  Not
sure why the error didn't show up more often.
2021-05-07 10:42:44 -04:00
Tim Edwards e403e92017 Correction to the previous commit (didn't work as advertised). 2021-04-27 14:53:34 -04:00
Tim Edwards be19fda504 Added a "gds unique" option that behaves like the default CIF behavior,
in which if a cell is read from GDS that has the same name as a cell
in memory, then the cell in memory is renamed to keep all cell names
unique in the database.
2021-04-27 13:07:27 -04:00
Tim Edwards 36f9bfb162 Added exceptions to avoid processing sticky labels in two other
places;  this cuts extraction time by half for the example being
used to test.
2021-04-26 17:00:37 -04:00
Tim Edwards 538d7201e1 Modified the behavior of "extract" so that it does not try to check
for sticky labels making connections through the hierarchy.  This
is only needed for some annoying layouts that put point-size labels
with no connecting geometry in cells, and causes magic to spent
excessive amounts of time searching through labels for any layout
that has lots of labels.
2021-04-26 12:19:33 -04:00
Tim Edwards 0dcc9c6ca7 Corrected two potentially fatal errors: (1) Code doing the PDK_PATH
and HOME substitution in filenames needs to watch for a NULL
cd_file, and (2) The routine that removes the (UNNAMED) cell when
another cell is loaded needs to NULL the boxRootDef pointer or else
it ends up pointing to deallocated memory.
2021-04-24 22:13:30 -04:00
Tim Edwards 56c0620417 Properly handled the yes/no argument to "cellname writeable" so that
like other commands, it accepts the usual assortment of true/false,
yes/no, 1/0.
2021-04-22 15:39:32 -04:00
Tim Edwards 6bd96a68dc Created a method for annotating abstract views with GDS pointers.
This can be done now by reading a LEF file, followed by reading
a GDS file with the "noduplicates" option set.  In addition,
annotation of either the LEF view or a read-only view follows the
same protocol as cell paths in the .mag file, which is to replace
leading path components matching Tcl variables for PDKPATH or
PDKROOT, and replace the home directory path with a tilde.
2021-04-22 14:39:34 -04:00
Tim Edwards a5248a95d3 Additional correction for properly handling the substrate node
when generating the device outputs in the .res.ext file, which was
one of the main points of this exercise.
2021-04-21 21:04:17 -04:00