From 2612ea14d02a50aa199b1f2a25626f4d3c302d8b Mon Sep 17 00:00:00 2001 From: "Ille, Ondrej, Ing" Date: Sun, 24 Nov 2019 17:03:52 +0100 Subject: [PATCH] test: debug ALC_SRR_RTR. MEasuring sample points needs to be done on Node 2 since we check its own arbitration. If done on Node 1, it might happen that Node 2 did not loose arbitration yet! --- test/feature/alc_srr_rtr_2_feature_tb.vhd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/feature/alc_srr_rtr_2_feature_tb.vhd b/test/feature/alc_srr_rtr_2_feature_tb.vhd index 7edd5633..e59eb169 100644 --- a/test/feature/alc_srr_rtr_2_feature_tb.vhd +++ b/test/feature/alc_srr_rtr_2_feature_tb.vhd @@ -230,13 +230,15 @@ package body alc_srr_rtr_2_feature is -- from Node 2 and check it. ----------------------------------------------------------------------- info("Step 7: Check arbitration lost on SRR/RTR"); - CAN_wait_pc_state(pc_deb_arbitration, ID_1, mem_bus(1)); + CAN_wait_pc_state(pc_deb_arbitration, ID_2, mem_bus(2)); for i in 0 to 11 loop - CAN_wait_sample_point(iout(1).stat_bus); + CAN_wait_sample_point(iout(2).stat_bus); end loop; check(iout(1).can_tx = DOMINANT, "Dominant RTR transmitted!"); check(iout(2).can_tx = RECESSIVE, "Recessive RTR transmitted!"); - wait for 20 ns; -- To account for trigger processing + + -- Wait for up to one bit time since triggers can be shifted! + wait for 1000 ns; get_controller_status(stat_2, ID_2, mem_bus(2)); check(stat_2.receiver, "Node 2 lost arbitration!"); -- GitLab