mirror of https://github.com/YosysHQ/yosys.git
memory_bram: Fix ignorance of valid, matched rules
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
93ef516d91
commit
85672a6c1f
|
@ -1102,9 +1102,6 @@ void handle_cell(Cell *cell, const rules_t &rules)
|
||||||
auto &bram = rules.brams.at(match.name).at(vi);
|
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));
|
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_rd_ports = 0;
|
||||||
int avail_wr_ports = 0;
|
int avail_wr_ports = 0;
|
||||||
for (int j = 0; j < bram.groups; j++) {
|
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));
|
int efficiency = (100 * match_properties["bits"]) / (dups * cells * bram.dbits * (1 << bram.abits));
|
||||||
match_properties["efficiency"] = efficiency;
|
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(" Metrics for %s: awaste=%d dwaste=%d bwaste=%d waste=%d efficiency=%d\n",
|
||||||
log_id(match.name), awaste, dwaste, bwaste, waste, efficiency);
|
log_id(match.name), awaste, dwaste, bwaste, waste, efficiency);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue