Skip to content
Snippets Groups Projects
Commit 0d88a9dc authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Added p_verify process.

parent 4c8450fb
No related branches found
No related tags found
1 merge request!34Resolve L2SDP-137
......@@ -80,11 +80,12 @@ ARCHITECTURE tb OF tb_dp_selector_arr IS
SIGNAL stimuli_en : STD_LOGIC := '1';
SIGNAL stimuli_src_in : t_dp_siso;
SIGNAL stimuli_src_out : t_dp_sosi;
SIGNAL verify_sosi : t_dp_sosi;
SIGNAL ref_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL pipe_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL out_pipe_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0);
SIGNAL out_ref_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0);
SIGNAL ref_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL pipe_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
SIGNAL out_pipe_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0);
SIGNAL out_ref_sosi_arr : t_dp_sosi_arr(c_nof_streams-1 DOWNTO 0);
SIGNAL mm_mosi_pipe : t_mem_mosi;
SIGNAL mm_mosi_ref : t_mem_mosi;
......@@ -144,26 +145,31 @@ BEGIN
-- . account for g_pkt_len
v_sosi.data := INCR_UVEC(v_sosi.data, g_pkt_len-1);
v_sosi.data := RESIZE_DP_DATA(v_sosi.data(g_in_dat_w-1 DOWNTO 0)); -- wrap when >= 2**g_in_dat_w
proc_common_wait_some_cycles(clk, 100); -- latency from stimuli to verify depends on the flow control, so wait sufficiently long for last packet to have passed through
FOR I IN 0 TO c_nof_streams-1 LOOP
ASSERT SIGNED(v_sosi.channel)=SIGNED(out_ref_sosi_arr(I).channel) REPORT "Unexpected channel from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.channel)=SIGNED(out_pipe_sosi_arr(I).channel) REPORT "Unexpected channel from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.err)=SIGNED(out_ref_sosi_arr(I).err) REPORT "Unexpected err from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.err)=SIGNED(out_pipe_sosi_arr(I).err) REPORT "Unexpected err from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.bsn)=SIGNED(out_ref_sosi_arr(I).bsn) REPORT "Unexpected bsn from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.bsn)=SIGNED(out_pipe_sosi_arr(I).bsn) REPORT "Unexpected bsn from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.data)=SIGNED(out_ref_sosi_arr(I).data) REPORT "Unexpected data from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(v_sosi.data)+c_pipe_data_offset=SIGNED(out_pipe_sosi_arr(I).data) REPORT "Unexpected data from dut_pipe output." SEVERITY ERROR;
END LOOP;
verify_sosi <= v_sosi;
-- Signal end of stimuli
proc_common_wait_some_cycles(clk, 50);
proc_common_wait_some_cycles(clk, 100);
tb_end <= '1';
WAIT;
END PROCESS;
p_verify : PROCESS
BEGIN
proc_common_wait_some_cycles(clk, g_nof_repeat*(g_pkt_gap+g_pkt_len)); -- Wait until end of simulation.
proc_common_wait_some_cycles(clk, 50); -- latency from stimuli to verify depends on the flow control, so wait sufficiently long for last packet to have passed through
FOR I IN 0 TO c_nof_streams-1 LOOP
ASSERT SIGNED(verify_sosi.channel)=SIGNED(out_ref_sosi_arr(I).channel) REPORT "Unexpected channel from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.channel)=SIGNED(out_pipe_sosi_arr(I).channel) REPORT "Unexpected channel from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.err)=SIGNED(out_ref_sosi_arr(I).err) REPORT "Unexpected err from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.err)=SIGNED(out_pipe_sosi_arr(I).err) REPORT "Unexpected err from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.bsn)=SIGNED(out_ref_sosi_arr(I).bsn) REPORT "Unexpected bsn from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.bsn)=SIGNED(out_pipe_sosi_arr(I).bsn) REPORT "Unexpected bsn from dut_pipe output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.data)=SIGNED(out_ref_sosi_arr(I).data) REPORT "Unexpected data from dut_ref output." SEVERITY ERROR;
ASSERT SIGNED(verify_sosi.data)+c_pipe_data_offset=SIGNED(out_pipe_sosi_arr(I).data) REPORT "Unexpected data from dut_pipe output." SEVERITY ERROR;
END LOOP;
WAIT;
END PROCESS;
stimuli_src_in <= c_dp_siso_rdy;
gen_connect : FOR I IN 0 TO c_nof_streams-1 generate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment