Skip navigation.
Home

Verilog Falling Edge Detector

It is often necessary to detect when a particular signal is transitioning from high to low. It is also sometimes useful to get a pulse that is a single clock cycle wide to trigger other logic in the system. This snippet demonstrates how a single cycle wide pulse can be generated on the falling edge of a signal.

module falling_edge_detect
(
 input  clk,
 input  signal,
 output pulse
);
 
reg     signal_prev;
 
always @(posedge clk) signal_prev <= signal;
 
assign pulse = ~signal & signal_prev;
 
endmodule

AttachmentSize
falling_edge_detect.v192 bytes

Interesting information about activation

I think this board is the proper place to ask you about the activation proccess. My link is not working properly, do you know why it is happening? http://www.hdlsnippets.com/?bd715e309f1ab553c0a3badcb13,