Conversation
|
We have used the same alignment in many other places. If such a situation (like a 41-bit-wide signal) does exist, we will make the changes together in this PR. |
It's OK! Should I close this PR directly now, or temporarily convert it to a draft? |
How is this PR going? |
I think if necessary, we can replace all |
We need a conclusion for each PR whose author has done his/her work. Either we, as maintainers, will accept it in the future or now (then do it ASAP) or not accept it (and close it) |
OK. I will try to find other similar alignment issue, and fix them ASAP. |
|
This update refines the alignment for difftest elems. Previously, element widths |
This update refines the alignment for difftest elems. Previously, element widths were simply rounded up to the nearest multiple of 8 bits, which could produce unsupported C++ types such as uint48_t (e.g., for a 41-bit signal). We now align each element to the nearest supported C++ type (uint8_t, uint16_t, uint32_t, uint64_t), ensuring correct code generation and type safety in the C++ logic. Co-authored-by: linzhida <linzhida19@mails.ucas.ac.cn>
When generating
arrayType, not all 8-bit-aligned types are valid in C++.For example, if someone defines a 41-bit-wide signal, it may result in generating an unsupported C++ type like uint48_t instead of a valid uint64_t.
This change ensures that for any given bit width, a C++-supported type is generated.