A test method and system based on a CANFD time slot forbidden zone

By controlling the delayed transmission time of the response message from the device under test (DUT) by sending high-priority messages on the CANFD bus, the problem of difficulty in verifying the boundary logic of the forbidden zone in existing tests is solved, achieving efficient test coverage and system reliability.

CN123055631APending Publication Date: 2026-11-06CHENGDU GUOXING COMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611342382.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing testing methods have difficulty in stably controlling the timing of the response messages sent by the device under test, which makes it impossible to effectively verify the logical behavior of the CANFD time slot forbidden zone boundary.

Method used

The test fixture simulates the master control device sending timestamp messages, uses the CANFD bus arbitration mechanism to send high-priority messages, controls the delayed transmission time of the response messages of the device under test, adjusts the number of high-priority messages to make them appear before, near or inside the time slot forbidden zone, detects the actual transmission time of the response messages, and outputs the test results.

Benefits of technology

It achieves stable and precise control over the time slot forbidden zone, reduces testing costs and complexity, and possesses versatility and scalability, ensuring the reliability and test coverage integrity of the CANFD time slot communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123055631A_ABST
    Figure CN123055631A_ABST
Patent Text Reader

Abstract

This invention discloses a testing method and system based on the CANFD time slot forbidden zone. The method includes: a test fixture sending a timestamp message to trigger the device under test (DUT) to enter the corresponding communication time slot and prepare to send a response message; subsequently, continuously sending high-priority CANFD messages with ID priorities higher than the DUT's response message, utilizing the CANFD bus arbitration mechanism to enable the high-priority messages to obtain bus arbitration rights, thereby delaying the transmission of the DUT's response message due to arbitration failure; controlling the delayed transmission time of the response message to be before, near the boundary, or within the time slot forbidden zone by adjusting the number of high-priority message transmissions; detecting the actual transmission time of the response message and outputting the forbidden zone logic test result. This invention utilizes the CANFD's own arbitration mechanism to achieve transmission time control, requiring no additional complex hardware, resulting in low testing costs and flexible configuration, and effectively verifying the correctness of the DUT's control logic in the time slot forbidden zone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CANFD bus communication testing technology, and in particular to a testing method and system based on CANFD time slot forbidden zone. Background Technology

[0002] In systems using the CANFD bus for communication, multiple nodes typically interact with each other using either timestamp polling or time-division multiplexing. After the master device sends a timestamp message, the device under test (DUT) enters the corresponding communication time slot based on the timestamp message and sends a response message within that time slot. To prevent response messages in the current time slot from affecting data communication in the next time slot, the system typically sets a transmission prohibition zone at the end of each communication time slot, requiring the DUT not to initiate new CANFD message transmissions after entering the prohibition zone.

[0003] However, in actual testing, due to factors such as bus arbitration and message queuing, the actual sending time of the response message of the device under test is uncertain, making it difficult to accurately control whether it is before, near, or within the time slot prohibition zone. This makes it impossible to effectively verify the logical behavior of the device under test near the prohibition zone boundary. Summary of the Invention

[0004] The purpose of this invention is to provide a test method and system based on CANFD time slot forbidden zone, so as to solve the technical problems of existing test methods that make it difficult to stably control the timing of the response message sent by the device under test and difficult to verify the boundary logic of the forbidden zone.

[0005] This invention is implemented using the following technical solution: a test method based on the CANFD time slot forbidden zone, comprising: Step 1: Simulate the main control device sending a timestamp message to the CANFD bus using the test fixture, triggering the device under test to enter the corresponding communication time slot and prepare to send a response message; Step 2: According to the configuration information, the test fixture continuously sends several high-priority CANFD messages after sending the timestamp message. The ID priority of the high-priority message is higher than the ID priority of the response message of the device under test. The CANFD bus arbitration mechanism is used to enable the high-priority message to obtain the bus arbitration right, thereby delaying the transmission of the response message of the device under test due to arbitration failure. Step 3: By adjusting the number of times high-priority messages are sent, the delayed sending time of the response message of the device under test is controlled to be before the time slot prohibition zone, near the boundary of the prohibition zone, or within the prohibition zone. Step 4: Detect the actual transmission time of the response message from the device under test, and output the prohibition zone logic test result based on the relationship between the actual transmission time and the time slot prohibition zone.

[0006] Furthermore, the specific implementation method for continuously sending several frames of high-priority CANFD messages in step two is as follows: the test fixture searches for an idle transmission buffer in the CANFD controller, writes the high-priority message into the idle transmission buffer, and immediately enables transmission, repeating this process until the number of transmissions reaches the configured value.

[0007] Furthermore, the configuration information is dynamically configured via serial port commands, and includes at least the ID value M and the number of times the high-priority message is sent N.

[0008] Furthermore, the specific method for outputting the forbidden zone logic test results in step four is as follows: if the device under test starts or sends a CANFD response message within the forbidden zone, the forbidden zone logic is determined to be abnormal; if the device under test does not start sending a new response message within the forbidden zone, the forbidden zone logic is determined to meet the requirements.

[0009] Furthermore, the timestamp message is a time synchronization message sent by the simulated master control device, used to enable the device under test to enter the corresponding time-division communication time slot.

[0010] Furthermore, by configuring a smaller number of transmissions, the response message of the device under test is delayed until before the prohibited zone is sent, which is used to verify the normal transmission logic of the device under test in the allowed transmission area; by configuring a larger number of transmissions, the response message of the device under test is delayed until near the boundary of the prohibited zone or within the prohibited zone, which is used to verify the prohibited transmission logic of the device under test in the prohibited zone.

[0011] A test system based on CANFD time slot forbidden zone, used to implement the test method described above, includes test fixtures, device under test and CANFD message monitoring equipment; The test fixture is connected to the device under test via a CANFD bus and is used to simulate the master control device sending timestamp messages and continuously send several frames of high-priority CANFD messages according to the configuration information. The ID priority of the high-priority messages is higher than the ID priority of the response messages of the device under test. The device under test is used to send a response message within the corresponding communication time slot after receiving the timestamp message; The CANFD message monitoring device is used to monitor timestamp messages, high-priority messages and response messages of the device under test on the bus, and record the transmission time of each message. The test fixture controls the delayed transmission time of the response message of the device under test by adjusting the number of times the high-priority message is sent, so as to verify whether the logic of the device under test is correct in the time slot forbidden zone.

[0012] Furthermore, the test fixture includes a CANFD controller and a serial port. The CANFD controller is used to send the timestamp message and the high-priority message, and the serial port is used to receive configuration instructions from external input. The configuration instructions include the ID value and the number of times the high-priority message is sent.

[0013] Furthermore, the CANFD message monitoring device determines whether the restricted area logic of the device under test is correct based on the relationship between the actual transmission time of the response message of the device under test and the restricted area of ​​the time slot: if the response message is sent within the restricted area, the restricted area logic is determined to be abnormal; if the response message is not started to be sent within the restricted area, the restricted area logic is determined to meet the requirements.

[0014] Furthermore, the ID value of the high-priority message is less than the ID value of the response message from the device under test, so that the high-priority message can obtain a higher priority for transmission in the CANFD bus arbitration.

[0015] The beneficial effects of this invention are as follows: This invention utilizes the non-destructive arbitration mechanism of the CANFD bus itself. By sending high-priority messages through a test fixture to occupy the bus arbitration right, the transmission time of the response message from the device under test (DUT) can be stably and accurately controlled. It achieves coverage testing of various boundary scenarios, including before, near, and within the forbidden zone, without the need for additional complex hardware, significantly reducing testing costs and implementation complexity. Furthermore, the ID value and transmission count of the high-priority message can be flexibly configured via serial port commands, easily adapting to different DUTs, different response message priorities, and different time slot configurations. It possesses strong versatility and scalability, effectively solving the problems of existing testing methods that struggle to stably control the transmission time of response messages and verify the forbidden zone boundary logic, thus comprehensively ensuring the reliability and test coverage integrity of the CANFD time slot communication system. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0017] Figure 1 This is a diagram showing the connection between the test fixture and the device under test in this invention; Figure 2 The timing requirements diagram for CANFD; Figure 3 To test the timing diagram before the forbidden zone; Figure 4To test the timing diagram after the forbidden zone; Figure 5 This is a flowchart of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0019] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0020] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0021] See Figure 1 A test system based on the CANFD time slot forbidden zone is disclosed. The system includes a test fixture, a device under test (DUT), and a CANFD message monitoring device. The test fixture is connected to the DUT via a CANFD bus. The test fixture simulates the master device sending a timestamp message T and, according to the serial port configuration, sends a high-priority CANFD message M. Upon receiving the timestamp message T, the DUT sends an acknowledgment message within the corresponding time slot. The CANFD message monitoring device monitors the timestamp messages, high-priority messages, and the DUT's acknowledgment message on the bus and records the transmission time of each message.

[0022] In this embodiment, the test fixture simulates the master control device. It first sends a timestamp message T to the CANFD bus, causing the device under test (DUT) to enter the corresponding communication time slot and prepare to send a response message. Then, the test fixture immediately sends a high-priority CANFD message with ID M according to the serial port configuration, and continuously sends this high-priority message N according to the configured number of transmissions. Since the message with ID M has a higher priority than the DUT's response message, this high-priority message can obtain bus arbitration rights during the CANFD arbitration process, causing the DUT's response message arbitration to fail and its transmission to be delayed. By adjusting the number of transmissions N for the high-priority message, the delay time of the DUT's response message can be controlled, ensuring that its transmission time is before, near, or within the forbidden zone, thereby verifying the correctness of the DUT's forbidden zone control logic.

[0023] like Figure 2As shown, in CANFD timeslot communication, each timeslot includes a permitted transmission area and a prohibited area. The device under test can send response messages within the permitted transmission area, but must not initiate new CANFD message transmissions after entering the prohibited area.

[0024] Specifically, the testing process of the aforementioned testing system includes: First, the test fixture initializes the CANFD controller and serial port, ensuring that the CANFD controller's baud rate, sampling points, and frame format are consistent with the device under test (DUT). Then, the test fixture queries the serial port receive buffer to determine if a serial port configuration command has been received. If no command is received, the query continues; if a command is received, the high-priority message ID value M and the transmission count N are parsed. The test fixture constructs a CANFD timestamp message T according to the communication protocol, writes the timestamp message T into the CANFD controller's transmit buffer, and enables transmission. This timestamp message T simulates the timestamp message sent by the master device, causing the DUT to enter the corresponding communication time slot and prepare to send a response message.

[0025] After the timestamp message T is sent, the test fixture sets the high-priority message transmission count n=0 and checks if n is less than N. When n is less than N, the test fixture searches for an idle transmission buffer in the CANFD controller; if no idle transmission buffer is found, the search continues; if an idle transmission buffer is found, the high-priority CANFD message with ID M is written into the idle transmission buffer, and the buffer is immediately enabled for transmission. Since the high-priority message with ID M has a higher priority than the CANFD response message, it obtains the bus arbitration right during the CANFD arbitration phase, and the CANFD response message is delayed due to arbitration failure. After enabling the transmission of each high-priority message frame, the test fixture increments the transmission count n by 1 and repeats the above idle transmission buffer search, writing, and transmission enable process until n reaches N.

[0026] After the number of high-priority message transmissions reaches N, the test fixture or CANFD message monitoring device detects the actual transmission time of the response message from the device under test (DUT), and determines whether the DUT's restricted area logic is correct based on the relationship between this transmission time and the restricted area. If the DUT initiates or sends a CANFD response message within the restricted area, the restricted area logic is deemed abnormal; if the DUT does not initiate a new response message transmission within the restricted area, the restricted area logic is deemed to meet the requirements.

[0027] like Figure 3 As shown, by configuring a smaller number of high-priority message transmissions N, the response message of the device under test can be delayed until before the prohibited area, which is used to verify the normal transmission logic of the device under test in the allowed transmission area.

[0028] like Figure 4As shown, by increasing the number of high-priority message transmissions N, the response message from the device under test can be delayed until near the boundary of the restricted area or within the restricted area, thereby verifying whether the device under test is prohibited from starting the transmission of new CANFD messages after entering the restricted area.

[0029] See Figure 5 The present invention also provides a test method based on the CANFD time slot forbidden zone, which specifically includes: (a) Initialize the CANFD controller and serial port in the test fixture to ensure that the baud rate, sampling points, and frame format of the CANFD controller are consistent with those of the device under test; (b) Query the serial port receive buffer to determine whether a serial port configuration command has been received; (c) When a serial port configuration command is received, parse the high-priority message ID value M and the number of high-priority message transmissions N in the command, where the priority of the ID value M is higher than the ID priority of the response message of the device under test; (d) Construct a CANFD timestamp message T to simulate the master control device; (e) Write the timestamp message T into the transmit buffer of the CANFD controller and enable the transmission of the timestamp message to trigger the device under test to enter the corresponding communication time slot and prepare to send the response message; (f) Set the high-priority message transmission count n=0; (g) Determine whether n is less than N. If n is not less than N, stop sending high-priority messages in this round and enter the process of detecting the time of sending response messages of the device under test and judging the test results. (h) If n is less than N, check if there is an idle transmit buffer in the CANFD controller; (i) If no idle transmit buffer exists, continue to wait and query the idle transmit buffer; if an idle transmit buffer exists, write the high-priority CANFD message with ID M into the idle transmit buffer; (j) Immediately enable the transmission of high-priority CANFD messages in the idle transmit buffer, so that the high-priority messages participate in CANFD bus arbitration; (k) A high-priority message gains the right to arbitrate the bus, causing the device under test to fail to arbitrate the response message and delay its transmission; (l) Increment the count n by 1 and return to step (g) until the number of high-priority messages sent reaches N; (m) Detect the actual sending time of the response message of the device under test and output the test results of the forbidden zone logic.

[0030] The present invention provides a test method and system based on the CANFD time slot forbidden zone. This method uses a test fixture to simulate the master control device sending timestamp messages to trigger the device under test (DUT) to enter the corresponding communication time slot. Utilizing the non-destructive arbitration mechanism of the CANFD bus itself, high-priority CANFD messages with ID priorities higher than the DUT's response messages are continuously sent. These high-priority messages gain bus arbitration rights, thus stably delaying the DUT's response message to the target transmission time. The delay time can be flexibly controlled by adjusting the number of high-priority message transmissions, ensuring the response message is positioned precisely before, near, or within the forbidden zone. This method detects the actual transmission behavior of the device under test (DUT) before and after entering the forbidden zone and outputs the test results. It requires no additional complex hardware and relies solely on the arbitration characteristics of CANFD itself, significantly reducing test costs and implementation complexity. At the same time, the high-priority message ID value and transmission count can be flexibly configured via serial port, making it easy to adapt to different DUTs and different time slot configuration scenarios. It has excellent versatility and scalability, effectively solving the problems of unstable control of response message transmission time and difficulty in verifying forbidden zone boundary logic in existing tests. It fully ensures the reliability of forbidden zone control logic and the integrity of test coverage in the CANFD time slot communication system.

[0031] For the foregoing embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0032] The above embodiments describe the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Modifications and variations made by those skilled in the art without departing from the spirit and scope of the invention should be within the protection scope of the appended claims.

Claims

1. A test method based on CANFD time slot forbidden region, characterized in that, include: Step 1: Simulate the main control device sending a timestamp message to the CANFD bus using the test fixture, triggering the device under test to enter the corresponding communication time slot and prepare to send a response message; Step 2: According to the configuration information, the test fixture continuously sends several high-priority CANFD messages after sending the timestamp message. The ID priority of the high-priority message is higher than the ID priority of the response message of the device under test. The CANFD bus arbitration mechanism is used to enable the high-priority message to obtain the bus arbitration right, thereby delaying the transmission of the response message of the device under test due to arbitration failure. Step 3: By adjusting the number of times high-priority messages are sent, the delayed sending time of the response message of the device under test is controlled to be before the time slot prohibition zone, near the boundary of the prohibition zone, or within the prohibition zone. Step 4: Detect the actual transmission time of the response message from the device under test, and output the prohibition zone logic test result based on the relationship between the actual transmission time and the time slot prohibition zone.

2. The test method based on CANFD time slot forbidden zone according to claim 1, characterized in that, The specific implementation method for continuously sending several frames of high-priority CANFD messages in step two is as follows: the test fixture searches for an idle transmission buffer in the CANFD controller, writes the high-priority message into the idle transmission buffer, and immediately enables transmission. This process is repeated until the number of transmissions reaches the configured value.

3. The test method based on CANFD time slot forbidden zone according to claim 1, characterized in that, The configuration information is dynamically configured via serial port commands and includes at least the ID value M and the number of times the high-priority message is sent N.

4. The test method based on CANFD time slot forbidden zone according to claim 1, characterized in that, The specific method for outputting the forbidden zone logic test results in step four is as follows: if the device under test starts or sends a CANFD response message within the forbidden zone, the forbidden zone logic is determined to be abnormal; if the device under test does not start sending a new response message within the forbidden zone, the forbidden zone logic is determined to meet the requirements.

5. The test method based on CANFD time slot forbidden zone according to claim 1, characterized in that, The timestamp message is a time synchronization message sent by the simulated master control device, used to enable the device under test to enter the corresponding time-division communication time slot.

6. The test method based on CANFD time slot forbidden zone according to claim 1, characterized in that, By configuring a smaller number of transmissions, the response message of the device under test is delayed until before the prohibited zone is sent, which is used to verify the normal transmission logic of the device under test in the allowed transmission zone; by configuring a larger number of transmissions, the response message of the device under test is delayed until near the boundary of the prohibited zone or inside the prohibited zone, which is used to verify the prohibited transmission logic of the device under test in the prohibited zone.

7. A test system based on CANFD time slot forbidden region, used to implement the test method according to any one of claims 1 to 6, characterized in that, This includes test fixtures, the device under test, and CANFD message monitoring equipment; The test fixture is connected to the device under test via a CANFD bus and is used to simulate the master control device sending timestamp messages and continuously send several frames of high-priority CANFD messages according to the configuration information. The ID priority of the high-priority messages is higher than the ID priority of the response messages of the device under test. The device under test is used to send a response message within the corresponding communication time slot after receiving the timestamp message; The CANFD message monitoring device is used to monitor timestamp messages, high-priority messages and response messages of the device under test on the bus, and record the transmission time of each message. The test fixture controls the delayed transmission time of the response message of the device under test by adjusting the number of times the high-priority message is sent, so as to verify whether the logic of the device under test is correct in the time slot forbidden zone.

8. The testing system according to claim 7, characterized in that, The test fixture includes a CANFD controller and a serial port. The CANFD controller is used to send the timestamp message and the high-priority message. The serial port is used to receive configuration instructions from external input. The configuration instructions include the ID value and the number of times the high-priority message has been sent.

9. The testing system according to claim 7, characterized in that, The CANFD message monitoring device determines whether the restricted area logic of the device under test is correct based on the relationship between the actual sending time of the response message of the device under test and the restricted area of ​​the time slot: if the response message is sent in the restricted area, the restricted area logic is determined to be abnormal; if the response message is not sent in the restricted area, the restricted area logic is determined to meet the requirements.

10. The testing system according to claim 7, characterized in that, The ID value of the high-priority message is lower than the ID value of the response message from the device under test, so that the high-priority message can obtain a higher priority for transmission in the CANFD bus arbitration.