Skip to content

[ILAtor] Failure to concatenate constant with specified length in systemc model generation #179

@LeeOHzzZ

Description

@LeeOHzzZ

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:

  1. Go to ILA model and specify a variable of var1 = Concat(var2, BvConst(0, 4))
  2. Build the ILA model and generate the systemc codes
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions