Commit Graph

90 Commits

Author SHA1 Message Date
Tim Edwards 36f9bfb162 Added exceptions to avoid processing sticky labels in two other
places;  this cuts extraction time by half for the example being
used to test.
2021-04-26 17:00:37 -04:00
Tim Edwards 538d7201e1 Modified the behavior of "extract" so that it does not try to check
for sticky labels making connections through the hierarchy.  This
is only needed for some annoying layouts that put point-size labels
with no connecting geometry in cells, and causes magic to spent
excessive amounts of time searching through labels for any layout
that has lots of labels.
2021-04-26 12:19:33 -04:00
Tim Edwards 3703560305 Removed some testing code that was not supposed to be in the last commit. 2021-04-06 10:15:15 -04:00
Tim Edwards 84f4bf82ea Corrected a few errors in the code from yesterday's commit. 2021-04-06 10:13:36 -04:00
Tim Edwards f84de3676a Moved the substrate plane/restore further out so that planes are
not restored until after all cells have been processed through
extraction.  Otherwise, top-down connections can end up with
different generated names for the same node, resulting in a
disconnect in the netlist.
2021-04-05 16:03:54 -04:00
Tim Edwards fca21c8fc0 Corrected an error causing weird and undefined behavior when
extracting substrate regions, due to failure to clean up the tagged
tiles after exiting a search due to finding a substrate type that
was not the global substrate.
2021-04-05 14:16:28 -04:00
Tim Edwards 9aa9fb53c4 Cleaned up some unused code left over from extraction tests. 2021-04-05 10:29:14 -04:00
Tim Edwards 7be338b44f Committing final verified method for handling isolated substrate. 2021-04-05 10:20:41 -04:00
Tim Edwards 75e4fbe5ad Tests of substrate extraction 2021-04-04 20:43:43 -04:00
Tim Edwards a2f7831b17 First pass at properly handling deep nwell in a parent cell under
subcells that do not have deep nwell.  This commit handles the
case where the pwell region is explicitly marked with a layer
type.  To do:  Handle the case where the pwell region is implicit.
2021-04-01 17:38:00 -04:00
Tim Edwards 2532a696e4 Correction from a recent commit; complicated sets of "equiv"
statement in a .ext file require that all aliases of a node name be
rehashed after a node merge, or else node loops can occur.  Also
prevented statements of the form "equiv A A" from being output in
the .ext file, as they are useless.
2021-03-18 11:37:44 -04:00
Tim Edwards 324721b514 Added some options to the net selection with respect to labels.
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.
2021-03-04 14:00:31 -05:00
Tim Edwards 1f698aa6ee Merged pull request #53 from Dan Moore. 2021-02-17 21:15:54 -05:00
Tim Edwards 171287a131 Corrected the "extract unique" method so that ports which are made
unique will also be assigned a unique port index at the end of the
port list.  That ensures that the unique names are all properly
found in the extracted .subckt for the cell.
2021-01-21 17:08:24 -05:00
Tim Edwards 3c42c5a7f3 Corrected the extraction method for devices with terminals on the
implicit global substrate, as a block of code meant to handle this
case was left unreachable by another recent code fix.
2021-01-21 09:57:03 -05:00
Tim Edwards 647b7cc6c7 Corrected one small inconsistency in the handling of symmetric vs.
asymmetric MOSFET definitions in the tech file "extract" section.
Corrected the nmos.tech.in file to put the resistance classes in
plane order, as otherwise the interpretation of which resistance
classes belongs to the transistor source and drain can get messed
up by the presence of buried contacts.
2021-01-17 12:52:57 -05:00
Tim Edwards 7dfe407787 Implemented a return value for the cell read-in checks with an option
to stop the search whenever a cell is not found.  Used this to implement
a new option for GDS writes, "gds undefined allow|disallow" (default
"disallow") controls whether or not GDS with undefined references will
be allowed to be written.  Similarly affects CIF and LEF writes, extraction,
and DRC (when running "drc check" from the top).
2021-01-14 15:21:39 -05:00
Dan Moore 86c0b7dbbd One last change for issue #50 2021-01-14 12:14:40 -05:00
Tim Edwards 67d0d8c3f0 Corrected the use of the global substrate node name; this has been
restricted to its original intent, which is to replace the long name
formed from the plane short name and the "minfinity" coordinate.
This avoids issues with conflicting substrate names derived from a
real layer such as pwell.  Also, the global substrate node name now
returns the variable name without the "$" in front if the variable
has not been set to anything.  This avoids potential syntax errors
in the netlist.
2021-01-07 15:19:36 -05:00
Tim Edwards d6eeb90f6b Made corrections to the extraction based on a pull request by
Dan Moore for preventing integer overflow in the area calculations.
2021-01-05 12:25:25 -05:00
Tim Edwards 3aef946167 Corrected an error that can confuse a source-drain tied device
with another device record for the same magic type.
2020-12-23 13:39:25 -05:00
Tim Edwards a660d73d5a Fixed a problem with extraction. If an extraction line specifies
one terminal of a device as the substrate, but also specifies
shielding types for the substrate, then the extraction cannot just
assume that a missing terminal is connected to the substrate without
first checking that there are no substrate shielding types under the
device.
2020-12-21 10:10:18 -05:00
Tim Edwards f343863ce3 Corrected two annoying errors: (1) SPICE netlist output subcircuits
could have multiple ports of the same name.  This problem had been
worked over before, but there was an indpendent mechanism producing
the same result for a completely different reason, caused by subcells
being much larger than the cookie-cutter extraction method's extraction
regions.  Solved by tracking port names in a hash table and preventing
re-use.  (2) ext2spice was producing "no such node" errors;  like (1)
this had been previously worked on, and like (1) this mechanism was
independent.  Problem came from not passing -1 to extHierSubstrate for
the non-arrayed dimension of a 1-dimensional array.  Also:  Removed
the word "fatal" from extraction error reporting, as nearly all
extraction errors are entirely benign.  This should clear up confusion
among alarmed end-users.
2020-11-24 15:30:49 -05:00
Tim Edwards 9931244e1e Corrected what appears to be a long-standing error in the "extract
unique" code.  It was using DBEraseLabelsByContent() which would
erase all matching labels, and could potentially erase labels that
were still remaining on the list being processed, causing a segfault.
Also corrected minor errors identified by valgrind during debugging
the above-referenced problem.
2020-11-03 12:17:16 -05:00
Tim Edwards d50fd1c42c Corrected a wayward cut-and-paste error from the last commit. 2020-10-26 13:23:52 -04:00
Tim Edwards 1891abe348 Also added code to not put parameters for a device marked "Ignore"
into the .ext file, in case such devices were assigned parameters.
2020-10-26 13:12:18 -04:00
Tim Edwards 3755661196 Changed the behavior of searches for labels in the basic extraction
such that it looks for material connecting to the label at the
center point of the label and not the lower left corner.  This keeps
the behavior of looking for tiles on the corners of a degenerate
label line or point between layers, but avoids problems with sticky
labels that are not quite aligned with the rectangle (due to certain
commercial EDA tools that have a sloppier notion of labeling).
2020-10-26 13:01:04 -04:00
Tim Edwards 0a1cb9ca99 Added a method to ignore a specific device extraction combination
by setting the model name to "Ignore" in the tech file.
2020-10-26 11:41:36 -04:00
Tim Edwards 8da47b6e84 Made a change to the way ext2sim determines if a FET type is an n or
p device;  this was previously dependent only on the first character
of the extracted device model name.  Since the tech file has control
over what the device layer names are but not the extracted model
names, the device layer type name is used as a backup way to determine
if the type is n or p, if that cannot be determined from the extracted
model name.
2020-10-20 12:22:02 -04:00
Tim Edwards a015b7f8eb Corrected a problem in which extraction of MOS caps (or any device
with two or more terminals other than the device identifier type
tied together) would fail if there were not a device record
specifically matching a one-S/D-terminal device.  This is
inconsistent with past behavior, and so has been fixed.
2020-10-17 12:43:22 -04:00
Tim Edwards 5308c35268 Corrected one final case of extracting an extended-drain pFET
because the opposite type (pwell) is not directly underneath the
gate, but touches it on the plane below.  Because the pwell may
be represented by space tiles on the well plane, it was also
necessary to deal with the space type in the bitmask.
2020-09-21 20:23:37 -04:00
Tim Edwards ec3ac4863f Also corrected an error where the bounds search uses the device
type in the device record, which was not updated at the end of
checking terminals for matching device extraction types.  so the
boundary survey might see the wrong device type and generate an
incorrect boundary survey as a result.
2020-09-21 16:52:49 -04:00
Tim Edwards 380b287aa9 Modified the extraction code to properly handle length and width
of devices that have a terminal underneath the device.  Code not
yet tested.
2020-09-21 16:03:37 -04:00
Tim Edwards 32ec962535 Separated drain and source records for the esFetInfo array, to
support asymmetric FETs and other devices like bipolars that have
three distinct terminals.  This does not go as far as it should to
make the array independent of the number of declared terminals of
the device.  However, it suffices to make, e.g., parameter "a2=area"
work for a bipolar device, and to generate the right drain and source
areas and perimeters for asymmetric (e.g., extended-drain) devices.
2020-09-11 17:29:12 -04:00
Tim Edwards ebe12fecfe Corrected an extraction error that prevented the use of the same
device layer type to describe the extraction for both a regular FET
and an extended-drain device.  Note that the current code still
requires that the extended-drain device be declared first, and does
not check for this or attempt to reorder if incorrect.
2020-09-10 21:44:02 -04:00
Tim Edwards 6cf5f65b51 Corrected a tiny but bad error in the extract section reading of the
tech file that completely undermined the ability to describe an
asymmetric device (different materials for terminals).
2020-09-09 12:18:09 -04:00
Tim Edwards 8b05346409 Added an assertion in ExtCell.c to force a fault if the technology
is NULL when writing a .ext file;  this should help with tracking
down an obscure bug.
2020-08-03 08:18:58 -04:00
Tim Edwards e00a9a293f Corrected one more uninitialized variable, in ExtHard.c. 2020-07-31 21:56:01 -04:00
Tim Edwards f7b5f38461 Corrected an error in the last commit in which I expanded the body of
a "for" loop in extract/ExtHier.c from one line to two but failed to
then put braces around the whole loop.
2020-07-19 17:08:51 -04:00
Tim Edwards d755e4400a Corrected an error in the the extSubtreeFunc() routine, that is
supposed to pull "sticky labels" into the cumulative flattened
layout.  Because it failed to check for the "sticky" flag, it
would copy all labels, causing extraction time to go exponential
as the number of labels in the design increases.  Based on this
correction, the extHierConnectFunc1() routine should be able to
be optimized by stopping the search for sticky labels on the first
non-sticky label, since extSubtreeFunc() ensures that all sticky
labels come first in the label list.
2020-07-18 15:49:20 -04:00
Tim Edwards d0febe7614 Corrected an error in the global substrate name method added recently;
the extractor was not checking temp_subsname as well as glob_subsname,
and so was failing to apply the substrate name to child cells in
"merge" statements in the extract file, causing the substrate to get
disconnected between parent and child.
2020-06-13 16:31:37 -04:00
Tim Edwards 7540854184 Corrected the handling of the "defaultsideoverlap" statement so that it
works for the first pair of types/plane being below the second pair of
types/plane (upward fringing from the top of a wire to an overlapping
wire above it), which was not being handled due to an implicit assumption
that plane1 < plane2, which does not have to be the case.
2020-06-10 10:52:54 -04:00
Tim Edwards fc9ecd2c9b Corrected a problem with an uninitialized entry in ExtCurStyle that
could cause serious errors on systems that do not auto-zero allocated
memory.  Also:  Fixed an error introduced by a recent commit to allocate
character memory for efReadLine() which frees the memory before reading
a .res.ext file, causing a crash when using "ext2spice" with the
"extresist on" option.
2020-06-05 12:46:46 -04:00
Tim Edwards 15f1c82bc9 Added two new features: (1) Default substrate name: Added an
optional name field to the "substrate" line in the extract section
of the techfile.  This is the default name of the substrate if not
connected to anything labeled.  It may use a Tcl variable (preferred).
(2) Added command option "instance orientation [-def]" that returns
the orientation of the named or selected instance.  The -def option
returns the orientation using DEF naming convention;  otherwise, the
naming used with "getcell" is generated.
2020-06-01 16:49:59 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 6adb5dbacf Enhanced the "lef write" routine: (1) Calculates gate and diff
areas and writes ANTENNAGATEAREA and ANTENNADIFFAREA values.
(2) Determines "USE POWER" or "USE GROUND" from label names
matching Tcl variables $VDD and $GND, if the USE has not been
registered as a cell property (knowning the use allows magic
to avoid writing an ANTENNADIFFAREA for power rails, although
doing so should not be an issue).
2020-05-21 16:26:24 -04:00
Tim Edwards 937e848d03 Modified DBTreeCopyConnect() so that it can take an argument to
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.
2020-04-03 16:22:56 -04:00
Tim Edwards 54c6ccc8cd Corrected ExtMain() in the bplane branch (need to do this in master) 2020-03-24 13:55:44 -04:00
Tim Edwards ff0ba7f89d Merge branch 'master' into bplane
Conflicts:
	VERSION

Merged recent changes from master back into bplane, as the efficiency of
bplane for doing extraction on large layouts is unquestionably better.
Fixed the implementation of DBMoveCell() for bplane.  Corrected an error
in the bplane version of dbScaleCell() that enumerates cell uses but
does not free the list.
2020-03-22 14:07:25 -04:00
Tim Edwards c2bf9a8fb4 Added new command option "extract do local" to force all .ext files
to be written to the local directory instead of the directory where
the .mag file is located.
2020-03-21 20:57:11 -04:00