Commit 284ae16b authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

test: Use common tags to extract test info in all tests.

parent 82baf7bb
......@@ -40,34 +40,38 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - Base ID feature test.
--
-- Verifies:
-- 1. Arbitration within base identifier. Node loses arbitration on a bit where
-- @Verifies:
-- @1. Arbitration within base identifier. Node loses arbitration on a bit where
-- it send recessive and samples dominant.
-- 2. Arbitration lost capture position within Base identifier.
-- @2. Arbitration lost capture position within Base identifier.
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Loop by N between 1 and 11:
-- 2.1 Generate two CAN frames. Both with base ID only. Both IDs are the
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Loop by N between 1 and 11:
-- @2.1 Generate two CAN frames. Both with base ID only. Both IDs are the
-- same, appart from N-th bit. On N-th bit Node 1 will have Dominant
-- Node 2 Recessive.
-- 2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and frame 2
-- @2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and frame 2
-- by Node 2 right one after another.
-- 2.3 Wait till Arbitration field in Node 2. This is right after sample
-- @2.3 Wait till Arbitration field in Node 2. This is right after sample
-- point of Node 2 in SOF or Intermission (if there is no SOF). Check
-- that Node 2 is Transmitter.
-- 2.4 Wait N-times till sample point in Node 2. After every wait before N
-- @2.4 Wait N-times till sample point in Node 2. After every wait before N
-- is reached, check Node 2 is still transmitter. After N waits we are
-- right after Sample point where Node 2 should have lost arbitration.
-- Check Node 2 is receiver. Read content of ALC, check arbitration was
-- lost at correct position.
-- 2.5 Wait till the CRC delimiter in Node 2, and monitor that Node 2 is
-- @2.5 Wait till the CRC delimiter in Node 2, and monitor that Node 2 is
-- transmitting recessive value.
-- 2.6 Wait till bus is idle! Check frame was sucessfully transmitted in
-- @2.6 Wait till bus is idle! Check frame was sucessfully transmitted in
-- Node 1. Check it was succesfully received in Node 2!
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 20.6.2016 Created file
......@@ -127,14 +131,14 @@ package body alc_base_id_feature is
begin
------------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
------------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
------------------------------------------------------------------------
-- 2. Loop by N between 1 and 11:
-- @2. Loop by N between 1 and 11:
------------------------------------------------------------------------
info("Step 2: Loop over each bit of Base ID!");
for N in 1 to 11 loop
......@@ -143,7 +147,7 @@ package body alc_base_id_feature is
info("-----------------------------------------------------------");
--------------------------------------------------------------------
-- 2.1 Generate two CAN frames. Both with base ID only. Both IDs are
-- @2.1 Generate two CAN frames. Both with base ID only. Both IDs are
-- the same, appart from N-th bit. On N-th bit Node 1 will have
-- Dominant Node 2 Recessive.
--------------------------------------------------------------------
......@@ -167,7 +171,7 @@ package body alc_base_id_feature is
CAN_insert_TX_frame(frame_2, 1, ID_2, mem_bus(2));
--------------------------------------------------------------------
-- 2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and
-- @2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and
-- frame 2 by Node 2 right one after another.
--------------------------------------------------------------------
info("Step 2.2: Send frames!");
......@@ -176,7 +180,7 @@ package body alc_base_id_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
--------------------------------------------------------------------
-- 2.3 Wait till Arbitration field in Node 2. This is right after
-- @2.3 Wait till Arbitration field in Node 2. This is right after
-- sample point of Node 2 in SOF or Intermission (if there is no
-- SOF). Check that Node 2 is Transmitter.
--------------------------------------------------------------------
......@@ -186,7 +190,7 @@ package body alc_base_id_feature is
check(stat_2.transmitter, "Node 2 transmitting!");
-------------------------------------------------------------------
-- 2.4 Wait N-times till sample point in Node 2. After every wait
-- @2.4 Wait N-times till sample point in Node 2. After every wait
-- before N is reached, check Node 2 is still transmitter.
-- After N waits we are right after Sample point where Node 2
-- should have lost arbitration. Check Node 2 is receiver.
......@@ -229,7 +233,7 @@ package body alc_base_id_feature is
end loop;
-----------------------------------------------------------------------
-- 2.5 Wait till the CRC delimiter in Node 2, and monitor that Node 2
-- @2.5 Wait till the CRC delimiter in Node 2, and monitor that Node 2
-- is transmitting recessive value.
-----------------------------------------------------------------------
info("Step 2.5: Wait till end of frame!");
......@@ -242,7 +246,7 @@ package body alc_base_id_feature is
end loop;
-----------------------------------------------------------------------
-- 2.7 Wait till bus is idle! Check frame was sucessfully transmitted
-- @2.6 Wait till bus is idle! Check frame was sucessfully transmitted
-- in Node 1. Check it was succesfully received in Node 2!
-----------------------------------------------------------------------
info("Step 2.7: Wait till bus is idle!");
......
......@@ -40,36 +40,39 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - ID Extension feature test.
--
-- Verifies:
-- 1. Arbitration within identifier extension. Node loses arbitration on a bit
-- @Verifies:
-- @1. Arbitration within identifier extension. Node loses arbitration on a bit
-- where it send recessive and samples dominant.
-- 2. Arbitration lost capture position within Identifier extension
-- @2. Arbitration lost capture position within Identifier extension
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Loop by N between 1 and 18:
-- 2.1 Generate two CAN frames. Both with Extended ID. Both IDs have Base ID
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Loop by N between 1 and 18:
-- @2.1 Generate two CAN frames. Both with Extended ID. Both IDs have Base ID
-- the same. N-th bit of ID Extension differs. On N-th bit Node 1 will
-- have Dominant, Node 2 Recessive.
-- 2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and frame 2
-- @2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and frame 2
-- by Node 2 right one after another.
-- 2.3 Wait till Arbitration field in Node 2. This is right after sample
-- @2.3 Wait till Arbitration field in Node 2. This is right after sample
-- point of Node 2 in SOF or Intermission (if there is no SOF). Check
-- that Node 2 is Transmitter.
-- 2.4 Wait 11+1+1 (Base ID, RTR/SRR, IDE) times until sample point in Node
-- 2.
-- 2.5 Wait N-times till sample point in Node 2. After every wait before N
-- @2.4 Wait 11+1+1 (Base ID, RTR/SRR, IDE) times until sample point in Node 2.
-- @2.5 Wait N-times till sample point in Node 2. After every wait before N
-- is reached, check Node 2 is still transmitter. After N waits we are
-- right after Sample point where Node 2 should have lost arbitration.
-- Check Node 2 is receiver. Read content of ALC, check arbitration was
-- lost at correct position.
-- 2.6 Wait till the CRC delimiter in Node 2, and monitor that Node 2 is
-- @2.6 Wait till the CRC delimiter in Node 2, and monitor that Node 2 is
-- transmitting recessive value.
-- 2.7 Wait till bus is idle! Check frame was sucessfully transmitted in
-- @2.7 Wait till bus is idle! Check frame was sucessfully transmitted in
-- Node 1. Check it was succesfully received in Node 2!
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 05.10.2019 Created file.
......@@ -125,14 +128,14 @@ package body alc_id_extension_feature is
begin
------------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
------------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
------------------------------------------------------------------------
-- 2. Loop by N between 1 and 18:
-- @2. Loop by N between 1 and 18:
------------------------------------------------------------------------
info("Step 2: Loop over each bit of ID Extension!");
for N in 1 to 18 loop
......@@ -141,7 +144,7 @@ package body alc_id_extension_feature is
info("-----------------------------------------------------------");
--------------------------------------------------------------------
-- 2.1 Generate two CAN frames. Both with Extended ID. Both IDs have
-- @2.1 Generate two CAN frames. Both with Extended ID. Both IDs have
-- Base ID the same. N-th bit of ID Extension differs. On N-th
-- bit Node 1 will have Dominant, Node 2 Recessive.
--------------------------------------------------------------------
......@@ -171,7 +174,7 @@ package body alc_id_extension_feature is
CAN_insert_TX_frame(frame_2, 1, ID_2, mem_bus(2));
--------------------------------------------------------------------
-- 2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and
-- @2.2 Wait till sample point on Node 1. Send frame 1 by Node 1 and
-- frame 2 by Node 2 right one after another.
--------------------------------------------------------------------
info("Step 2.2: Send frames!");
......@@ -180,7 +183,7 @@ package body alc_id_extension_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
--------------------------------------------------------------------
-- 2.3 Wait till Arbitration field in Node 2. This is right after
-- @2.3 Wait till Arbitration field in Node 2. This is right after
-- sample point of Node 2 in SOF or Intermission (if there is no
-- SOF). Check that Node 2 is Transmitter.
--------------------------------------------------------------------
......@@ -190,7 +193,7 @@ package body alc_id_extension_feature is
check(stat_2.transmitter, "Node 2 transmitting!");
-------------------------------------------------------------------
-- 2.4 Wait 11+1+1 (Base ID, RTR/SRR, IDE) times until sample
-- @2.4 Wait 11+1+1 (Base ID, RTR/SRR, IDE) times until sample
-- point in Node 2.
-------------------------------------------------------------------
info("Step 2.4: Wait till Identifier Extension!");
......@@ -199,7 +202,7 @@ package body alc_id_extension_feature is
end loop;
-------------------------------------------------------------------
-- 2.5 Wait N-times till sample point in Node 2. After every wait
-- @2.5 Wait N-times till sample point in Node 2. After every wait
-- before N is reached, check Node 2 is still transmitter.
-- After N waits we are right after Sample point where Node 2
-- should have lost arbitration. Check Node 2 is receiver.
......@@ -242,7 +245,7 @@ package body alc_id_extension_feature is
end loop;
-----------------------------------------------------------------------
-- 2.6 Wait till the CRC delimiter in Node 2, and monitor that Node 2
-- @2.6 Wait till the CRC delimiter in Node 2, and monitor that Node 2
-- is transmitting recessive value.
-----------------------------------------------------------------------
info("Step 2.5: Wait till end of frame!");
......@@ -255,7 +258,7 @@ package body alc_id_extension_feature is
end loop;
-----------------------------------------------------------------------
-- 2.7 Wait till bus is idle! Check frame was sucessfully transmitted
-- @2.7 Wait till bus is idle! Check frame was sucessfully transmitted
-- in Node 1. Check it was succesfully received in Node 2!
-----------------------------------------------------------------------
info("Step 2.7: Wait till bus is idle!");
......
......@@ -40,25 +40,29 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - IDE bit feature test.
--
-- Verifies:
-- 1. CAN frame with base identifier only wins arbitration over CAN frame with
-- @Verifies:
-- @1. CAN frame with base identifier only wins arbitration over CAN frame with
-- extended identifier when base identifier of both frames is equal.
-- 2. Arbitration lost capture position on IDE bit after Base identifier.
-- @2. Arbitration lost capture position on IDE bit after Base identifier.
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Generate two CAN frames: Frame 1 with Extended identifier, Frame 2 with
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Generate two CAN frames: Frame 1 with Extended identifier, Frame 2 with
-- Base Identifier only, RTR frame. Base identifier of both CAN frames is
-- matching!
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 4. Wait till arbitration field in Node 1. Wait till sample point 13 times
-- @4. Wait till arbitration field in Node 1. Wait till sample point 13 times
-- (11 Base ID + RTR/SRR + IDE). Check Node 1 is transmitting recessive,
-- Check Node 2 is transmitting dominant. Check Node 1 lost arbitration.
-- Check Node 2 is still transmitter. Read ALC from Node 1 and check it.
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 05.10.2019 Created file
......@@ -112,14 +116,14 @@ package body alc_ide_feature is
begin
-----------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
-----------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 2. Generate two CAN frames: Frame 1 with Extended identifier,
-- @2. Generate two CAN frames: Frame 1 with Extended identifier,
-- Frame 2 with Base Identifier only, RTR frame. Base identifier of
-- both CAN frames is matching!
-----------------------------------------------------------------------
......@@ -139,7 +143,7 @@ package body alc_ide_feature is
frame_1.identifier := to_integer(unsigned(id_vect));
------------------------------------------------------------------------
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
------------------------------------------------------------------------
info("Step 3: Send frames");
......@@ -151,7 +155,7 @@ package body alc_ide_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 4. Wait till arbitration field in Node 1. Wait till sample point
-- @4. Wait till arbitration field in Node 1. Wait till sample point
-- 13 times (11 Base ID + RTR/SRR + IDE). Check Node 1 is
-- transmitting recessive, Check Node 2 is transmitting dominant.
-- Check Node 1 lost arbitration. Check Node 2 is still transmitter.
......
......@@ -40,27 +40,31 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - RTR/r0 bit (after Identifier Extension) feature
-- test.
--
-- Verifies:
-- 1. RTR frame with Extended identifier loses arbitration against data frame
-- @Verifies:
-- @1. RTR frame with Extended identifier loses arbitration against data frame
-- with Extended Identifier.
-- 2. Arbitration lost capture position on RTR/r0 bit after Base identifier.
-- @2. Arbitration lost capture position on RTR/r0 bit after Base identifier.
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Generate two CAN frames: Frame 1 with Extended identifier RTR, Frame 2
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Generate two CAN frames: Frame 1 with Extended identifier RTR, Frame 2
-- with Extended Identifier, Data frame. Identifiers of both CAN
-- frames are matching!
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 4. Wait till arbitration field in Node 1. Wait till sample point 32 times
-- @4. Wait till arbitration field in Node 1. Wait till sample point 32 times
-- (11 Base ID + RTR/SRR + IDE + 18 ID Extension + RTR/r0). Check Node 1
-- is transmitting recessive, Check Node 2 is transmitting dominant. Check
-- Node 1 lost arbitration. Check Node 2 is still transmitter. Read ALC
-- from Node 1 and check it.
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 05.10.2019 Created file
......@@ -110,14 +114,14 @@ package body alc_rtr_r0_feature is
begin
-----------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
-----------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 2. Generate two CAN frames: Frame 1 with Extended identifier RTR,
-- @2. Generate two CAN frames: Frame 1 with Extended identifier RTR,
-- Frame 2 with Extended Identifier, Data frame. Identifiers of both
-- CAN frames are matching!
-----------------------------------------------------------------------
......@@ -134,7 +138,7 @@ package body alc_rtr_r0_feature is
frame_1.identifier := frame_2.identifier;
------------------------------------------------------------------------
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
------------------------------------------------------------------------
info("Step 3: Send frames");
......@@ -146,7 +150,7 @@ package body alc_rtr_r0_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 4. Wait till arbitration field in Node 1. Wait till sample point 32
-- @4. Wait till arbitration field in Node 1. Wait till sample point 32
-- times (11 Base ID + RTR/SRR + IDE + 18 ID Extension + RTR/r0).
-- Check Node 1 is transmitting recessive, Check Node 2 is
-- transmitting dominant. Check Node 1 lost arbitration. Check Node
......
......@@ -40,33 +40,37 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - SRR/RTR bit feature test 2.
--
-- Verifies:
-- 1. CAN FD frame wins over CAN 2.0 RTR frame with the same identifier.
-- 2. CAN FD frame wins over CAN frame with Extended identifier with the same
-- @Verifies:
-- @1. CAN FD frame wins over CAN 2.0 RTR frame with the same identifier.
-- @2. CAN FD frame wins over CAN frame with Extended identifier with the same
-- base identifier.
-- 3. Arbitration lost capture position on SRR/RTR bit after Base identifier.
-- @3. Arbitration lost capture position on SRR/RTR bit after Base identifier.
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Generate two CAN frames: Frame 1 - CAN FD Base frame, Frame 2 - CAN 2.0
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Generate two CAN frames: Frame 1 - CAN FD Base frame, Frame 2 - CAN 2.0
-- RTR frame with Base ID. Base identifier of both CAN frames is matching!
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 4. Wait till arbitration field in Node 1. Wait till sample point 12 times
-- @4. Wait till arbitration field in Node 1. Wait till sample point 12 times
-- (11 Base ID + RTR/SRR). Check Node 1 is transmitting dominant, Check
-- Node 2 is transmitting recessive. Check Node 2 lost arbitration. Check
-- Node 1 is still transmitter. Read ALC from Node 2 and check it.
-- 5. Generate two CAN Frames: Frame 1 - CAN FD frame with Base ID. Frame 2 -
-- @5. Generate two CAN Frames: Frame 1 - CAN FD frame with Base ID. Frame 2 -
-- Frame with Extended Identifier.
-- 6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 7. Wait till arbitration field in Node 2. Wait till sample point 12 times
-- @7. Wait till arbitration field in Node 2. Wait till sample point 12 times
-- (11 Base ID + RTR/SRR). Check Node 2 is transmitting recessive, Check
-- Node 1 is transmitting dominant. Check Node 2 lost arbitration. Check
-- Node 1 is still transmitter. Read ALC from Node 2 and check it.
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 02.10.2019 Created file
......@@ -114,14 +118,14 @@ package body alc_srr_rtr_2_feature is
begin
-----------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
-----------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 2. Generate two CAN frames: Frame 1 - CAN FD Base frame, Frame 2 -
-- @2. Generate two CAN frames: Frame 1 - CAN FD Base frame, Frame 2 -
-- CAN 2.0 RTR frame with Base ID. Base identifier of both CAN
-- frames is matching!
-----------------------------------------------------------------------
......@@ -138,7 +142,7 @@ package body alc_srr_rtr_2_feature is
frame_1.identifier := frame_2.identifier;
------------------------------------------------------------------------
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
------------------------------------------------------------------------
info("Step 3: Send frames");
......@@ -150,7 +154,7 @@ package body alc_srr_rtr_2_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 4. Wait till arbitration field in Node 1. Wait till sample point 12
-- @4. Wait till arbitration field in Node 1. Wait till sample point 12
-- times (11 Base ID + RTR/SRR). Check Node 1 is transmitting
-- dominant, Check Node 2 is transmitting recessive. Check Node 2
-- lost arbitration. Check Node 1 is still transmitter. Read ALC
......@@ -177,7 +181,7 @@ package body alc_srr_rtr_2_feature is
CAN_wait_bus_idle(ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 5. Generate two CAN Frames: Frame 1 - CAN FD frame with Base ID.
-- @5. Generate two CAN Frames: Frame 1 - CAN FD frame with Base ID.
-- Frame 2 - Frame with Extended Identifier.
-----------------------------------------------------------------------
info("Step 5: Generate frames");
......@@ -196,7 +200,7 @@ package body alc_srr_rtr_2_feature is
frame_2.ident_type := EXTENDED;
-----------------------------------------------------------------------
-- 6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
-----------------------------------------------------------------------
info("Step 6: Send frames");
......@@ -208,7 +212,7 @@ package body alc_srr_rtr_2_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 7. Wait till arbitration field in Node 2. Wait till sample point 12
-- @7. Wait till arbitration field in Node 2. Wait till sample point 12
-- times (11 Base ID + RTR/SRR). Check Node 2 is transmitting
-- recessive, Check Node 1 is transmitting dominant. Check Node 2
-- lost arbitration. Check Node 1 is still transmitter. Read ALC
......
......@@ -40,34 +40,38 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- @TestInfoStart
--
-- @Purpose:
-- Arbitration lost capture - SRR/RTR bit feature test.
--
-- Verifies:
-- 1. CAN frame with Extended Identifier loses arbitration on SRR bit when
-- @Verifies:
-- @1. CAN frame with Extended Identifier loses arbitration on SRR bit when
-- it receives dominant bit.
-- 2. CAN RTR frame with base identifier only loses arbitration or RTR bit
-- @2. CAN RTR frame with base identifier only loses arbitration or RTR bit
-- when it receives dominant bit.
-- 3. Arbitration lost capture position on SRR/RTR bit after Base identifier.
-- @3. Arbitration lost capture position on SRR/RTR bit after Base identifier.
--
-- Test sequence:
-- 1. Configure both Nodes to one-shot mode.
-- 2. Generate two CAN frames: Frame 1 with Extended identifier, Frame 2 with
-- @Test sequence:
-- @1. Configure both Nodes to one-shot mode.
-- @2. Generate two CAN frames: Frame 1 with Extended identifier, Frame 2 with
-- Base Identifier only. Base identifier of both CAN frames is matching!
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 4. Wait till arbitration field in Node 1. Wait till sample point 12 times
-- @4. Wait till arbitration field in Node 1. Wait till sample point 12 times
-- (11 Base ID + RTR/SRR). Check Node 1 is transmitting recessive, Check
-- Node 2 is transmitting dominant. Check Node 1 lost arbitration. Check
-- Node 2 is still transmitter. Read ALC from Node 1 and check it.
-- 5. Generate two CAN Frames: Frame 1 with Base ID. Frame 2 with Base ID
-- @5. Generate two CAN Frames: Frame 1 with Base ID. Frame 2 with Base ID
-- equal to Frame 1 and RTR flag.
-- 6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- @6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and Frame 2 by
-- Node 2.
-- 7. Wait till arbitration field in Node 2. Wait till sample point 12 times
-- @7. Wait till arbitration field in Node 2. Wait till sample point 12 times
-- (11 Base ID + RTR/SRR). Check Node 2 is transmitting recessive, Check
-- Node 1 is transmitting dominant. Check Node 2 lost arbitration. Check
-- Node 1 is still transmitter. Read ALC from Node 2 and check it.
--
-- @TestInfoEnd
--------------------------------------------------------------------------------
-- Revision History:
-- 02.10.2019 Created file
......@@ -114,14 +118,14 @@ package body alc_srr_rtr_feature is
begin
-----------------------------------------------------------------------
-- 1. Configure both Nodes to one-shot mode.
-- @1. Configure both Nodes to one-shot mode.
-----------------------------------------------------------------------
info("Step 1: Configure one -shot mode");
CAN_enable_retr_limit(true, 0, ID_1, mem_bus(1));
CAN_enable_retr_limit(true, 0, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 2. Generate two CAN frames: Frame 1 with Extended identifier, Frame
-- @2. Generate two CAN frames: Frame 1 with Extended identifier, Frame
-- 2 with Base Identifier only. Base identifier of both CAN frames
-- is matching!
-----------------------------------------------------------------------
......@@ -141,7 +145,7 @@ package body alc_srr_rtr_feature is
frame_1.identifier := to_integer(unsigned(id_vect));
------------------------------------------------------------------------
-- 3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @3. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
------------------------------------------------------------------------
info("Step 3: Send frames");
......@@ -153,7 +157,7 @@ package body alc_srr_rtr_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 4. Wait till arbitration field in Node 1. Wait till sample point 12
-- @4. Wait till arbitration field in Node 1. Wait till sample point 12
-- times (11 Base ID + RTR/SRR). Check Node 1 is transmitting
-- recessive, Check Node 2 is transmitting dominant. Check Node 1
-- lost arbitration. Check Node 2 is still transmitter. Read ALC
......@@ -180,7 +184,7 @@ package body alc_srr_rtr_feature is
CAN_wait_bus_idle(ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 5. Generate two CAN Frames: Frame 1 with Base ID. Frame 2 with Base
-- @5. Generate two CAN Frames: Frame 1 with Base ID. Frame 2 with Base
-- ID equal to Frame 1 and RTR flag.
-----------------------------------------------------------------------
info("Step 5: Generate frames");
......@@ -197,7 +201,7 @@ package body alc_srr_rtr_feature is
frame_2.rtr := RTR_FRAME;
-----------------------------------------------------------------------
-- 6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- @6. Wait till sample point in Node 1. Send Frame 1 by Node 1 and
-- Frame 2 by Node 2.
-----------------------------------------------------------------------
info("Step 6: Send frames");
......@@ -209,7 +213,7 @@ package body alc_srr_rtr_feature is
send_TXT_buf_cmd(buf_set_ready, 1, ID_2, mem_bus(2));
-----------------------------------------------------------------------
-- 7. Wait till arbitration field in Node 2. Wait till sample point 12
-- @7. Wait till arbitration field in Node 2. Wait till sample point 12
-- times (11 Base ID + RTR/SRR). Check Node 2 is transmitting
-- recessive, Check Node 1 is transmitting dominant. Check Node 2