derivePackedAnnotation
creates bogus bit representations
#2401
Labels
derivePackedAnnotation
creates bogus bit representations
#2401
It seems
derivePackedAnnotation
is somehow not encoding a constructor discriminator in some cases, picking the first value (all zeroes) for all constructors in that position. For instance, it seems that this datatypeshould have led to Expected but actually results in Actual:
Ba n
0b0n1
0b0n1
Bb n
0b1nn
0b0nn
Bc
0b0.0
0b0.0
The same issue exists with the example from our documentation(!). Also, it seems to be the same in Clash
master
and Clash 1.6.4.Reproducer with a few bells and whistles:
Some output:
HDL behaves the same as Clash simulation, but mind the
reverse
when reading HDL :-).A reproducer for
Train
from the documentationThat reproducer also investigates what happens when you omit
deriveBitPack
; I concluded the problem is purely inderivePackedAnnotation
from the HDL generated for that.The text was updated successfully, but these errors were encountered: