CTU CAN FD - Test information
Test NamePurposeVRM Entries (What does the test verify)Test sequence
alc_base_id_ftest.vhdArbitration lost capture - Base ID feature test.
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.
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 Test Node will have Dominant DUT Recessive.
2.2 Wait till sample point in Test Node. Send frame 1 by Test Node and frame 2 by DUT right one after another.
2.3 Wait till Arbitration field in DUT. This is right after sample point of DUT in SOF or Intermission (if there is no SOF). Check that DUT is Transmitter.
2.4 Wait N-times till sample point in Test node. After every wait before N is reached, check DUT is still transmitter. After N waits we are right after Sample point where DUT should have lost arbitration. Check DUT is receiver. Read content of ALC, check arbitration was lost at correct position.
2.5 Wait till the CRC delimiter in DUT, and monitor that DUT is transmitting recessive value.
2.6 Wait till bus is idle! Check frame was sucessfully transmitted in DUT. Check it was succesfully received in DUT!
alc_ide_ftest.vhdArbitration lost capture - IDE bit feature test.
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.
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 DUT. Send Frame 1 by DUT and Frame 2 by Test node.
4. Wait till arbitration field in DUT. Wait till sample point 13 times (11 Base ID + RTR/SRR + IDE). Check DUT is transmitting recessive, Check Test node is transmitting dominant. Check DUT lost arbitration. Check Test node is still transmitter. Read ALC from DUT and check it.
alc_id_extension_ftest.vhdArbitration lost capture - ID Extension feature test.
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
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 DUT will have Dominant, Test node Recessive.
2.2 Wait till sample point on Test Node. Send frame 1 by Test Node and frame 2 by DUT right one after another.
2.3 Wait till Arbitration field in DUT. This is right after sample point of DUT in SOF or Intermission (if there is no SOF). Check that DUT is Transmitter.
2.4 Wait 11+1+1 (Base ID, RTR/SRR, IDE) times until sample point in DUT.
2.5 Wait N-times till sample point in Test node. After every wait before N is reached, check DUT is still transmitter. After N waits we are right after Sample point where DUT should have lost arbitration. Check DUT is receiver. Read content of ALC, check arbitration was lost at correct position.
2.6 Wait till the CRC delimiter in DUT, and monitor that DUT is transmitting recessive value.
2.7 Wait till bus is idle! Check frame was sucessfully transmitted in Test Node. Check it was succesfully received in DUT!
alc_rtr_ext_id_ftest.vhdArbitration lost capture - RTR bit after Extended Identifier.
1. CAN RTR frame with extended identifier loses arbitration against CAN data frame with the same identifier.
3. Arbitration lost capture position on RTR bit after Extended identifier.
1. Configure both Nodes to one-shot mode.
2. Generate two CAN frames with both Extended matching Identifiers. Frame 1 is RTR frame, frame 2 is data frame.
3. Wait till sample point in DUT. Send Frame 1 by DUT and Frame 2 by Test node.
4. Wait till arbitration field in DUT. Wait till sample point 31 times (11 Base ID + RTR/SRR + IDE + ID Extension + RTR). Check DUT is transmitting Recessive, Check Test node is transmitting Dominant. Check DUT lost arbitration. Check Test node is still transmitter. Read ALC from DUT and check it.
alc_rtr_r0_ftest.vhdArbitration lost capture - RTR/r0 bit (after Identifier Extension) feature test.
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.
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 DUT. Send Frame 1 by DUT and Frame 2 by Test node.
4. Wait till arbitration field in DUT. Wait till sample point 32 times (11 Base ID + RTR/SRR + IDE + 18 ID Extension + RTR/r0). Check DUT is transmitting recessive, Check Test node is transmitting dominant. Check DUT lost arbitration. Check Test node is still transmitter. Read ALC from DUT and check it.
alc_srr_rtr_ftest.vhdArbitration lost capture - SRR/RTR bit feature test.
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 when it receives dominant bit.
3. Arbitration lost capture position on SRR/RTR bit after Base identifier.
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 DUT. Send Frame 1 by DUT and Frame 2 by Test node.
4. Wait till arbitration field in DUT. Wait till sample point 12 times (11 Base ID + RTR/SRR). Check DUT is transmitting recessive, Check Test node is transmitting dominant. Check DUT lost arbitration. Check Test node is still transmitter. Read ALC from DUT and check it.
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 DUT. Send Frame 2 by DUT and Frame 1 by Test node.
7. Wait till arbitration field in DUT. Wait till sample point 12 times (11 Base ID + RTR/SRR). Check DUT is transmitting recessive, Check Test node is transmitting dominant. Check DUT lost arbitration. Check Test Node is still transmitter. Read ALC from DUT and check it.
alc_srr_rtr_2_ftest.vhdArbitration lost capture - SRR/RTR bit feature test 2.
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.
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 DUT. Send Frame 1 by Test Node and Frame 2 by DUT.
4. Wait till arbitration field in Test Node. Wait till sample point 12 times (11 Base ID + RTR/SRR). Check Test Node is transmitting dominant, Check DUT is transmitting recessive. Check DUT lost arbitration. Check Test Node is still transmitter. Read ALC from DUT 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 Test Node. Send Frame 1 by Test Node and Frame 2 by DUT.
7. Wait till arbitration field in DUT. Wait till sample point 12 times (11 Base ID + RTR/SRR). Check DUT is transmitting recessive, Check Test Node is transmitting dominant. Check Test node lost arbitration. Check Test Node is still transmitter. Read ALC from DUT and check it.
btr_ftest.vhdBTR (Bit timing register) feature test.
1. BTR register properly configures PROP, PH1, PH2 registers.
2. Transmission/reception at random bit-rate.
1. Disable both Nodes. Generate random bit-rate and configure it sa Nominal bit-rate! Enable both nodes and wait till both nodes are on.
2. Wait until sample point in DUT and measure number of clock cycles till next sample point. Check that it corresponds to pre-computed value!
3. Send frame by DUT and wait until it is sent. Read frame from Test node and check they are matching.
btr_fd_ftest.vhdBTR FD (Bit timing register - flexible data rate) feature test.
1. BTR FD register properly configures PROP, PH1, PH2 registers.
2. Transmission/reception at random bit-rate.
1. Disable both Nodes. Generate random bit-rate and configure it sa Data bit-rate! Nominal bit-rate remains the default one which was set by testbench.
2. Enable both Nodes and send CAN FD frame where bit-rate is shifted by DUT. Wait until data field in DUT and measure duration till next sample point! Transmitter during Data phase shall no re-synchronize therefore, bit time will always have nominal length!
3. Wait until frame is sent and check it is correctly received by Test node.
btr_minimal_ftest.vhdBTR (Bit timing register) - minimal settings feature test.
1. Node is able to send frame succesfully with maximal possible bit-rate (nominal and data), as specified by datasheet.
1. Configure highest possible bit-rate as given by datasheet in both nodes. Disable Secondary sampling point.
2. Configure small Transmitter delay, so that sampling in nominal bit rate will not fire an error.
3. Generate random frame which is FD frame with bit-rate shift. Send the frame by DUT, receive it by Test node and check it.
btr_ssp_access_ftest.vhdBTR, BTR_FD and SSP_CFG register access feature test.
1. When node is enabled SETTINGS[ENA]='1', BTR, BTR_FD and SSP_CFG registers are not writable. When node is disabled, they are writable!
1. Read values in BTR, BTR_FD and SSP_CFG registers. Try to write them, read them back and check that value has not changed! DUT is enabled!
2. Disable DUT and try to write BTR, BTR_FD and SSP_CFG registers. Read them back and check that value was written!
bus_start_ftest.vhdBus start feature test
1. CTU CAN FD can integrate to bus comunication within 11 consecutive recessive bits!
1. Disable both Nodes. Insert 2 frames to DUT. Check both Nodes are Bus off. Enable DUT.
2. Wait till sample point in DUT 11 times, check that after 11 recesive bits, DUT becomes error active. Wait until DUT becomes transmitter.
3. Enable Test node, wait until ACK field in Test node. Force the bus low so that DUT receives ACK. Wait till DUT is not in ACK anymore. Check it is in ACK Delimiter!
4. Wait for 11 sample points in Test node. Check that Test node became Error active (this should have occurred in ACK Delimiter + EOF + Intermission of DUT).
5. Wait until CAN frame starts in Test node. Check Test node turned receiver!
byte_enable_ftest.vhdByte enable feature test.
1. 8/16/32 bit read access.
2. 8/16/32 bit write access.
1. Disable DUT (so that BTR, BTR_FD are writable). Read 32-bit register via 32-bit access. Check correct value.
2. Read 32-bit register via 2 16 bit accesses. Check correct values.
3. Read 32-bit register via 4 8 bit accesses. Check correct values.
4. Erase 32-bit R/W register. Write pattern to a single byte. Read 32-bit check that pattern was written to single byte only and rest are zeroes. Repeat with each byte!
5. Erase 32-bit R/W register. Write pattern to lower half word. Read 32-bit, check that pattern was written to half word only and rest are zeroes. Repeat with upper half word!
command_cdo_ftest.vhdClear data overrun command feature test.
1. Data overrun flag is set when more frames are received than capacity of RX Buffer.
2. RX Buffer full is active when there is no free space available in RX Buffer.
3. COMMAND[CDO] will clear data overrun flag.
4. COMMAND[RRB] will clear data overrun flag.
1. Read size of RX Buffer in DUT. Check that DOR flag is not set. Generate number of RTR CAN frames (4 words in RX Buffer) which exactly fill RX Buffer and send them by Test node. Wait until frames are sent.
2. Read status of RX Buffer in DUT. Check that RX Buffer full is active. Check that DOR flag is not set yet.
3. Send one more frame by Test node and wait until it is sent. Check that Data Overrun flag is set. Issue Clear Data Overrun Command. Check that CDO flag was cleared.
4. Again send frame by Test node. Check DOR is set again. Issue Command[RRB]. Check Data Overrun Flag was cleared.
command_ercrst_ftest.vhdError counters reset (reintegration request) command!
1. Reintegration is started by COMMAND[ERCRST] when unit is bus-off.
2. Reintegration is not finished before 128 consecutive occurences of 11 con secutive recessive bits!
1. Set DUT TXC to 256 via test mode. This should set node to bus-off.
2. When DUT becomes bus off, issue COMMAND[ERCRST] to DUT. Now wait for 127 * 11 + 10 bits. Check that unit is still bus off! Wait for 30 more bits and check that DUT is now Error active!
command_frcrst_ftest.vhdTX/RX frame counters clear command.
1. TX Frame counter is cleared by COMMAND[TXRFCRST].
2. TX Frame counter is not cleared by COMMAND[TXFRCRST].
3. RX Frame counter is cleared by COMMAND[RXRFCRST].
4. RX Frame counter is not cleared by COMMAND[RXFRCRST].
1. Generate and send frame by Test node. Check that TX frame counter of Test node is not zero. Issue COMMAND[RXFRCRST] and check it is still not 0. Issue COMMAND[TXFRCRST] and check it is 0 now.
2. Check that RX Frame counter of DUT is not zero. Issue COMMAND[TXFRCRST] and check it is still not 0. Issue COMMAND[RXFRCRST] and RX Frame counter in DUT is 0.
command_rrb_ftest.vhdRelease receive buffer command feature test.
1. RX Buffer is reset by issuing COMMAND[RRB].
2. COMMAND[RRB] issued during CAN frame reception will erase RX Buffer properly, and RX buffer will remain consistent.
1. Check RX buffer in DUT is empty. Generate CAN frame and send it by Test node. Wait until frame is sent. Check RX Buffer is not empty.
2. Issue COMMAND[RRB] and check that RX Buffer is empty again!
3. Send CAN frame by Test node, wait until frame is sent and check that RX Buffer is not empty again.
4. Send frame by Test node. Wait until DUT starts receiving. Wait for random amount of time and issue COMMAND[RRB]. Wait until bus is idle. RX Buffer can be either empty (command was issued after first word was stored), or there are is one frame (command was issued before first word was stored).
5. Send frame by Test node again. Wait until frame is sent and check it is properly received by DUT.
device_id_ftest.vhdDevice ID feature test.
1. Correct device ID is read from DEVICE_ID register.
1. Read device ID and check it.
disable_in_tx_ftest.vhdFeature test which disables node while it is transmitting frame. Test implemented to achieve full coverage of operation control
1. Device can be disabled while transmitting.
1. Generate random frame and send it by DUT.
2. Wait until frame starts in DUT, and disable DUT.
3. Wait until bus is idle in Test Node (Test Node will transmitt error frame).
4. Enable DUT again, and transmitt another frame. Wait until it is send, and check it is received by Test Node.
dlc_can20_8_64_bytes_ftest.vhdData length Code CAN 2.0 more than 8 bytes feature test.
1. When transmission of CAN 2.0 frame with DLC higher than 8 is requested, only 8 bytes are transmitted!
1. Generate CAN 2.0 Frame and set DLC higher than 8. Set higher data bytes accordingly!
2. Send the CAN Frame via DUT. Monitor the bus and check that only 8 bytes are sent!
3. Verify that frame received by Test node, has the same DLC, but is has received only 8 bytes of Data!
err_capt_ack_ack_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_ACK, ack error feature test.
1. Detection of ACK error in ACK slot (when dominant ACK was not send). Value of ERR_CAPT[ERR_POS] when ACK error should have been detected in ACK field.
1. Check that ERR_CAPT contains no error (post reset).
2. Configure Test node to ACK forbidden mode. Generate frame (use CAN 2.0 not to extend ACK field) and send it by DUT. Wait until ACK field and monitor that it is recessive during whole duration of ACK field. Wait until Sample point and check that after it, error frame is transmitted by DUT. Check that ERR_CAPT register signals ACK Error in ACK field.
err_capt_arb_bit_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_ARB, bit error feature test.
1. Detection of bit error in Arbitration field. Value of ERR_CAPT[ERR_POS] when bit error should have been detected in arbitration field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame and send it by DUT. Wait until transmission starts and wait until arbitration field. Wait for random amount of time until Dominant bit is sent! Force bus low and wait until sample point. Check that Error frame is being transmitted. Check value of ERR_CAPT.
err_capt_arb_stuff_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_ARB, stuff error feature test.
1. Detection of stuff error in Arbitration field. Value of ERR_CAPT[ERR_POS] when stuff error should have been detected in arbitration field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame, force ID to contain first 4 bits dominant. Send such frame by DUT. Wait until arbitration field in DUT. Wait for 4 bits and after that force bit dominant (stuff bit should be recessive). Wait until Sample point and check that Error frame is being transmitted by DUT. Check that ERR_CAPT signals Stuff Error during arbitration.
err_capt_crc_bit_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_CRC feature test - bit error.
1. Detection of bit error in CRC field.
2. Value of ERR_CAPT when bit error is detected in CRC field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame, send it by DUT. Wait until CRC field. Wait for random duration of CRC field. Force bus to opposite value as transmitted bit wait until sample point. Check that error frame is being transmitted. Check that ERR_CAPT signals bit error in CRC field!
err_capt_crc_err_ftest.vhdERR_CAPT CRC error feature test.
1. Detection of CRC error when calculated CRC is not equal to received CRC. Value of ERR_CAPT when CRC error should have been detected in ACK field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame and send it by Test node. Wait until CRC field in DUT and wait for random number of bits. Force CAN_RX of DUT for duration of 1 bit to opposite value (to mess up received CRC of Test node). Wait until ACK bit in Test node. Force bus low (as if other node is ACKing the frame) and wait until sample point. Wait until ACK delimiter of DUT. Wait until DUT is NOT in ACK delimiter and check that it transmitts Error frame. Check that ERR_CAPT contains CRC Error.
err_capt_ctrl_bit_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_CTRL, bit error feature test.
1. Detection of bit error in IDE bit of frame with Base identifier!
2. Detection of bit error in EDL bit of CAN FD frame with Base identifier and with Extended Identifier!
3. Detection of bit error in ESI/BRS and DLC bit fields.
4. Value of ERR_CAPT[ERR_POS] when bit error shall be detected in control field of CAN frame!
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame (frame with Base ID only, CAN FD frames with Base and extended identifier, CAN FD frame with Base identifier), send it by DUT. Wait until Arbitration field and until sample point of one bit before bit error shall be detected. Force bus to opposite value as shall be transmitted and wait until sample point. Check that Node is transmitting error frame. Check that ERR_CAPT signals Bit Error in Control field. Reset the node, Wait until integration is over and check that ERR_CAPT is at its reset value (this is to check that next loops will truly set ERR_CAPT). Repeat with each frame type!
err_capt_ctrl_form_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_CTRL, form error feature test.
1. Detection of form error in control field on r0 bit in CAN 2.0 base frame, on r0 bit in CAN FD base frame, on r1 bit in CAN 2.0 extended frame and r0 in CAN FD extended frame when protocol exception handling is disabled!
2. Value of ERR_CAPT[ERR_POS] when form error shall be detected in control field of CAN frame!
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame (CAN 2.0 Base only, CAN FD Base only, CAN 2.0 Extended, CAN FD extended), send it by Test Node. Wait until Arbitration field of the other node and wait and wait for 13 (Base ID, RTR, IDE) or 14 (Base ID, RTR, IDE, EDL) or 32 bits (Base ID, SRR, IDE, Ext ID, RTR) or 33 (Base ID, SRR, IDE, Ext ID, RTR, EDL) bits based on frame type. Force bus Recessive (reserved bits are dominant) and wait until sample point. Check that Node is transmitting error frame. Check that ERR_CAPT signals Form Error in Control field. Reset the node, Wait until integration is over and check that ERR_CAPT is at its reset value (this is to check that next loops will truly set ERR_CAPT). Repeat with each frame type!
err_capt_data_bit_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_DATA feature test - bit error.
1. Detection of bit error in Data field.
2. Value of ERR_CAPT when bit error is detected in Data field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame, send it by DUT. Wait until data field. Wait for random duration of data field. Force bus to opposite value as transmitted bit wait until sample point. Check that error frame is being transmitted. Check that ERR_CAPT signals bit error in data field!
err_capt_eof_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_EOF. Error code capture in End of frame feature test.
1. Detection of Form error in End of frame field. Value of ERR_CAPT when Form Error should have been detected in EOF field.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame and send it by DUT. Wait until End of frame field of DUT and wait for random number of bits (between 0 and 4). Force bus level dominant and wait until sample point. Check that Error frame is being transmitted and check value of ERR_CAPT.
err_capt_err_frm_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_ERR, Error code capture in Error frame feature test.
1. Value of ERR_CAPT register when Error is detected inside Error frame.
1. Check that ERR_CAPT contains no error (post reset).
2. Set Test node to ACK forbidden mode. Generate random frame and send it by DUT. Wait until error frame is transmitted by DUT. Wait for random amount of bits (0-5) and force bus to Recessive. Wait until sample point and check value of Error code capture in DUT.
err_capt_ovr_frm_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_OVRL, Error code capture in Overload frame feature test.
1. Value of ERR_CAPT register when Error is detected inside Overload frame.
1. Check that ERR_CAPT contains no error (post reset).
2. Generate CAN frame and send it by DUT. Wait until intermission field and force bus low (overload condition). Check that DUT transmitts Overload frame. Wait for random number of bits (0-4) and force bus high for one bit time. Check that DUT is transmitting Error frame. Read Error code capture and check that error occured in Overload frame and it was a bit error!
err_capt_sof_ftest.vhdERR_CAPT[ERR_POS] = ERC_POS_SOF feature test.
1. Detection of form error in SOF bit.
1. Generate CAN frame and send it by DUT. Wait until transmission starts and force bus Recessive. Wait until sample point and check that Error frame is transmitted. Check that ERR_CAPT says that Form Error during SOF was detected!
err_norm_fd_ftest.vhdERR_NORM (Nominal bit-rate) error counter feature test.
1. ERR_NORM is incremented by 1 when error occurs for trasmitter/receiver during nominal bit-rate.
2. ERR_FD is not incremented by 1 when error occurs for transmitter/receiver during nominal bit-rate.
3. ERR_NORM is not incremented by 1 when error occurs for trasmitter/receiver during data bit-rate.
4. ERR_FD is incremented by 1 when error occurs for trasmitter/receiver during data bit-rate.
1. Generate random frame where bit rate is not switched. Insert the frame to DUT. Wait until DUT starts transmission. Wait for random time until DUT transmits Dominant bit. Force the bus-level Recessive for one bit time! This should invoke bit error in DUT. Wait until bus is idle. Check that ERR_NORM in DUT and Test Node incremented by 1. Check that ERR_FD in DUT and Test Node remained the same!
2. Generate random frame where bit rate shall be switched. Wait until data portion of that frame. Wait until Recessive bit is transmitted. Force bus Dominant for 1 bit time! Wait until bus is idle. Check that ERR_FD incremented in DUT and Test node by 1. Check that ERR_NORM remained the same in DUT and Test node.
fault_state_ftest.vhdFAULT_STATE register feature test.
1. Fault confinement state change from Error Active to Error Passive and vice versa.
2. Fault confinement state change from Error Passive to Bus-off.
3. Fault confinement state change from Bus-off to Error active (after reintegration).
1. Turn on Test mode in DUT. Generate random value of Error counters below default value of ERP and set them in DUT. Check Fault state is Error active.
2. Generate RX counter to be between ERP and 255 included and set it in DUT. Check that DUT Fault state is Error Passive.
3. Generate also TX counter to be between 128 and 255 included and set it in DUT. Check that DUT Fault state is still Error Passive. Lower RX Counter below ERP and check DUT is still Error Passive. Lower also TX Counter below ERP and check that now the node became Error active!
4. Increment RX Error counter to more than 255 and check that DUT is Error Passive (should not go to bus-off by RX Counter).
5. Increment TX Counter to go above 255 and check that DUT is now bus off.
6. Issue COMMAND[ERCRST] and wait for 129*11 recessive bits. Check that DUT becomes Error Active.
frame_test_fstc_ftest.vhdFRAME_TEST_W[FSTC] feature test
1. When MODE[TSTM] = 1, FRAME_TEST_W[FSTC] CTU CAN FD flips stuff count bit at position of FRAME_TEST_W[TPRM].
1. Set Test mode in DUT.
2. Generate random CAN FD frame. Transmit it by DUT, record transmitted value of stuff count ignoring stuff bits.
3. Send again the same frame as in previous point, only flip random bit of Stuff count, again record the stuff count. Check that transmitted stuff count has correct bit flipped.
4. Wait until error frame is transmitted (frame is corrupted, TEST_NODE should transmit error frame). Check that TEST_NODE detects CRC error. Wait until frame is transmitted.
frame_test_fcrc_ftest.vhdFRAME_TEST_W[FCRC] feature test
1. When MODE[TSTM] = 1, FRAME_TEST_W[FCRC] CTU CAN FD flips CRC bit at position of FRAME_TEST_W[TPRM].
1. Set Test mode in DUT.
2. Generate random CAN FD frame. Transmit it by DUT, record transmitted value of CRC ignoring stuff bits.
3. Iterate through all bits flipped:
3.1 Send again the same frame as in previous point, only flip bit of CRC, again record the CRC. Check that transmitted CRC has correct bit flipped.
3.2 Wait until error frame is transmitted (frame is corrupted, TEST_NODE should transmit error frame). Check that TEST_NODE detects CRC error. Wait until frame is transmitted.
frame_test_sdlc_ftest.vhdFRAME_TEST_W[SDLC] feature test
1. When MODE[TSTM] = 1, FRAME_TEST_W[SDLC] swaps value of transmitted DLC with value defined in FRAME_TEST_W[SDLC].
1. Set Test mode in DUT.
2. Generate random CAN FD frame. Transmit it by DUT.
3. Send again the same frame as in previous point, only swap DLC, again record the DLC. Check that transmitted DLC has been swapped.
4. Wait until bus is idle.
frame_test_ignore_ftest.vhdFRAME_TEST_W feature test when MODE[TSTM] = 0.
1. When MODE[TSTM] = 0, FRAME_TEST_W does not affect value of transmitted DLC, CRC or Stuff count.
1. Disable test mode in DUT.
2. Generate random CAN FD frame. Set FRAME_TEST_W so that no CRC, Stuff count bit is flipped, no DLC is swapped. Send the can frame by DUT. Record transmitted value of DLC, Stuff count and CRC.
3. Set FRAME_TEST_W so that Stuff count, CRC shall be flipped, and DLC shall be swapped. Keep MODE[TSTM] = 0. Send the same CAN frame as in previous step, and again record transmitted value of DLC, stuff count and CRC. Check that transmitted values match (nothing was flipped).
frame_filters_mask_ftest.vhdFrame filters A,B,C feature test
1. FILTER_*_MASK and FILTER_*_VALUE correctly filter received RX frames.
3. FILTER_CONTROL register correctly filters each combination of Frame format / Identifier type.
1. Loop through all combinations of FILTER_CONTROL on each of the filters. For bit filters loop through different masks (random, checkerboard, etc...)
1.1 Generate Random frame and send it by Test node. Wait until the frame is received by DUT Node.
1.2 Pre-compute the expected result of filtering.
1.3 Check that if filter should match the frame, the frame is stored in RX Buffer of DUT Node. Read the frame from RX Buffer.
glitch_filtering_ftest.vhdGlitch filtering during Bus idle feature test.
1. Device is able to filter out glitches shorter than duration of TSEG1 during Bus idle (it will not interpret them as SOF).
1. Read bit timing config from DUT. Calculate duration of TSEG1. Force CAN RX of DUT low for TSEG1-1 Tim quanta Release CAN TX, and check that DUT did NOT turn receiver.
2. Force CAN RX of DUT low for TSEG1 Time quanta. Release CAN TX and check that DUT did turn receiver.
invalid_frames_ftest.vhdFeature test for frame transmittion with invalid combination of CAN frame configurations.
1. When CAN FD frame with RTR bit is sent, RTR bit is ignored and CAN FD frame without RTR bit set is received!
2. When CAN 2.0 frame with BRS bit is sent, BRS bit is ignored and CAN 2.0 frame without BRS bit is received!
1. Send CAN FD frame with RTR bit set and check it is received without RTR.
2. Send CAN 2.0 frame with BRS bit set and check it is received without BRS.
int_al_ftest.vhdInterrupt DOI feature test.
1. AL Interrupt is set when node looses arbitration.
2. AL Interrupt is not set when it is masked.
3. AL Interrupt causes INT to go high when it is enabled.
4. AL Interrupt causes INT to go low when it is disabled.
5. AL Interrupt is cleared by write to INT_STATUS register.
6. AL Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
7. AL Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Unmask and enable AL Interrupt, disable and mask all other interrupts on DUT.
2. Send frame by DUT and Test Node at the same time, make DUTs identifier higher that Test Nodes identifier (to loose arbitration).
3. Wait until the end of arbitration in DUT. Check that AL Interrupt is set. Check that INT pin is high.
4. Disable AL Interrupt and check INT pin goes low. Enable AL Interrupt and check INT pin goes high.
5. Clear AL Interrupt and check it has been cleared and that INT pin is low.
6. Mask AL Interrupt. Send again two frames as in step 2. Wait until arbitration is over in DUT and check that AL interrupt is now not set.
7. Disable AL Interrupt and check it was disabled. Enable AL Interrupt and check it was enabled.
8. Mask AL Interrupt and check it was masked. Un-mask AL Interrupt and check it was un-masked.
int_be_ftest.vhdInterrupt DOI feature test.
1. BE Interrupt is set when node transmits error frame.
2. BE Interrupt is not set when it is masked.
3. BE Interrupt causes INT to go high when it is enabled.
4. BE Interrupt causes INT to go low when it is disabled.
5. BE Interrupt is cleared by write to INT_STATUS register.
6. BE Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
7. BE Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Unmask and enable BE Interrupt, disable and mask all other interrupts on DUT.
2. Set Test Node to Acknowledge forbidden mode. Set DUT to One shot mode. Send frame by DUT, and wait till ACK field. Check that BE interrupt is not set, wait until error frame and check that BE interrupt is set.
3. Disable BE Interrupt and check INT pin goes low. Enable BE Interrupt and check INT pin goes high.
4. Clear BE Interrupt and check it has been cleared and that INT pin is low.
5. Mask BE Interrupt. Send again frame by DUT. Wait until ACK and check BE interrupt is not set. Wait until error frame and check BE interrupt is still not set.
6. Disable BE Interrupt and check it was disabled. Enable BE Interrupt and check it was enabled.
7. Mask BE Interrupt and check it was masked. Un-mask BE Interrupt and check it was un-masked.
int_do_ftest.vhdInterrupt DOI feature test.
1. DO Interrupt is set when there is an attempt to write to full RX FIFO.
2. DO Interrupt is not set when there is a write to RX FIFO which just fills the last words in the FIFO.
3. DO Interrupt is not set when it is masked.
4. DO Interrupt causes INT to go high when it is enabled.
5. DO Interrupt causes INT to go low when it is disabled.
6. DO Interrupt is cleared by write to INT_STATUS register.
7. DO Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. DO Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Unmask and enable DO Interrupt, disable and mask all other interrupts on DUT.
2. Read RX Buffer size of DUT and send number of RTR frames by Test node which will just fill RX Buffer of Node (no overrun yet). Check DO Interrupt is not set and INT pin is low after each frame.
3. Send one more frame which should cause Data overrun by Test node. Check that DO Interrupt is set. Check that INT pin is high.
4. Disable DO Interrupt and check INT pin goes low. Enable DO Interrupt and check INT pin goes high.
5. Clear DO Interrupt and check it is still set (Data overrun flag is still set).
6. Clear Data overrun flag, clear DO Interrupt. Check DO Interrupt is cleared. Check INT pin goes low.
7. Mask DO Interrupt. Send one frame by Test node. Check that DO Interrupt is not set. Check that INT pin is low. Check that Data overrun flag (DOR) is set (overrun really occurred).
8. Disable DO Interrupt and check it was disabled. Enable DO Interrupt and check it was enabled.
9. Mask DO Interrupt and check it was masked. Un-mask DO Interrupt and check it was un-masked.
int_ewl_ftest.vhdInterrupt EWL feature test.
1. EWL Interrupt is set when TX Error counter is more or equal to EWL.
2. EWL Interrupt is set when RX Error counter more or equal to EWL.
3. EWL Interrupt is not set when either TX or RX Interrupt more or equal to EWL, and EWL Interrupt is masked.
4. EWL Interrupt causes INT to go high when it is enabled.
5. EWL Interrupt causes INT to go low when it is disabled.
6. EWL Interrupt is cleared by write to INT_STATUS register.
7. EWL Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. EWL Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
9. EWL Interrupt is set when RX Error counter becomes less than or equal to EWL. @10. EWL Interrupt is set when TX Error counter becomes less than or equal to EWL.
1. Unmask and enable EWL Interrupt, disable and mask all other interrupts on DUT. Turn on Test mode (to manipulate error counters via CTR_PRES). Leave default value of EWL (96).
2. Set TX Error counter to 96. Check that EWL Interrupt was set. Check that EWL Interrupt is set and INT pin is high.
3. Disable EWL Interrupt and check INT pin goes low. Enable EWL Interrupt and check INT pin goes high.
4. Clear EWL Interrupt and check it not set. Set TX Error counter to 95. Check EWL is set. Clear EWL Interrupt. Check EWL interrupt is cleared.
5. Set RX Error counter to 96. Check that EWL Interrupt was set. Check that INT pin goes high.
6. Disable EWL Interrupt and check INT pin goes low. Enable EWL Interrupt and check INT pin goes high again.
7. Clear EWL Interrupt. Check that EWL Interrupt is not set. Set RX Error counter to 95. Check EWL is set. Check INT pin goes high and Interrupt is set. Clear the interrupt and check.
8. Mask EWL Interrupt. Set TX Error counter to 96. Check that EWL interrupt was not set.
9. Disable EWL Interrupt and check it was disabled. Enable EWL Interrupt and check it was enabled. @10. Mask EWL Interrupt and check it was masked. Un-mask EWL Interrupt and check it was un-masked.
int_fcs_ftest.vhdInterrupt EPI feature test.
1. FCS Interrupt is set when unit turns from Error Active to Error Passive.
2. FCS Interrupt is set when unit turns from Error Passive to Bus-off.
3. FCS Interrupt is set when unit turns from Error Passive to Error Active.
4. FCS Interrupt is set when unit turns from Bus-off to Error Active.
5. FCS Interrupt is not set when it is masked.
6. FCS Interrupt causes INT to go high when it is enabled.
7. FCS Interrupt causes INT to go low when it is disabled.
8. FCS Interrupt is cleared by write to INT_STATUS register.
9. FCS Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR. @10. FCS Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Unmask and enable FCS Interrupt, disable and mask all other interrupts on DUT. Enable test mode (to manipulate with Error counter registers). Keep ERP/EWL values default.
2. Check unit is error active. Set TX Error counter to 128. Check unit is Error passive. Check FCS Interrupt is present. Check that INT pin is high.
3. Disable FCS Interrupt and check INT pin goes low. Enable FCS Interrupt and check INT pin goes high.
4. Clear FCS Interrupt. Check it is cleared.
5. Set TX Error counter to 127. Check unit is Error active. Check that FCS Interrupt is set. Check INT pin is high.
6. Clear EPI Interrupt. Check FCS Interrupt is cleared.
7. Set TX Error counter to 196. Check EPI Interrupt is set. Clear FCS Interrupt.
8. Set TX Error counter to 256. Check that unit is Bus-off. Check that FCS Interrupt is set. Check INT pin is high.
9. Clear FCS Interrupt. Check it is cleared. Check INT pin is low. @10. Issue ERCRST command. Wait till unit turns Error Active. This does not test proper duration after which unit turns Error active (128 ocurrences of 11 consecutive Recessive bits)!!! Meanwhile check that FCS Interrupt is not set.
11. When Unit turns error active, check that FCS Interrupt is set. Check INT pin is high. Clear FCS Interrupt.
12. Mask FCS Interrupt. Set RX Error counter to 128. Check Unit is Error Passive. Check FCS Interrupt is not set. Check INT pin is low.
13. Disable FCS Interrupt and check it was disabled. Enable FCS Interrupt and check it was enabled.
14. Mask FCS Interrupt and check it was masked. Un-mask FCS Interrupt and check it was un-masked.
int_rx_ftest.vhdInterrupt RX feature test.
1. RX Interrupt is set when frame is received OK in EOF field.
2. RX Interrupt causes INT to go high when it is enabled.
3. RX Interrupt causes INT to go low when it is disabled.
4. RX Interrupt is cleared by write to INT_STATUS register.
5. RX Interrupt is not set when Error frame occurs.
6. RX Interrupt is not set when it is masked.
7. RX Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. RX Interrupt mask is manipulated properly by INT_MASk_SET and INT_MASK_CLEAR.
9. RX Interrupt is not set when frame was transmitted.
1. Unmask and enable RX Interrupt, disable and mask all other interrupts on DUT.
2. Set Retransmitt limit to 0 on Test node (One shot-mode). Enable Retransmitt limitations on Test node. Send frame by Test node.
3. Monitor DUT frame, check that in the beginning of EOF, Interrupt is Not set, after EOF it is set.
4. Check that INT pin is high. Disable RX Interrupt and check that INT pin goes low. Enable Interrupt and check it goes high again.
5. Clear RX Interrupt, check it is cleared and INT pin goes low.
6. Send Frame by Test node. Force bus level during ACK to recessive, check that error frame is transmitted by both nodes. Wait till bus is idle, check that no RX Interrupt was set, INT pin is low.
7. Mask RX Interrupt. Send frame by Test node. Check that after frame RX Interrupt was not set. Check that INT pin is low.
8. Unmask RX Interrupt. Send frame by Test node. Check that after frame RX Interrupt was set. Check INT pin is high.
9. Disable RX Interrupt, check that RX interrupt was disabled. @10. Enable RX Interrupt, check that RX interrupt was enabled.
11. Mask RX Interrupt, check RX Interrupt is Masked.
12. Un-Mask RX Interrupt, check RX Interrupt is Un-masked.
13. Send frame by DUT. Check that after frame RX Interrupt is not set and Interrupt pin remains low.
int_tx_ftest.vhdInterrupt TX feature test.
1. TX Interrupt is set when frame is transmitted OK in EOF field. Note: This test is not testing that TX frame is validated in correct moment!
2. TX Interrupt causes INT to go high when it is enabled.
3. TX Interrupt causes INT to go low when it is disabled.
4. TX Interrupt is cleared by write to INT_STATUS register.
5. TX Interrupt is not set when Error frame occurs.
6. TX Interrupt is not set when it is masked.
7. TX Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. TX Interrupt mask is manipulated properly by INT_MASk_SET and INT_MASK_CLEAR.
9. TX Interrupt is not set when frame was transmitted.
1. Unmask and enable TX Interrupt, disable and mask all other interrupts on DUT.
2. Set Retransmitt limit to 0 on DUT (One shot-mode). Enable Retransmitt limitations on DUT. Send frame by DUT.
3. Monitor DUT frame, check that in the beginning of EOF, Interrupt is Not set, after EOF it is set.
4. Check that INT pin is high. Disable TX Interrupt and check that INT pin goes low. Enable Interrupt and check it goes high again.
5. Clear TX Interrupt, check it is cleared and INT pin goes low.
6. Send Frame by DUT. Force bus level during ACK to recessive, check that error frame is transmitted by both nodes. Wait till bus is idle, check that no TX Interrupt was set, INT pin is low.
7. Mask TX Interrupt. Send frame by DUT. Check that after frame TX Interrupt was not set. Check that INT pin is low.
8. Unmask TX Interrupt. Send frame by Test node. Check that after frame TX Interrupt was set. Check INT pin is high.
9. Disable TX Interrupt, check that TX interrupt was disabled. @10. Enable TX Interrupt, check that TX interrupt was enabled.
11. Mask TX Interrupt, check TX Interrupt is Masked.
12. Un-Mask TX Interrupt, check TX Interrupt is Un-masked.
13. Send frame by DUT. Check that after frame TX Interrupt is not set and Interrupt pin remains low.
int_of_ftest.vhdInterrupt DOI feature test.
1. OF Interrupt is set when node transmits overload frame.
2. OF Interrupt is not set when it is masked.
3. OF Interrupt causes INT to go high when it is enabled.
4. OF Interrupt causes INT to go low when it is disabled.
5. OF Interrupt is cleared by write to INT_STATUS register.
6. OF Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
7. OF Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Unmask and enable OF Interrupt, disable and mask all other interrupts on DUT.
2. Send frame by DUT, wait till intermission and check OF interrupt is not set. Force bus to dominant, wait one bit, and check that DUT transmitts overload frame. Check that OF interrupt is set and that INT pin is high
3. Disable OF Interrupt and check INT pin goes low. Enable OF Interrupt and check INT pin goes high.
4. Clear OF Interrupt and check it has been cleared and that INT pin OF low.
5. Mask OF Interrupt. Send again frame by DUT. Wait until Intermission and check that OF is not set. Force bus low, wait bit and check that OF is still not set (interrupt is masked).
6. Disable OF Interrupt and check it was disabled. Enable OF Interrupt and check it was enabled.
7. Mask OF Interrupt and check it was masked. Un-mask OF Interrupt and check it was un-masked.
int_rxf_ftest.vhdInterrupt RX Buffer Full feature test.
1. When INT_MASK[RXFI] = 0, INT_STAT[RXFI] is set when RX Buffer is full.
2. When INT_MASK[RXFI] = 1, INT_STAT[RXFI] is set when RX Buffer is full.
3. When INT_ENA[RXFI] = 1, INT_STAT[RXFI] = 1 causes interrupt output to go high.
4. When INT_ENA[RXFI] = 0, INT_STAT[RXFI] = 1 does not cause interrupt output to go high.
7. RXF Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. RXF Interrupt mask is manipulated properly by INT_MASk_SET and INT_MASK_CLEAR.
1. Fill RX Buffer of DUT Node by transmitting CAN frames from Test Node.
2. Loop through all configurations of INT_MASK[RXFI] and INT_EN[RXFI].
2.1 Check that when Interrupt is masked it is not captured. Check that when Interrupt is Enabled, it causes interrupt to propagate to output
int_bs_ftest.vhdInterrupt RX Buffer Full feature test.
1. When INT_MASK[BS] = 0, INT_STAT[BS] is set when RX Buffer is full.
2. When INT_MASK[BS] = 1, INT_STAT[BS] is set when RX Buffer is full.
3. When INT_ENA[BS] = 1, INT_STAT[BS] = 1 causes interrupt output to go high.
4. When INT_ENA[BS] = 0, INT_STAT[BS] = 1 does not cause interrupt output to go high.
7. RXF Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. RXF Interrupt mask is manipulated properly by INT_MASk_SET and INT_MASK_CLEAR.
1. Loop through all configurations of INT_MASK[BS] and INT_EN[BS].
2.1 Configure interrupt.
2.2 Send frame with bit-rate shift by DUT Node. Wait until it is sent.
2.3 Check that when Interrupt is masked it is not captured. Check that when Interrupt is Enabled, it causes interrupt to propagate to output
int_rxne_ftest.vhdInterrupt RX Buffer Full feature test.
1. When INT_MASK[RXNE] = 0, INT_STAT[RXNE] is set when RX Buffer is full.
2. When INT_MASK[RXNE] = 1, INT_STAT[RXNE] is set when RX Buffer is full.
3. When INT_ENA[RXNE] = 1, INT_STAT[RXNE] = 1 causes interrupt output to go high.
4. When INT_ENA[RXNE] = 0, INT_STAT[RXNE] = 1 does not cause interrupt output to go high.
7. RXF Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. RXF Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Loop through all configurations of INT_MASK[RXNE] and INT_EN[RXNE].
2.1 Configure RXNE Interrupt
2.2 Send a frame by a Test Node and Wait unitl frame is sent.
2.3 Check that when Interrupt is masked it is not captured. Check that when Interrupt is Enabled, it causes interrupt to propagate to output
int_txbhci_ftest.vhdInterrupt RX Buffer Full feature test.
1. When INT_MASK[TXBHCI] = 0, INT_STAT[TXBHCI] is set when RX Buffer is full.
2. When INT_MASK[TXBHCI] = 1, INT_STAT[TXBHCI] is set when RX Buffer is full.
3. When INT_ENA[TXBHCI] = 1, INT_STAT[TXBHCI] = 1 causes interrupt output to go high.
4. When INT_ENA[TXBHCI] = 0, INT_STAT[TXBHCI] = 1 does not cause interrupt output to go high.
7. RXF Interrupt enable is manipulated properly by INT_ENA_SET and INT_ENA_CLEAR.
8. RXF Interrupt mask is manipulated properly by INT_MASK_SET and INT_MASK_CLEAR.
1. Loop through all configurations of INT_MASK[TXBHCI] and INT_EN[TXBHCI].
1.1 Configure TXBHCI Interrupt
1.2 Send a frame by DUT Node
1.3 Check that when Interrupt is masked it is not captured. Check that when Interrupt is Enabled, it causes interrupt to propagate to output
message_filter_ftest.vhdBus Start feature test. Verifies if unit is capable of joining fully, loaded bus.
mode_bus_monitoring_ftest.vhdBus monitoring mode - feature test.
1. No frame is transmitted during Bus monitoring mode.
2. No dominant bit is transmitted in Bus monitoring mode. ACK and Error frames are re-reouted internally and bus remains unchanged!
1. Configure Bus monitoring mode in DUT. Set Self test mode in Test node.
2. Insert frame for transmission to DUT. Check for sufficiently long that it will NOT be transmitted (TXT Buffer goes to failed and no transmission is started).
3. Send CAN frame by Test node. Wait till ACK field.
4. Monitor bus during whole ACK field, check that it is recessive. Wait till bus is idle.
5. Check that frame was received by DUT.
6. Set DUT to NON-ISO FD. Send CAN FD frame by Test node.
7. Wait till error frame transmitted by DUT (should come as CRC is now different).
8. Monitor during whole Error frame transmitted by DUT, that recessive value is sent on the bus by DUT! Wait until bus is idle. Check afterwards that frame was sent OK by Test node.
mode_loopback_ftest.vhdLoopback mode - feature test.
1. Transmitted CAN frame will be also received in Loopback mode when frame is transmitted successfully.
2. Transmitted CAN frame will not be received in Loopback mode when error frame occurs.
3. Transmitted CAN frame will not be received be node itself when Loopback mode was disabled.
1. Configure Loopback mode in DUT.
2. Generate random CAN frame and send it by DUT.
3. Wait until frame is received. Check that DUT has 1 frame in RX Buffer.
4. Read CAN frame from DUT. Check it is the same as transmitted frame. Check that there are 0 frames in RX Buffer of DUT. Read also frame from Test node not to leave it hanging there!
5. Set Test node to Acknowledge forbidden mode. Set DUT to one shot mode.
6. Generate random CAN frame and send it by DUT.
7. Wait until transmission is over. Check that TXT Buffer used for transmi ssion is in TX failed. Check that RX Buffer in DUT has no frame.
8. Disable Loopback mode in DUT. Disable Acknowledge forbidden mode in Test node.
9. Send CAN frame by DUT. Wait until frame is over. @10. Check that RX Buffer of DUT has no CAN frame received. Check that RX Buffer of Test node has frame received.
mode_fd_enable_ftest.vhdFlexible data-rate enable feature test!
1. CAN FD frame (EDL bit recessive) is received OK when Flexible data-rate mode is enabled (as default).
2. Receiving CAN FD frame results in Error frame when Flexible data-rate mode is disabled.
3. Transmitting CAN FD frame when Flexible data-rate mode is disabled results in transmission of CAN 2.0 frame only!
1. Send CAN FD frame by Test node. Wait till frame is sent. Read it from DUT and compare it with send frame.
2. Disable Flexible data-rate mode in DUT. Send CAN frame by Test node. Wait till Control field of DUT. Set both nodes to One-shot mode.
3. Wait till DUT is not in Control field. Check that it is transmitting error frame. Read Error code capture and check that it shows Form Error during Control field. Wait till the frame is transmitted.
4. Set Test node to Acknowledge forbidden mode. Transmitt frame by DUT. Wait till it is sent, read Error code capture and check it is NOT equal to Form error (this is just to achieve change in Error code capture).
5. Unset ACK forbidden in Test node. Send CAN FD frame by DUT.
6. Wait until frame is sent and check that it is received OK in Test node Make sure it CAN 2.0 frame.
mode_fdrf_ftest.vhdFDRF (Filter drop remote frame) feature test.
1. When SETTINGS[FDRF] is set, CTU CAN FD drops filters out RTR frames.
1. When SETTINGS[FDRF] is NOT set, CTU CAN FD accepts RTR frames.
1. Configure frame filters in DUT. Enable SETTINGS[FDRF]. Configure filter A to accept any identifier (mask = all zeroes).4
2. Send RTR frame by Test node. Wait until frame is sent and check that there is no frame received by DUT.
3. Disable SETTINGS[FDRF] in DUT.
4. Send RTR frame by Test node. Wait until frame is sent and check that frame is received by DUT.
mode_pex_ftest.vhdProtocol exception mode test.
1. Functionality of Protocol exception mode (SETTINGS[PEX]) in all four combinations : CAN 2.0, FD Tolerant, FD Enabled, FD Enabled with PEX.
2. Functionality of Protocol exception status (STATUS[PEXS]).
1. First part - CAN 2.0 - no protocol exception.
1.1 Configure SETTINGS[PEX]=0 and MODE[FDE]=0 in DUT. Send CAN FD frame by Test node.
1.2 Wait until sample poing of r0/FDF bit. Check that DUT sends error frame. Wait till end of frame.
1.3 Check that STATUS[PEXS] is not set (no Protocol exception occured).
2. Second part - CAN FD Tolerant
2.1 Configure SETTINGS[PEX]=1 and MODE[FDE]=0 in DUT. Send CAN FD frame by Test node.
2.2 Wait until sample point of r0/FDF bit. Check that DUT is NOT sending error frame. Check that node is idle (in integration state). Wait till end of frame.
2.3 Check that STATUS[PEXS] is set. Clear it via COMMAND[CPEXS] and check that it has been cleared.
3. Third part - CAN FD Enabled - no protocol exception
3.1 Configure SETTINGS[PEX]=0 and MODE[FDE]=1 in DUT. Send CAN FD frame by Test node.
3.2 Wait till sample point of FD in Test node and force CAN RX of DUT to Recessive value.
3.3 Wait till sample point of next bit (r0), release the force, and check that DUT is transmitting Error frame. Wait till end of frame.
3.4 Check that STATUS[PEXS] is not set.
4. Fourth part - CAN FD Enabled - protocol exception
4.1 Configure SETTINGS[PEX]=1 and MODE[FDE]=1 in DUT. Send CAN FD frame by Test node.
4.2 Wait till sample point of FDF in Test node and force CAN RX of DUT to Recessive value.
4.3 Wait till next sample point (R0), release the force, and check that DUT is NOT transmitting Error frame and that it is idle. Wait till end of frame.
4.4 Check that STATUS[PEXS] is set. Clear it via COMMAND[CPEXS] and check that it has been cleared.
mode_rst_ftest.vhdSoft reset feature test.
1. Reset value of all memory registers.
2. MODE[RST] will reset all the memory registers.
1. Write all RW registers to random value. Check they were written.
2. Execute SW reset via MODE[RST].
3. Read all Control registers and check they return their reset value.
4. Check if Test registers are present and test all read write registers in test registers
mode_restr_op_ftest.vhdRestricted operation mode - feature test.
1. When error is detected in ROM mode, Integration is entered and REC, or TEC are not modified!
2. TXT Buffer after issuing Set Ready command in ROM mode, will end up in TX Failed and no frame will be transmitted!
3. When Overload condition is detected by CTU CAN FD in ROM mode (last bit of EOF, first two bits of Intermission), it enters bus integration state.
4. Node is able to receive next frame right after detecting Error in restricted operation mode.
5. Node in restricted operation mode sends ACK bit dominant!
1. Configure ROM mode in DUT. Insert frame to TXT buffer and issue Set ready command. Verify that TXT buffer ends up in TX failed. Check that unit is not transmitter. Repeat several times in a row.
2. Send frame by Test node with stuff bit. Force this stuff bit to opposite value on CAN RX of DUT. Check that DUT goes to integrating. Check that REC/TEC of DUT are not changed.
3. Test node will retransmitt frame from previous step. Wait until ACK field in DUT. Check that DUT is transmitting dominant bit.
4. Wait until EOF field of DUT. Wait randomly for 7,8,9 bits to offset to last bit of EOF or first/second bit of Intermission. Force CAN bus to dominant. Check that DUT will end in integration state (and not in overload state).
mode_rxbam_ftest.vhdRX buffer Automatic / Manual mode feature test.
1. RX Buffer can be read in manual mode. Automatic mode is verified by all other tests, since it is default mode!
1. Configure RX buffer manual mode in DUT. Generate random frame and send it with Test node. Wait until frame is sent.
2. Read the received frame from DUT (by using manual mode), and compare received frame with transmitted frame.
mode_self_test_ftest.vhdSelf test mode - feature test.
1. In Self test mode, transmitted frame is valid even if ACK was recessive!
1. Configures Self Test mode in DUT. Configure ACK forbidden in Test node.
2. Send frame by DUT. Wait till ACK field.
3. Monitor during whole ACK field that frame bus is RECESSIVE.
4. Check that after ACK field, DUT is NOT transmitting Error frame! Wait till bus is idle and check that TXT Buffer in DUT is in TX OK! Check that frame was received by Test node.
mode_test_ftest.vhdTest mode - feature test.
1. EWL register is writable in test mode, not writable when not in test mode.
2. ERP register is writable in test mode, not writable when not in test mode.
3. CTR_PRES register is writable in test mode, not writable when not in test mode.
1. Configure test mode in DUT. Check that EWL and ERP are equal to its reset values!
2. Generate random values and store them to EWL, ERP. Read back and check that both were properly written!
3. Disable test mode in DUT. Generate random values and store them to EWL and ERP. Read back and check that values were NOT written!
4. Enable test mode in DUT. Read each error counter and check it is 0! Set each error counter to random value via CTR_PRES. Read back and check that value was written!
5. Disable test mode in DUT. Set each error counter to random values and check that these values were NOT written (counters equal to previous values).
mode_txbbm_ftest.vhdTXT Buffer backup mode feature test
1. When MODE[TBBM] = 1 and transmission from "original" TXT Buffer is successfull, "backup" TXT Buffer moves to "aborted".
1. Set TXT Buffer backup mode in DUT.
2. Loop for each TXT Buffer:
2.1 Generate random priorities of TXT Buffers and apply them in DUT. Generate random index of TXT Buffer which is for sure "original" TXT Buffer and insert random frame to it.
2.2 Send set ready command to selected original TXT Buffer. Wait until DUT starts transmission, and check that "original" TXT Buffer is in TX in Progress and "backup" TXT Buffer is in "ready" state.
2.3 Wait until transmission ends and bus is idle. Check that "original" TXT Buffer is in "TX OK" state and "backup" TXT buffer ended in "Aborted" state.
mode_txbbm_2_ftest.vhdTXT Buffer backup mode 2 feature test.
1. When MODE[TBBM] = 1, and transmission from "original" TXT Buffer fails, "backup" TXT Buffer ends up in "aborted".
1. Set TXT Buffer backup mode in DUT. Set Test node to ACK forbidden mode. Set DUT retransmit limit threshold to 0 (One shot mode).
2. Loop 10 times:
2.1 Generate random priorities of TXT Buffers and apply them in DUT. Generate random index of TXT Buffer which is for sure "original" TXT Buffer and insert random frame to it.
2.2 Send set ready command to selected original TXT Buffer. Wait until DUT starts transmission, and check that "original" TXT Buffer is in TX in Progress and "backup" TXT Buffer is in "ready" state.
2.3 Wait until transmission ends and bus is idle. Check that "original" TXT Buffer is in "TX Failed" state and "backup" TXT buffer ended in "Aborted" state.
mode_txbbm_3_ftest.vhdTXT Buffer backup mode 3 feature test.
1. When MODE[TBBM] = 1, and parity error occurs during TXT Buffer validation of "original" TXT Buffer, "backup" buffer is used for transmission.
1. Set TXT Buffer backup mode and Test mode in DUT.
2. Loop 5 times:
2.1 Generate random priorities of TXT Buffers and apply them in DUT. Generate random index of TXT Buffer which is for sure "original" TXT Buffer and insert random frame to it.
2.2 Enable test access to buffer RAMs. Generate random word index (within first 4 words of TXT Buffer), and flip such bit. Disable test access.
2.3 Send set ready command to selected original TXT Buffer. Wait until DUT starts transmission, and check that "original" TXT Buffer is in "Parity error" and "backup" TXT Buffer is in "TX in progress" state. Check that STATUS[TXPE] is set in DUT.
2.4 Wait until transmission ends and bus is idle. Check that "original" TXT Buffer is in "Parity Error" state and "backup" TXT buffer ended in "TX OK" state. Issue Set Empty to original TXT Buffer, and check it moves to Empty!
mode_txbbm_4_ftest.vhdTXT Buffer backup mode 4 feature test.
1. When MODE[TBBM] = 1, and parity error occurs during frame transmission from "original" TXT Buffer, "backup" buffer is used for transmission.
1. Set TXT Buffer backup mode and Test mode in DUT.
2. Loop 2 times for each TXT Buffer:
2.1 Generate random priorities of TXT Buffers and apply them in DUT. Generate random index of TXT Buffer which is for sure "original" TXT Buffer and insert random frame to it.
2.2 Enable test access to buffer RAMs. Generate random word index (within data bytesof TXT Buffer), and flip such bit. Disable test access.
2.2 Send Set ready command to selected original TXT Buffer. Wait until DUT starts transmission, and check that original TXT Buffer is in "TX in progress". Wait until error frame is transmitted. Check that "original" TXT Buffer ended in "Parity Error". Wait until "backup" TXT Buffer becomes "TX in progress".
2.3 Wait until transmission ends and bus is idle. Check that "original" TXT Buffer is in "Parity Error" state and "backup" TXT buffer ended in "TX OK" state.
mode_txbbm_5_ftest.vhdTXT Buffer backup mode 5 feature test.
1. When MODE[TBBM] = 1, and parity error occurs in "original" TXT Buffer and also in "Backup" TXT Buffer, STATUS[TXDPE] is set.
2. STATUS[TXDPE] is cleared by writing COMMAND[CTXDPE] = 1.
1. Set TXT Buffer backup mode and Test mode in DUT.
2. Loop 10 times:
2.1 Generate random priorities of TXT Buffers and apply them in DUT. Generate random index of TXT Buffer which is for sure "original" TXT Buffer and insert random frame to it.
2.2 Enable test access to buffer RAMs. Generate random word index (within first 4 words), and flip such bit in "original" and "backup" TXT Buffers. Disable test access.
2.3 Send Set ready command to selected original TXT Buffer. Wait for some time, and check that both TXT Buffers ended up in "parity error" state.
2.4 Check that STATUS[TXPE] and STATUS[TXDPE] are set. Issue COMMAND[CTXPE] and COMAMND[TXDPE] and check that STATUS[TXPE] and STATUS[TXDPE] has been cleared.
mode_frame_filters_ftest.vhdFrame filters mode feature test.
1. When in Frame filters mode, RX frame which does not pass frame filters will not be received!
2. When in Frame filters mode, RX frame which does pass frame filters will be received.
3. When not in frame filters mode, RX frame which does not pass frame filters will be received.
1. Configure frame filters mode in DUT. Configure filter A to receive only can frames with Odd base IDs (lowest bit = 1). Configure all other filters not to accept any frames (disable all frame/identifier type combinations).
2. Generate random CAN frame and send by Test node. Wait till frame is received. If frame should be received (LSB of ID=1), check it is received. If it should not be received, check it is not received!
3. Disable frame filters mode in DUT. Send CAN frame with LSB of ID=0, (should not be received according to frame filters settings).
4. Wait till frame passes and check it is received in Test node!
no_sof_tx_ftest.vhdNo Start of Frame feature test - frame transmission!
1. When a dominant bit is sampled in Bus idle and a frame is available for transmission, its transmission is started without transmitting SOF bit.
2. When CTU CAN FD joins transmission without transmitting SOF bit, it accounts SOF bit as transmitted dominant bit in number of equal conse cutive bits.
1. Configure both Nodes to one-shot mode.
2. Insert CAN frames which have first 5 bits of identifier equal to zero to both nodes. Check both nodes are Idle. Wait till Sample point in DUT.
3. Send Set ready command to both nodes. Wait until DUT is not in Bus idle state. Check it is transmitting Base Identifier (NOT SOF)!
4. Wait until sample point 5 times (5th bit of idetifier) in DUT. Check DUT is transmitting Recessive bit (Stuff bit).
5. Wait until frame is over. Check frame was received OK, read it from receiving node and verify it was received OK!
one_shot_ftest.vhdOne shot mode feature test (Retransmitt limit = 0).
1. One shot mode - Retransmitt limit enabled and set to 0. Verifies there is only one atempt to transmitt a frame in one shot mode
2. When One shot mode is not set (retransmit limit = 0, but disabled), core does not stop re-transmitting after retransmitt limit number of retransmissions was reached (retransmitts indefinitely).
3. When transmission fails as result of Error frame, device in One shot mode does not transmitt anymore!
4. When transmission fails as result of Arbitration loss, device in One shot mode does not transmitt anymore!
1. Set retransmitt limit to 0 in DUT. Enable retransmitt limitations. Set Acknowledge forbidden mode in Test node (to produce ACK errors). Turn on Test mode in DUT (to manipulate error counters).
2. Generate frame and start sending the frame by DUT. Wait until error frame occurs and transmission is over.
3. Check transmission failed and transmitting TXT Buffer is "TX Error".
4. Disable retransmitt limitions in DUT. Start sending a frame by DUT. Wait until error frame and check that transmitting TXT Buffer is "Ready" again (hitting current retransmitt limit did not cause stopping retransmissions when retransmitt limit is disabled).
5. Abort transmission by DUT. Wait until transmission was aborted.
6. Insert frames for transmission to DUT and Test node simultaneously to invoke arbitration. ID of frame in DUT is higher than the one in Test node (to loose arbitration). Wait until node 1 is in Control field of a frame. Check that DUT is receiver (arbitration was really lost) and TXT Buffer in DUT ended up in "TX Error" state.
overload_ftest.vhdOverload frame feature test
1. Overload frame is transmitted as a result of sampling dominant during first and second bit of intermission.
2. Overload frame is transmitted as a result of sampling dominant during last bit of end of frame by receiver.
3. Error frame is transmitted as a result of sampling dominant bit during last bit of end of frame by transmitter.
1. Send frame by DUT. Wait until first bit of intermission in DUT and force bus level Dominant. Check that DUT transmitts Overload frame. Wait until the end of overload frame in DUT.
2. Check that we are in "Intermission field now". Wait until second bit of Intermission and force bus low. Wait until sample point and check that Node has transmitted Overload frame. Wait until the end of Overload frame. Wait until bus is idle for both Nodes.
3. Send frame by DUT. Wait until last bit of End of Frame field of DUT. Force bus low. Check that DUT reacts with Error frame. Check that Test node reacts with Overload frame.
rec_saturation_ftest.vhdREC (RX Error counter) saturation feature test.
1. REC is saturated at its width (9 bits) and further errors in receiver will not cause its overflow.
1. Set Test mode in DUT. Disable CAN FD support in DUT and Set REC to 510 in DUT. Check that REC is 510.
2. Send CAN FD frame by Test node few times. Wait until CAN frame is sent andcheck that REC in DUT is 511 after first frame (was incremented by 1) and also after each next attempt to transmitt a frame.
retr_limit_ftest.vhdRetransmitt limit feature test
1. When retransmitt limit is disabled, core does not stop re-transmitting after retransmitt limit number of retransmissions was reached (retransmitts indefinitely).
2. When retransmitt limit is set to 15 (maximum) and retransmitt limitation is enabled, core retransmitts 15 times. After 15 retransmissions, core does not retransmitt anymore.
3. Core retransmitts 'retransmitt limit' times when 'retransmitt limit' is enabled.
4. When transmission fails as result of Error frame, this counts as re-transmission and retransmitt counter is incremented.
5. When transmission fails as result of Arbitration loss, this counts as re-transmission and retransmitt counter is incremented.
1. Set retransmitt limit to 1 in DUT. Enable retransmitt limitations. Set Acknowledge forbidden mode in Test node (to produce ACK errors). Turn on Test mode in DUT (to manipulate error counters).
2. Generate frame and start sending the frame by DUT. Wait until error frame occurs and transmission is over two times.
3. Check transmission failed and transmitting TXT Buffer is "TX Error".
4. Disable retransmitt limitions in DUT. Start sending a frame by DUT. Wait until error frame and check that transmitting TXT Buffer is "Ready" again (hitting current retransmitt limit did not cause stopping retransmissions when retransmitt limit is disabled).
5. Abort transmission by DUT. Wait until transmission was aborted.
6. Generate random retransmitt limit (between 1 and 14). Enable retransmitt limitation in DUT. Erase TX error counter in DUT. Erase TX Error counter.
7. Send frame by DUT. Monitor that after initial transmission and after each next re-transmission sending TXT Buffer in DUT is "Ready". After 'retransmitt limit' retransmissions check that sending TXT Buffer in DUT is in state "TX Error".
8. Check that value of TX Error counter in DUT is equal to: (retr_lim + 1) * 8.
9. Set retransmitt limit to 15 and Enable Retransmissions in DUT. Start Sending frame by DUT. @10. Monitor that after initial transmission and after each next re-transmission sending TXT Buffer in DUT is "Ready". After 'retransmitt limit' retransmissions check that sending TXT Buffer in DUT is in state "TX Error".
11. Set retransmitt limit to 0 in DUT. Insert frames for transmission to DUT and Test node simultaneously to invoke arbitration. ID of frame in DUT is higher than the one in Test node (to loose arbitration). Wait until node 1 is in Control field of a frame. Check that DUT is receiver (arbitration was really lost) and TXT Buffer in DUT ended up in "TX Error" state.
retr_limit_2_ftest.vhdRetransmitt limit feature test 2 (cornercases).
1. When TXT Buffer from which core transmits is changed between two consecutive transmissions, retransmitt counter is cleared!
2. When there are multiple errors during single frame, retransmitt counter is incremented only by 1!
3. When there is Arbitration lost and Error frame during single frame, retransmitt counter is incremented only by 1!
4. When unit is a receiver without attempt to transmitt a frame (TXT Buffer is ready, unit is Error passive and dominant bit is detected during Suspend field), if an error occurs during such a frame, retransmitt counter is not incremented!
1. Configure retransmitt limit in DUT, enable retransmitt limitation. Enable Test Mode in DUT to be able manipulate with Error counters. Configure Test node to Acknowledge Forbidden Mode to invoke transmission of Error frames during test. Configure TXT Buffer 1 in DUT with priority 1, TXT Buffer 2 in DUT with priority 2.
2. Send frame from TXT Buffer 1 by DUT. After 2 transmit attempts, insert frame to TXT Buffer 2 and mark TXT Buffer 2 as ready! Check that retransmitt counter is equal to 2!
3. Wait until transmission starts by DUT. Check that TXT Buffer 2 was selected for transmission. Check that retransmitt limit is 0 now (because TXT Buffer used is changed).
4. Check that 'retransmit limit - 1' times TXT Buffer 2 ends up in TX Ready after transmission of an Error frame. Check that after 'retransmit limit' retransmissions, TXT Buffer 2 ends in TX Error. This verifies that previous retransmissions were not counted in transmission from TXT Buffer 2. Meanwhile, issue Abort command to TXT Buffer 1, so that we don't continue transmissions from TXT Buffer 1 after retransmitt limit was reached on TXT Buffer 2.
5. Check that Retransmitt counter is 0 now!
6. Clear TX Error counter in DUT. Check it is 0. Send frame from TXT Buffer 1. Send frame from TXT Buffer by Test node.
7. Wait until error frame (due to ACF in Test node), corrupt bus level for duration of 6 bits, force bus level to be recessive.
8. Wait until transmission is over. Check that TXT Buffer 1 is in TX Ready, Retransmitt counter is 1. Check that TX Error counter is (6+1)*8 = 56 (One increment as original missing ACK, 6 increments due to six errors in Error frame). Wait until TXT Buffer 1 ends up in TX Error state. Check Retransmitt counter is 0. Wait Until bus is idle.
9. Insert frame with CAN ID = 10 to DUT, CAN ID = 9 to Test node. Send frame by both Nodes! Wait until Arbitration field. Check that both Nodes are transmitters. Wait until Control field. Check that DUT is receiver now and Test node is still transmitter. Check that Retransmitt counter in Node 1 is now 1. @10. Wait until ACK field. Force ACK field to be low during whole duration of ACK field. Wait until change in Protocol control, check that Error frame is being transmitted. Wait until Intermission field, check that Retransmitt counter in DUT is still equal to 1. Wait until TXT Buffer ends up in TX Error (after some retransmissions). Check that retransmitt counter is now 0 in DUT. Wait until bus is idle.
retr_limit_3_ftest.vhdRetransmitt limit feature test 3 (cornercases).
1. When unit is a receiver without attempt to transmitt a frame (TXT Buffer is ready, unit is Error passive and dominant bit is detected during Suspend field), if an error occurs during such a frame, retransmitt counter is not incremented!
1. Configure retransmitt limit in DUT, enable retransmitt limitation. Enable Test Mode in DUT to be able manipulate with Error counters. Configure Test node to Acknowledge Forbidden Mode to invoke transmission of Error frames during test.
2. Set DUT TX Error counter to 150. Check that DUT is Error Passive. Send frame by DUT. Wait until Error frame occurs. Check that Retransmit counter in DUT is now 1. Insert frame to Test node. Wait until Suspend transmission in DUT.
3. Wait until Arbitration field in DUT, check that DUT is now receiver. Wait until ACK field, force the bus for the whole duration of ACK field to Recessive. Check that Error frame is transmitted by DUT. Wait until bus is Idle. Check that Retransmitt counter is stil1 1.
rx_buf_empty_read_ftest.vhdRX Buffer empty - read feature test
1. Verifies that when reading from empty RX Buffer, RX pointer is not incremented!
1. Read pointers from RX Buffer, check pointers are 0 (DUT is post reset).
2. Try to read CAN frame from RX Buffer. This should generate at least 4 reads from RX DATA register.
3. Read pointers from RX Buffer, check pointers are still 0.
rx_counter_ftest.vhdRX Traffic counter feature test implementation.
1. RX Counter is incremented after each succesfully received frame.
2. RX Counter is not incremented when error frame is transmitted.
3. TX Counter is not incremented when frame is succesfully received.
4. RX Counter is cleared by COMMAND[RXFRCRST].
5. RX Counter is NOT cleared by COMMAND[TXFRCRST].
6. RX Counter is incremented when frame is transmitted in Loopback mode.
1. Read TX Counter from DUT. Set One-shot mode (no retransmission) in DUT.
2. Send frame from Test node. Wait until EOF field. Read RX counter from DUT and check it did not change yet.
3. Wait until the end of EOF. Read RX counter and check it was incremented. Read TX counter and check it is not incremented!
4. Send Frame from Test node. Wait till ACK field. Corrupt ACK field to be recessive. Wait till Test node is not in ACK field anymore. Check Test node is transmitting Error frame.
5. Wait until DUT also starts transmitting error frame. Wait until bus is idle, check that RX Counter was not incremented in DUT.
6. Send random amount of frames by Test node and wait until they are sent.
7. Check that RX counter was incremented by N in DUT!
8. Issue COMMAND[TXFRCRST] and check RX counter was NOT cleared in DUT.
9. Issue COMMAND[RXFRCRST] and check RX counter was cleared in DUT. @10. Read all frames from RX buffer in DUT.
11. Set Loopback mode in DUT. Send frame by DUT and wait until it is sent. Check there is a frame received in RX buffer. Check that RX frame counter was incremented.
rx_settings_rtsop_ftest.vhdRX Settings Timestamp options feature test.
1. RX frame timestamp in sample point of SOF.
2. RX frame timestamp in sample point of EOF.
3. RX frame timestamp when receiving CAN frame without SOF.
1. Configure timestamp to be captured in SOF. Set Loopback mode in DUT (so that we are sure that SOF is transmitted). Generate CAN frame and issue it for transmission by DUT. Wait until DUT turns transmitter and wait till Sample point. Capture timestamp and wait till frame is sent Check that RX frame timestamp is equal to captured timestamp!
2. Generate CAN frame for transmission and send it by Test node. Poll until DUT becomes receiver (this should be right after sample point of Dominant bit in Idle which is interpreted as SOF) and capture timestamp. Wait until CAN frame is sent and check that RX frame timestamp is equal to captured timestamp.
3. Configure timestamp to be captured at EOF. Generate CAN frame and send it by Test node. Wait until EOF and then until EOF ends. At EOF end, capture timestamp and wait till bus is idle! Compare captured timestamp with RX frame timestamp.
rx_status_ftest.vhdRX Buffer status feature test implementation.
1. RX Buffer size is read and buffer is cleared.
2. Free memory, buffer status and message count is checked.
3. Random frames are sent on the bus by Test Node and recieved by DUT.
4. After each frame amount of remaining memory is checked towards expected value.
5. When buffer is filled Data overrun flag is checked and cleared.
6. After clearing Overrun flag, it is checked it was really cleared.
7. Read whole RX Buffer
rx_status_mof_ftest.vhdRX Buffer status MOF (middle of frame) feature test implementation.
1. Repeat 10 loops of:
1.1 Check that RX_STATUS[MOF] is 0 in DUT (no frame stored in RX Buffer). Send frame by Test node, wait till it is send, and check RX_STATUS[MOF] is still zero.
1.2 Read one word from RX_DATA, and check that RX_STATUS[MOF] is set. Read rest of the frame, word by word and check that RX_STATUS[MOF] is set. Check that after last read, it is not set anymore.
rx_status_rxfrc_ftest.vhdRX Buffer status (RX Frame count) feature test implementation.
1. RX Buffer size is read and buffer is cleared.
2. Free memory, buffer status and message count is checked.
3. Send minimal sized frame, and check that with each frame sent, RX Buffer frame count is incremented by 1.
scan_mode_ftest.vhdScan mode feature tests
1. Checks that scan mode of DUT can be enabled, disabled. Does not truly verify scan mode operation (gating resets, ungating clocks)
1. Enable and disable DUT scan mode.
settings_tbfbo_ftest.vhdTX Buffer bus of behavior setting feature test.
1. When SETTINGS[TBFBO]=1, then all TXT Buffers will go to TX Failed when node is going to bus-off.
2. When SETTINGS[TBFBO]=0, then transmitting TXT Buffer will go to Ready and after re-integration, node will transmitt again!
1. Configure SETTINGS[TBFBO]=1 in DUT. Set TEC of DUT to 254. Send frame by DUT.
2. Wait until first bit of EOF and force CAN RX of DUT to Dominant. This creates error condition, and DUT will transmitt error frame. Wait till error frame is over. Check that DUT is bus-off. Check that all its TXT Buffers are in TX Failed state.
3. Turn off DUT, configure SETTINGS[TBFBO]=1 in DUT, then turn it on again. Wait till integration is over. Issue COMMAND[ERCRST] (in advance, shall be captured by DUT) to DUT. Set TEC of DUT to 254.
4. Send frame by DUT. Wait till first bit of EOF, force CAN RX of DUT to Dominant value. Wait till error frame is over, check that DUT is bus-off. Check that TX Buffer that was used for transmission is in TX ready.
5. Poll on fault confinement state of DUT until in comes out of bus-off. When it happends, check that Node becomes transmitter on TXT Buffer used for transmission before went to "TX in progress" state.
settings_nisofd_ftest.vhd
1. When SETTINGS[NISOFD]=1, then Stuff count field is not transmitted in the CAN FD Frame.
1. Configure SETTINGS[NISOFD]=1 in DUT. Send CAN FD frame by DUT.
2. Wait until the data field in DUT. Wait until not in the data field. Check that DUT is NOT in CRC field.
3. Set SETTINGS[NISOFD]=0 in DUT. Send CAN FD frame by DUT.
4. Wait until the data field in DUT. Wait until not in the data field. Check that DUT is NOT in Stuff count field.
single_bus_node_ftest.vhdSingle bus node test
1. Node which is single on bus (other node is not transmitting, acking, sending error frames), will turn error passive and not bus-off when trying to transmitt a frame!
1. Disable Test node, disable retransmitt limit in DUT.
2. Transmitt frame by DUT.
3. Wait until error frame starts and check that error counter is incremented by 8. Repeat until node turns error passive!
4. Wait for several times that node transmitts a frame and check that after each, TX Error counter is not incremented.
ssp_cfg_ftest.vhdSSP_CFG register feature test.
1. When SSP_CFG[SSP_SRC] = SSP_OFFSET, position of secondary sampling point will be given only by SSP_OFFSET.
2. When SSP_CFG[SSP_SRC] = SSP_SRC_NO_SSP, there will be no SSP and regular sample point will be used to detect bit error by bit-error detector!
3. When SSP_CFG[SSP_SRC] = SSP_SRC_MEAS_N_OFFSET, position of secondary sampling point will be given as SSP_OFFSET + TRV_DELAY.
4. Position of Secondary sampling point is saturated to 255.
5. Transmitter detecting bit error in SSP will transmitt error frame at nearest regular sample point, not earlier!
1. Generate random TRV_DELAY between 0 and 125. Configure it in TB as delay between CAN TX and CAN RX.
2. Generate random SSP_CFG[SSP_SRC]. If it is offset only, generate SSP_OFFSET which is higher than TRV_DELAY. If it is SSP_SRC_MEAS_N_OFFSET, set SSP_OFFSET to random value between 0 and 255. Saturate calculated value of SSP_SRC at 255. If it is SSP_SRC_NO_SSP, calculate SSP position from regular data-bit rate.
3. Generate random CAN FD frame with bit-rate shift. Wait until bit-rate is shifted and wait for random number of bits (but do not exceed length of data phase). Wait until edge on CAN TX or CAN RX. Store transmitted value on CAN TX after the edge. Wait for expected position of Secondary sample point - 3 clock cycles.
4. Now we are 3 clock cycles before Secondary sampling point. Force bus to opposite value than was sent.
5. Wait for one clock cycle and if SSP_CFG[SSP_SRC] = SSP_SRC_NO_SSP, error frame is being transmitted (regular sample point should be used to detect bit errors). If SSP_CFG[SSP_SRC] /= SSP_SRC_NO_SSP check that Error frame is not transmitted and wait until nearest Sample point. Check that after this sample point, error frame is transmitted. Wait until bus is idle in both nodes.
ssp_4_bits_flying_ftest.vhdSSP feature test with four bits on the fly (maximum guaranteed by datasheet).
1. DUT operating as transmitter is able to compensate up to 4 bits on the fly (SSP position is four bits later)
1. Configure hard-coded Nominal and Data bit-rat in which Data bit-rate is 10 times faster than Nominal bit-rate. This is to have delay in Nominal bit-rate fairly negligible in both DUT and TEST Nodes.
2. Configure TRV_DELAY to be 4 data bit times.
3. Configure DUTs SSP to be in Measured + offset with offset being half of data bit time!
4. Enable DUT and wait till it becomes error active.
5. Send FD frame by DUT and verify it will be succesfully received by Test node.
status_eft_ftest.vhdSTATUS[EFT] feature test.
1. STATUS[EFT] is is set when Error frame is transmitted during Error active and Error passive.
2. STATUS[EFT] is not set when Error frame is not being transmitted.
1. Set Test node to ACF mode. Enable test mode in DUT. Send frame by DUT. Randomize if DUT will be error active or error passive. Monitor STATUS[EFT] and check that it is not set during whole duration of the frame. Wait till ACK field.
2. Wait till DUT is NOT is ACK field anymore. Now since ACK was recessive, DUT should be transmitting error frame! Monitor STATUS[EFT] and check it is set until DUT gets to Intermission. Check it is not set after Intermission has started! Monitor STATUS[EFT] and check it is not set during whole time until unit is Bus Idle!
status_ewl_ftest.vhdSTATUS[EWL] feature test.
1. When RX Error counter (REC) is higher than EWL, then STAT[EWL] is set.
2. When TX Error counter (TEC) is higher than EWL, then STAT[EWL] is set.
3. When both REC and TEC are lower than EWL, STAT[EWL] is not set.
1. Set DUT in test mode. Generate random EWL and configure it. Generate random REC and TEC and set them in DUT. Pre-calculate if STAT[EWL] shall be set and check it.
status_idle_ftest.vhdSTATUS[IDLE] feature test.
1. STATUS[IDLE] is set when bus is idle (no frame is in progress).
2. STATUS[IDLE] is not set when unit is transmitting or receiving a frame.
3. STATUS[IDLE] is set when unit is bus-off!
1. Check that STATUS[IDLE] is set. Transmitt CAN frame by DUT wait till SOF and check that STATUS[IDLE] is not set. Wait until the end of frame and check that after the end of Intermission STATUS[IDLE] is set again!
2. Transmitt CAN frame by Test node, wait till arbitration field in DUT and check that STATUS[IDLE] is not set. Wait until the end of frame and check that STATUS[IDLE] is set after the end of intermission.
3. Set DUT to Bus-off by the means of modifying TX Error counter and check it is bus-off. Check that STATUS[IDLE] is set.
status_rxne_ftest.vhdSTATUS[RXNE] feature test.
1. When no frame is stored in RX Buffer, STATUS[RXNE] is not set.
2. When one or more frames is stored in RX Buffer, STATUS[RXNE] is set.
3. STATUS[RXNE] is not set when last word of last frame in RX Buffer is read.
1. Read STATUS[RXNE] of DUT and check it is not set. Send random amount of CAN frames by Test node and wait until they are received. Check that after each one, STATUS[RXNE] is set.
2. Read out frame by frame and check that STATUS[RXNE] is still set. Read all frames but last one.
3. Read out last frame word by word and check that STATUS[RXNE] is still set and STATUS[RXNE] is not set after reading out last word.
status_rxs_ftest.vhdSTATUS[RXS] feature test.
1. STATUS[RXS] is set when unit is receiver.
2. STATUS[RXS] is not set when unit is transmitter.
1. Send frame by Test node. Wait until SOF starts and check that STATUS[RXS] is not set till SOF in DUT. From SOF further monitor STATUS[RXS] and check it set until the end of Intermission. Check that after the end of intermission, STATUS[RXS] is not set anymore.
2. Send frame by DUT. Monitor STATUS[RXS] of DUT until Intermission and check STATUS[RXS] is not set. Monitor until the end of intermission and check STATUS[RXS] is not set.
status_txnf_ftest.vhdSTATUS[TXNF] feature test.
1. When no TXT Buffer is in Empty state, STATUS[TXNF] is not set.
2. When at least on TXT Buffer is in Empty state STATUS[TXNF] is set.
1. Set BMM mode in DUT. Check that STATUS[TXNF] is set (all TXT Buffers should be empty).
2. Issue Set ready consecutively to all TXT Buffers. Check that STATUS[TXNF] is set before last buffer. Check that after last buffer STATUS[TXNF] is not set.
3. Check that all TXT Buffers are Failed now. Move always single buffer to empty and check that STATUS[TXNF] is set. Move this buffer to Failed again and check that STATUS[TXNF] is not set. Repeat with each TXT Buffer.
status_txs_ftest.vhdSTATUS[TXS] feature test.
1. STATUS[TXS] is set when unit is transmitter.
2. STATUS[TXS] is not set when unit is receiver.
1. Send frame by DUT. Wait until SOF starts and check that STATUS[TXS] is not set till SOF. From SOF further monitor STATUS[TXS] and check it set until the end of Intermission. Check that after the end of intermission, STATUS[TXS] is not set anymore.
2. Send frame by Test node. Monitor STATUS[TXS] of DUT until Intermission and check STATUS[TXS] is not set. Monitor until the end of intermission and check STATUS[TXS] is not set.
status_rxpe_ftest.vhdSTATUS[RXPE] feature test.
1. STATUS[RXPE] is set when there is a parity error inserted in RX Buffer RAM and SETTINGS[PCHKE] = 1.
2. STATUS[RXPE] is cleared by COMMAND[CRXPE].
3. STATUS[RXPE] is not set when SETTINGS[PCHKE] = 0, and there is parity error inserted in RX Buffer RAM.
1. Set DUT to test mode.
2. Loop 10 times.
2.1 Randomly enable/disable parity enable!
2.2 Generate random CAN Frame, and send it by Test node. Wait until frame is received by DUT.
2.3 Read CAN frame from DUT via Test registers. Flip random bit in the CAN frame, and store it right back. This should corrupt parity bit value and cause parity error.
2.4 Read CAN frame via RX_DATA register. Check that STATUS[RXPE]=1.
2.5 Write COMMAND[CRXPE]=1, then read STATUS register and check that STATUS[RXPE]=0.
status_txpe_ftest.vhdSTATUS[TXPE] feature test.
1. STATUS[TXPE] is set when there is a parity error detected in TXT Buffer RAM and SETTINGS[PCHKE] = 1.
2. STATUS[TXPE] is not set when there is a parity error detected in TXT Buffer and SETTINGS[PCHKE] = 0.
2. STATUS[TXPE] is cleared by COMMAND[CTXPE].
1. Set DUT to test mode.
2. Loop 4 times for each TXT Buffer:
2.1 Generate Random CAN frame and set random value of SETTINGS[PCHKE] = 1.
2.2 Insert the CAN frame for transmission into a TXT Buffer.
2.3 Generate random bit-flip in FRAME_FORMAT_W (loop 1), IDENTIFIER_W (loop 2), TIMESTAMP_L_W (loop 3), TIMESTAMP_U_W (loop 4) and corrupt this word in the TXT Buffer memory via test interface.
2.4 Send Set Ready command to this TXT Buffer. Wait for some time, and check that when SETTINGS[PCHKE] = 1, TXT Buffer ended up in "Parity Error" state. When SETTINGS[PCHKE] = 0, check that DUT transmit the frame from TXT Buffer.
2.5 Read STATUS[TXPE] and check it is 1 when SETTINGS[PCHKE]=1. Write COMMAND[CTXPE], and check that STATUS[TXPE] = 0.
2.6 Insert the frame again, send Set Ready command.
2.7 Wait until frame is transmitted. Read frame from Test Node and check it is equal to transmitted frame.
3. Loop 10 times for each TX Buffer:
3.1 Generate random CAN frame and make sure it has some data words. Insert it into random TXT Buffer. Set random value of SETTINGS[PCHKE] = 1.
3.2 Flip random bit within the data word, and write this flipped bit into TXT Buffer via test access to bypass parity encoding.
3.3 Send Set Ready command to TXT Buffer, wait until frame transmission starts.
3.4 When SETTINGS[PCHKE]=1, wait until error frame, check its transmission from status bit, then check that TXT Buffer ended up in Parity Error state. When SETTINGS[PCHKE]=0, check that frame is transmitted sucesfully.
3.5 Insert CAN frame into the TXT Buffer again.
3.6 Send Set Ready command. Wait until CAN frame is transmitted. Read it from Test Node and check that it matches original CAN frame.
stuff_in_data_ftest.vhdStuff bit on last bit of Data field.
1. When stuff bit is inserted after last bit of Data field, no extra stuff bit will be inserted during first bit of Stuff count (with fixed stuffing). Wait until frame is sent. Read frame and check it is received succesfully!
1. Generate CAN frame which has last 5 bits of data field dominant! Send it by DUT. Wait until frame is sent and read it from Test node. Check that frames are equal. Note: The check is only visual so far...
trv_delay_ftest.vhdTransceiver delay measurement feature test.
1. Transceiver delay measurement in its range (2 - 127).
2. Shadowing of TRV_DELAY register (register updated only at the end of measurement).
3. TRV_DELAY measuremenr does not overflow when measuring delay longer than 127 clock cycles.
1. Configure SSP Offset to 7 + TRV_DELAY and SSP source to use Measured value + offset in DUT. Configure bit-rate to 250 Kbit/s in Nominal bit-rate. This-way bit-error detection will not get confused on high TRV Delays!
2. Configure delay to 1 ns in TB. Run CAN FD frame and verify that measured delay is correct!
3. Configure delay to 1255 ns in TB. Run CAN FD frame and verify that measured delay is 127.
4. Configure Transmitter delay to 130. Run CAN FD frame and verify that measured value is 127 (value has not overflown!).
5. Configure transmitter delay to random value between 0 and 126. Run CAN FD frame and check it is measured correctly!
tst_mem_acc_rx_ftest.vhdTest access to RX buffer RAM.
1. RX buffer RAM can be written and read via Test registers.
1. Read size of RX buffer in DUT. Enable Test Mode and Test access in DUT. Disable DUT (since memory testability shall be used when DUT is disabled)
2. Generate random content for whole RAM.
3. Write whole RX buffer RAM.
4. Read whole RX buffer RAM back and compare read values with written ones.
5. Toggle all bits of TST_DEST[TST_ADDR] to fill its toggle coverage. Field is bigger than biggest possible memory, thus upper bits do not get toggled during any test access.
tst_mem_acc_txt_ftest.vhdTest access to TXT buffer RAMs.
1. TXT buffer RAM can be written and read via Test registers.
2. Write to one TXT buffer RAM does not affect write to other TXT buffer RAMs.
3. TXT buffer RAM cannot be written via Test registers when MODE[TSTM]=0.
1. Read number of TXT buffers in DUT. Disable DUT (since memory testability shall be used when DUT is disabled).
2. Iterate for each: TXT Buffer, MODE[TSTM], TST_CONTROL[TMAEN] and value written to the memory.
2.1 Take content and write it to TXT Buffer RAM.
2.2 Read whole TXT buffer RAM back and compare read values with written ones if test mode was enabled. Otherwise, check its all zeroes. Read TXT buffer RAM of other buffers, and check there are all zeroes.
2.3 Write all zeroes to the TXT Buffer.
tx_arb_consistency_ftest.vhdTX Priority feature test.
1. If during TX frame validation by TX Arbitrator CAN Core issues lock command (another frame has been validated before), then first frame will be transmitted (in other words, TX arbitration mechanism will not corrupt consistency of data/metadata of CAN frame).
1. Generate two random frames and insert them to TXT Buffer 1 and 2. Configure priority of TXT Buffer 1 higher than TXT Buffer 2.
2. Wait until sample point and issue Set ready command to TXT Buffer 2.
3. Wait for nearly whole Bit time, and before next sample point, issue Set ready command to TXT Buffer 1. This will re-invoke TXT Buffer validation process with TXT Buffer 1. Time the command, so that when Lock command is issued by CAN Core, TX Arbitrator FSM is always in different state of TX frame validation.
4. Wait until frame is sent, and verify that either frame 2 or frame 1 were sent (it depends on when did the validation finish, which depends on delay between frames!). This verifies that no part of metadata has been taken from other frame, and frame was validated atomically!
tx_arb_time_tran_ftest.vhdTX arbitration and time transmittion feature test
1. Frame is transmitted from TXT Buffer at time given by Timestamp in TIMESTAMP_U_W and TIMESTAMP_L_W words when MODE[TTTM] is enabled.
2. When timestamp in TIMESTAMP_U_W and TIMESTAMP_L_W is lower than actual timestamp input of CTU CAN FD, frame is transmitted immediately.
3. When timestamp of a frame in higher priority TXT buffer is not yet elapsed, but timestamp of a frame in lower priority TXT buffer has already elapsed, frame from lower priority buffer is not transmitted before frame from higher priority buffer.
1. Enable Time triggered transmission in DUT.
2. Configure random timestamp to testbench. Generate random frame and insert it for transmission from TXT Buffer 1 of DUT. Generate random time of transmission for the frame and Issue "set ready" command for TXT Buffer 1. Wait until node turns transmitter! Read current timestamp from TB and check that difference between expected time of transmission and actual time when transmission started is less than 1 bit time (transmission is not processed immediately, but in each sample point). Wait until frame is sent.
3. Generate CAN frame for transmission with timestamp lower than actual value of timestamp input of CTU CAN FD. Insert it for transmission and issue "set ready" command to this TXT Buffer. Wait until transmission starts and check that difference between start of transmission and time when "set ready" command was sent is less than 1 bit time. Wait until frame is sent.
4. Configure TXT Buffer 1 to higher priority than TXT Buffer 2. Insert CAN frame with earlier time of transmission to TXT Buffer 1. Mark both frames as ready. Wait until both frames are transmitted! Check that first frame from DUT was transmitted!
tx_cmd_set_abort_ftest.vhdTXT Buffer Set Abort - SW command (TX_COMMAND) feature test.
1. Set Abort command moves TXT Buffer from Ready to Aborted and from TX in progress to Aborted.
1. Generate frame and insert it for transmission to random TXT Buffer. Wait until sample point. Issue Set Ready command and check TXT Buffer becomes Ready. Issue Set Abort command and check TXT Buffer becomes Aborted. Bit time should be sufficiently long so that there is enough time to issue two commands and read buffer state ones before next sample point arrives.
2. Issue Set Ready command and wait until transmission starts. Check that TXT Buffer is in TX in progress. Issue Set Abort and check that TXT Buffer moves to Abort in progress. Wait until transmission is over. Wait until transmission is over and check TXT Buffer is aborted.
tx_cmd_set_empty_ftest.vhdTXT Buffer Set empty - SW command (TX_COMMAND) feature test.
1. Set Empty command moves TXT Buffer from TX OK, TX Error, Aborted to Empty.
1. Check TXT Buffer is empty. Issue Set empty and check it is still empty.
2. Generate random CAN frame, send it from TXT Buffer and wait until it is received. Check TXT Buffer is in TX OK. Issue Set Empty command and check TXT Buffer is empty.
3. Generate random CAN frame, send it fom TXT Buffer and issue Set Abort command. Wait until frame is over and check TXT Buffer is Aborted. Issue Set Empty command and check it becomes Empty.
4. Set One shot mode in DUT. Forbid ACK in Test node. Send CAN frame by Node 1. Wait until CAN frame is sent and check TXT Buffer from which it was sent ended in TX Error. Issue Set empty command and check TXT Buffer is Empty.
tx_cmd_set_ready_ftest.vhdTXT Buffer Set ready - SW command (TX_COMMAND) feature test.
1. Set Ready command moves TXT Buffer from TX OK, TX Error, Aborted and Empty to Ready.
1. Check TXT Buffer is empty. Wait until sample point and issue Set ready and check it becomes Ready. Wait until frame is sent.
2. Check TXT Buffer state is TX OK. Wait until sample point and issue Set ready command. Check TXT Buffer is ready. Wait until frame is sent.
3. Wait until Sample point. Issue Set Ready and consecutively Set Abort. Check TXT Buffer is aborted. Issue Set Ready again and check it is Ready now!
4. Set One shot mode in DUT. Forbid ACK in Test node. Send CAN frame by DUT. Wait until CAN frame is sent and check TXT Buffer from which it was sent ended in TX Error. Wait unitl sample point. Issue Set Ready command and check TXT Buffer is Ready
tx_counter_ftest.vhdTX Traffic counter feature test implementation.
1. TX Counter is incremented after each succesfully transmitted frame.
2. TX Counter is not incremented when error frame is transmitted.
3. RX Counter is not incremented when frame is succesfully transmitted.
4. TX Counter is cleared by COMMAND[TXFRCRST].
5. TX Counter is NOT cleared by COMMAND[RXFRCRST].
1. Read TX Counter from DUT. Set One-shot mode (no retransmission) in DUT.
2. Send frame from DUT. Wait until EOF field. Read TX counter and check it did not change yet.
3. Wait until the end of EOF. Read TX counter and check it was incremented. Read RX counter and check it is not incremented!
4. Send Frame from DUT. Wait till ACK field. Corrupt ACK field to be recessive. Wait till Test node is not in ACK field anymore. Check DUT is transmitting Error frame.
5. Wait until Test node also starts transmitting error frame. Wait until bus is idle, check that TX Counter was not incremented in DUT.
6. Send random amount of frames by DUT and wait until they are sent.
7. Check that TX counter was incremented by N!
8. Issue COMMAND[RXFRCRST] and check TX counter was NOT cleared in DUT.
9. Issue COMMAND[TXFRCRST] and check TX counter was cleared in DUT.
tx_from_intermission_ftest.vhdStart of transmission from Intermission
1. Transmission is started when Node detects Dominant bit during third bit of intermission and it has frame for transmission available.
2. Reception is started when Node detectes Dominant bit during third bit of Intermission and it has no frame for transmission available.
1. Insert CAN frame for transmission into Test node. Wait until transmission will be started. Insert CAN frame to DUT during transmission of frame from Test node and wait until Intermission.
2. Wait for two sample points and force the bus dominant during third bit of intermission for DUT. Wait until sample point, and check that Node 1 started transmitting. Check that DUT is in "arbitration" phase. Check that DUT is NOT in SOF. Wait until frame is sent, and check it is properly receieved by Test node (Test node should have turned receiver).
tx_priority_change_ftest.vhdTX Priority change feature test.
1. When TX priority changes even if some TXT buffer is already selected in TX ready state, and with new priority settings another TXT Buffer has higher priority, this new TXT Buffer will be selected.
1. Select random priorities for TXT buffers and write them to TX Priority register. Generate random frames and store them to TXT Buffers.
2. Wait till sample point (+ some time more) and issue TX ready command to all TXT buffers. Read state of the TXT Buffers and check that they are all in ready state.
3. Select new random priorities and write them to TXT Buffers.
4. Wait until frame is sent, and check that received frame was sent from new highest priority TXT buffer.
tx_priority_ftest.vhdTX Priority feature test.
1. TX_PRIORITY register gives priority of TXT Buffers in selection for transmission.
2. TXT Buffer with higher priority is selected for transmission.
3. When TXT Buffer of higher priority is not Ready, it will not be selected for transmission.
4. When two TXT Buffers have equal priority, TXT Buffer with lower priority is selected for transmission.
1. Generate random priorities of TXT Buffers and configure them in DUT. Generate random mask of TXT Buffers which will actually be used for transmission. Generate random frames for transmission and insert them to DUT.
2. Send atomic command to TXT Buffer 1 which will set all TX frames to Ready. Wait until expected amount of frames is received.
3. Check that frames are received in expected order.
tx_status_ftest.vhdTX Status feature test.
1. TXT Buffer is Empty after reset
2. TXT Buffer is OK after successfull transmission.
2. TXT Buffer is Failed after transmission fails from this buffer!
3. TXT Buffer is Aborted after Set Abort command was issued during transmission.
1. Reset Node, Enable it, and wait until it integrates. Pick random TXT Buffer which will be used during this test. Check that TXT Buffer is empty.
2. Transmitt CAN Frame by DUT and wait until it is received in Test node. Check that TXT Buffer is OK.
3. Set ACK Forbidden mode in Test node. Set One shot mode in DUT. Send frame by DUT and wait until it is sent. Check that TXT Buffer is in TX Failed.
4. Send CAN frame and when it starts, issue Set Abort Command. Wait until frame is sent and check that TXT Buffer is in Aborted. Note: Ready, TX in Progress and Abort in Progress are not tested here as they are checked in tx_cmd_set_ready/empty/abort test case.
timestamp_low_high_ftest.vhdFeature test for Timestamp options on RX frame in RX Buffer!
1. TIMESTAMP_LOW and TIMESTAMP_HIGH registers functionality.
1. Preset Timestamp value in TB. Read values from TIMESTAMP_LOW and TIMESTAMP_HIGH registers. Check read value matches value which was preset.
txt_buffer_byte_access_ftest.vhdFeature test verifying 8/16 bit writes to TXT buffer.
1. TXT Buffer RAM can be filled by 8/16 bit accesses.
1. Generate random CAN frame, insert it into TXT buffer 0 of DUT by using byte accesses. Send frame and wait until it is sent.
2. Read received frame from Test Node and check that it is matching sent frame
txt_buffer_hazard_ftest.vhdTXT Buffer datapath hazard feature test.
1. When Lock command is issued on Protocol control at the same time as Set Abort command, Lock command will have priority.
2. TXT Buffer will never end up Aborted when Protocol control succesfully locks TXT Buffer for transmission!
1. Insert frame to TXT Buffer
2. Mark the buffer as ready and wait for incrementing time.
3. Send set_abort command.
4. Readout status of TXT buffer.
5. If the buffer is "Aborted", check that no transmission is in progress (via STATUS), throw an error if not. If this happend, it would mean CTU CAN FD would be transmitting from Aborted buffer which is hazard!
6. If the buffer is "Abort in progress" check that transmission is in progress and wait till its end. Throw an error if not.
7. If buffer is in any other state, throw an error. Set Abort command should not be missed by HW!
txt_buffer_transitions_ftest.vhdTXT Buffer FSMs corner-case transitions
1. When SETTINGS[TBFBO] = 1, then TXT Buffers will move from Abort in Progress to TX Failed.
1. Enable SETTINGS[TBFBO] = 1.
2. Loop for all TXT Buffers:
2.1. Send a frame from a TXT Buffer. Wait until its transmission starts and send Set Abort Command. Check TXT Buffer is in Abort In Progress.
2.2. Invoke DUT Node to become bus-off. Check that the TXT Buffer became TX Failed.
2.3. Reintegrate the node on the bus. Issue "Set empty".
txt_buffer_transitions_2_ftest.vhdTXT Buffer FSMs corner-case transitions 2
1. When Lock is issued by PC FSM on a TXT Buffer simultaneously as Set Abort, TXT Buffer will move immediately to Abort in Progress.
2. When Transmission ends (PC FSM attempts to unlock TXT Buffer) at the same time as User issues Set Empty, command, Set empty will be applied.
1. Loop for all TXT Buffers and incrementing wait times within a bit:
2.1. Generate frame and insert it into TXT Buffer. Wait until Sync segment, and send Set Ready Command.
2.2. Wait until bit phase small amount of time before sample point + per-loop incremental delay. Issue Set Abort Command.
2.3. Wait for some time. Now either TXT Buffer must have been aborted, or the transmission has started. If the transmission was aborted, then finish the loop.
txt_buffer_transitions_3_ftest.vhdTXT Buffer FSMs corner-case transitions 3
1. When Unlock from Protocol control arrives simultaneously as Set Abort from SW, TXT Buffer will go to TX Aborted immediately.
1. Loop for all TXT Buffers and incrementing wait times within a bit:
1.1. Generate frame and send it from a TXT Buffer. Wait until it starts being transmitted! Wait until dominant bit is being transmitted. Now we are shortly after SYNC segment of dominant transmitted bit.
1.2. Force the bit to be recessive. Wait until some time before Sample point. Wait small incremental delay. Send Set Abort Command.
1.3. Wait until Sample point and release the bus value.
1.4. Wait until bus is Idle.
txt_buffer_transitions_4_ftest.vhdTXT Buffer FSMs corner-case transitions 4
1. When TXT Buffer is in Abortin Progress, and parity error occurs, it moves to Parity Error state
1. Loop for all TXT Buffers:
1.1. Insert a CAN frame into to a TXT Buffer. Insert a bit-flip into a data word inside TXT Buffer.
1.2. Send Set Ready Command. Wait until DUT starts transmitting the frame, and then send Set Abort Command.
1.3. Wait until bus is idle. Check TXT Buffer ended in Parity Error.