Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Priority keyword of System Verilog

fragnen

Full Member level 4
Joined
Apr 3, 2019
Messages
208
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
1,457
Do the priority keyword of System Verilog make an incomplete case statement behave as a full case?
 
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 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.

Does it mean we should use both priority and full_case pragma together for a case statement where the case statement is incomplete I.e. a few branches are not taken?
 
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?
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.
 
If adding an assertion is considered "modified" behavior of the priority case, then you could consider both simulation and synthesis behaviors are modified. Priority adds an assertion for simulation, and adds full_case for synthesis.
 
The final answer is now being taken as below:

Priority adds an assertion for simulation, and adds full_case for synthesis. Here Priority adds full_case for synthesis means that synthesis treats a missing case item in a full_case as a don't care, and in the synthesis log file also we see that there were missing case items for that particular case statement.

Please confirm about the correctness of the final answer.

Regards
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top