Commit Graph

164 Commits

Author SHA1 Message Date
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
Tim Edwards 704f1dc69f Corrected an error that has been in the magic code forever, in which
if a GDS (CIF) layer is dependent on, and only on, a templayer or
layers that get hierarchically processed, it will not get added to
the list of layers needing hierarchical processing, and therefore
end up not being generated in the output.
2019-05-16 17:41:42 -04:00
Tim Edwards 66603cdb53 Corrected invalid logic in the interpetation of (cif/gds) label
options "text", "port", and "noport" in the techfile.  The
incorrect interpretation was preventing backwards compatibility,
such that ports would not be output on GDS layers if the "port"
option was not used.
2018-11-12 13:25:05 -05:00
Tim Edwards bb0af34441 Corrected an obscure error that causes the background of the layout
window to change after hiding a layer using the toolbar and then
refreshing the layout.  Fixed by saving and restoring the graphics
state around the routine that configures the toolbar image.  Also
added a check to CifPaintCurrent to guard against using an unassigned
ClientData record as a pointer (causes a crash), and added braces
around "expr" values in the Tcl wrapper, which reportedly results in
faster execution of the expression.
2018-10-23 08:44:04 -04:00
Tim Edwards 9eb406ffba Implemented an idea from Staf Verhaegen to have "labels" options
"port" and "noport" in the cifoutput section to distinguish
between layer:purpose pairs for port text vs. other kinds of
text.  This allows a closer correspondence between GDS read and
write.  Note that the port writing is currently only in the GDS
write routine, not in the CIF routine.
2018-09-09 15:09:15 -04:00
Tim Edwards 404629e49f Added new option "port" for the "labels" statement in cifinput.
This allows text appearing on a specific GDS layer:purpose pair
to be interpreted as a port.  This does not quite match the
intended behavior of such layers, since it is implied that any
layer geometry coincident with the text should form the area of
the port, which is not (yet) handled.  Also, it is presumably
implied that the port order matches the order in which text
appears in the GDS stream, but magic does not preserve this
order when re-writing any GDS output.
2018-08-26 22:36:15 -04:00
Tim Edwards 83da1988e6 Corrected CIF import for reading CIF area labels correctly when
the label causes a scale change.  Thanks to Iain McNally for the
patch.  Same correction as made to magic-8.1.
2018-08-20 22:13:16 -04:00
Tim Edwards 193493a0cc Corrected an error in the DEF file read routine's check on via
DRC rules, which was conflating magic and CIF tile types,
resulting in incorrect reading of via layers.
2018-07-19 10:23:30 -04:00
Tim Edwards 4ae868802d Modified the LEF read routine so that it determines the LEF-to-
magic conversion for making magic contact types from contact cuts
from the CIF/GDS input rules rather than the output rules.  This
generally makes more sense, plus avoids conflicts where the output
rules may be set for CIF-DRC checks and may not be appropriate for
LEF input without changing the style.
2018-06-21 12:50:31 -04:00
Tim Edwards 42ec70d4dc Re-implemented plow setup for the first time since about 2006,
enabling the "plow" command.  At this time, however, not all
rules are being implemented correctly given the numerous changes
to the DRC handling since the last time "plow" was working.  Fixes
are ongoing.
2018-04-01 14:40:10 -04:00
Tim Edwards 5be0653afe Corrected an error in the CIF read routine, caused when adding
handling for grid subdivision.  Scaled the value of "center"
for a CIF box and then attempted to use "center" as an unscaled
value.  Same correction as made to magic-8.1.
2017-12-18 20:24:06 -05:00
Tim Edwards 4154e1f0b2 Corrected a bug in CIFMakeManhattanPath that can cause a segfault
or a hang in rare geometry situations.  Same fix as was made to
magic version 8.1.
2017-11-25 16:09:16 -05:00
Tim Edwards efb1f00879 Preliminary method to record polygons and wire paths with property
records when they are read in into their own subcells using the
cif/gds read options.
2017-10-09 11:51:51 -04:00
Tim Edwards 088fc759c4 Set of changes updating version 8.2 to the level of 8.1, since 8.2
development had been halted since it was first created back in April.
Version 8.2 is now the official development version, with the first
development push to create a Cairo graphics interface.
2017-08-01 22:14:42 -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