Bus anti-hanging method, system on chip, electronic device, medium and program product

CN122756992APending Publication Date: 2026-09-15NANJING HOUMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610787966.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-09-15

Smart Images

  • Figure CN122756992A_ABST
    Figure CN122756992A_ABST
Patent Text Reader

Abstract

The embodiment of the disclosure discloses a bus anti-hanging method, a system on chip, an electronic device, a medium and a program product, wherein the method comprises: monitoring the state of a target host in the system on chip through an anti-hanging device to obtain host state information; the host state information comprises at least one of the following: receiving state information, sending state information; in response to the host state information satisfying a preset condition, isolating the target host from the bus in the system on chip through the anti-hanging device; controlling the target host to perform a reset operation to obtain a reset target host; and controlling the anti-hanging device to perform a cleaning process, receiving and forwarding a command sent by the reset target host to the bus. The embodiment of the disclosure monitors the state of the target host through the anti-hanging device, ensures the integrity of the bus protocol, and prevents the system on chip from hanging up as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of chip technology, and in particular to a bus anti-hang-up method, system-on-a-chip, electronic equipment, media, and program products. Background Technology

[0002] As the core interconnect module connecting the master and slave devices in an on-chip system, the robustness of the bus directly determines the stability of the entire system. Under normal operating conditions, the master initiates an access request to the slave device through the bus, and the slave device, after receiving the request, sends a response to the master through the bus. Among them, read requests are initiated by the master issuing only the request command, while write requests are initiated by the master issuing the request command and the corresponding data synchronously.

[0003] When a host or slave device connected to the bus malfunctions and cannot complete the interaction according to the interface protocol specifications, it can easily lead to a bus hangup. Existing technologies mostly focus on slave-side fault protection, using interception modules to return responses to the host in the event of a slave malfunction, thus preventing hangup on the slave side. However, in practical applications, the host may also malfunction, such as failing to receive slave responses, issuing request commands, or transmitting incomplete data. Such host failures can also cause a bus hangup, thereby reducing the overall usability and operational stability of the system. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure is proposed. Embodiments of this disclosure provide a bus anti-hang-up method, a system-on-a-chip, an electronic device, a medium, and a program product.

[0005] According to one aspect of the embodiments of this disclosure, a bus anti-hang-up method is provided, comprising: The status of the target host in the on-chip system is monitored by the anti-hook device to obtain host status information; the host status information includes at least one of the following: receiving status information, sending status information; In response to the host status information meeting preset conditions, the target host is isolated from the bus of the on-chip system through the anti-hook device; Control the target host to perform a reset operation to obtain the reset target host; The anti-hook device is controlled to perform a cleanup process, and commands sent by the reset target host are received and forwarded to the bus.

[0006] Optionally, the response to the host status information includes receiving status information; The process of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information includes: The anti-hook device receives and forwards the read access request from the target host to the bus, and forwards the read response from the bus based on the read access request to the target host. Monitoring obtains the first reception status information of the target host in response to the read response; and / or, The anti-hook device receives and forwards the write access request sent by the target host to the bus, and forwards the write response fed back by the bus based on the write access request to the target host. The monitoring obtains the second reception status information of the target host in response to the write response.

[0007] Optionally, responding to the host status information includes sending status information; The process of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information includes: The anti-hook device receives and forwards write access data sent by the target host to the bus. The monitoring obtains the first sending status information of whether the target host has sent the write command corresponding to the write access data; or... The anti-hook device receives and forwards the write access data sent by the target host and the write command corresponding to the write access data to the bus. The monitoring obtains the second sending status information corresponding to the amount of write access data sent by the target host.

[0008] Optionally, the preset conditions include at least one of the following: Within a first preset time period, the first reception status information is "rejection". Within the second preset time period, the second reception status information is "rejection". Within the third preset time period, the first sending status information indicates that the write command has not been sent; Within the fourth preset time period, the second transmission status information indicates insufficient data volume.

[0009] Optionally, the step of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information further includes: The read command counter in the anti-hook device accumulates the number of each read access request received and forwarded to the bus; The value in the read command counter is reduced based on the received read response corresponding to the read access request.

[0010] Optionally, the step of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information further includes: When receiving and forwarding the write access request, record the amount of write access data corresponding to the write access request; When receiving and forwarding the write access data, the write access data is counted using a data counter; Based on the recorded amount of write access data, determine whether the write access data corresponding to the received and forwarded write access request has been completely forwarded to the bus. In response to the complete forwarding of the write access data corresponding to the write access request, the write access request is counted by the write command counter in the anti-hangover device. When receiving and forwarding the write response, the value in the write command counter is reduced according to the received write response corresponding to the write access request.

[0011] Optionally, isolating the target host from the bus of the on-chip system via the anti-hook device includes: The anti-hook device is controlled to refuse to receive requests and / or data sent by the target host; The anti-hook device receives the response information from the bus feedback instead of the target host.

[0012] Optionally, controlling the anti-hook device to refuse to receive requests and / or data sent by the target host includes: The anti-hook device is controlled to refuse to receive read access requests sent by the target host; The step of receiving the bus feedback response information on behalf of the target host through the anti-hook device includes: The anti-hangover device receives the read response from the bus feedback instead of the target host; and reduces the value in the read command counter according to the received read response corresponding to the read access request.

[0013] Optionally, controlling the anti-hook device to refuse to receive requests and / or data sent by the target host includes: The anti-hook device is controlled to refuse to receive write access requests and write access data sent by the target host; In response to the fact that the write access data corresponding to the write access request received before the host status information meets the preset conditions is not fully forwarded, the preset write data is sent to the bus through the anti-hangover device. The step of receiving the bus feedback response information on behalf of the target host through the anti-hook device includes: The anti-hangover device receives the write response from the bus feedback instead of the target host; and reduces the value in the write command counter according to the received write response corresponding to the write access request.

[0014] Optionally, controlling the anti-hook device to perform cleanup processing, receiving and forwarding commands sent by the reset target host to the bus, includes: Determine whether the values ​​in the read command counter and the write command counter are zero; In response to the read command counter and the write command counter being zero, the anti-hangover device completes the cleanup and receives and forwards the command sent by the reset target host to the bus.

[0015] According to another aspect of the present disclosure, a system-on-a-chip is provided, including: a controller, at least one anti-hook device, at least one host, and a bus; each host corresponds to one anti-hook device, and each host is connected to the bus through the anti-hook device; The anti-hook device is used to monitor the status of the corresponding host and obtain host status information; in response to the host status information meeting a preset condition, the host is isolated from the bus. The controller controls the host to perform a reset operation to obtain a reset host; and controls the anti-hook device to perform a cleanup process, and controls the anti-hook device to receive and forward commands sent by the reset host to the bus.

[0016] Optionally, in response to the host status information including reception status information; the anti-hangover device is specifically configured to receive and forward a read access request from the target host to the bus, and forward a read response from the bus based on the read access request to the target host; monitor and obtain the first reception status information of the target host in response to the read response; and / or, The anti-hangover device is specifically used to receive and forward a write access request from the target host to the bus, and forward a write response from the bus based on the write access request to the target host; monitor and obtain the second reception status information of the target host in response to the write response; the target host is the host corresponding to the anti-hangover device.

[0017] Optionally, responding to the host status information includes sending status information; The anti-hack device is specifically used to receive and forward write access data sent by the target host to the bus; monitor and obtain first transmission status information regarding whether the target host has sent a write command corresponding to the write access data; or, receive and forward write access data and the write command corresponding to the write access data sent by the target host to the bus; monitor and obtain second transmission status information corresponding to the amount of write access data sent by the target host.

[0018] Optionally, the preset conditions include at least one of the following: Within a first preset time period, the first reception status information is "rejection". Within the second preset time period, the second reception status information is "rejection". Within the third preset time period, the first sending status information indicates that the write command has not been sent; Within the fourth preset time period, the second transmission status information indicates insufficient data volume.

[0019] Optionally, the anti-snagging device further includes: A read command counter is used to accumulate the number of each read access request received and forwarded to the bus; and to reduce the value in the read command counter according to the read response received for the corresponding read access request.

[0020] Optionally, the anti-snagging device further includes: The memory is used to record the amount of write access data corresponding to the write access request when receiving and forwarding the write access request; A data counter is used to count the write access data when receiving and forwarding the write access data; A discriminator is used to determine, based on the recorded amount of write access data, whether the write access data corresponding to the received and forwarded write access request has been completely forwarded to the bus. A write command counter is used to accumulate the number of write access requests in response to the complete forwarding of write access data corresponding to the write access request; and when receiving and forwarding the write response, the value in the write command counter is reduced according to the received write response corresponding to the write access request.

[0021] Optionally, the controller is specifically configured to control the anti-hook device to refuse to receive requests and / or data sent by the target host; The anti-hook device is specifically used to receive the response information fed back from the bus on behalf of the target host.

[0022] Optionally, the controller is specifically used to control the anti-hook device to refuse to receive read access requests sent by the target host; The anti-hangover device is specifically used to receive the read response fed back by the bus on behalf of the target host; and to reduce the value in the read command counter according to the received read response corresponding to the read access request.

[0023] Optionally, the controller is specifically configured to control the anti-hook device to refuse to receive write access requests and write access data sent by the target host; in response to the write access data corresponding to the write access request received before the host status information meets the preset conditions not being fully forwarded, the controller sends preset write data to the bus through the anti-hook device. The anti-hook device is specifically used to receive the write response fed back by the bus on behalf of the target host; and to reduce the value in the write command counter according to the received write response corresponding to the write access request.

[0024] Optionally, the controller is specifically configured to determine whether the values ​​in the read command counter and the write command counter are zero; in response to the values ​​in the read command counter and the write command counter being zero, the anti-hangover device completes the cleanup, receives and forwards the command sent by the reset target host to the bus.

[0025] According to another aspect of the present disclosure, an electronic device is provided, comprising: Memory, used to store computer program products; The processor is configured to execute a computer program product stored in the memory, and when the computer program product is executed, to implement the bus anti-hang-up method described in any of the above embodiments.

[0026] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the bus anti-hang-up method described in any of the above embodiments.

[0027] According to another aspect of the present disclosure, a computer program product is provided, including computer program instructions that, when executed by a processor, implement the bus anti-hang-up method described in any of the above embodiments.

[0028] Based on the bus anti-hang-up method, system-on-a-chip, electronic device, medium, and program product provided in the above embodiments of this disclosure, the anti-hang-up device monitors the status of the target host in the system-on-a-chip to obtain host status information. The host status information includes at least one of the following: receiving status information, sending status information; in response to the host status information meeting preset conditions, the anti-hang-up device isolates the target host from the bus in the system-on-a-chip; controls the target host to perform a reset operation to obtain a reset target host; controls the anti-hang-up device to perform cleanup processing, receiving and forwarding commands sent by the reset target host to the bus. This disclosure embodiment monitors the status of the target host through the anti-hang-up device, and when the target host's status meets preset conditions, isolates the target host from the bus, ensuring that issued commands can be completed normally for both the bus and the slave device, thus ensuring the integrity of the bus protocol and preventing the entire system-on-a-chip from hanging.

[0029] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0030] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0031] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein: Figure 1 This is a flowchart illustrating a bus anti-hang-up method provided in an exemplary embodiment of this disclosure; Figure 2 This is a flowchart illustrating the process of isolating a target host from the bus in an exemplary embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a system-on-a-chip provided in an exemplary embodiment of this disclosure; Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0032] Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present disclosure, and not all embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described herein.

[0033] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0034] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0035] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0036] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0037] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship. The data referred to in this disclosure can include unstructured data such as text, images, and videos, as well as structured data.

[0038] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0039] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0040] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0041] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

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

[0043] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0044] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0045] Application Overview In the process of developing this disclosure, the inventors discovered that existing anti-hang-up solutions can only guarantee the correctness of the protocol on the slave side, but cannot guarantee the correctness of the protocol on the master side. Existing solutions have at least the following problems: when the master fails, cannot receive a response, or sends an incomplete request, the bus will hang, requiring a full system reset.

[0046] Exemplary methods Figure 1 This is a flowchart illustrating a bus anti-hangup method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, it includes the following steps: Step 102: Monitor the status of the target host in the on-chip system through the anti-hook device to obtain host status information.

[0047] The host status information includes at least one of the following: receive status information, transmit status information, etc. Optionally, the host status information may also include at least one of the following: frequency modulation information, voltage regulation information, power-on / off information, etc.

[0048] In this embodiment, each host of the on-chip system is configured with a corresponding anti-hang-up device. The anti-hang-up device is set between the target host and the bus. When the target host is in normal condition, the anti-hang-up device forwards the interactive information between the target host and the bus and monitors and records each forwarding so that the fault can be handled in time when the target host fails, and the bus hang-up caused by the host is prevented.

[0049] Step 104: In response to the host status information meeting the preset conditions, the target host is isolated from the bus in the on-chip system through the anti-hook device.

[0050] In one embodiment, the preset conditions can be set according to the specific application scenario. Optionally, the preset conditions may include, but are not limited to, at least one of the following: (1) The bus has sent back a read response, but the target host refuses to receive it, and this state lasts for a first preset duration; (2) The bus has sent back a write response, but the target host refuses to receive it, and this state lasts for a second preset duration; (3) The host has started sending write data, but has not sent the corresponding write command, and this state lasts for a third preset duration; (4) The host has sent a write command and has started sending write data, but the amount of write data sent within the fourth preset duration is less than the amount of data specified in the command; (5) The target host experiences state fluctuations (e.g., in frequency modulation state, in voltage regulation state, in power-on / off state, etc.). The state fluctuation situation can be determined based on experience. When the host is in frequency modulation state, in voltage regulation state, in power-on / off state, etc., it is easy to have a fault. Therefore, in this embodiment, the target host and the bus can be isolated in advance by the anti-hang-up device to achieve the effect of preventing bus hang-up.

[0051] Optionally, if the host status information meets preset conditions, an interrupt is reported. The anti-hangover device can isolate the target host from the bus according to the control command sent by the controller in the on-chip system, or the anti-hangover device can automatically isolate the target host from the bus when triggered by preset conditions. At this time, the anti-hangover device is in recovery state.

[0052] In this embodiment, the anti-hangover device isolates the target host from the bus. The connection between the anti-hangover device and the target host can be cut off by the anti-hangover device, so that the anti-hangover device can replace the target host to interact with the bus. This ensures that the issued commands can be completed normally for the bus and the slave device, ensures the integrity of the bus protocol, and prevents the entire system from hanging up.

[0053] Step 106: Control the target host to perform a reset operation to obtain the reset target host.

[0054] In this embodiment, after isolating the target host from the bus, the operation of the target host is unrelated to the bus and will not affect the state of the bus and the on-chip system. At this time, the target host can be reset in the same way as a normal host reset. This embodiment does not limit the specific reset method of the target host. This embodiment only needs to reset the target host, without resetting the entire on-chip system, which improves the practicality and stability of the system.

[0055] Step 108: Control the anti-hook device to perform cleanup processing, and receive and forward the command sent by the target host after reset to the bus.

[0056] In this embodiment, after the target host is reset, before reconnecting to the on-chip system, the anti-hook device needs to be cleaned up. The anti-hook device processes the requests, responses, data and other information left over when the target host malfunctions, so as to avoid transmission errors after the target host reconnects. After the anti-hook device has completed cleaning (is in the cleaning state), the target host is reconnected to the anti-hook device. The anti-hook device monitors the host status information of the target host and the interaction information between the target host and the bus.

[0057] Based on the method provided in the above embodiments of this disclosure, the status of the target host in the on-chip system is monitored by an anti-hangover device to obtain host status information. The host status information includes at least one of the following: receiving status information, sending status information. In response to the host status information meeting preset conditions, the target host is isolated from the bus in the on-chip system by the anti-hangover device. The target host is controlled to perform a reset operation to obtain a reset target host. The anti-hangover device is controlled to perform cleanup processing, receiving and forwarding commands sent by the reset target host to the bus. This embodiment of the disclosure monitors the status of the target host through an anti-hangover device, and when the status of the target host meets preset conditions, isolates the target host from the bus, ensuring that issued commands can be completed normally for both the bus and the slave device. This ensures the integrity of the bus protocol, eliminates protocol correctness issues that host anomalies may cause to the bus, and prevents the entire on-chip system from hanging.

[0058] In some optional embodiments, in response to host status information, including receiving status information; step 102 may include: The anti-hook device receives and forwards read access requests from the target host to the bus, and forwards the read response from the bus based on the read access request to the target host.

[0059] The monitoring obtains the first reception status information of the target host's read response.

[0060] In this embodiment, the anti-hangover device is installed between the target host and the bus to monitor and forward each read access request sent by the target host to the bus. After receiving the read access request from the target host, the bus interacts with the slave device and sends a read response back to the target host based on the feedback from the slave device. This read response is also monitored and forwarded by the anti-hangover device. After forwarding, the anti-hangover device monitors whether the target host receives the first reception status information of the read response within a preset time.

[0061] Optionally, the preset condition (i.e., the condition under which the anti-hangover device isolates the target host from the bus) can be that the first receiving status information is "rejection" within a first preset time period. That is, within the first preset time period (which can be set according to specific application scenarios, such as 10ms, 20ms, etc.), the target host refuses to receive the read response fed back by the bus. This indicates that the target host may have a fault and cannot receive the read response normally. In this embodiment, the anti-hangover device isolates the target host from the bus, provides the target host with a reset time, and does not affect the working status of the bus and slave devices during the target host reset period. Optionally, in the case provided in this embodiment, read response information (e.g., including read access target, identifier, etc.) is also recorded. The recorded read response information can facilitate fault location when an interruption is reported.

[0062] And / or, Step 102 may also include: receiving and forwarding a write access request from the target host to the bus via the anti-hook device, and forwarding the write response fed back by the bus based on the write access request to the target host.

[0063] The monitoring obtains the second receive status information of the target host's write response.

[0064] In this embodiment, the anti-hangover device monitors and forwards each write access request sent by the target host to the bus. After receiving the write access request from the target host, the bus interacts with the slave device and sends a write response back to the target host based on the feedback from the slave device. This write response is also monitored and forwarded by the anti-hangover device. After forwarding, the anti-hangover device monitors whether the target host receives the second reception status information of the write response within a preset time.

[0065] Optionally, the preset condition (i.e., the condition under which the anti-hangover device isolates the target host from the bus) can be that within a second preset time period, the second reception status information is "rejection". That is, within the second preset time period (which can be set according to specific application scenarios, such as 10ms, 20ms, etc.), the target host refuses to receive the write response from the bus. This indicates that the target host may be faulty and unable to receive the write response normally. In this embodiment, the anti-hangover device isolates the target host from the bus, providing the target host with reset time, and the reset of the target host does not affect the working status of the bus and the slave device. Optionally, in the case provided in this embodiment, write response information (e.g., including write access target, identifier, etc.) is also recorded. The recorded write response information facilitates fault location when an interruption is reported.

[0066] In some alternative embodiments, responding to host status information includes sending status information; step 102 may also include: The write access data sent by the target host is received and forwarded to the bus through the anti-hack device.

[0067] The monitoring obtains the first sending status information of whether the target host has sent the write command corresponding to the write access data.

[0068] In this embodiment, after the target host sends a write access request to the bus through the anti-hangover device, the host sends write data. The anti-hangover device receives and forwards the write access data corresponding to the write access request from the target host to the bus. The anti-hangover device continues to monitor the target host to obtain whether the target host has sent the write command corresponding to the write access data, thereby obtaining the first transmission status information. Optionally, the preset condition (i.e., the condition under which the anti-hangover device isolates the target host from the bus) can be that within a third preset time period (this time period can be set according to the specific application scenario, for example, 10ms, 20ms, etc.), the first transmission status information is that no write command has been sent. That is, within the third preset time period, the host sends write access data but does not send the corresponding write command, and the duration of this state reaches the third preset time period. At this time, it can be determined that the target host is abnormal and may have a fault, and cannot send the write command normally. In this embodiment, the anti-hangover device isolates the target host from the bus, provides the target host with a reset time, and does not affect the working status of the bus and the slave during the target host reset period.

[0069] Alternatively, step 102 may include: receiving write access data and the corresponding write command sent by the target host to the bus forwarding target host through the anti-hook device.

[0070] The monitoring obtains the second sending status information corresponding to the amount of write access data sent by the target host.

[0071] In this embodiment, for a write access request, write access data is not received before the write command arrives, but the write command can be received before the write access data arrives. Therefore, when receiving the write access data, the data volume information in the command must have already been obtained. At this time, the anti-hangover device not only monitors the write command, but also monitors the data volume of the write access data sent by the target host. When the monitored data volume does not match the obtained data volume information within the fourth preset time period (this time period can be set according to the specific application scenario, such as 10ms, 20ms, etc.); for example, the target host has sent a write command and has started sending write access data, but the data volume of the write access data sent within the fourth preset time period is less than the data volume specified in the command, it indicates that the target host is abnormal and may have a fault, and cannot send write access data normally. In this embodiment, the anti-hangover device isolates the target host from the bus, provides the target host with a reset time, and does not affect the working status of the bus and slave during the target host reset period. Optionally, in the case provided in this embodiment, write command information (e.g., write command target, identifier, etc.) is also recorded. The recorded write command information can facilitate fault location when an interruption is reported.

[0072] In some optional embodiments, the anti-hook device further includes a read command counter that accumulates the monitored read commands. Correspondingly, step 102 may also include: The read command counter in the anti-hook device accumulates the number of read access requests received and forwarded to the bus each time.

[0073] Optionally, for each read access request received and forwarded, the value in the read command counter is incremented by one, thereby accumulating the number of read access requests in the read command counter.

[0074] The value in the read command counter is reduced based on the read response to the received corresponding read access request.

[0075] In this embodiment, a read response is the feedback from the bus to the target host regarding a read access request. Each feedback indicates that the read access request has ended. Optionally, the read command counter in the anti-hangover device decrements the value of the read command counter by one each time a read response is monitored, thereby reducing the data of the read access request in the read command counter. Ideally, the read command counter should be reduced to zero, indicating that the target host is working normally, issuing read access requests normally and receiving read responses from the bus normally.

[0076] Optionally, the anti-hook device also includes a data counter that accumulates the amount of write access data corresponding to the monitored write access requests, and a write command counter that accumulates the number of shoe access requests. Correspondingly, step 102 may also include: When receiving and forwarding write access requests, record the amount of write access data corresponding to the write access request.

[0077] When receiving and forwarding write access data, a data counter is used to count the write access data.

[0078] The write access data volume is the amount of write access data that needs to be sent for the write access request, while the data counter counts the amount of write access data actually received. Only when the two are equal can it be said that all write access data corresponding to the write access request has been completely forwarded.

[0079] The amount of write access data recorded determines whether the write access data corresponding to the received and forwarded write access request has been completely forwarded to the bus.

[0080] Optionally, a comparator can be used to compare the amount of write access data with the amount of write access data accumulated by the data counter. If the two are equal, it is determined that the write access data has been completely forwarded; otherwise, the write access data has not been completely forwarded.

[0081] In response to a write access request, the write access data is completely forwarded, and the write access request count is accumulated through the write command counter in the anti-hangover device.

[0082] Optionally, when the write access data is completely forwarded, it means that the write access request has completed the data transmission. At this time, the number of write access requests is incremented by one by the write command counter to accumulate the number of write access requests.

[0083] When receiving and forwarding a write response, the value in the write command counter is reduced according to the write response to the corresponding write access request.

[0084] In this embodiment, the write command counter accumulates the number of write access requests, indicating that the write access request and the corresponding write access data have been successfully sent to the bus. The bus interacts with the slave device based on the write access request and write access data. After completion, it sends a write response to the target host indicating that the write operation of the write access data has been completed. Each time the target host receives a write response normally, it means that a write access request has been completed in the on-chip system. In this embodiment, the value in the write command counter is reduced by one to achieve the value reduction processing. Ideally, the write command counter is reduced to zero, indicating that the target host is working normally, issuing write access requests normally and receiving write responses from the bus normally.

[0085] Figure 2 This is a schematic diagram illustrating the process of isolating a target host from the bus in an exemplary embodiment of this disclosure. Figure 2 As shown above, in the above Figure 1 Based on the illustrated embodiment, step 104 may include the following steps: Step 1041: Control the anti-hook device to refuse to receive requests and / or data sent by the target host.

[0086] Optionally, the requests and / or data sent by the target host may include read access requests, write access requests, and write access data, etc. That is, after the anti-hack device determines that the target host is faulty, it will no longer receive any information sent by the target host.

[0087] Step 1042: The anti-hook device replaces the target host in receiving the response information fed back from the bus.

[0088] In this embodiment, since the target host is isolated, the on-chip system would experience incomplete bus protocol without an anti-hook device. To prevent this, this embodiment uses an anti-hook device to interact with the bus on behalf of the target host, ensuring the integrity of the bus protocol and eliminating protocol correctness issues that host anomalies might cause. Optionally, the response information may include read responses, write responses, etc. Optionally, in some optional examples, when the response information is a read response, step 1041 may include: controlling the anti-hook device to refuse to receive the read access request sent by the target host. Correspondingly, step 1042 may include: receiving the read response fed back from the bus by the anti-hook device instead of the target host, and reducing the value in the read command counter according to the received read response to the corresponding read access request.

[0089] In this embodiment, in order to ensure the integrity of the bus protocol, each read response corresponds to a read access request. When the anti-hangover device receives a read response from the bus, the value in the read command counter of the anti-hangover device is decremented by one, so as to process the read commands that the target host has not yet completed. This continues until the value in the read command counter is cleared to zero, indicating that all the read commands that the target host has not yet completed have been processed by the anti-hangover device.

[0090] In some alternative examples, when the response information is a write response, step 1041 may include: controlling the anti-hook device to refuse to receive write access requests and write access data sent by the target host.

[0091] In response to the fact that the write access data corresponding to the write access request received before the host status information meets the preset conditions is not fully forwarded, the preset write data is sent to the bus through the anti-hangover device.

[0092] Optionally, if the write access data corresponding to the write access request of the target host has not been completely sent (not fully forwarded), the anti-hangover device determines the remaining data amount based on the data volume information of the write access request and the count result accumulated in the data counter during the forwarding of the write access data (for example, the difference between the data volume information and the count result accumulated in the data counter determines the remaining write access data to be sent), and sends the preset write data of the remaining data amount on behalf of the target host. At this time, the preset write data is not the actual write access data, but specific data (for example, all zero data, etc.). By sending the preset write data of the remaining data amount through the anti-hangover device, the unfinished write access of the target host is completed without affecting the status of the bus and the slave device.

[0093] Step 1042 may include: The anti-hangover device replaces the target host in receiving the write response from the bus; and the value in the write command counter is reduced according to the write response of the corresponding write access request received.

[0094] In this embodiment, when the anti-hangover device receives a write response from the bus, it decrements the value of the write command counter of the anti-hangover device by one, so as to process the write commands that the target host has not yet completed, until the value of the write command counter is cleared to zero, indicating that all the write commands that the target host has not yet completed have been processed by the anti-hangover device.

[0095] In some alternative embodiments, step 108 may include: Determine if the values ​​in the read command counter and write command counter are zero; In response to the read command counter and write command counter reaching zero, the anti-hangover device completes the cleanup and receives and forwards the command sent by the target host after reset to the bus.

[0096] In this embodiment, isolating the target host from the bus is for repairing the target host through a reset, not for permanent isolation. Ultimately, the target host will need to be reconnected for interaction. Therefore, after the target host completes the reset, the anti-hangover device needs to determine the reset timing. In this embodiment, the controller (the core of the on-chip system) can send a release command to check the value in the read command counter (or write command counter); alternatively, the anti-hangover device can be configured to automatically check the value in the read command counter (or write command counter). Only when both the read command counter and the write command counter are cleared does it indicate that the anti-hangover device has completed processing the remaining requests from the target host. At this point, the anti-hangover device will automatically return to monitoring mode, and the target host can send new commands. In monitoring mode, the anti-hangover device will automatically forward the new commands to the bus, re-establishing interaction between the target host and the bus.

[0097] Any of the bus anti-hang-up methods provided in this disclosure can be executed by any suitable device with data processing capabilities, including but not limited to: terminal devices and servers. Alternatively, any of the bus anti-hang-up methods provided in this disclosure can be executed by a processor, such as by a processor executing any of the bus anti-hang-up methods mentioned in this disclosure by calling corresponding instructions stored in memory. Further details will not be elaborated below.

[0098] Exemplary device Figure 3 This is a schematic diagram of the structure of an on-chip system provided in an exemplary embodiment of this disclosure. For example... Figure 3 As shown, the on-chip system provided in this embodiment includes: a controller 301, at least one anti-hook device 302, at least one host 303 and a bus 304; each host 303 corresponds to one anti-hook device 302, and each host 303 is connected to the bus 304 through the anti-hook device 302. The anti-hook device 302 is used to monitor the status of the corresponding host 303 and obtain host status information; in response to the host status information meeting the preset conditions, it isolates the host 303 from the bus 304.

[0099] The controller 301 controls the host 303 to perform a reset operation, obtaining the reset host; and controls the anti-hook device 302 to perform a cleanup process, and controls the anti-hook device 302 to receive and forward the commands sent by the reset host to the bus.

[0100] Based on the system provided in the above embodiments of this disclosure, the status of the target host in the on-chip system is monitored by an anti-hangover device to obtain host status information. The host status information includes at least one of the following: receiving status information, sending status information. In response to the host status information meeting preset conditions, the anti-hangover device isolates the target host from the bus in the on-chip system. The target host is controlled to perform a reset operation to obtain a reset target host. The anti-hangover device is controlled to perform cleanup processing, receiving and forwarding commands sent by the reset target host to the bus. This embodiment of the disclosure monitors the status of the target host through an anti-hangover device, and when the status of the target host meets preset conditions, isolates the target host from the bus, ensuring that issued commands can be completed normally for both the bus and the slave device. This ensures the integrity of the bus protocol, eliminates protocol correctness issues that host anomalies may cause to the bus, and prevents the entire on-chip system from hanging.

[0101] In some optional embodiments, in response to the host status information, which includes reception status information; the anti-hook device 302 is specifically configured to receive and forward a read access request from the target host to the bus, and forward a read response from the bus based on the read access request to the target host; monitor and obtain the first reception status information of the target host in response to the read response; and / or, The anti-hangover device 302 is specifically used to receive and forward the write access request sent by the target host to the bus, and forward the write response fed back by the bus according to the write access request to the target host; monitor and obtain the second reception status information of the target host in response to the write response; the target host is the host corresponding to the anti-hangover device 302.

[0102] In some optional embodiments, responding to the host status information includes sending status information; The anti-hook device 302 is specifically used to receive and forward write access data sent by the target host to the bus; monitor and obtain first transmission status information regarding whether the target host has sent a write command corresponding to the write access data; or, receive and forward write access data and the write command corresponding to the write access data sent by the target host to the bus; monitor and obtain second transmission status information corresponding to the amount of write access data sent by the target host.

[0103] Optionally, the preset conditions include at least one of the following: Within a first preset time period, the first reception status information is "rejection". Within the second preset time period, the second reception status information is "rejection". Within the third preset time period, the first sending status information indicates that the write command has not been sent; Within the fourth preset time period, the second transmission status information indicates insufficient data volume.

[0104] Optionally, the anti-snag device 302 also includes: A read command counter is used to accumulate the number of each read access request received and forwarded to the bus; and to reduce the value in the read command counter according to the read response received for the corresponding read access request.

[0105] Optionally, the anti-snag device 302 also includes: The memory is used to record the amount of write access data corresponding to the write access request when receiving and forwarding the write access request; A data counter is used to count the write access data when receiving and forwarding the write access data; A discriminator is used to determine, based on the recorded amount of write access data, whether the write access data corresponding to the received and forwarded write access request has been completely forwarded to the bus. A write command counter is used to accumulate the number of write access requests in response to the complete forwarding of write access data corresponding to the write access request; and when receiving and forwarding the write response, the value in the write command counter is reduced according to the received write response corresponding to the write access request.

[0106] In some alternative embodiments, controller 301 is specifically configured to control the anti-hook device 302 to refuse to receive requests and / or data sent by the target host; The anti-hook device 302 is specifically used to receive the response information fed back by the bus in place of the target host.

[0107] Optionally, the controller 301 is specifically used to control the anti-hook device 302 to refuse to receive read access requests sent by the target host; The anti-hangover device 302 is specifically used to receive the read response fed back by the bus on behalf of the target host, and to reduce the value in the read command counter according to the received read response corresponding to the read access request.

[0108] Optionally, the controller 301 is specifically used to control the anti-hook device 302 to refuse to receive write access requests and write access data sent by the target host; in response to the write access data corresponding to the write access request received before the host status information meets the preset conditions not being fully forwarded, the controller sends preset write data to the bus through the anti-hook device 302. The anti-hook device 302 is specifically used to receive the write response fed back by the bus on behalf of the target host; and to reduce the value in the write command counter according to the received write response corresponding to the write access request.

[0109] In some optional embodiments, the controller 301 is specifically configured to determine whether the values ​​in the read command counter and the write command counter are zero; in response to the values ​​in the read command counter and the write command counter being zero, the anti-hangover device 302 completes the cleanup, receives and forwards the command sent by the reset target host to the bus.

[0110] The exemplary embodiments of the bus anti-hangover device provided in this disclosure correspond to the exemplary bus anti-hangover method described above in terms of implementation. The corresponding content of the two can be referenced, combined, and cited from each other, and will not be repeated here. The beneficial technical effects corresponding to the exemplary embodiments of the bus anti-hangover device provided in this disclosure can be found in the corresponding beneficial technical effects of the exemplary bus anti-hangover method described above, and will not be repeated here.

[0111] Exemplary electronic devices Below, for reference Figure 4 This describes an electronic device according to embodiments of the present disclosure. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.

[0112] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0113] like Figure 4 As shown, the electronic device includes one or more processors and memory.

[0114] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0115] The memory can store one or more computer program products, and the memory can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer-readable storage medium, and the processor can run the computer program products to implement the bus anti-hang-up methods of the various embodiments of this disclosure described above and / or other desired functions.

[0116] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0117] In addition, the input device may also include, for example, a keyboard, a mouse, etc.

[0118] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0119] Of course, for the sake of simplicity, Figure 4 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0120] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the bus anti-hang-up methods according to various embodiments of this disclosure as described in the foregoing portions of this specification.

[0121] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0122] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the bus anti-hang-up methods according to various embodiments of this disclosure as described in the foregoing portion of this specification.

[0123] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0124] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0126] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0127] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0128] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.

[0129] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0130] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A method for preventing bus hang-up, characterized in that, include: The status of the target host in the on-chip system is monitored by the anti-hook device to obtain host status information; the host status information includes at least one of the following: receiving status information, sending status information; In response to the host status information meeting preset conditions, the target host is isolated from the bus of the on-chip system through the anti-hook device; Control the target host to perform a reset operation to obtain the reset target host; The anti-hook device is controlled to perform a cleanup process, and commands sent by the reset target host are received and forwarded to the bus.

2. The method according to claim 1, characterized in that, The response to the host status information includes receiving status information; The process of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information includes: The anti-hook device receives and forwards the read access request from the target host to the bus, and forwards the read response from the bus based on the read access request to the target host. Monitoring obtains the first reception status information of the target host in response to the read response; and / or, The anti-hook device receives and forwards the write access request sent by the target host to the bus, and forwards the write response fed back by the bus based on the write access request to the target host. The monitoring obtains the second reception status information of the target host in response to the write response.

3. The method according to claim 2, characterized in that, The response to the host status information includes sending status information; The process of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information includes: The anti-hook device receives and forwards write access data sent by the target host to the bus. The monitoring obtains the first sending status information of whether the target host has sent the write command corresponding to the write access data; or... The anti-hook device receives and forwards the write access data sent by the target host and the write command corresponding to the write access data to the bus. The monitoring obtains the second sending status information corresponding to the amount of write access data sent by the target host.

4. The method according to claim 2 or 3, characterized in that, The preset conditions include at least one of the following: Within a first preset time period, the first reception status information is "rejection". Within the second preset time period, the second reception status information is "rejection". Within the third preset time period, the first sending status information indicates that the write command has not been sent; Within the fourth preset time period, the second transmission status information indicates insufficient data volume.

5. The method according to any one of claims 3-4, characterized in that, The step of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information also includes: The read command counter in the anti-hook device accumulates the number of each read access request received and forwarded to the bus; The value in the read command counter is reduced based on the received read response corresponding to the read access request.

6. The method according to any one of claims 3-5, characterized in that, The step of monitoring the status of the target host in the on-chip system through the anti-hook device to obtain host status information also includes: When receiving and forwarding the write access request, record the amount of write access data corresponding to the write access request; When receiving and forwarding the write access data, the write access data is counted using a data counter; Based on the recorded amount of write access data, determine whether the write access data corresponding to the received and forwarded write access request has been completely forwarded to the bus. In response to the complete forwarding of the write access data corresponding to the write access request, the write access request is counted by the write command counter in the anti-hangover device. When receiving and forwarding the write response, the value in the write command counter is reduced according to the received write response corresponding to the write access request.

7. The method according to claim 5 or 6, characterized in that, The method of isolating the target host from the bus of the on-chip system through the anti-hook device includes: The anti-hook device is controlled to refuse to receive requests and / or data sent by the target host; The anti-hook device receives the response information from the bus feedback instead of the target host.

8. The method according to claim 7, characterized in that, The control of the anti-hook device to refuse to receive requests and / or data sent by the target host includes: The anti-hook device is controlled to refuse to receive read access requests sent by the target host; The step of receiving the bus feedback response information on behalf of the target host through the anti-hook device includes: The anti-hangover device receives the read response from the bus feedback instead of the target host; and reduces the value in the read command counter according to the received read response corresponding to the read access request.

9. The method according to claim 7 or 8, characterized in that, The control of the anti-hook device to refuse to receive requests and / or data sent by the target host includes: The anti-hook device is controlled to refuse to receive write access requests and write access data sent by the target host; In response to the fact that the write access data corresponding to the write access request received before the host status information meets the preset conditions is not fully forwarded, the preset write data is sent to the bus through the anti-hangover device. The step of receiving the bus feedback response information on behalf of the target host through the anti-hook device includes: The anti-hangover device receives the write response from the bus feedback instead of the target host; and reduces the value in the write command counter according to the received write response corresponding to the write access request.

10. The method according to any one of claims 7-9, characterized in that, The control of the anti-hook device to perform cleanup processing, receiving and forwarding commands sent by the reset target host to the bus, includes: Determine whether the values ​​in the read command counter and the write command counter are zero; In response to the read command counter and the write command counter being zero, the anti-hangover device completes the cleanup and receives and forwards the command sent by the reset target host to the bus.

11. A system-on-a-chip, characterized in that, include: Controller, at least one anti-hook device, at least one host and bus; Each host corresponds to one anti-hook device, and each host is connected to the bus through the anti-hook device; The anti-hook device is used to monitor the status of the corresponding host and obtain host status information; In response to the host status information meeting preset conditions, the host is isolated from the bus; The controller controls the host to perform a reset operation, thereby obtaining a reset host. It also controls the anti-hook device to perform cleanup processing and controls the anti-hook device to receive and forward the command sent by the reset host to the bus.

12. An electronic device, characterized in that, include: Memory, used to store computer program products; A processor is configured to execute a computer program product stored in the memory, wherein when the computer program product is executed, it implements the bus anti-hang-up method according to any one of claims 1-10.

13. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the bus anti-hang-up method as described in any one of claims 1-10.

14. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, they implement the bus anti-hang-up method as described in any one of claims 1-10.