If you are using any simulator that support SystemVerilog, if you write your code as
reg A = 0;
The initialization of A is guaranteed to execute before any always or initial block execute.
Alternatively you could make the first assignment to A=1, but then you would have the problem for @(posedge A) if there are any.
If you are using any simulator that support SystemVerilog, if you write your code as
reg A = 0;
The initialization of A is guaranteed to execute before any always or initial block execute.
Alternatively you could make the first assignment to A=1, but then you would have the problem for @(posedge A) if there are any.