FreeCalypso > hg > fc-sim-sniff
view fpga/sniffer-pps/reset_detect.v @ 58:95ed46b5f8f1 default tip
doc/Sniffing-hw-setup: mv-sniffer is here
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 04 Oct 2023 05:55:09 +0000 |
parents | 0f74428c177c |
children |
line wrap: on
line source
/* * This Verilog module captures the logic that detects SIM_RST transitions * in either direction. */ module reset_detect (IntClk, SIM_RST_sync, SIM_RST_toggle); input IntClk; input SIM_RST_sync; output SIM_RST_toggle; reg prev_state; always @(posedge IntClk) prev_state <= SIM_RST_sync; assign SIM_RST_toggle = SIM_RST_sync != prev_state; endmodule