-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOnePulse.v
34 lines (31 loc) · 978 Bytes
/
OnePulse.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// --------------------------------------------------------------------
// --------------------------------------------------------------------
// Module:OnePulse
//
// Author: george
//
// Description:
//
//
// --------------------------------------------------------------------
// Code Revision History :
// --------------------------------------------------------------------
// Version: |Mod. Date: |Changes Made:
// V1.0 |2021/01/11 |Initial ver
// --------------------------------------------------------------------
///////////////////////////////sample code : onepulse
module OnePulse (
output reg signal_single_pulse,
input wire signal,
input wire clock
);
reg signal_delay;
always @(posedge clock) begin
if (signal == 1'b1 & signal_delay == 1'b0)
signal_single_pulse <= 1'b1;
else
signal_single_pulse <= 1'b0;
signal_delay <= signal;
end
endmodule
////////////////////////////////////////////////