A self-recovery system and method for bus devices

By designing a self-recovery system for bus devices, and using a monitoring and recovery unit and shared state memory to reset the state of bus devices, the problem of needing to restart SRIO bus devices due to abnormalities is solved, achieving seamless recovery and improving system security and reliability.

CN116225768BActive Publication Date: 2026-11-17CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310300659.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-11-17
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

SRIO bus devices cannot automatically recover when they encounter data errors or anomalies, requiring a power outage and restart, which affects normal use.

Method used

Design a bus device self-recovery system, including a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. By monitoring data transceiver anomalies and generating an error code, the monitoring and recovery unit is woken up. The bus device state is reset according to the error code and register state in the shared memory, thereby achieving self-recovery.

Benefits of technology

This allows for the restoration of bus device functionality without shutting down and restarting, improving user experience, enhancing system security and reliability, ensuring uninterrupted system operation, and reducing system complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225768B_ABST
    Figure CN116225768B_ABST
Patent Text Reader

Abstract

This invention discloses a self-recovery system and method for bus devices. The system includes: a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. The device driver drives the bus device; the monitoring and recovery unit initializes the bus device to ensure its normal operation and stores the bus device's state in the state shared memory; the state shared memory sends state information to the data transceiver unit after a state update; and the data transceiver unit sends and receives data based on the state information in the state shared memory. This invention enables the restoration of normal bus device function without powering off and restarting the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded systems technology, and more specifically, to a bus device self-recovery system and method. Background Technology

[0002] SRIO (Serial RapidIO) is a high-performance, low-pin-count, packet-switched interconnect architecture pioneered by companies such as Motorola and Mercury. It's an open interconnect technology standard designed to meet the needs of future high-performance embedded systems, compatible with the most popular integrated communication processors, host processors, and network digital signal processors. RapidIO is primarily used for internal interconnects within embedded systems, supporting chip-to-chip and board-to-board communication, and can be used as a backplane link for embedded devices.

[0003] The Tsi721 is an endpoint device on the SRIO bus used for data transmission and reception control between boards and chips. Because the SRIO bus itself has high reliability, it does not have a self-recovery function. It cannot automatically recover from device failures caused by data errors or bus abnormalities, and requires a power-off restart to restore normal operation, which greatly affects normal use. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides a bus device self-recovery system and method, which enables the restoration of normal bus device function without powering off and restarting.

[0005] The primary objective of this invention is to solve the aforementioned technical problems. The technical solution of this invention is as follows: The first aspect of the present invention provides a bus device self-recovery system, comprising: a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. The device driver is used to drive the bus device, the monitoring and recovery unit is used to initialize the bus device to enable it to work normally and store the state of the bus device in the state shared memory; the state shared memory sends state information to the data transceiver unit after the state is updated; the data transceiver unit sends and receives data according to the state information in the state shared memory.

[0006] Furthermore, the bus device is a Tsi721 device.

[0007] A second aspect of the present invention provides a self-recovery method for a bus device, the method being applied to a self-recovery system for a bus device, comprising the following steps: Obtain the abnormal status of data transmission and reception in the data transceiver unit. In response to abnormal data transmission and reception status, an exception code is generated, and the status shared memory is updated according to the exception code. Wake up the monitoring and recovery unit and check the status shared memory; Based on the error codes in shared memory and the bus device register status, the device driver is invoked to reset the bus device status and restore the normal function of the bus device.

[0008] Furthermore, it also includes: after restoring the normal function of the bus device, writing the normal functional state of the device back to the shared state memory and notifying the data transceiver unit.

[0009] Furthermore, after the normal functional state of the device is written back to the shared state memory, the monitoring and recovery unit enters a silent state. After the data transceiver unit is awakened, it checks the registers in the shared state memory and determines whether to resume responding to user-layer data transceiver requests based on the state parameters.

[0010] Furthermore, the system determines whether to restart responding to user-level data transmission and reception requests based on status parameters, specifically including: If the status parameters are correct, then resume responding to user-level data transmission and reception requests. If the status parameters are incorrect, the monitoring and recovery unit will be reactivated, and the bus device recovery process will be re-entered.

[0011] Furthermore, when the system is functioning normally, after the user layer sends a data transmission and reception request, the data transmission and reception unit transmits and receives data normally through the device driver, the monitoring and recovery unit remains silent, and the data in the state shared memory does not need to be updated.

[0012] Furthermore, the self-recovery system startup process for bus devices includes: Device driver initializes bus devices; The monitoring and recovery unit starts up and acquires the status of the bus devices; Initialize the state shared memory according to the bus device state, and store the various parameters representing the device state in the state shared memory; The data transceiver unit is started and accesses the shared memory to obtain and verify various parameters. After the parameters are verified to be normal, it enters the standby state, prepares to enter the data transceiver process, waits for the user layer to send data transceiver requests, and the monitoring and recovery unit enters the silent state.

[0013] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: This invention constructs a bus device self-recovery system. By monitoring the data transceiver unit for abnormal data transmission and reception, it generates an error code and updates the state shared memory. It then wakes up the monitoring and recovery unit and checks the state shared memory. Based on the error code in the shared memory and the bus device register state, it calls the device driver to reset the bus device state and restore the normal function of the bus device. This achieves the restoration of the working state of the bus device without shutting down and restarting, so that the user will not be aware of the device error, thereby improving the user experience. This invention improves the security and reliability of the system containing the bus device through the self-recovery of the bus device, ensuring that critical functions are not interrupted during system operation and that the entire system does not shut down due to the failure of the bus device. This invention separates data transmission and reception from state control through modular design, thereby improving operational efficiency and reducing system complexity. Attached Figure Description

[0014] Figure 1 This is a block diagram of a bus device self-recovery system according to an embodiment of the present invention.

[0015] Figure 2 This is a flowchart illustrating the startup process of the bus device self-recovery system according to an embodiment of the present invention.

[0016] Figure 3 This is a flowchart of a bus device self-recovery method according to an embodiment of the present invention.

[0017] Figure 4 This is a flowchart illustrating how an embodiment of the present invention determines whether to restart responding to user-layer data transmission and reception requests based on status parameters. Detailed Implementation

[0018] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0019] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0020] Example 1 like Figure 1 As shown, the first aspect of the present invention provides a bus device self-recovery system, including: a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. The device driver is used to drive the bus device, the monitoring and recovery unit is used to initialize the bus device to make it work normally and store the state of the bus device in the state shared memory; the state shared memory sends state information to the data transceiver unit after the state is updated; the data transceiver unit sends and receives data according to the state information in the state shared memory.

[0021] In one specific embodiment, the bus device can be a Tsi721 device, and the system specifically includes: a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. The device driver is used to drive and control the bus device, the monitoring and recovery unit is used to initialize the bus device to make it work normally and store the bus device state in the state shared memory; the state shared memory sends state information to the data transceiver unit after the state is updated; the data transceiver unit sends and receives data according to the state information in the state shared memory.

[0022] Figure 2 The flowchart of the self-recovery system startup process for bus devices is shown.

[0023] It should be noted that the self-recovery system startup of the bus device includes the following steps: S201, Device driver initialization bus device; S202. The monitoring and recovery unit starts up and acquires the status of the bus devices; S203. Initialize the state shared memory according to the bus device status, and store the parameters representing the device status in the state shared memory; S204. Start the data transceiver unit and access the status shared memory to obtain and verify various parameters. After verifying that the parameters are normal, enter the standby state and prepare to enter the data transceiver process. Wait for the user layer to send data transceiver requests. The monitoring and recovery unit enters the silent state.

[0024] Figure 3 A flowchart of a self-recovery method for bus devices is shown.

[0025] A second aspect of the present invention provides a self-recovery method for a bus device, the method being applied to a self-recovery system for a bus device, comprising the following steps: 301. Obtain abnormal status of data transmission and reception in the data transceiver unit. 302. In response to abnormal data transmission and reception status, generate an exception code and update the status shared memory according to the exception code; 303. Wake up the monitoring and recovery unit and check the status shared memory; 304. Based on the error codes in shared memory and the status of bus device registers, call the device driver to reset the bus device status and restore the normal function of the bus device.

[0026] It should be noted that after the system starts up, when the system is normal, after the user layer sends a data transmission and reception request, the data transmission and reception unit transmits and receives data normally through the device driver, the monitoring and recovery unit remains silent, and the data in the state shared memory does not need to be updated.

[0027] When a system malfunctions, it enters the bus device self-recovery process. More specifically, if the data transceiver unit experiences a data transmission / reception error through the device driver, the data transceiver unit returns an error code to the device driver. The device driver then updates the status shared memory and notifies the monitoring and recovery unit to wake up. At this point, the data transceiver unit temporarily enters a silent state, and user data transmission / reception requests are temporarily suspended. The monitoring and recovery unit checks the error codes in the status shared memory and the bus device register status, calls the device driver to reset the bus device status, and restores the normal function of the bus device.

[0028] In addition, after restoring the normal function of the bus device, the normal functional state of the device is written back to the state shared memory and the data transceiver unit is notified.

[0029] In one specific embodiment, after the normal functional state of the device is written back to the state shared memory, the monitoring and recovery unit enters a silent state. After the data transceiver unit is awakened, it checks the registers in the state shared memory and determines whether to resume responding to user-layer data transceiver requests based on the state parameters.

[0030] Figure 4 The flowchart illustrates a process for determining whether to resume responding to user-level data transmission and reception requests based on status parameters.

[0031] In a specific embodiment, determining whether to restart responding to user-layer data transmission and reception requests based on status parameters specifically includes: 401. If the status parameters are correct, then restart responding to user-level data transmission and reception requests. 402. If the status parameters are incorrect, the monitoring and recovery unit will be reactivated and the bus device recovery process will be re-entered.

[0032] This invention constructs a bus device self-recovery system. By monitoring the data transceiver unit for abnormal data transmission and reception, it generates an error code and updates the state shared memory. It then wakes up the monitoring and recovery unit and checks the state shared memory. Based on the error code in the shared memory and the bus device register state, it calls the device driver to reset the bus device state and restore the normal function of the bus device. This achieves the restoration of the working state of the bus device without shutting down and restarting, so that the user will not be aware of the device error, thereby improving the user experience. This invention improves the security and reliability of the system containing the bus device through the self-recovery of the bus device, ensuring that critical functions are not interrupted during system operation and that the entire system does not shut down due to the failure of the bus device. This invention separates data transmission and reception from state control through modular design, thereby improving operational efficiency and reducing system complexity.

[0033] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for bus device self-recovery, the method applied to a bus device self-recovery system, the system comprising: The system includes a device driver, a monitoring and recovery unit, a data transceiver unit, and a state shared memory. The device driver drives the bus device, the monitoring and recovery unit initializes the bus device to ensure its normal operation and stores the bus device's state in the state shared memory, the state shared memory sends state information to the data transceiver unit after a state update, and the data transceiver unit sends and receives data based on the state information in the state shared memory. The bus device is a Tsi721 device; The method is characterized by comprising the following steps: Obtain abnormal status of data transmission and reception by the data transceiver unit; In response to abnormal data transmission and reception status, an exception code is generated, and the status shared memory is updated according to the exception code; Wake up the monitoring and recovery unit and check the status shared memory; Based on the error codes in shared memory and the bus device register status, the device driver is invoked to reset the bus device status and restore the normal function of the bus device. The self-recovery system startup process of the bus device includes: Device driver initializes bus devices; The monitoring and recovery unit starts up and acquires the status of the bus devices; The state shared memory is initialized according to the bus device state, and the parameters representing the device state are stored in the state shared memory; The data transceiver unit is started and accesses the shared state memory to obtain and verify various parameters. After the parameters are verified to be normal, it enters the standby state and prepares to enter the data transceiver process, waiting for the user layer to send data transceiver requests. The monitoring and recovery unit enters the silent state. After the user layer sends the data transceiver request, the data transceiver unit transmits and receives data normally through the device driver. The monitoring and recovery unit remains silent, and the data in the shared state memory does not need to be updated.

2. The method of claim 1, wherein, Also includes: After restoring the normal function of the bus device, the normal functional state of the device is written back to the shared state memory, and the data transceiver unit is notified.

3. The method of claim 2, wherein, Once the device's normal functional state is written back to the shared state memory, the monitoring and recovery unit enters a silent state. After the data transceiver unit is awakened, it checks the registers in the shared state memory and determines whether to resume responding to user-layer data transceiver requests based on the status parameters.

4. The self-recovery method for a bus device according to claim 3, characterized in that, The step of determining whether to restart responding to user-layer data transmission and reception requests based on status parameters specifically includes: If the status parameters are correct, the system will resume responding to user-level data transmission and reception requests. If the status parameters are incorrect, the monitoring and recovery unit will be reactivated, and the bus device recovery process will be re-entered.

Citation Information

Patent Citations

  • Bus detection method and device, server and electronic equipment

    CN115599617A

  • Communication network fault real-time monitoring and recovery method and system based on SRIO bus

    CN115720180A