diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-10-10 11:59:32 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-10-10 11:59:32 +0200 |
commit | caa78388cd72d3473903357d52908cd5c84a37d8 (patch) | |
tree | fffa761f0dc5b6911509ce5617185b11d0435c1a /frontends | |
parent | adf17547290b403e863ed7c71960a5678c6bbfaf (diff) | |
download | yosys-caa78388cd72d3473903357d52908cd5c84a37d8.tar.gz yosys-caa78388cd72d3473903357d52908cd5c84a37d8.tar.bz2 yosys-caa78388cd72d3473903357d52908cd5c84a37d8.zip |
Allow $past, $stable, $rose, $fell in $global_clock blocks
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index cd2120b8c..4baed3bfc 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -405,9 +405,13 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, current_always_clocked = false; if (type == AST_ALWAYS) - for (auto child : children) + for (auto child : children) { if (child->type == AST_POSEDGE || child->type == AST_NEGEDGE) current_always_clocked = true; + if (child->type == AST_EDGE && GetSize(child->children) == 1 && + child->children[0]->type == AST_IDENTIFIER && child->children[0]->str == "\\$global_clock") + current_always_clocked = true; + } } int backup_width_hint = width_hint; |