File tree 3 files changed +10
-10
lines changed
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ module debounce_v1 #( parameter
45
45
input ena,
46
46
47
47
input [WIDTH- 1 :0 ] in,
48
- output reg [WIDTH- 1 :0 ] out
48
+ output reg [WIDTH- 1 :0 ] out = 0
49
49
);
50
50
51
51
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ module debounce_v2 #( parameter
47
47
input ena,
48
48
49
49
input [WIDTH - 1 : 0 ] in,
50
- output logic [WIDTH - 1 : 0 ] out
50
+ output logic [WIDTH - 1 : 0 ] out = '0
51
51
);
52
52
53
53
@@ -78,15 +78,15 @@ module debounce_v2 #( parameter
78
78
assign do_sample = s_clk_rise[SAMPLING_FACTOR ];
79
79
80
80
81
- logic [WIDTH - 1 : 0 ] in_is_high = 0 ;
82
- logic [WIDTH - 1 : 0 ] in_is_low = 0 ;
81
+ logic [WIDTH - 1 : 0 ] in_is_high = ' 0 ;
82
+ logic [WIDTH - 1 : 0 ] in_is_low = ' 0 ;
83
83
84
84
always_ff @ (posedge clk) begin
85
85
if (~ nrst) begin
86
- out[WIDTH - 1 : 0 ] <= 0 ;
86
+ out[WIDTH - 1 : 0 ] <= ' 0 ;
87
87
88
- in_is_high[WIDTH - 1 : 0 ] <= 0 ;
89
- in_is_low[WIDTH - 1 : 0 ] <= 0 ;
88
+ in_is_high[WIDTH - 1 : 0 ] <= ' 0 ;
89
+ in_is_low[WIDTH - 1 : 0 ] <= ' 0 ;
90
90
end else if (ena && do_sample) begin
91
91
92
92
// making decisions for outputs
@@ -105,8 +105,8 @@ module debounce_v2 #( parameter
105
105
end // for
106
106
107
107
// resetting flags to initialize new sample window
108
- in_is_high[WIDTH - 1 : 0 ] <= 0 ;
109
- in_is_low[WIDTH - 1 : 0 ] <= 0 ;
108
+ in_is_high[WIDTH - 1 : 0 ] <= ' 0 ;
109
+ in_is_low[WIDTH - 1 : 0 ] <= ' 0 ;
110
110
111
111
end else begin
112
112
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ module debounce_v2 #( parameter
47
47
input ena,
48
48
49
49
input [WIDTH- 1 :0 ] in,
50
- output reg [WIDTH- 1 :0 ] out
50
+ output reg [WIDTH- 1 :0 ] out = 0
51
51
);
52
52
53
53
You can’t perform that action at this time.
0 commit comments