the same: (1) If the inodes of the filename are the same, then the
cells are the same. This avoids treating symbolic links as
different paths with different files; (2) If both layouts are in
git repositories and the git repository commit hashes are the same,
then the cells are considered to be the same. This allows projects
to be cloned into other projects as dependencies and used in
multiple places without magic treating them as different layouts.
assign the result to anything, causing later uses of variable
"lobj" to have an unitialized value and potentially causing a
crash condition. Thanks to Risto Bell for pointing out the
error.
some of the "select" command syntax; the code change caused the
"select top cell" command to behave the same as "select cell".
There was no specific code for handling "top", so now there is.
that no nets will be checked for antenna gate and diffusion area,
and no antenna properties will be output to the LEF file. This can
greatly speed up LEF output file generation for a large design.
Thank you to Tamas Hubai for the code patch.
in the .mag file "properties" list are not handled as being in
database units during .mag file reading and writing (although they
do track internally), making them subject to being scaled incorrectly
and change between a read and a write. Thanks to Sylvain Munaut for
identifying the problem.
is erased. In cases where magic would previously unattach the
label from the material and attach it to "space", now magic will
instead adjust the size of the label to stay entirely on the
material. That avoids a common error of losing label or port
connections when the material is trimmed back. Thanks to Philipp
Guhring for suggesting this implementation (github issue #305).
a transistor's first tile record is a well or substrate type;
normally this is avoided, but if that's the only device terminal
that connects to the node, it will be used. Also changed the
code to not report a failure when space is found under the
device, when space is allowed as a substrate type. Instead it
will print a message that the substrate is not being extracted as
a resistive network. However, note that the correct solution is
to do what the regular "extract" code does, which is to paint the
substrate type in the cell area first, so that there are valid
tile types to use for extracting the substrate network.
a .mag file to include the original system path. This restores the
ability to find the tech file for any cell created using the old
SCMOS technologies. This method is as problematic as is the way
all SCMOS tech files used the same name "scmos". But at least it
preserves backwards-compatible behavior (behavior prior to 8.3.471).
This commit corrects github issue #306.
report it after "Failure to read in entire sub-tree". This will
not report every failing cell (since it quits reading after the
first failure) but will avoid the existing issue of printing
nothing and leaving the user with no feedback as to which cell
was the problem.
non-Manhattan geometry is analyzed for resistance extraction.
This patch merely prevents the crash condition. It does not
solve the root of the problem, which is that split tiles can
belong to two different nets, but the tile can hold extraction
information for at most one of those nets.
reduce the amount of redundant painting done by the connectivity
search algorithm, but which was preventing composed types (such
as FET gates) from getting added to a net if one of the composing
types (such as poly) was drawn over the device in an ancestor
cell. Removing the "if" statement does not appear to have any
significant performance impact, so this change is being adopted.
argument. For interactive magic in the Tcl/Tk wrapper, the
"-nowindow" option was appended to the command line. But for
Tcl scripts on the command line, all arguments following the
script name are considered arguments of the script. So the
"-nowindow" argument has to be inserted at the beginning of
the command line as the first argument after "magic".
method of messing with the argument count when using qualifiers
like "less" and "more". Now it keeps a separate count of the
number of non-qualifier arguments.
previously, MASTERSLICE layers would not be added to obstruction
layers made by "-hide". However, an nwell, for example, that
stuck outside of a prBoundary *would* be recorded, which was
inconsistent. Resolved this by allowing MASTERSLICE layers
in the OBS block, but only for layers that are not a substrate
type. NOTE: It may be better to just insist that a MASTERSLICE
layer define an obstruction type in the "lef" section of the
tech file, and treat it like routing obstructions. Alternatively,
one may question whether special obstruction types are needed at
all, as one could simply define an obstruction as a type without
a port label.
completely implemented for the "cifwidth" and "cifspacing" rules,
resulting in those rules being Manhattan distance checks. Finished
the implementation (duplicating code from DRCbasic.c, with
appropriate scaling to CIF coordinates).
contains brackets which are not indicating a cell array. Also
fixed a related issue with the PDK toolkit code, in which the
gencell routines fail if an instance name contains brackets which
are not indicating a cell array.
present. Note, however, this fix breaks the use of "ext2spice
subcircuit descend off" because subcircuits are always descended
into. It's not clear that "subcircuit descend off" worked at all
before, anyway. That still needs fixing.
did not need to be changed, but the line below it that depended
on the layer being a contact type was wrong; the contact had
to be identified independently of the last layer type, which
might not be the contact cut type.
non-default rule. The code was first failing to identify the via
cut type from the generated via record, and then it was failing
to return to the non-default rule width after the route exits the
via. Both issues have been fixed. Thanks to Sylvain Munaut for
providing a reproducible test case.
new port labels are created for an existing port, then they must
take the existing port number. The code was previously causing
collisions between port numbers on different pins.
without SelectRootDef being set, which causes SelectClear() to
return without doing anything. However---question is why
SelectClear() needs SelectRootDef to be non-NULL since it is
clearing the selection, not the selection source. For now, just
patching the failing case, not trying to mess with the whole
selection mechanism.
lefLayer's "via" record even when the layer might not be a via,
causing potential issues with uninitialized variables. Not sure
if this is related to the bug that started this investigation,
but it was the only thing that looked relevant.
used in a re-entrant manner. Applied to an existing layout,
it will no longer keep generating new instances and ports over
top existing ones. Could use improvement by attempting to
retain the location of a device when the instance changes
device type (such as when a device parameter was changed in
the netlist). However, the current set of changes should
help, whether the re-entrant use is purposeful or accidental.
fails in the bplane code for subcell binning. It is still not
clear why this example causes a failure when the bplane code
has been working for so long. However, simply checking for the
BT_ARRAY bit at one additional point in the code prevents the
crash condition and appears not to have caused any issue with
the database.
a method that failed to work on devices with complex shapes on the
device recognition layer, such as snake-geometry resistors. (2)
The use of contact type "xpc" in the sky130 tech file as its own
contact residue caused the contact tracing in extresist to fail.
I opted to keep the unorthodox contact description in the tech
file and wrote an extension to a routine in extresist to handle
the case.
from Ryan Schmidt, changing regular expression strings in the python
preprocessor to raw string types so that they don't produce warnings
in python 3.12.
behavior when a child coordinate is not specified; otherwise,
the original code's setting of the child reference point to the
bounding box lower left causes the lower left point to be
used always, which is not how the getcell command is supposed to
function.
to place a cell in a meaningless position for any rotation and flip
combination other than zero. The issue was that the reference point
was not rotated along with the cell.
name. The instance search routine was not rejecting internal cells,
and so would choose, e.g., a selection cell and reject it because it
was not the edit cell.
fixed for "cifwidth" and "cifspacing", in which the rule distance
is incorrectly multiplied by the expander (in the case of area,
multiplied by the expander squared).
The fractional part of the rule distance (modulus after scaling)
does not fit in the unsigned char variable unless it is first
divided by the scalefactor (also requires multiplying up by the same
amount when scaling the other direction). The truncation of the
unsigned char value was causing the minimum area value to be off by
a small amount, causing false negatives (no DRC violation is shown
when metal area is slightly smaller than the minimum allowed).
that resolves issues of excessive tile fracturing during read-in
of GDS (or CIF) polygons and paths that have non-manhattan geometry.
This was particularly noticeable when reading the GF180MCU corner
I/O cell, which ended up being something close to a worst-case
scenario.
`magic/database/DBio.c::DBOpenOnly` calls `dbReadOpen(CellDef *, bool, bool, int)` with a pointer for the second argument. While technically valid C, newer compilers (Clang 16) have recently frowned upon implicit pointer-to-int conversion, requiring the flag `-Wno-int-conversion` or else an error is raised.
Given that there is one such instance in the codebase, I think fixing it would be the simplest solution.
missing from a netlist generated by ext2spice with the "extresist"
option enabled. The first had to do with some parts of nets being
given alias names for a net, and the second was caused during
"extresist" and would also result in error messages about devices
missing terminals.
"gds readonly true" mode and when writing a GDS file in full-dump
mode. Reading or writing a file with an incompatible DBU is now
prohibited. This is not a great solution, as it forces the
original file to be rewritten with a different DBU. Preferably
there should be code to scale the units during a dump, but that
needs to be coded.