cxxrtl: don't assert on wires with multiple drivers.
authorwhitequark <whitequark@whitequark.org>
Sun, 1 Nov 2020 12:49:20 +0000 (12:49 +0000)
committerwhitequark <whitequark@whitequark.org>
Sun, 1 Nov 2020 12:49:30 +0000 (12:49 +0000)
Fixes #2374.

backends/cxxrtl/cxxrtl_backend.cc

index dfea04409dfceca98989416dd0cbd0c0555f2aaf..da46711c1b5bc33d8e8d02e326a2f2540a7bd151 100644 (file)
@@ -2182,6 +2182,8 @@ struct CxxrtlWorker {
                                if (wire->name.begins_with("$") && !elide_internal) continue;
                                if (wire->name.begins_with("\\") && !elide_public) continue;
                                if (edge_wires[wire]) continue;
+                               if (flow.wire_comb_defs[wire].size() > 1)
+                                       log_cmd_error("Wire %s.%s has multiple drivers.\n", log_id(module), log_id(wire));
                                log_assert(flow.wire_comb_defs[wire].size() == 1);
                                elided_wires[wire] = **flow.wire_comb_defs[wire].begin();
                        }