mirror of https://github.com/YosysHQ/yosys.git
Fixed constant "cond ? string1 : string2" with strings of different size
This commit is contained in:
parent
c5eb5e56b8
commit
26cbe4a4e5
|
@ -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 *AstNode::mkconst_str(const std::vector<RTLIL::State> &v)
|
||||||
{
|
{
|
||||||
AstNode *node = mkconst_str(RTLIL::Const(v).decode_string());
|
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);
|
log_assert(node->bits == v);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue