R
romi
Guest
In the code below when 'set' is 1, is the next value of 'ff'
deterministic? My initial thought was that the LHS of non-blocking
assignments can be computed in any order and since there are 2 non-
blocking assignments, one assigning 0 and one assigning 1, either
value could potentially propagate to 'ff'. However, I also realize
that the always block itself is procedural so perhaps there is some
ordering of the LHS updates of non-blocking assignments within the
same always block. Thanks.
always @(posedge clk) begin
if(~reset_l) begin
ff<=0;
end else begin
ff<=0;
if(set) begin
ff<=1;
end
end
end
deterministic? My initial thought was that the LHS of non-blocking
assignments can be computed in any order and since there are 2 non-
blocking assignments, one assigning 0 and one assigning 1, either
value could potentially propagate to 'ff'. However, I also realize
that the always block itself is procedural so perhaps there is some
ordering of the LHS updates of non-blocking assignments within the
same always block. Thanks.
always @(posedge clk) begin
if(~reset_l) begin
ff<=0;
end else begin
ff<=0;
if(set) begin
ff<=1;
end
end
end