angled edges. This is a rare case and so has never come up before,
but can happen especially on transistors with gate or diffusion
with 45 degree chamfers or flanges. Thanks to Mark Martin for
providing the use case.
The 'isvalid' pointer argument to CmdFindNetProc() is for an optional return value, so must be
NULL when feature is not used.
Copilot Autofix rejected: ttype = CmdFindNetProc(netname, CIFDummyUse, &bbox, FALSE, additional_arg1, additional_arg2);
commands/CmdFI.c
cfb81101 (2022-03-30 13:02:12 -0400 1584) bool *isvalid;
commit f89d52dbcc (tag: 8.3.253)
Date: Thu Jan 6 13:29:43 2022 -0500
CodeQL: https://github.com/dlmiles/magic/security/code-scanning/7
default behavior of magic to make use of the "gds contacts true"
option to output contacts as arrays of subcells instead of
individual boundary entries, as the former is much more efficient
than the latter. Set the option to be true by default, and set
the "gds flatglob" option to have one entry "$$*$$" corresponding
to the contact subcells created by the "gds contacts" option, so
that GDS reads and writes as it did previously (but using a
different method). Expanded the method to include "squares-grid"
and "slots" operators (the latter should produce much more
efficient fill pattern arrays). Implemented for both compressed
and uncompressed GDS. Tested in all variations.
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.
shrink routine that over-computes the diagonal position (the
equation failed to divide the intersecting angle in half).
Rewrote the equation for the correct grow distance, still
accounting for the grid limit (if set).
that it correctly lands on a grid limit boundary (which the
previous commit did not do). Note that work is still ongoing to
detect some pathological cases where the shapes end up off-grid
where two non-manhattan shapes intersect at different angles
(such as an inside corner).
calculation for "limit" in the CIFgen routines was wrong, not the
interpretation of the "gridlimit" value in the tech file. The
parsing of "gridlimit" has been put back the way it was before the
last commit, and the "limit" value calculations have been corrected.
tile corners in the check area to find areas needing bridges.
This prevents generation of unnecessary bridging geometry; and
since the error made the check rotation-dependent, this may
resolve some "parent and child disagree on CIF" errors.
rules do not get hierarchical processing. I am not sure why I added
that exception, which clearly is not like "bound" or "net" in causing
serious issues when used hierarchically. The current counterexample
is the use in sky130A.tech for the NPC layer. Based on that usage,
the exception has been relaxed to consider any "squares" and similar
rule during hierarchical processing if followed by a "grow" operator.
Possibly this is still not relaxed enough to capture all meaningful
use cases, but should suffice for now.
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.
"bridge" GDS output operator; the previous equations were, under
some situations, failing to meet the width requirement. Also:
corrected the "cif style" check so that it does not claim that a
style name with an exact match is ambiguous. Also: Corrected the
use of "grid limit", so that the limit correctly scales with the
output expander value.
that have been removed by flattening into the parent cell due to lack
of devices. Previously the checks on writing the subcircuit and writing
the call were slightly different, leading to instances in which the
subcircuit call would be written to the netlist output without the
subcircuit being defined. (2) Corrected an error in the "bridge" CIF/GDS
output operator. In certain (somewhat rare) geometries, the tile behind
(instead of in front of) the corner being checked may be incorrectly
flagged as a DRC spacing error. The fix is to ignore tiles that are
behind the corner being checked.
- Don't print error if there is no more data to process
- Fix error message: `propname` already has the
MASKHINTS_ prefix
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
layers that are normally automatically generated to be supplemented
with additional geometry in the form of properties. The first
commit implements a CIF operator "mask-hints" that tells CIFGenLayer
that additional geometry may be specified with a property named
"MASKHINTS_" plus the name passed to the operator as its only
argument. A more extensive commit to be done will allow this
operator to be used on cifinput to use mask hints to retain the
exact geometry of mask layers used in the input file.
for infinities in space tiles by checking tile dimensions against
TiPlaneRect, where in fact TiPlaneRect is slightly smaller than
the plane boundaries, so this check would always fail, causing
unpredictable behavior due to integer overflow.
bloat-all, that was resetting flags in the entire plane within the
callback for each tile processed. This would push DRC run-times from
minutes to hours. Also corrected another, much more minor, efficiency,
in which the connection mask was generated in the callback routine
for each tile, instead of calculating before the plane search and
passing the mask to the callback function in the client data.
hierarchical processing from CIFGenSubcells() and CIFGenArrays(), and to
avoid certain operators that are useless and harmful when applied
hierarchically; namely squares, slots, bbox, boundary, and net.
which was failing to clear tiles in the layout of the "processed" state,
leading to unpredicatable results if the same layout layer is used in
a subsequent CIF operation.
The new CIF operator BRIDGE-LIM is similar to the BRIDGE operator with the difference that the material created to meet the minimum spacing/width rules do not overlap the limiting layers. Syntax of the new operator is:
bridge-lim spacing width layers
where "layers" are the limiting layers.
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.
generation in the "cifoutput" section of the techfile. This operator
solves the problems with the catecorner position of geometry when
attempting to automatically close up gaps between islands of a layer.
SPICE subcircuit definitions from a netlist file and apply the port
order in the netlist to the port labels in the corresponding cell
or cells in the magic database. Also: Corrected an error in the
bloat-all code introduced in a recent commit that can cause a
segfault.
templayers. This permits some useful interactions like growing to
the size of a bounding box, or abutment box, as well as many other
possibilities. Also: Corrected the use of "cif see" for the boundary
(abutment box) layer, which was not working because the "cif see"
command uses a flattened CellDef that does not have the boundary
property of the cell it was flattened from.
not copy labels; not copying labels speeds up the antenna checks
(which don't need labels) greatly. Also fixed several numerical
overflow problems in the antenna checks, which resulted in false
positive errors, as well as nonsensical results.
a long-standing error (introduced with the "extresist geometry"
option) that can cause nets not to be extracted (due to the first
record not having extraction data, which was itself a long-standing
error in the code but which was not fixed correctly); (2) handle
"device mosfet" type transistors (previously only handled the old
"fet" type extraction devices); and (3) correct for the res.ext
file having a different scalefactor relative to the .ext file. The
latter item was solved by forcing all input to scale like
ExtCurStyle->exts_unitsPerLambda, locally correcting all input as
needed. Note that extresist still needs to handle other extraction
devices (e.g., resistors and capacitors) but those will require
additional handling in the routines which analyze the current path
to determine how to break up wires into paths.
which takes the existing generated CIF plane, finds all enclosed
areas that have an area less than <area>, and fills them in. This
satisfies a minimum hole area rule in a way that is not possible
with any of the existing CIF operators.
which adds an offset value of "start" to both X and Y from the
lower left corner of the fill area. This allows the use of the
"offset" (from the previous git commit) to be declared on different
layers without creating an exact overlap, as is often required by
foundries for fill patterns.
from a selection, which can then be used to index into other lists.
This lets one selection be made on a list of arbitrary names, and
then additional parameters can be linked together with the same
index). Also, implemented (finally!) the "offset" parameters of
the "slots" function (as advertised in the documentation).
simple FET device in extresist. Also: Extended the bloat-all CIF operator
again, allowing the trigger layer for the bloat operation to include both
CIF layers and magic layers (previously only magic layers were supported).
This extension is possible due to the previous extension allowing the
trigger layer and bloating layers to be on separate planes. This operator
extension is useful for tagging geometry that is in the proximity of, but
not overlapping, geometry on another plane.