mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-14 21:08:47 +00:00
Fixed detection of unconditional $readmem[hb]
This commit is contained in:
parent
c58bd5dc30
commit
9caeadf797
|
@ -1718,11 +1718,18 @@ skip_dynamic_range_lvalue_expansion:;
|
||||||
|
|
||||||
bool unconditional_init = false;
|
bool unconditional_init = false;
|
||||||
if (current_always->type == AST_INITIAL) {
|
if (current_always->type == AST_INITIAL) {
|
||||||
|
pool<AstNode*> queue;
|
||||||
log_assert(current_always->children[0]->type == AST_BLOCK);
|
log_assert(current_always->children[0]->type == AST_BLOCK);
|
||||||
for (auto n : current_always->children[0]->children)
|
queue.insert(current_always->children[0]);
|
||||||
if (n == this) {
|
while (!unconditional_init && !queue.empty()) {
|
||||||
|
pool<AstNode*> next_queue;
|
||||||
|
for (auto n : queue)
|
||||||
|
for (auto c : n->children) {
|
||||||
|
if (c == this)
|
||||||
unconditional_init = true;
|
unconditional_init = true;
|
||||||
break;
|
next_queue.insert(c);
|
||||||
|
}
|
||||||
|
next_queue.swap(queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue