A debugging device applied to master-slave communication system

By designing a multi-function module debugging device in a master-slave communication system, the problems of high verification difficulty and insufficient simulation capabilities in the existing technology are solved, efficient testing and verification of the master equipment is achieved, and the stability and stability of the system are improved. reliability.

CN117459276BActive Publication Date: 2024-08-23QILU ZHONGKE NEW KINETIC ENERGY INNOVATION RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311403486.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2024-08-23
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

The existing master-slave communication system debugging device has too single application mode and cannot adjust the connection verification mode according to different application scenarios. This makes command verification of the master device difficult and takes a long time to develop. It also cannot simulate the data and response of the slave device, affecting the system. Stability and reliability.

Method used

A debugging device including an interface module, integrity check module, correctness check module, data initialization module, data error annotation module and error feedback module is designed. Through the mutual cooperation and data transmission of these modules, the master equipment can be monitored. Instructions and requests simulate the data and response of the slave device, support single-host point-to-point verification and multi-host point-to-point verification, and verify the validity of the bus controller.

Benefits of technology

It reduces the development difficulty and development time of the master device, improves the reliability and stability of the communication system, enables the master device to work normally and obtain correct or wrong responses, and supports detailed monitoring and verification of the behavior of the master device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117459276B
    Figure CN117459276B
Patent Text Reader

Abstract

A debugging device applied to a master-slave communication system, the device comprising: an interface module, used for establishing network communication between a master device and a slave device; an integrity check module, used for analyzing received protocol instructions; a correctness check module, used for decrypting and checking received data to determine the correctness of the data; a data initialization module, used for initializing an address space that has never been written, the data initialization can be configured as all 0s, all 1s or all random, and returning the data to a bus controller; a data error injection module, used for randomly inserting an erroneous value into the data to be sent by the slave device to detect whether the master device has detected the erroneous value; an error feedback module, used for collecting the error results of the protocol integrity check and the data correctness check, and returning the error status; and a data transmission control module, used for controlling the format of the data fed back by the slave device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention relates to a debugging device applied to a master-slave communication system. Background technology:

[0002] With the rapid development of information technology, master-slave communication systems and integrated circuit systems have become infrastructures widely used in various fields, such as the Internet of Things and industrial automation. In these systems, the master device is responsible for controlling and guiding the operation of the slave device, while the slave device provides data and responses to the master device according to the protocol requirements.

[0003] A complex integrated circuit system contains multiple master devices and slave devices. How to ensure that the commands sent by the master device comply with the bus protocol is an important evaluation indicator of the system. In actual applications, the master device may deviate from the range specified by the protocol, causing the slave device to not work properly and easily malfunction. Therefore, it is necessary to set up a debugging device to check the commands of the master device and imitate the data and responses of the slave device to ensure that the behavior of the master device meets the protocol requirements.

[0004] However, the existing debugging device application mode is too single and cannot adjust different connection verification modes according to different application scenarios. It is difficult to verify the master device and requires more development time, which cannot guarantee the stability and reliability of the master-slave communication system. At the same time, it cannot simulate the data and response of the slave device, resulting in the master device failing to work normally and obtain the correct response. Summary of the invention:

[0005] The embodiment of the present invention provides a debugging device applied to a master-slave communication system. The debugging device has a reasonable structural design. Based on the mutual cooperation of multiple functional modules and the data transmission function, the debugging device can monitor the instructions and requests issued by the master device to determine whether the behavior of the master device complies with the predetermined protocol, and can simulate the data and response of the slave device so that the master device can work normally and obtain a correct or incorrect response. In this way, the master device can be tested and verified without relying on the actual slave device, reducing the development difficulty and development time of the master device to improve the reliability and stability of the communication system. At the same time, the instructions sent by the master device can be parsed, and data in a specified format can be returned according to the master device instructions. The debugging device supports slave device-side data initialization and data error injection to better monitor the behavior of the master device. The debugging device can support single-host point-to-point verification, multi-host point-to-point verification and effective verification of the bus controller, thereby solving the problems existing in the prior art.

[0006] The technical solution adopted by the present invention to solve the above technical problems is:

[0007] A debugging device applied to a master-slave communication system, the device comprising:

[0008] An interface module, wherein the interface module is used to establish network communication between the master device and the slave device;

[0009] An integrity checking module, wherein the integrity checking module is used to analyze the received protocol instructions;

[0010] A correctness checking module, which is used to perform decryption verification on the received data to determine the correctness of the data;

[0011] A data initialization module, the data initialization module is used to initialize the address space that has never been written, the data initialization can be configured as all 0, all 1 or all random, and return the data to the bus controller;

[0012] A data error injection module, which is used to randomly insert an erroneous value into the data to be sent by the slave device to detect whether the master device detects the erroneous value;

[0013] An error feedback module, which is used to collect error results of protocol integrity check and data correctness check and return an error status;

[0014] A data transmission control module is used to control the format of data fed back by the slave device.

[0015] The interface module is a bus slave end interface module, which can generate a specified interface according to the actual bus protocol configuration, and the interface includes an AXI interface, an AHB interface and an APB interface.

[0016] The slave device can support multiple connection verification methods, and can connect a single slave and a single host to perform point-to-point verification, that is, connect through a single set of APB bus, AHB bus or AXI bus; it can connect multiple slaves and multiple hosts, and multiple sets of bus interfaces are configured on the slave device to connect to multiple master devices respectively, so as to receive and feedback correspondingly according to the control signals and data sent by the master device.

[0017] A bus controller can be connected between the master device and the slave device to verify whether the bus controller meets expectations.

[0018] The debugging device is connected to an external bus or an external master device via a bus slave port, and the bus slave port is divided into two parts: a receiving part and a sending part;

[0019] The integrity check module and the correctness check module are connected to the receiving part of the bus slave port, and are used to analyze whether the protocol is complete and whether the received data is correct. At the same time, these two modules are connected to the error feedback module to send the analysis results to the error feedback module; the error feedback module is connected to the sending part of the bus slave port to send the feedback results to the bus or the master device;

[0020] The data error injection module, the data initialization module, and the data transmission control module are respectively connected to the sending part of the bus slave port to control the data to be sent to achieve the purpose of returning specific data and a specific format.

[0021] The data error injection module can replace the data to be sent at any position, and can also modify the values ​​of multiple data at the same time;

[0022] When the data to be sent is encrypted data, if there is no error, it is sent directly to the bus so that the bus can decrypt and obtain the correct data; when the data is annotated with an error, the bus cannot directly obtain the original data, and the Hamming code algorithm can be used to infer the exact location of the data error.

[0023] The present invention adopts the above structure, and uses an interface module to establish network communication between a master device and a slave device, and generates a specified interface according to the actual bus protocol configuration; analyzes the received protocol instructions through an integrity check module, and decrypts and verifies the received data through a correctness check module to determine the correctness of the data; initializes the address space that has never been written through a data initialization module, and randomly inserts an erroneous value into the data to be sent by the slave device through a data error injection module to detect whether the master device detects the erroneous value; collects the error results of the protocol integrity check and the data correctness check through an error feedback module, and returns the error status; it has the advantages of being stable, reliable, accurate and practical. Description of the drawings:

[0024] Figure 1 It is a structural schematic diagram of the present invention.

[0025] Figure 2 It is a working principle diagram of the present invention.

[0026] Figure 3 This is a schematic diagram of point-to-point host authentication of a single slave interface of the present invention.

[0027] Figure 4 It is a schematic diagram of point-to-point host authentication of multiple slave interfaces of the present invention.

[0028] Figure 5 It is a verification schematic diagram of the bus controller of the present invention. Specific implementation method:

[0029] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0030] like Figure 1-5 As shown in , a debugging device applied to a master-slave communication system, the device comprising:

[0031] An interface module, wherein the interface module is used to establish network communication between the master device and the slave device;

[0032] An integrity checking module, wherein the integrity checking module is used to analyze the received protocol instructions;

[0033] A correctness checking module, which is used to perform decryption verification on the received data to determine the correctness of the data;

[0034] A data initialization module, the data initialization module is used to initialize the address space that has never been written, the data initialization can be configured as all 0, all 1 or all random, and return the data to the bus controller;

[0035] A data error injection module, which is used to randomly insert an erroneous value into the data to be sent by the slave device to detect whether the master device detects the erroneous value;

[0036] An error feedback module, which is used to collect error results of protocol integrity check and data correctness check and return an error status;

[0037] A data transmission control module is used to control the format of data fed back by the slave device.

[0038] The interface module is a bus slave end interface module, which can generate a specified interface according to the actual bus protocol configuration, and the interface includes an AXI interface, an AHB interface and an APB interface.

[0039] The slave device can support multiple connection verification methods, and can connect a single slave and a single host to perform point-to-point verification, that is, connect through a single set of APB bus, AHB bus or AXI bus; it can connect multiple slaves and multiple hosts, and multiple sets of bus interfaces are configured on the slave device to connect to multiple master devices respectively, so as to receive and feedback correspondingly according to the control signals and data sent by the master device.

[0040] A bus controller can be connected between the master device and the slave device to verify whether the bus controller meets expectations.

[0041] The debugging device is connected to an external bus or an external master device via a bus slave port, and the bus slave port is divided into two parts: a receiving part and a sending part;

[0042] The integrity check module and the correctness check module are connected to the receiving part of the bus slave port, and are used to analyze whether the protocol is complete and whether the received data is correct. At the same time, these two modules are connected to the error feedback module to send the analysis results to the error feedback module; the error feedback module is connected to the sending part of the bus slave port to send the feedback results to the bus or the master device;

[0043] The data error injection module, the data initialization module, and the data transmission control module are respectively connected to the sending part of the bus slave port to control the data to be sent to achieve the purpose of returning specific data and a specific format.

[0044] The data error injection module can replace the data to be sent at any position, and can also modify the values ​​of multiple data at the same time;

[0045] When the data to be sent is encrypted data, if there is no error, it is sent directly to the bus so that the bus can decrypt and obtain the correct data; when the data is annotated with an error, the bus cannot directly obtain the original data, and the Hamming code algorithm can be used to infer the exact location of the data error.

[0046] The working principle of a debugging device applied to a master-slave communication system in an embodiment of the present invention is as follows: based on the mutual cooperation of multiple functional modules and the data transmission function, it can monitor the instructions and requests issued by the master device to determine whether the behavior of the master device complies with the predetermined protocol, and can simulate the data and response of the slave device so that the master device can work normally and obtain correct or incorrect responses. In this way, the master device can be tested and verified without relying on the actual slave device, reducing the development difficulty and development time of the master device to improve the reliability and stability of the communication system. At the same time, it can parse the instructions sent by the master device, return data in a specified format according to the master device instructions, and support slave device-side data initialization and data error injection to better monitor the behavior of the master device. It can support single-host point-to-point verification, multi-host point-to-point verification and effective verification of the bus controller.

[0047] In the overall scheme, the device includes: an interface module, which is used to establish network communication between the master device and the slave device; an integrity check module, which is used to analyze the received protocol instructions; a correctness check module, which is used to decrypt and verify the received data to determine the correctness of the data; a data initialization module, which is used to initialize the address space that has never been written, and the data initialization can be configured to be all 0, all 1 or all random, and return the data to the bus controller; a data error injection module, which is used to randomly insert an erroneous value into the data to be sent by the slave device to detect whether the master device has detected the erroneous value; an error feedback module, which is used to collect the error results of the protocol integrity check and the data correctness check, and return the error status; a data transmission control module, which is used to control the format of the data feedback by the slave device.

[0048] The debugging device is connected to an external bus or an external master device via a bus slave port, and the bus slave port is divided into two parts: a receiving part and a sending part;

[0049] The integrity check module and the correctness check module are connected to the receiving part of the bus slave port, and are used to analyze whether the protocol is complete and whether the received data is correct. At the same time, these two modules are connected to the error feedback module to send the analysis results to the error feedback module; the error feedback module is connected to the sending part of the bus slave port to send the feedback results to the bus or the master device;

[0050] The data error injection module, the data initialization module, and the data transmission control module are respectively connected to the sending part of the bus slave port to control the data to be sent to achieve the purpose of returning specific data and a specific format.

[0051] For the data error injection module, the data to be sent can be replaced at any position, and the values ​​of multiple data can be modified at the same time; for example, if the data to be sent is a burst, the length of a burst is 8, that is, 8 data are sent, and the original data are {123, 22, 33, 14, 5, 9, 88, 93}, the data error injection module can replace the data at any position with any value, such as changing 9 to 19, that is, the sent data becomes {123, 22, 33, 14, 5, 19, 88, 93}. The data error injection module can modify the values ​​of multiple data at the same time, not limited to one place.

[0052] The original data is encrypted and becomes the data to be sent. If it is sent directly to the bus without any error, the bus can decrypt it to get the correct data. However, if it is wrong, the bus cannot directly output the original data. Therefore, it is possible to verify whether the bus decryption process is normal and the location of the data error. For example, the location of the data error can be inferred by using the Hamming code algorithm. At the same time, the correctness check module also adopts the same working principle to decode and verify the received encrypted data to determine whether the data is wrong. The decoding method is not limited to CRC, Hamming code, etc.

[0053] The debugging device in this application can be used for on-board debugging in the SOC design process, not limited to chip design processes such as power, artificial intelligence, CPU, GPU, consumer electronics, etc., but is only limited to use in the chip design and development stage, and is not a device used for actual mass production.

[0054] During the chip development phase, the device can verify the correct behavior of the host on the board, thereby ensuring the correctness of the host, accelerating the development process and improving system reliability.

[0055] Furthermore, the multiple functional modules of the present application can be set in detail according to the specific structural characteristics and data transmission form of the master-slave communication system, so that each functional module can fully play its corresponding role. By monitoring the instructions and requests issued by the master device, it can detect in real time whether its behavior complies with the predetermined protocol, and can simulate the data and response of the slave device, so that the master device can work normally and obtain correct or incorrect responses. In this way, the master device can be tested and verified without relying on the actual slave device.

[0056] It is especially noted that if a system contains multiple master and slave models, and they are connected through a bus controller, it is possible to verify whether the bus controller meets expectations. Users can choose the appropriate connection method based on the actual system complexity to better verify the behavior of the master device and speed up the development process of the entire system.

[0057] In summary, a debugging device applied to a master-slave communication system in an embodiment of the present invention is based on the mutual cooperation of multiple functional modules and data transmission, and can monitor the instructions and requests issued by the master device to determine whether the behavior of the master device complies with the predetermined protocol, and can simulate the data and response of the slave device so that the master device can work normally and obtain correct or incorrect responses. In this way, the master device can be tested and verified without relying on the actual slave device, reducing the development difficulty and development time of the master device to improve the reliability and stability of the communication system. At the same time, the instructions sent by the master device can be parsed, and data in a specified format can be returned according to the master device instructions. It also supports slave device-side data initialization and data error injection to better monitor the behavior of the master device. It can support single-host point-to-point verification, multi-host point-to-point verification, and effective verification of the bus controller.

[0058] The above specific implementation manner cannot be used as a limitation on the protection scope of the present invention. For those skilled in the art, any substitution, improvement or change made to the implementation manner of the present invention falls within the protection scope of the present invention.

[0059] The matters not described in detail in the present invention are all known technologies to those skilled in the art.

Claims

1. A debugging device for a master-slave communication system, It is characterized in that The device comprises: An interface module, wherein the interface module is used to establish network communication between the master device and the slave device; An integrity checking module, wherein the integrity checking module is used to analyze the received protocol instructions; A correctness checking module, which is used to perform decryption verification on the received data to determine the correctness of the data; A data initialization module, the data initialization module is used to initialize the address space that has never been written, the data initialization can be configured as all 0, all 1 or all random, and return the data to the bus controller; A data error injection module, which is used to randomly insert an erroneous value into the data to be sent by the slave device to detect whether the master device detects the erroneous value; An error feedback module, which is used to collect error results of protocol integrity check and data correctness check and return an error status; A data transmission control module, wherein the data transmission control module is used to control the format of the feedback data of the slave device; The debugging device is connected to an external bus or an external master device via a bus slave port, and the bus slave port is divided into two parts: a receiving part and a sending part; The integrity check module and the correctness check module are connected to the receiving part of the bus slave port, and are used to analyze whether the protocol is complete and whether the received data is correct. At the same time, these two modules are connected to the error feedback module to send the analysis results to the error feedback module; the error feedback module is connected to the sending part of the bus slave port to send the feedback results to the bus or the master device; The data error injection module, the data initialization module, and the data transmission control module are respectively connected to the sending part of the bus slave port to control the data to be sent to achieve the purpose of returning specific data and a specific format.

2. A debugging device for a master-slave communication system according to claim 1, Features: The interface module is a bus slave end interface module, which can generate a specified interface according to the actual bus protocol configuration, and the interface includes an AXI interface, an AHB interface and an APB interface.

3. A debugging device for a master-slave communication system according to claim 2, Features: The slave device can support multiple connection verification methods, and can connect a single slave and a single host to perform point-to-point verification, that is, connect through a single set of APB bus, AHB bus or AXI bus; it can connect multiple slaves and multiple hosts, and multiple sets of bus interfaces are configured on the slave device to connect to multiple master devices respectively, so as to receive and feedback correspondingly according to the control signals and data sent by the master device.

4. A debugging device for a master-slave communication system according to claim 3, Features: A bus controller can be connected between the master device and the slave device to verify whether the bus controller meets expectations.

5. A debugging device for a master-slave communication system according to claim 1, Features: The data error injection module can replace the data to be sent at any position, and can also modify the values ​​of multiple data at the same time; When the data to be sent is encrypted data, if there is no error, it is sent directly to the bus so that the bus can decrypt and obtain the correct data; when the data is annotated with an error, the bus cannot directly obtain the original data, and the Hamming code algorithm can be used to infer the exact location of the data error.