sv2v icon indicating copy to clipboard operation
sv2v copied to clipboard

Support for `unique` and `priority`

Open sifferman opened this issue 5 months ago • 0 comments

Hello!

In my opinion, if unique or priority statements are used on case statements, sv2v should add the attributes parallel_case and full_case, respectively.

This is consistent with Vivado: https://docs.xilinx.com/r/en-US/ug901-vivado-synthesis/Case-Statement

From the IEEE 1364.1-2002 spec:

  • 6.1.1.1: (* synthesis, full_case *) shall inform the synthesis tool that for all unspecified case choices, the outputs assigned within the case statement may be treated as synthesis don’t-care assignments.
  • 6.1.1.2: (* synthesis, parallel_case *) is commonly used to remove priority encoders from the gate-level implementation of an RTL case statement.

I would be happy to work on a PR if you feel this would be a valuable addition to sv2v.

sifferman avatar Jan 16 '24 23:01 sifferman