From a8d5c9b000246d4d56937616c7763841c36cc3a1 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Mon, 30 Oct 2006 15:22:07 +0000 Subject: [PATCH] added trb_net_med_32lvds.vhd trb_net_med_tlkx501.vhd, Ingo --- trb_net_med_32lvds.vhd | 51 +++++++++++++++++++++++++++++++++++++++++ trb_net_med_tlkx501.vhd | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 trb_net_med_32lvds.vhd create mode 100644 trb_net_med_tlkx501.vhd diff --git a/trb_net_med_32lvds.vhd b/trb_net_med_32lvds.vhd new file mode 100644 index 0000000..ca1bc9e --- /dev/null +++ b/trb_net_med_32lvds.vhd @@ -0,0 +1,51 @@ +-- media interface for the 32 lvds lines (16 in each direction) +-- for a description see HADES wiki +-- http://hades-wiki.gsi.de/cgi-bin/view/DaqSlowControl/NewTriggerBusMedia + +LIBRARY IEEE; +USE IEEE.STD_LOGIC_1164.ALL; +USE IEEE.STD_LOGIC_ARITH.ALL; +USE IEEE.STD_LOGIC_UNSIGNED.ALL; + +use work.trb_net_std.all; + + +entity trb_net_med_32lvds is + + port( + -- Misc + CLK : in std_logic; + RESET : in std_logic; + CLK_EN : in std_logic; + -- Internal direction port (MII) + -- do not change this interface!!! + -- 1st part: from the medium to the internal logic (trbnet) + INT_DATAREADY_OUT: out STD_LOGIC; --Data word is reconstructed from media + --and ready to be read out + INT_DATA_OUT: out STD_LOGIC_VECTOR (55 downto 0); -- Data word + INT_READ_IN: in STD_LOGIC; + INT_ERROR_OUT: out STD_LOGIC_VECTOR (2 downto 0); -- Status bits + -- 2nd part: from the internal logic (trbnet) to the medium + INT_DATAREADY_IN: in STD_LOGIC; -- Data word is offered by the Media (the IOBUF MUST read) + INT_DATA_IN: in STD_LOGIC_VECTOR (55 downto 0); -- Data word + INT_READ_OUT: out STD_LOGIC; -- buffer reads a word from media + INT_ERROR_IN: in STD_LOGIC_VECTOR (2 downto 0); -- Status bits + -- (end do not change this interface!!!) + + + -- Media direction port + -- in this case for the cable => 32 lines in total + MED_DATA_OUT: out STD_LOGIC_VECTOR (12 downto 0); -- Data word + MED_TRANSMISSION_CLK_OUT: out STD_LOGIC; + MED_CARRIER_OUT: out STD_LOGIC; + MED_PARITY_OUT: out STD_LOGIC; + MED_DATA_IN: out STD_LOGIC_VECTOR (12 downto 0); -- Data word + MED_TRANSMISSION_CLK_IN: out STD_LOGIC; + MED_CARRIER_IN: out STD_LOGIC; + MED_PARITY_IN: out STD_LOGIC; + + -- Status and control port => this never can hurt + STAT: out STD_LOGIC_VECTOR (31 downto 0); + CTRL: in STD_LOGIC_VECTOR (31 downto 0); + ); +END trb_net_med_32lvds; diff --git a/trb_net_med_tlkx501.vhd b/trb_net_med_tlkx501.vhd new file mode 100644 index 0000000..55a1640 --- /dev/null +++ b/trb_net_med_tlkx501.vhd @@ -0,0 +1,47 @@ +-- media interface for the 32 lvds lines (16 in each direction) +-- for a description see HADES wiki +-- http://hades-wiki.gsi.de/cgi-bin/view/DaqSlowControl/NewTriggerBusMedia + +LIBRARY IEEE; +USE IEEE.STD_LOGIC_1164.ALL; +USE IEEE.STD_LOGIC_ARITH.ALL; +USE IEEE.STD_LOGIC_UNSIGNED.ALL; + +use work.trb_net_std.all; + + +entity trb_net_med_tlkx501 is + + port( + -- Misc + CLK : in std_logic; + RESET : in std_logic; + CLK_EN : in std_logic; + -- Internal direction port (MII) + -- do not change this interface!!! + -- 1st part: from the medium to the internal logic (trbnet) + INT_DATAREADY_OUT: out STD_LOGIC; --Data word is reconstructed from media + --and ready to be read out + INT_DATA_OUT: out STD_LOGIC_VECTOR (55 downto 0); -- Data word + INT_READ_IN: in STD_LOGIC; + INT_ERROR_OUT: out STD_LOGIC_VECTOR (2 downto 0); -- Status bits + -- 2nd part: from the internal logic (trbnet) to the medium + INT_DATAREADY_IN: in STD_LOGIC; -- Data word is offered by the Media (the IOBUF MUST read) + INT_DATA_IN: in STD_LOGIC_VECTOR (55 downto 0); -- Data word + INT_READ_OUT: out STD_LOGIC; -- buffer reads a word from media + INT_ERROR_IN: in STD_LOGIC_VECTOR (2 downto 0); -- Status bits + -- (end do not change this interface!!!) + + + -- Media direction port + -- marek, please add the lines you need here (the real output pins) + -- subcomponents like counters, egde detect etc + -- should be renamed to trb_net_XXX to avoid naming conflics + -- + -- + + -- Status and control port => this never can hurt + STAT: out STD_LOGIC_VECTOR (31 downto 0); + CTRL: in STD_LOGIC_VECTOR (31 downto 0); + ); +END trb_net_med_tlkx501; -- 2.43.0