module tb(
input clk,
input rst,
input case_A,
input case_B,
input idata,
output reg odata
);
always@(posedge clk or posedge rst ) begin
if(rst)
odata<=0;
else if(case_A)
odata<=0;
else if(case_B)
odata<=1;
end
endmodule
如果两个
else if
else if