From: hadeshyp Date: Tue, 24 Mar 2009 10:37:11 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: oldGBE~469 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=fd3313baae01b7b9cb9d05455ac3c0cbb9587f87;p=trbnet.git *** empty log message *** --- diff --git a/special/trb_net_bridge_etrax_endpoint.vhd b/special/trb_net_bridge_etrax_endpoint.vhd index 1b71918..1974f8b 100644 --- a/special/trb_net_bridge_etrax_endpoint.vhd +++ b/special/trb_net_bridge_etrax_endpoint.vhd @@ -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; diff --git a/testbenches/trb_net16_dummy_apl.vhd b/testbenches/trb_net16_dummy_apl.vhd index 20f588f..a13a4e6 100644 --- a/testbenches/trb_net16_dummy_apl.vhd +++ b/testbenches/trb_net16_dummy_apl.vhd @@ -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; diff --git a/testbenches/trb_net16_dummy_passive_apl.vhd b/testbenches/trb_net16_dummy_passive_apl.vhd index 0b0cc3c..1401847 100644 --- a/testbenches/trb_net16_dummy_passive_apl.vhd +++ b/testbenches/trb_net16_dummy_passive_apl.vhd @@ -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 diff --git a/trb_net16_api_base.vhd b/trb_net16_api_base.vhd index 19fac2f..0d6d124 100644 --- a/trb_net16_api_base.vhd +++ b/trb_net16_api_base.vhd @@ -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, diff --git a/trb_net16_term.vhd b/trb_net16_term.vhd index 73e3b6e..957e8d6 100644 --- a/trb_net16_term.vhd +++ b/trb_net16_term.vhd @@ -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; diff --git a/trb_net_std.vhd b/trb_net_std.vhd index 3553f51..5e26c04 100644 --- a/trb_net_std.vhd +++ b/trb_net_std.vhd @@ -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;