You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In ILA model, concatenation with specified length of constant is often used to expand the variable's length. However, the generated systemc model fails to concatenate the specified length of constant.
e.x.
ILA code: var1 = Concat(var2, BvConst(0,4)), we should expected the var1 in systemc has a bitwidth of len(var2) + 4. However, the generated systemc code is like this:
SystemC code: var1_sc = (var2_sc, 0), which only has bitwidth of len(var2_sc) + 1
To Reproduce
Steps to reproduce the behavior:
Go to ILA model and specify a variable of var1 = Concat(var2, BvConst(0, 4))
Build the ILA model and generate the systemc codes
Look into the var1 update function (decode_*****), and you can see the error
Environment (please complete the following information):
OS: [e.g. Ubuntu 18.04]
Compiler gcc8
The text was updated successfully, but these errors were encountered:
@yuex1994
The bitwidth may be correct, but the value is wrong for the intermediate result.
For example, if s1 == BvConst(1,0), and s2 = Concat(s1, BvConst(0, 4)), then s2 should be equal to 16. However, in the current version, in systemc model, s2 = (s1,0), which is equal to 2 instead, which means it only append 1 bit after s1 for the concatenation.
Fix bug #179: miss constant bit_width in ILAtor Concat-op
Bo-Yuan-Huang
changed the title
Failure to concatenate constant with specified length in systemc model generation
[ILAtor] Failure to concatenate constant with specified length in systemc model generation
Jun 23, 2020
Describe the bug
In ILA model, concatenation with specified length of constant is often used to expand the variable's length. However, the generated systemc model fails to concatenate the specified length of constant.
e.x.
ILA code: var1 = Concat(var2, BvConst(0,4)), we should expected the var1 in systemc has a bitwidth of len(var2) + 4. However, the generated systemc code is like this:
SystemC code: var1_sc = (var2_sc, 0), which only has bitwidth of len(var2_sc) + 1
To Reproduce
Steps to reproduce the behavior:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: