]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Mon, 16 Nov 2009 14:33:26 +0000 (14:33 +0000)
committerhadeshyp <hadeshyp>
Mon, 16 Nov 2009 14:33:26 +0000 (14:33 +0000)
trb_net16_api_ipu_streaming.vhd
trb_net16_hub_base.vhd
trb_net16_hub_ipu_logic.vhd
trb_net16_hub_logic.vhd
trb_net16_obuf.vhd
trb_net16_regIO.vhd
trb_net_components.vhd

index eefe4bbd35c1b31960f30b8b6087f89d3471d9aa..183ac88d51dd518a43e1305383c2a6c59b8005fb 100644 (file)
@@ -55,7 +55,7 @@ entity trb_net16_api_ipu_streaming is
     -- Data from Frontends
     FEE_DATA_OUT           : out std_logic_vector (31 downto 0);  --data from FEE
     FEE_DATAREADY_OUT      : out std_logic;  --data on data_out is valid
-    FEE_READ_IN            : in  std_logic;  --must be high when idle, otherwise you will never get a dataready
+    FEE_READ_IN            : in  std_logic;  --must be high always unless connected entity can not read data, otherwise you will never get a dataready
     FEE_STATUS_BITS_OUT    : out std_logic_vector (31 downto 0); --valid after busy is low again
     FEE_BUSY_OUT           : out std_logic;  --goes high shortly after start_readout; goes low when last dataword from FEE
                                              --has been read.
@@ -112,6 +112,9 @@ architecture trb_net16_api_ipu_streaming_arch of trb_net16_api_ipu_streaming is
 
 begin
 
+APL_CTS_TARGET_ADDRESS <= x"FFFF";
+APL_FEE_LENGTH_IN <= x"0000";
+
 -------------------------------------------------------------------------------
 --Application Interface, receiving request from CTS
 -------------------------------------------------------------------------------
@@ -310,6 +313,7 @@ begin
         APL_FEE_SEND_IN          <= cts_start_readout_rising;
 
   APL_FEE_READ_IN <= FEE_READ_IN;
+  FEE_BUSY_OUT <= APL_FEE_RUN_OUT;
 
   APL_FEE_ERROR_PATTERN_IN(15 downto 0)  <= buf_CTS_NUMBER_OUT;
   APL_FEE_ERROR_PATTERN_IN(23 downto 16) <= buf_CTS_CODE_OUT;
@@ -357,22 +361,4 @@ begin
 
 
 
-
-  PROC_IPU_DATA : process(CLK)
-    begin
-      if rising_edge(CLK) then
-        if IPU_READ_IN = '1' then
-          buf_IPU_DATAREADY_OUT <= '0';
-        end if;
-        if buf_APL_READ_IN(1) = '1' and buf_APL_DATAREADY_OUT(1) = '1' and buf_APL_TYP_OUT(5 downto 3) = TYPE_DAT then
-          if buf_APL_PACKET_NUM_OUT(5 downto 3) = c_F0 or buf_APL_PACKET_NUM_OUT(5 downto 3) = c_F2 then
-            buf_IPU_DATA_OUT(31 downto 16) <= buf_APL_DATA_OUT(31 downto 16);
-          elsif buf_APL_PACKET_NUM_OUT(5 downto 3) = c_F1 or buf_APL_PACKET_NUM_OUT(5 downto 3) = c_F3 then
-            buf_IPU_DATA_OUT(15 downto  0) <= buf_APL_DATA_OUT(31 downto 16);
-            buf_IPU_DATAREADY_OUT <= '1';
-          end if;
-        end if;
-      end if;
-    end process;
-
 end architecture;
\ No newline at end of file
index 4213d45dfaef6f2bdeb45967776a14759f908a41..ac6abe00b16884892425a6120d90f2989bfeb31c 100644 (file)
@@ -187,6 +187,7 @@ architecture trb_net16_hub_base_arch of trb_net16_hub_base is
   signal HC_COMMON_STAT_REGS  : std_logic_vector(std_COMSTATREG*32-1 downto 0);
   signal HC_COMMON_CTRL_REGS  : std_logic_vector(std_COMCTRLREG*32-1 downto 0);
   signal buf_HC_STAT_REGS     :  std_logic_vector (2**4*32-1 downto 0);
+  signal HC_STAT_ack_waiting : std_logic_vector(127 downto 0) := (others => '0');
 
 
   signal HUB_MED_CONNECTED            : std_logic_vector  (31 downto 0);
@@ -765,7 +766,7 @@ MED_DATA_OUT       <= buf_MED_DATA_OUT;
   hub_control : trb_net16_regIO
     generic map(
       NUM_STAT_REGS      => 4,
-      NUM_CTRL_REGS      => 3,
+      NUM_CTRL_REGS      => 4,
       INIT_CTRL_REGS     => x"00000000_00000000_00009999_00000000" &
                             x"FFFFFFFF_FFFFFFFF_FFFFFFFF_FFFFFFFF",
       USED_CTRL_REGS     =>  "00111111",
@@ -947,7 +948,7 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1');
   buf_HC_STAT_REGS(5*32-1 downto 4*32)     <= HUB_MED_CONNECTED;
   buf_HC_STAT_REGS(5*32+31 downto 5*32+17)    <= (others => '0');
   buf_HC_STAT_REGS(6*32+31 downto 6*32+17)  <= (others => '0');
-  buf_HC_STAT_REGS(16*32-1 downto 12*32)  <= (others => '0');        --unused regs
+  buf_HC_STAT_REGS(16*32-1 downto 12*32)  <= HC_STAT_ack_waiting;
 
   loop_links : for i in 0 to 16 generate
     buf_HC_STAT_REGS(5*32+i) <= '1' when i < MII_NUMBER and MII_IS_UPLINK(i) = 1 else '0';
@@ -1002,6 +1003,13 @@ HUB_MED_CONNECTED(31 downto MII_NUMBER) <= (others => '1');
       end if;
     end process;
 
+  gen_ack_waiting : for i in 0 to MII_NUMBER-1 generate
+    HC_STAT_ack_waiting(i)     <= IOBUF_STAT_INIT_OBUF_DEBUG((2*MII_NUMBER+i)*32+19);
+    HC_STAT_ack_waiting(32+i)  <= IOBUF_STAT_INIT_OBUF_DEBUG((1*MII_NUMBER+i)*32+19);
+    HC_STAT_ack_waiting(64+i)  <= IOBUF_STAT_INIT_OBUF_DEBUG((2*MII_NUMBER+i)*32+19);
+    HC_STAT_ack_waiting(96+i)  <= IOBUF_STAT_INIT_OBUF_DEBUG((3*MII_NUMBER+i)*32+19);
+  end generate;
+
 
 ---------------------------------------------------------------------
 --Debugging Signals
index fdaf8a0e6471451c79d18568528cae9ba18d0770..e7fac815536deaaa6415561a606417041a496327 100644 (file)
@@ -541,7 +541,7 @@ begin
         if rising_edge(CLK) then
           connection_timed_out(i) <= '0';
           timeout_found <= or_all(connection_timed_out);
-          if REPLY_DATAREADY_IN(i) = '1' or real_activepoints(i) = '0' or locked = '0' or locking_point(i) = '1' then
+          if REPLY_DATAREADY_IN(i) = '1' or real_activepoints(i) = '0' or locked = '0' or locking_point(i) = '1'  or CTRL_TIMEOUT_TIME = 0  then
             timeout_counter(i) <= (others => '0');
           elsif timeout_counter(i)(to_integer(unsigned('0'&CTRL_TIMEOUT_TIME)+to_unsigned(16,5))) = '1' then
             connection_timed_out(i) <= '1';
index 4e0d85aea3d00b91985944af4adf98708c83e076..ac64de7fdb9aaaf3abc8a1daf1728d0d729dfd4d 100644 (file)
@@ -496,7 +496,7 @@ begin
         if rising_edge(CLK) then
           connection_timed_out(i) <= '0';
           timeout_found <= or_all(connection_timed_out);
-          if REPLY_DATAREADY_IN(i) = '1' or real_activepoints(i) = '0' or locked = '0' or locking_point(i) = '1' then
+          if REPLY_DATAREADY_IN(i) = '1' or real_activepoints(i) = '0' or locked = '0' or locking_point(i) = '1' or CTRL_TIMEOUT_TIME = 0 then
             timeout_counter(i) <= (others => '0');
           elsif timeout_counter(i)(conv_integer(('0'&CTRL_TIMEOUT_TIME)+16)) = '1' then
             connection_timed_out(i) <= '1';
index e5b90dc76ab8a9902b142af79f333d4fe3cf030d..38902130aa54ae1f6b1fae9f1daaa035f76ec7af 100644 (file)
@@ -490,7 +490,7 @@ STAT_DEBUG(11) <= reg_SEND_ACK_IN;
 STAT_DEBUG(12) <= RESET;
 STAT_DEBUG(14 downto 13) <= TRANSMITTED_BUFFERS;
 STAT_DEBUG(17 downto 15) <= REC_BUFFER_SIZE_IN(2 downto 0);
-STAT_DEBUG(19 downto 18) <= transfer_counter(1 downto 0);
+STAT_DEBUG(19 downto 18) <= transfer_counter(1 downto 0);  --used in hub monitoring!
 STAT_DEBUG(20) <= '1';
 STAT_DEBUG(31 downto 21) <= (others => '0');
 end architecture;
index d09dd03996aeef1fbac61b9dc98697a208f85a76..6d45004822d90d7297f941e207c76a5efc79a42b 100644 (file)
@@ -15,11 +15,11 @@ entity trb_net16_regIO is
     NUM_STAT_REGS      : integer range 0 to 6 := 3; --log2 of number of status registers
     NUM_CTRL_REGS      : integer range 0 to 6 := 3; --log2 of number of ctrl registers
     --standard values for output registers
-    INIT_CTRL_REGS     : std_logic_vector(2**(3)*32-1 downto 0) := (others => '0');
+    INIT_CTRL_REGS     : std_logic_vector(2**(4)*32-1 downto 0) := (others => '0');
     --set to 0 for unused ctrl registers to save resources
-    USED_CTRL_REGS     : std_logic_vector(2**(3)-1 downto 0)   := "00000001";
+    USED_CTRL_REGS     : std_logic_vector(2**(4)-1 downto 0)   := (others => '1');
     --set to 0 for each unused bit in a register
-    USED_CTRL_BITMASK  : std_logic_vector(2**(3)*32-1 downto 0) := (others => '1');
+    USED_CTRL_BITMASK  : std_logic_vector(2**(4)*32-1 downto 0) := (others => '1');
     USE_DAT_PORT        : integer range 0 to 1 := c_YES;  --internal data port
     INIT_ADDRESS     : std_logic_vector(15 downto 0) := x"FFFF";
     INIT_UNIQUE_ID   : std_logic_vector(63 downto 0) := x"1000_2000_3654_4876";
index d81c413833312063d7c00afb7c5094f8da71eb6c..23ff0bc5279dda0df5dc7a4c6a2c9acead909529 100644 (file)
@@ -1452,11 +1452,11 @@ package trb_net_components is
       NUM_STAT_REGS      : integer range 0 to 6 := 4; --log2 of number of status registers
       NUM_CTRL_REGS      : integer range 0 to 6 := 3; --log2 of number of ctrl registers
       --standard values for output registers
-      INIT_CTRL_REGS     : std_logic_vector(2**(3)*32-1 downto 0) := (others => '0');
+      INIT_CTRL_REGS     : std_logic_vector(2**(4)*32-1 downto 0) := (others => '0');
       --set to 0 for unused ctrl registers to save resources
-      USED_CTRL_REGS     : std_logic_vector(2**(3)-1 downto 0)   := "00000001";
+      USED_CTRL_REGS     : std_logic_vector(2**(4)-1 downto 0)   := (others => '1');
       --set to 0 for each unused bit in a register
-      USED_CTRL_BITMASK  : std_logic_vector(2**(3)*32-1 downto 0) := (others => '1');
+      USED_CTRL_BITMASK  : std_logic_vector(2**(4)*32-1 downto 0) := (others => '1');
       USE_DAT_PORT        : integer range 0 to 1 := c_YES;  --internal data port
       INIT_ADDRESS     : std_logic_vector(15 downto 0) := x"FFFF";
       INIT_UNIQUE_ID   : std_logic_vector(63 downto 0) := x"1000_2000_3654_4876";