circt icon indicating copy to clipboard operation
circt copied to clipboard

[FIRRTL][LowerTypes] Keep the order of bundle fields in lowered `cat`

Open SpriteOvO opened this issue 2 years ago • 2 comments
trafficstars

Fixes #6360.


The first fix #6339 (reverted) caused a regression reported in #6360.

In the first try, I forgot to handle the bit extract operation that follows it, the PR tries to fix it again without regression.


Credit: Thanks to @uenoku for the hint (https://github.com/llvm/circt/issues/6360#issuecomment-1789251252)

SpriteOvO avatar Nov 03 '23 07:11 SpriteOvO

~~If I understand correctly, it doesn't seem possible to keep the old order specifically for Vector, since a Bundle or Vector can always bitcast to a UInt, in which case we've lost the type used to determine which order should be used. @uenoku What do you think about this?~~ Looks like I just misunderstood something.

This PR also reverses the current order of all bits extract, I'm not very sure if this is an acceptable change? (Will it break something?)

SpriteOvO avatar Nov 03 '23 14:11 SpriteOvO

Gently ping @uenoku. Any updates on internal checks? Are there any further issues with this PR that need to be fixed?

SpriteOvO avatar Nov 14 '23 19:11 SpriteOvO