Skip to content

Commit 7ad8b24

Browse files
authored
Merge pull request YosysHQ#1897 from YosysHQ/dave/bram-rejection-fix
memory_bram: Fix ignorance of valid, matched rules
2 parents 38a0c30 + 85672a6 commit 7ad8b24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

passes/memory/memory_bram.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,9 +1102,6 @@ void handle_cell(Cell *cell, const rules_t &rules)
11021102
auto &bram = rules.brams.at(match.name).at(vi);
11031103
bool or_next_if_better = match.or_next_if_better || vi+1 < GetSize(rules.brams.at(match.name));
11041104

1105-
if (failed_brams.count(pair<IdString, int>(bram.name, bram.variant)))
1106-
continue;
1107-
11081105
int avail_rd_ports = 0;
11091106
int avail_wr_ports = 0;
11101107
for (int j = 0; j < bram.groups; j++) {
@@ -1140,6 +1137,9 @@ void handle_cell(Cell *cell, const rules_t &rules)
11401137
int efficiency = (100 * match_properties["bits"]) / (dups * cells * bram.dbits * (1 << bram.abits));
11411138
match_properties["efficiency"] = efficiency;
11421139

1140+
if (failed_brams.count(pair<IdString, int>(bram.name, bram.variant)))
1141+
goto next_match_rule;
1142+
11431143
log(" Metrics for %s: awaste=%d dwaste=%d bwaste=%d waste=%d efficiency=%d\n",
11441144
log_id(match.name), awaste, dwaste, bwaste, waste, efficiency);
11451145

0 commit comments

Comments
 (0)