After giving the previous code change some more thought, I
decided that it is beneficial to break symmetries by net name; it's just that net names should not be used before all symmetries related to pins have been broken. So I rewrote the compare routine to take an argument allowing or disallowing net name matches, and make one call to break symmetries by pin name followed by another call to break symmetries by net name. This still solves the original problem, but does not allow symmetries to be broken randomly on internal nets if names have been matched in both netlists. Otherwise the output may report nets that appear to be swapped, making the output confusing.
This commit is contained in:
parent
2483b7440f
commit
6d2ef396ef
|
|
@ -6567,11 +6567,16 @@ void PrintAutomorphisms(void)
|
|||
* separating out those devices that are connected to matching pins
|
||||
* in each circuit.
|
||||
*
|
||||
* If match_nets == TRUE, then also match internal nets by name. Pins
|
||||
* should always be matched by name without considering nets first;
|
||||
* once all symmetries related to pins have been broken, then matching
|
||||
* symmetries by net can keep the output from looking confusing.
|
||||
*
|
||||
* Return value is the same as VerifyMatching()
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int ResolveAutomorphsByPin()
|
||||
int ResolveAutomorphsByPin(int match_nets)
|
||||
{
|
||||
struct NodeClass *NC;
|
||||
struct Node *N;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ extern void RegroupDataStructures();
|
|||
extern void FormatIllegalElementClasses();
|
||||
extern void FormatIllegalNodeClasses();
|
||||
extern int ResolveAutomorphsByProperty();
|
||||
extern int ResolveAutomorphsByPin();
|
||||
extern int ResolveAutomorphsByPin(int match_nets);
|
||||
extern void SummarizeElementClasses(struct ElementClass *EC);
|
||||
extern int remove_group_tags(struct objlist *ob);
|
||||
|
||||
|
|
|
|||
|
|
@ -2512,7 +2512,13 @@ _netcmp_run(ClientData clientData,
|
|||
if (automorphisms > 0) {
|
||||
// Next, attempt to resolve automorphisms uniquely by
|
||||
// using the pin names
|
||||
automorphisms = ResolveAutomorphsByPin();
|
||||
automorphisms = ResolveAutomorphsByPin(FALSE);
|
||||
}
|
||||
if (automorphisms > 0) {
|
||||
// Next, attempt to resolve automorphisms uniquely by
|
||||
// using the net names (should only be done after
|
||||
// resolving by pin).
|
||||
automorphisms = ResolveAutomorphsByPin(TRUE);
|
||||
}
|
||||
if (automorphisms > 0) {
|
||||
// Anything left is truly indistinguishable
|
||||
|
|
|
|||
Loading…
Reference in New Issue