aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorAndrew Zonenberg <azonenberg@drawersteak.com>2017-02-14 08:29:37 -0800
committerAndrew Zonenberg <azonenberg@drawersteak.com>2017-02-14 08:29:37 -0800
commit6fed2dc996a57b0f7c4205e1d76da865dd410982 (patch)
treeab980df43bc10a3aeefb2220b17885e210eeb0a7 /frontends
parent203b521a781ccc4c8dba05d2cc73e4625bcf2a8e (diff)
parent4fb800717101c65344fe78a365b8ae6ca0a90d9e (diff)
downloadyosys-6fed2dc996a57b0f7c4205e1d76da865dd410982.tar.gz
yosys-6fed2dc996a57b0f7c4205e1d76da865dd410982.tar.bz2
yosys-6fed2dc996a57b0f7c4205e1d76da865dd410982.zip
Merge https://github.com/cliffordwolf/yosys
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/simplify.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index eecc04132..f7fcbc479 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -2183,9 +2183,16 @@ skip_dynamic_range_lvalue_expansion:;
if (wire->children.empty()) {
for (auto c : child->children)
wire->children.push_back(c->clone());
- } else {
- if (!child->children.empty())
+ } else if (!child->children.empty()) {
+ while (child->simplify(true, false, false, stage, -1, false, false)) { }
+ if (GetSize(child->children) == GetSize(wire->children)) {
+ for (int i = 0; i < GetSize(child->children); i++)
+ if (*child->children.at(i) != *wire->children.at(i))
+ goto tcall_incompatible_wires;
+ } else {
+ tcall_incompatible_wires:
log_error("Incompatible re-declaration of wire %s at %s:%d.\n", child->str.c_str(), filename.c_str(), linenum);
+ }
}
}
else