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

Const reference in function parameter should be generated as input

Open zhuanhao-wu opened this issue 1 year ago • 0 comments

In https://github.com/intel/systemc-compiler/blob/main/tests/method/test_fcall_ref.cpp

The parameter val of A1__const_ref2_func_4 should be generated as hFunctionParamI

sc_uint<2> const_ref2(const sc_uint<4>& val) {
    sc_uint<2> j = val.range(1,0);
    return j+1;
}

hFunction A1__const_ref2_func_4 [
    hFunctionRetType  NONAME [
      hTypeinfo  NONAME [
        hType sc_uint [
          hLiteral 2 NOLIST
        ]
      ]
    ]
    hFunctionParams  NONAME [
      hFunctionParamIO val [
        hTypeinfo  NONAME [
          hType sc_uint [
            hLiteral 4 NOLIST
          ]
        ]
      ]
    ]
...
  ]

zhuanhao-wu avatar Sep 06 '22 04:09 zhuanhao-wu