Consider that I have a common verilog module that I want to be exported to 2 different kinds of designs - one on sync reset and the other on async reset.
What would be the right way to code an always block within this common module so that it works fine in both kinds of designs? I am thinking we can use the async reset block like this -
always @(posedge clk or negedge reset_) begin
if(!reset_) temp <= 'd0;
else <do something>
end
If i use sync reset then in async reset designs i have a problem if clocks start much later than reset assertion-deassertion so the required reset can be completely missed.
In sync reset we know the posedge of clk and negedge of reset_ will coincide always, so is there any issue with that?