chisel-formal
chisel-formal copied to clipboard
Cover statements for elsewhen, otherwise, and switch
trafficstars
Cover statements are automatically added for when, but not for elsewhen, otherwise, and switch.
I can see two ways around this:
- Add cover statements for all of these.
- Do not automatically add cover statements for
wheneither.
I am actually leaning toward 2 because I do not like that chisel-formal provides its own version of when.
Another option I am exploring is to use a FIRRTL transform to inject these cover statements instead.
Good point. I'll wait to see how you handle this with FIRRTL transforms, IMO that's ultimately the right approach.
FIRRTL transform approach seems to work well: https://github.com/danielkasza/dank-formal/blob/main/src/main/scala/transforms.scala