Closed GTwhy closed 1 year ago
Please make a PR. Your change works for the case that the method has a single param which is an enum. The failure you are seeing is due to how the generated code reconstructs enum values that cross a word boundary.
Instead of using '|=' it should use '=' and '|': `` tempdata.host2Cntrl.reqQp.qpAttrMask = (QpAttrMask)((int)tempdata.host2Cntrl.reqQp.qpAttrMask | (((tmp>>23)&0x1fful)));
I have a fix for the second problem
Pushed a change to master so your PR should work now
Yes, it works. Thank you!
Merged so quickly! I really like your project. Thank you again!
Hi, I need to transfer some scoped enumeration, but I noticed that connectal currently only supports calculating the bitwidth of unscoped enumeration. I added some code to support the bitwidth calculation of decimal number scoped enumeration, which should be sufficient because bsv does not yet support scoped enumeration other than decimal numbers.
For example, the scoped enum type we use is:
Modify the
typeBitWidth
function incppgen.py
:But I encountered a type conversion issue, which is a warning and treated as an error. I tried using
static_cast<QpAttrMask>
to convert the type, but the warning still remains. However, there is no warning when the symbol is=
instead of|=
.Do you have any suggestions for this? If the issue is resolved, I would like to make a pull request. Thank you!