Skip to content

Commit 1a4925d

Browse files
committed
Rename CRG module
1 parent 22b5e9a commit 1a4925d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

sim/ltc/crg.v renamed to sim/ltc/reset_gen.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
* Generates synchronous RESET signal after 16 clock cycles
33
*/
44

5-
module crg(
5+
module reset_gen(
66
input wire clk,
7-
output wire rst_n
7+
output wire reset_n
88
);
99

1010
reg [15:0] x = 16'h0000;
1111
always @(posedge clk)
1212
x <= {x[14:0], 1'b1};
1313

14-
assign rst_n = x[15];
14+
assign reset_n = x[15];
1515

1616
endmodule;

sim/ltc/top.v

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* SMPTE 12M Linear Timecode (LTC) Generator
3+
*/
4+
15
module top(
26
input wire clk,
37
output wire ltc
@@ -39,11 +43,11 @@ module top(
3943
reg [79:0] frame;
4044
reg out;
4145

42-
wire rst_n;
43-
crg reset(clk, rst_n);
46+
wire reset_n;
47+
reset_gen crg(clk, reset_n);
4448

4549
always @(posedge clk) begin
46-
if (rst_n) begin
50+
if (reset_n) begin
4751
out <= ~out;
4852
end
4953
end

0 commit comments

Comments
 (0)