RobertLiang
Occasional Contributor
6 years agoHow to realize “posedge asynchronous reset logic” in verilog?
i know high level async reset can be achieved like:
always@(posedge clk or posedge rst) begin if (rst==1)
but how to realize posedge async reset, which means the moment reset edge coming up, the logic in always block reset immediately?
i wrote the logic below:
always@(posedge clk or posedge rst) begin rst_pre<=rst; if(!rst_pre && rst) // to test if rst is posedge //execute reset logic here...
but the question is, the always block was triggered in a unexpected high frequency, i finally figured out that although there was only 1 posedge of rst, the always block was triggered by rst signal much more than 1 time. (tested using altera cyclone 10LP with quartus 18)
I think the method i used to achieve posedge async reset is not stable, can anyone tell me what can i do to solve this?
Hi Robert,
You have to deassert the reset signal, LOW signal in your case. Otherwise, the logic cannot come out from reset state.
Thanks.
Best regards,
KhaiY