I am wondering if it is OK to replace flip flop resets with the ternary operator to minimize line count and improve readability. Does the RTL below have the same effect in simulation and synthesis?
always_ff @(posedge clk, posedge ares) begin
if (ares) begin
signal <= a;
end
else begin
signal <= b;
end
end
compared with:
always_ff @(posedge clk, posedge ares) begin
signal <= ares ? a : b;
end
How about for the case of synchronous reset?