always @ (posedge osc_50 or negedge rstn)
if (!rstn)
begin
s2p_act <= 2'b0;
rd_data_ready <= 1'b0;
end
else
begin
s2p_act <= {s2p_act[0], s2p_act_pre};
if (s2p_act[1] && !s2p_act[0])
rd_data_ready <= 1'b1;
else
rd_data_ready <= 1'b0;
end
endmodule
欢迎光临 MyFPGA Forum (https://www.myfpga.org/discuz/)