Case statement choices cover only 4 out of 81 cases.

Moderator (Company: Titel) #4245966
Rate this post
• ▲ useful
▼ not useful
puka1012 schrieb:
> how to get rid of this error?
HOW and with WHICH code do you get this error?

READ your own question as if you know NOTHING about your specific 
problem. Does it make any sense? Rarely!

> I have added while others =>.Despite adding this,i am getting error
I assume that you have a VHDL code that uses a 2 bit std_logic_vector 
in a case statement. And because std_logic has 9 values it can have 
"U,X,H,L...1,0". Therefore with 2 bits you have 9*9 = 81 possibilites: 
"UU", "UX", "XU" ... "00". In your case you use only "00", "01", "10" 
and "11". That means 77 possibilites are not covered in your case 
statement. The "when others" includes those 77 cases.

Thats how its done all around the world:
To get rid of this error you could decode "00", "01", "10" explicitly, 
and redirect all others (including the "11") to the "when others" case.



And once more:
please post your ENGLISH questions in the ENGLISH spoken embdev.net!
mikrocontroller.net is the GERMAN part of the forum!

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.