From fc60ad2704ff6aba15bb73b973e96b38ab2774bd Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Fri, 29 May 2009 13:35:43 +0000 Subject: [PATCH] added second ctrl register --- media_interfaces/trb_net16_med_ecp_fot_4.vhd | 2 +- special/trb2_control_endpoint_tlk.vhd | 5 +++-- trb_net16_api_base.vhd | 3 ++- trb_net16_hub_ipu_logic.vhd | 2 +- trb_net_std.vhd | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/media_interfaces/trb_net16_med_ecp_fot_4.vhd b/media_interfaces/trb_net16_med_ecp_fot_4.vhd index 6feeff6..7375921 100644 --- a/media_interfaces/trb_net16_med_ecp_fot_4.vhd +++ b/media_interfaces/trb_net16_med_ecp_fot_4.vhd @@ -533,7 +533,7 @@ begin byte_buffer((i+1)*8-1 downto i*8) <= tx_fifo_dout((i)*16+15 downto i*16+8); byte_waiting(i) <= '1'; tx_k(i) <= '0'; - tx_data((i+1)*8-1 downto i*8) <= tx_fifo_dout(7 downto 0); + tx_data((i+1)*8-1 downto i*8) <= tx_fifo_dout(i*16+7 downto i*16+0); tx_fifo_read_en(i) <= tx_allow(i); else byte_buffer((i+1)*8-1 downto i*8) <= x"50"; diff --git a/special/trb2_control_endpoint_tlk.vhd b/special/trb2_control_endpoint_tlk.vhd index 0df7fee..a64ef01 100644 --- a/special/trb2_control_endpoint_tlk.vhd +++ b/special/trb2_control_endpoint_tlk.vhd @@ -243,7 +243,7 @@ begin --Media Interface: Optical Link --------------------------------------------------------------------- - TLK : trb_net16_med_tlk + THE_TLK : trb_net16_med_tlk port map( RESET => RESET, CLK => CLK, @@ -280,8 +280,9 @@ begin --The Endpoint generating the connection to etrax-read/write/able registers --------------------------------------------------------------------- - bridge: trb_net_bridge_etrax_endpoint + the_bridge: trb_net_bridge_etrax_endpoint generic map( + USE_CHANNELS => (c_YES, c_YES, c_NO, c_YES), AUTO_ANSWER_INCOMING_REQUESTS => (c_YES,c_YES,c_YES,c_YES) ) port map( diff --git a/trb_net16_api_base.vhd b/trb_net16_api_base.vhd index b3f5f16..8172d95 100644 --- a/trb_net16_api_base.vhd +++ b/trb_net16_api_base.vhd @@ -747,7 +747,8 @@ INT_MASTER_DATAREADY_OUT <= buf_INT_MASTER_DATAREADY_OUT; fifo_to_apl_long_packet_num_out, state_to_apl, reg_APL_TYP_OUT, reg_APL_PACKET_NUM_OUT, sbuf_to_apl_free, INT_SLAVE_DATA_IN, INT_SLAVE_PACKET_NUM_IN, APL_MY_ADDRESS_IN, APL_READ_IN, reg_APL_DATAREADY_OUT, slave_running, fifo_to_apl_read_before, throw_away,state_to_int, - saved_fifo_to_apl_packet_type,master_start, last_fifo_to_apl_read, sbuf_to_apl_next_READ) + saved_fifo_to_apl_packet_type,master_start, last_fifo_to_apl_read, sbuf_to_apl_next_READ, + next_last_fifo_to_apl_read) begin reg_INT_SLAVE_READ_OUT <= not fifo_to_apl_full; fifo_to_apl_write <= reg_INT_SLAVE_READ_OUT and INT_SLAVE_DATAREADY_IN; diff --git a/trb_net16_hub_ipu_logic.vhd b/trb_net16_hub_ipu_logic.vhd index fd01050..1502d1e 100644 --- a/trb_net16_hub_ipu_logic.vhd +++ b/trb_net16_hub_ipu_logic.vhd @@ -861,7 +861,7 @@ reply_compare_finished <= reply_compare_start; when GEN_LENGTH => --now, all HDR are stored, calc sum of HDR lengths last_dhdr_addr <= "010"; comb_REPLY_POOL_DATAREADY <= '0'; - comb_REPLY_POOL_DATA <= reply_adder_result; + comb_REPLY_POOL_DATA <= std_logic_vector(unsigned(reply_adder_result) - number_of_replies + 2); if reply_adder_ready = '1' then --packet_counter = c_F2 comb_REPLY_POOL_DATAREADY <= REPLY_POOL_next_read; end if; diff --git a/trb_net_std.vhd b/trb_net_std.vhd index f70c6c1..7db88b3 100644 --- a/trb_net_std.vhd +++ b/trb_net_std.vhd @@ -131,7 +131,7 @@ package trb_net_std is constant c_F3_next : std_logic_vector(2 downto 0) := "010"; constant c_max_word_number : std_logic_vector(2 downto 0) := "100"; - constant VERSION_NUMBER_TIME : std_logic_vector(31 downto 0) := conv_std_logic_vector(1234567890,32); + --constant VERSION_NUMBER_TIME : std_logic_vector(31 downto 0) := conv_std_logic_vector(1234567890,32); --function declarations function and_all (arg : std_logic_vector) -- 2.43.0