OpenCores
URL https://opencores.org/ocsvn/core1990_interlaken/core1990_interlaken/trunk

Subversion Repositories core1990_interlaken

[/] [core1990_interlaken/] [trunk/] [gateware/] [simulation/] [Core1990_Test_tb.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 N.Boukadid
library ieee;
2
use ieee.std_logic_1164.all;
3
 
4
entity testbench_Interface_Test is
5
end entity testbench_Interface_Test;
6
 
7
architecture tb_interlaken_interface of testbench_Interface_Test is
8
 
9
    constant   TX_REFCLK_PERIOD        :   time :=  8.0 ns;
10
    constant   RX_REFCLK_PERIOD        :   time :=  8.0 ns;
11
    constant   SYSCLK_PERIOD           :   time :=  25.0 ns;
12
    constant   DCLK_PERIOD             :   time :=  5.0 ns;
13
 
14
    signal System_Clock_In_P : std_logic;
15
    signal System_Clock_In_N : std_logic;
16
 
17
    signal GTREFCLK_IN_P : std_logic;
18
    signal GTREFCLK_IN_N : std_logic;
19 9 N.Boukadid
 
20
    signal USER_CLK_IN_P : std_logic;
21
    signal USER_CLK_IN_N : std_logic;
22 6 N.Boukadid
 
23 9 N.Boukadid
    signal USER_SMA_CLK_OUT_P : std_logic;
24
    signal USER_SMA_CLK_OUT_N : std_logic;
25 6 N.Boukadid
 
26
    signal TX_Out_P     : std_logic;
27
    signal TX_Out_N     : std_logic;
28
    signal RX_In_P      : std_logic;
29
    signal RX_In_N      : std_logic;
30
 
31 9 N.Boukadid
    signal Lock_Out     : std_logic;
32 6 N.Boukadid
    signal valid_out    : std_logic;
33
 
34
begin
35
    RX_In_N <=  TX_Out_N;
36
    RX_In_P <=  TX_Out_P;
37
 
38
    uut : entity work.Interface_Test
39
    port map (
40 9 N.Boukadid
 
41 6 N.Boukadid
        System_Clock_In_P => System_Clock_In_P,
42
        System_Clock_In_N => System_Clock_In_N,
43 9 N.Boukadid
 
44 6 N.Boukadid
        GTREFCLK_IN_P => GTREFCLK_IN_P,
45
        GTREFCLK_IN_N => GTREFCLK_IN_N,
46
 
47 9 N.Boukadid
        USER_CLK_IN_P => USER_CLK_IN_P,
48
        USER_CLK_IN_N => USER_CLK_IN_N,
49
 
50
        USER_SMA_CLK_OUT_P => USER_SMA_CLK_OUT_P,
51
        USER_SMA_CLK_OUT_N => USER_SMA_CLK_OUT_N,
52
 
53 6 N.Boukadid
        RX_In_N => RX_In_N,
54
        RX_In_P => RX_In_P,
55
        TX_Out_N => TX_Out_N,
56
        TX_Out_P => TX_Out_P,
57
 
58 9 N.Boukadid
        Lock_Out  => Lock_Out,
59 6 N.Boukadid
        valid_out => valid_out
60
    );
61
 
62
    process
63
    begin
64
        GTREFCLK_IN_N  <=  '1';
65
        wait for TX_REFCLK_PERIOD/2;
66
        GTREFCLK_IN_N  <=  '0';
67
        wait for TX_REFCLK_PERIOD/2;
68
    end process;
69
 
70
    GTREFCLK_IN_P <= not GTREFCLK_IN_N;
71
 
72
    process
73
    begin
74
        System_Clock_In_N  <=  '1';
75
        wait for DCLK_PERIOD/2;
76
        System_Clock_In_N  <=  '0';
77
        wait for DCLK_PERIOD/2;
78
    end process;
79
 
80
    System_Clock_In_P <= not System_Clock_In_N;
81
 
82
end architecture tb_interlaken_interface;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.