9 lines
172 B
Systemverilog
9 lines
172 B
Systemverilog
|
module edge_detector(input logic in, clk,
|
||
|
output logic out);
|
||
|
logic old_in;
|
||
|
|
||
|
always_ff@(posedge clk)
|
||
|
old_in <= in;
|
||
|
|
||
|
assign out = in & ~old_in;
|
||
|
endmodule
|