diff --git a/common/firmware/hdl/LinkCombinerCore.vhd b/common/firmware/hdl/LinkCombinerCore.vhd index 9d4f7a3f29d58fe63d8ea78e2dd2f955cdb7bd06..deb58e188acc8ff1be71c878c241d5d93243e74f 100644 --- a/common/firmware/hdl/LinkCombinerCore.vhd +++ b/common/firmware/hdl/LinkCombinerCore.vhd @@ -27,7 +27,8 @@ entity LinkCombinerCore is --- Debug Ports --- debug : out lword := LWORD_NULL; debug_super_id : out std_logic_vector(31 downto 0); - debug_fifo : out std_logic_vector(31 downto 0) := (others => '0') + debug_fifo : out std_logic_vector(31 downto 0) := (others => '0'); + debug_packet_size : out lword := LWORD_NULL ); end LinkCombinerCore; @@ -194,6 +195,8 @@ begin variable data_count : unsigned(7 downto 0); begin if rising_edge(clk_p) then + debug_packet_size <= LWORD_NULL; + output_valid_previous <= output_valid; if output_valid = '1' and output_rd_en_check = '1' then link_out.valid <= '1'; @@ -213,6 +216,9 @@ begin if data_count >= 2 and output_readout_countdown = 0 then output_rd_en_check <= output_enable; output_readout_countdown <= to_integer(data_count); + + debug_packet_size.valid <= '1'; + debug_packet_size.data(7 downto 0) <= output_data_count; elsif output_almost_full = '1' and output_readout_countdown = 0 then output_rd_en_check <= output_enable; output_readout_countdown <= to_integer(data_count); diff --git a/common/firmware/hdl/LinkCombinerIPBus.vhd b/common/firmware/hdl/LinkCombinerIPBus.vhd index c813671602e388933f2dc4c4e6396c822b895f3f..7abbaee722cf699d80dd36893fd2f4124bae5742 100644 --- a/common/firmware/hdl/LinkCombinerIPBus.vhd +++ b/common/firmware/hdl/LinkCombinerIPBus.vhd @@ -32,7 +32,8 @@ entity LinkCombinerIPBus is ipb_in : in ipb_wbus; ipb_out : out ipb_rbus; --- Debug Ports --- - super_id : out std_logic_vector(31 downto 0) + super_id : out std_logic_vector(31 downto 0); + debug_packet_size : out lword := LWORD_NULL ); end LinkCombinerIPBus; @@ -114,8 +115,8 @@ begin link_out => link_out, --- Debug Ports --- -- debug => link_combiner_debug, - debug_super_id => super_id - -- debug_fifo => link_aggregator_status_registers(2) + debug_super_id => super_id, + debug_packet_size => debug_packet_size ); end Behavioral; diff --git a/common/firmware/hdl/MProcessor.vhd b/common/firmware/hdl/MProcessor.vhd index d15baa4a5ee1515b2248c7c4bf88016aa9af4ed5..e7e777d1631276cb8bda9ea2fb5d8bff39271232 100644 --- a/common/firmware/hdl/MProcessor.vhd +++ b/common/firmware/hdl/MProcessor.vhd @@ -53,6 +53,8 @@ architecture Behavorial of MProcessor is signal super_id : std_logic_vector(31 downto 0) := (others => '0'); + signal debug_packet_size : lword := LWORD_NULL; + begin --==============================-- @@ -136,7 +138,8 @@ begin ipb_in => ipb_to_slaves(N_SLV_LINK_COMBINER), ipb_out => ipb_from_slaves(N_SLV_LINK_COMBINER), --- Debug Ports --- - super_id => super_id + super_id => super_id, + debug_packet_size => debug_packet_size ); -- --==============================--