From 6ddaea9c5ce8c4536a18fac837d930c4f7b5ed72 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Wed, 28 Jul 2010 15:01:11 +0000 Subject: [PATCH] *** empty log message *** --- special/handler_ipu.vhd | 6 +++--- testbenches/testbench_endpoint_hades_full_handler.vhd | 6 +++++- trb_net16_ipudata.vhd | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/special/handler_ipu.vhd b/special/handler_ipu.vhd index 959831b..4f3b808 100644 --- a/special/handler_ipu.vhd +++ b/special/handler_ipu.vhd @@ -174,7 +174,7 @@ begin next_first_fifo_read <= not dat_fifo_finished(next_dat_fifo_number); end if; end if; - next_ipu_dataready_i <= (dat_fifo_valid_read or (ipu_dataready_i and not IPU_READ_IN)) and not suppress_output; + next_ipu_dataready_i <= (dat_fifo_valid_read or (ipu_dataready_i and not IPU_READ_IN)); next_ipu_data_i <= DAT_DATA_IN(dat_fifo_number*32+31 downto dat_fifo_number*32); when END_READOUT => @@ -203,7 +203,7 @@ begin gen_fifo_read : for i in 0 to DATA_INTERFACE_NUMBER-1 generate --Read signal for data fifos - dat_fifo_read(i) <= dat_fifo_select(i) and ((IPU_READ_IN and (ipu_dataready_i or suppress_output)) or first_fifo_read) and not dat_fifo_finished(i); + dat_fifo_read(i) <= dat_fifo_select(i) and ((IPU_READ_IN and (ipu_dataready_i)) or first_fifo_read) and not dat_fifo_finished(i); --Count words read from data fifos @@ -313,7 +313,7 @@ begin --------------------------------------------------------------------------- -- Connection to IPU Handler --------------------------------------------------------------------------- - IPU_DATAREADY_OUT <= ipu_dataready_i; + IPU_DATAREADY_OUT <= ipu_dataready_i and not suppress_output when current_state /= SEND_DHDR else ipu_dataready_i; IPU_DATA_OUT <= ipu_data_i; IPU_LENGTH_OUT <= ipu_length_i; IPU_ERROR_PATTERN_OUT <= ipu_error_pattern_i; diff --git a/testbenches/testbench_endpoint_hades_full_handler.vhd b/testbenches/testbench_endpoint_hades_full_handler.vhd index 9a64d89..db3eb52 100644 --- a/testbenches/testbench_endpoint_hades_full_handler.vhd +++ b/testbenches/testbench_endpoint_hades_full_handler.vhd @@ -56,6 +56,7 @@ architecture tb_arch of tb is signal timer : unsigned(31 downto 0) := (others => '0'); signal event : unsigned(15 downto 0) := (others => '0'); + signal eventvec : std_logic_vector(15 downto 0) := (others => '0'); signal readoutevent : unsigned(15 downto 0) := (others => '0'); begin @@ -159,6 +160,7 @@ begin ); + proc_clk : process begin wait for 5 ns; @@ -173,6 +175,8 @@ proc_reset : process wait; end process; +eventvec <= std_logic_vector(event); + proc_media_interface : process begin med_stat_op <= (others => '0'); @@ -256,7 +260,7 @@ proc_media_interface : process med_packet_num_in <= c_F0; med_dataready_in <= '1'; wait until falling_edge(clk); - med_data_in <= x"10CD"; + med_data_in <= x"10CD" or x"0"&"000"&eventvec(0)&x"00"; med_packet_num_in <= c_F1; med_dataready_in <= '1'; wait until falling_edge(clk); diff --git a/trb_net16_ipudata.vhd b/trb_net16_ipudata.vhd index 929337b..58bf38c 100644 --- a/trb_net16_ipudata.vhd +++ b/trb_net16_ipudata.vhd @@ -80,7 +80,7 @@ architecture trb_net16_ipudata_arch of trb_net16_ipudata is signal state_bits : std_logic_vector(2 downto 0); signal dhdr_counter : std_logic_vector(1 downto 0); signal first_ipu_read : std_logic; - signal ipu_read_before : std_logic; + signal ipu_read_before : std_logic := '0'; signal second_word_waiting : std_logic; signal last_second_word_waiting : std_logic; signal make_compare : std_logic; -- 2.43.0