diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-10-25 18:23:53 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-10-25 18:23:53 +0200 |
commit | 26cbe4a4e56c0b95483b7568914d0402ef955b72 (patch) | |
tree | eccbe1c5c44bae437c1c27bd03b54a4c8a22b22f /frontends/ast/ast.cc | |
parent | c5eb5e56b8911bb520a987761739bbb9d9328380 (diff) | |
download | yosys-26cbe4a4e56c0b95483b7568914d0402ef955b72.tar.gz yosys-26cbe4a4e56c0b95483b7568914d0402ef955b72.tar.bz2 yosys-26cbe4a4e56c0b95483b7568914d0402ef955b72.zip |
Fixed constant "cond ? string1 : string2" with strings of different size
Diffstat (limited to 'frontends/ast/ast.cc')
-rw-r--r-- | frontends/ast/ast.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index 7a7bd3038..56ea64eff 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -706,6 +706,8 @@ AstNode *AstNode::mkconst_bits(const std::vector<RTLIL::State> &v, bool is_signe AstNode *AstNode::mkconst_str(const std::vector<RTLIL::State> &v) { AstNode *node = mkconst_str(RTLIL::Const(v).decode_string()); + while (GetSize(node->bits) < GetSize(v)) + node->bits.push_back(RTLIL::State::S0); log_assert(node->bits == v); return node; } |