stanford
Full Member level 2
This code (which has if/else) will take the comparison of "in == a" as higher priority.
However, this code below (which has if, if) also imply the same priority. Are they functionally the same? Will the two get synthesized into the same hardware?
Code:
always_comb begin
out = 0;
if (in == a)
out = y;
else if (in == b)
out = z;
end
However, this code below (which has if, if) also imply the same priority. Are they functionally the same? Will the two get synthesized into the same hardware?
Code:
always_comb begin
out = 0;
if (in == b)
out = z;
if (in == a)
out = y;
end