kuznia-rdzeni / coreblocks

RISC-V out-of-order core for education and research purposes
https://kuznia-rdzeni.github.io/coreblocks/
BSD 3-Clause "New" or "Revised" License
37 stars 16 forks source link

Make assign stricter #650

Closed tilk closed 7 months ago

tilk commented 7 months ago

This PR makes the assign function stricter in that in the non-recursive case the ShapeLikes of both sides of the assignments should match, not just bit widths. An exception is added for single field structures, so that most of the non-strict uses of assign in our code still work. For the two cases where changes were needed, the problem will naturally disappear after an Amaranth upgrade, as memory data entries don't need to be only bit vectors anymore.

This is a prerequisite for UnionLayout support (#646).