A method and device for preventing deadlock of SOC system bus
By embedding a congestion evacuation module in the bus of the on-chip system to monitor and handle timeouts, the deadlock problem caused by master and slave failures is solved, more reliable anti-deadlock protection and a simplified reset process are achieved, and the bus system is improved. of robustness.
Patent Information
- Application Number
- CN202410559960.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-05-07
AI Technical Summary
In the on-chip system, the bus system is not robust enough, causing a failure between the master and the slave to cause a deadlock. Especially during the reset process, the resulting bus congestion cannot be effectively handled, resulting in the non-faulty end being in a continuous waiting state, lacking Effective debugging and recovery means.
By embedding the first and second congestion draining modules respectively at the bus request end and responder end, the bus status is monitored, timeouts detected, unfinished request and response data taken over, exceptions indicated, and backpressure and decoupling performed when necessary. , ensure that the bus enters the idle or flush state to avoid deadlock.
It achieves more reliable anti-deadlock protection for master and slave, simplifies the local reset process, avoids continuous waiting states, and improves the robustness of the bus system and the first-site recovery capability of debugging.
Smart Images

Figure CN118295832B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of bus technology, and in particular relates to a method and device for preventing deadlock of a SOC system bus. Background Art
[0002] In a system on a chip (SOC), the robustness of the bus system is of paramount importance. The party that actively initiates the bus operation is called the requesting end (master), and the party that passively accepts the bus request is called the responding end (slave). If one party fails to complete the data transmission as expected, the other party will be in an infinite waiting state. For example, in a CPU system, if the software initiates a read / write operation request for a certain address, if the address is an abnormal address, or the slave does not respond abnormally, the software will be in a deadlock waiting state, which is manifested as the CPU hanging. Once this exception occurs, the debugging means at the first scene will be lost.
[0003] In addition, in order to meet the debugging requirements on the SOC, it is necessary to reset part of the SOC, and the master and slave interact frequently. Figure 1 As shown in FIG. 1 , if a reset occurs on one party during an outgoing transmission, the previously unfinished interaction will be discarded after the reset is released, and the other party will not be able to complete the subsequent bus behavior without knowing that the other party has been reset, thus causing an exception.
[0004] Related technologies usually predict the possibility of bus deadlock in advance. When there is a possibility of deadlock, back pressure is applied to subsequent requests, which is to analyze the bus topology in advance to avoid congestion from the bus perspective. However, when there is no possibility of congestion in the bus topology, bus congestion caused by failures on the slave side or the master side cannot be handled, and the non-faulty side will fall into deadlock. Summary of the invention
[0005] The purpose of the present application is to provide a method and device for preventing deadlock of a SOC system bus, aiming to avoid a deadlock state in which a master or a slave is in a continuous waiting state due to a failure of the other party.
[0006] According to a first aspect of the present application, a bus anti-deadlock method of a SOC system is provided, which is prepared for a local reset, comprising:
[0007] Monitoring bus requests and bus responses of the SOC system through a congestion draining module, wherein the congestion draining module is embedded between the bus request end and the on-chip bus network, and between the bus response end and the on-chip bus network, and the congestion draining module includes a first congestion draining module between the bus request end and the on-chip bus network, and a second congestion draining module between the bus response end and the on-chip bus network;
[0008] When it is detected that the data output of the bus request end is timed out, the bus request end is taken over by a first congestion draining module, unfinished bus request data is constructed, and the bus request end is indicated to have an output abnormality;
[0009] When it is detected that the bus request end response reception timeouts, the bus request end is taken over by the first congestion draining module, the bus response data is received and discarded, and the bus request end is indicated to have a reception abnormality;
[0010] When it is detected that the bus response end has timed out in receiving data, the bus response end is taken over by a second congestion draining module, bus request data is received and discarded, and the bus response end is indicated to have received abnormal data;
[0011] When it is detected that the data response of the bus response end has timed out, the bus response end is taken over by the second congestion draining module, bus response data is constructed, and the bus response end is indicated to output abnormality.
[0012] In a possible implementation, when it is detected that the bus responding end has recovered, the second congestion draining module exits the takeover of the bus responding end; when it is detected that the bus requesting end has recovered, the first congestion draining module exits the takeover of the bus requesting end, and the communication between the bus requesting end and the bus responding end is reestablished.
[0013] In a possible implementation manner, after indicating that the bus request end outputs abnormally or the request end receives abnormally, the method further includes:
[0014] The first congestion draining module is used to back pressure subsequent bus requests, construct request data of the bus request end, and send it to the bus response end, receive and discard the response data fed back by the bus response end, and after all requests and responses are completed, indicate that the bus enters an idle state. In this state, there are no new requests and responses transmitted on the bus.
[0015] In a possible implementation manner, after indicating that the bus response end receives abnormally or the response end outputs abnormally, the method further includes:
[0016] The second congestion draining module is used to receive bus request data and discard it, construct a bus response end response, and feed it back to the bus request end, indicating that the bus enters the flush state. In this state, the requests on the bus are no longer passed to the response end, and the congestion draining module receives the requests and constructs the responses.
[0017] In a possible implementation, when the software actively initiates a bus decoupling request to the congestion draining module, the congestion draining module backpressures the bus request end to initiate a new request, and after all responses are completed, instructs the bus to enter an idle state, in which no new request or response is transmitted on the bus;
[0018] When the software actively initiates the cancellation of the bus decoupling request to the congestion draining module, the congestion draining module will cancel the back pressure on the bus request end, and the communication between the bus request end and the bus response end will be restored.
[0019] In a possible implementation, after indicating that the bus enters the idle state, the method further includes: independently resetting the bus request end or the bus response end;
[0020] The congestion draining module follows the bus requester to reset.
[0021] In a possible implementation, when the software actively initiates a bus decoupling request to the congestion draining module, it also includes:
[0022] If the congestion draining module fails to complete bus decoupling within the preset time, it is determined that an abnormality has occurred in the data output of the requesting end, or an abnormality has occurred in the response reception of the requesting end, or an abnormality has occurred in the data reception of the response end, or an abnormality has occurred in the response output of the response end, then the bus request is actively discarded or the bus response data is constructed, thereby forcing bus decoupling.
[0023] In a possible implementation, after the first congestion draining module indicates that the requesting end outputs abnormally or receives abnormally and indicates that the bus enters an idle state, the method further includes:
[0024] If it is determined that the bus request end is abnormal and there is no subsequent bus request to enter the bus system, a request end reset request is initiated to recover from the abnormality of the request end.
[0025] In a possible implementation, after the second congestion draining module indicates that the response end has abnormal reception or abnormal output, and indicates that the bus enters the flush state, the method further includes:
[0026] If it is determined that the bus response end is abnormal and there is no subsequent bus request to enter the bus system, a response end reset request is initiated to recover from the abnormality of the response end.
[0027] According to a second aspect of the present application, a SOC system bus anti-deadlock device is provided, comprising:
[0028] The first congestion draining module is located between the bus request end and the on-chip bus network and is used for:
[0029] When it is detected that the data output of the bus request end is timed out, taking over the bus request end, constructing unfinished bus request data, and indicating that the bus request end outputs abnormally;
[0030] When it is detected that the bus request end response reception timeouts, taking over the bus request end, receiving the bus response data and discarding it, and indicating the bus request end reception abnormality;
[0031] The second congestion draining module is located between the bus response end and the on-chip bus network and is used for:
[0032] When it is detected that the bus response end has timed out in receiving data, taking over the bus response end, receiving the bus request data and discarding it, and indicating that the bus response end has received abnormal data;
[0033] When it is detected that the data response of the bus response end has timed out, the bus response end is taken over, bus response data is constructed, and the bus response end is indicated to output abnormality.
[0034] Compared with the related art, the technical solution of the present application has at least the following advantages:
[0035] By observing the master-slave status through a unified monitoring window, the master and slave are prevented from being in a waiting state for a long time, and a more reliable master and slave anti-deadlock protection scheme and a simpler and more reliable local reset are implemented.
[0036] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures and processes indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 It is a schematic diagram of the interaction process between master and slave based on relevant technologies.
[0039] Figure 2 It is a schematic diagram of a congestion drain module (drain module) and its monitoring window according to an exemplary embodiment of the present application.
[0040] Figure 3 The figure is a flow chart of a method for preventing a SOC system bus from deadlocking according to an exemplary embodiment of the present application.
[0041] Figure 4 It is a schematic diagram of SOC application scenario components according to an exemplary embodiment of the present application.
[0042] Figure 5 The figure is a flow chart of a method for preventing deadlock of a SOC system bus according to another exemplary embodiment of the present application.
[0043] Figure 6 It is a diagram of the internal functional architecture of the drain module according to an exemplary embodiment of the present application.
[0044] Figure 7 It is a timing diagram of mst_drain taking over the bus response on the slave side in an AXI bus scenario according to an exemplary embodiment of the present application.
[0045] Figure 8 This is a timing diagram of slv_drain taking over the bus request on the master side in an AXI bus scenario according to an exemplary embodiment of the present application.
[0046] Fig. 9 It is a schematic diagram of the coordination of mst_drain and slv_drain according to an exemplary embodiment of the present application.
[0047] Fig.10 It is a processing flow chart when a read failure occurs on the master according to an exemplary embodiment of the present application.
[0048] Fig.11 It is a processing flow chart when an output failure occurs in a master according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] In the normal interaction between the master and the slave, in addition to the original bus congestion deadlock, the master or the slave may also fail, causing the master and the slave to continue waiting. Based on the above analysis, the specific embodiment of the present application provides a method and device for preventing deadlock in the SOC system bus, constructing a response on the fault side to make the waiting side exit the waiting state. The key master-slave interfaces on the SOC are all connected in series with the drain module, which provides a unified monitoring window, such as Figure 2 As shown in the figure. Through this interface, the SOC software can uniformly observe the master-slave status. This centralized monitoring window is located on the topology structure and locates problems on the entire bus plane.
[0051] The drain module monitors the bus status in real time, and detects whether each request and response of the master-slave has timed out within a configurable time period. If it times out, this IP completes the response / data compensation on the faulty side between the master and slave, allowing the non-faulty side to exit the deadlock waiting state, providing the first scene for debugging. At the same time, it records the type of each master-slave request and response, and accepts the decoupling enable of external control. When the decoupling enable is effective, new requests are avoided by intercepting the request channel. After all requests and responses recorded internally by the IP are completed, a decoupling success indication is given. After the decoupling is successful, a safe reset is performed on the master or slave respectively without affecting the other end.
[0052] See also Figure 3 The SOC system bus anti-deadlock method provided in the embodiment of the present application includes:
[0053] Step 101: Monitor the bus request and bus response of the SOC system through a congestion draining module, wherein the congestion draining module is embedded between the bus request end and the on-chip bus network, and between the bus response end and the on-chip bus network. The congestion draining module includes a first congestion draining module between the bus request end and the on-chip bus network, and a second congestion draining module between the bus response end and the on-chip bus network.
[0054] Figure 4 The components of the application scenario of the embodiment of the present application are shown. Masters 1 and 2 in different bus topologies in the SOC can independently initiate access to slaves 11, 12, and 13 in different bus topologies. The first congestion draining module (drain module) 3 and 4 and the second congestion draining module 8, 9, and 10 are respectively connected in series between the master and slave and the bus system 5 according to the bus topology. 6 and 7 are routing units in the bus system.
[0055] When master1 initiates an access request to slave12, the request first reaches drain module 3, which records the request information and forwards it to routing unit 6, which forwards it to routing unit 7, which forwards it to drain module 9, which records the request information and forwards it to slave12. Accordingly, when slave12 returns a response, it first sends the response to drain module 9, which clears the request information corresponding to the response and forwards it to routing unit 7, which forwards it to routing unit 6, which forwards it to drain module 3, which clears the request information corresponding to the response and forwards it to master1.
[0056] Step 102: when it is detected that the data output of the bus request end is timed out, the bus request end is taken over by the first congestion draining module, uncompleted bus request data is constructed, and the bus request end is indicated to have output abnormality; when it is detected that the response reception of the bus request end is timed out, the bus request end is taken over by the first congestion draining module, bus response data is received and discarded, and the bus request end is indicated to have received abnormality;
[0057] When it is detected that the data reception of the bus response end has timed out, the bus response end is taken over by the second congestion draining module, bus request data is received and discarded, and the bus response end is indicated to have a reception abnormality; when it is detected that the data response of the bus response end has timed out, the bus response end is taken over by the second congestion draining module, bus response data is constructed, and the bus response end is indicated to have an output abnormality.
[0058] In an alternative embodiment, see Figure 5 , the step 102 further includes:
[0059] Step 121: When the software actively initiates a bus decoupling request to the congestion draining module, the congestion draining module backpressures the bus request end to initiate a new request, and after all responses are completed, instructs the bus to enter an idle state, in which no new requests or responses are transmitted on the bus.
[0060] Step 122: When the software actively initiates a bus decoupling request cancellation to the congestion draining module, the congestion draining module will cancel the back pressure on the bus request end, and the communication between the bus request end and the bus response end will be restored.
[0061] Among them, when the software actively initiates a bus decoupling request to the congestion draining module, if the congestion draining module fails to complete the bus decoupling within a preset time and determines that an abnormality occurs on the requesting end or the responding end, the bus request is actively discarded or bus response data is constructed, thereby forcing bus decoupling.
[0062] For example, once slave13 fails, it cannot send a response. The routing units 6 and 7 in the bus system cannot complete the resource release, introducing the risk of bus deadlock, and then enter the abnormal response process. The drain module 9 determines that the last request response has timed out, constructs a response based on the previously recorded request information, and adds a supplementary response feature word, and forwards the response to the routing unit 7, which is forwarded to the drain module 3 through the routing unit 6. The drain module 3 clears the request information corresponding to the response and forwards the response to the master 1. After the exception processing of the drain module 9, the routing units 6 and 7 in the bus system complete the resource release and eliminate the risk of bus deadlock.
[0063] For example, Figure 6As shown, in the embodiment of the present application, drain includes two parts, slv_drain and mst_drain, which are connected to the slave side and the master side respectively.
[0064] The mst_drain is used to protect the bus security on the master side and monitor the bus status on the slave side. When the slave side bus is abnormal, mst_drain takes over the slave side bus response to avoid the master from falling into deadlock waiting.
[0065] In an optional embodiment, after indicating that the bus request end outputs an abnormality or the request end receives an abnormality, the first congestion draining module is used to back pressure subsequent bus requests, construct the request data of the bus request end, and send it to the bus response end, receive the response data fed back by the bus response end and discard it, and after all requests and responses are completed, indicate that the bus enters an idle state. In this state, there are no new requests and responses transmitted on the bus.
[0066] Furthermore, after indicating that the bus response end receives an abnormality or the response end outputs an abnormal state, the second congestion draining module is used to receive and discard the bus request data, construct a bus response end response, and feed back to the bus request end, indicating that the bus enters a flush state. In this state, requests on the bus are no longer passed to the response end, but the congestion draining module receives the request and constructs a response.
[0067] AXI bus is the most commonly used bus form in SOC system. AXI bus is divided into 5 channels, namely write request channel (AW channel), write data channel (W channel), write response channel (B channel), read request channel (AR channel), and read response channel (R channel). Figure 7 Taking the AW / W / B of the AXI bus as an example, the process of mst_drain taking over the slave side bus is described:
[0068] 1.1. Monitor the response time of each AXI_B on the slave side. If the response times out, trigger a timeout.
[0069] 1.2. Cut off the coupling between master and slave and actively enter the mst_aw_bp state;
[0070] 1.3. Back pressure the subsequent master-side AW request, construct the AXI_B that is not returned by the slave side, and return it to the master side;
[0071] 1.4. When AXI_B is constructed and completed, exit the mst_aw_bp state and enter the flush state;
[0072] 1.5. Receive AXI_AW request and construct AXI_B after receiving AXI_W data;
[0073] 1.6. In the flush state, the master side AXI_AW / W will not be passed to the slave, and AXI_B is generated by the mst_drain structure. The slv_drain is used to protect the bus security of the slave side and monitor the bus status of the master side. When the bus on the master side is abnormal, slv_drain takes over the bus request on the master side to avoid the slave from falling into deadlock waiting. Figure 8 Taking AW / W / B of AXI bus as an example, the process of slv_drain taking over the bus on the master side is described.
[0074] 2.1. Monitor the handshake time of each AXI_W / AXI_B on the master side. If it times out, trigger a timeout;
[0075] 2.2. Cut off the coupling between master and slave and actively enter the mst_aw_bp state;
[0076] 2.3. Back pressure the subsequent master-side AW request, construct unfinished AXI_W data and pass it to the slave side, receive AXI_B data and discard it;
[0077] 2.4. When AXI_W / AXI_B is constructed and completed, the slave side bus has returned to normal.
[0078] According to a further preferred embodiment, when it is detected that the bus responding end is recovered, the takeover of the bus responding end by the second congestion draining module is exited, or when it is detected that the bus requesting end is recovered, the takeover of the bus requesting end by the first congestion draining module is exited, and the communication between the bus requesting end and the bus responding end is re-established.
[0079] The process of mst_drain exiting and taking over the slave side bus status is as follows:
[0080] 3.1. Enter the mst_aw_bp state from flush to counter-pressure the subsequent master-side AW requests;
[0081] 3.2. Construct AXI_B of AXI_AW / W request that has entered mst_drain;
[0082] 3.3. After AXI_B is constructed and completed, exit the mst_aw_bp state;
[0083] 3.4. Re-establish the coupling between master and slave and restart the communication between master and slave.
[0084] The process of slv_drain exiting and taking over the bus status on the master side is as follows:
[0085] 4.1. Exit the mst_aw_bp state;
[0086] 4.2. Re-establish the coupling between the master and the slave, and restart the communication between the master and the slave.
[0087] mst_drain and slv_drain cooperate with each other, and their structure is as follows Fig. 9 shown. Fig.10 This section describes the processing flow when a read failure occurs in the master. If the master does not receive data within the preset time, that is, the master receives read data abnormally, the data path between the master and the slave is blocked, the slv_drain module generates mst_timeout, and the slv_drain module receives and discards the subsequent data returned by the slave (slv_flush). The data path between the Mst and the slave is no longer blocked. When the master recovers, the mst-drain module has completed data discarding and cannot obtain the real slave-side data, so it enters a deadlock wait. The Mst-drain module generates slv_timeout, and the mst-drain module constructs the slave-side data return (mst_flush), and the master exits the deadlock wait.
[0088] Fig.11 This section describes the processing flow when the master has an output failure. If the master writes data without output within the preset time or the output data is incomplete, that is, the master outputs write data abnormally, the slave enters a deadlock wait, and the slv-drain module generates mst_timeout. The slv-drain module constructs master data and sends it to the slave (slv_flush), and the slave exits the deadlock wait. When the master recovers, since the slave side has received complete data and exits the data receiving state, the master enters a deadlock wait, and mst_drain generates slv_timeout. The mst_drain module receives and discards the subsequent master output data (mst_flush), and the master exits the deadlock wait.
[0089] If the slave does not respond within the preset time, that is, the slave returns an abnormal read data, the master enters a deadlock wait, and the mst-drain module generates a slv_timeout. The mst-drain module constructs a slave return (mst_flush), and the master exits the deadlock wait. When the slave recovers, the data on the slave side is returned. The master side does not receive it, and the data path is blocked. The slv-drain module generates a mst_timeout, and the slv-drain module receives and discards the subsequent data returned by the slave (slv_flush), and the data path between the master and slave is no longer blocked.
[0090] If the slave does not receive data within the preset time, that is, the slave receives write data abnormally, the data path between the mst-slave is blocked, and the Mst-drain module generates slv_timeout. The Mst-drain module receives the data from the master side and discards it (mst_flush), and the master side is no longer blocked. After the slave recovers, the slave waits for the master data and enters a deadlock wait. The slv-drain module generates mst_timeout, and the slv-drain module constructs the master data and sends it to the slave (slv_flush), and the slave exits the deadlock wait.
[0091] In an optional embodiment, after indicating that the bus enters an idle state, if it is determined that the bus request end is abnormal and there is no subsequent bus request to enter the bus system, a request end reset request is initiated to recover from the abnormality of the request end.
[0092] In yet another optional embodiment, after indicating that the bus enters an idle state, the congestion draining module independently resets the bus request end or the bus response end; the congestion draining module follows the bus request end to reset.
[0093] It can be seen that the SOC system bus anti-deadlock method and device provided in the embodiment of the present application have the following advantages compared with the related technology: observing the master-slave state through a unified monitoring window, avoiding the master and slave being in a waiting state continuously, and realizing a more reliable master and slave anti-deadlock protection scheme and a simpler and more reliable local reset.
[0094] Accordingly, an embodiment of the present application further provides a SOC system bus anti-deadlock device, comprising:
[0095] The first congestion draining module is located between the bus request end and the on-chip bus network and is used for:
[0096] When it is detected that the data output of the bus request end is timed out, taking over the bus request end, constructing unfinished bus request data, and indicating that the bus request end outputs abnormally;
[0097] When it is detected that the bus request end response reception timeouts, taking over the bus request end, receiving the bus response data and discarding it, and indicating the bus request end reception abnormality;
[0098] The second congestion draining module is located between the bus response end and the on-chip bus network and is used for:
[0099] When it is detected that the bus response end has timed out in receiving data, taking over the bus response end, receiving the bus request data and discarding it, and indicating that the bus response end has received abnormal data;
[0100] When it is detected that the data response of the bus response end has timed out, the bus response end is taken over, bus response data is constructed, and the bus response end is indicated to output abnormality.
[0101] The above-mentioned device can be implemented by the SOC system bus anti-deadlock method provided by the embodiment of the first aspect above. The specific implementation method can be found in the description of the embodiment of the first aspect, which will not be repeated here.
[0102] It is understood that the circuit structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily combine and adjust the structural features of the above embodiments according to the use requirements, and should not limit the concept of the present application to the specific details of the above examples.
[0103] Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that he or she may still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for preventing deadlock of a SOC system bus, characterized in that: include: Monitoring bus requests and bus responses of the SOC system through a congestion draining module, wherein the congestion draining module is embedded between the bus request end and the on-chip bus network, and between the bus response end and the on-chip bus network, and the congestion draining module includes a first congestion draining module between the bus request end and the on-chip bus network, and a second congestion draining module between the bus response end and the on-chip bus network; When it is detected that the data output of the bus request end is timed out, the bus request end is taken over by a first congestion draining module, unfinished bus request data is constructed, and the bus request end is indicated to have an output abnormality; When it is detected that the bus request end response reception timeouts, the bus request end is taken over by the first congestion draining module, the bus response data is received and discarded, and the bus request end is indicated to have a reception abnormality; When it is detected that the bus response end has timed out in receiving data, the bus response end is taken over by a second congestion draining module, bus request data is received and discarded, and the bus response end is indicated to have received abnormal data; When it is detected that the data response of the bus response end has timed out, the bus response end is taken over by the second congestion draining module, bus response data is constructed, and the bus response end is indicated to output abnormality.
2. The SOC system bus anti-deadlock method according to claim 1, characterized in that: Also includes: When it is detected that the bus response end is restored, the second congestion draining module quits taking over the bus response end; When it is detected that the bus request end is recovered, the first congestion draining module exits the takeover of the bus request end, and the communication between the bus request end and the bus response end is re-established.
3. The SOC system bus anti-deadlock method according to claim 1, characterized in that: After indicating that the bus request end output is abnormal or the request end receives abnormality, it also includes: The first congestion draining module is used to back pressure subsequent bus requests, construct request data of the bus request end, and send it to the bus response end, receive and discard the response data fed back by the bus response end, and after all requests and responses are completed, indicate that the bus enters an idle state. In this state, there are no new requests and responses transmitted on the bus.
4. The SOC system bus anti-deadlock method according to claim 3, characterized in that: After indicating that the bus response end receives abnormally or the response end outputs abnormally, the method further includes: The second congestion draining module is used to receive bus request data and discard it, construct a bus response end response, and feed it back to the bus request end, indicating that the bus enters the flush state. In this state, the requests on the bus are no longer passed to the response end, and the congestion draining module receives the requests and constructs the responses.
5. The SOC system bus anti-deadlock method according to claim 4, characterized in that: Also includes: When the software actively initiates a bus decoupling request to the congestion draining module, the congestion draining module backpressures the bus request end to initiate a new request, and after all responses are completed, it instructs the bus to enter an idle state, in which no new requests or responses are transmitted on the bus; When the software actively initiates the cancellation of the bus decoupling request to the congestion draining module, the congestion draining module will cancel the back pressure on the bus request end, and the communication between the bus request end and the bus response end will be restored.
6. The SOC system bus anti-deadlock method according to claim 5, characterized in that: After indicating that the bus enters the idle state, it also includes: The congestion draining module independently resets the bus request end or the bus response end; The congestion draining module is reset following the bus requesting end.
7. The SOC system bus anti-deadlock method according to claim 6, characterized in that: When the software actively initiates a bus decoupling request to the congestion draining module, it also includes: If the congestion draining module fails to complete bus decoupling within the preset time, it is determined that an abnormality has occurred in the data output of the requesting end, or an abnormality has occurred in the response reception of the requesting end, or an abnormality has occurred in the data reception of the response end, or an abnormality has occurred in the response output of the response end, then the bus request is actively discarded or the bus response data is constructed, thereby forcing bus decoupling.
8. The SOC system bus anti-deadlock method according to claim 1, characterized in that: After the first congestion draining module indicates that the request end outputs abnormally or receives abnormally, and indicates that the bus enters an idle state, the method further includes: If it is determined that the bus request end is abnormal and there is no subsequent bus request to enter the bus system, a request end reset request is initiated to recover from the abnormality of the request end.
9. The SOC system bus anti-deadlock method according to claim 4, characterized in that: After the second congestion draining module indicates that the response end has abnormal reception or abnormal output, and indicates that the bus enters the flush state, the method further includes: If it is determined that the bus response end is abnormal and there is no subsequent bus request to enter the bus system, a response end reset request is initiated to recover from the abnormality of the response end.
10. The SOC system bus anti-deadlock method according to claim 1, characterized in that: Also includes: All congestion draining modules are connected to a unified monitoring window, so that the SOC software monitors all congestion draining modules through the unified monitoring window and detects the states of the bus request end and the bus response end.
11. A SOC system bus anti-deadlock device, characterized in that: include: The first congestion draining module is located between the bus request end and the on-chip bus network and is used for: When it is detected that the data output of the bus request end is timed out, taking over the bus request end, constructing unfinished bus request data, and indicating that the bus request end outputs abnormally; When it is detected that the bus request end response reception timeouts, taking over the bus request end, receiving the bus response data and discarding it, and indicating the bus request end reception abnormality; The second congestion draining module is located between the bus response end and the on-chip bus network and is used for: When it is detected that the bus response end has timed out in receiving data, taking over the bus response end, receiving the bus request data and discarding it, and indicating that the bus response end has received abnormal data; When it is detected that the data response of the bus response end has timed out, the bus response end is taken over, bus response data is constructed, and the bus response end is indicated to output abnormality.
