diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-10-21 18:26:47 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-10-21 20:20:31 +0200 |
commit | 5cebf6a8efb4f1e9b836db76be0bb2a964932905 (patch) | |
tree | faac24ad43f2365ae39bf005c48e1e2e963290e2 /passes | |
parent | 51d42cc917d66917439955616bc5a3842e5d6301 (diff) | |
download | yosys-5cebf6a8efb4f1e9b836db76be0bb2a964932905.tar.gz yosys-5cebf6a8efb4f1e9b836db76be0bb2a964932905.tar.bz2 yosys-5cebf6a8efb4f1e9b836db76be0bb2a964932905.zip |
Change implicit conversions from bool to Sig* to explicit.
Also fixes some completely broken code in extract_reduce.
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/extract_reduce.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/passes/techmap/extract_reduce.cc b/passes/techmap/extract_reduce.cc index b2da126ab..892e9a364 100644 --- a/passes/techmap/extract_reduce.cc +++ b/passes/techmap/extract_reduce.cc @@ -152,10 +152,10 @@ struct ExtractReducePass : public Pass log_assert(y.size() == 1); // Should only continue if there is one fanout back into a cell (not to a port) - if (sig_to_sink[y[0]].size() != 1) + if (sig_to_sink[y].size() != 1 || port_sigs.count(y)) break; - x = *sig_to_sink[y[0]].begin(); + x = *sig_to_sink[y].begin(); } sinks.insert(head_cell); @@ -183,13 +183,15 @@ struct ExtractReducePass : public Pass continue; } + auto xy = sigmap(x->getPort(ID::Y)); + //If this signal drives a port, add it to the sinks //(even though it may not be the end of a chain) - if(port_sigs.count(x) && !consumed_cells.count(x)) + if(port_sigs.count(xy) && !consumed_cells.count(x)) sinks.insert(x); //It's a match, search everything out from it - auto& next = sig_to_sink[x]; + auto& next = sig_to_sink[xy]; for(auto z : next) next_loads.insert(z); } |