]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
corr. checksum in lvl1
authorhadeshyp <hadeshyp>
Mon, 22 Jun 2009 09:06:37 +0000 (09:06 +0000)
committerhadeshyp <hadeshyp>
Mon, 22 Jun 2009 09:06:37 +0000 (09:06 +0000)
trb_net16_trigger.vhd

index ba3c755fb86727a91e4145b6e7d95af3ad878f73..a00e8d8a64c933086ff55ceff3912720e6989c90 100644 (file)
@@ -61,6 +61,7 @@ architecture trb_net16_trigger_arch of trb_net16_trigger is
   signal send_trm, next_send_trm                          : std_logic;
   signal buf_INT_DATAREADY_OUT, next_INT_DATAREADY_OUT    : std_logic;
   signal buf_INT_DATA_OUT, next_INT_DATA_OUT              : std_logic_vector(c_DATA_WIDTH-1 downto 0);
+  signal next_seqnr, seqnr                                : std_logic_vector(7 downto 0);
 
 begin
 
@@ -104,6 +105,7 @@ begin
               next_TRG_NUMBER_OUT(15 downto 0) <= INT_DATA_IN(15 downto 0);
             elsif INT_PACKET_NUM_IN = c_F3 then
               next_TRG_TYPE_OUT                <= INT_DATA_IN(3 downto 0);
+              next_seqnr                       <= INT_DATA_IN(11 downto 4);
               next_TRG_RECEIVED_OUT            <= '1';
             end if;
           end if;
@@ -113,7 +115,6 @@ begin
         next_INT_DATA_OUT          <= buf_INT_DATA_OUT;
 
         if (reg_TRG_RECEIVED_OUT = '1' and (TRG_RELEASE_IN = '1'  or USE_TRG_PORT = 0)) or send_trm = '1' then
---        if (reg_APL_GOT_TRM = '1' and (APL_RELEASE_TRM = '1' )) or send_trm = '1'  or 0 = 0 then
                            --next_transfer_counter is used for transmission!
           if transfer_counter = c_F3_next and INT_READ_IN = '1' then
             next_send_trm <= '0';
@@ -134,7 +135,7 @@ begin
             next_INT_DATA_OUT <= buf_TRG_ERROR_PATTERN_IN(15 downto 1) & '1';
           else
             next_INT_DATA_OUT <= (others => '0');
-            next_INT_DATA_OUT(11 downto 4) <= reg_TRG_NUMBER_OUT(7 downto 0);
+            next_INT_DATA_OUT(11 downto 4) <= seqnr;
           end if;
         end if;
         if (TRG_RELEASE_IN = '1' and reg_TRG_RECEIVED_OUT = '1') or USE_TRG_PORT = c_NO then
@@ -232,6 +233,7 @@ begin
             reg_TRG_TYPE_OUT <= next_TRG_TYPE_OUT;
             reg_TRG_CODE_OUT <= next_TRG_CODE_OUT;
             reg_TRG_INFORMATION_OUT <= next_TRG_INFORMATION_OUT;
+            seqnr <= next_seqnr;
           end if;
         end if;
       end process;