Files
CDi_MiSTer/rtl/resetdelay.sv
Andre Zeps 91450d6ca5 68HC05: Added Input Capture registers and adjusted clock frequency
- Added clock divider to get 0.5 MHz from 30 MHz system clock
  The system timer tick now occurs every 8.1ms like it does on a 210/05

- Added reset delay mechanism to fix the resulting time out when polling
  for the PAL/NTSC status.
  This occurs when the m68k is overclocked

- Added captured RC5 test data to confirm compatibility with the
  Thumbstick remote controller in a simulated environment
2025-04-14 09:54:22 +02:00

23 lines
475 B
Systemverilog

module resetdelay (
input clk,
input reset,
input vsync, // Used to reduce the number of bits to count
output bit delayedreset
);
bit [2:0] cnt;
bit vsync_q;
always_ff @(posedge clk) begin
vsync_q <= vsync;
if (reset) begin
cnt <= 0;
delayedreset <= 1;
end else if (vsync && !vsync_q) begin
cnt <= cnt + 1;
if (cnt == '1) delayedreset <= 0;
end
end
endmodule