The problem was that with the floating test case, the
ambiguity resolution sometimes assigned the wrong pins
and floating pins/connected pins were swapped.
One option is to make the ambiguity resolver consider
the pin connection state when tenatively evaluating
nodes.
Another option is to put more emphasis on net names
and use them for ambiguity resolution. This has helped
here.
General topic: abstracts and swappable pins.
Issue: we work bottom up and assign pins. This is the
basis for net graph building. But swappable means those
pins can change. The compare works fine, but debugging
output is strange: as the pin assigned is fixed, the nets
found to be attached to a circuit might not fit any
proposed pin pair (which does not contain swapping).
The problem gets worse with abstracts.
The enhancements are
- Such cases generate only warnings in the browser
and the message says swapping might be the case
- Floating nets are treated differently. This should
lead to a better performance for abstracts/black boxes,
but in case of disconnected pins (due to wire errors),
floating nets happen to create mismatches in the nets above.
- Net graph building does not consider swappable nets. In
case of two swappable pins this wouldn't be an issue, but
for more than two this would create ambiguities and
prevent topological matching.
Plus: Debug output option for net graph
Tests updated
Spice writer: don't prefix model name with "M"
Added "device_class_mismatch" message to netlist compare
Assertion if device classes or circuits are nil on
"same_..."
Issue solved: some circuit pins may not have a net - these
need to be ignored.
Requirement: all pins with a net must be mapped.
Detached pins are not present in the mapping table.
A dummy mapping table was introduced to allow dropping
of pins in the second circuit too.
Output of compare should not depend on memory location
anymore and pin mismatch reporting should include all
pins.
Empty circuits play a role as abstracts. They
are compared by using the pin names the nets
are attached to. The implementation change is:
* nodes without device terminals or subcircuit pins
are compared through their net properties (count
and name of pins attached)
* some enhancements of the net string serializer
have been made to account for pin name mismatches.
Some enhancements were required:
* Clusters left over from joined clusters must not be
turned into nets: this leads to dummy nets.
* null Nets can happen as targets of edges. Don't assert
in this case but treat null nets as identical for both
netlists.
* Don't resolve ambiguous nets if there are options to
do this non-ambiguously.
* logger can be null
* Added compare_netlists to dbTestSupport
1.) Can identify transistor netlists without subcircuits
2.) Ambiguities stay unresolved
Next steps: assign ambiguous nets one by one and continue
in case of ambiguitites.