3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

Since $_ANDNOT_ is not symmetric, do not sort leaves

This commit is contained in:
Eddie Hung 2019-08-12 11:17:15 -07:00
parent 78b30bbb11
commit e4a0971581

View file

@ -153,12 +153,10 @@ struct ExtractFaWorker
} }
} }
void check_partition(SigBit root, pool<SigBit> &leaves) void check_partition(SigBit root, const pool<SigBit> &leaves)
{ {
if (config.enable_ha && GetSize(leaves) == 2) if (config.enable_ha && GetSize(leaves) == 2)
{ {
leaves.sort();
SigBit A = SigSpec(leaves)[0]; SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1]; SigBit B = SigSpec(leaves)[1];
@ -196,8 +194,6 @@ struct ExtractFaWorker
if (config.enable_fa && GetSize(leaves) == 3) if (config.enable_fa && GetSize(leaves) == 3)
{ {
leaves.sort();
SigBit A = SigSpec(leaves)[0]; SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1]; SigBit B = SigSpec(leaves)[1];
SigBit C = SigSpec(leaves)[2]; SigBit C = SigSpec(leaves)[2];
@ -237,7 +233,7 @@ struct ExtractFaWorker
} }
} }
void find_partitions(SigBit root, pool<SigBit> &leaves, pool<pool<SigBit>> &cache, int maxdepth, int maxbreadth) void find_partitions(SigBit root, const pool<SigBit> &leaves, pool<const pool<SigBit>> &cache, int maxdepth, int maxbreadth)
{ {
if (cache.count(leaves)) if (cache.count(leaves))
return; return;
@ -293,8 +289,8 @@ struct ExtractFaWorker
continue; continue;
SigBit root = it.first; SigBit root = it.first;
pool<SigBit> leaves = { root }; const pool<SigBit> leaves = { root };
pool<pool<SigBit>> cache; pool<const pool<SigBit>> cache;
if (config.verbose) if (config.verbose)
log(" checking %s\n", log_signal(it.first)); log(" checking %s\n", log_signal(it.first));