ACTIVE_SBUF: trb_net_sbuf
generic map (
DATA_WIDTH => 51,
- VERSION => 1)
+ VERSION => 0)
port map (
CLK => CLK,
RESET => RESET,
next_APL_DATAREADY_OUT <= '0';
fifo_to_apl_read <= '0';
next_slave_running <= slave_running;
+ next_sequence_counter <= sequence_counter;
-------------------------------------------------------------------------------
-- IDLE
-------------------------------------------------------------------------------
next_state <= SEND_SHORT; -- no next data word, waiting for falling edge of APL_SEND_IN
next_INT_MASTER_DATAREADY_OUT <= '0';
else -- normal transfer, prepare the header
- next_state <= SEND_HEADER;
+ next_state <= SEND_HEADER;
out_select <= HDR;
next_INT_MASTER_DATAREADY_OUT <= '1';
end if; -- next word will be a header
else
- next_state <= IDLE;
+ next_state <= IDLE;
end if; -- APL_SEND_IN
-------------------------------------------------------------------------------
-- SEND_SHORT
-------------------------------------------------------------------------------
elsif current_state = SEND_SHORT then
next_state <= SEND_SHORT;
+ update_registered_trailer <= '1';
if APL_SEND_IN = '0' then -- terminate the transfer
next_state <= SEND_TRAILER;
next_INT_MASTER_DATAREADY_OUT <= '1';
out_select <= TRM;
- else
- update_registered_trailer <= '1';
end if;
-------------------------------------------------------------------------------
-- SEND_HEADER
end if;
if reg_APL_TYP_OUT = TYPE_TRM and (APL_READ_IN = '1' and reg_APL_DATAREADY_OUT = '1') then --fifo_to_apl_read = '1'
next_state <= IDLE;
+ next_sequence_counter <= sequence_counter +1;
end if;
end if;
-- MISSING: SEQNR check
APL_DATA_OUT <= reg_APL_DATA_OUT;
APL_TYP_OUT <= reg_APL_TYP_OUT;
-- APL_RUN_OUT <= '0' when ((current_state = IDLE ))
- APL_RUN_OUT <= '0' when ((current_state = IDLE and API_TYPE = 1)
+ APL_RUN_OUT <= '0' when ((current_state = IDLE and API_TYPE = 1)
or (slave_running = '0' and API_TYPE = 0))
else '1';
APL_SEQNR_OUT <= sequence_counter;
-- generate the sequence counter
- -- combinatorial part
- SEQNR_COMB : process(sequence_counter, current_state, next_state)
- begin
- if current_state = WAITING and next_state = IDLE then
- next_sequence_counter <= sequence_counter+1;
- else
- next_sequence_counter <= sequence_counter;
- end if;
- end process;
+-- -- combinatorial part
+-- SEQNR_COMB : process(sequence_counter, current_state, next_state)
+-- begin
+-- if current_state = WAITING and next_state = IDLE then
+-- next_sequence_counter <= sequence_counter+1;
+-- else
+-- next_sequence_counter <= sequence_counter;
+-- end if;
+-- end process;