-
Notifications
You must be signed in to change notification settings - Fork 1
/
key_filter.vt
40 lines (33 loc) · 908 Bytes
/
key_filter.vt
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
35
36
37
38
39
`timescale 1 ns/ 1 ps
module key_filter_vlg_tst();
reg clk;
reg key_in;
reg rst_n;
// wires
wire isPress;
key_filter i1 (
.clk(clk),
.key_in(key_in),
.rst_n(rst_n),
.isPress(isPress)
);
initial
begin
clk = 1'b1;
rst_n = 1'b0;
key_in = 1'b1;
#50;
rst_n = 1'b1;
#20_000_000;
key_in = 1'b0;
#40_000_000;
key_in = 1'b1;
#20_000_000;
$stop;
end
always
begin
#10;
clk = ~clk;
end
endmodule