Commit Graph

124 Commits

Author SHA1 Message Date
Tim Edwards 0a532f5721 Applied a patch from Ahmed Ghazy that corrects an error reading PINS
from a DEF file that have the PLACED or FIXED property declared before
LAYER.
2020-08-08 14:02:29 -04:00
Tim Edwards 78fbbfa032 Corrected some uninitialized variables in the "lef write" function. 2020-07-31 21:45:42 -04:00
Tim Edwards 19dd5638d6 Removed "UNITS \n DATABASE MICRONS" entry from all LEF file output
other than the technology LEF (when given the option to dump the
technology LEF information).
2020-07-25 12:00:18 -04:00
Tim Edwards 850df529b9 Removed "NAMESCASESENSITIVE" from "lef write", since this has been
deprecated since LEF version 5.6.
2020-07-22 12:18:47 -04:00
Tim Edwards ae1743e5ad Removed handling of LEF macro "SOURCE", which is only valid pre-
version 5.6, and Magic now officially writes version 5.7.
2020-07-21 08:40:25 -04:00
Tim Edwards e453f130ee Also corrected the "lef write" output to always put "END LIBRARY"
at the end of a macro output, even if it is not part of a library.
According to some commercial tools, this is what is expected, even
though the use of "END LIBRARY" is never explained in the LEF/DEF
spec.
2020-07-19 22:10:19 -04:00
Tim Edwards 9c4fb65a58 Corrected a problem with "lef read" that prevents it from working
with non-standard extensions such as ".tlef".
2020-07-19 21:56:00 -04:00
Tim Edwards 7a8e6352a3 Two changes to "lef write": (1) Added support for generating output
for geometry on MASTERSLICE layers (which was inadvertantly broken),
and (2) Added option "lef write -toplayer", which outputs pin geometry
only for the topmost layer belonging to a pin, with connected layers
underneath being designated as obstructions.
2020-07-15 17:29:56 -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 f1c432585a Applied a patch from Ahmed Ghazy to correct the last change to
"lef write", which had one typo in the formatting, plus was using
a static string method for generating the formatted output that was
implementation-dependent on fprintf().  These have been fixed.
2020-06-15 09:35:21 -04:00
Tim Edwards bdf684dafe An additional change to remove the formatting for the antenna area
output values, which were set to format according to database
distance precision (which is not the same as area).
2020-06-13 11:15:33 -04:00
Tim Edwards 95d1dfddc3 Changed the behavior of "lef write" (again) to set the UNITS to the
minimum manufacturing grid (normally 1000 but can be altered by the
"angstroms" flag in the cifoutput section, and by "gridlimit").
The output values then are truncated such that the floating-point
output value, when multiplied by the UNITS value, is always an
integer.  e.g., "gridlimit 5" will change UNITS to 200, and values
will be minimum precision 0.005, or 5 nanometers.
2020-06-13 11:05:53 -04:00
Tim Edwards f6c6e2c29c Reverted a change from a prior commit that removed backslashes in
front of brackets in LEF names.  These have a special meaning
that is not yet handled correctly, but removing them is the wrong
approach.
2020-06-05 14:55:45 -04:00
Tim Edwards 643bd096ea One more fix. . . 2020-05-29 16:51:20 -04:00
Tim Edwards 09e85dedab And the corresponding pointer. 2020-05-29 16:39:40 -04:00
Tim Edwards 112e58e371 And one more hash key type needed to be changed in the other call
to HashInit().
2020-05-29 16:36:07 -04:00
Tim Edwards 82106387a6 Corrected the type of hash key on the property definitions hash
table in lefWrite.
2020-05-29 16:26:37 -04:00
Tim Edwards 44ca5d996b Added handling of PROPERTYDEFINITIONS block in LEF output based on
properties in the cells.
2020-05-29 16:12:09 -04:00
Tim Edwards 4ad7ce3cf4 Modified LEF read and write to preserve macro PROPERTY lines. This
probably needs revisiting, because "lef write" and "lef writeall"
need handling to generate the PROPERTYDEFINITIONS block for the
PROPERTY entries to be correct.
2020-05-29 14:31:48 -04:00
Tim Edwards bad4842707 Corrected a improperly placed call to freeMagic() from the last
commit.
2020-05-29 13:10:03 -04:00
Tim Edwards 9372a9e0e8 Added more behavior to "lef read" annotation to include handling
bracket characters in the LEF file that are escaped with backslashes.
2020-05-29 12:51:21 -04:00
Tim Edwards a57f024587 Making the "lef read" usage for annotation of an existing layout
somewhat flexible with regard to pin name translations between
the LEF and the layout.
2020-05-29 12:37:10 -04:00
Tim Edwards bf061f0012 Additional change to readspice script to handle various issues with
pins not matching between netlist and layout due to delimiter changes
or case sensitivity.
2020-05-29 11:55:30 -04:00
Tim Edwards 36f2d0cca9 Corrected an out-of-order code block that can cause the USE statement
to be printed twice for a pin during "lef write".
2020-05-29 09:35:54 -04:00
Tim Edwards 483f15360a Added support for "PORT SHAPE" in LEF files. 2020-05-28 22:06:22 -04:00
Tim 'mithro' Ansell b47d4c5642 Removing extra `$Header$` 2020-05-27 20:35:27 -04:00
Tim Edwards e63e8f5761 Corrected the expected position of top and bottom layers in a
DEF VIA ENCLOSURE when doing "def read".  Thanks to Ahmed Ghazy
for finding the error and providing the patch.
2020-05-27 18:02:36 -04:00
Tim Edwards b6f4553cef One additional place where the port number needed to be taken from
the existing label on "lef read", where the port record is never
read.
2020-05-26 20:40:41 -04:00
Tim Edwards 8b159a07cd Corrected LEF annotation so that it does not try to change or any
port indexes, or create duplicated port indexes.
2020-05-26 17:58:05 -04:00
Tim Edwards 582539e95d Modified LEF and DEF writes to set VERSION to 5.7, as nothing in
the output is known to be incompatible with LEF/DEF version 5.7.
2020-05-26 17:25:44 -04:00
Tim Edwards da9c180670 Modified lefWrite with the odd trick of adding a zero to prevent
fprint from printing "negative zeros", which routinely happens in
the ORIGIN output of LEF files with "lef write".
2020-05-26 17:19:57 -04:00
Tim Edwards 84f63ad545 Corrected segfault condition when running "lef write" on a cell
with split tiles (error caused by previous commit).
2020-05-25 16:13:42 -04:00
Tim Edwards 994c6aaf57 Modified the LEF write routine so that it correctly handles contact
layers (apart from the fact that contacts are output as magic's
contact layer representation, and not as cuts;  this still needs to
be handled properly).
2020-05-25 12:26:01 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim 'mithro' Ansell c81d9add00 LEF writer: Fix indenting.
I missed the LAYER value and the geometry was one level to high.

Previous;
```
    PORT
         LAYER li1 ;
      RECT 1.145000 1.075000 1.690000 1.275000 ;
      RECT 3.720000 1.075000 4.490000 1.275000 ;
         LAYER met1 ;
      RECT 1.105000 1.260000 1.395000 1.305000 ;
      RECT 3.765000 1.260000 4.055000 1.305000 ;
```

After;
```
    PORT
      LAYER li1 ;
        RECT 1.145000 1.075000 1.690000 1.275000 ;
        RECT 3.720000 1.075000 4.490000 1.275000 ;
      LAYER met1 ;
        RECT 1.105000 1.260000 1.395000 1.305000 ;
        RECT 3.765000 1.260000 4.055000 1.305000 ;
```
2020-05-23 17:03:03 -04:00
Tim 'mithro' Ansell 2c066c8df0 Remove trailing whitespace. 2020-05-22 20:14:13 -04:00
Tim 'mithro' Ansell e2f0832cdf LEF writer: Move formatting properties to #defines 2020-05-22 20:14:13 -04:00
Tim 'mithro' Ansell c04a33cbf1 LEF writer: Use 6 decimal places of accuracy in output. 2020-05-22 20:14:13 -04:00
Tim Edwards 89c9335727 Modified area accumulation routines to avoid double-counting contacts
during "lef write".
2020-05-22 20:13:33 -04:00
Tim Edwards 77d17a4fa7 One correction to yesterday's commit for "lef write" enhancements:
If the last pin to be parsed generated no output, then the
obstructions would generate no output as well.
2020-05-22 16:14:27 -04:00
Tim Edwards 1e9334664c Modified the LEF write routine so that it will not output ports
that have no geometry (that do not exist on planes defined in
LEF).
2020-05-21 21:53:23 -04:00
Tim Edwards 6adb5dbacf Enhanced the "lef write" routine: (1) Calculates gate and diff
areas and writes ANTENNAGATEAREA and ANTENNADIFFAREA values.
(2) Determines "USE POWER" or "USE GROUND" from label names
matching Tcl variables $VDD and $GND, if the USE has not been
registered as a cell property (knowning the use allows magic
to avoid writing an ANTENNADIFFAREA for power rails, although
doing so should not be an issue).
2020-05-21 16:26:24 -04:00
Tim Edwards 6635817383 Modified LEF read to give all labels the sticky flag so that they
cannot be moved from the layer on which they are defined in the
LEF file.
2020-05-21 13:47: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 f0d2c8db0f Corrected the LEF read routine so that it parses an ORIGIN line in
a LEF macro that has parentheses around the coordinates.  Weirdly,
this is requires by the LEF/DEF spec, but is rarely if ever seen
in actual LEF files.  Go figure.
2020-05-10 12:21:04 -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 08fabeedd5 Merge branch 'master' into bplane
Merging fix to "lef write" to preserve SITE, from master branch.
2020-04-01 11:02:08 -04:00
Tim Edwards e98b768c45 Corrected "lef write" to add the SITE definition that it may have
been preserving in the cell properties (which was inadvertently
omitted).
2020-04-01 11:01:13 -04:00
Tim Edwards 706e342171 Merge branch 'master' into bplane
Conflicts:
	lef/lefWrite.c

Merged change to "lef write -hide" method from the master branch.
2020-04-01 10:46:06 -04:00
Tim Edwards d6cadeb0cd Decided that "lef write -hide" should always use widespacing rules,
because otherwise all pins will flag metal-to-obstruction spacing
within the cell if the cell is wide enough that the obstruction
layer satisfies the width requirement for the rule.  It is too
complicated to try to find specific places where the wide spacing
might not be needed.  Potentially this could be a problem for
technologies that define a number of graded wide-spacing rules,
as the largest-width rule is always used now by "lef write -hide",
and the largest-width rule could theoretically allow enough space
to route through, which would cause a short that cannot be
detected.  That would be a pathological case that may not show up
in practice.
2020-04-01 10:39:43 -04:00