From: hadeshyp Date: Mon, 6 Sep 2010 16:41:18 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: oldGBE~187 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=823c128618e92e4a239862ac719958147b8ce170;p=trbnet.git *** empty log message *** --- diff --git a/gbe_ecp2m/ip_configurator.vhd b/gbe_ecp2m/ip_configurator.vhd index 887f562..d6b0778 100755 --- a/gbe_ecp2m/ip_configurator.vhd +++ b/gbe_ecp2m/ip_configurator.vhd @@ -32,6 +32,11 @@ end entity; architecture ip_configurator of ip_configurator is +-- -- Placer Directives +-- attribute HGROUP : string; +-- -- for whole architecture +-- attribute HGROUP of ip_configurator : architecture is "GBE_conf_group"; + type STATES is (IDLE, LOAD_REG, DELAY0, DELAY1, DELAY2, LOAD_DONE); signal CURRENT_STATE, NEXT_STATE : STATES; signal bsm : std_logic_vector(3 downto 0); diff --git a/gbe_ecp2m/ipcores/sgmii_gbe_pcs32/sgmii_gbe_pcs32.ngo b/gbe_ecp2m/ipcores/sgmii_gbe_pcs32/sgmii_gbe_pcs32.ngo index 02c5fea..4bfd6e0 100755 Binary files a/gbe_ecp2m/ipcores/sgmii_gbe_pcs32/sgmii_gbe_pcs32.ngo and b/gbe_ecp2m/ipcores/sgmii_gbe_pcs32/sgmii_gbe_pcs32.ngo differ diff --git a/gbe_ecp2m/trb_net16_gbe_buf.vhd b/gbe_ecp2m/trb_net16_gbe_buf.vhd index c1f6637..7dee1b2 100755 --- a/gbe_ecp2m/trb_net16_gbe_buf.vhd +++ b/gbe_ecp2m/trb_net16_gbe_buf.vhd @@ -435,7 +435,10 @@ signal monitor_lr : std_logic_vector(31 downto 0); signal monitor_hr : std_logic_vector(31 downto 0); signal monitor_fifos : std_logic_vector(31 downto 0); signal monitor_fifos_q : std_logic_vector(31 downto 0); +signal monitor_discfrm : std_logic_vector(31 downto 0); +-- gk 02.08.10 +signal discfrm_ctr : std_logic_vector(31 downto 0); begin @@ -497,6 +500,7 @@ port map( MONITOR_LR_IN => monitor_lr, MONITOR_HDR_IN => monitor_hr, MONITOR_FIFOS_IN => monitor_fifos_q, + MONITOR_DISCFRM_IN => monitor_discfrm, -- gk 01.06.10 DBG_IPU2GBE1_IN => dbg_ipu2gbe1, DBG_IPU2GBE2_IN => dbg_ipu2gbe2, @@ -566,7 +570,6 @@ port map( STAT => open ); - -- First stage: get data from IPU channel, buffer it and terminate the IPU transmission to CTS THE_IPU_INTERFACE: trb_net16_ipu2gbe port map( @@ -733,6 +736,7 @@ port map( FT_TX_RD_EN_IN => mac_tx_read, FT_START_OF_PACKET_OUT => ft_start_of_packet, FT_TX_DONE_IN => mac_tx_done, + FT_TX_DISCFRM_IN => mac_tx_discfrm, -- debug ports BSM_CONSTR_OUT => fc_bsm_constr, BSM_TRANS_OUT => fc_bsm_trans, @@ -761,6 +765,7 @@ port map( TX_FIFOEOF_OUT => mac_fifoeof, TX_FIFOEMPTY_OUT => mac_fifoempty, TX_DONE_IN => mac_tx_done, + TX_DISCFRM_IN => mac_tx_discfrm, -- Debug BSM_INIT_OUT => ft_bsm_init, BSM_MAC_OUT => ft_bsm_mac, @@ -1053,6 +1058,31 @@ begin end if; end process BYTES_SENT_CTR_PROC; +-- gk 02.08.10 +DISCFRM_PROC : process(serdes_clk_125) +begin + if rising_edge(serdes_clk_125) then + if (RESET = '1') then + discfrm_ctr <= (others => '0'); + elsif (mac_tx_discfrm = '1') then + discfrm_ctr <= discfrm_ctr + x"1"; + end if; + end if; +end process DISCFRM_PROC; + +discfrm_sync : signal_sync + generic map( + DEPTH => 2, + WIDTH => 32 + ) + port map( + RESET => RESET, + D_IN => discfrm_ctr, + CLK0 => serdes_clk_125, + CLK1 => CLK, + D_OUT => monitor_discfrm + ); + -- reset_fifo <= '1' when RESET = '1' or pc_sos = '1' else '0'; -- diff --git a/gbe_ecp2m/trb_net16_gbe_frame_constr.vhd b/gbe_ecp2m/trb_net16_gbe_frame_constr.vhd index 9112acd..d4a7ddf 100755 --- a/gbe_ecp2m/trb_net16_gbe_frame_constr.vhd +++ b/gbe_ecp2m/trb_net16_gbe_frame_constr.vhd @@ -43,6 +43,7 @@ port( FT_TX_RD_EN_IN : in std_logic; FT_START_OF_PACKET_OUT : out std_logic; FT_TX_DONE_IN : in std_logic; + FT_TX_DISCFRM_IN : in std_logic; -- debug ports BSM_CONSTR_OUT : out std_logic_vector(7 downto 0); BSM_TRANS_OUT : out std_logic_vector(3 downto 0); @@ -437,7 +438,7 @@ begin end if; end process transmitMachineProc; -transmitMachine: process( transmitCurrentState, fpf_q, FT_TX_DONE_IN, sent_frames_ctr, ready_frames_ctr_q ) +transmitMachine: process( transmitCurrentState, fpf_q, FT_TX_DONE_IN, sent_frames_ctr, ready_frames_ctr_q, FT_TX_DISCFRM_IN ) begin case transmitCurrentState is when T_IDLE => @@ -457,7 +458,7 @@ begin when T_TRANSMIT => bsm_trans <= x"2"; -- gk 03.08.10 - if (LINK_OK_IN = '1') and (ft_tx_done_in = '1') then + if (LINK_OK_IN = '1') and ((ft_tx_done_in = '1') or (FT_TX_DISCFRM_IN = '1'))then transmitNextState <= T_CLEANUP; elsif (LINK_OK_IN = '0') then transmitNextState <= T_PAUSE; @@ -496,7 +497,7 @@ begin if ( RESET = '1' ) then sent_frames_ctr <= (others => '0'); -- gk 03.08.10 - elsif( ft_tx_done_in = '1' ) or (transmitCurrentState = T_PAUSE) then + elsif( ft_tx_done_in = '1' ) or (transmitCurrentState = T_PAUSE) or (FT_TX_DISCFRM_IN = '1') then sent_frames_ctr <= sent_frames_ctr + 1; end if; end if; diff --git a/gbe_ecp2m/trb_net16_gbe_frame_trans.vhd b/gbe_ecp2m/trb_net16_gbe_frame_trans.vhd index fd808c7..c8220fb 100755 --- a/gbe_ecp2m/trb_net16_gbe_frame_trans.vhd +++ b/gbe_ecp2m/trb_net16_gbe_frame_trans.vhd @@ -29,6 +29,7 @@ port ( TX_FIFOEOF_OUT : out std_logic; TX_FIFOEMPTY_OUT : out std_logic; TX_DONE_IN : in std_logic; + TX_DISCFRM_IN : in std_logic; -- Debug BSM_INIT_OUT : out std_logic_vector(3 downto 0); BSM_MAC_OUT : out std_logic_vector(3 downto 0); @@ -133,7 +134,7 @@ begin end if; when T_WAITFORFIFO => bsm_trans <= x"2"; - if (TX_DONE_IN = '1') or (LINK_OK_IN = '0') then -- gk 03.08.10 + if (TX_DONE_IN = '1') or (LINK_OK_IN = '0') or (TX_DISCFRM_IN = '1') then -- gk 03.08.10 transmitNextState <= T_IDLE; else transmitNextState <= T_WAITFORFIFO; diff --git a/gbe_ecp2m/trb_net16_gbe_setup.vhd b/gbe_ecp2m/trb_net16_gbe_setup.vhd index ea01a75..92076fc 100644 --- a/gbe_ecp2m/trb_net16_gbe_setup.vhd +++ b/gbe_ecp2m/trb_net16_gbe_setup.vhd @@ -47,7 +47,9 @@ port( MONITOR_DROPPED_IN : in std_logic_vector(31 downto 0); MONITOR_SM_IN : in std_logic_vector(31 downto 0); MONITOR_LR_IN : in std_logic_vector(31 downto 0); - MONITOR_HDR_IN : in std_logic_vector(31 downto 0); + MONITOR_HDR_IN : in std_logic_vector(31 downto 0); + MONITOR_FIFOS_IN : in std_logic_vector(31 downto 0); + MONITOR_DISCFRM_IN : in std_logic_vector(31 downto 0); -- gk 01.06.10 DBG_IPU2GBE1_IN : in std_logic_vector(31 downto 0); DBG_IPU2GBE2_IN : in std_logic_vector(31 downto 0); @@ -77,7 +79,7 @@ architecture gbe_setup of gbe_setup is -- -- Placer Directives -- attribute HGROUP : string; -- -- for whole architecture --- attribute HGROUP of gbe_setup : architecture is "GBE_setup_group"; +-- attribute HGROUP of gbe_setup : architecture is "GBE_conf_group"; signal reset_values : std_logic; @@ -148,7 +150,7 @@ begin max_packet <= x"0000_fde8"; -- 65k --x"0000_fde8"; -- tester min_packet <= x"0000_0008"; -- gk 20.07.10 max_frame <= x"0578"; - use_gbe <= '1'; + use_gbe <= '0'; --'1'; -- gk 27.08.10 -- blocks the transmission until gbe gets configured use_trbnet <= '0'; use_multievents <= '0'; reset_values <= '0'; @@ -392,6 +394,12 @@ begin when x"f8" => data_out <= MONITOR_HDR_IN; + when x"f9" => + data_out <= MONITOR_FIFOS_IN; + + when x"fa" => + data_out <= MONITOR_DISCFRM_IN; + when others => data_out <= (others => '0'); end case; diff --git a/gbe_ecp2m/trb_net16_med_ecp_sfp_gbe_8b.vhd b/gbe_ecp2m/trb_net16_med_ecp_sfp_gbe_8b.vhd index fe9069c..f7b381a 100755 --- a/gbe_ecp2m/trb_net16_med_ecp_sfp_gbe_8b.vhd +++ b/gbe_ecp2m/trb_net16_med_ecp_sfp_gbe_8b.vhd @@ -18,8 +18,8 @@ port( CLK_125_OUT : out std_logic; CLK_125_IN : in std_logic; -- gk 28.04.10 used when intclk --SGMII connection to frame transmitter (tsmac) - FT_TX_CLK_EN_OUT : out std_logic; - FT_RX_CLK_EN_OUT : out std_logic; + FT_TX_CLK_EN_OUT : out std_logic; + FT_RX_CLK_EN_OUT : out std_logic; FT_COL_OUT : out std_logic; FT_CRS_OUT : out std_logic; FT_TXD_IN : in std_logic_vector(7 downto 0); @@ -28,22 +28,22 @@ port( --SFP Connection SD_RXD_P_IN : in std_logic; SD_RXD_N_IN : in std_logic; - SD_TXD_P_OUT : out std_logic; - SD_TXD_N_OUT : out std_logic; - SD_REFCLK_P_IN : in std_logic; - SD_REFCLK_N_IN : in std_logic; - SD_PRSNT_N_IN : in std_logic; -- SFP Present ('0' = SFP in place, '1' = no SFP mounted) + SD_TXD_P_OUT : out std_logic; + SD_TXD_N_OUT : out std_logic; + SD_REFCLK_P_IN : in std_logic; + SD_REFCLK_N_IN : in std_logic; + SD_PRSNT_N_IN : in std_logic; -- SFP Present ('0' = SFP in place, '1' = no SFP mounted) SD_LOS_IN : in std_logic; -- SFP Loss Of Signal ('0' = OK, '1' = no signal) - SD_TXDIS_OUT : out std_logic; -- SFP disable + SD_TXDIS_OUT : out std_logic; -- SFP disable -- Autonegotiation stuff MR_RESET_IN : in std_logic; MR_MODE_IN : in std_logic; - MR_ADV_ABILITY_IN : in std_logic_vector(15 downto 0); -- should be x"0020 - MR_AN_LP_ABILITY_OUT : out std_logic_vector(15 downto 0); -- advert page from link partner - MR_AN_PAGE_RX_OUT : out std_logic; - MR_AN_COMPLETE_OUT : out std_logic; - MR_AN_ENABLE_IN : in std_logic; - MR_RESTART_AN_IN : in std_logic; + MR_ADV_ABILITY_IN : in std_logic_vector(15 downto 0); -- should be x"0020 + MR_AN_LP_ABILITY_OUT : out std_logic_vector(15 downto 0); -- advert page from link partner + MR_AN_PAGE_RX_OUT : out std_logic; + MR_AN_COMPLETE_OUT : out std_logic; + MR_AN_ENABLE_IN : in std_logic; + MR_RESTART_AN_IN : in std_logic; -- Status and control port STAT_OP : out std_logic_vector (15 downto 0); CTRL_OP : in std_logic_vector (15 downto 0); @@ -248,23 +248,23 @@ begin THE_RESET_STATEMACHINE: trb_net16_lsm_sfp_gbe port map( SYSCLK => refclkcore, - RESET => '0', -- really? - CLEAR => RESET, -- from 100MHz PLL, includes async part + RESET => '0', -- really? + CLEAR => RESET, -- from 100MHz PLL, includes async part -- status signals - SFP_MISSING_IN => SD_PRSNT_N_IN, + SFP_MISSING_IN => SD_PRSNT_N_IN, SFP_LOS_IN => SD_LOS_IN, SD_LINK_OK_IN => '1', -- not used - SD_LOS_IN => '0', -- not used - SD_TXCLK_BAD_IN => sd_link_error(2), -- plol - SD_RXCLK_BAD_IN => sd_link_error(1), -- rlol + SD_LOS_IN => '0', -- not used + SD_TXCLK_BAD_IN => sd_link_error(2), -- plol + SD_RXCLK_BAD_IN => sd_link_error(1), -- rlol -- control signals - FULL_RESET_OUT => quad_rst, - LANE_RESET_OUT => lane_rst, - USER_RESET_OUT => user_rst, + FULL_RESET_OUT => quad_rst, + LANE_RESET_OUT => lane_rst, + USER_RESET_OUT => user_rst, -- debug signals - TIMING_CTR_OUT => open, + TIMING_CTR_OUT => open, BSM_OUT => reset_bsm, - DEBUG_OUT => reset_debug + DEBUG_OUT => reset_debug ); -- gk 28.04.10 diff --git a/gbe_ecp2m/trb_net_gbe_components.vhd b/gbe_ecp2m/trb_net_gbe_components.vhd index 72c6885..b329b0d 100644 --- a/gbe_ecp2m/trb_net_gbe_components.vhd +++ b/gbe_ecp2m/trb_net_gbe_components.vhd @@ -125,6 +125,7 @@ port( FT_TX_RD_EN_IN : in std_logic; FT_START_OF_PACKET_OUT : out std_logic; FT_TX_DONE_IN : in std_logic; + FT_TX_DISCFRM_IN : in std_logic; -- debug ports BSM_CONSTR_OUT : out std_logic_vector(7 downto 0); BSM_TRANS_OUT : out std_logic_vector(3 downto 0); @@ -153,6 +154,7 @@ port ( TX_FIFOEOF_OUT : out std_logic; TX_FIFOEMPTY_OUT : out std_logic; TX_DONE_IN : in std_logic; + TX_DISCFRM_IN : in std_logic; -- Debug BSM_INIT_OUT : out std_logic_vector(3 downto 0); BSM_MAC_OUT : out std_logic_vector(3 downto 0); @@ -246,6 +248,7 @@ port( MONITOR_LR_IN : in std_logic_vector(31 downto 0); MONITOR_HDR_IN : in std_logic_vector(31 downto 0); MONITOR_FIFOS_IN : in std_logic_vector(31 downto 0); + MONITOR_DISCFRM_IN : in std_logic_vector(31 downto 0); -- gk 01.06.10 DBG_IPU2GBE1_IN : in std_logic_vector(31 downto 0); DBG_IPU2GBE2_IN : in std_logic_vector(31 downto 0);