Line 11... |
Line 11... |
signal reset : std_logic;
|
signal reset : std_logic;
|
|
|
signal TX_Data_In : std_logic_vector(63 downto 0);
|
signal TX_Data_In : std_logic_vector(63 downto 0);
|
signal TX_Data_Out : std_logic_vector (66 downto 0); -- later 66 downto 0
|
signal TX_Data_Out : std_logic_vector (66 downto 0); -- later 66 downto 0
|
|
|
signal TX_Enable : std_logic; -- Enable the TX
|
|
signal TX_SOP : std_logic; -- Start of Packet
|
signal TX_SOP : std_logic; -- Start of Packet
|
signal TX_ValidBytes : std_logic_vector(2 downto 0); -- Valid bytes packet contains
|
signal TX_EOP_Valid : std_logic_vector(2 downto 0); -- Valid bytes packet contains
|
signal TX_EOP : std_logic; -- End of Packet
|
signal TX_EOP : std_logic; -- End of Packet
|
signal TX_FlowControl : std_logic_vector(15 downto 0); -- Flow control data (yet unutilized)
|
|
signal TX_Channel : std_logic_vector(7 downto 0); -- Select transmit channel (yet unutilized)
|
signal TX_Channel : std_logic_vector(7 downto 0); -- Select transmit channel (yet unutilized)
|
|
signal TX_Gearboxready : std_logic;
|
|
signal TX_Startseq : std_logic;
|
|
|
signal TX_Link_Up : std_logic;
|
signal TX_FlowControl : std_logic_vector(15 downto 0);
|
|
signal RX_prog_full : std_logic_vector(15 downto 0);
|
|
|
signal TX_Valid_Out : std_logic;
|
signal FIFO_Write_Data : std_logic;
|
signal TX_Control_Out : std_logic;
|
signal FIFO_prog_full : std_logic;
|
|
signal FIFO_Full : std_logic;
|
|
|
|
signal Link_up : std_logic;
|
|
signal TX_valid_out : std_logic;
|
|
|
constant CLK_PERIOD : time := 10 ns;
|
constant CLK_PERIOD : time := 10 ns;
|
|
|
begin
|
begin
|
uut : entity work.interlaken_transmitter
|
uut : entity work.interlaken_transmitter
|
port map (
|
port map (
|
write_clk => write_clk,
|
write_clk => write_clk,
|
clk => clk,
|
clk => clk,
|
reset => reset,
|
reset => reset,
|
|
|
TX_Data_In => TX_Data_In,
|
TX_Data_In => TX_Data_In,
|
TX_Data_Out => TX_Data_Out,
|
TX_Data_Out => TX_Data_Out,
|
TX_Enable => TX_Enable,
|
|
TX_SOP => TX_SOP,
|
TX_SOP => TX_SOP,
|
TX_ValidBytes => TX_ValidBytes,
|
TX_EOP_Valid=> TX_ValidBytes,
|
TX_EOP => TX_EOP,
|
TX_EOP => TX_EOP,
|
TX_FlowControl => TX_FlowControl,
|
|
TX_Channel => TX_Channel,
|
TX_Channel => TX_Channel,
|
|
TX_Gearboxready => TX_Gearboxready,
|
|
TX_Startseq => TX_Startseq,
|
|
|
|
TX_FlowControl => TX_FlowControl,
|
|
RX_prog_full => RX_prog_full,
|
|
|
|
FIFO_Write_Data => FIFO_Write_Data,
|
|
FIFO_prog_full => FIFO_prog_full,
|
|
FIFO_Full => FIFO_Full,
|
|
|
TX_Link_Up => TX_Link_Up,
|
Link_up => Link_up,
|
TX_Valid_Out => TX_Valid_Out,
|
TX_valid_out => TX_valid_out
|
TX_Control_Out => TX_Control_Out
|
|
);
|
);
|
|
|
Clk_process :process
|
Clk_process :process
|
begin
|
begin
|
write_clk <= '1';
|
write_clk <= '1';
|
Line 118... |
Line 131... |
TX_SOP <= '0';
|
TX_SOP <= '0';
|
TX_EOP <= '1';
|
TX_EOP <= '1';
|
wait for CLK_PERIOD;
|
wait for CLK_PERIOD;
|
|
|
TX_EOP <= '0';
|
TX_EOP <= '0';
|
--TX_SOP <= '0';
|
|
TX_data_in <= X"8050505050050505";
|
TX_data_in <= X"8050505050050505";
|
--wait for CLK_PERIOD*3;
|
|
wait for CLK_PERIOD;
|
wait for CLK_PERIOD;
|
|
|
TX_data_in <= X"9486576758050505";
|
TX_data_in <= X"9486576758050505";
|
wait for CLK_PERIOD;
|
wait for CLK_PERIOD;
|
|
|
TX_EOP <= '1';
|
TX_EOP <= '1';
|
TX_data_in <= X"60b35d5dc4a582a7";
|
TX_data_in <= X"60b35d5dc4a582a7";
|
Line 169... |
Line 181... |
TX_Data_in <= X"4f5e5d5c5b5a5958";
|
TX_Data_in <= X"4f5e5d5c5b5a5958";
|
wait for CLK_PERIOD;
|
wait for CLK_PERIOD;
|
|
|
TX_SOP <= '0';
|
TX_SOP <= '0';
|
TX_EOP <= '1';
|
TX_EOP <= '1';
|
wait for CLK_PERIOD;
|
|
|
|
--FIFO_meta <= '0';
|
|
wait for CLK_PERIOD*4;
|
|
--FIFO_meta <= '1';
|
|
wait;
|
wait;
|
end process;
|
end process;
|
|
|
end architecture tb_interlaken_transmitter;
|
end architecture tb_interlaken_transmitter;
|
|
|