diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-12-02 18:52:05 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-12-02 18:52:05 +0100 |
commit | 8364f509e31c187351bbc193a351aad90480c725 (patch) | |
tree | b0538e8e2583fb56a08caf2c6a15916527dc8940 /frontends | |
parent | 1f6e8f86c516f37f1d93e91c46fe427f7a646b15 (diff) | |
download | yosys-8364f509e31c187351bbc193a351aad90480c725.tar.gz yosys-8364f509e31c187351bbc193a351aad90480c725.tar.bz2 yosys-8364f509e31c187351bbc193a351aad90480c725.zip |
Fix error handling for nested always/initial
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/genrtlil.cc | 2 | ||||
-rw-r--r-- | frontends/ast/simplify.cc | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index 6c2eafacd..3b08fc28d 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -554,6 +554,8 @@ struct AST_INTERNAL::ProcessGenerator break; default: + // ast->dumpAst(NULL, "ast> "); + // current_ast_mod->dumpAst(NULL, "mod> "); log_abort(); } } diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 74e7b4675..f61f7cf7c 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -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; |