systemc-clang icon indicating copy to clipboard operation
systemc-clang copied to clipboard

`plane_reg` in an array should also call constructor

Open zhuanhao-wu opened this issue 3 years ago • 2 comments

In https://github.com/anikau31/systemc-clang/blob/master/examples/llnl-examples/zfpsynth/shared3/zhw_decode.h#L1043

We have declaration of plane_reg<2>'s arrays

plane_reg<2>w[B::dbits/bw_w(2)];
....
plane_reg<2>tmp[4];

However, currently the call to constructors of plane_reg<2> is not present.

zhuanhao-wu avatar Aug 29 '22 18:08 zhuanhao-wu

Related: #343

zhuanhao-wu avatar Aug 29 '22 18:08 zhuanhao-wu

In the following funciton, zhw__plane_reg3__plane_reg_func_9 is called but it is not defined.

 hFunction zhw__decode_streamfp_t11_52_bits_t64_3__refresh_next_bs_regs_func_7 [
        hFunctionRetType  NONAME [
          hTypeinfo  NONAME [
            hType bool NOLIST
          ]
        ]
...
        hCStmt  NONAME [
          hVarAssign  NONAME [
            hVarref reg_thresh_zhw__decode_streamfp_t11_52_bits_t64_3__refresh_next_bs_regs_func_7_local_26 NOLIST
            hLiteral 13 NOLIST
          ]
          hMethodCall bits_t64__bits_t_func_8 [
            hVarref word_zhw__decode_streamfp_t11_52_bits_t64_3__refresh_next_bs_regs_func_7_local_27 NOLIST
            hSigAssignR read [
              hVarref c_m_bfifo_scclang_global_8##data NOLIST
            ]
          ]
          hMethodCall zhw__plane_reg3__plane_reg_func_9 [
            hVarref w_zhw__decode_streamfp_t11_52_bits_t64_3__refresh_next_bs_regs_func_7_local_28 NOLIST
          ]

What was defined had a name:

hFunction zhw__plane_reg3__plane_reg_func_0 [

zhuanhao-wu avatar Oct 11 '22 02:10 zhuanhao-wu