Commit Graph

139 Commits

Author SHA1 Message Date
Tim Edwards 4098b7d5fd Completed an unimplemented method that sets missing properties to
the default before comparing instances against each other for
serial/parallel combination.  In particular, this avoids a
failure to serially combine a device with M = 1 vs. a device with
no M declared.
2017-10-12 15:26:29 -04:00
Tim Edwards f860244700 Provide additional output for mismatched serial/parallel networks.
Netgen was incorrectly treating mismatched networks as a missing
set of parameters on whichever device had more property records,
resulting in misleading output.
2017-10-12 14:17:24 -04:00
Tim Edwards 66015511cb Corrected mismatch count, which was prematurely declaring a
mismatch on "M=" even though some conditions pass.
2017-10-12 12:30:33 -04:00
Tim Edwards 95bce5dbd6 Corrected another error in the serial combination in which the
attempt to resolve values by combining over serial chains was
attempting to access a property "S" in the component's master
record, which generally won't exist unless it has been explicitly
set in the netlist (which is unlikely since "S" is not a standard
SPICE/CDL parameter like "M").
2017-10-12 10:51:13 -04:00
Tim Edwards af3982766e Prevented a crash condition in the error case in which ports are
unordered at the time of reaching reorderpins().  Pins will be
ordered arbitrarily (in the order of appearance in the linked
list), but netgen will not crash.
2017-08-24 09:50:40 -04:00
Tim Edwards b9e26f6fce Implemented better black-box handling. Netlist with "stub" entries
for subcircuits (.subckt ... .ends pair with cellname and pin names
and pin order, but no contents) are automatically treated as black-
box circuits if found and if the "-blackbox" option is passed to the
"lvs" (scripted) command.  The "equate pins" command can be used
outside of a comparison to force two circuits (black-box or
otherwise) to be matched by pin name (if not a black-box circuit,
then this is a provisional name match, as a circuit comparison will
order based on connectivity first, not pin names).  So two sets of
black-box circuit libraries can be used as long as their pin names
match.  One hack added to ignore the "!" at the end of global names
when comparing pin names for matching.  Otherwise, pin names must
compare by case-insensitive string match.
2017-06-20 22:50:31 -04:00
Tim Edwards fd019b4afd Corrected the same error as a few commits back that causes a message
about property errors to show up, not due to property errors, but
due to proxy pins being inserted in the middle of a device record.
However, the first one was fixed for the case of proxy pins being
added to circuit 1, but the same fix was not made for the opposite
case of proxy pins being added to circuit 2.  This commit corrects
that omission.
2017-05-15 16:29:12 -04:00
Tim Edwards ace1c28507 Corrected an error placing proxy pins after the first pin of the
first object if the (presumably top-level) cell has no pins
(top-level cells not in a subcircuit definition satisfy this
condition).
2017-05-05 21:08:09 -04:00
Tim Edwards 7cac67c81b Corrected an error in the property match subroutine that was failing
to stop at the end of an instance record without properties, leading
to strange errors where netgen declares "There were property errors"
but does not print any errors (because there aren't any).
2017-02-27 09:35:18 -05:00
Tim Edwards 0ad5730701 Corrected an error where snprintf() was not used when printing
formatted side-by-side output, causing a crash for names that
exceed the 40-column limit.
2017-02-08 15:16:24 -05:00
Tim Edwards b1924bff65 Finished implementing the Tcl list output format, and added a
routine to convert the list output format to a JSON output file,
for easy readback, parsing, and display using python.
2017-01-09 12:51:31 -05:00
Tim Edwards 8deccaad9c Fixed a bug in the combine routine that causes a segfault; added
preliminary support for a Tcl list output format.
2017-01-07 06:56:51 -05:00
Tim Edwards 4f24915661 Correction to device property matching code to fix a problem that
caused LVS(A, B) to give different results for property errors
than LVS(B, A).
2016-12-12 13:31:56 -05:00
Tim Edwards 777498b30e Completed the implementation of serial/parallel device network
matching.
2016-12-12 11:32:07 -05:00
Tim Edwards 80378d8816 Several errors in the serial combination code fixed, and then
the serial combination routine was disabled so as not to post a
non-working version, since the parallel/serial property networks
are not analyzed.  This should be completed soon.
2016-12-07 21:21:15 -05:00
Tim Edwards 8d976e5686 Added more handling of serial/parallel device networks, including
making any subcircuit serializable by using the new command option
"property (device) serial|parallel enable|disable".  Note that as
of this commit, serial device detection is enabled but serial
networks are not collapsed for matching, which will tend to lead
to property errors in serial devices until this code is added,
which should be in a day or two.
2016-12-07 14:57:43 -05:00
Tim Edwards 564fab9667 Corrected an error in which property types were not promoted if
an instance property did not match the cell property type, as
long as the cell property types of the two compared cells matched.
Along with a recent change that left "M" as a type double during
SPICE netlist read-in, this caused "M" mismatches to be ignored,
because the double value was ignored and the integer value was
always zero.
2016-11-11 09:49:37 -05:00
Tim Edwards 0205902baa Changed behavior of property mismatch reporting. This is to help
avoid the problem where non-critical properties cause devices not
to match, resulting in apparent mismatches of matched devices.
The current behavior now prints a statement about each device.
However, the result is still somewhat ambiguous.
2016-10-25 11:26:45 -04:00
Tim Edwards a2b1f5c85f Removed all instances of macro INLINE, as this is showing up now
as failing on certain compilers.  This undoubtedly reflects some
change in gcc or the OS setup, but since modern compilers should
be able to figure out for themselves when to inline a subroutine
(or not), the inline hint is somewhat arcane and unnecessary.
2016-10-24 13:42:08 -04:00
Tim Edwards 9148edde69 Implemented command option 'ignore shorted', same syntax as
'ignore class', but removes instances of the specified class whose
pins are shorted together.  Currently requires that all pins must
be shorted together.
2016-10-18 14:17:57 -04:00
Tim Edwards 668aa38340 Corrected error in property matching, especially to handle problems
with missing properties in instances that prevent matching (underlines
need to add the code to apply defaults from the object where these
occur).
2016-10-18 09:58:00 -04:00
Tim Edwards 950bb976e6 (1) Corrected output of "nodes" command, which was not handling the
leading '/' of pin names and therefore failing to print anything;
(2) Corrected 'addproxies', which was ending abruptly at the end of
a circuit's object list, such that if an instance needing proxy pins
added was the last object in the circuit, it would not get the proxy
pins added, and therefore would fail LVS.
2016-09-09 09:45:32 -04:00
Tim Edwards 618f912cac Implemented critical property combining in parallel for devices
such as resistors.
2016-07-16 15:44:17 -04:00
Tim Edwards 4a295dbfe4 Corrected use of strdup instead of strsave, which causes a different
malloc() to be called and can cause crashes.
2016-07-16 13:51:53 -04:00
Tim Edwards c7f27c909f Finished basic implementation of matching device properties to
include calculations of effective width due to the addition of
width of multiple device instances in parallel.  The original
behavior of splitting all "M=" devices into individual instances
has been effectively inverted, instead combining all parallel
devices of the same class into one, with multiple property
records for devices with non-matching properties (e.g., width,
length, etc.).  Property matching combines devices with different
"critical properties" (e.g., FET gate width) if these are defined
in the setup using the "property merge" command.

Not yet done:  Matching of multiple property records when
critial properties are not defined, handling of critical properties
that combine in parallel instead of simple addition, handling of
devices that combine in series, and the combination of non-critical
properties (e.g., source and drain area, although these are usually
removed from matching).
2016-07-11 08:41:07 -04:00
Tim Edwards 758b5a249a Extended the prematching phase to include matching of devices
based on properties that can be traded with number of devices,
such as MOSFET width, by merging.  This initial implementation
is somewhat limited, only dealing with properties that merge
by summing.  Only devices that do not match at all in the other
circuit will be considered for merging.  The feature includes
a command option "property ... merge ..." that allows control
over which devices can and cannot be merged.
2016-06-23 22:27:34 -04:00
Tim Edwards 5f634b2a91 Overhaul of the hash table method. Original method used global
variables to iterate over hash table contents.  This led to the
inability to nest hash table iterators.  Fixed by defining a
wrapper structure that holds the actual hash table plus the size
and iterator indexes.  Not only does this solve the nesting
problem, but it also avoids the need to pass the hash table size
on every call, and that reduces the number of ways a hash table
subroutine can go wrong (e.g., cannot access the table out of
bounds simply by passing a size that is larger than was used to
initialize the table).
2016-06-23 10:13:18 -04:00
Tim Edwards e0527a0a89 Corrected the "property tolerance" command in tclnetgen, and cleaned up
some of the property matching output.
2016-05-16 17:33:15 -04:00
Tim Edwards 7edeb2e37d Fairly extensive modifications that allow for handling of, and
comparisons between, duplicate cells (cells with the same netlist
that may have more than one name in a circuit, or which for some
reason appear with the same name more than once in a netlist).
Added more checks to the list prematching, which prevents various
troubles with cells having a mismatched hierarchy.  Added a
command option to "flatten class" to flatten instances only within
a specific cell.  Corrected one error in the pin matching routine.
Added a check in the pin matching routine to look for pins that
have been found to be no-connects after cleaning up the pin lists
of the children of that cell.
2016-05-16 10:50:12 -04:00
Tim Edwards 086495bc28 Corrected a line in FlattenUnmatched that would cause an
infinite loop if attempting to flatten an empty cell.
2016-05-05 10:12:23 -04:00
Tim Edwards 846ab5369a Corrected an error causing a segfault on property mismatches where
one cell is missing properties (failed to check for a NULL value
before checking values internal to the structure that was NULL).
2016-03-20 15:56:39 -04:00
Tim Edwards 8667bf0799 Corrected an additional error that let PropertyMatch() be called
with arguments swapped with respect to Circuit1, Circuit2 definitions,
which are fixed in PropertyMatch().
2016-03-20 12:34:24 -04:00
Tim Edwards 0caf47006c Additional measure to ensure that name altered to avoid cross-
netlist naming conflicts does not also cause a naming conflict.
2016-03-20 11:55:51 -04:00
Tim Edwards b245b79c20 Corrected handling of name matching so that if the setup file
equates class "a" in circuit 1 with class "b" in circuit2, and
if circuit 1 has a class called "b" and/or circuit 2 has a class
called "a", then both classes are given a new hash to avoid
conflicts with the (presumably) unrelated cells of the same name
in the other netlist.
2016-03-20 11:41:41 -04:00
Tim Edwards c2b34e433e Corrected an error in the name-matching of cells. This
comparison would look for matching names from the "equate
classes" command.  However, it failed to do the reverse
check, which is to make sure that if no forced match was
found for a cell, but there was a name match, that the
name-matched cell found is not being forcibly matched to
something else.
2015-09-29 22:39:16 -04:00
Tim Edwards 10664689f5 Modified the name-checking when creating compare queues, such
that matches explicitly called out in the setup file using
"equate classes" will take precedence over same-name matching,
instead of the other way around.
2015-09-24 08:25:48 -04:00
Tim Edwards 91f5338d3a Did the same thing for the reverse case. 2015-08-09 21:46:45 -04:00
Tim Edwards 462fec2897 Added simple code to avoid printing confusing entry when one
cell has no pins and the other does;  the output was adding an
entry attempting to match the "(no pins)" proxy pin.
2015-08-09 21:38:26 -04:00
Tim Edwards d5e9f81cb0 Initial commit at Mon May 18 09:27:46 EDT 2015 by tim on stravinsky 2015-05-18 09:27:46 -04:00