When a priority encoding is not needed, use a case block instead of an if-then-else block or ternary operator.
Inefficient coding example:
if (reg1)
val = reg_in1;
else if (reg2)
val = reg_in2;
else if (reg3)
val = reg_in3;
else val = reg_in4;
Correct coding example:
(* parallel_case *) casex ({reg1, reg2, reg3})
1xx: val = reg_in1 ;
01x: val = reg_in2 ;
001: val = reg_in3 ;
default: val = reg_in4 ;
endcase