Skip to content
Snippets Groups Projects
Commit 6524336a authored by Job van Wee's avatar Job van Wee
Browse files

Ready for review

parent 41ffb62e
No related branches found
No related tags found
1 merge request!215Resolve L2SDP-660
Pipeline #26249 passed
...@@ -111,11 +111,15 @@ BEGIN ...@@ -111,11 +111,15 @@ BEGIN
lag_due_reset <= lag_due_reset+TO_UINT(out_mosi.address); lag_due_reset <= lag_due_reset+TO_UINT(out_mosi.address);
END IF; END IF;
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
test_running <= '1'; -- start of test
-- filling the input data vectors with the corresponding numbers -- filling the input data vectors with the corresponding numbers
make_data : FOR J IN 0 TO g_sim_length-1 LOOP
fill_in_sosi_arr : FOR I IN 0 TO g_nof_streams-1 LOOP fill_in_sosi_arr : FOR I IN 0 TO g_nof_streams-1 LOOP
in_sosi_arr(I).data(g_data_w-1 DOWNTO 0) <= c_total_vector(g_data_w*(I+1)-1 DOWNTO g_data_w*I);
END LOOP;
WAIT FOR c_clk_period*1;
test_running <= '1'; -- beceause there is al delay in address counter, test running should go up one clockcycle later in order for p_verify to function
make_data : FOR J IN 1 TO g_sim_length-1 LOOP
fill_in_sosi_arr_rest : FOR I IN 0 TO g_nof_streams-1 LOOP
in_sosi_arr(I).data(g_data_w-1 DOWNTO 0) <= c_total_vector(g_data_w*(I+1)+J*c_in_data_w-1 DOWNTO g_data_w*I+J*c_in_data_w); in_sosi_arr(I).data(g_data_w-1 DOWNTO 0) <= c_total_vector(g_data_w*(I+1)+J*c_in_data_w-1 DOWNTO g_data_w*I+J*c_in_data_w);
END LOOP; END LOOP;
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
...@@ -176,15 +180,15 @@ BEGIN ...@@ -176,15 +180,15 @@ BEGIN
VARIABLE out_data_cnt : NATURAL := 0; VARIABLE out_data_cnt : NATURAL := 0;
BEGIN BEGIN
WAIT UNTIL test_running = '1'; WAIT UNTIL rising_edge(clk);
WAIT UNTIL out_mosi.wr = '1'; IF test_running = '1' AND out_mosi.wr = '1'THEN
out_data_cnt := out_data_cnt+1; out_data_cnt := out_data_cnt+1;
IF out_data_cnt mod 2 = 0 THEN IF out_data_cnt mod 2 = 0 THEN
assert false report "in_data_cnt = " & NATURAL'image(in_data_cnt) & ", out_data_cnt = " & NATURAL'image(out_data_cnt) severity note;
ctr_of := c_in_data_w*in_data_cnt-c_out_data_w*out_data_cnt; ctr_of := c_in_data_w*in_data_cnt-c_out_data_w*out_data_cnt;
ASSERT ctr_of = out_of REPORT "The amount of overflow does not match, ctr_of = " & NATURAL'image(ctr_of) & ", out_of = " & NATURAL'image(out_of) SEVERITY ERROR; ASSERT ctr_of = out_of REPORT "The amount of overflow does not match, ctr_of = " & NATURAL'image(ctr_of) & ", out_of = " & NATURAL'image(out_of) SEVERITY ERROR;
END IF; END IF;
ASSERT out_mosi.wrdata(c_out_data_w-1 DOWNTO 0) = c_total_vector(c_out_data_w*out_data_cnt-1 DOWNTO c_out_data_w*(out_data_cnt-1)) REPORT "Data does not match, out_data_cnt = " & NATURAL'image(out_data_cnt) SEVERITY ERROR; ASSERT out_mosi.wrdata(c_out_data_w-1 DOWNTO 0) = c_total_vector(c_out_data_w*out_data_cnt-1 DOWNTO c_out_data_w*(out_data_cnt-1)) REPORT "Data does not match, out_data_cnt = " & NATURAL'image(out_data_cnt) SEVERITY ERROR;
END IF;
END PROCESS; END PROCESS;
......
...@@ -99,9 +99,11 @@ BEGIN ...@@ -99,9 +99,11 @@ BEGIN
rst <= '0'; rst <= '0';
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
test_running <= '1'; -- start of test test_running <= '1'; -- start of test
in_data_cnt <= in_data_cnt +1;
WAIT FOR c_clk_period*1;
-- filling the input vector g_sim_lengt amount of times -- filling the input vector g_sim_lengt amount of times
make_in_data : FOR I IN 0 TO g_sim_lengt-1 LOOP make_in_data : FOR I IN 1 TO g_sim_lengt-1 LOOP
in_data(g_in_data_w-1 DOWNTO 0) <= TO_UVEC(I, g_in_data_w); in_data(g_in_data_w-1 DOWNTO 0) <= TO_UVEC(I, g_in_data_w);
WAIT FOR c_clk_period*1; WAIT FOR c_clk_period*1;
in_data_cnt <= in_data_cnt + 1; in_data_cnt <= in_data_cnt + 1;
...@@ -121,15 +123,15 @@ BEGIN ...@@ -121,15 +123,15 @@ BEGIN
VARIABLE out_data_cnt : NATURAL := 0; VARIABLE out_data_cnt : NATURAL := 0;
BEGIN BEGIN
WAIT UNTIL test_running = '1'; WAIT UNTIL rising_edge(clk);
WAIT UNTIL out_sosi.valid = '1'; IF test_running = '1' AND out_sosi.valid = '1' THEN
out_data_cnt := out_data_cnt+1; out_data_cnt := out_data_cnt+1;
IF out_data_cnt mod 2 = 0 THEN IF out_data_cnt mod 2 = 0 THEN
assert false report "in_data_cnt = " & NATURAL'image(in_data_cnt) & ", out_data_cnt = " & NATURAL'image(out_data_cnt) severity note;
ctr_of := g_in_data_w*in_data_cnt-c_out_data_w*out_data_cnt; ctr_of := g_in_data_w*in_data_cnt-c_out_data_w*out_data_cnt;
ASSERT ctr_of = out_of REPORT "The amount of overflow does not match, ctr_of = " & NATURAL'image(ctr_of) & ", out_of = " & NATURAL'image(out_of) SEVERITY ERROR; ASSERT ctr_of = out_of REPORT "The amount of overflow does not match, ctr_of = " & NATURAL'image(ctr_of) & ", out_of = " & NATURAL'image(out_of) SEVERITY ERROR;
END IF; END IF;
ASSERT out_sosi.data(c_out_data_w-1 DOWNTO 0) = c_total_vector(c_out_data_w*out_data_cnt-1 DOWNTO c_out_data_w*(out_data_cnt-1)) REPORT "Data does not match, out_data_cnt = " & NATURAL'image(out_data_cnt) SEVERITY ERROR; ASSERT out_sosi.data(c_out_data_w-1 DOWNTO 0) = c_total_vector(c_out_data_w*out_data_cnt-1 DOWNTO c_out_data_w*(out_data_cnt-1)) REPORT "Data does not match, out_data_cnt = " & NATURAL'image(out_data_cnt) SEVERITY ERROR;
END IF;
END PROCESS; END PROCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment