2025-02-10 15:16:23 +01:00
|
|
|
`timescale 1ns/1ps
|
|
|
|
|
2025-02-11 13:13:58 +01:00
|
|
|
module timebase #(parameter N = 21)
|
2025-02-10 14:48:20 +01:00
|
|
|
(input logic clk,
|
|
|
|
input logic reset,
|
2025-02-10 15:16:23 +01:00
|
|
|
output logic [N-1:0] count);
|
2025-02-10 14:48:20 +01:00
|
|
|
|
2025-02-10 15:16:23 +01:00
|
|
|
always_ff @(posedge clk, posedge reset)
|
|
|
|
if(reset) count <= 0;
|
|
|
|
else count <= count + 1;
|
2025-02-10 14:48:20 +01:00
|
|
|
endmodule
|