Commit Graph

480 Commits

Author SHA1 Message Date
Tim Edwards b90166985d Corrected an error in the dual CIF style (output & drc) method where
the output style is not set back to what it was before if there are
no cif rules in the default DRC style.
2019-11-25 11:07:59 -05:00
Tim Edwards 7373d55c55 Corrected a problem from the last commit that causes error messages
in the toolkit Tk window when any parameter is modified, due do the
use of a variable before its being defined in the dialog update.
2019-11-22 11:37:04 -05:00
Tim Edwards 27ed2bf975 Modified the toolkit to take a selectlist with the special variable
name "gencell" and use that to create a selection that can change
between (compatible or somewhat compatible) device types.
2019-11-21 15:48:24 -05:00
Tim Edwards be8ba09373 Created an additional argument "start" to the "slots" operator,
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.
2019-11-20 13:36:03 -05:00
Tim Edwards adb4d2613d Added indexed selection to the PDK toolkit script (returns an index
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).
2019-11-20 13:01:14 -05:00
Tim Edwards 3aa09725cb Changed extraction to avoid generating an error message for devices
like resistors where a tile other than space may border the resistor
device on its non-terminal sides (which is handled correctly, and
should not be considered an error).
2019-11-19 11:39:59 -05:00
Tim Edwards d3eb03d19a Additional correction to extraction, still part of the effort to
remove redundant ports.  A comment that I left in the code at the
last commit asked if it was necessary to call efAddNodes and
efAddConns recursively.  An example came up in which the answer
is apparently "yes".  These routines have been replaced by
efFlatNodes(), which appears to solve the problem.  There is now
a question of whether efFlatNodesDeviceless() does anything, and
should its main behavior (to flag deviceless subcircuits) be
folded into efFlatNodes.
2019-11-17 19:08:47 -05:00
Tim Edwards e1783a42a9 Added a "DRC manager" window option. This allows DRC errors to be
categorized by error type and scrolled through conveniently.  However,
it needs work dealing with finding the actual error bounds.  The
"DRC count" counts tiles, which is tile-plane-geometry-specific, and
"DRC listall why" fractures errors both over tiles and over the square
areas that the interactive DRC splits the layout into, for performance.
The DRC error plane needs to be changed to hold different types for
each error class, so that errors can be scanned by boundary instead of
by tile (work to be done).
2019-11-15 10:26:04 -05:00
Tim Edwards 0eb3b1fe1c Corrected an error in ext2spice related to the recent modification to get
rid of redundant port entries in subcircuits.  There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom.  The current fix corrected the test case.  Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
2019-11-14 15:18:26 -05:00
Tim Edwards 5007f3f602 Modified "lef write" so that if a cell has a bounding box declared
by FIXED_BBOX derived from GDS and the new "boundary" cif input
rule, then the bbox property values take precedence over the
extent-of-geometry bounding box.
2019-11-13 15:10:01 -05:00
Tim Edwards 8e22b1504e Corrected an error introduced with the extension of extraction methods
to multiple entries per device;  the resistor length and width calculating
routine lost a break statement and would go into an infinite loop for
resistors with bends in them.
2019-11-13 14:29:19 -05:00
Tim Edwards 3a6f868efc Corrected an error in ext2spice caused by recent changes, that can
generate an extra node in the extract output that comes out as a
"(none)" node in the SPICE netlist from ext2spice.
2019-11-13 13:05:03 -05:00
Tim Edwards e3624d3e5f Added code to avoid a problem with "lef write" when a sticky label
is placed over multiple types.  This causes SelectChunk() to fail
and the pin will have no geometry output in the LEF file.  To avoid
this, the area of the label is always painted into the select cell
so that if SelectChunk() fails, the label area still exists with
the label tile type.
2019-11-12 21:46:52 -05:00
Tim Edwards 855e4ca134 Corrected an apparently long-standing error with the triggered rules
(such as widespacing or directional surround) that will cause the
rule to be triggered without a cause due to a failure to reset the
error count from a previous triggered rule (the condition of failure
is much more rare than this explanation makes it sound, which is why
it went undiscovered for so long).
2019-11-11 15:56:17 -05:00
Tim Edwards 0aca80dbc2 Corrected problem that can cause magic to crash on a "lef read"
command due to an uninitialized variable.
2019-11-01 13:23:31 -04:00
Tim Edwards 8e85c3a96e Corrected a long-standing error in the "widespacing" rule implementation
that was intended to avoid computing maxwidth more than necessary, but
ended up causing the widespacing rule to not be checked in certain
situations.
2019-11-01 12:01:07 -04:00
Tim Edwards 0f45014d18 Corrected an erroneous scalefactor used when reading geometry
attached to a label in a GDS input file;  the scalefactor that was
being used is reset at the beginning of a GDS read, and so becomes
invalid after a database rescaling, resulting in improperly scaled
label geometry if "gds read" is used more than once.
2019-11-01 10:16:43 -04:00
Tim Edwards ecfdb66417 Corrected one error in the recent fix for port enumeration in
ext2spice (hierarchy on), where the port index was not checked for
value -1 (no port) before indexing into the port list.
2019-10-31 15:19:30 -04:00
Tim Edwards fc86f44bb1 Again revisited the problem of duplicate nodes. This time, I think
I understand the problem, which is that nodes are ordered according
to precedence of EFHNBest() within a circuit, but there is no
concept of ordering between circuits.  So ports end up listing nodes
in arbitrary order, and the only way to resolve the order is to use
EFHNBest() as is done within a subcircuit.  Appears to work for
different edge cases tested.
2019-10-29 13:55:28 -04:00
Tim Edwards c342178458 Made some changes to the way that ext2spice generates subcircuit
ports, to avoid creating ports for node names that are redundant.
It would probably be better to avoid creating the redundant node
names in the first place;  however, I am less certain why these
are generated.  The incorrect additional ports all have hierarchical
names in the cell, which is a sign that they are incorrect, as the
cell itself should not have any parents.  The level of certainty
about this fix is definitely not 100%, but it was tested on a
hierarchical analog design, and setting levels of parasitic caps
caused new nodes to appear in subcircuits and in no cases did
information appear to be lost.
2019-10-29 09:44:28 -04:00
Tim Edwards a4ea827d1e More corrections to extresist, which now appears to work if used
with ext2spice without the hierarchy option.  More work needed to
produce correct hierarchical output and to support extraction
devices other than the old "fet" record.
2019-10-28 13:10:16 -04:00
Tim Edwards 0e966af926 Modified the check for redundant label indexes in lefWrite so that
it only complains about (i.e., issues an error message) ports with
the same index but different text, indicating a read port number
collision and a true error.
2019-10-25 12:21:19 -04:00
Tim Edwards 2046318942 Corrected routine lefFileOpen() so that it will read files with
extensions other than specifically ".lef" or ".def" (such as
".tlef" for technology LEF, recently encountered).
2019-10-24 16:57:46 -04:00
Tim Edwards d9ccd711d9 Realizing that the "no such node" messages were directly related to
the below-threshold coupling caps being removed from the hierarchy,
added code to suppress the error message when it is clearly related
to a below-threshold cap that has been removed.
2019-10-23 11:59:59 -04:00
Tim Edwards 71108a88b4 Corrected an error that prevented the "load" command from working
with the simultaneous use of "scaled" and one of the options
"-force" or "-nowindow", due to the use of a wrong index value.
2019-10-23 10:18:54 -04:00
Tim Edwards 7a42b5b6ad Fixed a long-standing error in which "ext2spice merge" fails when
used with "ext2spice hierarchy on" because the device index is not
reset between calls to output cells in the hierarchy, leading to
a mismatch of the index for all cells after the first one output.
2019-10-23 09:33:37 -04:00
Tim Edwards 77e8ff437b Finished first cut at an implementation of antenna rule violation
checks.  Added new command "antennacheck" and a routine that
adds feedback entries where violations are found.  Extended the
syntax of the extraction section of the techfile to support the
antenna ratios and antenna calculation methods.
2019-10-20 22:12:02 -04:00
Tim Edwards b8c34cb10b Fixed an additional call to HashFind() that should have been
HashLookOnly() and can potentially cause a crash.
2019-10-18 14:25:28 -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 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 b41c86980b Corrected a mistake with the extension of the bloat-all CIF operator
that broke the operator for the usual case of all types in the same
plane.
2019-10-16 20:53:03 -04:00
Tim Edwards 745afa900d Corrected missing NULL initializer for device substrate name, which
can result in a segfault when reloading a techfile.
2019-10-16 11:38:31 -04:00
Tim Edwards 0386752abb Removed an error message from DRCcif.c; otherwise it raises an
error whenever there are no DRC-CIF rules in the techfile.  The
same error will be raised anyway when reading the techfile if
DRC-CIF rules are declared without a style being specified.
2019-10-16 10:14:44 -04:00
Tim Edwards 46f3f44849 Corrected EFArgs() so that "ext2spice run -help" works as advertised;
e.g., "-h" or "-help" is now recognized as a valid option instead of
printing a usage message by way of throwing an error.
2019-10-16 09:17:58 -04:00
Tim Edwards 8b0a9275a8 Fixed the value of property FIXED_BBOX when saving a file; it needs
to be scaled down by "reducer" like all other values in the cell.
Suggests a need to have property types other than string, so that
a property type "rect" or "box" can be declared that is saved as a
Rect and always scales without special hack handling of the specific
string FIXED_BBOX. . .
2019-10-15 20:40:59 -04:00
Tim Edwards 3d7a56ac3a Finally got around to undoing an annoyance caused by the wholesale
reduction of memory and startup time, which was to maintain only
one CIF style in memory.  The new method is just to read in and
keep the DRC CIF style separately from the output CIF style.
Because the CIF sections of the techfile are read before the DRC
sections, and the CIF DRC style is declared in the DRC section,
the CIF DRC style is read in on the fly during the first DRC
checking.
2019-10-15 16:24:49 -04:00
Tim Edwards e969097f84 Another correction to fix the tile type for port drivers in
extresist, as the tile type was being set to a transistor gate
type and not the type of the port.
2019-10-15 09:51:25 -04:00
Tim Edwards 097f4fb28c Corrected node reading from extresist because the ".nodes" file
does not have any scaling in the dimensions and so values should not
be divided by the factor lambda from the .sim file "units" line.
2019-10-15 09:16:07 -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 57a5ff6094 Corrected errors preventing extresist from working properly with
hierarchical cells (namely a scaling issue with .sim file units).
More can be done to make the extresist command more user friendly,
but at least port connections as drivers appears to work.
2019-10-14 17:17:08 -04:00
Tim Edwards 58c4c8a32e Corrected problem in which using "ext2spice -d" (distributed
junctions) causes magic to crash.
2019-10-14 13:49:41 -04:00
Tim Edwards 1933c5d4a5 Corrected another problem where the device source/drain area and
perimeter were not output because of recent code that broke the
routine that assigns the resistance classes to devices.  This is
now fixed.  Thanks to Dan Moore for bringing this to my attention,
and debugging investigations.
2019-10-14 11:56:39 -04:00
Tim Edwards b0719384e4 Modified the new extraction method with multiple records for each
device type so that it is now properly backwards compatible with
the old-style "fet" records.  Also corrected the record matching
such that it properly matches according to the number of terminals
while allowing the traditional interpretation that there may be
fewer S/D type records than terminals if the S/D types are the
same for all terminals.
2019-10-14 11:09:58 -04:00
Tim Edwards 000dab40e3 Made a correction to the last commit as the wrong hash search
function was used (HashFind, which never returns NULL, vs.
HashLookOnly, which does) resulting in a failure to solve the
problem which was being patched, which was ext2spice crashing
when cell arrays are present, which itself was due to allowing
brackets in base cell use names.
2019-10-02 12:59:10 -04:00
Tim Edwards 798e87deaf Corrected method relating to use of array notation in the base
use name (not part of an array in magic).  This was failing in
ext2spice due to code in extflat dealing incorrectly with the
array delimiters.  The correction fixes the problem but leaves
the possibility that there could be a conflict between a use
name that is an array and a use name that has the array index
as part of the name.
2019-10-01 19:32:52 -04:00
Tim Edwards 091d7ba2ae Corrected drcAssign for use with CIF drc rules, where the check for
plane is not relevant and can generate false-positive error messages
(although no actual errors occur).
2019-09-19 14:33:30 -04:00
Tim Edwards 0c24c33451 Corrected a bad error from a previous commit (5 days ago, for fixing
the forward-referenced GDS cell problem) in which when writing cells
from 3rd-party GDS, the structure names are written to GDS with the
indicator flag in front, making the structure names and the referenced
names different, so that the GDS file is no longer valid.  This has
been fixed.
2019-09-19 08:22:11 -04:00
Tim Edwards 4b5566af3e Corrected an error that causes alias names for layers to become the
principle layer name, which should not happen (especially in the
case of space, where layers may be aliased to "space" to make them
ignored on input).  Also:  Implemented a "-<types>" option to the
"substrate" record in the techfile to declare types which shield
layers from the substrate.  This allows types like pwell to be used
in different contexts, e.g., as part of the substrate, or as a P-well
in deep N-well, without requiring a different type.  This works in
conjunction with the recently-implemented "+<types>" ID types for
devices.  All of this may seem unnecessary but helps to reduce the
number of layers needing to be defined, and the subsequent complexity
of the DRC rulesets.
2019-09-18 20:48:33 -04:00
Tim Edwards 9b0905ad01 Corrected an error in the GDS compositing that fails to handle GDS
files that have forward references (cells that are instanced before
they are defined), resulting in those cells being given an undefined
string for a prefix, which will result in corrupted GDS output.
Also added a method to prevent forward-referenced cells from triggering
a "redundantly defined" error message when the structure is output.
2019-09-13 09:52:45 -04:00
Tim Edwards 643c39a2d5 Corrected error where modification to allow use of brackets inside
a cell instance name not related to an array moved a variable that
was used later in the routine to the inside of an if block,
effectively making that variable undefined in most cases.
2019-09-03 14:02:27 -04:00