Commit Graph

17 Commits

Author SHA1 Message Date
Tim Edwards 72368a3d13 Added a fallback method for "extresist" whenever a device terminal
connection to a net that has been decomposed into a resistor array
cannot be found.  This indicates some fundamental error in the way
extresist works.  However, it should not be producing an invalid
and unsimulatable netlist.  Instead, it makes an arbitrary connection
from the device terminal to the resistor array and adds an entry in
the output netlist (.res.ext file).  This results in a poor
representation of the resistor network to that terminal, but an
otherwise simulatable netlist.  A warning is issued to note that an
arbitrary connection has been made.  This is most typically a
"garbage in, garbage out" situation in which insufficient information
exists in a layout to inform magic on which direction current is
traveling through a net.  However, it should be possible to rewrite
the extresist code so that magic makes somewhat informed decisions
about current paths and produces a halfway decent representation of
the actual net, instead of just giving up on the detailed extraction.
2025-01-15 10:38:10 -05:00
Darryl L. Miles d94cd72538 37 x warning: array subscript has type 'char'
Compiler is expressing range concern with the warning mitigated by using
unsigned C array offsets.  This also draws attention to the range concern
when reading the code and making changes.

DBundo.c:263:45: warning: array subscript has type 'char'
DBundo.c:279:49: warning: array subscript has type 'char'
DBundo.c:317:52: warning: array subscript has type 'char'
DBundo.c:318:64: warning: array subscript has type 'char'
DBundo.c:324:52: warning: array subscript has type 'char'
DBundo.c:325:64: warning: array subscript has type 'char'
DBundo.c:329:50: warning: array subscript has type 'char'
DBundo.c:330:58: warning: array subscript has type 'char'
DBundo.c:338:52: warning: array subscript has type 'char'
DBundo.c:339:64: warning: array subscript has type 'char'
DBundo.c:345:52: warning: array subscript has type 'char'
DBundo.c:346:64: warning: array subscript has type 'char'
DBundo.c:350:50: warning: array subscript has type 'char'
DBundo.c:351:58: warning: array subscript has type 'char'
DBundo.c:371:52: warning: array subscript has type 'char'
DBundo.c:372:64: warning: array subscript has type 'char'
DBundo.c:378:52: warning: array subscript has type 'char'
DBundo.c:379:64: warning: array subscript has type 'char'
DBundo.c:383:50: warning: array subscript has type 'char'
DBundo.c:384:58: warning: array subscript has type 'char'
DBundo.c:392:52: warning: array subscript has type 'char'
DBundo.c:393:57: warning: array subscript has type 'char'
DBundo.c:399:52: warning: array subscript has type 'char'
DBundo.c:400:57: warning: array subscript has type 'char'
DBundo.c:403:53: warning: array subscript has type 'char'
DBundo.c:407:50: warning: array subscript has type 'char'
DBundo.c:408:58: warning: array subscript has type 'char'
EFbuild.c:1048:32: warning: array subscript has type 'char'
EFbuild.c:1056:32: warning: array subscript has type 'char'
ExtBasic.c:2358:43: warning: array subscript has type 'char'
ExtBasic.c:2493:43: warning: array subscript has type 'char'
ExtBasic.c:2519:43: warning: array subscript has type 'char'
ExtBasic.c:2644:43: warning: array subscript has type 'char'
ExtBasic.c:2678:43: warning: array subscript has type 'char'
ResPrint.c:143:43: warning: array subscript has type 'char'
plotRutils.c:713:34: warning: array subscript has type 'char'
plotRutils.c:786:29: warning: array subscript has type 'char'

GCC14 -Wall cleanup series [-Wchar-subscripts]
2024-10-09 21:12:55 -04:00
Darryl L. Miles b81e04eed4 ResPrint.c: '%s' directive writing 2 bytes into a region of size between 1 and 1000
GCC14 loud default warnings series [-Wformat-overflow=]
2024-10-09 20:39:12 -04:00
Tim Edwards 87702ac98a Reworked the previous commit in a way that makes more sense, as
the problem only occurs when handling the legacy "fet" device.
2023-02-13 13:41:58 -05:00
Tim Edwards 5fcd4441c1 Corrected the "extresist" command behavior to ensure that
transistor records match between the ".ext" file and the ".res.ext"
file for the number of terminals per device.  Previously, the first
device type for the layer type was always being used, and if it had
fewer terminals (e.g., a MOScap), then one terminal would go missing
in the output.
2023-02-13 10:57:43 -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 43bb499bcf Corrected an issue with the limited bitfield dedicated to port numbers;
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.
2021-12-12 22:09:31 -05:00
Tim Edwards d63a102515 Made various updates and corrections to the "extresist" code in
support of devices with terminals on different plances, such as
capacitors, diodes, and bipolar transistors.  Output now appears
to give meaningful results for flattened layouts, although
numerous issues remain for hierarchical layouts.
2021-09-08 16:41:36 -04:00
Tim Edwards 9aa39f820f A number of fixes to the extresist code (as well as style cleanup).
Still tracking down a problem with non-FET devices (e.g., capacitors).
So, work in progress.  Nothing should be affected outside of extresist.
2021-05-25 22:41:52 -04:00
Tim Edwards 693256c373 Corrected an error in extresist that caused it to lose track of any
port that has zero area for the label rectangle.
2021-05-09 16:58:49 -04:00
Tim Edwards a5248a95d3 Additional correction for properly handling the substrate node
when generating the device outputs in the .res.ext file, which was
one of the main points of this exercise.
2021-04-21 21:04:17 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards d0f3aaeb59 Corrected ext2hier.c so that resistance output from extresist takes
the right argument type (float, not int).  Otherwise all resistances
from extresist come out zero when doing "ext2spice extresist on"
and "ext2spice hierarchy on".  Also changed the format of the resistance
in the SPICE output to type float, since values are in standard units of
ohms, and rounding to the nearest ohm seems excessively coarse-grained.
2019-12-16 09:55:11 -05:00
Tim Edwards fd737dbf80 Overhauled the extresist code (again), this time to (1) correct for
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.
2019-12-08 17:37:48 -05:00
Tim Edwards b493334c73 Preliminary changes to support extraction devices other than the original
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.
2019-10-17 16:21:56 -04:00
Tim Edwards 8c75f81cc4 Revised the method for multiple extraction models per device type
to be more robust and not depend on the ordering of the devices in
the techfile.  The extraction method now keeps a mask of which
properties of the device (source/drain types, substrate type,
identifier type) have been found, and will look only for device
records that match what is known about the device.  Added a device
identifier record which is the last record before parameters if the
record begins with "+".  This allows marker layers to be placed
over a device such that it will extract with a different type.
This helps reduce the complexity of the techfile and allows
certain specialized devices like RF or ESD to be identified without
a separate layer type for the device.
2019-08-19 14:11:02 -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