in github issue #149. This causes magic to no longer write log files
for "make" and "make install" but will properly exit with a non-zero
return code on any error during compile.
Also: Corrected the command "tech drc surround <type1> <type2>" so
that it now returns the correct value when <type1> and <type2> are in
the same plane. Added new command "tech drc directional <type1> <type2>"
which works the same way as "tech drc surround" except for directional
surround rules. Used this to generate vias from "def write" with the
correct metal surround amounts included in the via definiton. The
route analysis then ignores tile slivers that make up the surrounding
material around contacts. Also implemented a method that handles
routes that are made of multiple thin tiles due to the maximum horizontal
stripes rule. Now magic handles "def write" well except for not dealing
with non-minimum-width routes unless they're specifically called out as
"special" nets.
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.
due to issues of declaring global variables; rather than track
down the correct use, just reworked it so that the value is just
an integer and takes -1 as the default (fixed timestamping
disabled).
"gds datestamp" for LEF reads. When set to non-default, all cell
definitions created from LEF macros will be given the specified
timestamp, which allows the stamps of abstract views to match the
stamps of full views, preventing issues of updated timestamps
whenever a layout is switched between views.
record to the label structure to hold the port number. One major
issue stemming from this was reported in github issue #203 by Anton
Blanchard. This commit fixes that error.
client data generated by ext2spice and attached to a node's
nodeClient record; there is an initNodeClient() routine but no
corresponding freeNodeClient() routine. Eventually had to add a
callback function passed to EFDone() and EFFlatDone() to clean up
these entries. After doing that, valgrind reports clean for all
memory allocated within ext2spice (there are other things that are
not freed but not related to a specific command, so do not need to
be treated as leaks).
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.
commands on selections in a cell that is not editable. Moves
and Copies were already handled correctly; this correction fixes
Delete and transforms (e.g., rotates and flips).
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".
all geometry will be handled; the previous behavior expected only
a single rectangle per pin and so would only acknowledge the last
entry in any list of rectangles for the pin.
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).
I'm seeing warnings when parsing a DEF with BLOCKAGES in it:
DEF read, Line 572201 (Message): Unknown keyword "BLOCKAGES" in DEF file; ignoring.
DEF read, Line 572202 (Message): Unknown keyword "-" in DEF file; ignoring.
DEF read, Line 572205 (Error): END statement out of context.
Skip over the section.
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.
Ghazy) to read pin uses from a DEF file, including the three types
that are not defined by the LEF format (go figure). Expanded the
bitmask of label flags to include the additional use types. Also
shifted the label flag bitmask up to make additional room for more
port number, as there is no point in having unused bits in the
bitmask.
defMakeInverseLayerMap() from returning complete contact types when used
by the lefWrite command when writing LEF macros, which contain cut layers
but not entire contacts.
on cells with multiple ports per pin. As written, the code was
erasing all labels before creating a new port label, which would
erase all previous port labels. This should have been done only on
the first port.
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.
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.
command when annotating an existing layout from a LEF database, if
there is a port in the layout that is shadowed by a label with the
same name that is not a port.
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 ;
```
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).
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.
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.
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.
Conflicts:
VERSION
Merged recent changes from master back into bplane, as the efficiency of
bplane for doing extraction on large layouts is unquestionably better.
Fixed the implementation of DBMoveCell() for bplane. Corrected an error
in the bplane version of dbScaleCell() that enumerates cell uses but
does not free the list.
as an optional argument (which it is), and so defaults were not
applied, potentially leading to the wrong number of rows/columns in
a generated via if ROWCOL is not present in the DEF file.
of the pin port geometry and using those areas to create the
spacing between them and the obstruction layer. Otherwise, the
existing method used different databases (source vs. flattened) to
find the pin area, and they did not always agree on the exact
dimensions, leading to spacing errors within the LEF view.
Conflicts:
VERSION
calma/Depend
cif/Depend
cmwind/Depend
commands/Depend
database/Depend
dbwind/Depend
debug/Depend
drc/Depend
ext2sim/Depend
ext2spice/Depend
extflat/Depend
extract/Depend
garouter/Depend
gcr/Depend
graphics/Depend
grouter/Depend
irouter/Depend
lef/Depend
lisp/Depend
mzrouter/Depend
netmenu/Depend
plot/Depend
plow/Depend
resis/Depend
router/Depend
select/Depend
sim/Depend
tcltk/Depend
textio/Depend
tiles/Depend
utils/Depend
windows/Depend
wiring/Depend
Merged recent changes from master branch into bplane branch. Testing the
bplane implementation which has about a 5x improvement in extraction times
for large layouts, which is significant enough to move ahead with the bplane
implementation; however, the bplane implementation has not been thoroughly
vetted yet, so it will remain a branch until such time that it has been
validated.
multiple ports; also, when using the "-hide" option, the obstruction
area is computed from layer geometry, not from the bounding box.
Still left to do: Ensure minimum width on pins, and remove slivers
of obstruction that are below minimum width.
Conflicts:
VERSION
database/DBcellsrch.c
database/DBconnect.c
extract/ExtInter.c
lef/Depend
utils/Depend
Updated bplane branch with all changes to master since the bplane branch
was last modified.
from the cifoutput section, NOT the cifinput section. This change
underscores the point that LEF and DEF formats define mask data,
and therefore all LEF and DEF routines should be using the CIF
input/output methods and layers. That is a major code change;
meanwhile, getting via layer values from the cifoutput parameters
is slightly more reliable than using cifinput, since there is good
reason to use templayers to read vias, and that sort of indirection
makes it difficult to determine a simple relationship between a
LEF cut layer and a magic contact.
order of layers than specified in the LEF/DEF spec. It is not clear
whether this is common practice, or a bug in the tool that produced the
DEF file that prompted this change. NOTE: The "grow" function applied
in this case should be replaced by the actual GDS input rule sequence,
that includes the grow and shrink merge. Otherwise, vias read from
DEF files do not match the layout from those read from GDS, even though
the mask layers represented by the layouts are the same.
distributed installations, where the immediate installation location
is different from the final installation location, but in the case
where it is not desirable to put the entire install hierarchy as a
subdirectory of DESTDIR.
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.
the right argument type (float, not int). Otherwise all resistances
from extresist come out zero when doing "ext2spice extresist on"
and "ext2spice hierarchy on". Also changed the format of the resistance
in the SPICE output to type float, since values are in standard units of
ohms, and rounding to the nearest ohm seems excessively coarse-grained.
an existing cell. If the existing cell has labels but the labels
are defined as point labels (no rectangle defined using specific
layer-purpose pairs), then the LEF macro's port geometry will be
used for the labels. Because the GDS file can define label sizes
and fonts, which the LEF file cannot, but because the LEF file may
define multiple rectangles per port, the original point label is
given the first port rectangle from the LEF file, while the
remainder of the labels in the LEF file generate new non-rendered
labels in the cell.
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.
by FIXED_BBOX derived from GDS and the new "boundary" cif input
rule, then the bbox property values take precedence over the
extent-of-geometry bounding box.
is placed over multiple types. This causes SelectChunk() to fail
and the pin will have no geometry output in the LEF file. To avoid
this, the area of the label is always painted into the select cell
so that if SelectChunk() fails, the label area still exists with
the label tile type.
it only complains about (i.e., issues an error message) ports with
the same index but different text, indicating a read port number
collision and a true error.
was previously (and erroneously) lumped with PLACED and FIXED which
take a position argument afterward. Note that this fix allows the
DEF file to be read without error but does not have the (presumably
desired) behavior of parsing SITE information from the LEF file and
ROWS information from the DEF file and giving each unplaced component
an arbitrary but legal position. That would require a significant
amount of additional coding work.
while reading DEF. To preserve names as much as possible, such
names are now kept. To avoid problems, EFbuild.c and ext2hier
behavior has been changed to only parse entries in a .ext file as
instance arrays if the array notation follows the specific syntax
of [ax:bx:cx][ay:by:cy], letting all other uses of brackets pass
through unaffected.
sure if this is the best policy. The brackets should be okay
but interfere with ext2spice when it reads them from the .ext
file and decides that they refer to arrays. May be a better
way to handle this.
forms of syntax found in the LEF/DEF spec up to version 5.8. Handles
vias formed by parameter and a number of syntax variations that mess
up the usual parsing. Corrected an error in the calculation of wire
extensions when wires are given with three coordinates.
discovered that not all LEF/DEF rectangle coordinates are in
canonical order. Took the opportunity to update the LefError()
routine with an additional argument so that it can separate
errors, warnings, and informational messages, and will correctly
state whether the output is for a LEF or DEF read operation.
writing vias. However, the underlying problem, which is that
stacked vias are not decomposed into their constituent parts, has
not been addressed. A "-units" option was added to the "def write"
command to force the units of the output file to be different than
the default of 1000 (nanometers). No checks are made for whether
values can be accurately represented at the specified scale.
(once corrected in an experimental branch but never merged). This
avoids changing the actual bounding box of the cell to match the
LEF bounding box, but defines a property instead and uses that
property for certain functions such as displaying the bounding box
outline or selecting the cell. This avoids certain related errors
such as the failure to extract connections to areas outside of the
fixed bounding box.