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 8

Go to most recent revision | 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
 
20
 
21
    signal TX_Out_P     : std_logic;
22
    signal TX_Out_N     : std_logic;
23
    signal RX_In_P      : std_logic;
24
    signal RX_In_N      : std_logic;
25
 
26
    signal valid_out    : std_logic;
27
 
28
begin
29
    RX_In_N <=  TX_Out_N;
30
    RX_In_P <=  TX_Out_P;
31
 
32
    uut : entity work.Interface_Test
33
    port map (
34
        System_Clock_In_P => System_Clock_In_P,
35
        System_Clock_In_N => System_Clock_In_N,
36
        GTREFCLK_IN_P => GTREFCLK_IN_P,
37
        GTREFCLK_IN_N => GTREFCLK_IN_N,
38
 
39
        RX_In_N => RX_In_N,
40
        RX_In_P => RX_In_P,
41
        TX_Out_N => TX_Out_N,
42
        TX_Out_P => TX_Out_P,
43
 
44
        valid_out => valid_out
45
    );
46
 
47
    process
48
    begin
49
        GTREFCLK_IN_N  <=  '1';
50
        wait for TX_REFCLK_PERIOD/2;
51
        GTREFCLK_IN_N  <=  '0';
52
        wait for TX_REFCLK_PERIOD/2;
53
    end process;
54
 
55
    GTREFCLK_IN_P <= not GTREFCLK_IN_N;
56
 
57
    process
58
    begin
59
        System_Clock_In_N  <=  '1';
60
        wait for DCLK_PERIOD/2;
61
        System_Clock_In_N  <=  '0';
62
        wait for DCLK_PERIOD/2;
63
    end process;
64
 
65
    System_Clock_In_P <= not System_Clock_In_N;
66
 
67
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.