]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Wed, 1 Aug 2012 15:16:13 +0000 (15:16 +0000)
committerhadeshyp <hadeshyp>
Wed, 1 Aug 2012 15:16:13 +0000 (15:16 +0000)
media_interfaces/trb_net16_lsm_sfp.vhd
media_interfaces/trb_net16_med_ecp3_sfp.vhd
trb_net16_hub_base.vhd
trb_net16_hub_func.vhd
trb_net16_hub_logic_2.vhd
trb_net16_hub_streaming_port.vhd
trb_net16_hub_streaming_port_sctrl.vhd
trb_net16_hub_streaming_port_sctrl_cts.vhd

index 7969d52a2f5f9b78ceff313741bf1f4e6d93d9f6..a5a7a8335066499d7eb971b3fdb3344eddc7c5dd 100644 (file)
@@ -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
index 61d19d46900917508b35f6e62b4c5526a5d4d008..d6a178da979a3950f1e6bf0c70d325af54104d7d 100644 (file)
@@ -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,
index 63f57dac5bc4578392c5a4dfc5231081f66ffe81..2b585e5e94c43f4c81540c4b8ff8a3af52dfe147 100644 (file)
@@ -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
index 1d4408b101eed224f7227dc9738d19f080111fa9..70b78a7c654831fda1032bb8afa8f635eb8f2d85 100644 (file)
@@ -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;
index ef19f50eb19a576e25e5e129f0f9f1100f7d3948..42501aa0e7fd7afd4158aded83b093f070d8d419 100644 (file)
@@ -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;
 
index c1c8d7aa19856bdaadc65fb1e59bfc3137aee6f3..13d6a7fab08abc2e81c58660000b9625ab95086a 100644 (file)
@@ -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;
index 491a6b27b5e40bbf4b3d7b0c2471a1461c742777..a8bcad45158bc797e9680dce0d9d9581fe17f630 100644 (file)
@@ -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;
 
 
index 4700b5f2d9e210bb9891fd6c2729cc3a815132d9..e40f37d36a88cf41cc1e0311433b4c5702b07732 100644 (file)
@@ -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
 ---------------------------------------------------------------------------