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.

difference between priority case and case

Status
Not open for further replies.

stanford

Full Member level 2
Full Member level 2
Joined
Feb 16, 2014
Messages
132
Helped
4
Reputation
8
Reaction score
6
Trophy points
1,298
Activity points
2,223
For priority case, if all the conditions are not listed, unlisted case items are don’t cares, and can be optimized away.
For case, if all the conditions are not listed, it will synthesize into a latch.

Is this correct?

Thanks
 

For priority case, if all the conditions are not listed, unlisted case items are don’t cares, and can be optimized away.
For case, if all the conditions are not listed, it will synthesize into a latch.

Is this correct?

Thanks

I dont think that is true. Priority case will tell simulation and synthesis tools to generate priority encoded logic. However, if no case matches, you will encounter a violation in simulation:

RT Warning: No condition matches in 'priority case' statement.

However, if you use unique case statement, if you do not add a case condition it will not add latch. For example in case of a 3:1 MUX.


Code Verilog - [expand]
1
2
3
4
5
6
7
always_comb begin
  unique casez(select) begin
    2'b00 : y = a;
    2'b01 : y = b;
    2'b10 : y = c;
  endcase
end // always_comb

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top