projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5eb5e5
)
Fixed constant "cond ? string1 : string2" with strings of different size
author
Clifford Wolf
<clifford@clifford.at>
Sat, 25 Oct 2014 16:23:53 +0000
(18:23 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Sat, 25 Oct 2014 16:23:53 +0000
(18:23 +0200)
frontends/ast/ast.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/ast.cc
b/frontends/ast/ast.cc
index 7a7bd30389f33e71b9b2a1817df8acf6ca34a184..56ea64effd43ddc530a709adec8c54a88066e394 100644
(file)
--- 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;
}