Commit Graph

164 Commits

Author SHA1 Message Date
Tim Edwards c1f4555ba0 Corrected behavior of "load ... -dereference" to bring back a
previous behavior that had inadvertently been changed.  In recent
versions, "load <absolute_path> -dereference" would incorrectly
apply the dereferencing to <absolute_path> rather than just its
subcells.  Cleaned up the code around DBCellRead() in the process,
so everything is more straightforward (although probably more
could be done in that regard).
2023-04-18 11:01:58 -04:00
Tim Edwards d8f926865d Modified the behavior of cell reading, mainly with respect to
dereferencing, and making the behavior of "load" on the command
line (i.e., loading a cell from a file) the same as the
behavior of loading a cell as a result of expanding an unloaded
instance.  In both cases, if "load -dereference" is used, and
a cell does not exist in any search path but does exist in the
original location, without dereferencing, then the cell will be
loaded from the original location.  Also:  Corrected an error
that has existed since adding the capability to read compressed
files, which causes magic to crash when attempting to run the
"crash recover" command (because that routine was mixing
compressed and regular file stream calls).
2023-03-20 21:00:35 -04:00
Tim Edwards a8c3117020 Implemented and revised the "CIFhier" property to override the
"cif *hier write disable" and "cif *array write disable" commands
for a specific cell def and its descendents.  The revision ensures
that all descendents apply the override.  The "cif write" command
uses a stack instead of recursion, which makes it difficult to
apply the same method.  Currently the method only works for the
"gds write" command, and implementing the feature for "cif write"
is deemed not worth the effort.
2023-03-07 11:16:49 -05:00
Tim Edwards 1a3caee376 (1) Added a check for unclosed boundaries when reading GDS.
This is diagnostic only and does not change the read-in
    behavior.
(2) ext2spice:  Corrected an error that had been introduced
    into version 8.3.171 that accidentally marks all devices
    as visited which causes all source/drain areas and
    perimeters to be output as zero.
(3) extract:  Sweeping changes to handling of fringe
    capacitance.  Removed the (recently added) "fringeshieldhalo"
    parameter from the tech file.  Reworked the fringe
    capacitance models based on results from the "capiche"
    project (github/RTimothyEdwards/capiche).  Fringe shielding
    is now done by clipping fringe at the boundary of a
    shielding shape, rather than trying to calculate the
    amount of shielding (as the "capiche" project proved this
    to be equivalent).  Values for partial fringing are modeled
    by atan(x), which like the sidewall (1/x) curve, extends to
    infinity and values are limited by the halo but do not
    otherwise depend on the halo.  Because of this, the halo can
    be made variable and controlled by the user for deciding on
    the tradeoff between accuracy and run time.  A new command
    option "extract halo" was added to allow this control over
    the halo distance.
2023-01-27 11:47:37 -05:00
Tim Edwards f06f3b47db Added an experimental option for the cifoutput tech file section to
force magic to scale down the internal grid to the minimum
manufacturing grid size specified in the cifoutput section, upon
reading the techfile.
2023-01-13 17:21:37 -05:00
Tim Edwards 0bbb558b94 Reworked the "port" and "noport" label type designations in the
tech file to correct the underlying problem with the SkyWater
sky130 process in which a different layer/purpose pair is used
for TEXTTYPE and DATATYPE for the same layer.  Previously, all
output from magic writes the same pair for both when writing a
port label.  The new method preserves existing syntax, although
there are some differences based on what order the "port"
statement appears relative to other types for the same layer.
2022-12-21 17:49:43 -05:00
Tim Edwards be40825e9a Corrected the "flatten in place" command to force a redraw after
flattening, since the appearance of the layout will change even
though there are no physical changes.  Finally got around to
debugging and correcting the input mask-hints, which can
preserve vendor GDS by marking areas where the vendor GDS differs
from magic's automatically generated output (the method was
almost correct and only needed an input scale factor change).
2022-12-19 16:05:38 -05:00
Tim Edwards 05056d2f1f Left in the new code supporting the "calma contact true" option
for the squares-grid operator and for GDS compression.  But I
reverted the "calma contact" option to be false by default, because
the method does not exactly match the output when not using cell
instance arrays, and so may produce unexpected results.  Will
need a different implementation that uses the same code to generate
the same (effective) layout.
2022-11-10 14:46:26 -05:00
Tim Edwards e37a4f418a Based on output from a large contact array for a pad, modified the
default behavior of magic to make use of the "gds contacts true"
option to output contacts as arrays of subcells instead of
individual boundary entries, as the former is much more efficient
than the latter.  Set the option to be true by default, and set
the "gds flatglob" option to have one entry "$$*$$" corresponding
to the contact subcells created by the "gds contacts" option, so
that GDS reads and writes as it did previously (but using a
different method).  Expanded the method to include "squares-grid"
and "slots" operators (the latter should produce much more
efficient fill pattern arrays).  Implemented for both compressed
and uncompressed GDS.  Tested in all variations.
2022-11-10 14:08:58 -05:00
Tim Edwards d229aefb15 A handful of changes after applying pull request #191 from
Alessandro De Laurenzis.  That pull request cleaned up the vast
majority of compiler warnings.  However, that cleanup exposed a
few additional warnings pointing to errors in the code that needed
fixing.  The code now compiles cleanly except for one warning
about redefined CAD_DIR that I have not looked into.
2022-10-29 09:57:41 -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 d099562e85 Fixed two issues: (1) Found a backwards-incompatibility with the
fringe capacitance halo where the default halo distance was set to
zero instead of one and caused divide-by-zero issues;  (2) Found
extraction issues where labels picked up from cells flattened
during GDS reading cause the flattened/emptied cells to show up
in the extraction with extra pins that can mess up LVS.  Solved
this by removing labels from flattened/emptied cells.
2022-06-08 16:02:40 -04:00
Tim Edwards 30ab57ee79 Found a problem with the calculation for the non-Euclidean grow/
shrink routine that over-computes the diagonal position (the
equation failed to divide the intersecting angle in half).
Rewrote the equation for the correct grow distance, still
accounting for the grid limit (if set).
2022-04-19 18:20:58 -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 416b604eff Fixed the "copy-up" CIF rule handling, which failed to clear the
CDFLATGDS flags after removing the copied-up planes.
2022-01-22 11:32:43 -05:00
Tim Edwards 3065d4cc4b After much pain and suffering, finally tracked down all the places that
the timestamp is updated after reading in CIF or GDS, and managed to
get the timestamp dirty flag to remain clear after reading when
"gds datestamp" is used.  This includes a modification of the timestamp
update routine that only updates timestamps on a single file if only a
single file is being written.
2022-01-21 22:17:54 -05:00
Tim Edwards 93c4503fa8 Refined the new "gds maskhints" command option for GDS input from
yesterday's commit to allow the syntax "gds maskhints <types>", in
which mask hints can be restricted to a specific list of layers
rather than all layers which define mask hints in the cifoutput
rule.
2022-01-21 14:48:59 -05:00
Tim Edwards c2755a061f First cut at a method to automatically generate mask hint properties
in a cell to account for the difference between what's in an input
GDS file and what magic would write out itself from the processed
data.  This potentially allows library cells to be read in that
will generate the equivalent mask data as output without resorting
to using GDS file references as properties.  The method is activated
with the new command option "gds maskhints on" and the default is
off.
2022-01-20 21:50:13 -05:00
Tim Edwards 6deb7d4f01 Missed a few calls in CIFsee.c to the routine that was modified
in the previous commit, causing segfaults when using "cif see".
2022-01-19 15:46:15 -05:00
Tim Edwards 10c5ba99c9 Corrected an error in the hierarchical GDS processing of mask hints,
which failed to translate hint coordinates from subcells into the
composite cell, resulting in hierarchical GDS errors.
2022-01-19 15:37:45 -05:00
Anton Blanchard 73fee3e5fd Add missing types in function prototypes
It would be nice to convert the codebase from K&R to ANSI function
prototypes, but for now just clean up the warnings.
2022-01-10 14:04:37 -05:00
Anton Blanchard 4f79580248 Add missing includes
A number of places are using isspace(), tolower(), toupper() and strcmp()
without including the relevant header.
2022-01-10 14:01:36 -05:00
Tim Edwards 43bb499bcf Corrected an issue with the limited bitfield dedicated to port numbers;
this limited ports to 16384, which seemed reasonable at the time.
However, the sky130_sram_macro layouts connect power and ground in a
way that when coupled with "extract unique" can generate tens of
thousands of ports and overrun the bit field, showing that automation
can do the unexpected.  The solution was to split out the port number
from the label record as its own 32-bit value.
2021-12-12 22:09:31 -05:00
Tim Edwards cf47772278 Corrected the "grow-euclidean" option for grow/shrink/bloat-or so
that it correctly lands on a grid limit boundary (which the
previous commit did not do).  Note that work is still ongoing to
detect some pathological cases where the shapes end up off-grid
where two non-manhattan shapes intersect at different angles
(such as an inside corner).
2021-11-16 17:33:05 -05:00
Tim Edwards 7ffe8bc866 More or less reverted the last commit, as it was found that the
calculation for "limit" in the CIFgen routines was wrong, not the
interpretation of the "gridlimit" value in the tech file.  The
parsing of "gridlimit" has been put back the way it was before the
last commit, and the "limit" value calculations have been corrected.
2021-11-16 15:15:33 -05:00
Tim Edwards db6128232f Added a new cif/calma layer type "labellayer" that can be used to
tag geometry with a specific label which is the name of the layer.
2021-11-16 10:58:18 -05:00
Tim Edwards e8eb96103d Modified the Euclidean distance "grow" operator so that it honors
the grid limit setting.
2021-11-16 09:59:23 -05:00
Tim Edwards ea301b53f8 Corrected a case of a missing variable initialization in the case of
reading a bad "bloat-all" statement in a techfile.  This prevents
magic from eventually segfaulting when exercising the recipe in which
the bad statement occurs.
2021-11-05 12:15:57 -04:00
Tim Edwards e553bbb7c3 Modified the "close" function in CIFgen.c so that it uses the
STACKPUSH/STACKPOP functions instead of recursing.  Otherwise it
has a tendency to cause the process to exceed the recursion limit.
2021-07-30 14:54:40 -04:00
Tim Edwards 55bf0ebd54 Corrected the "bridge" operator, which failed to check for "false"
tile corners in the check area to find areas needing bridges.
This prevents generation of unnecessary bridging geometry;  and
since the error made the check rotation-dependent, this may
resolve some "parent and child disagree on CIF" errors.
2021-07-28 09:40:36 -04:00
Tim Edwards 11c53bb6d5 Modified an ad-hoc rule in CIFgen stating that "squares" and similar
rules do not get hierarchical processing.  I am not sure why I added
that exception, which clearly is not like "bound" or "net" in causing
serious issues when used hierarchically.  The current counterexample
is the use in sky130A.tech for the NPC layer.  Based on that usage,
the exception has been relaxed to consider any "squares" and similar
rule during hierarchical processing if followed by a "grow" operator.
Possibly this is still not relaxed enough to capture all meaningful
use cases, but should suffice for now.
2021-07-27 16:13:54 -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 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 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 324721b514 Added some options to the net selection with respect to labels.
The previous behavior was to generate hierarchical names for all
labels when copying contents of subcells.  This is "safe" for
copying selections without accidentally shorting things through
labeling, but it can make a mess of the selection.  Options are
now "select do labels" for the existing behavior, "select no labels"
to not show any labels, and "select simple labels" to show only the
root name of labels in subcells.
2021-03-04 14:00:31 -05:00
Tim Edwards fd49cad047 Corrected the CIF input scaling to include the 2nd set of planes used
by GDS reads.
2021-01-25 15:05:05 -05:00
Tim Edwards dfba4601f1 Substantially revised the equations for computing bridges for the
"bridge" GDS output operator;  the previous equations were, under
some situations, failing to meet the width requirement.  Also:
corrected the "cif style" check so that it does not claim that a
style name with an exact match is ambiguous.  Also:  Corrected the
use of "grid limit", so that the limit correctly scales with the
output expander value.
2021-01-24 13:29:20 -05:00
Tim Edwards 7dfe407787 Implemented a return value for the cell read-in checks with an option
to stop the search whenever a cell is not found.  Used this to implement
a new option for GDS writes, "gds undefined allow|disallow" (default
"disallow") controls whether or not GDS with undefined references will
be allowed to be written.  Similarly affects CIF and LEF writes, extraction,
and DRC (when running "drc check" from the top).
2021-01-14 15:21:39 -05:00
Tim Edwards 71fbcaca6e Added the ability to handle command option "cif list cover ..." to
provide a single decimal value back to the interpreter, without the
additional diagnostic output.
2021-01-12 13:15:29 -05:00
Tim Edwards 0e1ca4ba07 A few minor edits to prevent compiler warnings around the changes
made in yesterday's commit (implicit return value, missing string.h
include).
2021-01-08 14:39:32 -05:00
Tim Edwards 2bbe1be790 Small correction to the mask hints code to correctly handle multiple
rectangles in a single property.
2021-01-06 12:17:19 -05:00
Tim Edwards a35f3b3d14 Additional code to make sure that the database scaling acts on all
values in a mask hints property, and added back the handling of
mask hints in the top level cell, since the hierarchical function
on cells does not apply the function to the top level.
2021-01-06 11:35:03 -05:00
Tim Edwards d4c3939feb Extended the "mask-hints" operator to work correctly through a
hierarchy.
2021-01-06 10:33:43 -05:00
Tim Edwards 18b4375790 Correction to yesterday's commit to fix the "bridge" operator for
CIF/GDS output.  Yesterday's commit did not completely solve the
issue.  Today's commit should.
2020-12-29 11:00:04 -05:00
Tim Edwards 44325f81e6 Corrected two errors: (1) Do not write subcircuit calls to subcircuits
that have been removed by flattening into the parent cell due to lack
of devices.  Previously the checks on writing the subcircuit and writing
the call were slightly different, leading to instances in which the
subcircuit call would be written to the netlist output without the
subcircuit being defined.  (2) Corrected an error in the "bridge" CIF/GDS
output operator.  In certain (somewhat rare) geometries, the tile behind
(instead of in front of) the corner being checked may be incorrectly
flagged as a DRC spacing error.  The fix is to ignore tiles that are
behind the corner being checked.
2020-12-28 16:54:20 -05:00
Sylvain Munaut eb945dc6ef CIFgen: Fix processing of MASKHINTS_* properties
- Don't print error if there is no more data to process
 - Fix error message: `propname` already has the
   MASKHINTS_ prefix

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-12-27 10:33:02 +01:00
Tim Edwards 69bd2fe57b Changed the cif output style option "see-vendor" to "see-no-vendor"
and made the default behavior equivalent to "see-vendor".  While it is
true that running "cif see" on a readonly cell shows layers that are
not necessarily representative of what is in the file, the opposite
behavior manifests itself in ways that are confusing.
2020-12-14 16:55:29 -05:00
Tim Edwards ea9d8cc3e5 Implemented first part of "mask hints", a method to allow mask
layers that are normally automatically generated to be supplemented
with additional geometry in the form of properties.  The first
commit implements a CIF operator "mask-hints" that tells CIFGenLayer
that additional geometry may be specified with a property named
"MASKHINTS_" plus the name passed to the operator as its only
argument.  A more extensive commit to be done will allow this
operator to be used on cifinput to use mask hints to retain the
exact geometry of mask layers used in the input file.
2020-12-14 16:16:37 -05:00
Tim Edwards 825ec353b1 Added missing brackets around a phrase in the "close" operator that
was causing false positive errors in DRC checks involving CIF rules
using the "close" operator, such as the minimum hole size in the
sky130A PDK.
2020-12-03 14:22:09 -05:00
Tim Edwards 83e2fe55ce Corrected an error in the "close" CIF operator, which was checking
for infinities in space tiles by checking tile dimensions against
TiPlaneRect, where in fact TiPlaneRect is slightly smaller than
the plane boundaries, so this check would always fail, causing
unpredictable behavior due to integer overflow.
2020-11-24 15:57:40 -05:00
Tim Edwards b9f9f73c9b "Partly" corrected an issue in GDS read: The cd_client record is
used both for counting cells during GDS write and for saving
geometry data from the "copyup" operator during GDS read.  The write
routine does not clear the client record, and the read routine was
checking if the cd_client value was default.  Corrected the resulting
crash condition by resetting cd_client before GDS reads.  However, the
underlying problem is that the GDS read is reading data into a cell
that already exists in the database, and is not handling it robustly
by renaming the existing cell.  So this should be revisited.
2020-11-20 19:56:41 -05:00
Tim Edwards 960be0e9b0 Rewrote the hierarchical check routine so that it does not report
disagreements between parent and child cells on GDS generation for
templayers, as these layers are not output;  any resulting differences
showing up eventually on an output layer will be reported.
2020-11-18 22:31:19 -05:00
Tim Edwards 4cac448337 Such a little typo, such a big problem. . . Fixed error from last
commit.
2020-11-17 14:29:21 -05:00
Tim Edwards 7a12bf8f60 Corrected a badly-written routine for the CIF generator for operator
bloat-all, that was resetting flags in the entire plane within the
callback for each tile processed.  This would push DRC run-times from
minutes to hours.  Also corrected another, much more minor, efficiency,
in which the connection mask was generated in the callback routine
for each tile, instead of calculating before the plane search and
passing the mask to the callback function in the client data.
2020-11-16 11:29:36 -05:00
Tim Edwards 750d6c0ecf Corrected a bad error (missing braces around a code block of more
than one line) in the "grow-min" function that was affecting GDS
output for any layers using the grow-min operator.
2020-11-13 10:24:31 -05:00
Tim Edwards b0616e9f0e Fixed two misspellings in comments. 2020-11-12 10:55:20 -05:00
Tim Edwards 75a18053f8 Modified the CIFGenLayer() routine to be aware of when it is called during
hierarchical processing from CIFGenSubcells() and CIFGenArrays(), and to
avoid certain operators that are useless and harmful when applied
hierarchically; namely squares, slots, bbox, boundary, and net.
2020-11-12 10:34:27 -05:00
Tim Edwards 73629467ed Added a forward reference to prevent a compiler warning. 2020-11-11 14:12:51 -05:00
Tim Edwards ad2857dfab Corrected the "grow-min" CIF operator to grow more than the minimum
amount as needed to land on the specified minimum manufacturing grid.
2020-11-11 14:06:12 -05:00
Tim Edwards 6b84efa86e Additional correction for the CIF "close" operator. 2020-11-10 13:28:40 -05:00
Tim Edwards 904a60423e Corrected the CIF "close" function to accommodate non-manhattan
geometry.
2020-11-10 10:26:01 -05:00
Tim Edwards a67b8cc395 Corrected an error in the "bloat-all" operator of the CIF generation,
which was failing to clear tiles in the layout of the "processed" state,
leading to unpredicatable results if the same layout layer is used in
a subsequent CIF operation.
2020-10-18 14:03:15 -04:00
fabian-l-c c872db78b3 Added new cif operator bridge-lim
The new CIF operator BRIDGE-LIM is similar to the BRIDGE operator with the difference that the material created to meet the minimum spacing/width rules do not overlap the limiting layers. Syntax of the new operator is:

bridge-lim spacing width layers

where "layers" are the limiting layers.
2020-10-17 12:23:16 -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 e7074e5723 Added two small features: (1) Added the "-annotate" option to "lef
read".  While "lef read" normally annotates existing layout, this
option ensures that no additional cells are created from macros in
the input LEF file.  (2) Added a check on the "Input off lambda grid"
warning during CIF/GDS input such that it is not repeated once issued,
as it tends to be output many times when it occurs.
2020-10-14 17:20:45 -04:00
Tim Edwards 5fb41a68c8 Modified the routine that determines contact size from the CIF rules
to accomodate a method used for processes that require additional
spacing between contacts for large via arrays;  this requires
distinguishing between large and small areas to output vias, and
so requires use of "and" and "and-not" before "squares".  This
highlights the arbitrary nature of this routine, which probably
works better getting data from cifinput, or not at all (i.e., it is
used when reading LEF, but it is known that the LEF read routines
would be better implemented by running input through CIFGen().  If
that were done, then this problem would not come up).
2020-07-31 14:11:24 -04:00
Tim Edwards 2e0e7af3f3 Corrected an error with the "slots" function that prevents slots
from being generated in areas of negative coordinates when a
grid limit is defined for the output style.
2020-07-30 21:01:24 -04:00
Tim Edwards b39a45a700 Further refined the layers used in hierarchical GDS generation to
exclude layers created using the "boundary" or "bbox" operators,
since they only exist in specific levels of the hierarchy.  Pretty
much by definition they should not be used in a way that requires
additional geometry to be added to the parent cell.  This greatly
reduces parent-vs.-child disagreements (and the corresponding error
messages), but does not entirely eliminate them.
2020-06-17 12:14:41 -04:00
Tim Edwards bf4364da44 Corrected an error in the GDS output hierarchical adjustments code
caused by the new bloat-all with templayers, which used the distance
record in the bloat structure differently than the other bloat
functions, and therefore was messing up the enumeration of layers
needing to be handled by the hierarchical output.  This was probably
also wrong for the existing bloat-all function, which might explain
some problems recently with the GDS output.
2020-06-16 22:54:48 -04:00
Tim Edwards 8297386a6c Corrected error in the new expansion of the cifoutput "bloat-all"
rule to include CIF templayers;  the connection mask was not
correctly generated for the CIF templayer, leading to bad GDS
output.
2020-06-15 15:41:27 -04:00
Tim Edwards 56250c907d Added a "bridge" operator to the set of operators used for CIF layer
generation in the "cifoutput" section of the techfile.  This operator
solves the problems with the catecorner position of geometry when
attempting to automatically close up gaps between islands of a layer.
2020-06-11 16:40:01 -04:00
Tim Edwards 626a6355ae Added a Tcl scripted command "readspice" that can be used to read
SPICE subcircuit definitions from a netlist file and apply the port
order in the netlist to the port labels in the corresponding cell
or cells in the magic database.  Also:  Corrected an error in the
bloat-all code introduced in a recent commit that can cause a
segfault.
2020-05-28 11:46:57 -04:00
Tim Edwards 3203eec28c Modified the "bloat-all" cifoutput operator to allow operations on
templayers.  This permits some useful interactions like growing to
the size of a bounding box, or abutment box, as well as many other
possibilities.  Also:  Corrected the use of "cif see" for the boundary
(abutment box) layer, which was not working because the "cif see"
command uses a flattened CellDef that does not have the boundary
property of the cell it was flattened from.
2020-05-26 14:29:36 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 838591bdf2 Corrected unfortunate typo from today's previous commit, and
corrected a wrong typecasting that results in a compile warning.
2020-05-10 20:01:05 -04:00
Tim Edwards 35175882bc Corrected another similar bit of code causing a segfault. It is
not known, though, why the flag is set indicating valid planes
in the clientdata record when there in fact is none.  That seems
to be the underlying bug.
2020-05-08 17:02:36 -04:00
Tim Edwards 937e848d03 Modified DBTreeCopyConnect() so that it can take an argument to
not copy labels;  not copying labels speeds up the antenna checks
(which don't need labels) greatly.  Also fixed several numerical
overflow problems in the antenna checks, which resulted in false
positive errors, as well as nonsensical results.
2020-04-03 16:22:56 -04:00
Tim Edwards 276bf1d78a Corrected a bad error from a few commits ago, probably 198, which
can deallocate the cell name and causes all sorts of unexpected and
unwanted behavior.
2020-03-21 12:40:35 -04:00
Tim Edwards 80fa495103 Removed the Depend files, which were being tracked with .gitignore
pointing to Depend instead of */Depend.
2020-03-13 15:39:08 -04:00
Tim Edwards aa738bb350 Corrected an obscure error in GDS generation caused by an
uninitialized variable, with the result that writing GDS would
claim that it cannot scale down enough and that the output units
are either wrong or the output style must have "units angstroms".
Using angstrom units would solve the problem but did not treat
the root of the problem.
2020-03-09 20:44:03 -04:00
Tim Edwards 82e33248f2 Corrected dereferencing of cell dependencies, which was being applied
only at the time of running the command "load".  But cells are generally
loaded only on an as-needed basis, so the dereferencing option must be
saved as a flag in the cell and honored whenever its subcells are expanded
or otherwise read at a later time.
2020-01-02 10:13:04 -05:00
Tim Edwards 67866c7991 Apparently GDS format does not enforce the original string character
limit of the Calma definition, and probably has not done so for ages.
Nobody informed me of this.  The restriction has been lifted from
GDS input and output in Magic.  It can be reinstated if necessary by
setting a flag in the cifoutput section of the techfile, but it is
likely that this will not be necessary unless there are other tools
that enforce the limit and will not read a GDS file that exceeds it.
2019-12-19 17:28:06 -05:00
Tim Edwards fd737dbf80 Overhauled the extresist code (again), this time to (1) correct for
a long-standing error (introduced with the "extresist geometry"
option) that can cause nets not to be extracted (due to the first
record not having extraction data, which was itself a long-standing
error in the code but which was not fixed correctly);  (2) handle
"device mosfet" type transistors (previously only handled the old
"fet" type extraction devices);  and (3) correct for the res.ext
file having a different scalefactor relative to the .ext file.  The
latter item was solved by forcing all input to scale like
ExtCurStyle->exts_unitsPerLambda, locally correcting all input as
needed.  Note that extresist still needs to handle other extraction
devices (e.g., resistors and capacitors) but those will require
additional handling in the routines which analyze the current path
to determine how to break up wires into paths.
2019-12-08 17:37:48 -05:00
Tim Edwards 31612b593f Added new CIF generation op "grow-min" that ensures a minimum width
for a layer.
2019-12-02 10:18:37 -05:00
Tim Edwards 46eefe8c33 Small correction on the last commit to avoid an integer overflow
error on large areas (need type dlong to encode areas in internal
units).
2019-11-25 16:37:03 -05:00
Tim Edwards 1fe128a405 Implemented new CIF operator "close", in the syntax "close <area>",
which takes the existing generated CIF plane, finds all enclosed
areas that have an area less than <area>, and fills them in.  This
satisfies a minimum hole area rule in a way that is not possible
with any of the existing CIF operators.
2019-11-25 15:14:41 -05:00
Tim Edwards be8ba09373 Created an additional argument "start" to the "slots" operator,
which adds an offset value of "start" to both X and Y from the
lower left corner of the fill area.  This allows the use of the
"offset" (from the previous git commit) to be declared on different
layers without creating an exact overlap, as is often required by
foundries for fill patterns.
2019-11-20 13:36:03 -05:00
Tim Edwards adb4d2613d Added indexed selection to the PDK toolkit script (returns an index
from a selection, which can then be used to index into other lists.
This lets one selection be made on a list of arbitrary names, and
then additional parameters can be linked together with the same
index).  Also, implemented (finally!) the "offset" parameters of
the "slots" function (as advertised in the documentation).
2019-11-20 13:01:14 -05:00
Tim Edwards 3aa09725cb Changed extraction to avoid generating an error message for devices
like resistors where a tile other than space may border the resistor
device on its non-terminal sides (which is handled correctly, and
should not be considered an error).
2019-11-19 11:39:59 -05:00
Tim Edwards 0eb3b1fe1c Corrected an error in ext2spice related to the recent modification to get
rid of redundant port entries in subcircuits.  There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom.  The current fix corrected the test case.  Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
2019-11-14 15:18:26 -05:00
Tim Edwards 7a42b5b6ad Fixed a long-standing error in which "ext2spice merge" fails when
used with "ext2spice hierarchy on" because the device index is not
reset between calls to output cells in the hierarchy, leading to
a mismatch of the index for all cells after the first one output.
2019-10-23 09:33:37 -04:00
Tim Edwards b493334c73 Preliminary changes to support extraction devices other than the original
simple FET device in extresist.  Also:  Extended the bloat-all CIF operator
again, allowing the trigger layer for the bloat operation to include both
CIF layers and magic layers (previously only magic layers were supported).
This extension is possible due to the previous extension allowing the
trigger layer and bloating layers to be on separate planes.  This operator
extension is useful for tagging geometry that is in the proximity of, but
not overlapping, geometry on another plane.
2019-10-17 16:21:56 -04:00
Tim Edwards b41c86980b Corrected a mistake with the extension of the bloat-all CIF operator
that broke the operator for the usual case of all types in the same
plane.
2019-10-16 20:53:03 -04:00
Tim Edwards 3d7a56ac3a Finally got around to undoing an annoyance caused by the wholesale
reduction of memory and startup time, which was to maintain only
one CIF style in memory.  The new method is just to read in and
keep the DRC CIF style separately from the output CIF style.
Because the CIF sections of the techfile are read before the DRC
sections, and the CIF DRC style is declared in the DRC section,
the CIF DRC style is read in on the fly during the first DRC
checking.
2019-10-15 16:24:49 -04:00
Tim Edwards 8562812fff Corrected CalmaError() to CalmaReadError() in cif/CIFrdcl.c. Thanks
to Toby Schaffer for the bug report and patch!
2019-07-25 16:29:12 -04:00
Tim Edwards d08593997a Cleaned up an inconsistency with GDS read-in that generates
informational output that references a (non-existing) CIF file.
2019-07-23 08:45:42 -04:00
Tim Edwards c31b305848 Corrected the dependency list in the Makefile for "modules", which
should depend on database/database.h;  otherwise running distributed
make can start compiling modules before the database.h file is
created.
2019-07-14 12:07:38 -04:00
Tim Edwards d95d8ba2ef Corrected the generation of bounding box positions from a GDS
boundary layer, which was being saved in GDS coordinates, not
magic database coordinates.
2019-07-08 20:36:48 -04:00
Tim Edwards bbf6008363 Enhancements to cifinput and cifoutput in the tech file: Added
option "labels ... cellid" to handle some vendor files where
apparently to get around the 30-character cell name limit, the
actual cellname is encoded on a text layer.  Added new cifop
"boundary" (no arguments) for cases where a cell abutment box
is encoded on a GDS layer;  this now translates the bounding
box to the FIXED_BBOX property, as is done with the LEF bounding
box.  Also corrected the property set function to free existing
property value allocated memory when overwriting a property with
a new value.
2019-06-05 15:03:51 -04:00