6,127
社区成员
发帖
与我相关
我的任务
分享
reg r_rst_in_pre;
reg r_rst_in_sync;
always @(posedge i_clk or negedge i_rst_n)
begin
if(!i_rst_n)
begin
r_rst_in_pre <= 1'b0;
r_rst_in_sync <= 1'b0;
end
else
begin
r_rst_in_pre <= 1'b1;
r_rst_in_sync <= r_rst_in_pre;
end
end
assign o_rst_f = r_rst_in_sync;
always @(posedge i_clk or negedge i_rst_n)
begin
if(!i_rst_n)
begin
r_rst_cnt <= 32'd0;
o_rst <= 1'b0;
end
else
begin
if(r_rst_cnt == 32'd3000)
begin
o_rst <= 1'b1;
end
else
begin
r_rst_cnt <= r_rst_cnt + 32'd1;
end
end
end
begin
end