]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Tue, 24 Mar 2009 10:37:11 +0000 (10:37 +0000)
committerhadeshyp <hadeshyp>
Tue, 24 Mar 2009 10:37:11 +0000 (10:37 +0000)
special/trb_net_bridge_etrax_endpoint.vhd
testbenches/trb_net16_dummy_apl.vhd
testbenches/trb_net16_dummy_passive_apl.vhd
trb_net16_api_base.vhd
trb_net16_term.vhd
trb_net_std.vhd

index 1b71918968eb1117e124215e23b0a77bbbeff347..1974f8b852a663a1919417c716a98ab15126d463 100644 (file)
@@ -109,7 +109,7 @@ architecture trb_net_bridge_etrax_endpoint_arch of trb_net_bridge_etrax_endpoint
   component trb_net16_iobuf is
     generic (
       IBUF_DEPTH            : integer range 0 to 6 := c_FIFO_BRAM;--std_FIFO_DEPTH;
-      IBUF_SECURE_MODE      : integer range 0 to 1 := c_NO;--std_IBUF_SECURE_MODE;
+      IBUF_SECURE_MODE      : integer range 0 to 1 := c_YES;--std_IBUF_SECURE_MODE;
       SBUF_VERSION          : integer range 0 to 1 := std_SBUF_VERSION;
       OBUF_DATA_COUNT_WIDTH : integer range 2 to 7 := std_DATA_COUNT_WIDTH;
       USE_ACKNOWLEDGE       : integer range 0 to 1 := std_USE_ACKNOWLEDGE;
index 20f588fc0caca5959a614c515066b7aea7364429..a13a4e6a622b15445c9fb22d2dc7e038c7108d00 100644 (file)
@@ -66,9 +66,9 @@ begin
 --   reghigh <= x"DEAD";
 --   reglow  <= x"AFFE";
   reg_F0 <= x"5e1d"; --x"0001";
-  reg_F1 <= x"0000";
-  reg_F2 <= x"0000";--xor_all(APL_DATA_IN) & "000000000000011";
-  reg_F3 <= x"0000";
+  reg_F1 <= x"1111";
+  reg_F2 <= x"2222";--xor_all(APL_DATA_IN) & "000000000000011";
+  reg_F3 <= x"3333";
   APL_DTYPE_OUT <= x"F";
   APL_TARGET_ADDRESS_OUT <= x"ffff"; --TARGET_ADDRESS;
 
@@ -82,7 +82,7 @@ begin
       end case;
     end process;
 
-  APL_READ_OUT <= '0', '1' after 4ns;                  --just read, do not check
+  APL_READ_OUT <= '0', '1' after 30000 ns;                  --just read, do not check
   APL_ERROR_PATTERN_OUT <= x"12345678";
   --APL_DATA_OUT <= reg_counter;
 
index 0b0cc3c7320d818d95ecc6beb1e70615b3d7dee0..1401847a0d44118a9819a4c24439b3d0b38605dd 100644 (file)
@@ -64,7 +64,7 @@ architecture trb_net16_dummy_passive_apl_arch of trb_net16_dummy_passive_apl is
 begin
   APL_READ_OUT <= '1';                  --just read, do not check
   APL_DTYPE_OUT <= x"0";
-  APL_ERROR_PATTERN_OUT <= x"12345678";
+  APL_ERROR_PATTERN_OUT <= x"00000000";
   APL_TARGET_ADDRESS_OUT <= TARGET_ADDRESS;
   --APL_DATA_OUT <= reg_counter;
 
@@ -134,22 +134,24 @@ begin
 -------------------------------------------------------------------------
       elsif current_state = WRITING then
         next_state <= WRITING;
-        if packet_counter = c_F0 then
-          next_APL_WRITE_OUT <=  '1';
-          next_APL_DATA_OUT <= (0 => '1', others => '0');
-          next_packet_counter <= c_F1;
-        elsif packet_counter = c_F1 then
-          next_APL_WRITE_OUT <=  '1';
-          next_APL_DATA_OUT <= xor_all(APL_DATA_IN) & reg_counter(14 downto 0);
-          next_packet_counter <= c_F2;
-        elsif packet_counter = c_F2 then
-          next_APL_WRITE_OUT <=  '1';
-          next_APL_DATA_OUT <= xor_all(APL_DATA_IN) & reg_counter(14 downto 0);
-          next_packet_counter <= c_F3;
-        elsif packet_counter <=c_F3 then
-          next_state <= IDLE;
-          next_packet_counter <= c_F0;
-          next_counter <=  reg_counter +1;
+        if APL_READ_IN = '1' then
+          if packet_counter = c_F0 then
+            next_APL_WRITE_OUT <=  '1';
+            next_APL_DATA_OUT <= x"1111";
+            next_packet_counter <= c_F1;
+          elsif packet_counter = c_F1 then
+            next_APL_WRITE_OUT <=  '1';
+            next_APL_DATA_OUT <= reg_counter(15 downto 0);
+            next_packet_counter <= c_F2;
+          elsif packet_counter = c_F2 then
+            next_APL_WRITE_OUT <=  '1';
+            next_APL_DATA_OUT <= x"0000" - reg_counter(15 downto 0);
+            next_packet_counter <= c_F3;
+          elsif packet_counter <=c_F3 then
+            next_state <= IDLE;
+            next_packet_counter <= c_F0;
+            next_counter <=  reg_counter +1;
+          end if;
         end if;
 -----------------------------------------------------------------------
 -- RUNNING
index 19fac2fd42e500597f7854f36ee2d32a6417ab1a..0d6d1243d1fc4bc1a069d8f9bab29ee62fee07d4 100644 (file)
@@ -459,14 +459,18 @@ begin
         end if;
       end process;
   end generate;
+
   gen_int_nonsbuf : if SECURE_MODE_TO_INT = 0 generate
     buf_INT_MASTER_DATAREADY_OUT <= next_INT_MASTER_DATAREADY_OUT;
     INT_MASTER_DATA_OUT <= next_INT_MASTER_DATA_OUT;
     buf_INT_MASTER_PACKET_NUM_OUT <= next_INT_MASTER_PACKET_NUM_OUT;
     sbuf_free <= INT_MASTER_READ_IN;
   end generate;
+
 INT_MASTER_PACKET_NUM_OUT <= buf_INT_MASTER_PACKET_NUM_OUT;
 INT_MASTER_DATAREADY_OUT  <= buf_INT_MASTER_DATAREADY_OUT;
+
+
 ---------------------------------------
 -- a sbuf (to_apl direction)
 ---------------------------------------
@@ -489,6 +493,8 @@ INT_MASTER_DATAREADY_OUT  <= buf_INT_MASTER_DATAREADY_OUT;
         SYN_READ_IN        => APL_READ_IN,
         STAT_BUFFER        => sbuf_status(1)
         );
+
+
     SBUF_TO_APL2: trb_net_sbuf
       generic map (
         VERSION    => SBUF_VERSION,
index 73e3b6ee8af0d12f1bc96f1053bdbfcbbbe8cbaf..957e8d6139f35afb958498dd3db6ea6c39fff52b 100644 (file)
@@ -140,7 +140,7 @@ begin
       if rising_edge(CLK) then
         if RESET = '1' or (INT_PACKET_NUM_IN = c_F3 and INT_DATAREADY_IN = '1') then --or
           saved_packet_type <= "111";
-        elsif INT_PACKET_NUM_IN = c_H0 then
+        elsif INT_PACKET_NUM_IN = c_H0 and INT_DATAREADY_IN = '1' then
           saved_packet_type <= INT_DATA_IN(2 downto 0);
         end if;
       end if;
index 3553f5129ac8515ab74d271395b39befe641f5ee..5e26c041d3dcb02f1dd07a4314f25d86afe57331 100644 (file)
@@ -60,7 +60,7 @@ package trb_net_std is
   constant std_USE_ACKNOWLEDGE  : integer := c_YES;
   constant std_USE_REPLY_CHANNEL: integer := c_YES;
   constant std_FIFO_DEPTH       : integer := c_FIFO_BRAM;
-  constant std_DATA_COUNT_WIDTH : integer := 5; --max 7
+  constant std_DATA_COUNT_WIDTH : integer := 7; --max 7
   constant std_TERM_SECURE_MODE : integer := c_NO;
   constant std_MUX_SECURE_MODE  : integer := c_NO;
   constant std_FORCE_REPLY      : integer := c_YES;