several more questionable methods and allows extresist to find
devices above nets that are part of substrate planes or terminals
that exist on planes other than the device (like diodes, often).
There are still likely much better ways to do this.
checking device terminals in "extresist", leading to incorrect
assignments for devices with only 3 terminals, or for asymmetric
FETs. Corrected "select area label" which had stopped working from
a handful of commits back when the "select" command was corrected for
visible/invisible labels and cells. Corrected the "extresist mindelay"
command option parsing, which was not allowing mindelay to be set to 0.
"tagged <text>" without any additional arguments, to indicate
that the operator should look for text that overlaps the
current layer. That allows handling the case were a text tag
is sitting over space inside a cell, which otherwise would not
be able to be searched. Also corrected a likely issue in which
point labels could not be used as tags because they have no
area to search under.
the output if they reference a killed node. This will result in an
invalid netlist, but at least now all devices are represented in the
output, and a warning is issued about the error. There are still
multiple problems that need to be tracked down and fixed. Most
problems are stemming from the unusual "Short" device handling.
long-standing problem, in which the resistance extraction attempts
to determine the device type of each device. Which is stupid,
because the original extraction process has already done this, and
the information is readily available in the .ext file. This update
allows "extresist" to get all the device information from the .ext
file, so there is no guesswork and no extra time spent trying.
Unfortunately, it does not solve the problem I expected it to solve,
which is the disappearance of _dss and moscap devices from gf180mcu
netlists. More work to do. . .
"lasttop" after a new heap has been allocated and "top" is reset.
This is a minor issue, as even random data at the top of the
newly allocated heap is vanishingly unlikely to make a match,
but valgrind caught it as a use of unallocated memory, and it
should be fixed.
one place as ohms and another as milliohms. Changed it to be
milliohms always, except when written as output to the lumped
resistance file or as diagnostic output. The result makes more
sense, but now has the issue that the maximum resistance is always
an over-estimate and may need to account for resistances in
parallel.
determining what does and doesn't get into the R-C extraction
output. Added option "debug" and moved all excess diagnostic
information to be gated by this flag. Corrected an issue in
the standard extraction in which the substrate is always output
with zero lumped resistance, preventing it from being checked
by "extresist" for inclusion or exclusion in the .res.ext output.
Reinstated the computation of minimum resistance transistor but
excluded other devices. Added more sane handling of exceptional
conditions like loops. The result is a more consistent check of
nets in the design. However, I still need to recheck the
"rg_maxres" calculation because it appears to be too low.
(1) An incorrect use of ExtResetTiles() was found in "extresist"
which impacts performance, especially for small nets.
(2) Corrected units for resistance tolerance in extresist, and
handled output printing in fs when delay values get below ps
size.
(3) Added command option "extract do unique notopports" to be the
extraction option equivalent of the standalone command
"extract unique notopports".
(4) Changed the "extresist" default for "mindelay" to 1ps from 0,
in response to the observation that lumped resistance from
"extract" can be an extreme overestimate, and the extracted
time delay from "extesist" calculations should be used as a
better determination of whether a net should be output as a
resistor network or not.
(5) Added documentation for both "extract do unique notopports"
and the change to the "extresist" default values.
was checking for device terminals that were pointing to the
deallocated node and updating them. However, it failed to check
for whether or not the substrate terminal was pointing to the
deallocated node, potentially causing a crash condition. That has
now been fixed.
that "extresist" selects or rejects networks for resistance
extraction. The "tolerance" value, which nobody (including
myself) seems to understand, is now deprecated, replaced by
a handful of more meaningful options: "threshold" to set a
lumped resistance estimate threshold to determined whether or
not to extract a network; "minres" to specify when to prune
small resistors from the resulting tree network, and "mindelay"
to gate the selection and output on the estimated signal
propagation delay. With these settings, I am much better able
to control the size and complexity of the resulting output.
overhaul was to introduce the concept of a "connection point"
between two cells to the ".ext" file format so that it becomes
possible to do proper hierarchical R-C extraction. Previously
this information was not kept in the .ext file, making it
impossible for "extresist" to know what sub-net of a net connects
up or down the hierarchy. However, additional changes were made
to the extresist code (in the resis/ directory) to add the
handling of connections up and down the hierarchy, and to make
the code a lot clearer and fix ambiguous variable and subroutine
names.
The original version of extresist only worked with 4-terminal FET
devices, and handling of devices with fewer terminals was ignored,
and never properly dealt with. This commit fixes the issues with
devices such as diodes that have fewer terminals.
with respect to visible/invisible labels and cells. The change
inadvertently made the "select area" command option stop selecting
labels on the same type as the layers being selected. This has
been fixed.
"getnode", as there is no limit on the length of a hierarchical
node name, and no check on the string length when copying back into
a fixed-length character array.
The previous code would iterate over `proplen` chunks of strings
but would not initialize `proplen` for plane properties.
Technically for plane properties you don't need to "pre-count"
the string chunks but given how the code is currently written
it's easier to do the counting in all cases.
Also makes sure proprec is init to NULL so that if argument is
empty, property is set to NULL and not random value on the stack.
Fixes#520
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
in "extresist", which when missing causes the plane to be searched
repeatedly from the same point instead of from the last place searched.
Can knock down the "extresist" time by up to 50%.
this had two issues: (1) "getcell" was not being called with
"child 0 0", leading to child cells that are not placed where
expected in relation to a grid snap setting; and (2) "cursor"
was assuming internal units and needed that to be explicitly
stated using "cursor internal".
DBPaint() and DBErase(), which are meant as high-level calls from
the "paint" and "erase" commands and are not appropriate for low-
level tasks like erasing all contacts out of a database. This
cut maybe 40 to 50% time off of the resistance extraction.
avoid re-parsing a linked list from the current breakpoint
to the end to find all entries pointing to the same node.
Instead, the change to be made is saved in a hash table and
applied at the following link, so only one pass through the
linked list is required.
Changed the "ResDissolveContacts()" routine to avoid running both
redundant and useless code. Changed the breakpoint sorting
routine from a bubble sort to a merge sort for linked lists
longer than 16, as merge sort is more efficient for long lists.
This file exists in the magic directory, and is the one the build system uses, this file is a duplicate that has one different line "/ms { rectfill } bind def", and is not used anywhere
Keeping two duplicate files causes issues like them being out of sync, therefore it would be great if it was deleted
The postscript template had a hardcoded stipple length of 29, any more stipples would cause problems with a postscript parser. This was particularly a problem since the default mos.24bit.dstyle has 36 stipples already.
It also used a base-30 encoding.
I have updated the template to fix both issues, it now uses base-10 encoding, and can support up to 255 stipples (which is the maximum length allowed by the current approach of using fonts)
I was also wondering if it made more sense to encode this file directly into the C program as a literal, as half of it already is in the C program. (some "begin"s have an "end" in strings directly embedded in magic, so this file basically serves as a large string that has to be loaded each time from disk, while other parts of the string are stored normally in memory)
ResTriangleCheck(). By using hash tables, I reduced
ResParallelCheck() from O(N^2) to O(N), and I reduced
ResTriangleCheck() from O(N^3) to O(N^2); however, it is a bit
better than that because previously there was an N^2 loop over
items in the same list, so if one list happened to be very long,
then N^2 would be huge; whereas now the N^2 is the length of two
lists multiplied together, where both lists would have to be very
long to have the same performance impact. It appears that long
resistor lists are pathological and rare. For an example
pathological case, the extresist runtime has been reduced from
hours to seconds.
HOME was checked but no check was made on whether or not the
result was NULL. This resolves issue #490 in the github issue
tracker.
Also: Modified the way that "select visible" works to check if
labels and/or cells are rendered visible in the window. If not,
then they are not selected. Previously, cell instances and
labels would be selected whether or not they were visible.
This resolves issue #503 in the github issue tracker.
See github issue tracker issue #490. There were two cases: When
running without the Tk console, a NULL value was being passed to a
string comparison. When running with the Tk console, two variables
were not initialized. Both prolems have been fixed.
line parser does not recognize arguments that are both in the
same word and also space separated; this is easy to do from, e.g.,
a python interpreter by setting an option as a single string as
in "-d null"; it is harder to do from the command line, but can
be done with quotes, as in 'magic "-d null"'.
The utils/args.c routine parses this with ArgStr(), which recognizes
two cases, one in which the option is split across two arguments,
and one in which the option is one word without space separation.
I modified ArgStr() to accept a third syntax in which the option
is in a single argument but is also space-separated. This simply
detects a space in the third character position and moves forward
to the next non-space character and returns that position.
"cifinput"; instead of cifSrTiles(), which ignores the "area"
argument and searches over the entire plane, it should have been
using cifSrTiles2(), which translates the area to CIF coordinates
and searches only over that area. Otherwise, everything on the
same layer in a cell gets tagged, rather than just connected
material.
change, unique node names could only be enforced by running the
command "extract unique", and there was no way to ensure that
the user would run the command as part of the extraction
recipe. Now that it has been changed to an extraction option
instead of a separate command, and does not permanently alter
labels in the layout like the standalone command version did,
it is possible to include the setting in "extract do all",
making it run by default, and requiring the user to manually
turn it off for certain use cases (which are relatively rare).
the repo parsing on opencircuitdesign.com, since yesterday I found
out that the tags were not updating, caused by a documentation
change in a copy of the repository that created a merge conflict
when seen by the script. Will check tomorrow that everything ran
smoothly overnight.