aboutsummaryrefslogtreecommitdiffstats
path: root/backends/cxxrtl/cxxrtl_backend.cc
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cxxrtl/cxxrtl_backend.cc')
-rw-r--r--backends/cxxrtl/cxxrtl_backend.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc
index ddb954073..70a3add5d 100644
--- a/backends/cxxrtl/cxxrtl_backend.cc
+++ b/backends/cxxrtl/cxxrtl_backend.cc
@@ -1835,6 +1835,8 @@ struct CxxrtlWorker {
f << ",\n";
inc_indent();
for (auto &init : mem->inits) {
+ if (init.removed)
+ continue;
dump_attrs(&init);
int words = GetSize(init.data) / mem->width;
f << indent << "memory<" << mem->width << ">::init<" << words << "> { "
@@ -2488,8 +2490,10 @@ struct CxxrtlWorker {
std::vector<Mem> &memories = mod_memories[module];
memories = Mem::get_all_memories(module);
- for (auto &mem : memories)
+ for (auto &mem : memories) {
mem.narrow();
+ mem.coalesce_inits();
+ }
if (module->get_bool_attribute(ID(cxxrtl_blackbox))) {
for (auto port : module->ports) {