File tree 4 files changed +11
-11
lines changed
4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
// ------------------------------------------------------------------------------
2
2
// clk_divider.sv
3
+ // published as part of https://github.com/pConst/basic_verilog
3
4
// Konstantin Pavlov, [email protected]
4
5
// ------------------------------------------------------------------------------
5
6
6
7
// INFO ------------------------------------------------------------------------
7
8
// Divides main clock to get derivative slower synchronous clocks
8
-
9
+ //
9
10
10
11
/* --- INSTANTIATION TEMPLATE BEGIN ---
11
12
@@ -27,13 +28,13 @@ module clk_divider #( parameter
27
28
input clk,
28
29
input nrst,
29
30
input ena,
30
- output logic [(WIDTH - 1 ): 0 ] out = 0
31
+ output logic [(WIDTH - 1 ): 0 ] out = ' 0
31
32
);
32
33
33
34
34
35
always_ff @ (posedge clk) begin
35
36
if ( ~ nrst ) begin
36
- out[(WIDTH - 1 ): 0 ] <= 0 ;
37
+ out[(WIDTH - 1 ): 0 ] <= ' 0 ;
37
38
end else if (ena) begin
38
39
out[(WIDTH - 1 ): 0 ] <= out[(WIDTH - 1 ): 0 ] + 1'b1 ;
39
40
end
Original file line number Diff line number Diff line change 1
1
// ------------------------------------------------------------------------------
2
- // delay.v
2
+ // delay.sv
3
+ // published as part of https://github.com/pConst/basic_verilog
3
4
// Konstantin Pavlov, [email protected]
4
5
// ------------------------------------------------------------------------------
5
6
12
13
// Tip for Xilinx-based implementations: Leave nrst=1'b1 and ena=1'b1 on
13
14
// purpose of inferring Xilinx`s SRL16E/SRL32E primitives
14
15
//
15
- //
16
16
// CAUTION: delay module is widely used for synchronizing signals across clock
17
17
// domains. When synchronizing, please exclude input data paths from timing
18
- // analisys manually by writing appropriate set_false_path SDC constraint
18
+ // analysis manually by writing appropriate set_false_path SDC constraint
19
19
//
20
20
// Version 2 introduces "ALTERA_BLOCK_RAM" option to implement delays using
21
- // block RAM. Quartus can make shifters on block RAM aautomatically
21
+ // block RAM. Quartus can make shifters on block RAM automatically
22
22
// using 'altshift_taps' internal module when "Auto Shift Register
23
23
// Replacement" option is ON
24
-
24
+ //
25
25
26
26
/* --- INSTANTIATION TEMPLATE BEGIN ---
27
27
Original file line number Diff line number Diff line change 1
1
// --------------------------------------------------------------------------------
2
- // dynamic_delay.v
2
+ // dynamic_delay.sv
3
+ // published as part of https://github.com/pConst/basic_verilog
3
4
// Konstantin Pavlov, [email protected]
4
5
// --------------------------------------------------------------------------------
5
6
Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ always_comb begin
81
81
end else begin
82
82
out[WIDTH - 1 : 0 ] <= in_buf[WIDTH - 1 : 0 ];
83
83
end
84
-
85
-
86
84
end
87
85
88
86
endmodule
You can’t perform that action at this time.
0 commit comments