(1) Dimension properties were not output correctly.
(2) Magic insisted that the output file was <cell>.tcl, not <file>.tcl,
although the error was only in the messaging
(3) Magic was incorrectly renaming the cell to <cell>.tcl after writing
the file.
TECHDEPBASE, as the layers below that cannot be directly painted;
this avoids putting things like "paint checkpaint" into the
output, which are harmless but useless.
".tcl" off of the name, so that the cell name remains the same, and
(2) it uses "units" instead of "snap", as the latter is no longer
used for setting the unit type.
magic to complain about reading GDS_START and GDS_END properties
from a .mag file, although its fallback method handles the properties
correctly, anyway, so there is no actual impact other than the
error message.
new properties, so created a "property compat" setting and made
it TRUE by default. This makes magic print all properties as
type "string" on output into a .mag file. Which is fine, since
it converts all values to the right type on input anyway. The
only thing that backwards-compatibility mode prevents is user-
defined properties that are not strings. That is a very rare case
and can be done by turning off comptability mode. Some time in
the future compatibility mode can be changed to be default false,
but there's probably no real need to do so.
are handled. Properties were previously only character strings,
which had become cumbersome because properties were being used for
mask hints and bounding boxes, with the necessity of constantly
converting values from string to integer and back, which can cause
a performance impact as well as just being messy. The main difference
to the command is the addition of an optional first keyword argument
for the property type, which can be "string", "integer", "dimension",
or "double". All types except "string" can consist of multiple
values. Multiple values can be specified as separate arguments on
the command line, so that, for example, values of FIXED_BBOX or
MASKHINTS_* no longer need to be quoted. In addition, this completes
the handling of "units" implemented recently, as all properties of
the type "dimension" can be entered in the current units, will display
in the current units, and will scale with the database.
and area) so that they are consistent across commands. The default
behavior remains the same, for backwards compatibility. However, a
new "units" command has been added, so that "units microns" results
in measurements always being displayed in microns, with choice of
that or "internal", "lambda", or "grid". The units themselves may
be printed (for interactive use) or not (for scripted use). The
use of "units" is independent of "snap", after overriding the
default behavior, so that units parsed on the command line are
interpreted according to "units", not to "snap".
(1) Fixed an error that was introduced in version 8.3.590 with
a patch that should have been applied only for the case of
BJT devices, and not for MOSFETs. The patch will cause
devices generated by "device mosfet" or "device asymmetric"
to be read incorrectly from a .ext file during "ext2spice".
(2) Fixed an error in the tech file reading, where using CDL
parameters on a capacitor device would cause the tech file
loader to print an error message. The parsing was correct
and only the message should not have been printed.
(3) Added a new feature with the new command option "extract
do unique". This replaces the "extract unique" command by
running the same code within the extraction, but has the
additional effect of reverting the label changes afterward.
This prevents the user from inadvertently writing the
altered labels back to the database file.
involving searches on split tile areas, including one very
important check for interaction between split tiles during
hierarchical extraction. There is still something wrong in
the hierarchical extraction, but it could be the last remaining
issue.
the extraction, especially for routines like ExtFindNeighbors where
it was previously not handled at all. A new method was introduced
in which split tiles with neither side TT_SPACE will get an extra
allocated structure that contains pointers to two regions representing
the nodes on the tile's left and right sides, independently. The fix
(as yet not fully tested) should resolve problems with extracting the
sky130 I/O cells, which contain a FET with 45 degree angles on the
gate, where a split tile is divided between the gate and the source or
drain, and therefore represents two different nodes. Also, there were
extraction errors related to incorrect handling of split tiles having
only one node, where a split tile became connected to the wrong node.
especially around the extraction code. Extraction is now
more or less working, although the original known issues
around areas where split tiles contain two regions has not
yet been addressed.
and forcing it to be passed as an argument to all the callback
functions for the search routines that require it. Magic now
compiles and runs with the new code, but there are a number of
known issues that need to be fixed up. Committing now so that
I can rebase on the last update to the master branch.
improperly messed with during a commit back in August. At the
time I was unsure of what to do with those lines, but now I'm
quite sure they were correct to have been commented out. I
have now removed them so that they should not cause trouble in
the future. Quick explanation: After a non-Manhattan tile
4-way split, merging should be done to the left conditionally
on the merge flags (the latter part of that being the August
1 fix), but merging should never be done to the right because
the right side is still fractured and has yet to be visited.
The merging will eventually get handled. Whether the merge
flag has been set or not does not matter.
generate compressed .mag files itself, it is often very useful to
compress a massive layout file to save disk space or to hit a github
size target. The code change looks for files with either ".mag" (default)
or ".mag.gz" extensions. No check is made to see if both files might
exist at the same time and have incompatible content; it is up to the
end user to manage the file compression.
commits back, and fixed it. Also found that the version was
changed between today's first two commits, which it should not
have been, so dialed it back.
to force an update on a child cell to match the timestamp of the
parent. This is no longer done on read-only cells, although it
probably ought to be applied to all cells. A timestamp should
change when a cell has been modified, but a parent cell should never
force a child cell to update its timestamp if the child cell has
not been modified. The main problem is that "drc check" runs checks
on all child cells, and they then are marked as modified without
consideration of whether the child's DRC status changed. A better
solution would be to avoid unnecessary updates by detecting a
change in DRC results, but for now, just disabling updates on
read-only cells (which can't be updated anyway) should suffice.
checks when checking for exactly overlapping instances of the same
cell def was faulty and resulted in magic no longer detecting when
unarrayed instances exactly overlap. Now both conditions (arrayed
and not arrayed) should be handled correctly.
1) Added a "*showmem" "wizard" command to get a dump of all memory
being used by tiles in the database.
2) Made a slight correction to the way magic detects exact overlap
of instances of the same cell. This probably does not make any
actual difference in practice.
3) Corrected an uninitialized variable in dbReComputeBboxFunc().
4) Changes DBSrCellPlaneArea() to use a static BPEnum variable, so
that it does not waste time allocating and freeing memory for
the same thing over and over again.
5) Corrected a memory leak in the tech file "extract" section that
loses memory every time the extraction style is changed.
6) Corrected the tile join routines to fix a bad memory leak in the
tile allocation and recovery---a fix which was mentioned in issue
#414 but which had not yet been implemented. This has now been
tested and confirmed to work.
DBNMSrPaintPlane() where if "tile" is non-NULL then "plane" can be
NULL; the hint tile does not get set but the routine can be called
without knowing the plane other than that the tile is in it somewhere.
cell name from the cell name hash table. So when "cellname rename"
was changed recently to prevent changing the name of a cell that
already exists, the suggested recipe for R-C extraction no longer
works: "load x; flatten y; load y; cellname delete x; cellname
rename y x". Solved by adding a HashRemove() function to the
cell deletion routine. Thanks to Egor Lukyachenko for reporting
the issue (Github issue tracker #467).
of an existing cell, which does not appear to be a fatal problem,
but must be causing a memory leak. Also: Corrected an error in
extresist when reading .sim files, in code that is slated to be
overhauled, so this is just a patch to avoid a crash condition.
1) Corrected spurious error messages about cells already existing
in GDS when using "flatten" or "flatglob".
2) Fixed handling of resistance as a subcircuit parameter
3) Added area and perimeter resistance for a device; this is done
through the "devresist" statement in the tech file, which is an
extension of the original "fetresist" statement. Where "fetresist"
only supported type "linear", "devresist" supports types "area"
and "perimeter".
4) Support for CDL syntax, including generating subcircuit-like
parameters for components starting with SPICE-standard prefixes
like M, R, C, etc., adding "/" between pins and subcircuit name,
and saving the file as ".cdl" instead of ".spice".
5) Estimated L and W for devices whose geometry is complex and do not
reduce to a simple rectangle. L and W are estimated as the square
root of the area.
6) Changed the method of extracting L and W for diodes to use the same
method as capacitors. Note that diodes are not usually specified
by L and W, but if they are, this will produce the right result.
7) Corrected the reported filename and line number when printing error
messages related to errors inside a technology file, when the
technology file uses "include" to combine multiple files.
doing "save", which was missing checks on properties representing
coordinates (e.g., FIXED_BBOX) resulting in those values
potentially getting truncated by scaling the output to an
incompatible common factor. Thanks to Sylvain Munaut for finding
the issue!
command, but with some critical differences, since the "crash"
command is designed for crash backups. "crash" will save in a
temp file and removes the file after a successful recovery.
"archive" can be used at any time to make a complete snapshot of
a layout in a single file, or to read back that snapshot.
There is a "writeall" option that will make a snapshot including
layout of all read-only (PDK) cells.
command handling in the previous commit, that can cause a crash
whenever "writeall" is called while a cell's filename is still
NULL. Thanks to Daniel Estevez for reporting the error.
a self-intersecting or reversing path is seen in the input.
Added a new feature in which "save <cell>.tcl" will create a
file of magic commands that will re-create the cell when sourced
as a command file.
label text) vs. non-extended bounding box of a cell when doing
"getcell" (and probably a number of other commands/functions, as
well). A function was always computing the extended bounding box
and then setting both the normal and extended bounding boxes of
the cell to this value, resulting in incorrect cell selections.
non-manhattan geometry was not being transformed into the parent
orientation. This went unnoticed for some time due to testing on
PDKs where substrate and well were not allowed to have non-orthogonal
edges.
EFint.t has an ugly ifndef _DATABASE_H that is very include order
dependent (brittle to failure) so this moves the (struct ArrayInfo) type
definition into its own file, which has standard ifndef once file guards.
So include file order no longer matters.
Copyright plate taken from database.h.in
Manhattan tiles. After splitting a non-Manhattan tile crossing
a search area to paint, the routine was automatically merging
tiles to the right. This is incorrect for tiles inside the search
area, as it can cause the search algorithm to miss unvisited tiles
whose origins are to the left of the split tile, resulting in part
of the area not getting painted.
Remove limited use HAVE_ZLIB wrapper API into separate header as
utils.h is used in many places and most source files don't need
to drag in the header file from this external dependency.
Copyright date(s) taken from original source file / git blame.
cast as "bool", causing issues with the proper/strict use of
the "bool" type. Changed the version back so that it will
update the github mirror tonight, since the current version
appears to be working.