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.
so that it does not fail if an edit cell is not loaded, but
simply loads the default unnamed edit cell. This is somewhat bad
behavior in the case of reading GDS, since if the GDS is a library
and does not have a top level cell that matches the name of the
GDS library, then the edit cell that is loaded when the "gds read"
command is issued remains unchanged, so it didn't need to be there
in the first place. Fixing this to behave better would require a
bit of additional work.
meaning of the MAG record in GDS files. Most available GDS
documentation is decidedly vague about what MAG means. Most
layout tools seem to interpret a MAG of 1 as corresponding to a
text height of 1um. However, there are a few tools that
interpret it as 1 centimicron, and there's no reason to assume
that any given interpretation is correct. "gds magscale" allows
the scale to be redefined.
"pick x y" which acts like "cursor", but operates on a database
coordinate instead of a pointer coordinate. Made a few other
corrections to the command logging code so that it produces
valid output when the log file is sourced.
commands that make use of the pointer position have an equivalent
command that operates solely on layout coordinates, or otherwise
avoids needing a pointer position. Added the command option
"down <instance>" to avoid using the pointer to disambiguate
selections. Added the command option "select ... at x y" to
do paint or cell selections at a specific coordinate instead of
the pointer position.
"drc printrules". Implemented a new "drc" command option called
"drc ignore", which can be used to suppress reporting of specific
rules, for both "drc why" and "drc find". This can help with
finding an error buried among a large number of other errors.
previous behavior that had inadvertently been changed. In recent
versions, "load <absolute_path> -dereference" would incorrectly
apply the dereferencing to <absolute_path> rather than just its
subcells. Cleaned up the code around DBCellRead() in the process,
so everything is more straightforward (although probably more
could be done in that regard).
dereferencing, and making the behavior of "load" on the command
line (i.e., loading a cell from a file) the same as the
behavior of loading a cell as a result of expanding an unloaded
instance. In both cases, if "load -dereference" is used, and
a cell does not exist in any search path but does exist in the
original location, without dereferencing, then the cell will be
loaded from the original location. Also: Corrected an error
that has existed since adding the capability to read compressed
files, which causes magic to crash when attempting to run the
"crash recover" command (because that routine was mixing
compressed and regular file stream calls).
This is diagnostic only and does not change the read-in
behavior.
(2) ext2spice: Corrected an error that had been introduced
into version 8.3.171 that accidentally marks all devices
as visited which causes all source/drain areas and
perimeters to be output as zero.
(3) extract: Sweeping changes to handling of fringe
capacitance. Removed the (recently added) "fringeshieldhalo"
parameter from the tech file. Reworked the fringe
capacitance models based on results from the "capiche"
project (github/RTimothyEdwards/capiche). Fringe shielding
is now done by clipping fringe at the boundary of a
shielding shape, rather than trying to calculate the
amount of shielding (as the "capiche" project proved this
to be equivalent). Values for partial fringing are modeled
by atan(x), which like the sidewall (1/x) curve, extends to
infinity and values are limited by the halo but do not
otherwise depend on the halo. Because of this, the halo can
be made variable and controlled by the user for deciding on
the tradeoff between accuracy and run time. A new command
option "extract halo" was added to allow this control over
the halo distance.
"gds polygon subcells true" the same as "gds polygon subcells
temporary" instead of "gds polygon subcells keep". This works
well for gf180mcu in open_pdks to keep the existing behavior
but won't break the GDS input on an older version of magic.
three types: "none", "temporary", and "keep" (instead of "true"
or "false"). "none" now reverts back to the original behavior,
because it was found that saving polygons in subcells prevents
them from participating in boolean operations. The "keep"
option is the original option (polygons kept in subcells), and
"temporary" is the one recently introduced (which puts polygons
in subcells and then flattens them). This restores the original
method while retaining the recently implemented method. However,
a proper solution needs to be found that deals with the problem
of boolean operators.
that the feature for implementing callbacks on a selection list
was already implemented via the add_dependency procedure.
Modified the GDS read to remove cell instances that are placed
directly on top of one another in the same cell. Modified the
GDS read to make a better selection of a default font size for
text that specifies a font but not a size, using the minimum
width for the layer the text is placed on. Modified the GDS
read to remove text with empty-string placeholders (created when
a pin layer is read but no text exists to go along with it, due
to GDS not having a specific way to make pins, such that pins
have to be split between one record for geometry and another
for text).
supported). Fixed the long-standing issue in which DRC does not
get stopped by the "drc off" command (the behavior for interrupting
the DRC was dependent on the DRC being turned on, and the "drc off"
command was turning it off before breaking, causing the interrupt
to be ignored).
attempt is made to write an abstract view to GDS. This behavior can
be overridded with the new command option "gds abstract [enable|disable]".
Also: Corrected extraction to allow split tiles to be set as the
reference tile for a node. Previously this was allowed only if the
tile was the first to be searched, but that can cause different tiles to
be marked as the reference depending on where the search starts,
resulting in different names for the same node in .ext files, which is
bad. Also: Modified the LEF annotation to avoid bad entries in the LEF
that would create layers in the layout where none exist.
Alessandro De Laurenzis. That pull request cleaned up the vast
majority of compiler warnings. However, that cleanup exposed a
few additional warnings pointing to errors in the code that needed
fixing. The code now compiles cleanly except for one warning
about redefined CAD_DIR that I have not looked into.
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.
reading GDS files, caused by an unneeded change to pass both
the "original" filename and the actual filename when handling
compressed files---The original filename is unneeded.
(2) Implemented several new methods for parasitic extraction. The
first is an option offset value to apply to sidewall calculations.
This handles issues where actual wire separation is different
from drawn wire separation, which can be significant for the
1/d calculation of sidewall coupling. The second method is to
use the recently-added fringe halo to compute the coupling of the
fringe capacitance to nearby wires. Prior to this change, all
fringe capacitance was applied to surfaces directly under a wire
edge as if the fringe capacitance did not extend outward from the
edge. Now the capacitance is properly pro-rated for the position
of any overlapped shape inside the fringing field. Finally, the
third method added is a new search algorithm for finding the
nearest shapes along the length of a boundary. This is used for
sidewall coupling and fringe shielding, where the nearest shape
dominates the coupling, and any shapes behind are shielded and
may (to first order) be ignored. Previously, the entire halo
was searched without regard to shapes shielding other shapes
behind, and a recent correction added an ad-hoc search for
blocking shapes that was inefficient and not always correct.
The new method is both efficient and accurate.
Compression levels of the output can be controlled with the "gds
compress [<value>]" command, where <value> 0 (default) is uncompressed
output, 6 is "normal" gzip compression, and 9 is maximum compression.
pointing GDS_FILE to a compressed filename when using "gds readonly
true" on a compressed file. The start and end pointers still point
to data bounds in the uncompressed file.
of systems calls to "gzip" and "gunzip". A compressed GDS file can
be made simply by doing "gds write <name>.gds.gz", and can be read
simply by doing "gds read <name>.gds.gz". Names of compressed files
can be put in the GDS_FILE property of a cell.
The extSubtree() routine cuts a layout into squares and extracts
each separately, checking for subcell interactions. In each
square it parses all labels looking for unconnected ones. This
section of code not only parses all labels M x N times, but it
then marks interaction areas where there may be none, forcing
additional unnecessary processing. This commit makes the first
quick optimization, which is to change the return value of
DRCFindInteractions() from boolean to integer, allowing it to
return a value indicating that there are no subcells in the
area. This prevents the loop through labels from happening in
cases where there can never be interactions. More to come.
timestamps that are fixed, since the timestamp update routine is
called from too many places, too many times. Instead created a
new cell definition flag indicating a fixed timestamp, which can
be set by "cellname timestamp" for an individual cell, or with
"gds datestamp" for cells read from a GDS file.
yesterday's commit to allow the syntax "gds maskhints <types>", in
which mask hints can be restricted to a specific list of layers
rather than all layers which define mask hints in the cifoutput
rule.
"gds datestamp <value>" as an option to force a specific datestamp
on the GDS output. This is a third option beyond the previous two
which were either to use the current time or to write zero. The
new option allows an entire library to get a common timestamp, for
example, related to a PDK version number. The "gds nodatestamp"
option has been retained for backwards compatibility.
in a cell to account for the difference between what's in an input
GDS file and what magic would write out itself from the processed
data. This potentially allows library cells to be read in that
will generate the equivalent mask data as output without resorting
to using GDS file references as properties. The method is activated
with the new command option "gds maskhints on" and the default is
off.
If cells are instanced before being defined, causing the GDS parser
to rewind the cell from the top, then the "already defined" error
messages will be suppressed, since it is to be expected that cells
will be seen twice (and ignored the 2nd time). When rewinding, an
output message is issued so that it is clear that the file contains
instances that are used before they are defined, and recommends the
"gds ordering on" setting. Also: Fixed the "gds ordering" command
code so that the command with no third argument returns the state
of the "gds ordering" setting instead of generating a parser error.
there was no distinction between a locked file and a new cell
(initial state) before writing to disk. This prevents any new cell
from being saved! Also: Revised the behavior of the "select short"
search, but this still has issues with long run-times on complex
layouts, so this is an ongoing effort.
whenever a process writes a cell to disk, it immediately releases the
file lock it had on that cell, which is clearly not the intent of file
locking. Fixed this issue. On a related topic, revised the "cellname
writeable" command so that it can make a cell editable even if the cell
has an advisory lock and cannot be made writeable. Perhaps there should
be a clearer distinction here between "writeable" and "editable". Also:
Reconsidered the previous commit, which removed the "--disable-locking"
from the configuration options. Because some operating systems may not
implement fnctl()-based file locking (Cygwin, for one, apparently doesn't),
it is still useful to be able to completely remove the function, in case
the operating system will fail to recognize the fnctl() values in the
code. Now, file locking behavior can be permanently removed through the
configuration option, or temporarily disabled from the command line.
behave as one would expect; e.g., "cellname self" returns the name
of the currently edited cell if nothing is selected; "cellname
rename <name>" renames the currently edited cell to <name>.
Modified the "extract" command so that it will not extract a cell
named "(UNNAMED)" but will insist that the cell must be given a
proper name, much like the "writeall" command does.
that can be used to force renaming of a read-only cell. The
action revokes the read-only status of the cell and removes any
GDS filename and pointers from the cell's properties. This can be
used to swap out a library cell in a layout for a custom version,
by first forcing a rename of the cell, and then resetting the
filepath of the cell and flushing.
name conflict and renames a cell, the name was not pointing to
the new name and immediately caused a crash condition. However,
it got to that point by believing that cell "path/x" and "path/x.mag"
were different files. The name was stripped of the extension but
the full file path was not, causing the confusion.
the "getcell" command) so that the "parent" and "child" arguments
will accept the standard syntax for coordinates used by most other
commands (will accept SI units or trailing suffix i/l for internal
or lambda units).
in which if a cell is read from GDS that has the same name as a cell
in memory, then the cell in memory is renamed to keep all cell names
unique in the database.
worded warning if an abstract cell view is written to GDS.
Corrected the "cellname ... writeable" command to allow an
overrride of the read-only status of a cell. That change had
been made before but apparently got reverted by the recent
rollback.
This reverts commit 8b9c47c3ef.
Reverting back to the state before messing with the substrate extraction
code. All of the substrate extraction code is now in a separate branch.
on a non-writeable cell. While technically valid, that just means
that nobody can make temporary edits on the cell in memory, which is
useful in many applications. A slight quirk of the "cellname" command
is that if applied to the cell currently in the layout window, it is
not possible to make the cell show as edited and editable until leaving
and re-entering the cell.
that the intersection of (A and-not B) can be found. This and the
(A and B) version give a large amount of capability like the cifoutput
operators available as command-line commands. Also: Fixed the new
"drop" command so that it properly redisplays and runs DRC after
executing, and modified the behavior so that the dropped material
is clipped to the area of the selection.
into subcells in a hierarchy. The intent is to use this in
conjunction with the "select intersect" command option added
yesterday to add deep nwell into the cells containing the devices
that need it.
GDS_FILE property in the same way that it handles changes to the
FIXED_BBOX property, by setting or clearing the associated flag
bit in the cell. Otherwise, it becomes impossible to make a
cell writeable, as it always has some belief that it is still
attached to a specific GDS file. Corrected an error in the
"gds" ("calma") command parsing that switched the callbacks for
the "noduplicates" and "nodatestamp" options.
it as a single value "flags" (unsigned char) with meaningful flag
names. Added new option "-fail" to the load command to allow
magic to fail on loading a cell that does not have a corresponding
file rather than the default action of creating a new cell. Added
a flag for the "-quiet" option so that behavior on "-fail" can be
done quietly.