]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Fri, 19 Feb 2010 12:44:12 +0000 (12:44 +0000)
committerhadeshyp <hadeshyp>
Fri, 19 Feb 2010 12:44:12 +0000 (12:44 +0000)
trb_net16_hub_base.vhd
trb_net16_hub_func.vhd
trb_net16_iobuf.vhd

index 3d793e0d27279693e62aec12d4563a94ae1c064c..0fbf864c577d6917d36c9a9003125478a32a58b8 100644 (file)
@@ -105,7 +105,7 @@ end entity;
 architecture trb_net16_hub_base_arch of trb_net16_hub_base is
 
 
-16
+
   constant total_point_num : integer := MII_NUMBER*2**(c_MUX_WIDTH-1) + INT_NUMBER + 1;
   signal m_DATAREADY_OUT : std_logic_vector (MII_NUMBER*2**(c_MUX_WIDTH)-1 downto 0);
   signal m_DATA_OUT      : std_logic_vector (MII_NUMBER*2**(c_MUX_WIDTH)*c_DATA_WIDTH-1 downto 0);
@@ -530,23 +530,25 @@ MED_DATA_OUT       <= buf_MED_DATA_OUT;
     gen_int1 : for i in 0 to INT_NUMBER-1 generate
       constant j : integer := i + 2**(c_MUX_WIDTH-1)*MII_NUMBER+1;
     begin
-      buf_to_hub_REPLY_DATAREADY(j) <= INT_REPLY_DATAREADY_IN(i);
-      buf_to_hub_REPLY_DATA((j+1)*c_DATA_WIDTH-1 downto j*c_DATA_WIDTH) <= INT_REPLY_DATA_IN((i+1)*c_DATA_WIDTH-1 downto i*c_DATA_WIDTH);
-      buf_to_hub_REPLY_PACKET_NUM((j+1)*c_NUM_WIDTH-1 downto j*c_NUM_WIDTH) <= INT_REPLY_PACKET_NUM_IN((i+1)*c_NUM_WIDTH-1 downto i*c_NUM_WIDTH);
-      INT_REPLY_READ_OUT(i)       <= buf_to_hub_REPLY_READ(j);
-
-      INT_REPLY_DATAREADY_OUT(i)  <= hub_to_buf_REPLY_DATAREADY(j);
-      INT_REPLY_DATA_OUT((i+1)*c_DATA_WIDTH-1 downto i*c_DATA_WIDTH)<= hub_to_buf_REPLY_DATA((j+1)*c_DATA_WIDTH-1 downto j*c_DATA_WIDTH);
-      INT_REPLY_PACKET_NUM_OUT((i+1)*c_NUM_WIDTH-1 downto i*c_NUM_WIDTH) <= hub_to_buf_REPLY_PACKET_NUM((j+1)*c_NUM_WIDTH-1 downto j*c_NUM_WIDTH);
-      hub_to_buf_REPLY_READ(j) <= INT_REPLY_READ_IN(i);
-      buf_to_hub_INIT_DATAREADY(j) <= INT_INIT_DATAREADY_IN(i);
-      buf_to_hub_INIT_DATA((j+1)*c_DATA_WIDTH-1 downto j*c_DATA_WIDTH) <= INT_INIT_DATA_IN((i+1)*c_DATA_WIDTH-1 downto i*c_DATA_WIDTH);
-      buf_to_hub_INIT_PACKET_NUM((j+1)*c_NUM_WIDTH-1 downto j*c_NUM_WIDTH) <= INT_INIT_PACKET_NUM_IN((i+1)*c_NUM_WIDTH-1 downto i*c_NUM_WIDTH);
-      INT_INIT_READ_OUT(i)        <= buf_to_hub_INIT_READ(j);
-      INT_INIT_DATAREADY_OUT(i)   <= hub_to_buf_INIT_DATAREADY(j);
-      INT_INIT_DATA_OUT((i+1)*c_DATA_WIDTH-1 downto i*c_DATA_WIDTH) <= hub_to_buf_INIT_DATA((j+1)*c_DATA_WIDTH-1 downto j*c_DATA_WIDTH);
-      INT_INIT_PACKET_NUM_OUT((i+1)*c_NUM_WIDTH-1 downto i*c_NUM_WIDTH)  <= hub_to_buf_INIT_PACKET_NUM((j+1)*c_NUM_WIDTH-1 downto j*c_NUM_WIDTH);
-      hub_to_buf_INIT_READ(j) <= INT_INIT_READ_IN(i);
+      buf_to_hub_REPLY_DATAREADY(j)                     <= INT_REPLY_DATAREADY_IN(i);
+      buf_to_hub_REPLY_DATA((j+1)*16-1 downto j*16)     <= INT_REPLY_DATA_IN((i+1)*16-1 downto i*16);
+      buf_to_hub_REPLY_PACKET_NUM((j+1)*3-1 downto j*3) <= INT_REPLY_PACKET_NUM_IN((i+1)*3-1 downto i*3);
+      INT_REPLY_READ_OUT(i)                             <= buf_to_hub_REPLY_READ(j);
+
+      INT_REPLY_DATAREADY_OUT(i)                        <= hub_to_buf_REPLY_DATAREADY(j);
+      INT_REPLY_DATA_OUT((i+1)*16-1 downto i*16)        <= hub_to_buf_REPLY_DATA((j+1)*16-1 downto j*16);
+      INT_REPLY_PACKET_NUM_OUT((i+1)*3-1 downto i*3)    <= hub_to_buf_REPLY_PACKET_NUM((j+1)*3-1 downto j*3);
+      hub_to_buf_REPLY_READ(j)                          <= INT_REPLY_READ_IN(i);
+
+      buf_to_hub_INIT_DATAREADY(j)                      <= INT_INIT_DATAREADY_IN(i);
+      buf_to_hub_INIT_DATA((j+1)*16-1 downto j*16)      <= INT_INIT_DATA_IN((i+1)*16-1 downto i*16);
+      buf_to_hub_INIT_PACKET_NUM((j+1)*3-1 downto j*3)  <= INT_INIT_PACKET_NUM_IN((i+1)*3-1 downto i*3);
+      INT_INIT_READ_OUT(i)                              <= buf_to_hub_INIT_READ(j);
+
+      INT_INIT_DATAREADY_OUT(i)                         <= hub_to_buf_INIT_DATAREADY(j);
+      INT_INIT_DATA_OUT((i+1)*16-1 downto i*16)         <= hub_to_buf_INIT_DATA((j+1)*16-1 downto j*16);
+      INT_INIT_PACKET_NUM_OUT((i+1)*3-1 downto i*3)     <= hub_to_buf_INIT_PACKET_NUM((j+1)*3-1 downto j*3);
+      hub_to_buf_INIT_READ(j)                           <= INT_INIT_READ_IN(i);
     end generate;
   end generate;
   INT_INIT_DATAREADY_OUT(INT_NUMBER) <= '0';
@@ -656,37 +658,37 @@ MED_DATA_OUT       <= buf_MED_DATA_OUT;
         h1: if INT_CHANNELS(int) = CHANNEL generate
           HUB_INIT_DATAREADY_IN (hublogic_num)
                                     <= buf_to_hub_INIT_DATAREADY(buf_to_hub_num);
-          HUB_INIT_DATA_IN ((hublogic_num+1)*c_DATA_WIDTH-1 downto hublogic_num*c_DATA_WIDTH)
-                                    <= buf_to_hub_INIT_DATA((buf_to_hub_num+1)*c_DATA_WIDTH-1 downto buf_to_hub_num*c_DATA_WIDTH);
-          HUB_INIT_PACKET_NUM_IN ((hublogic_num+1)*c_NUM_WIDTH-1 downto hublogic_num*c_NUM_WIDTH)
-                                    <= buf_to_hub_INIT_PACKET_NUM((buf_to_hub_num+1)*c_NUM_WIDTH-1 downto buf_to_hub_num*c_NUM_WIDTH);
+          HUB_INIT_DATA_IN ((hublogic_num+1)*16-1 downto hublogic_num*16)
+                                    <= buf_to_hub_INIT_DATA((buf_to_hub_num+1)*16-1 downto buf_to_hub_num*16);
+          HUB_INIT_PACKET_NUM_IN ((hublogic_num+1)*3-1 downto hublogic_num*3)
+                                    <= buf_to_hub_INIT_PACKET_NUM((buf_to_hub_num+1)*3-1 downto buf_to_hub_num*3);
           buf_to_hub_INIT_READ(buf_to_hub_num)
                                     <= HUB_INIT_READ_OUT(hublogic_num);
 
           hub_to_buf_INIT_DATAREADY(buf_to_hub_num)
                                     <= HUB_INIT_DATAREADY_OUT(hublogic_num);
-          hub_to_buf_INIT_DATA((buf_to_hub_num+1)*c_DATA_WIDTH-1 downto buf_to_hub_num*c_DATA_WIDTH)
-                                    <= HUB_INIT_DATA_OUT((hublogic_num+1)*c_DATA_WIDTH-1 downto hublogic_num*c_DATA_WIDTH);
-          hub_to_buf_INIT_PACKET_NUM((buf_to_hub_num+1)*c_NUM_WIDTH-1 downto buf_to_hub_num*c_NUM_WIDTH)
-                                    <= HUB_INIT_PACKET_NUM_OUT((hublogic_num+1)*c_NUM_WIDTH-1 downto hublogic_num*c_NUM_WIDTH);
+          hub_to_buf_INIT_DATA((buf_to_hub_num+1)*16-1 downto buf_to_hub_num*16)
+                                    <= HUB_INIT_DATA_OUT((hublogic_num+1)*16-1 downto hublogic_num*16);
+          hub_to_buf_INIT_PACKET_NUM((buf_to_hub_num+1)*3-1 downto buf_to_hub_num*3)
+                                    <= HUB_INIT_PACKET_NUM_OUT((hublogic_num+1)*3-1 downto hublogic_num*3);
           HUB_INIT_READ_IN (hublogic_num)
                                     <= hub_to_buf_INIT_READ(buf_to_hub_num);
 
           HUB_REPLY_DATAREADY_IN (hublogic_num)
                                     <= buf_to_hub_REPLY_DATAREADY(buf_to_hub_num);
-          HUB_REPLY_DATA_IN ((hublogic_num+1)*c_DATA_WIDTH-1 downto hublogic_num*c_DATA_WIDTH)
-                                    <= buf_to_hub_REPLY_DATA((buf_to_hub_num+1)*c_DATA_WIDTH-1 downto buf_to_hub_num*c_DATA_WIDTH);
-          HUB_REPLY_PACKET_NUM_IN ((hublogic_num+1)*c_NUM_WIDTH-1 downto hublogic_num*c_NUM_WIDTH)
-                                    <= buf_to_hub_REPLY_PACKET_NUM((buf_to_hub_num+1)*c_NUM_WIDTH-1 downto buf_to_hub_num*c_NUM_WIDTH);
+          HUB_REPLY_DATA_IN ((hublogic_num+1)*16-1 downto hublogic_num*16)
+                                    <= buf_to_hub_REPLY_DATA((buf_to_hub_num+1)*16-1 downto buf_to_hub_num*16);
+          HUB_REPLY_PACKET_NUM_IN ((hublogic_num+1)*3-1 downto hublogic_num*3)
+                                    <= buf_to_hub_REPLY_PACKET_NUM((buf_to_hub_num+1)*3-1 downto buf_to_hub_num*3);
           buf_to_hub_REPLY_READ(buf_to_hub_num)
                                     <= HUB_REPLY_READ_OUT(hublogic_num);
 
           hub_to_buf_REPLY_DATAREADY(buf_to_hub_num)
                                     <= HUB_REPLY_DATAREADY_OUT(hublogic_num);
-          hub_to_buf_REPLY_DATA((buf_to_hub_num+1)*c_DATA_WIDTH-1 downto buf_to_hub_num*c_DATA_WIDTH)
-                                    <= HUB_REPLY_DATA_OUT((hublogic_num+1)*c_DATA_WIDTH-1 downto hublogic_num*c_DATA_WIDTH);
-          hub_to_buf_REPLY_PACKET_NUM((buf_to_hub_num+1)*c_NUM_WIDTH-1 downto buf_to_hub_num*c_NUM_WIDTH)
-                                    <= HUB_REPLY_PACKET_NUM_OUT((hublogic_num+1)*c_NUM_WIDTH-1 downto hublogic_num*c_NUM_WIDTH);
+          hub_to_buf_REPLY_DATA((buf_to_hub_num+1)*16-1 downto buf_to_hub_num*16)
+                                    <= HUB_REPLY_DATA_OUT((hublogic_num+1)*16-1 downto hublogic_num*16);
+          hub_to_buf_REPLY_PACKET_NUM((buf_to_hub_num+1)*3-1 downto buf_to_hub_num*3)
+                                    <= HUB_REPLY_PACKET_NUM_OUT((hublogic_num+1)*3-1 downto hublogic_num*3);
           HUB_REPLY_READ_IN (hublogic_num)
                                     <= hub_to_buf_REPLY_READ(buf_to_hub_num);
         end generate;
@@ -1055,7 +1057,7 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1');
       if rising_edge(CLK) then
         HC_STAT_REGS(8*32-1 downto 0)      <= buf_HC_STAT_REGS(8*32-1 downto 0);
         HC_STAT_REGS(31*32-1 downto 12*32) <= buf_HC_STAT_REGS(31*32-1 downto 12*32);
-        HC_STAT_REGS(64*32-1 downto 32*32) <= buf_HC_STAT_REGS(64*32-1 downto 32*32);
+        HC_STAT_REGS(64*32-1 downto 37*32) <= buf_HC_STAT_REGS(64*32-1 downto 37*32);
       end if;
     end process;
 
@@ -1097,11 +1099,13 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1');
 ---------------------------------------------------------------------
 
   --debug Status and Control ports
-  buf_STAT_DEBUG(5 downto 0)   <= HUB_INIT_DATAREADY_IN(16 downto 11);
-  buf_STAT_DEBUG(11 downto 6)  <= HUB_REPLY_DATAREADY_IN(16 downto 11);
-  buf_STAT_DEBUG(17 downto 12) <= HUB_REPLY_READ_OUT(16 downto 11);
-  buf_STAT_DEBUG(23 downto 18) <= HUB_INIT_READ_OUT(16 downto 11);
-  buf_STAT_DEBUG(30 downto 24) <= HUB_CTRL_final_activepoints(3*32+6 downto 3*32);
+  buf_STAT_DEBUG(4 downto 0)   <= HUB_INIT_DATAREADY_IN(15 downto 11);
+  buf_STAT_DEBUG(9 downto 5)   <= HUB_INIT_READ_OUT(15 downto 11);
+  buf_STAT_DEBUG(14 downto 10) <= HUB_REPLY_READ_OUT(15 downto 11);
+  buf_STAT_DEBUG(19 downto 15) <= HUB_INIT_DATAREADY_OUT(15 downto 11);
+  buf_STAT_DEBUG(24 downto 20) <= HUB_INIT_READ_IN(15 downto 11);
+  buf_STAT_DEBUG(25)           <= '0';
+  buf_STAT_DEBUG(30 downto 26) <= buf_STAT_POINTS_locked(3*32+4 downto 3*32+0);
   buf_STAT_DEBUG(31) <= CLK;
 
 --   buf_STAT_DEBUG(18 downto 16) <= IOBUF_IBUF_BUFFER(20+32*6 downto 18+32*6);
index 93cf6dabc4029b7e277babc61b95379cc48cdfe9..dd90ca14d2205515fda40e57f06c01294bc17ec6 100644 (file)
@@ -38,6 +38,7 @@ package trb_net16_hub_func is
                                                        1,6,6,6,
                                                        1,6,6,6);   --MII 15
 
+  constant std_IBUF_DEPTH : hub_channel_config_t := (6,6,6,6);
 
   constant std_hub_mii_all_yes : hub_mii_config_t := (c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,
                                                       c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,c_YES,c_YES);
index 4528599370e94c913c79a37f3a056073bd1c960c..9abc9530f0d1af9d1b1d6b2ca53c410031a3c110 100644 (file)
@@ -138,7 +138,7 @@ begin
     THE_IBUF : trb_net16_term_ibuf
       generic map(
         SBUF_VERSION => SBUF_VERSION,
-        SECURE_MODE  => IBUF_SECURE_MODE
+        SECURE_MODE  => c_YES
         )
       port map (
         CLK       => CLK,