test_startup (TC-RM-01) |
After Rst with Bdefault 0 and with 1: Link_Bus follows Cfg_Bdefault until the NMT model enters Pre-operational; then the start-up process starts on that bus without a switch, with Ctoggle 0 (also after a write of Ctoggle before the start) and Stat_Selecting '1'. Configuration minimal: no bus selection; the monitoring starts when the NMT model leaves the Initialisation, to Operational and, in the second run, to Pre-operational |
RM-SL-01, RM-MS-02, RM-SL-10, RM-IF-03, RM-IF-04, RM-IF-05 |
test_hb_dlc (TC-RM-02) |
Master heartbeats with DLC 0 and 2 to 15 on each bus: Err_HbDlc, no restart of the timer, no presence; with DLC 1 and every state byte 0 to 255: accepted, Stat_HbState holds the byte. Wrong DLCs on both buses in one cycle: one Err_HbDlc |
RM-HB-01, RM-IF-01, RM-IF-07 |
test_hb_monitoring (TC-RM-03) |
(C, T) = (1, 1), (5, 3), (2, 255), (65535, 1) and T = 0 (C = 1 is set with the measured heartbeat, so that no expiry comes before it): master heartbeats shortly before the limit keep the monitoring; without them Err_HbMissing and Nmt_PreopReq come T x C ticks after the last one. Bounds with tick period M: after a heartbeat one cycle after a tick the expiring tick comes T x C x M - 1 cycles later, after one a cycle before a tick (T x C - 1) x M + 1 cycles later; the events follow one cycle after that tick |
RM-HB-02, RM-HB-04, RM-IF-06, RM-IF-07 |
test_hb_disabled (TC-RM-04) |
C = 0 with T = 1: no Err_HbMissing and no toggle in 100000 ticks, longer than a timer that ran with C = 0 would need (65536 ticks), in Monitor_s and in a bus selection process; the process ends only by a message; Stat_HbPresent stays "00" |
RM-HB-03, RM-HB-05 |
test_hb_presence (TC-RM-05) |
Master heartbeats on either bus set Stat_HbPresent of that bus; it is cleared C ticks after the last one. Heartbeats on the inactive bus outside a bus selection process set its presence but do not restart the timer |
RM-HB-05, RM-SL-07, RM-IF-07 |
test_param_change (TC-RM-06) |
A change of C or of T in Monitor_s and in Select_s restarts the timer: the next expiry comes T x C ticks after the change, with the new values |
RM-HB-04 |
test_first_toggle (TC-RM-07) |
A missing master heartbeat with the NMT model entering Pre-operational after 0, 1 and 50 cycles, and staying in the Initialisation for 10 ticks: the first toggle comes once Nmt_State is Pre-operational, Link_Bus inverted, Ctoggle 1; Nmt_Switched one cycle after the link model reports the new bus, for switch times of 1 and 400 cycles |
RM-SL-02, RM-SL-03, RM-IF-05 |
test_toggling (TC-RM-08) |
N = 0, 1, 2, 3 and 255 without any message: a toggle every T x C ticks, Ctoggle counts; after N toggles no further toggle and one Err_ToggleEnd; the node is on the start bus after an even N and on the other bus after an odd N, with Bdefault 0 and 1; the process keeps running. N = 0 after a missing heartbeat: no toggle, Err_ToggleEnd in the cycle after Err_HbMissing, since the first toggle is due at once (RM-SL-02); N = 0 in the start-up process: no toggle, Err_ToggleEnd at the first expiry |
RM-SL-02, RM-SL-03, RM-SL-04, RM-SL-09, RM-IF-07 |
test_select_end_active (TC-RM-09) |
During a bus selection process, after 0, 1 and 2 toggles, an NMT message and, in a second run, a master heartbeat on the active bus: the process ends in the next cycle, Upd_Valid with that bus, Stat_Selecting '0', and a missing master heartbeat is detected T x C ticks later |
RM-SL-05, RM-IF-02 |
test_select_end_inactive (TC-RM-10) |
During a bus selection process, a master heartbeat and, in a second run, an NMT message on the inactive bus: while waiting for a toggle, in the cycle after a toggle, during a switch on the bus of ReqBus and during a switch on the other bus. The node switches at once without a change of Ctoggle, Nmt_Switched comes when the link model reports the bus, the process ends with Upd_Valid of that bus. Messages on both buses in one cycle: the active bus wins, no switch |
RM-SL-06, RM-IF-08 |
test_inactive_ignored (TC-RM-11) |
Outside a bus selection process, NMT messages and master heartbeats on the inactive bus in every phase of the timer: no change of Link_Bus, no restart of the timer, Err_HbMissing at its time |
RM-SL-07 |
test_writes (TC-RM-12) |
Precedence of writes. Bdefault written during a process: no change of Link_Bus or of the toggling, and the end of the process overwrites it (Upd_Valid); written outside a process: no change of the active bus, used after the next Rst. Ctoggle written during a process: the count is loaded and the toggling continues while it is below N; a value of N or more ends the toggling at the next due toggle with Err_ToggleEnd; 0 written after the end lets the toggling resume at the next expiry; a write in the cycle of a toggle wins. Ntoggle written during a process: takes effect at the next due toggle |
RM-SL-09, RM-SL-10, RM-IF-02 |
test_nmt_resets (TC-RM-13) |
The NMT model passes the Initialisation (reset node, reset communication) during the monitoring and during a bus selection process: no change of Link_Bus, Ctoggle and Stat_Selecting; a toggle that falls due in an Initialisation of 25 ticks (two expiries of T x C = 10 ticks) waits for Pre-operational, and the next toggle follows T x C ticks after it |
RM-SL-08, RM-SL-03, RM-SL-04 |
test_events_every_cycle (TC-RM-14) |
Configurations default and minimal: 60 segments of 400 cycles, each with a random tick period (2 to 8 cycles), NMT delay (0 to 20 cycles), switch delay (1 to 50 cycles), C (0 to 4), T (0 to 2), N (0 to 4, 255), Bdefault and NMT state (Initialisation, Pre-operational, Operational, Stopped), random writes of Ctoggle, and random events of both buses in consecutive cycles and in the same cycle at a random density from none to every cycle, checked against the reference model |
RM-IF-08, RM-IF-01, RM-IF-05, RM-SL-03, RM-SL-04, RM-SL-08, RM-SL-10 |
test_minimal_set (TC-RM-15) |
Configuration minimal: a master heartbeat and an NMT message on the active bus end a bus selection process; on the inactive bus they switch at once (as TC-RM-10) |
RM-MS-02, RM-SL-05, RM-SL-06 |
test_recovery (TC-RM-16) |
Recovery from every situation reachable at the ports: after the end of the toggling the master heartbeat on the bus of the node ends the process; a Ctoggle write restarts the toggling, and the master is found on the other bus; Rst in Select_s and in Switch_s restarts in Idle_s on Bdefault; C changed from 0 to a nonzero value during a process starts the toggling timer |
RM-SL-04, RM-SL-05, RM-SL-01, RM-HB-04 |
test_net_switch (TC-RM-17) |
Bench network, net_sel and net_par: M1 produces the master heartbeat on bus A and then moves it to bus B (clause 8.3.3b). The node misses it, enters Pre-operational (Ena_Pdo '0'), toggles to bus B and sends its heartbeat there at once; M1 sends start remote node on bus B: the node enters Operational, Bdefault is updated to bus B |
RM-SL-02, RM-SL-03, RM-SL-05, RM-IF-03 |
test_net_master_other_bus (TC-RM-18) |
Bench network, net_par: during a bus selection process on bus A, M1 starts its master heartbeat on bus B. The node switches to bus B at once, sends its heartbeat there and ends the process; repeated with an NMT message of M1 on bus B |
RM-SL-06 |
test_preop_again (TC-RM-20) |
Configurations default and minimal: after the first toggle the node leaves Pre-operational (to Stopped, to Operational; in the minimal set through the Initialisation to Operational, as after a reset communication), and in a third run it enters Operational during the first switch while the link still reports the old bus (an NMT message of the old bus delivered during the switch); the node does not answer the requests: Nmt_PreopReq at every expiry, T x C ticks apart, no toggle; when the node answers, the waiting toggle follows |
RM-SL-03, RM-SL-08, RM-IF-05 |
test_start_operational (TC-RM-21) |
The NMT model leaves the Initialisation to Operational and to Stopped: no start-up process, the monitoring starts, a missing heartbeat starts a process |
RM-SL-01 |
test_presence_lower_c (TC-RM-22) |
C lowered from 10 to 3 six ticks after a master heartbeat: the presence is cleared at the next tick |
RM-HB-05 |
test_second_process (TC-RM-23) |
A first process that toggled twice and ended the toggling, ended by a message; a write of Ctoggle in the monitoring; a second missing heartbeat without a reset: Ctoggle 0, the first toggle due at once (after Pre-operational), two toggles and Err_ToggleEnd again. With N = 0 two further processes without a toggle, each with its own Err_ToggleEnd |
RM-SL-02, RM-SL-04, RM-SL-10 |
test_toggle_c0 (TC-RM-24) |
C set to 0 while the first toggle waits for Pre-operational: no toggle in Pre-operational; with C /= 0 again the due toggle is made |
RM-HB-03, RM-SL-03 |
test_net_nmt_race (TC-RM-25) |
Bench network, net_sel: the master heartbeat is missing, and during the first switch an NMT Start remote node of bus A is delivered to ocan_nmt, injected by the harness at the receive input of ocan_nmt (Rx_Valid, Rx_Cs) while ocan_link reports the switch (on the bus the window is a few clock cycles, since the link aborts a pending frame that is not on the bus at once). The node is Operational on bus B; the master returns to bus A; at the next expiry Pre-operational is requested again, the node toggles back to bus A, and the master heartbeat ends the process |
RM-SL-03, RM-SL-05 |
test_net_bus_faults (TC-RM-19) |
Bench network, net_sel and net_par: bus A stuck dominant and bus A broken while M1 is on bus B: the node finds bus B by toggling. Both buses broken: N toggles, then Err_ToggleEnd, the node stays; bus B repaired with M1 on it: the master heartbeat ends the process |
RM-SL-04, RM-IF-03 |