mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Fix error handling for nested always/initial
This commit is contained in:
parent
1f6e8f86c5
commit
8364f509e3
2 changed files with 5 additions and 0 deletions
|
@ -401,6 +401,9 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
|
|||
|
||||
if (type == AST_ALWAYS || type == AST_INITIAL)
|
||||
{
|
||||
if (current_always != nullptr)
|
||||
log_error("Invalid nesting of always blocks and/or initializations at %s:%d.\n", filename.c_str(), linenum);
|
||||
|
||||
current_always = this;
|
||||
current_always_clocked = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue