Commit Graph

24 Commits

Author SHA1 Message Date
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -04:00
Darryl Miles 6520aa19a3 extflat.h: efReadError() printf ATTR_FORMAT_PRINTF_1 2025-01-03 09:08:14 +00:00
Tim Edwards 7a9445ec30 Corrected the extraction offset, in which a parameter like "l"
can provide a delta offset such as "l+0.06", indicating that
the extraction model has a length larger than the drawn device.
Previously the value was assumed to be in microns but did not
scale between the .ext file and the SPICE netlist.  Corrected
so that it scales like the other parameter values, being
converted to internal units and tracking the internal grid
scale.
2023-10-24 20:29:04 -04:00
Tim Edwards 89f1c4ee67 Corrected a previous implementation that was supposed to not print
warning messages about ports being electrically connected when
those ports have names that match under rules of case-insensitivity,
and the .ext file is being read for the purpose of generating a
SPICE netlist, which is case-insensitive.  Also:  Corrected a crash
condition when using "extract path <name>" when directory <name>
does not exist.
2023-07-28 09:40:41 -04:00
Tim Edwards 07267dc126 Extended the device parameter notation to include offsets using
'+' and '-' in the same way that '*' is currently used for specifying
a parameter scaling.  The combination of a scale and offset for the
same parameter has not (yet) been implemented.
2023-06-21 20:44:38 -04:00
Tim Edwards c4124b033f Corrected a potential crash condition in extflat which can show up
when reading .ext files with "equiv" statements in them.  The
generation of "equiv" statements was expanded recently, making it
more likely for this issue to show up.  There may be devices in
a file that have a terminal node pointing to the node that gets
removed, and these must be updated to point to the node that
remains after merging.  This requires a full loop over all
devices and so could have a potentially large impact;  but in
general there are not many equiv statements (implying multiple
different labels attached to the same node) and so it is unlikely
that there would be a noticeable performance hit in practice.
2023-04-27 20:47:55 -04:00
Tim Edwards c7f11d2169 Important update: Reworked the extraction method to properly
isolate the terminal areas of a device (e.g., source and drain)
and calculate their area and perimeter individually for the
device (in addition to the traditional method of calculating
area and perimeter of each resistance class for the entire node).

Also:  Reworked the SPICE syntax output to generate SI values
in the range 1-1000 with the appropriate suffix (e.g., "20u")
instead of defaulting to "u" for lengths and "p" for areas.
This prevents it from producing weird units like "150000u" when
a process definition already includes a scalefactor.

Reworked the "extresist" code to use the device terminal area
and perimeter.  This fixes an error in which "extresist" would
lose these values and "ext2spice" with option "extresist on"
would generate a new netlist output with zero terminal areas
and perimeters.
2023-02-16 11:59:13 -05:00
Tim Edwards 02bbb1064e Corrected an error in "extresist" that can output an incorrect
number of terminals for devices that don't have the usual gate/
source/drain terminals (e.g., diodes, resistors, capacitors) when
writing the devices with re-mapped terminals into the .res.ext
file.  Also:  Changed the size of the word containing the name
refcount for "equiv" statements, since an accidental shorting
of pins can cause a large number of "equiv" statements in a .ext
file, causing an overrun of the previously 1-byte refcount (this
probably does not make the structure any longer, since it likely
has to fit to a word boundary).
2022-12-06 21:55:01 -05:00
Tim Edwards 65ef9a1ad3 Final (I hope!) corrections to the "def write" command. 2022-11-19 22:02:44 -05:00
Tim Edwards 6369c44821 One correction to the last commit, to avoid missing output of
port nets in "def write".
2022-11-18 22:28:20 -05:00
Tim Edwards 16da74a2f9 Implemented a method in EFBuildNode() to capture nodes which are
redundant (same name, different net).  Previously, the method was
to keep the first such node and ignore all others except to add
their resistance and capacitance to the original node.  This
prevented routines like "def write" from enumerating all nets
unless they had unique names.  The new method keeps the additional
records including the node location where they can be found by
EFNodeVisit(), but flags them with EF_UNIQUE_NODE so that routines
like ext2spice or ext2sim can choose to ignore them.  This implies
that this method could be used to reimplement "extract unique"
within "ext2spice" or "ext2sim" without altering label text.  This
has not yet been implemented.
2022-11-18 21:44:06 -05:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
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.
2022-10-29 06:07:46 +02:00
Tim Edwards 43d5cc2804 Added a quick check on cell defs when running "antennacheck" to
make sure that the cell def's .ext is not marked "abstract".
Otherwise, "antennacheck" appears to run, but no output is
produced, and no reason is given.
2022-06-20 12:26:23 -04:00
Tim Edwards 9a17539ca7 Corrected the use of EF_SUBS_NODE to distinguish between device
substrate (bulk terminal) and global substrate.  Otherwise, the
routine in ext2hier.c that finds the substrate node will find the
first device bulk connection, not the default substrate.
2021-12-30 13:27:42 -05:00
Tim Edwards d4a09bbc45 Correction to prior commit to remove collision between defined
flag bits for name trimming and short handling method in the
ext2spice options.
2021-07-10 21:27:19 -04:00
Tim Edwards 6136d3ff0f Implemented a command option "ext2spice short voltage|resistor|none" that
implements a method for handling ports in a subcircuit that have different
port names and indexes but are shorted together.  "none" is the default
and backwards-compatible behavior that merges ports together, which will
often cause one of the ports to be optimized out of the netlist.  "resistor"
will separate the port names with a 0-ohm ideal resistor.  "voltage" will
separate the port names with a 0-volt voltage source.  This should work
well for simulation and potentially for LVS, although its impact on LVS
has not been fully investigated.
2021-07-10 21:13:24 -04:00
Tim Edwards 1c0dbc907a Recast all uses of resist-class and device class in routines using
code from extflat from type unsigned long to type TileTypeBitMask.
This increases the number of types of each to 256 and tracks the
number of types, so it should be difficult to exceed this amount.
2021-05-27 16:13:06 -04:00
Tim Edwards fd4569081e Added a reference count to the node structure in extflat to account
for the "equiv" statement---equivalent nodes names have to be
registered in the def->def_nodes hash table, and if they point to
the same node, then that node can't be free'd until the last
referenced node is seen when iterating through the hash table to
free the node records during EFDone().  This is handled by the
reference count.
2021-03-17 14:54:36 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 2569a06c1f Substantial improvements on several fronts, mostly to do with
extraction:  Fixed a problem causing long extraction times, at
least some of which had to do with a poor string hash function
implementation.  Fixed a huge problem in ext2spice, where the
node merge function was particularly poorly implemented, causing
exponentially increasing processing times with layout size.
Corrected a minor issue with ext2spice where arguments were
improperly specified, causing unnecessary error messages to be
issued.  Fixed an error in the "load -dereference" command option,
which again caused unnecessary error messages to be issued.
Changed .gitignore to ignore Depend files, which are now regenerated
on every build.
2020-03-13 10:33:44 -04:00
Tim Edwards 39ab59e7ec Corrected error causing a crash when parasitic extraction is
invoked on a layout with an array of instances.  Also, continued
implementation of antenna violation checking (not done yet).
2019-10-18 14:12:52 -04:00
Tim Edwards e9f3dcadef Added substitution for commas in SPICE output, because commas in
instance names and node names are basically fatal to running
ngspice.
2019-10-14 21:46:07 -04:00
Tim Edwards 79a3934d40 Corrected an error that was previously assumed to be fixed in
8.2.74.  Top-level port names are now flagged independently of
any subcircuit port, so they are easier to identify when determining
naming precedence for the net.  This makes the code cleaner and
removes the problems arising from non-top-level ports and global
names overriding the subcircuit port names.
2018-10-29 17:29:15 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00