From b49bb41ed3e487e2010b7375400f25c71abb494b Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Wed, 1 Aug 2012 15:16:13 +0000 Subject: [PATCH] *** empty log message *** --- media_interfaces/trb_net16_lsm_sfp.vhd | 4 ++-- media_interfaces/trb_net16_med_ecp3_sfp.vhd | 2 +- trb_net16_hub_base.vhd | 8 ++++---- trb_net16_hub_func.vhd | 1 + trb_net16_hub_logic_2.vhd | 10 ++++++++-- trb_net16_hub_streaming_port.vhd | 3 ++- trb_net16_hub_streaming_port_sctrl.vhd | 7 +++---- trb_net16_hub_streaming_port_sctrl_cts.vhd | 16 +++++++++++----- 8 files changed, 32 insertions(+), 19 deletions(-) diff --git a/media_interfaces/trb_net16_lsm_sfp.vhd b/media_interfaces/trb_net16_lsm_sfp.vhd index 7969d52..a5a7a83 100644 --- a/media_interfaces/trb_net16_lsm_sfp.vhd +++ b/media_interfaces/trb_net16_lsm_sfp.vhd @@ -14,11 +14,11 @@ library work; use work.trb_net_std.all; entity trb_net16_lsm_sfp is - generic( + generic( CHECK_FOR_CV : integer := c_YES; HIGHSPEED_STARTUP : integer := c_NO ); - port( + port( SYSCLK : in std_logic; -- fabric clock (100MHz) RESET : in std_logic; -- synchronous reset CLEAR : in std_logic; -- asynchronous reset, connect to '0' if not needed / available diff --git a/media_interfaces/trb_net16_med_ecp3_sfp.vhd b/media_interfaces/trb_net16_med_ecp3_sfp.vhd index 61d19d4..d6a178d 100644 --- a/media_interfaces/trb_net16_med_ecp3_sfp.vhd +++ b/media_interfaces/trb_net16_med_ecp3_sfp.vhd @@ -458,7 +458,7 @@ THE_TX_SYNC: signal_sync THE_SFP_LSM: trb_net16_lsm_sfp generic map ( - HIGHSPEED_STARTUP => c_NO + HIGHSPEED_STARTUP => c_YES ) port map( SYSCLK => clk_sys, diff --git a/trb_net16_hub_base.vhd b/trb_net16_hub_base.vhd index 63f57da..2b585e5 100644 --- a/trb_net16_hub_base.vhd +++ b/trb_net16_hub_base.vhd @@ -314,11 +314,11 @@ architecture trb_net16_hub_base_arch of trb_net16_hub_base is signal current_timeout_value : tv_t := (others => (others => '0')); signal hub_level : std_logic_vector(7 downto 0); - type cnt_t is array (MII_NUMBER-1 downto 0) of unsigned(31 downto 0); + type cnt_t is array (MII_NUMBER+2 downto 0) of unsigned(31 downto 0); signal busy_counter_excl : cnt_t := (others => (others => '0')); signal busy_counter_incl : cnt_t := (others => (others => '0')); - signal reg_STAT_POINTS_locked : std_logic_vector(MII_NUMBER-1 downto 0); - signal reg_excl_enable : std_logic_vector(MII_NUMBER-1 downto 0); + signal reg_STAT_POINTS_locked : std_logic_vector(MII_NUMBER+2 downto 0); + signal reg_excl_enable : std_logic_vector(MII_NUMBER+2 downto 0); signal delay1_media_reset_me : std_logic_vector(MII_NUMBER-1 downto 0); signal delay2_media_reset_me : std_logic_vector(MII_NUMBER-1 downto 0); @@ -1528,7 +1528,7 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1'); ------------------------------------ --STAT busy counters ------------------------------------ - gen_busy_counters : for i in 0 to MII_NUMBER-1 generate + gen_busy_counters : for i in 0 to MII_NUMBER+2 generate proc_busy_counters : process(CLK) begin if rising_edge(CLK) then diff --git a/trb_net16_hub_func.vhd b/trb_net16_hub_func.vhd index 1d4408b..70b78a7 100644 --- a/trb_net16_hub_func.vhd +++ b/trb_net16_hub_func.vhd @@ -270,6 +270,7 @@ component trb_net16_hub_streaming_port is ONEWIRE_MONITOR_OUT : out std_logic; MY_ADDRESS_OUT : out std_logic_vector(15 downto 0); + TIMER_TICKS_OUT : out std_logic_vector(1 downto 0); --REGIO INTERFACE REGIO_ADDR_OUT : out std_logic_vector(16-1 downto 0); REGIO_READ_ENABLE_OUT : out std_logic; diff --git a/trb_net16_hub_logic_2.vhd b/trb_net16_hub_logic_2.vhd index ef19f50..42501aa 100644 --- a/trb_net16_hub_logic_2.vhd +++ b/trb_net16_hub_logic_2.vhd @@ -76,6 +76,7 @@ architecture trb_net16_hub_logic_arch of trb_net16_hub_logic is signal reply_reading_trm : std_logic_vector(POINT_NUMBER-1 downto 0) := (others => '0'); signal reply_got_trm : std_logic_vector(POINT_NUMBER-1 downto 0) := (others => '0'); signal TRM_packet : std_logic_vector(POINT_NUMBER-1 downto 0) := (others => '0'); + signal is_uplink_only : std_logic_vector(POINT_NUMBER-1 downto 0) := (others => '0'); signal init_select_enable : std_logic; signal reply_select_enable : std_logic; @@ -169,6 +170,11 @@ begin config_wait_reply <= x"00" & "00" & unsigned(CTRL_TIMEOUT_TIME) & "000000"; --mult. by 64/1024, e.q. 1/16 of given value timeout_disabled <= not or_all(CTRL_TIMEOUT_TIME); + + gen_uplink_mask : for i in 0 to POINT_NUMBER-1 generate + is_uplink_only(i) <= '1' when MII_IS_UPLINK_ONLY(i) = c_YES else '0'; + end generate; + ---------------------------------- --connect init input signals ---------------------------------- @@ -240,10 +246,10 @@ begin wait until rising_edge(CLK); if currentstate = IDLE or currentstate = SELECT_INIT then reply_reading_trm <= (others => '0'); - reply_got_trm <= not real_active_points; + reply_got_trm <= not real_active_points or is_uplink_only; else reply_reading_trm <= reply_reading_trm or TRM_packet; - reply_got_trm <= reply_got_trm or reading_trmF3 or timeout_ports or CTRL_DISABLED_PORTS(POINT_NUMBER-1 downto 0); + reply_got_trm <= reply_got_trm or reading_trmF3 or timeout_ports or CTRL_DISABLED_PORTS(POINT_NUMBER-1 downto 0) or is_uplink_only; end if; end process; diff --git a/trb_net16_hub_streaming_port.vhd b/trb_net16_hub_streaming_port.vhd index c1c8d7a..13d6a7f 100644 --- a/trb_net16_hub_streaming_port.vhd +++ b/trb_net16_hub_streaming_port.vhd @@ -85,7 +85,8 @@ entity trb_net16_hub_streaming_port is ONEWIRE_MONITOR_IN : in std_logic; ONEWIRE_MONITOR_OUT : out std_logic; MY_ADDRESS_OUT : out std_logic_vector(15 downto 0); - + TIMER_TICKS_OUT : out std_logic_vector(1 downto 0); + --REGIO INTERFACE REGIO_ADDR_OUT : out std_logic_vector(16-1 downto 0); REGIO_READ_ENABLE_OUT : out std_logic; diff --git a/trb_net16_hub_streaming_port_sctrl.vhd b/trb_net16_hub_streaming_port_sctrl.vhd index 491a6b2..a8bcad4 100644 --- a/trb_net16_hub_streaming_port_sctrl.vhd +++ b/trb_net16_hub_streaming_port_sctrl.vhd @@ -219,10 +219,9 @@ begin --generate media resync - gen_resync : for i in 0 to mii generate - MED_CTRL_OP(13+i*16 downto i*16) <= (others => '0'); - MED_CTRL_OP(14+i*16) <= HUB_MED_CTRL_OP(14+i*16); - MED_CTRL_OP(15+i*16) <= hub_make_network_reset ; + gen_resync : for i in 0 to mii-1 generate + MED_CTRL_OP(14+i*16 downto i*16) <= HUB_MED_CTRL_OP(14+i*16 downto i*16); + MED_CTRL_OP(15+i*16) <= hub_make_network_reset or HUB_MED_CTRL_OP(15+i*16); end generate; diff --git a/trb_net16_hub_streaming_port_sctrl_cts.vhd b/trb_net16_hub_streaming_port_sctrl_cts.vhd index 4700b5f..e40f37d 100644 --- a/trb_net16_hub_streaming_port_sctrl_cts.vhd +++ b/trb_net16_hub_streaming_port_sctrl_cts.vhd @@ -373,9 +373,8 @@ begin --generate media resync gen_resync : for i in 0 to mii-1 generate - MED_CTRL_OP(13+i*16 downto i*16) <= (others => '0'); - MED_CTRL_OP(14+i*16) <= HUB_MED_CTRL_OP(14+i*16); - MED_CTRL_OP(15+i*16) <= hub_make_network_reset ; + MED_CTRL_OP(14+i*16 downto i*16) <= HUB_MED_CTRL_OP(14+i*16 downto i*16); + MED_CTRL_OP(15+i*16) <= hub_make_network_reset or HUB_MED_CTRL_OP(15+i*16); end generate; -- MED_CTRL_OP(13+mii*16 downto mii*16) <= (others => '0'); -- MED_CTRL_OP(14+mii*16) <= '0'; @@ -574,7 +573,7 @@ begin hub_reply_packet_num_in(8 downto 6) <= (others => '0'); hub_init_read_in(2) <= '0'; - + trg_apl_read_in <= '1'; PROC_TRG_STATUS_BITS : process(CLK) begin @@ -1011,7 +1010,14 @@ begin COMMON_STAT_REGS(287 downto 272) <= (others => '0'); end process; - + process(CLK) + begin + if rising_edge(CLK) then + if ipu_start_readout_i = '1' then + COMMON_STAT_REGS(63 downto 48) <= ipu_number_i; + end if; + end if; + end process; --------------------------------------------------------------------------- -- RegIO Bus Handler --------------------------------------------------------------------------- -- 2.43.0