1 | library ieee;
|
2 | use ieee.std_logic_1164.all;
|
3 | use ieee.std_logic_unsigned.all;
|
4 |
|
5 | entity top is
|
6 | end top;
|
7 |
|
8 | architecture behaviour of top is
|
9 |
|
10 | signal Reset : std_logic := '1'; -- LVDS clock output pair
|
11 | signal Reset_n : std_logic; -- LVDS clock output pair
|
12 |
|
13 | signal CLK_Tx : std_logic := '0'; -- LVDS clock output pair
|
14 | signal refclkp : std_logic := '0'; -- LVDS clock output pair
|
15 | signal refclkn : std_logic := '1'; -- LVDS clock output pair
|
16 |
|
17 | signal data_in : std_logic_vector(15 downto 0) := "0000010000000000";
|
18 | signal data_out_p : std_logic := '0';
|
19 | signal data_out_n : std_logic := '0';
|
20 | signal tx_half_clk_ch0 : std_logic;
|
21 | signal tx_full_clk_ch0 : std_logic;
|
22 | signal tx_pll_lol_qd_s : std_logic;
|
23 | signal refclk2fpga : std_logic;
|
24 |
|
25 | component PCS0
|
26 | GENERIC (
|
27 | USER_CONFIG_FILE : String := "PCS0.txt");
|
28 | port (
|
29 | -- CH0 --
|
30 | hdoutp_ch0 : out std_logic;
|
31 | hdoutn_ch0 : out std_logic;
|
32 | txiclk_ch0 : in std_logic;
|
33 | tx_full_clk_ch0 : out std_logic;
|
34 | tx_half_clk_ch0 : out std_logic;
|
35 | txdata_ch0 : in std_logic_vector (15 downto 0);
|
36 | tx_k_ch0 : in std_logic_vector (1 downto 0);
|
37 | tx_force_disp_ch0 : in std_logic_vector (1 downto 0);
|
38 | tx_disp_sel_ch0 : in std_logic_vector (1 downto 0);
|
39 | tx_pwrup_ch0_c : in std_logic;
|
40 | tx_div2_mode_ch0_c : in std_logic;
|
41 |
|
42 | ---- Miscillaneous ports
|
43 | fpga_txrefclk : in std_logic;
|
44 | tx_serdes_rst_c : in std_logic;
|
45 | tx_pll_lol_qd_s : out std_logic;
|
46 | refclk2fpga : out std_logic;
|
47 | rst_n : in std_logic;
|
48 | serdes_rst_qd_c : in std_logic
|
49 | );
|
50 | end component;
|
51 |
|
52 | begin
|
53 |
|
54 | Reset_n <= not Reset;
|
55 |
|
56 | PCS0_inst: PCS0
|
57 | port map(
|
58 | -- CH0 --
|
59 | hdoutp_ch0 => data_out_p,
|
60 | hdoutn_ch0 => data_out_n,
|
61 | txiclk_ch0 => CLK_Tx,
|
62 | tx_full_clk_ch0 => tx_full_clk_ch0,
|
63 | tx_half_clk_ch0 => tx_half_clk_ch0,
|
64 | txdata_ch0 => data_in,
|
65 | tx_k_ch0 => "11",
|
66 | tx_force_disp_ch0 => "00",
|
67 | tx_disp_sel_ch0 => "00",
|
68 | tx_pwrup_ch0_c => '1',
|
69 | tx_div2_mode_ch0_c => '0',
|
70 |
|
71 | ---- Miscillaneous ports
|
72 | fpga_txrefclk => CLK_Tx,
|
73 | tx_serdes_rst_c => Reset,
|
74 | tx_pll_lol_qd_s => tx_pll_lol_qd_s,
|
75 | refclk2fpga => refclk2fpga,
|
76 | rst_n => Reset_n,
|
77 | serdes_rst_qd_c => Reset
|
78 | );
|
79 |
|
80 | process
|
81 | begin
|
82 | wait for 4ns;
|
83 | CLK_Tx <= not CLK_Tx;
|
84 | end process;
|
85 |
|
86 | process
|
87 | begin
|
88 | wait for 5ns;
|
89 | Reset <= '0';
|
90 | end process;
|
91 |
|
92 | end behaviour;
|