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";
--Media Interface: Optical Link
---------------------------------------------------------------------
- TLK : trb_net16_med_tlk
+ THE_TLK : trb_net16_med_tlk
port map(
RESET => RESET,
CLK => CLK,
--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(
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;
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;
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)