diff options
author | David Shah <dave@ds0.me> | 2020-04-15 16:10:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 16:10:38 +0100 |
commit | 7ad8b242806357599cfcbd228cef5c331935ef7c (patch) | |
tree | aeec4fe4c00fd605c763de73051a7cc4b8ba47f5 | |
parent | 38a0c30d65584335fee3e17f9075711853638ac3 (diff) | |
parent | 85672a6c1fd2d99cc1e5690ab978625e78ccc95d (diff) | |
download | yosys-7ad8b242806357599cfcbd228cef5c331935ef7c.tar.gz yosys-7ad8b242806357599cfcbd228cef5c331935ef7c.tar.bz2 yosys-7ad8b242806357599cfcbd228cef5c331935ef7c.zip |
Merge pull request #1897 from YosysHQ/dave/bram-rejection-fix
memory_bram: Fix ignorance of valid, matched rules
-rw-r--r-- | passes/memory/memory_bram.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/passes/memory/memory_bram.cc b/passes/memory/memory_bram.cc index a25b4536a..0898ec288 100644 --- a/passes/memory/memory_bram.cc +++ b/passes/memory/memory_bram.cc @@ -1102,9 +1102,6 @@ void handle_cell(Cell *cell, const rules_t &rules) auto &bram = rules.brams.at(match.name).at(vi); bool or_next_if_better = match.or_next_if_better || vi+1 < GetSize(rules.brams.at(match.name)); - if (failed_brams.count(pair<IdString, int>(bram.name, bram.variant))) - continue; - int avail_rd_ports = 0; int avail_wr_ports = 0; for (int j = 0; j < bram.groups; j++) { @@ -1140,6 +1137,9 @@ void handle_cell(Cell *cell, const rules_t &rules) int efficiency = (100 * match_properties["bits"]) / (dups * cells * bram.dbits * (1 << bram.abits)); match_properties["efficiency"] = efficiency; + if (failed_brams.count(pair<IdString, int>(bram.name, bram.variant))) + goto next_match_rule; + log(" Metrics for %s: awaste=%d dwaste=%d bwaste=%d waste=%d efficiency=%d\n", log_id(match.name), awaste, dwaste, bwaste, waste, efficiency); |