otsdaq_prepmodernization  v2_05_02_indev
dataout_mux.vhd
1 -- Author: Ryan Rivera, FNAL
2 
3 library IEEE;
4 use IEEE.std_logic_1164.all;
5 use IEEE.std_logic_arith.all;
6 use IEEE.std_logic_unsigned.all;
7 
8 entity dataout_mux is
9  port (
10  sel_udp : in std_logic;
11 
12  arp_tx_en : in STD_LOGIC;
13  arp_tx_er : in STD_LOGIC;
14  arp_data_out : in STD_LOGIC_VECTOR(7 downto 0);
15 
16  udp_tx_en : in STD_LOGIC;
17  udp_tx_er : in STD_LOGIC;
18  udp_data_out : in STD_LOGIC_VECTOR(7 downto 0);
19 
20  tx_en : out STD_LOGIC;
21  tx_er : out STD_LOGIC;
22  txd : out STD_LOGIC_VECTOR(7 downto 0)
23  ) ;
24 end;
25 
26 
27 architecture dataout_mux_arch of dataout_mux is
28 begin
29 
30  tx_en <= udp_tx_en when sel_udp = '1' else arp_tx_en;
31  tx_er <= udp_tx_er when sel_udp = '1' else arp_tx_er;
32  txd <= udp_data_out when sel_udp = '1' else arp_data_out;
33 
34 
35 end dataout_mux_arch;