aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-08-14 10:40:53 -0700
committerGitHub <noreply@github.com>2019-08-14 10:40:53 -0700
commit0e128510c0f4441014dd8e07fe820efe0304f28a (patch)
treef23296adb386bd6e69674bb7dd37b54eeda04035 /passes
parent19d6b8846f55b4c7be705619f753bec86deadac8 (diff)
downloadyosys-0e128510c0f4441014dd8e07fe820efe0304f28a.tar.gz
yosys-0e128510c0f4441014dd8e07fe820efe0304f28a.tar.bz2
yosys-0e128510c0f4441014dd8e07fe820efe0304f28a.zip
Revert "Since $_ANDNOT_ is not symmetric, do not sort leaves"
Diffstat (limited to 'passes')
-rw-r--r--passes/techmap/extract_fa.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/passes/techmap/extract_fa.cc b/passes/techmap/extract_fa.cc
index befaf68a4..b541ceb6b 100644
--- a/passes/techmap/extract_fa.cc
+++ b/passes/techmap/extract_fa.cc
@@ -153,10 +153,12 @@ struct ExtractFaWorker
}
}
- void check_partition(SigBit root, const pool<SigBit> &leaves)
+ void check_partition(SigBit root, pool<SigBit> &leaves)
{
if (config.enable_ha && GetSize(leaves) == 2)
{
+ leaves.sort();
+
SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1];
@@ -194,6 +196,8 @@ struct ExtractFaWorker
if (config.enable_fa && GetSize(leaves) == 3)
{
+ leaves.sort();
+
SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1];
SigBit C = SigSpec(leaves)[2];
@@ -233,7 +237,7 @@ struct ExtractFaWorker
}
}
- void find_partitions(SigBit root, const pool<SigBit> &leaves, pool<const pool<SigBit>> &cache, int maxdepth, int maxbreadth)
+ void find_partitions(SigBit root, pool<SigBit> &leaves, pool<pool<SigBit>> &cache, int maxdepth, int maxbreadth)
{
if (cache.count(leaves))
return;
@@ -289,8 +293,8 @@ struct ExtractFaWorker
continue;
SigBit root = it.first;
- const pool<SigBit> leaves = { root };
- pool<const pool<SigBit>> cache;
+ pool<SigBit> leaves = { root };
+ pool<pool<SigBit>> cache;
if (config.verbose)
log(" checking %s\n", log_signal(it.first));