aboutsummaryrefslogtreecommitdiff
path: root/rtl/bench/tb_clkmgr.v
blob: a987e1c2e196b41817a00acaa50e7beef5a21a80 (plain) (blame)
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
`timescale 1ns / 1ps

module tb_clkmgr;

    // Input
	reg fmc_clk = 1'b0;

    // Clock
    always #11.111 fmc_clk = ~fmc_clk;

    // Outputs
    wire io_clk;
	wire sys_clk;
	wire sys_rst_n;
    wire core_clk;

    // Internals
    reg fmc_clk_inhibit = 1'b0;

	// UUT
	alpha_clkmgr uut
    (
        .fmc_clk(fmc_clk & ~fmc_clk_inhibit),
        .io_clk(io_clk),
		.sys_clk(sys_clk), 
		.sys_rst_n(sys_rst_n),
        .core_clk(core_clk)
	);
    
    // Script
    initial begin
        #399000;
        fmc_clk_inhibit = 1'b1;
        #1000;
        fmc_clk_inhibit = 1'b0;
    end
      
endmodule