fragnen
Full Member level 4
- Joined
- Apr 3, 2019
- Messages
- 211
- Helped
- 0
- Reputation
- 0
- Reaction score
- 2
- Trophy points
- 18
- Activity points
- 1,490
Do the priority keyword of System Verilog make an incomplete case statement behave as a full case?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The priority and unique keywords before a SystemVerilog case statement do not change the execution behavior of the case statement. However, they do provide violation errors if the statement is coded in such a way that no branch is taken. This helps ensure what gets simulated matches the functionality of what is synthesized.
The paper is misleading to say that priority modifies the behavior of the case statement for simulation. What it does is add an assertion so that if your intention was to interpret it as full_case, but you missed a case item, you would get an error and nothing gets executed. Synthesis treats a missing case item in a full_case as a don't care, and you get whatever logic it most optimal to implement.According to this paper priority behaves like a full_case. That means priority makes a case statement whose all case items are not defined to behave like a full case. Is not it?
Do you want to mean that then the priority modifies the behavior of the case statement for synthesis only?The paper is misleading to say that priority modifies the behavior of the case statement for simulation.