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.
X and Y values, in which case the selection is moved to the
current pointer position. This allows a different implementation
of the "copy" command as "select move; select keep", which avoids
the problem that "copy" has of modifying the selection with layer
interactions with the existing layout.
Argument order and type declaration mismatches:
Label *
portFindLabel(editDef, port, unique, nonEdit)
CellDef *editDef;
bool unique;
bool port; // If TRUE, only look for labels that are ports
bool *nonEdit; // TRUE if label is not in the edit cell
This warrants inspection at call site CmdLQ.c:1712 as both types are bool
is it not so straightforward to check.
It looks like when PORT_MAKE is the option 'port make [index] [dir...]'
port=FALSE is this the correct intention ? This looks ok in that
we're searching for labels to make (upgrade) into ports.
Where as all other 'port ....' commands are operating on items that are
already ports, and ignoring labels.
So the K&R argument name order is also how the call-sites are using it.
void
cmdStatsHier(parent, nuses, child)
CellDef *parent, *child;
int nuses;
This was checked and found ok as callback to ../database/DBcount.c
DBTreeCountPaint(... hiercount, ...)
Due to this not-obvious K&R style also being used in the documentation
this was changed as well (in another commit0.
K&R obsolete syntax removal for C23 compatibility series
Due to use of strcasecmp() or similar C API.
Maybe HAVE_STRINGS_H is needed ? If so which platforms needs this ?
clang18 default warning cleanup (strict)
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.
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.
of command logging, which caused the "select cell <instance>" command
option to become invalid; this command option is used by the
parameterized cell generator and makes it impossible to edit the
parameterized cells.
"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.
of a label from the command line. Also fixed a long-standing
irritation that "setlabel" would change the properties of a label
in the edit cell but not in the selection itself, which would
cause the label to be drawn both with the original properties
in the selection and the new properties in the edit cell. Now
both views will track the same changes.
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.
the timestamp is updated after reading in CIF or GDS, and managed to
get the timestamp dirty flag to remain clear after reading when
"gds datestamp" is used. This includes a modification of the timestamp
update routine that only updates timestamps on a single file if only a
single file is being written.
CmdRS.c:1269:22: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
DRCtech.c:2573:16: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]
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.
rectangle. Likewise, this also fixes an unexpected result when
doing "spliterase" on a zero-area rectangle (which does not cause
a segfault, but is not what one would want magic to do).
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".
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.
that the behavior is to pare down any existing selection by removing
any parts of it that do not intersect the layer specified on the
command line. This is generally more useful than the previous
method, as the intended purpose is to intersect a number of layers
against one (e.g., all transistors intersecting deep nwell).
extra option "-default" that allows defaults to be set for any
label property other than text or port-related properties.
Subsequently, the command "label <text>" will apply the given
defaults to the label. This allows a simpler way to create
rendered labels from the command line without remembering all of
the arguments to the extended "label" command.
The previous behavior was to generate hierarchical names for all
labels when copying contents of subcells. This is "safe" for
copying selections without accidentally shorting things through
labeling, but it can make a mess of the selection. Options are
now "select do labels" for the existing behavior, "select no labels"
to not show any labels, and "select simple labels" to show only the
root name of labels in subcells.
of an instance with double-escaped brackets if the instance name
contains brackets. This then undermines the use of the backslash
escape and causes the interpreter to raise an error instead of
printing the name.
magic database derived layout of a cell that declares GDS_FILE
but for which the GDS file referenced cannot be found or read.
This will produce an incomplete GDS file instead of an apparently
good and complete GDS file that actually contains bad data. Also:
Added new command "random" that allows a random seed to be set,
for use with the GDS output when writing a full dump of a GDS
file. Otherwise, the output prefixes are always the same, which
defeats the purpose of adding the random prefix.
bounding box of the selection (somewhat unuseful, especially as the
result gets absorbed by the tag callback), and "box select", which
sets the cursor box to the bounding box of the selection (much more
useful). Also corrected the "port" command so that the command
"port make" will search only for non-port labels.
enabling the "plow" command. At this time, however, not all
rules are being implemented correctly given the numerous changes
to the DRC handling since the last time "plow" was working. Fixes
are ongoing.