What's the difference between a += 1 and a = a+1 in SV/V?
always_comb begin a = '0; a += 1; end
always_comb begin a= '0; a = a+1; end
Is 2nd case combinational loop?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
These are equivalent assignment statements in SystemVerilog—there is absolutely no difference. And the two
always_comb blocks do absolutely nothing as they have no sensitivity to any variables. In fact, some tools may generate warnings or errors stating that the blocks do not represent combinational logic.