|
@ -46,19 +46,19 @@ begin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListQueueTestP : process is |
|
|
ListQueueTestP : process is |
|
|
variable v_data : std_logic_vector(63 downto 0); |
|
|
|
|
|
|
|
|
variable v_data : std_logic_vector(7 downto 0); |
|
|
begin |
|
|
begin |
|
|
-- check initial emptiness |
|
|
-- check initial emptiness |
|
|
assert_true(sv_list_queue.is_empty, "Queue should be empty!"); |
|
|
assert_true(sv_list_queue.is_empty, "Queue should be empty!"); |
|
|
for i in 0 to 63 loop |
|
|
for i in 0 to 63 loop |
|
|
sv_list_queue.push(std_logic_vector(to_unsigned(i, 64))); |
|
|
|
|
|
|
|
|
sv_list_queue.push(std_logic_vector(to_unsigned(i, 8))); |
|
|
end loop; |
|
|
end loop; |
|
|
-- check that it's full |
|
|
-- check that it's full |
|
|
assert_true(sv_list_queue.is_full, "Queue should be full!"); |
|
|
assert_true(sv_list_queue.is_full, "Queue should be full!"); |
|
|
-- empty the queue |
|
|
-- empty the queue |
|
|
for i in 0 to 63 loop |
|
|
for i in 0 to 63 loop |
|
|
sv_list_queue.pop(v_data); |
|
|
sv_list_queue.pop(v_data); |
|
|
assert_equal(v_data, std_logic_vector(to_unsigned(i, 64))); |
|
|
|
|
|
|
|
|
assert_equal(v_data, std_logic_vector(to_unsigned(i, 8))); |
|
|
end loop; |
|
|
end loop; |
|
|
-- check emptiness |
|
|
-- check emptiness |
|
|
assert_true(sv_list_queue.is_empty, "Queue should be empty!"); |
|
|
assert_true(sv_list_queue.is_empty, "Queue should be empty!"); |
|
|