if (local_end = x"0000") then
transmit_next_state <= SEND_ONE;
else
- if (actual_frame_bytes = TC_MAX_FRAME_IN - x"1") then
+ if (actual_frame_bytes = TC_MAX_FRAME_IN - x"1" and local_end > x"0002") then -- gk 15.03.2023 workaround for 2 leftover bytes, add them to the last frame
transmit_next_state <= SEND_ONE;
else
transmit_next_state <= TRANSMIT;
if rising_edge(CLK) then
if (transmit_current_state = PREPARE_HEADERS) then
if (local_end >= TC_MAX_FRAME_IN) then
- ip_size <= TC_MAX_FRAME_IN;
+ if (local_end = TC_MAX_FRAME_IN + x"1") then -- gk 15.03.2023 nasty workaround for 2 leftover bytes, add them to the last frame
+ ip_size <= TC_MAX_FRAME_IN + x"2";
+ else
+ ip_size <= TC_MAX_FRAME_IN;
+ end if;
else
ip_size <= local_end + x"1";
end if;
if rising_edge(CLK) then
if (transmit_current_state = PREPARE_HEADERS) then
if (local_end >= TC_MAX_FRAME_IN) then
- more_fragments <= '1';
+ if (local_end = TC_MAX_FRAME_IN + x"1") then -- gk 15.03.2023 nasty workaround for 2 leftover bytes, add them to the last frame
+ more_fragments <= '0';
+ else
+ more_fragments <= '1';
+ end if;
else
more_fragments <= '0';
end if;
);
end component;
+ component trb_net16_gbe_response_constructor_SCTRL_L is
+ generic(STAT_ADDRESS_BASE : integer := 0;
+ SLOWCTRL_BUFFER_SIZE : integer range 1 to 4 := 1
+ );
+ port(
+ CLK : in std_logic; -- system clock
+ RESET : in std_logic;
+
+ -- INTERFACE
+ MY_MAC_IN : in std_logic_vector(47 downto 0);
+ MY_IP_IN : in std_logic_vector(31 downto 0);
+ PS_DATA_IN : in std_logic_vector(8 downto 0);
+ PS_WR_EN_IN : in std_logic;
+ PS_ACTIVATE_IN : in std_logic;
+ PS_RESPONSE_READY_OUT : out std_logic;
+ PS_BUSY_OUT : out std_logic;
+ PS_SELECTED_IN : in std_logic;
+ PS_SRC_MAC_ADDRESS_IN : in std_logic_vector(47 downto 0);
+ PS_DEST_MAC_ADDRESS_IN : in std_logic_vector(47 downto 0);
+ PS_SRC_IP_ADDRESS_IN : in std_logic_vector(31 downto 0);
+ PS_DEST_IP_ADDRESS_IN : in std_logic_vector(31 downto 0);
+ PS_SRC_UDP_PORT_IN : in std_logic_vector(15 downto 0);
+ PS_DEST_UDP_PORT_IN : in std_logic_vector(15 downto 0);
+ TC_RD_EN_IN : in std_logic;
+ TC_DATA_OUT : out std_logic_vector(8 downto 0);
+ TC_FRAME_SIZE_OUT : out std_logic_vector(15 downto 0);
+ TC_FRAME_TYPE_OUT : out std_logic_vector(15 downto 0);
+ TC_IP_PROTOCOL_OUT : out std_logic_vector(7 downto 0);
+ TC_IDENT_OUT : out std_logic_vector(15 downto 0);
+ TC_DEST_MAC_OUT : out std_logic_vector(47 downto 0);
+ TC_DEST_IP_OUT : out std_logic_vector(31 downto 0);
+ TC_DEST_UDP_OUT : out std_logic_vector(15 downto 0);
+ TC_SRC_MAC_OUT : out std_logic_vector(47 downto 0);
+ TC_SRC_IP_OUT : out std_logic_vector(31 downto 0);
+ TC_SRC_UDP_OUT : out std_logic_vector(15 downto 0);
+ STAT_DATA_OUT : out std_logic_vector(31 downto 0);
+ STAT_ADDR_OUT : out std_logic_vector(7 downto 0);
+ STAT_DATA_RDY_OUT : out std_logic;
+ STAT_DATA_ACK_IN : in std_logic;
+ DEBUG_OUT : out std_logic_vector(63 downto 0);
+ -- END OF INTERFACE
+
+ -- protocol specific ports
+ GSC_CLK_IN : in std_logic;
+ GSC_INIT_DATAREADY_OUT : out std_logic;
+ GSC_INIT_DATA_OUT : out std_logic_vector(15 downto 0);
+ GSC_INIT_PACKET_NUM_OUT : out std_logic_vector(2 downto 0);
+ GSC_INIT_READ_IN : in std_logic;
+ GSC_REPLY_DATAREADY_IN : in std_logic;
+ GSC_REPLY_DATA_IN : in std_logic_vector(15 downto 0);
+ GSC_REPLY_PACKET_NUM_IN : in std_logic_vector(2 downto 0);
+ GSC_REPLY_READ_OUT : out std_logic;
+ GSC_BUSY_IN : in std_logic;
+ MAKE_RESET_OUT : out std_logic;
+ CFG_ADDITIONAL_HDR_IN : in std_logic;
+ CFG_MAX_REPLY_SIZE_IN : in std_logic_vector(31 downto 0);
+ -- end of protocol specific ports
+
+ MONITOR_SELECT_REC_OUT : out std_logic_vector(31 downto 0);
+ MONITOR_SELECT_REC_BYTES_OUT : out std_logic_vector(31 downto 0);
+ MONITOR_SELECT_SENT_BYTES_OUT : out std_logic_vector(31 downto 0);
+ MONITOR_SELECT_SENT_OUT : out std_logic_vector(31 downto 0);
+ DATA_HIST_OUT : out hist_array
+ );
+ end component;
+
component trb_net16_gbe_response_constructor_Stat is
generic(STAT_ADDRESS_BASE : integer := 0
);