rrucha
Member level 3
I am getting an error in this alway_comb block which uses case statement. I cant understand what is going wrong.
here is the block
here is the block
Code:
always_comb
begin
case (vxh[3:0])
4'd0 : x = {{12{1'b0}}, 1'b1};
4'd1 : x = {{11{1'b0}}, 1'b1, {1{1'b0}}};
4'd2 : x = {{10{1'b0}}, 1'b1, {2{1'b0}}};
4'd3 : x = {{7{1'b0}}, 1'b1, {5{1'b0}}};
4'd4 : x = {{9{1'b0}}, 1'b1, {3{1'b0}}};
4'd5 : x = {{6{1'b0}}, 1'b1, {6{1'b0}}};
4'd6 : x = {{5{1'b0}}, 1'b1, {7{1'b0}}};
4'd7 : x = {{4{1'b0}}, 1'b1, {8{1'b0}}};
4'd8 : x = {{8{1'b0}}, 1'b1, {4{1'b0}}};
4'd9 : x = {{3{1'b0}}, 1'b1, {9{1'b0}}};
4'd10 : x = {{2{1'b0}}, 1'b1, {10{1'b0}}};
4'd11 : x = {{1{1'b0}}, 1'b1, {11{1'b0}}};
4'd12 : x = {1'b1, {12{1'b0}}};
default : x = {{11{1'b0}}, 2'b1};
endcase
end