aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds/bugpoint.cc
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-02-23 00:21:46 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-03-08 20:16:29 +0100
commit4e03865d5bf3fafe0bd3735c88431675d53d2663 (patch)
tree7ef637bd0526b498d32386bc1c79c671a02af7f0 /passes/cmds/bugpoint.cc
parentc00a29296c8d3446c7cfe253080c7e33358219b0 (diff)
downloadyosys-4e03865d5bf3fafe0bd3735c88431675d53d2663.tar.gz
yosys-4e03865d5bf3fafe0bd3735c88431675d53d2663.tar.bz2
yosys-4e03865d5bf3fafe0bd3735c88431675d53d2663.zip
Add support for memory writes in processes.
Diffstat (limited to 'passes/cmds/bugpoint.cc')
-rw-r--r--passes/cmds/bugpoint.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/passes/cmds/bugpoint.cc b/passes/cmds/bugpoint.cc
index da81e7f09..40207b1fc 100644
--- a/passes/cmds/bugpoint.cc
+++ b/passes/cmds/bugpoint.cc
@@ -339,6 +339,23 @@ struct BugpointPass : public Pass {
return design_copy;
}
}
+ int i = 0;
+ for (auto it = sy->mem_write_actions.begin(); it != sy->mem_write_actions.end(); ++it, ++i)
+ {
+ if (index++ == seed)
+ {
+ log_header(design, "Trying to remove sync %s memwr %s %s %s %s in %s.%s.\n", log_signal(sy->signal), log_id(it->memid), log_signal(it->address), log_signal(it->data), log_signal(it->enable), log_id(mod), log_id(pr.first));
+ sy->mem_write_actions.erase(it);
+ // Remove the bit for removed action from other actions' priority masks.
+ for (auto it2 = sy->mem_write_actions.begin(); it2 != sy->mem_write_actions.end(); ++it2) {
+ auto &mask = it2->priority_mask;
+ if (GetSize(mask) > i) {
+ mask.bits.erase(mask.bits.begin() + i);
+ }
+ }
+ return design_copy;
+ }
+ }
}
}
}