A method, device, equipment and medium based on UFS fast repair

By monitoring and automatically adjusting the communication rate at the UFS receiver in a low-power state, the problem of data errors caused by noise and jitter in the UFS system is solved, and communication efficiency and anomaly response speed are improved.

CN120834894BActive Publication Date: 2025-11-25ARTMEM TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511317805.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-11-25
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

In UFS systems, communication links are susceptible to interference from environmental noise and voltage fluctuations, leading to data errors. Existing technologies cannot quickly restore the link, affecting communication efficiency and increasing software development complexity.

Method used

When the power consumption of the communication link is lower than the threshold, the UFS receiver initiates a working mode operation, monitors for abnormal data, and directly sends a speed mode switching request to automatically adjust the communication rate to restore the link.

Benefits of technology

It effectively avoids the impact of long processing times on the communication efficiency of the UFS system, reduces the complexity of software development, and improves the timeliness of anomaly response and the efficiency of link recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120834894B_ABST
    Figure CN120834894B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for repairing UFS based on a quick repair method, equipment and medium. In the case that the power consumption of the communication link between the UFS receiving end and the UFS sending end is lower than the preset power consumption threshold, the receiving end initiates a working mode operation instruction. After the sending end enters the working state according to the working mode operation instruction, the receiving end monitors the data of the communication link. When the data monitoring result indicates that the data of the communication link is abnormal, the receiving end sends a speed mode switching request to the sending end. After receiving the response signal of the sending end completing the speed switching according to the speed mode switching request, the receiving end re-receives the data of the sending end according to the speed mode indicated by the speed mode switching request. The speed mode switching request is automatically triggered to repair the link after the UFS receiving end detects the data exception, which can effectively avoid the influence of long time consumption on the UFS communication efficiency, reduce the software development complexity, and improve the timeliness of the abnormal response.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to, but are not limited to, the chip repair technical field, and in particular to a UFS rapid repair method, device, equipment and medium. BACKGROUND

[0002] In a UFS system, a UFS HOST and a UFS DEVICE need to establish a communication link first, and then the UFS HOST initiates a speed switching operation to the UFS DEVICE. After the switching is completed, the two parties will interact data in the latest agreed speed mode.

[0003] In the actual data interaction process, especially when the two parties communicate in the highest speed mode, they are easily disturbed by external factors such as environmental noise and voltage jitter, resulting in that the receiving end (RX end) of the MIPI MPHY (responsible for the signal transmission and reception of the UFS system) receives error data. These error data will be further transmitted to the MIPI Unipro (Mobile Industry Processor Interface Unified Protocol Layer). According to the MIPI Unipro protocol agreement, if data errors are detected, a data frame retransmission mechanism will be triggered. However, when the data frame retransmission fails multiple times, and all the timers supported by the MIPI Unipro layer are counted, the system will initiate a PArecovery process to try to rebuild the link. Among them, the speed mode recovery process needs to consume hundreds of milliseconds to complete the link rebuilding; if the speed mode requester directly reads or writes the communication partner attribute in the latest speed mode after completing the speed switching, the system will not trigger the speed mode recovery process, at this time the link between the UFS receiving end and the UFS sending end will be completely lost, and the communication must be restored by relying on the software to actively initiate a re-link request. In addition, when the UFS HOST initiates a read or write operation of the MIPI Unipro or MIPI MPHY attribute fails, the existing hardware cannot actively trigger the recovery process, and also needs software intervention and re-initiates the link connection, and this kind of software triggered re-link operation often needs to spend a lot of time, which affects the communication efficiency of the UFS system. SUMMARY

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] Embodiments of the present application provide a UFS rapid repair method, device, equipment and medium, which can effectively avoid the influence of long time consumption on the communication efficiency of the UFS system, reduce the complexity of software development, and improve the timeliness of abnormal response.

[0006] In a first aspect, embodiments of this application provide a method for fast repair based on UFS, applied to a UFS receiver. The method includes: when the power consumption of the communication link between the UFS receiver and the UFS transmitter is lower than a preset power consumption threshold, the UFS receiver initiates a working mode operation command; in response to the UFS transmitter entering a working state according to the working mode operation command, the UFS receiver monitors the communication link; in response to the data monitoring result indicating that there is an anomaly in the data of the communication link, the UFS receiver sends a speed mode switching request to the UFS transmitter; in response to receiving a response signal from the UFS transmitter indicating that it has completed a speed switch according to the speed mode switching request, the UFS receiver re-receives the data from the UFS transmitter according to the speed mode indicated by the speed mode switching request.

[0007] In conjunction with the first aspect, in one embodiment of this application, the abnormality of the communication link data is determined in the following manner: when the data monitoring result indicates that the physical layer data of the communication link is abnormal, the UFS receiver determines that the communication link data is abnormal; when the data monitoring result indicates that the physical layer data of the communication link is normal, but the link layer data of the communication link is abnormal, the UFS receiver determines that the communication link data is abnormal.

[0008] In conjunction with the first aspect, in one embodiment of this application, before the UFS receiver sends a speed mode switching request to the UFS sender, the method further includes: the UFS receiver generating a link reset command; the UFS receiver sending the link reset command to the UFS sender via a communication link, so that the UFS sender adjusts the corresponding speed to a preset target rate.

[0009] In conjunction with the first aspect, in one embodiment of this application, the method further includes: when the data monitoring result indicates that the data of the communication link is normal, the UFS receiver receives the data from the UFS sender.

[0010] In conjunction with the first aspect, in one embodiment of this application, the speed mode switching request includes target speed mode information, and the method further includes: the UFS receiver determining the target speed mode information based on the historical anomaly records of the communication link, wherein the rate corresponding to the target speed mode information is lower than the current communication rate or the rate corresponding to the target speed mode information is a preset stable rate.

[0011] Secondly, this application provides a UFS-based fast repair device, applied to the aforementioned UFS-based fast repair method. The device includes: an instruction initiation module, used to initiate a working mode operation instruction when the power consumption of the communication link between the UFS receiver and the UFS transmitter is lower than a preset power consumption threshold; a data monitoring module, used to monitor the communication link data in response to the UFS transmitter entering a working state according to the working mode operation instruction; an anomaly handling module, used to send a speed mode switching request to the UFS transmitter in response to the data monitoring result indicating an anomaly in the communication link data; and a data receiving module, used to receive data from the UFS transmitter again according to the speed mode indicated by the speed mode switching request in response to receiving a response signal from the UFS transmitter indicating that the speed mode switching request has been completed.

[0012] In conjunction with the second aspect, in one embodiment of this application, the anomaly handling module includes an anomaly diagnosis module, an anomaly detection module, and a repair control module; the response to the data monitoring result showing that the communication link data is abnormal includes: the anomaly diagnosis module diagnoses the physical layer data of the communication link, and in response to the diagnosis result being abnormal, sends physical layer anomaly information to the repair control module, the repair control module determining that the communication link data is abnormal; the anomaly diagnosis module diagnoses the physical layer data of the communication link, and in response to the diagnosis result being normal, the anomaly detection module detects the link layer data of the communication link, and in response to the detection result being abnormal, sends link layer anomaly information to the repair control module, the repair control module determining that the communication link data is abnormal.

[0013] In conjunction with the second aspect, in one embodiment of this application, the exception handling module further includes an instruction generation unit and an instruction sending unit; before the UFS receiver sends a speed mode switching request to the UFS sender, specifically, the following steps are taken: the instruction generation unit generates a link reset instruction; the instruction sending unit sends the link reset instruction to the UFS sender through a communication link, so that the UFS sender adjusts the corresponding speed to a preset target rate.

[0014] On the other hand, embodiments of this application provide a storage device, including: at least one processor; at least one memory for storing at least one program; and when at least one of the programs is executed by at least one of the processors, implementing the UFS-based fast repair method as described above.

[0015] On the other hand, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing the UFS-based fast repair method as described above.

[0016] This application provides a method for rapid repair based on UFS. When the power consumption of the communication link between the UFS receiver and the UFS transmitter is lower than a preset power consumption threshold, the UFS receiver initiates a working mode operation command. After the UFS transmitter enters the working state according to the working mode operation command, the UFS receiver monitors the data of the communication link. When the data monitoring result indicates that there is an anomaly in the data of the communication link, the UFS receiver sends a speed mode switching request to the UFS transmitter. After receiving a response signal from the UFS transmitter indicating that it has completed the speed switching according to the speed mode switching request, the UFS receiver resumes receiving data from the UFS transmitter according to the speed mode indicated by the speed mode switching request. Once the UFS receiver detects a data anomaly, it directly triggers a speed mode switching request to repair the link, effectively avoiding the impact of long latency on the communication efficiency of the UFS system. In addition, this application embodiment automatically completes the anomaly detection and repair initiation process by the UFS receiver, without the need for software intervention in the link repair process, reducing the complexity of software development. Furthermore, there is no need to distinguish the specific operation type corresponding to the anomaly; the repair process is automatically started when a data anomaly is detected, simplifying the link anomaly handling logic and thus effectively improving the timeliness of anomaly response. Attached Figure Description

[0017] Figure 1 This is a flowchart of a method for fast repair based on UFS provided in one embodiment of this application;

[0018] Figure 2 This is a structural diagram of a device for rapid repair based on UFS provided in one embodiment of this application;

[0019] Figure 3 This is a block diagram of a UFS structure provided in one embodiment of this application;

[0020] Figure 4 This is an overall flowchart of a UFS-based fast repair method provided in one embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0022] It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., used in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the structures, proportions, sizes, etc., depicted in the drawings are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the implementation conditions of this application. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effects and purposes achieved by this application, should still fall within the scope of the technical content disclosed in this application. Similarly, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are only for clarity of description and are not used to limit the scope of implementation of this application. Changes or adjustments in their relative relationships, without substantially altering the technical content, should also be considered within the scope of implementation of this application.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0024] In a Universal Flash Storage (UFS) system, the UFS host (such as a controller or processor that needs to access the UFS storage device) and the UFS device (such as the UFS storage device) must first establish a communication link. Then, the UFS host will initiate a speed switching operation to the UFS device. After the switch is completed, the two parties will interact with each other using the latest agreed speed mode.

[0025] During actual data interaction, especially when both parties communicate at their highest speed, they are susceptible to interference from external factors such as environmental noise and voltage fluctuations. This can cause the receiver (RX end) of the MIPI MPHY (Mobile Industry Processor Interface M-PHY, responsible for signal transmission and reception in the UFS system) to receive erroneous data. This erroneous data is then further transmitted to MIPI Unipro (Mobile Industry Processor Interface Universal Protocol, responsible for data frame encapsulation, verification, and link management). According to the MIPI Unipro protocol, if a data error is detected, a data frame retransmission mechanism will be triggered. However, if multiple retransmissions of the data frame still fail, and all timers supported by the MIPI Unipro layer (timers used to count and wait for retransmission results, and confirming the retransmission as invalid if the timeout occurs) have completed their counts, the system will initiate a PA recovery (Physical Layer Adaptation Recovery) process to attempt to rebuild the link. Among them, the speed mode recovery process takes hundreds of milliseconds to complete the link reconstruction. If the speed mode requester directly reads or writes the peer attributes (peer attributes, i.e., the configuration information of UFS HOST and DEVICE, such as supported rates, device status, etc.) with the latest speed mode after completing the speed switch, the system will not trigger the speed mode recovery process. At this time, the link between the UFS receiver and the UFS sender will be completely lost, and communication can only be restored by the software actively initiating a reconnection request.

[0026] Furthermore, when a UFS host fails to initiate a read / write operation on the MIPI Unipro or MIPI MPHY attribute, the existing hardware cannot actively trigger the recovery process. Software intervention is required to re-initiate the link connection, and such software-triggered re-connection operations often take a long time, affecting the communication efficiency of the UFS system.

[0027] In view of this, embodiments of this application provide a method, apparatus, storage device, and computer-readable storage medium based on UFS fast repair. The method can be applied to a UFS receiver, and the specific execution flow is as follows: When the power consumption of the communication link between the UFS receiver and the UFS sender is lower than a preset power consumption threshold, the UFS receiver initiates a working mode operation command; after the UFS sender enters the working state according to the working mode operation command, the UFS receiver monitors the data of the communication link; when the data monitoring result indicates that there is an anomaly in the data of the communication link, the UFS receiver sends a speed mode switching request to the UFS sender; after receiving a response signal from the UFS sender indicating that it has completed the speed switching according to the speed mode switching request, the UFS receiver re-receives the data from the UFS sender according to the speed mode indicated by the speed mode switching request. Once the UFS receiver detects a data anomaly, it directly triggers a speed mode switch request to repair the link, effectively avoiding the impact of long latency on the communication efficiency of the UFS system. In addition, in this embodiment, the entire anomaly detection and repair process is automatically completed by the UFS receiver, without the need for software intervention in the link repair process, reducing the complexity of software development. Furthermore, there is no need to distinguish the specific operation type corresponding to the anomaly (such as data transmission, attribute read / write, etc.). As long as a data anomaly is detected, the repair process is automatically started, simplifying the link anomaly handling logic and thus effectively improving the timeliness of anomaly response.

[0028] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0029] Reference Figure 1 , Figure 1 This is a flowchart of a method for fast repair based on UFS provided in one embodiment of this application. This method can be applied to a UFS receiver, and the process may include, but is not limited to, steps 110 to 140.

[0030] Step 110: When the power consumption of the communication link between the UFS receiver and the UFS sender is lower than the preset power consumption threshold, the UFS receiver initiates a working mode operation command.

[0031] Step 120: In response to the UFS sender entering the working state according to the working mode operation command, the UFS receiver monitors the communication link for data.

[0032] Step 130: In response to the data monitoring results indicating an anomaly in the communication link data, the UFS receiver sends a speed mode switching request to the UFS sender;

[0033] Step 140: In response to receiving a response signal from the UFS sender indicating that it has completed the speed switch according to the speed mode switch request, the UFS receiver resumes receiving data from the UFS sender according to the speed mode indicated by the speed mode switch request.

[0034] Steps 110 to 140 will be described in detail below.

[0035] It's important to note that the UFS receiver is dynamically determined based on the current data transmission direction. Specifically: when data is transmitted from a UFS device to a UFS host, the UFS host receiving the data becomes the receiver; when a command is sent from a UFS host to a UFS device, the UFS device receiving the command becomes the receiver. Conversely, the UFS sender is also determined based on the current data transmission direction. Specifically: when data is transmitted from a UFS device to a UFS host, the UFS device sending the data becomes the sender; when a command is sent from a UFS host to a UFS device, the UFS host sending the command becomes the sender.

[0036] In one feasible embodiment, in step 110, the power consumption of the communication link is lower than a preset power consumption threshold, corresponding to the low-power state of the UFS system (e.g., the MPHY physical layer is in the SAVE state, at which point the link suspends data transmission to save power). When the link is in this state, the UFS receiver (whether it is a HOST or DEVICE) can actively initiate a working mode operation command (e.g., a BURST action command) to notify the UFS sender to switch from the low-power state to the data-transferable working state, preparing for bidirectional data interaction.

[0037] In a feasible embodiment, in step 120, after the UFS transmitter receives the operating mode operation instruction from step 110 and switches to the operating state accordingly (e.g., MPHY switches to BURST mode, enabling data transmission), the current UFS receiver can perform data monitoring on the communication link. Data monitoring refers to the receiver checking in real time whether the data received from the link is normal, including: checking the underlying physical signals (such as the basic signal units of transmission); and checking the upper-layer data frames (such as complete data packets encapsulated according to the protocol), to ensure that the data is not corrupted by interference during transmission.

[0038] In one feasible embodiment, in step 130, if the monitoring results of the UFS receiver show that there is an anomaly in the data in the communication link (such as data errors caused by physical signal distortion, or data frame format not conforming to protocol requirements), regardless of whether the receiver is a UFS host or a UFS device, it can send a speed mode switching request to the UFS sender. This request will clearly inform the sender of the target speed to which it needs to switch (usually a rate that is more stable and has stronger anti-interference capabilities than the current speed), and the data anomaly caused by the current rate mismatch or interference will be resolved by adjusting the communication speed.

[0039] In one feasible embodiment, when the UFS sender receives the speed mode switching request in step 130 and completes its own speed adjustment according to the request, it can return a "speed switching completed" response signal to the UFS receiver. After receiving this signal, the UFS receiver can resume receiving data transmitted by the UFS sender at the target speed indicated in the previous speed mode switching request. Thus, the link anomaly is repaired through speed switching, and both parties resume normal data interaction.

[0040] In a feasible embodiment, the anomaly of communication link data can be determined as follows: when the data monitoring result indicates that the physical layer data of the communication link is abnormal, the UFS receiver determines that the communication link data is abnormal; when the data monitoring result indicates that the physical layer data of the communication link is normal, but the link layer data of the communication link is abnormal, the UFS receiver determines that the communication link data is abnormal. Specifically, the logic for determining the anomaly of communication link data can be divided into two scenarios: the first scenario is that if the data monitoring result shows that the physical layer data of the communication link is abnormal (e.g., the physical layer transmitted signal has symbol errors, unstable signal levels, transmission timing deviations, and other underlying signal problems), the UFS receiver directly determines that the communication link data is abnormal; the second scenario is that if the data monitoring result shows that the physical layer data of the communication link is normal (i.e., the underlying signal transmission does not have the above problems), but the link layer data is abnormal (e.g., the data frame encapsulated by the link layer has syntax errors, checksum mismatches, incomplete frame structures, and other protocol-level problems), in this case, the UFS receiver also determines that the communication link data is abnormal. In short, as long as the physical layer data is abnormal, or the physical layer is normal but the link layer data is abnormal, the UFS receiver can identify that there is an anomaly in the communication link data.

[0041] In one feasible embodiment, before the UFS receiver sends a speed mode switching request to the UFS sender, a "link reset" pre-processing step can be added. The specific operation is as follows: First, a link reset command (linereset operation) is generated. Its core function is to reduce the MPHY RX (MIPI physical layer receiver) speed of the peer to the minimum speed. Then, the UFS receiver sends this link reset command to the UFS sender via the communication link. When the UFS sender receives this command, it can proactively adjust its own MPHY physical layer receive rate (RX rate) to a preset target rate as required. This rate is the minimum base rate in the UFS protocol (not the currently abnormally high rate).

[0042] In one feasible embodiment, when the data monitoring results indicate that the communication link data is normal, it means that the underlying physical layer data is normal (e.g., the MPHY physical layer transmits signals without sign errors, with stable levels, no timing deviations, and the underlying signal transmission quality meets requirements), and the upper link layer data is normal (e.g., the Unipro link layer encapsulates data frames without syntax errors, with matching checksums, complete frame structures, and no abnormalities in protocol-level encapsulation and transmission). Once the data is confirmed to be normal, the UFS receiver can directly enter the normal data reception state, receiving the data transmitted by the UFS sender (which may be storage file data, device attribute information, etc.) according to the communication speed and protocol specifications agreed upon by both parties, and then passing the received data to the corresponding processing unit (e.g., the application processor on the HOST side, the storage control unit on the DEVICE side) as needed, ensuring that the UFS communication link continuously and stably completes the data interaction task.

[0043] In one feasible embodiment, the speed mode switching request includes target speed mode information. This information is determined by the UFS receiver based on historical anomaly records of the communication link. The rate corresponding to the target speed mode information is lower than the current communication rate, or the rate corresponding to the target speed mode information is a preset stable rate. Specifically, the target speed mode information clarifies the communication speed standard (such as the specific rate level defined in the UFS protocol) that both the receiver and the sender need to synchronously switch to, and is the core basis for the sender to adjust its own speed and the receiver to subsequently resume data reception. To ensure that the determined target speed mode information is more in line with the actual link situation and to guarantee the stability of communication after the switch, this embodiment designs corresponding determination logic: the UFS receiver can retrieve and analyze historical anomaly records of the communication link. These records contain key information when data anomalies occurred in the past (such as the current communication rate when the anomaly occurred, the anomaly type, the stable rate after repair, etc.). By statistically analyzing and judging these historical data, a target speed mode suitable for the current scenario is selected.

[0044] In one feasible embodiment, if historical records show that interference, symbol errors, or other anomalies are prone to occur at the current communication rate (e.g., high-speed mode), the receiver can choose a lower speed level than the current rate as the target speed because lower speeds are generally more resistant to environmental noise and voltage jitter, reducing the probability of anomaly recurrence. If historical records have verified that a certain fixed speed (e.g., the basic low-speed level specified by the UFS protocol, or the speed within a pre-tested "no-anomaly speed range") has been consistently anomaly-free and has high transmission stability, the receiver can directly use this preset speed as the target speed without temporary adjustments, further improving handover efficiency and reliability.

[0045] See Figure 2 , Figure 2This is a structural diagram of a device for UFS-based fast repair according to an embodiment of this application. The device can be applied to the aforementioned UFS-based fast repair method. The device 200 includes:

[0046] The instruction initiation module 210 is used to initiate a working mode operation instruction when the power consumption of the communication link between the UFS receiver and the UFS sender is lower than a preset power consumption threshold (i.e., in a low power consumption state).

[0047] The data monitoring module 220 is used to respond to the UFS sender entering the working state according to the working mode operation command, and the UFS receiver to monitor the communication link.

[0048] The exception handling module 230 is used to respond to the data monitoring result indicating that there is an anomaly in the data of the communication link, and the UFS receiver sends a speed mode switching request to the UFS sender.

[0049] The data receiving module 240 is used to respond to the response signal received from the UFS transmitter to complete the speed switching according to the speed mode switching request, and the UFS receiver resumes receiving data from the UFS transmitter according to the speed mode indicated by the speed mode switching request.

[0050] In one feasible embodiment, the anomaly handling module 230 includes an anomaly diagnosis module, an anomaly detection module, and a repair control module; the specific process for responding to data monitoring results indicating an anomaly in the communication link data is as follows:

[0051] The anomaly diagnosis module first diagnoses the physical layer data of the communication link. If the diagnosis result is abnormal, the physical layer anomaly information is sent to the repair control module, which determines that there is an anomaly in the data of the communication link. If the diagnosis result is normal, the anomaly detection module detects the link layer data of the communication link. If the detection result is abnormal, the link layer anomaly information is sent to the repair control module, which determines that there is an anomaly in the data of the communication link.

[0052] It should be noted that the anomaly diagnosis module can comprehensively inspect all physical layer data frames transmitted in the communication link, including verifying underlying transmission characteristics such as signal symbols, timing, and level stability. Once any physical layer data anomaly is detected (such as symbol errors, signal distortion, etc.), it will immediately transmit the specific error information (such as anomaly type, location, etc.) to the repair control module. After receiving the anomaly information, the repair control module will quickly initiate the link repair process, which includes: first, triggering a linereset operation (link reset), generating and sending a link reset command to reduce the MPHY RX (physical layer receiver) speed of the peer (UFS sender) to the minimum base rate to ensure the stability of subsequent interactions; subsequently, the repair control module will generate a speed mode switching request containing target speed mode information and send it to the peer, prompting both parties to synchronously switch to a more stable communication rate. Through this series of consecutive operations, the repair control module can efficiently complete the link anomaly repair and restore normal data interaction between the UFS receiver and sender. The linereset action causes the UFS sender to reduce its speed to the minimum, ensuring that subsequent speed mode switching request frames can be stably transmitted to the other end at the minimum speed. This avoids errors in request frame transmission due to interference at the current high speed, thereby improving the reliability of the subsequent speed switching process.

[0053] In a feasible embodiment, the exception handling module 230 further includes an instruction generation unit and an instruction sending unit; before the UFS receiver sends a speed mode switching request to the UFS sender, the specific process includes:

[0054] The instruction generation unit generates a link reset instruction, which is then sent to the UFS transmitter via the communication link by the instruction sending unit, causing the UFS transmitter to adjust the corresponding speed to the preset target rate.

[0055] It should be noted that UFS communication has bidirectional transmission characteristics. When the data transmission direction is "UFS DEVICE→UFSHOST", the UFS HOST acts as the receiving end to receive the data sent by the DEVICE. In this case, the anomaly diagnosis module, anomaly detection module, and repair control module of the solution need to be deployed on the UFS HOST side. When the data transmission direction is "UFS HOST→UFSSDEVICE", the UFS DEVICE acts as the receiving end to receive the data sent by the HOST (such as control commands, configuration information, etc.). In this case, the same core modules mentioned above need to be deployed on the UFS DEVICE side to ensure that data anomaly detection and link repair functions can be realized regardless of which end undertakes the receiving responsibility.

[0056] It should be noted that the logic implementation, execution subject, operation object, and processing flow involved in each module of the UFS-based fast repair device in this embodiment all correspond one-to-one with the aforementioned UFS-based fast repair method. For example, the functional logic of the instruction initiation module 210 corresponds to step 110 in the method, the operation flow of the data monitoring module 220 corresponds to step 120 in the method, the exception judgment and repair triggering logic of the exception handling module 230 corresponds to the content regarding data exception judgment and speed mode switching request sending in the method, and the recovery reception logic of the data receiving module 240 corresponds to step 140 in the method. At the same time, the division of labor and cooperation mode of each sub-module (exception diagnosis module, exception detection module, etc.) included in the exception handling module 230 also completely matches the layered detection and repair control logic for physical layer and link layer anomalies in the method. For specific correspondences and detailed implementation details, please refer to the relevant descriptions in the aforementioned UFS-based fast repair method, which will not be repeated here.

[0057] See Figure 3 , Figure 3 This is a UFS structure block diagram provided in one embodiment of this application. The diagram illustrates the layered architecture of the UFS system from the application layer to the physical layer, as well as its interaction with MIPI UniPro and MPHY (MIPI physical layer, the underlying physical implementation responsible for signal transmission and reception). Each layer transmits data and control commands through "SAP (Service Access Point, i.e., the interface for interaction between modules)," which not only realizes the conventional UFS data communication process but also provides a runtime environment for the end-to-end logic of "anomaly detection-automatic repair" in this application.

[0058] Specifically, the Device Manager is responsible for the overall management of the UFS device. It interacts with other layers through "UIO_SAP" (UFS Input / Output Service Access Point) and "UDM_SAP" (UFS Device Management Service Access Point). Its functions cover the global control logic of the UFS receiver. For example, when the power consumption of the communication link is lower than a preset threshold (such as when the MPHY is in a low-power SAVE state), the Device Manager will drive the instruction to initiate the relevant functional unit, prompting the UFS receiver to initiate the working mode operation instruction (corresponding to step 110) to wake up the other end to enter the working state.

[0059] The UFS Application Layer (UAP) interacts with the lower-level UTP layer through "UTP_CMD_SAP" (UTP Command Service Access Point) and "UTP_TM_SAP" (UTP Transmission Management Service Access Point), undertaking the application layer initiation and parsing functions of core commands such as "working mode operation commands" and "speed mode switching requests".

[0060] The UFS Transport Protocol Layer (UTP) is responsible for the transmission protocol processing of UFS data (such as data encapsulation and command interaction). It connects the UAP and UIC layers and is the protocol support layer for the "working mode operation command transmission and data sending and receiving process". When the UFS receiver initiates a working mode operation command, the command needs to be encapsulated by the UTP layer into a format that conforms to the protocol specification, and then transmitted to the lower UIC layer through "UIC_SAP" (UFS Interconnect Service Access Point) to ensure that the command flows accurately in the link (corresponding to the command transmission process in steps 110 to 120).

[0061] The UFS Interconnect Layer (UIC) handles the interconnection functions within the UFS system. It interfaces with MIPI UniPro via the Cprot interface (which can be understood as a custom protocol interface used to interact with MIPI UniPro) and with UTP. It provides a data path for the UFS receiver to monitor the communication link. Both physical layer signal data and link layer frame data must pass through the UIC layer before being captured by the upper-layer monitoring module (corresponding to the monitoring data source in step 120).

[0062] MIPI UniPro (MIPI Unified Protocol Layer) conforms to the MIPI Alliance specifications and implements protocol processing for the data link (such as link layer encapsulation and error verification). It is the core carrier of "link layer anomaly detection" and "repair control". The repair control module is responsible for receiving anomaly information from the RX detection module (i.e., the anomaly detection module) and the MPHY RX diagnostic module (i.e., the anomaly diagnosis module), making decisions and executing repair operations such as "initiating a speed mode switch request and generating a link reset command". When the data monitoring results show an anomaly, it is this module that drives the UFS receiver to send a speed mode switch request to the sender (corresponding to step 130).

[0063] The RX detection module is responsible for detecting UFS link layer (UniPro protocol layer) data. If an anomaly is found (such as frame structure error or verification failure), it will immediately report to the repair control module and trigger the subsequent repair process. This matches the logic of "the physical layer is normal but the link layer is abnormal, which is judged as data anomaly" (corresponding to the second case of anomaly judgment).

[0064] The RMMI interface is an interface for transmitting control / status information between modules. It is used for the interaction of abnormal information and control commands between the repair control module and the MPHY RX diagnostic module. It ensures that physical layer abnormalities can be efficiently transmitted to the repair control module. For example, when the MPHY RX diagnostic module detects a physical layer abnormality, it can transmit the information to the repair control module through this interface to complete the abnormality reporting (corresponding to the first case of abnormality judgment).

[0065] The MPHY RX diagnostic module is responsible for detecting physical layer anomalies such as signal level, timing, and symbol errors. If an anomaly is detected, it notifies the repair control module through the RMMI interface to ensure that underlying signal problems can be detected in a timely manner (corresponding to the monitoring of physical layer data in step 120).

[0066] M-TX / M-RX (MPHY transmit / receive modules) are the underlying physical layer signal transceiver units. M-TX is responsible for transmitting physical layer signals (corresponding to pins "TX1P, TX1N, TX0P, TX0N"), and M-RX is responsible for receiving physical layer signals (corresponding to pins "RX0P, RX0N, RX1N, RX1P"). They form the hardware foundation for data transmission and reception in the communication link and for handling physical layer anomalies. When the UFS receiver resumes receiving data according to the speed mode indicated by the speed mode switch request, the M-RX unit can adapt to the new rate, achieving stable data reception and ultimately enabling normal communication after link repair.

[0067] See Figure 4 , Figure 4 This is an overall flowchart of a UFS-based fast repair method provided in one embodiment of this application. When the UFS HOST and UFS DEVICE enter the data interaction phase, the process will switch between a low-power state and a working state: The UFS HOST first initiates a Hibernate (sleep) operation to reduce power consumption during non-data transmission phases; when the UFS DEVICE receives the EOB (End Of Burst) operation command, it will control its own MPHY (MIPI physical layer, responsible for underlying signal transmission and reception) to enter the SAVE state, which is a low-power mode that only maintains the basic link connection and stops data transmission; at the same time, the MPHY on the UFS HOST side also enters the SAVE state synchronously, and both are in a low-power standby state. When data interaction needs to be restored, the UFS HOST re-initiates the BURST (burst transmission) action, triggering the MPHY on the UFS DEVICE side to switch from the SAVE state to the BURST working state. At this time, the MPHY RX diagnostic module (i.e., the anomaly diagnostic module) on the UFS DEVICE side immediately starts working and begins to perform real-time diagnosis on the received physical layer signals (such as signal level, timing, symbol integrity, etc.).

[0068] If the MPHY RX diagnostic module returns a normal result, it indicates that there are no abnormalities in physical layer data transmission. MPHY will then transmit the received physical layer data to Unipro (MIPI unified protocol layer, responsible for link layer protocol processing) via the RMMI interface. Subsequently, Unipro's RX detection module (i.e., the anomaly detection module) will further inspect the link layer data (such as data frame structure, checksum, protocol syntax, etc.). When the RX detection module returns a normal result, it indicates that there are no anomalies in either the physical layer or the link layer, and data will continue to be transmitted to the upper layer. Normal data interaction between UFS HOST and UFS DEVICE continues, and the process ends.

[0069] If the RX detection module detects an anomaly in the link layer data (such as frame structure errors or verification failures), it will immediately report the error information to Unipro's repair control module. After receiving the anomaly information, the repair control module will initiate a speed mode switch request to the UFS HOST. The request includes the target speed mode information (such as a more stable low rate) determined based on historical anomaly records. After receiving the request, the UFS HOST will renegotiate with the UFS DEVICE and synchronize to the latest speed mode. Both parties will resume data interaction with the new speed mode, and the process will end.

[0070] If the MPHY RX diagnostic module detects an anomaly (such as signal distortion or symbol error) directly during the physical layer data diagnostic phase, it will report the physical layer anomaly information directly to Unipro's repair control module through the RMMI interface. The repair control module will also send a speed mode switching request to the UFS HOST, triggering the UFS HOST and UFS DEVICE to renegotiate the speed mode. Finally, the two parties will interact with data using the latest speed mode, and the process will end.

[0071] This application also discloses a storage device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor. When the computer program is executed by the processor, it implements the UFS-based fast repair method described above.

[0072] This application also discloses a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the aforementioned UFS-based fast repair method.

[0073] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for fast repair based on UFS, applied to a UFS receiver, characterized in that, The method includes: When the power consumption of the communication link between the UFS receiver and the UFS transmitter is lower than a preset power consumption threshold, the UFS receiver initiates a working mode operation command. In response to the UFS sender entering the working state according to the working mode operation instruction, the UFS receiver performs data monitoring on the communication link; In response to a data monitoring result indicating an anomaly in the communication link, the UFS receiver sends a speed mode switching request to the UFS sender. In response to receiving a response signal from the UFS transmitter that completes a speed switch according to the speed mode switch request, the UFS receiver resumes receiving data from the UFS transmitter according to the speed mode indicated by the speed mode switch request.

2. The method for fast repair based on UFS according to claim 1, characterized in that, The anomalies in the data of the communication link are determined in the following manner: When the data monitoring results indicate that the physical layer data of the communication link is abnormal, the UFS receiver determines that the data of the communication link is abnormal; When the data monitoring results indicate that the physical layer data of the communication link is normal, but the link layer data of the communication link is abnormal, the UFS receiver determines that the data of the communication link is abnormal.

3. The method for fast repair based on UFS according to claim 1, characterized in that, Before the UFS receiver sends a speed mode switching request to the UFS sender, the method further includes: The UFS receiver generates a link reset command; The UFS receiver sends a link reset command to the UFS sender via the communication link, so that the UFS sender adjusts the corresponding speed to the preset target rate.

4. The method for fast repair based on UFS according to claim 1, characterized in that, The method further includes: When the data monitoring results indicate that the communication link is normal, the UFS receiver receives the data from the UFS sender.

5. The method for fast repair based on UFS according to claim 1, characterized in that, The speed mode switching request includes target speed mode information, and the method further includes: The UFS receiver determines the target speed mode information based on the historical anomaly records of the communication link, wherein the rate corresponding to the target speed mode information is lower than the current communication rate or the rate corresponding to the target speed mode information is a preset stable rate.

6. A device for rapid repair based on UFS, characterized in that, The apparatus, applied to the UFS-based fast repair method according to any one of claims 1-5, comprises: The instruction initiation module is used to initiate a working mode operation instruction when the power consumption of the communication link between the UFS receiver and the UFS sender is lower than a preset power consumption threshold. The data monitoring module is used to respond to the UFS sender entering the working state according to the working mode operation instruction, and the UFS receiver performs data monitoring on the communication link; An anomaly handling module is used to respond to a data monitoring result indicating an anomaly in the data of the communication link, by having the UFS receiver send a speed mode switching request to the UFS sender. The data receiving module is used to respond to a response signal received from the UFS transmitter to complete a speed switch according to the speed mode switching request, and the UFS receiver to re-receive data from the UFS transmitter according to the speed mode indicated by the speed mode switching request.

7. The device for rapid repair based on UFS according to claim 6, characterized in that, The anomaly handling module includes an anomaly diagnosis module, an anomaly detection module, and a repair control module; The response to data monitoring results indicating an anomaly in the communication link data includes: The anomaly diagnosis module diagnoses the physical layer data of the communication link. In response to an anomaly in the diagnosis result, it sends physical layer anomaly information to the repair control module, which determines that there is an anomaly in the data of the communication link. The anomaly diagnosis module diagnoses the physical layer data of the communication link. If the diagnosis result is normal, the anomaly detection module detects the link layer data of the communication link. If the detection result is abnormal, the link layer anomaly information is sent to the repair control module. The repair control module determines that there is an anomaly in the data of the communication link.

8. The device for rapid repair based on UFS according to claim 6, characterized in that, The exception handling module further includes an instruction generation unit and an instruction sending unit; Before the UFS receiver sends a speed mode switching request to the UFS sender, the specific steps include: The instruction generation unit generates a link reset instruction; The instruction sending unit sends the link reset instruction to the UFS transmitter via the communication link, so that the UFS transmitter adjusts the corresponding speed to the preset target rate.

9. A storage device, characterized in that, include: At least one processor; At least one memory for storing at least one program; The method for fast repair based on UFS as described in any one of claims 1 to 5 is implemented when at least one of the programs is executed by at least one of the processors.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the UFS-based fast repair method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Temperature-based flash memory rereading method

    CN110659146A

  • Data transmission method and electronic device

    US20220158756A1