diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-14 22:26:10 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-14 22:26:10 +0200 |
commit | 85e3cc12ac44c44178185b918aa2a7fe9ca89918 (patch) | |
tree | d31bf6e2e97fe87f46d84e2d683d710986a234a8 | |
parent | 5602cbde9f9f86197511036d8873c0f8fb1ca5d7 (diff) | |
download | yosys-85e3cc12ac44c44178185b918aa2a7fe9ca89918.tar.gz yosys-85e3cc12ac44c44178185b918aa2a7fe9ca89918.tar.bz2 yosys-85e3cc12ac44c44178185b918aa2a7fe9ca89918.zip |
Fixed handling of task outputs
-rw-r--r-- | frontends/ast/simplify.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 39c472621..76d1f8270 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1523,12 +1523,14 @@ skip_dynamic_range_lvalue_expansion:; replace_rules[child->str] = wire->str; - if (child->is_input && arg_count < children.size()) + if ((child->is_input || child->is_output) && arg_count < children.size()) { AstNode *arg = children[arg_count++]->clone(); AstNode *wire_id = new AstNode(AST_IDENTIFIER); wire_id->str = wire->str; - AstNode *assign = new AstNode(AST_ASSIGN_EQ, wire_id, arg); + AstNode *assign = child->is_input ? + new AstNode(AST_ASSIGN_EQ, wire_id, arg) : + new AstNode(AST_ASSIGN_EQ, arg, wire_id); for (auto it = current_block->children.begin(); it != current_block->children.end(); it++) { if (*it != current_block_child) |