Commit Graph

72 Commits

Author SHA1 Message Date
Tim Edwards 1e08e90b2f Additional modification to the previous commit to make the "-pinonly"
argument to "lef write" take an optional value which is a setback
distance, similar to "-hide", but specifically for limiting the
distance that pins can extend into the center of a macro.
2021-04-20 13:33:25 -04:00
Tim Edwards 5b00ee7b83 Added a "-pinonly" option to "lef write" to restrict the pin area
to what is defined by the label, and no additional surrounding
geometry.
2021-04-20 10:19:12 -04: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 5f64c2b3d7 Corrected the "lef" command so that "lef help" works again.
Corrected the "lef write -hide" command option so that obstructions
outside of the boundary are included in the obstruction list, in
addition to the block inside.  This had previously been done
correctly for use with the "setback" option but would fail only
for setback = 0.
2020-12-18 16:38:06 -05:00
Tim Edwards 414f4a8ccb Modified the DEF and LEF read/write routines to keep the
defMakeInverseLayerMap() from returning complete contact types when used
by the lefWrite command when writing LEF macros, which contain cut layers
but not entire contacts.
2020-12-03 21:37:32 -05:00
Tim Edwards dc99e382dd Corrected a simple error from the last commit. 2020-10-07 16:34:49 -04:00
Tim Edwards 4e5f7251b7 Modified the "lef write -toplayer" option so that masterslice layers
are considered an exception to the "-toplayer" restriction;  this is
because masterslice well/substrate layers will affect the electrical
connectivity between port and sustrate or well.
2020-10-07 16:26:56 -04:00
Tim Edwards 52d9639011 Added a "-nomaster" option to "lef write", and made writing masterslice
layers in the output a default option.  Use "-nomaster" to prevent the
output of masterslice layers.
2020-10-06 15:41:35 -04:00
Tim Edwards c3e8ed545d Implemented an additional setback value for "lef write -hide <value>"
that produces a result that looks like "lef write -hide" in the middle
but "lef write" around the edge.  Can be useful for catching all the
detail around the edges but obscuring/simplifying the bulk of the cell
interior.
2020-09-14 15:54:38 -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 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 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 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 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 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 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
Tim Edwards e296fc5ba0 Corrected an error in lefWrite that should have avoided degenerate
labels by expanding a zero area label rectangle, but then if "select
chunk" returns nothing, it sets the area to the zero area label
rectangle instead of the expanded one that it just created.  This
is the reason that "lef write" is producing pins with no geometry
in the LEF file output.
2020-04-01 08:59:19 -04:00
Tim Edwards 521efeb929 Corrected uninitialized variable problem in lefWrite. 2020-03-25 15:21:05 -04:00
Tim Edwards 195e096d64 Modified lefWrite to ensure maximum spacing per all widespacing rules
for any gap between a pin touching the cell boundary and the internal
obstruction layer.
2020-03-25 11:07:54 -04:00
Tim Edwards 6bae7c25c4 Enhanced the "lef write -hide" command option to check for metal
wide spacing rules; should result in LEF views that can import
back into magic without DRC errors.
2020-03-25 09:29:16 -04:00