Commit 80f4d037 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

test: Extend wait function to allow including stuff bits.

parent d478daf4
......@@ -2021,10 +2021,14 @@ package CANtestLib is
-- Wait until sample point (from Status Bus).
--
-- Arguments:
-- pc_dbg State to poll on.
-- pc_dbg State to poll on.
-- skip_stuff_bits When true, bits which are destuffed are skipped, only
-- bits counted by protocol control are taken into account.
-- When false, also stuff bits are taken into account.
----------------------------------------------------------------------------
procedure CAN_wait_sample_point(
signal stat_bus : in std_logic_vector(511 downto 0)
signal stat_bus : in std_logic_vector(511 downto 0);
constant skip_stuff_bits : in boolean := true
);
----------------------------------------------------------------------------
......@@ -4910,10 +4914,15 @@ package body CANtestLib is
procedure CAN_wait_sample_point(
signal stat_bus : in std_logic_vector(511 downto 0)
signal stat_bus : in std_logic_vector(511 downto 0);
constant skip_stuff_bits : in boolean := true
) is
begin
wait until stat_bus(STAT_REC_TRIG) = '1';
if (skip_stuff_bits) then
wait until stat_bus(STAT_REC_TRIG) = '1';
else
wait until stat_bus(STAT_RX_TRIGGER) = '1';
end if;
end procedure;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment