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