Jump to content
  • 0

Mixture of case and if-else statements


Saad Bin Shafique

Question

Hi. I have used combination of case and i-else statements. Now the problem is that first case executes successfully but second case never executes. While synthesizing on xilinx, it gives me an error saying that "case condition never applies". Does anybody know what is the problem?

Thanks

Saad

Capture.PNG

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

@Saad Bin Shafique,

I use "if" statements within case statements all the time without a problem, so I don't think that's what's going on in your code.

But your case numbers, 001, 010, etc .... I think you intended these to be binary, but I don't see any 3'b in front of them, such as 3'b000, 3'b001, 3'b010.  If the synthesizer took these to be decimals, and you only fed your case statement with a three bit value, that would probably explain what you have going on.

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...