Case Statement
case (expression)
<condition1> :
sequence of statement(s)
<condition2> :
sequence of statement(s)
.
.
default :
sequence of statement(s)
endcase
Format:
Example:
always @(sel or a or b or c or d)
begin
case (sel)
2¡¯b00 :
q = a;
2¡¯b01 :
q = b;
2¡¯b10 :
q = c;
default :
q = d;
endcase
end
ÀÌÀü ½½¶óÀ̵å
´ÙÀ½ ½½¶óÀ̵å
ù ½½¶óÀ̵å·Î À̵¿
±×·¡ÇÈ ¹öÀü º¸±â