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.
that are unattached (type = space) will cause magic to crash on
the command "lef write -hide"---The lowest level issue was in
SelectChunk(), so for good measure SelectChunk() now checks for
type == TT_SPACE, and "lef write" does also.
the label to be attached to a non-contact type when the label is
actually over a contact are not handled correctly when checking if
multiple labels should belong to the same port record.
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.
statements, with all "hard" connections being enumerated in the
same PORT entry, and "soft" connections (same label on unconnected
areas; e.g., through substrate or resistor device) being
enumerated as separate PORT entries, per the LEF spec. Also
corrected behavior with respect to the "lef write -toplayer"
option, which was treating each port label independently, and so
generating entries for lower layers of a port if there were ports
on those layers, in contravention to the "-toplayer" option.
Also: Added the PINS section to the "def write" output; this had
been left as a "to be completed" item but was never done in spite
of being easy to add.
an optional extra argument to the "select" command that can be used
to select labels by glob-style matching; e.g., "select area labels
VSS*" or "select less area labels *_1". This will help in managing
labels after flattening a standard cell design; e.g., by using
"select less area labels */VDD".
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.
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).
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.
defMakeInverseLayerMap() from returning complete contact types when used
by the lefWrite command when writing LEF macros, which contain cut layers
but not entire contacts.
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.
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.
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.
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.
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.
"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.
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.
probably needs revisiting, because "lef write" and "lef writeall"
need handling to generate the PROPERTYDEFINITIONS block for the
PROPERTY entries to be correct.
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).
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 ;
```