TSM_RX_STAT_VEC_IN => (others => '0'), --mac_rx_stat_vec,
TSM_RX_STAT_EN_IN => '0', --mac_rx_stat_en,
+ DEBUG_OUT(31 downto 0) => DEBUG_OUT,
+ DEBUG_OUT(63 downto 32) => open,
+
MAC_READY_CONF_IN => MAC_READY_CONF_IN,
MAC_RECONF_OUT => MAC_RECONF_OUT,
MONITOR_SELECT_REC_OUT => dbg_select_rec,
MONITOR_DROPPED_OUT => monitor_dropped
);
- DEBUG_OUT(0) <= fr_rd_en;
- DEBUG_OUT(1) <= fr_frame_valid;
- DEBUG_OUT(2) <= fr_get_frame;
+-- DEBUG_OUT(0) <= fr_rd_en;
+-- DEBUG_OUT(1) <= fr_frame_valid;
+-- DEBUG_OUT(2) <= fr_get_frame;
MONITOR_RX_FRAMES_OUT <= monitor_rx_frames;
MONITOR_RX_BYTES_OUT <= monitor_rx_bytes;
-- debug(127 downto 64) are local
-- debug(63 downto 0) are media interface
- DEBUG_OUT <= monitor_gen_dbg(95 downto 64);
+-- DEBUG_OUT <= monitor_gen_dbg(95 downto 64);
mac_0 <= MC_UNIQUE_ID_IN(15 downto 8) & MC_UNIQUE_ID_IN(23 downto 16) & MC_UNIQUE_ID_IN(31 downto 24) & x"0" & MC_UNIQUE_ID_IN(35 downto 32) & x"7ada";
MONITOR_DROPPED_OUT => monitor_dropped,
MONITOR_GEN_DBG_OUT => monitor_gen_dbg,
MAKE_RESET_OUT => make_reset0,
- DEBUG_OUT => open --DEBUG_OUT
+ DEBUG_OUT => DEBUG_OUT --open
);
BUS_IP_TX.ack <= busip0.ack when rising_edge(CLK_125_IN);
-- END OF TRI SPEED MAC CONTROLLER
--***************
- process(CLK)
- begin
- if rising_edge(CLK) then
- DEBUG_OUT(3 downto 0) <= redirect_state;
- DEBUG_OUT(7 downto 4) <= flow_state;
- DEBUG_OUT(11 downto 8) <= link_state;
- DEBUG_OUT(31 downto 12) <= (others => '0');
-
- DEBUG_OUT(63 downto 32) <= selector_debug(31 downto 0);
- end if;
- end process;
+-- process(CLK)
+-- begin
+-- if rising_edge(CLK) then
+-- DEBUG_OUT(3 downto 0) <= redirect_state;
+-- DEBUG_OUT(7 downto 4) <= flow_state;
+-- DEBUG_OUT(11 downto 8) <= link_state;
+-- DEBUG_OUT(31 downto 12) <= (others => '0');
+--
+-- DEBUG_OUT(63 downto 32) <= selector_debug(31 downto 0);
+-- end if;
+-- end process;
+
+ DEBUG_OUT <= selector_debug;
end trb_net16_gbe_main_control;
FWD_READY_OUT => FWD_READY_OUT,
FWD_FULL_OUT => FWD_FULL_OUT,
-
-
- DEBUG_OUT => open
+ DEBUG_OUT => DEBUG_OUT(31 downto 0) --open
-- END OF INTERFACE
);
end generate fwd_gen;
+ DEBUG_OUT(63 downto 32) <= (others => '0');
+
no_fwd_gen : if INCLUDE_FWD = '0' generate
resp_ready(5) <= '0';
busy(5) <= '0';
+ DEBUG_OUT(31 downto 0) <= (others => '0');
end generate no_fwd_gen;
PS_BUSY_OUT <= busy;
end if;
end process SELECTOR_PROC;
- process(CLK)
- begin
- if rising_edge(CLK) then
- DEBUG_OUT(3 downto 0) <= select_state;
- DEBUG_OUT(11 downto 4) <= std_logic_vector(to_unsigned(index, 8));
- DEBUG_OUT(19 downto 12) <= "00" & resp_ready; -- 4:0
- DEBUG_OUT(27 downto 20) <= "00" & busy; -- 4:0
- DEBUG_OUT(63 downto 28) <= (others => '0');
- end if;
- end process;
+-- process(CLK)
+-- begin
+-- if rising_edge(CLK) then
+-- DEBUG_OUT(3 downto 0) <= select_state;
+-- DEBUG_OUT(11 downto 4) <= std_logic_vector(to_unsigned(index, 8));
+-- DEBUG_OUT(19 downto 12) <= "00" & resp_ready; -- 4:0
+-- DEBUG_OUT(27 downto 20) <= "00" & busy; -- 4:0
+-- DEBUG_OUT(63 downto 28) <= (others => '0');
+-- end if;
+-- end process;
end trb_net16_gbe_protocol_selector;
-- Response Constructor which forwards received frame back creating a loopback
--
+-- WARNING: data latency was wrong by one cycle (first byte not sent, last byte duplicated), and
+-- size was calculated wrong (one off). Works now FOR ME. To be tested carefully!
+
entity trb_net16_gbe_response_constructor_Forward is
port (
CLK : in std_logic; -- system clock
ff_rd_en <= '1' when (TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1') else '0';
-TC_DATA_OUT <= ff_q;
+--TC_DATA_OUT <= ff_q; -- BUG?!?
+TC_DATA_OUT <= ff_q when rising_edge(CLK);
PS_RESPONSE_READY_OUT <= '1' when (dissect_current_state = LOAD) else '0';
-TC_FRAME_SIZE_OUT <= resp_bytes_ctr + x"1";
+--TC_FRAME_SIZE_OUT <= resp_bytes_ctr + x"1"; -- BUG?!?
+TC_FRAME_SIZE_OUT <= resp_bytes_ctr;
TC_FRAME_TYPE_OUT <= x"0008";
TC_DEST_MAC_OUT <= FWD_DST_MAC_IN;
-- **** debug
DEBUG_OUT(3 downto 0) <= state;
DEBUG_OUT(4) <= ff_empty;
-DEBUG_OUT(7 downto 5) <= "000";
-DEBUG_OUT(8) <= ff_full;
-DEBUG_OUT(11 downto 9) <= "000";
-DEBUG_OUT(31 downto 12) <= (others => '0');
+DEBUG_OUT(5) <= ff_full;
+DEBUG_OUT(6) <= ff_wr_en;
+DEBUG_OUT(7) <= ff_rd_en;
+DEBUG_OUT(15 downto 8) <= ff_q(7 downto 0);
+DEBUG_OUT(16) <= ff_q(8);
+DEBUG_OUT(17) <= local_eop;
+DEBUG_OUT(31 downto 18) <= (others => '0');
-- ****
end trb_net16_gbe_response_constructor_Forward;