Isolation protection system and method based on AXI communication
By integrating the master and slave monitoring modules on the AXI bus, the controller enters the takeover mode when monitoring an exception, which solves the problem that the timer timeout monitoring solution cannot actively interfere with the bus exception, and realizes the timely handling of bus exceptions to prevent the hang and spread.
Patent Information
- Application Number
- CN202510578036.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-19
AI Technical Summary
The existing timer-based timeout monitoring scheme cannot actively intervene or handle bus exceptions, causing the problem of bus hang-up in the working domain to spread to other working domains, and it is slow to respond to fast abnormalities, increasing the difficulty of problem tracking and positioning.
The main device monitoring module and slave device monitoring module are integrated on the transmission path of the AXI bus. The information controller generated by the monitoring module enters the takeover mode. The main device monitoring module replaces the main device to respond to data transmission in the era of master equipment abnormality, and the slave device monitoring module replaces the slave device to respond in the era of slave equipment abnormality, ensuring that bus abnormality does not affect other working areas.
It effectively prevents the working domain bus from being sluggish to other working domains, improves the timeliness and accuracy of exception handling, and reduces the diffusion of problems and difficulty in positioning.
Smart Images

Figure CN120508455A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of system-on-chip communication security technology, and specifically to an isolation protection system and method based on AXI communication. Background Art
[0002] In chip design, especially in systems-on-chip (SoCs) with multiple operating domains, inter-domain bus communication isolation and anti-hangup design are crucial. To support diverse application scenarios and meet varying security requirements, and to ensure that a bus failure in one operating domain does not affect other operating domains, a timer-based timeout monitoring mechanism is often used to monitor bus status.
[0003] However, timer-based timeout monitoring solutions have two major drawbacks. First, they can only detect whether a bus anomaly exists, but cannot proactively intervene in or address bus anomalies that have already occurred. Consequently, even if a problem is detected, it cannot immediately prevent it from developing further. Second, timer-based timeout monitoring solutions are slow to respond to certain rapidly occurring and localized anomalies, often requiring problems to spread throughout the entire bus system before being detected. This not only delays problem resolution but also increases the difficulty of problem tracking and location.
[0004] Therefore, timer-based timeout monitoring schemes can introduce active intervention mechanisms. For example, when a bus timeout is detected, in addition to marking an error, it can also automatically trigger a bus reset or switch to a backup channel to continue transmission, thereby reducing the impact of bus hangs. However, this approach also introduces new problems. For example, it cannot resolve anomalies between the master and slave devices, causing the bus hang in the working domain to be transmitted to other working domains. Summary of the Invention
[0005] The present application provides an isolation protection system and method based on AXI communication to solve the problem of a working domain bus deadlock being transmitted to other working domains.
[0006] In a first aspect, the present application provides an isolation protection system based on AXI communication, comprising: a master device, a slave device, and a controller, wherein the master device and the slave device are connected via an AXI bus;
[0007] A master device monitoring module and a slave device monitoring module are sequentially integrated on the transmission path of the AXI bus; the master device monitoring module is used to monitor the bus behavior of the master device side; the slave device monitoring module is used to monitor the bus behavior of the slave device side;
[0008] The controller is configured to:
[0009] When first monitoring information generated by the master device monitoring module is acquired, controlling the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device;
[0010] When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
[0011] Optionally, the slave device monitoring module includes a second timer; the slave device monitoring module is configured to:
[0012] Acquire first channel information of a first channel and second channel information of a second channel between the master device and the slave device; when the master device and the slave device interact, a time when a signal is generated in the first channel is earlier than a time when a signal is generated in the second channel;
[0013] If the first channel information includes a rising edge of the master device request signal, controlling the second timer to count;
[0014] If the second channel information does not include a rising edge of the slave device response signal within a preset time, second monitoring information is generated.
[0015] Optionally, the first channel information further includes first identification data, the first identification data including a request ID and a request data length; the second channel information further includes second identification data, the second identification data including a response ID and a response data length;
[0016] The slave device monitoring module is further configured to:
[0017] extracting first identification data from the first channel information, and extracting second identification data from the second channel information;
[0018] If the first identification data is inconsistent with the second identification data, second monitoring information is generated.
[0019] Optionally, the master device monitoring module includes a first timer, and the master device monitoring module is configured to:
[0020] acquiring the second channel information of the second channel and the third channel information of the third channel between the master device and the slave device; when the master device and the slave device interact, a time when a signal is generated in the second channel is earlier than a time when a signal is generated in the third channel;
[0021] If the second channel information includes a rising edge of the request signal of the slave device, controlling the first timer to count;
[0022] If the third channel information does not include a rising edge of the response signal of the master device within a preset time, first monitoring information is generated.
[0023] Optionally, the master device monitoring module is further configured to:
[0024] Acquire fourth channel information of a fourth channel and fifth channel information of a fifth channel between the master device and the slave device; when the master device and the slave device interact, a time when a signal is generated in the fourth channel is earlier than a time when a signal is generated in the fifth channel;
[0025] If the wlast signal in the fifth channel information becomes a rising edge, the preset transmission quantity in the fourth channel information and the actual transmission quantity of the transmitted data in the fifth channel information are obtained; the preset transmission quantity is the preset transmission quantity represented by the awlen signal that the master device plans to continuously write data to the slave device;
[0026] If the actual transmission quantity is not equal to the preset transmission quantity, first monitoring information is generated.
[0027] Optionally, the master device monitoring module is further configured to:
[0028] When the preset transmission number is the same as the actual transmission number, if the fifth channel information does not include a rising edge of the wlast signal of the master device, first monitoring information is generated.
[0029] Optionally, when the master device monitoring module enters the master device takeover mode, the master device monitoring module is configured to:
[0030] interrupting AXI bus communication between the master device and the slave device;
[0031] Generate a pending task signal and send the pending task signal to the slave device; the pending task signal includes a pending read task signal or a pending write task signal;
[0032] receiving a response signal returned from the slave device;
[0033] An interrupt signal is generated to record the ID and address of the task signal to be processed.
[0034] Optionally, when the slave device monitoring module enters the slave device takeover mode, the slave device monitoring module is configured to:
[0035] interrupting AXI bus communication between the master device and the slave device;
[0036] Receive a request from the master device and return preset data according to the request type; the request type includes a read request or a write request; when the request type is the read request, the preset data returned by the slave device monitoring module includes a read data signal and a read response signal; when the request type is the write request, the preset data returned by the slave device monitoring module includes write response data;
[0037] An interrupt signal is generated to record the address channel and address ID of the request.
[0038] Optionally, a reset register is further included, wherein the reset register includes at least one status bit for controlling the takeover mode;
[0039] The controller is configured to:
[0040] Setting the status bit to a first preset value so that the master device monitoring module or the slave device monitoring module enters a takeover mode;
[0041] If the status bit is changed from the first preset value to the second preset value, generating an exit instruction for exiting the takeover mode;
[0042] The exit instruction is sent to the master device monitoring module or the slave device monitoring module to restore the AXI bus communication between the master device and the slave device.
[0043] In a second aspect, the present application provides an isolation protection method based on AXI communication, which is applied to the isolation protection system based on AXI communication described in the first aspect, wherein the system includes a controller, a master device, a master device monitoring module, a slave device, and a slave device monitoring module; the method includes:
[0044] When first monitoring information generated by the master device monitoring module is obtained, controlling the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device;
[0045] When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
[0046] It can be seen from the above technical solution that the present application provides an isolation protection system and method based on AXI communication, wherein the system includes: a master device, a slave device and a controller, wherein the master device and the slave device are connected via an AXI bus; a master device monitoring module and a slave device monitoring module are sequentially integrated on the transmission path of the AXI bus; the master device monitoring module is used to monitor the bus behavior on the master device side; the slave device monitoring module is used to monitor the bus behavior on the slave device side; the controller is configured to: when obtaining the first monitoring information generated by the master device monitoring module, control the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device; when obtaining the second monitoring information generated by the slave device monitoring module, control the slave device monitoring module to enter a takeover mode so that the slave device monitoring module interacts with the master device. In this application, the master device monitoring module can replace the master device when an abnormality occurs in the master device, respond to the unfinished data transmission task and save the relevant error information. The slave device monitoring module can replace the slave device when an abnormality occurs in the slave device and return a response that complies with the protocol. When an abnormality occurs in the bus, the problematic transmission task will be resolved and recorded without affecting subsequent transmissions, so as to solve the problem of the working domain bus hanging and transmitting to other working domains. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0048] Figure 1 Schematic diagram of the first AXI communication-based isolation protection system provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of the master-slave device connection based on AXI communication provided in an embodiment of the present application;
[0050] Figure 3 An example diagram of the controller execution process provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of the operation flow of the first master device abnormality isolation protection system provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the operation flow of the second master device abnormal isolation protection system provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the operation flow of the first slave device abnormality isolation protection system provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the operation flow of the second slave device abnormality isolation protection system provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of a second AXI communication-based isolation protection system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following embodiments are described in detail, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numbers in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following embodiments are not intended to represent all possible implementations consistent with the present application. They are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the claims.
[0057] In this application, the terms "first," "second," and the like are used to distinguish identical or similar items having substantially the same role and function. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms.
[0058] These terms are simply used to distinguish one element from another. For example, without departing from the scope of various examples, a first action can be referred to as a second action, and similarly, a second action can also be referred to as a first action. Both the first action and the second action can be actions, and in some cases, can be separate and different actions.
[0059] Here, at least one refers to one or more than one. For example, at least one action can be one action, two actions, three actions, or any other action that is an integer greater than or equal to one. And multiple refers to two or more than two. For example, multiple actions can be two actions, three actions, or any other action that is an integer greater than or equal to two.
[0060] In SoC (System on Chip) design, the concepts of master and slave primarily relate to device interaction on a bus. A master is the device that actively initiates data transfers, while a slave is the device that passively responds to data transfers. The master initiates read and write requests, while the slave performs read and write operations based on those requests.
[0061] In some embodiments, the master device is responsible for initiating read and write operations on the bus. The master device requests data transfer by sending an address, control signals, and data. For example, when a CPU (Central Processing Unit) interacts with a memory or peripheral device, the CPU acts as a master device to send read and write requests. The slave device can respond to the master device's request and perform corresponding operations based on the address, control signals, and data sent by the master device. For example, the memory or peripheral device acts as a slave device to receive read and write requests from the CPU and perform corresponding data transfers.
[0062] Furthermore, the master device sends an address and control signal via the bus to specify the slave device to be accessed and the type of operation, where the operation type includes read and write operations. After receiving the request, the slave device will perform the corresponding operation. For example, if the operation type sent by the master device is a read operation, the slave device reads data. When the operation type sent by the master device is a write operation, the slave device can write data. If the operation is successful, the slave device will return status information to the master device via the bus; if it fails, it will also return an error message. After the read and write operation is completed, the data will be transferred between the master and the slave device. If it is a write operation, the data will be transferred from the master device to the slave device; if it is a read operation, the data will be transferred from the slave device to the master device.
[0063] The isolation protection system based on AXI communication provided by the embodiment of the present application can be applied to SoC. The master device and the slave device follow the AXI communication protocol. Among them, the AXI (Advanced eXtensible Interface) communication protocol is provided with five standard channels, namely, a read data channel, a write data channel, a read address channel, a write address channel and a write response channel. Each data channel needs to comply with the two-way handshake protocol, that is, use the valid signal and the ready signal as control signals to transmit data. Only when the valid signal and the ready signal are high at the same time, data can be sent normally between the master device and the slave device. Among them, valid means that the address, data and control signals are valid, and the ready signal means that it is ready to receive data or control information. It is understandable that for the handshake protocol of the data path, in actual engineering projects, it can also be set that when the valid signal and the ready signal are low at the same time, data can be sent normally between the master device and the slave device.
[0064] like Figure 2 As shown, for the five standard channels of the AXI communication protocol, the specific functions of the signals appearing in the embodiments of the present application are as follows:
[0065] In the read address channel, arvalid is issued by the master device to indicate that the address and control signals are valid. arready is issued by the slave device to indicate that it is ready to receive address and control signals. arid is the transaction ID issued by the master device to distinguish multiple concurrent transactions. arlen is issued by the master device to indicate the length of the burst transfer.
[0066] In the read data channel, rvalid is sent by the slave device, indicating that the data is valid. rready is sent by the master device, indicating that it is ready to receive data. rid is sent by the slave device, indicating the transaction ID, corresponding to arid. rlast is sent by the slave device, indicating the last data in the burst transfer.
[0067] In the write address channel, awvalid is issued by the master device to indicate that the write address and control signals are valid. awready is issued by the slave device to indicate that it is ready to receive address and control signals. awid is issued by the master device to indicate the transaction ID, used to distinguish multiple concurrent transactions. awlen is issued by the master device to indicate the length of the burst transfer.
[0068] In the write data channel, wvalid is sent by the master device to indicate that the write data is valid. wready is sent by the slave device to indicate that it is ready to receive data. wlast is sent by the master device to indicate the last data of the burst transmission.
[0069] In the write response channel, bvalid is sent by the slave device, indicating that the write response is valid. bready is sent by the master device, indicating that it is ready to receive the write response. bid is sent by the slave device, indicating the transaction ID, which corresponds to awid.
[0070] In a system-on-chip (SoC) with multiple operating domains, inter-domain bus communication isolation and anti-hangup design are crucial. To support diverse application scenarios and meet varying security requirements, and to ensure that a bus failure in one operating domain does not affect other operating domains, a timer-based timeout monitoring mechanism can be used to monitor bus status.
[0071] However, timer-based timeout monitoring solutions have two major drawbacks. First, they can only detect whether a bus anomaly exists, but cannot proactively intervene in or address bus anomalies that have already occurred. Consequently, even if a problem is detected, it cannot immediately prevent it from developing further. Second, timer-based timeout monitoring solutions are slow to respond to certain rapidly occurring and localized anomalies, often requiring problems to spread throughout the entire bus system before being detected. This not only delays problem resolution but also increases the difficulty of problem tracking and location.
[0072] Therefore, to solve the problem of the work domain bus hanging and transferring to other work domains, see Figure 1 Some embodiments of the present application provide an isolation protection system based on AXI communication, including:
[0073] The master device, slave device and controller are connected with each other through the AXI bus.
[0074] A master device monitoring module and a slave device monitoring module are sequentially integrated on the transmission path of the AXI bus; the master device monitoring module is used to monitor the bus behavior on the master device side; and the slave device monitoring module is used to monitor the bus behavior on the slave device side.
[0075] Among them, in the SoC architecture, the master device is usually a core processing unit such as a CPU or accelerator, and the slave device is the storage controller corresponding to the core processing unit; in the FPGA architecture, the master device is generally a microprocessor or a high-speed interface, and the slave device is an external interface; in a high-speed data acquisition system, the master device is the data acquisition module, and the slave device is the sensor or data source that needs to collect data.
[0076] In some embodiments, the master device is responsible for initiating data transmission requests to the slave device, including read operations and write operations. For example, in the SoC architecture, the CPU acts as the master device and initiates a read operation request when it needs to obtain data from the external memory. During a write operation, the master device sends the data generated by itself to the slave device through the write data channel. For example, the CPU writes the processed data to the external memory, and the CPU acts as the data provider. In addition, the master device has the initiative in data transmission. The master device can decide when to initiate the transmission, the amount of data to be transmitted, and the order of transmission. The master device can also adjust the progress of the transmission according to the response of the slave device to ensure smooth data transmission.
[0077] In some embodiments, a slave device must be able to promptly receive read and write requests from a master device and perform corresponding operations based on information such as the request type and address. For example, in an FPGA (Field Programmable Gate Array) architecture, when a CPU initiates a read request to a module within the FPGA, that module, acting as a slave device, must correctly receive the request and prepare the data. The slave device provides data storage space for the master device and, during a read operation, returns the data required by the master device to the master device. For example, an external ROM (Read-Only Memory) chip, acting as a slave device, stores the program code required for system startup. When the CPU needs to read this code, the ROM provides the corresponding data to the CPU. Furthermore, the slave device provides feedback to the master device regarding data transmission status, such as whether data was successfully received and whether it is ready for the next transmission. This allows the master device to understand the transmission status and make appropriate decisions, ensuring the accuracy and reliability of data transmission.
[0078] The master device monitoring module and the slave device monitoring module are mainly used to monitor the level changes in the data channel of the AXI bus during the interaction between the master device and the slave device. For example, when the master device initiates a read data or write data request to the slave device, the master device monitoring module can monitor whether the master device and the slave device have any abnormalities based on the level changes.
[0079] The isolation protection system based on AXI communication provided by the embodiment of the present application can be applied to the connection and communication between modules in SoC, the connection and communication between different IP cores inside FPGA, and the connection between ADC (Analog-to-digital converter), FPGA and storage unit in high-speed data acquisition system. For example, in SoC, different functional modules such as CPU, GPU (Graphics Processing Unit), DMA (Direct Memory Access) controller, various peripherals, etc. are often connected by AXI bus to achieve efficient data communication and collaborative work between modules. A master device monitoring module and a slave device monitoring module are set on the transmission path of the AXI bus.
[0080] The AXI bus is often used to connect and communicate between different IP cores within an FPGA, connecting custom logic modules with other standard IP cores to quickly build complex digital systems. For example, it is used in FPGA processing units in communication base stations and FPGA systems for industrial control.
[0081] In high-speed data acquisition systems, the AXI bus can be used to connect ADCs, FPGAs, and storage units, enabling rapid transmission and processing of high-speed data from the acquisition end to the processing end and then to the storage end.
[0082] In network communication chips or systems, the AXI bus can be used to connect network processors, MAC (Media Access Control) layer chips, physical layer chips, etc., to achieve efficient transmission and processing of data packets between modules at different levels.
[0083] The following is a detailed introduction to the execution process of the isolation protection system based on AXI communication provided in the embodiment of the present application.
[0084] like Figure 3 The controller is configured as follows:
[0085] S100: When first monitoring information generated by the master device monitoring module is acquired, the master device monitoring module is controlled to enter a takeover mode, so that the master device monitoring module interacts with the slave device.
[0086] The master device detection module is integrated on the AXI bus between the master device and the slave device. The master device monitoring module can monitor the communication status of the master device and the slave device. When an abnormality occurs in the master device, for example, the master device delays response, the master device monitoring module obtains the delayed response of the master device, generates first monitoring information and sends it to the controller. The controller controls the master device monitoring module to enter the takeover mode, disconnects the communication connection between the master device and the slave device, and interacts with the slave device on behalf of the master device.
[0087] Among them, such as Figure 4 As shown, the master device monitoring module detects a master device response delay. In some embodiments, the master device monitoring module includes a first timer, and the master device monitoring module is configured to:
[0088] Obtain second channel information of a second channel and third channel information of a third channel between a master device and a slave device;
[0089] If the second channel information includes a rising edge of a request signal from the slave device, controlling the first timer to count;
[0090] If the third channel information does not include a rising edge of the response signal of the master device within a preset time, first monitoring information is generated.
[0091] Among them, the second channel information of the second channel includes the request information sent by the slave device to the master device, and the third channel information of the third channel includes the request information of the master device in response to the slave device. Therefore, when the master device and the slave device interact, the time when the signal is generated in the second channel is earlier than the time when the signal is generated in the third channel.
[0092] The request signal sent by the slave device to the master device is at a high level. The master device monitoring module can monitor that the second channel information includes the rising edge of the request signal of the slave device. At this time, the master device monitoring module controls the first timer to count. Within the preset time, the master device does not set the response signal corresponding to the slave device request signal to a high level. The third channel information monitored by the master device monitoring module does not include the rising edge of the response signal of the master device, indicating that an abnormality has occurred in the master device. Then, the master device monitoring module generates first monitoring information.
[0093] For example, Figure 4As shown in the figure, when the master device sends a read request to the slave device through the read address channel, the master device can place information such as address information, control information, and related identifiers on the read address channel and set the arvalid signal to a high level to indicate that the address and control information are ready. At the same time, the master device waits for the slave device to feedback the arready signal to confirm that the slave device is ready to receive the address and control information. When the slave device is ready to receive the address and control information, the slave device sets the arready signal to a high level. At this point, the master and slave devices complete the handshake through the read address channel. The master device sends a read address request to the slave device, and the slave device confirms acceptance.
[0094] After the slave device confirms receipt of the read address request from the master device, it processes and prepares data. After the processing is completed, the slave device sends data to the master device through the read data channel. The slave device sets the rvalid signal to a high level, indicating that the data is ready. At this time, the second channel information includes the rising edge high level of the rvalid signal. When the master device receives the rvalid signal as a high level, the master device monitoring module will monitor in real time whether the third channel information includes the rising edge of the rready signal. If the master device does not set the rready signal to a high level within the preset time, it means that the master device is delaying response, and the master device monitoring module generates the first monitoring information.
[0095] In addition, if Figure 5 As shown in Figure 1, when the master device sends a write request to the slave device through the write address channel, the master device can place address information, control information, and related identifiers on the write address channel and set the awvalid signal to a high level to indicate that the address and control information are ready. At the same time, the master device waits for the slave device to feedback the awready signal and confirm that the slave device is ready to receive the address and control information.
[0096] When the master device receives the awready signal from the slave device, it starts to send data to the slave device through the write data channel. The master device puts the data on the write data channel and sets the wvalid signal to a high level, indicating that the data is ready. At this time, the master device continues to wait for the slave device to feedback the wready signal to confirm that the slave device is ready to receive data.
[0097] After receiving the write address and data from the master device, the slave device processes them. After the processing is completed, the slave device sends a write response signal to the master device through the write response channel. The slave device sets the bvalid signal to a high level, indicating that the write response is ready.
[0098] The slave device sends a write response signal to the master device through the write response channel, and the slave device sets the bvalid signal to be valid, indicating that the write response is ready. After receiving the bvalid signal, the master device does not set the bready signal to a high level within the specified time. At this time, the master device monitoring module generates the first monitoring information. Among them, when the slave device sets the bvalid signal to a high level, the master device monitoring module can obtain the rising edge of the bvalid signal from the second channel information. At this time, the master device monitoring module controls the timing of the first timer. Within the preset time, if the master device does not set the bready signal to a high level within the preset time, and the master device monitoring module does not obtain the rising edge of the bready signal in the third channel information, then the master device response is delayed, and the master device monitoring module generates the first monitoring information.
[0099] Among them, the address information is used to specify the storage location where the data will be written. The slave device data can write data to a specific memory address or register based on the address information, and the control information contains various control parameters and properties related to this operation. For example, it includes data alignment, burst transmission type (such as incremental burst, fixed burst, etc.), whether to use cache, and cache strategy. The related identifier is mainly used to distinguish different write transactions. For example, the master device may initiate multiple write requests at the same time, and the related identifier can help the slave device distinguish these requests and provide independent response and management for each request.
[0100] It is understandable that when the slave device sets the awvalid signal to a high level, and the master device receives the awvalid signal from the slave device as a high level, but the master device does not set the wvalid signal to a high level within a preset time, then the master device monitoring module generates first monitoring information. When the slave device sets the awvalid signal to a high level, the master device monitoring module can detect a rising edge of the awvalid signal in the second channel. At this time, the first timer is controlled to count. If the master device monitoring module does not detect a rising edge of the wvalid signal in the second channel within the preset time, indicating that the master device has an abnormality, the master device monitoring module generates the first monitoring information.
[0101] Since the communication between the master device and the slave device is based on the AXI communication protocol, after the master device sends a request signal to the slave device, the slave device will generate a response signal corresponding to the request signal. Therefore, after the slave device generates a response based on the request signal of the master device, when the slave device sends a request to the master device, if the master device does not make a corresponding response within the preset time, it indicates that the master device is abnormal. The master device abnormality can be discovered through the master device monitoring module and the first monitoring information can be generated.
[0102] In addition, in some embodiments, the master device monitoring module is further configured to:
[0103] The fourth channel information of the fourth channel and the fifth channel information of the fifth channel between the master device and the slave device are obtained.
[0104] When the master device and the slave device interact, the time when the signal is generated in the fourth channel is earlier than the time when the signal is generated in the fifth channel.
[0105] If the wlast signal in the fifth channel information becomes a rising edge, the preset transmission quantity in the fourth channel information and the actual transmission quantity of the transmitted data in the third channel information are acquired.
[0106] If the actual transmission quantity is not equal to the preset transmission quantity, first monitoring information is generated.
[0107] The preset number of transfers, awlen, indicates the preset number of transfers that the master device plans to continuously write data to the slave device. The master device sends write address information, including awlen, to the slave device via the write address channel, which is the fourth channel, to inform the slave device of the length of the current burst write operation. The master device then begins sending write data via the write data channel. When sending the last write data, it pulls the wlast signal high. At this point, the write data channel is the fifth channel, and the wlast signal goes high to indicate the final data transfer cycle of the current burst write operation.
[0108] When the wlast signal becomes high, the preset transmission number in this data transmission process can be obtained through the awlen signal, and then the actual transmission number is obtained by recording the number of times each valid write data is received (the wvalid and wready signals are valid) in the write data state. The preset transmission number is compared with the actual transmission number. When the preset transmission number is different from the actual transmission number, it indicates that the master device is abnormal, and the master device monitoring module generates a first monitoring signal.
[0109] In another embodiment, the master device monitoring module is further configured to:
[0110] When the preset transmission number is the same as the actual transmission number, if the fifth channel information does not include a rising edge of the wlast signal of the master device, first monitoring information is generated.
[0111] Among them, the master device sends write address information including awlen to the slave device through the write address channel, informing the slave device of the length information of the burst write operation. After obtaining the preset transmission quantity, the master device monitoring module records the number of times each valid write data is received (wvalid and wready signals are valid) in the write data state to obtain the actual transmission quantity. When the preset transmission quantity and the actual transmission quantity are equal, it indicates that the last data transmission is completed, but the master device monitoring module does not detect that the wlast signal of the master device changes from a low level to a high level, then the master device is abnormal and fails to respond in time, and generates the first monitoring information.
[0112] When the controller receives the first monitoring information generated by the master device monitoring module, it can control the master device monitoring module to enter the takeover mode. When the master device monitoring module enters the master device takeover mode, the master device monitoring module is configured to:
[0113] Interrupts AXI bus communication between a master and a slave device.
[0114] Generates a pending task signal and sends the pending task signal to the slave device.
[0115] Receive the response signal returned from the device.
[0116] Generate an interrupt signal to record the ID and address of the task signal to be processed.
[0117] Among them, the pending task signal includes a pending read task signal or a pending write task signal. When the master device initiates a read address request or a write address request to the slave device, the slave device responds to the read address request or the write address request of the master device. Then, the slave device will initiate a read data request or a write data request to the master device. When the master device does not respond to the request of the slave device within the preset time, the master device monitoring module generates a response signal corresponding to the request issued by the slave device to replace the master device to interact with the slave device.
[0118] For example, after receiving the first monitoring information, the controller controls the master device monitoring module to enter the takeover mode.
[0119] When the master monitoring module enters takeover mode, it interrupts ongoing AXI bus communication between the master and slave devices. For example, it sends a specific interrupt signal to the AXI bus control logic, preventing the slave from sending invalid requests. It then receives responses from the slave on behalf of the master. Responses are messages initiated by the slave but not yet responded to by the master.
[0120] Finally, the master device monitoring module generates an interrupt signal and records key information, such as the ID and address of the pending task signal. This information is stored in a dedicated log or status register, allowing subsequent debugging and analysis personnel to accurately identify the location and cause of the AXI bus communication problem, enabling more efficient troubleshooting and system repair.
[0121] S200: When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
[0122] The slave device detection module is integrated on the AXI bus between the master device and the slave device. The slave device monitoring module can monitor the communication status of the master device and the slave device. When an abnormality occurs in the slave device, for example, the slave device delays the response, the slave device monitoring module obtains the delayed response of the slave device, generates second monitoring information and sends it to the controller. The controller controls the slave device monitoring module to enter the takeover mode, disconnects the communication connection between the master device and the slave device, and interacts with the master device on behalf of the slave device.
[0123] In some embodiments, Figure 6 As shown, the slave device monitoring module includes a second timer; the slave device monitoring module is configured to:
[0124] Acquire first channel information of a first channel and second channel information of a second channel between a master device and a slave device;
[0125] If the first channel information includes a rising edge of a master device request signal, controlling the second timer to count;
[0126] If the second channel information does not include a rising edge of the slave device response signal within a preset time, second monitoring information is generated.
[0127] When the master and slave devices interact, the signal generated in the first channel occurs earlier than the signal generated in the second channel. When the master device initiates a read or write request to the slave device, the master device raises the valid signal, and the first channel information obtained by the slave monitoring module includes the rising edge of the valid signal. At this point, when the slave device is operating normally, after receiving the request information from the master device, the slave device raises the ready signal, completing the handshake between the master and slave devices. At this point, the second channel information obtained by the slave monitoring module includes the rising edge of the ready signal. Therefore, the signal generated in the first channel occurs earlier than the signal generated in the second channel.
[0128] When an abnormality occurs in the slave device, a response delay problem will occur. Therefore, the first channel information of the first channel and the second channel information of the second channel can be obtained through the slave device monitoring module. When the first channel information includes the rising edge of the master device request signal, the second timer is controlled to time. Within the preset time, when the second channel information obtained from the slave device monitoring module does not have the rising edge of the response signal corresponding to the master device request signal, the slave device has an abnormality and generates second monitoring information.
[0129] For example, Figure 6 As shown, when the master device sends a read request to the slave device through the read address channel, it sets the arvalid signal to a high level. At the same time, the master device waits for the slave device to feedback the arready signal. After the slave device receives the read address request from the master device, the slave device does not set the arready signal to a high level. At this time, the slave device monitoring module generates the second monitoring information. Among them, after the master device sets the arvalid signal to a high level, the slave device monitoring module detects that the first channel information includes the rising edge of the request signal of the master device. At this time, the second timer is controlled to time. Within the preset time, the slave device does not set the arvalid signal to a high level within the preset time. The second channel information does not include the rising edge of the response signal of the slave device, indicating that the slave device has an abnormality, and the slave device monitoring module generates the second monitoring information.
[0130] like Figure 7 As shown in Figure 1, when the master device sends a write request to the slave device through the write address channel and sets the awvalid signal to a high level, it indicates that the address and control information are ready. At the same time, the master device waits for the slave device to feedback the awready signal and confirm that the slave device is ready to receive the address and control information.
[0131] After receiving the awready signal from the slave device, the master device begins sending data to the slave device via the write data channel. The master device places the data on the write data channel and sets the wvalid signal to a high level, indicating that the data is ready. At this point, the master device continues to wait for the slave device to feedback the wready signal. However, the slave device does not set the wready signal to a high level within a preset time. At this point, the slave device monitoring module generates first monitoring information. The master device sets the wvalid signal to a high level. The slave device monitoring module monitors the rising edge of the master device request signal obtained in the first channel information. At this point, the second timer is controlled to count. If the slave device does not set the wvalid signal to a high level within the preset time, and the second channel signal obtained by the slave device monitoring module does not include the rising edge of the slave device response signal, indicating that the slave device has an abnormality, the slave device monitoring module generates second monitoring information.
[0132] Since the communication between the master device and the slave device is based on the AXI communication protocol, after the master device sends a request signal to the slave device, the slave device will generate a response signal corresponding to the request signal. However, after the master device sends a request signal to the slave device, if the slave device does not generate a corresponding response signal within a preset time, it indicates that an abnormality has occurred in the slave device. The slave device abnormality can be detected through the slave device monitoring module and the second monitoring information can be generated.
[0133] In addition, an identifier is required during the data transmission process to confirm whether the quantity and address of the data transmission are normal. In some embodiments, the first channel information also includes first identification data, and the first identification data includes a request ID and a request data length; the second channel information also includes second identification data, and the second identification data includes a response ID and a response data length;
[0134] The slave monitoring module is also configured to:
[0135] extracting first identification data from the first channel information, and extracting second identification data from the second channel information;
[0136] If the first identification data is inconsistent with the second identification data, second monitoring information is generated.
[0137] For example, when a master device initiates a read command to a slave device via a read address channel, the read address channel includes first identification data, where the first identification data may be a request ID and a response data length. The response data length may be a read burst length signal (arlen), which indicates the amount of data the master device wishes to read from the slave device.
[0138] After receiving the signal from the read address channel, the slave device prepares the data and sends it back to the master device through the read data channel. The rlast signal in the read data channel is used to indicate the last data transmission of the current read operation.
[0139] If the number of data returned by the slave device during a read operation is inconsistent with the number expected by the master device, a mismatch between rlast and arlen will occur. For example, if the master device expects to read four data points (arlen = 3, indicating a burst length of 4), but the slave device only returns three data points, or if the slave device returns five data points, the rlast signal is delayed from being pulled low or high, and the first identification data and the second identification data are inconsistent. This indicates that the slave device has an abnormality, and the slave device monitoring module generates the second monitoring information.
[0140] During a read operation, when the master device initiates a read command, it includes a request ID in the read address channel. The request ID can be the read command identifier (arid). arid is used by the slave device to track read requests from different masters so that it can respond correctly.
[0141] When the slave device returns read data, it uses the read command identifier (rid) in the read data channel to identify the corresponding read request. The slave device needs to set the rid to a value that matches the arid sent by the master device. If the rid returned by the slave device does not match the arid previously sent by the master device, the first identification data and the second identification data are inconsistent, indicating that the slave device has an abnormality, and the slave device monitoring module generates second monitoring information.
[0142] During a write operation, the master device initiates a write command to the slave device via a write address channel. The first channel may be a write address channel, and the request ID in the first channel information may be a write data identifier (awid). The awid is used by the slave device to track write requests from different master devices.
[0143] After the slave device receives the signal from the write address channel, it prepares to receive data. The master device sends data through the write data channel and includes the write data identifier wid in the write data channel. After receiving the data, the slave device returns a response through the write response channel and includes the response identifier bid in the write response channel. The second channel is the write response channel, and the identification data in the second channel information can be the response identifier bid. bid needs to match the wid of the master device. When the bid returned by the slave device does not match the awid of the master device, a mismatch between bid and awid occurs. This indicates that an abnormality has occurred in the slave device and a second monitoring line is generated.
[0144] In some embodiments, when the slave device monitoring module enters the slave device takeover mode, the slave device monitoring module is configured to:
[0145] Interrupt the AXI bus communication between the master and slave devices;
[0146] Receive requests from the master device and return preset data according to the request type;
[0147] Among them, the request type includes a read request or a write request; when the request type is a read request, the preset data returned by the slave device monitoring module includes a read data signal and a read response signal; when the request type is a write request, the preset data returned by the slave device monitoring module includes write response data. For example, when the master device sends a read request signal to the slave device, the slave device is abnormal, and after the slave device monitoring module interrupts the AXI bus communication between the master device and the slave device, the slave device monitoring module will return a preset signal to the master device, wherein the preset signal includes a read data signal of 0 and a read response of 0, indicating that valid read data cannot be provided at present and the read operation has not been successfully completed. When the master device sends a write request signal to the slave device, the slave device is abnormal, and after the slave device monitoring module terminates the AXI bus communication between the master device and the slave device, the slave device monitoring module will send preset data to the master device, wherein the preset data includes a write response of 0, indicating that the write operation has not been successfully completed.
[0148] Generates an interrupt signal to record the address channel and address ID of the request.
[0149] After the slave device monitoring module returns the preset data to the master device on behalf of the slave device, the slave device monitoring module will generate an interrupt signal and record the read request or write request sent by the master device.
[0150] For example, upon receiving the second monitoring information, the controller immediately controls the slave monitoring module to enter takeover mode. Once in takeover mode, the slave monitoring module interrupts ongoing AXI bus communication between the master and slave devices. It also sends a specific interrupt signal to the AXI bus control logic, preventing the master from continuing to send invalid requests. It also notifies the slave to pause processing of potentially problematic requests, thus preventing data transmission errors or inconsistencies.
[0151] After a slave device experiences an abnormality, the slave monitoring module receives requests from the master device on its behalf and returns preset data based on the request type. If the slave monitoring module receives a read request (e.g., the master device sends a read request to the slave device via the read address channel or read data channel), after the slave monitoring module enters takeover mode, the preset data returned by the slave monitoring module to the master device includes a read data signal of 0 and a read response of 0. If the slave monitoring module receives a write request (e.g., based on a unique signal from the write data channel or write address channel), the preset data returned by the slave monitoring module includes a write response of 0.
[0152] Finally, the slave device monitoring module generates an interrupt signal and records the requested address channel and address ID. For example, key information such as the address information and address ID of the read or write address channel is recorded and stored in a dedicated log or status register. This allows subsequent debugging and analysis personnel to accurately understand the location and cause of the AXI bus communication problem, thereby more efficiently troubleshooting and repairing the system.
[0153] In some embodiments, as Figure 8 As shown, the controller further includes a reset register, which contains at least one status bit for controlling the takeover mode.
[0154] The controller is configured as:
[0155] The status bit is set to a first preset value, so that the master device monitoring module or the slave device monitoring module enters a takeover mode.
[0156] If the status bit is changed from the first preset value to the second preset value, an exit instruction for exiting the takeover mode is generated.
[0157] An exit command is sent to the master monitor module or the slave monitor module to resume AXI bus communication between the master and the slave.
[0158] Among them, the status bits of the reset register are 0 and 1, that is, the first preset value can be set to 0 and the second preset value can be set to 1, or the first preset value can be set to 1 and the second preset value can be set to 0. Taking the first preset value as 0 and the second preset value as 1 as an example, when the first preset value is 0, it means that the master device monitoring module or the slave device monitoring module is in takeover mode. At this time, an abnormality occurs in the master device or the slave device, and the connection between the master device and the slave device is disconnected. When the abnormality of the master device or the slave device is resolved, the user or staff needs to manually change the status bit of the reset register from 0 to 1. When the controller detects that the status bit of the reset register changes from 0 to 1, it can generate an exit instruction for exiting the takeover mode to control the master device monitoring module or the slave device monitoring module to exit the takeover mode and restore the AXI bus communication between the master device and the slave device.
[0159] In some embodiments, embodiments of the present application provide an isolation protection method based on AXI communication, which is applied to the isolation protection system based on AXI communication provided in the above embodiments. The isolation protection system based on AXI communication includes a controller, a master device, a master device monitoring module, a slave device, and a slave device monitoring module. The isolation protection method based on AXI communication includes:
[0160] When first monitoring information generated by the master device monitoring module is obtained, controlling the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device;
[0161] When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
[0162] It should be noted that the isolation protection system based on AXI communication provided in the above embodiment and the isolation protection method embodiment based on AXI communication belong to the same concept. The specific implementation process is detailed in the device embodiment and will not be repeated here.
[0163] The embodiment of the present application provides an isolation protection method based on AXI communication. When the master device monitoring module generates the first monitoring information, the master device monitoring module controls the master device to disconnect from the slave device, and responds to the unfinished transmission and saves the relevant error information on behalf of the master device. When the slave device monitoring module generates the second monitoring information, the slave device monitoring module controls the slave device to disconnect from the master device, and communicates with the master device on behalf of the slave device, returning a response that complies with the protocol, so as to solve the problem of the working domain bus being hung and transmitting to other working domains.
[0164] It can be seen from the above technical solution that the present application provides an isolation protection system and method based on AXI communication, wherein the system includes: a master device, a slave device and a controller, and the master device and the slave device are connected through an AXI bus; the master device monitoring module and the slave device monitoring module are integrated in sequence on the transmission path of the AXI bus; the master device monitoring module is used to monitor the bus behavior on the master device side; the slave device monitoring module is used to monitor the bus behavior on the slave device side; the controller is configured to: when the first monitoring information generated by the master device monitoring module is obtained, control the master device monitoring module to enter the takeover mode so that the master device monitoring module interacts with the slave device; when the second monitoring information generated by the slave device monitoring module is obtained, control the slave device monitoring module to enter the takeover mode so that the slave device monitoring module interacts with the master device. In this application, the master device monitoring module can replace the master device when an abnormality occurs in the master device, respond to the incomplete transmission and save the relevant error information. The slave device monitoring module can replace the slave device when an abnormality occurs in the slave device and return a response that complies with the protocol. When an abnormality occurs in the bus, the transmission process with the problem will be resolved and recorded, which will not affect subsequent transmissions, so as to solve the problem of the working domain bus hanging and transmitting to other working domains.
[0165] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without expending creative work shall fall within the scope of protection of this application.
Claims
1. An isolation protection system based on AXI communication, characterized in that: include: A master device, a slave device and a controller, wherein the master device and the slave device are connected via an AXI bus; A master device monitoring module and a slave device monitoring module are sequentially integrated on the transmission path of the AXI bus; the master device monitoring module is used to monitor the bus behavior on the master device side; The slave device monitoring module is used to monitor the bus behavior of the slave device side; The controller is configured to: When first monitoring information generated by the master device monitoring module is acquired, controlling the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device; When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
2. The AXI communication-based isolation protection system according to claim 1, characterized in that: The slave device monitoring module includes a second timer; the slave device monitoring module is configured to: Acquire first channel information of a first channel and second channel information of the second channel between the master device and the slave device; When the master device and the slave device interact, a time when a signal is generated in the first channel is earlier than a time when a signal is generated in the second channel; If the first channel information includes a rising edge of the master device request signal, controlling the second timer to count; If the second channel information does not include a rising edge of the slave device response signal within a preset time, second monitoring information is generated.
3. The AXI communication-based isolation protection system according to claim 2, characterized in that: The first channel information further includes first identification data, which includes a request ID and a request data length; the second channel information further includes second identification data, which includes a response ID and a response data length; The slave device monitoring module is further configured to: extracting first identification data from the first channel information, and extracting second identification data from the second channel information; If the first identification data is inconsistent with the second identification data, second monitoring information is generated.
4. The isolation protection system based on AXI communication according to claim 2, characterized in that: The master device monitoring module includes a first timer, and the master device monitoring module is configured to: acquiring the second channel information of the second channel and the third channel information of the third channel between the master device and the slave device; when the master device and the slave device interact, a time when a signal is generated in the second channel is earlier than a time when a signal is generated in the third channel; If the second channel information includes a rising edge of the request signal of the slave device, controlling the first timer to count; If the third channel information does not include a rising edge of the response signal of the master device within a preset time, first monitoring information is generated.
5. The AXI communication-based isolation protection system according to claim 4, characterized in that: The master device monitoring module is further configured to: Acquire fourth channel information of a fourth channel and fifth channel information of a fifth channel between the master device and the slave device; when the master device and the slave device interact, a time when a signal is generated in the fourth channel is earlier than a time when a signal is generated in the fifth channel; If the wlast signal in the fifth channel information becomes a rising edge, the preset transmission quantity in the fourth channel information and the actual transmission quantity of the transmitted data in the fifth channel information are obtained; the preset transmission quantity is the preset transmission quantity represented by the awlen signal that the master device plans to continuously write data to the slave device; If the actual transmission quantity is not equal to the preset transmission quantity, first monitoring information is generated.
6. The AXI communication-based isolation protection system according to claim 5, characterized in that: The master device monitoring module is further configured to: When the preset transmission number is the same as the actual transmission number, if the fifth channel information does not include a rising edge of the wlast signal of the master device, first monitoring information is generated.
7. The isolation protection system based on AXI communication according to claim 1, characterized in that: When the master device monitoring module enters the master device takeover mode, the master device monitoring module is configured to: interrupting AXI bus communication between the master device and the slave device; Generate a pending task signal and send the pending task signal to the slave device; the pending task signal includes a pending read task signal or a pending write task signal; receiving a response signal returned from the slave device; An interrupt signal is generated to record the ID and address of the task signal to be processed.
8. The isolation protection system based on AXI communication according to claim 1, characterized in that: When the slave device monitoring module enters the slave device takeover mode, the slave device monitoring module is configured to: interrupting AXI bus communication between the master device and the slave device; Receive a request from the master device and return preset data according to the request type; the request type includes a read request or a write request; when the request type is the read request, the preset data returned by the slave device monitoring module includes a read data signal and a read response signal; when the request type is the write request, the preset data returned by the slave device monitoring module includes write response data; An interrupt signal is generated to record the address channel and address ID of the request.
9. The isolation protection system based on AXI communication according to claim 1, characterized in that: Also included is a reset register, the reset register including at least one status bit for controlling the takeover mode; The controller is configured to: Setting the status bit to a first preset value so that the master device monitoring module or the slave device monitoring module enters a takeover mode; If the status bit is changed from the first preset value to the second preset value, generating an exit instruction for exiting the takeover mode; The exit instruction is sent to the master device monitoring module or the slave device monitoring module to restore the AXI bus communication between the master device and the slave device.
10. An isolation protection method based on AXI communication, characterized in that: The AXI communication-based isolation protection system according to any one of claims 1 to 9 comprises a controller, a master device, a master device monitoring module, a slave device, and a slave device monitoring module; and the method comprises: When first monitoring information generated by the master device monitoring module is obtained, controlling the master device monitoring module to enter a takeover mode so that the master device monitoring module interacts with the slave device; When the second monitoring information generated by the slave device monitoring module is acquired, the slave device monitoring module is controlled to enter a takeover mode, so that the slave device monitoring module interacts with the master device.
Citation Information
Cited By
Built-in test system based on AXI interface
CN121920293A
A fault handling apparatus and method for a network-on-chip bus
CN122526900A