UFS-based rapid repair method, apparatus and device, and medium
By monitoring and automatically adjusting the communication rate at the UFS receiver, the data error problem caused by environmental noise and voltage jitter in the UFS system is solved, communication efficiency and abnormal response speed are improved, and the complexity of software intervention is reduced.
Patent Information
- Application Number
- CN202511317805.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-16
AI Technical Summary
In UFS systems, communication links are susceptible to interference from environmental noise and voltage jitter, leading to data errors. Existing technologies cannot quickly recover, affecting communication efficiency and increasing software complexity.
The UFS receiver initiates a working mode operation when the power consumption of the communication link is lower than the threshold, monitors data anomalies, and directly triggers a speed mode switching request, automatically adjusting the communication rate to restore the link.
Effectively avoid the impact of long communication times on the UFS system communication efficiency, reduce software development complexity, and improve the timeliness of exception responses and link recovery speed.
Smart Images

Figure CN120834894A_ABST
Abstract
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, an embodiment of the present application provides a method for fast repair based on UFS, applied to a UFS receiving end, the method comprising: initiating, by the UFS receiving end, a working mode operation instruction in a case where power consumption of a communication link between the UFS receiving end and a UFS sending end is lower than a preset power consumption threshold; in response to the UFS sending end entering a working state according to the working mode operation instruction, performing, by the UFS receiving end, data monitoring on the communication link; in response to a data monitoring result indicating that data of the communication link is abnormal, sending, by the UFS receiving end, a speed mode switching request to the UFS sending end; and in response to receiving a response signal indicating that the UFS sending end completes speed switching according to the speed mode switching request, receiving, by the UFS receiving end, data of the UFS sending end according to a speed mode indicated by the speed mode switching request.
[0007] In combination with the first aspect, in an embodiment of the present application, the abnormal data of the communication link is determined in the following manner: when the data monitoring result indicates that physical layer data of the communication link is abnormal, the UFS receiving end determines that the data of the communication link is abnormal; and when the data monitoring result indicates that the physical layer data of the communication link is normal and link layer data of the communication link is abnormal, the UFS receiving end determines that the data of the communication link is abnormal.
[0008] In combination with the first aspect, in an embodiment of the present application, before the UFS receiving end sends the speed mode switching request to the UFS sending end, the method further comprises: generating, by the UFS receiving end, a link reset instruction; and sending, by the UFS receiving end, the link reset instruction to the UFS sending end through the communication link, so that the UFS sending end adjusts a corresponding speed to a preset target rate.
[0009] In combination with the first aspect, in an embodiment of the present application, the method further comprises: when the data monitoring result indicates that the data of the communication link is normal, receiving, by the UFS receiving end, the data of the UFS sending end.
[0010] In combination with the first aspect, in an embodiment of the present application, the speed mode switching request comprises target speed mode information, and the method further comprises: determining, by the UFS receiving end, the target speed mode information according to historical abnormal records of the communication link, wherein a rate corresponding to the target speed mode information is lower than a current communication rate or the rate corresponding to the target speed mode information is a preset stable rate.
[0011] In a second aspect, an embodiment of the present application provides a device based on UFS fast repair, which is applied to the above-mentioned method based on UFS fast repair, and the device includes: an instruction initiation module, which is used for the UFS receiving end to initiate a working mode operation instruction when the power consumption of the communication link between the UFS receiving end and the UFS sending end is lower than a preset power consumption threshold; a data monitoring module, which is used for the UFS receiving end to monitor data on the communication link in response to the UFS sending end entering a working state according to the working mode operation instruction; an exception handling module, which is used for the UFS receiving end to send a speed mode switching request to the UFS sending end in response to a data monitoring result indicating that there is an abnormality in the data of the communication link; and a data receiving module, which is used for the UFS receiving end to re-receive data from the UFS sending end according to the speed mode indicated by the speed mode switching request in response to receiving a response signal from the UFS sending end that the speed switching is completed according to the speed mode switching request.
[0012] In combination with the second aspect, in an embodiment of the present application, the exception handling module includes an exception diagnosis module, an exception detection module and a repair control module; the response to the data monitoring result showing that the data of the communication link is abnormal includes: the exception diagnosis module diagnoses the physical layer data of the communication link, and in response to the diagnosis result being abnormal, sends the physical layer abnormality information to the repair control module, and the repair control module determines that the data of the communication link is abnormal; the exception diagnosis module diagnoses the physical layer data of the communication link, and in response to the diagnosis result being normal, the exception detection module detects the link layer data of the communication link, and in response to the detection result being abnormal, sends the link layer abnormality information to the repair control module, and the repair control module determines that the data of the communication link is abnormal.
[0013] In combination with the second aspect, in one embodiment of the present application, the exception handling module further includes an instruction generation unit and an instruction sending unit; before the UFS receiving end sends a speed mode switching request to the UFS sending end, it specifically includes: the instruction generation unit generates a link reset instruction; the instruction sending unit sends the link reset instruction to the UFS sending end through the communication link, so that the UFS sending end adjusts the corresponding speed to a preset target rate.
[0014] On the other hand, an embodiment of the present application provides a storage device comprising: at least one processor; at least one memory for storing at least one program; and implementing the UFS-based quick repair method as described above when at least one of the programs is executed by at least one of the processors.
[0015] In another aspect, an embodiment of the present application provides a computer readable storage medium storing computer executable instructions for performing the method for UFS fast repair based on the above.
[0016] The method for UFS fast repair based on the above provided by an embodiment of the present application, 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 UFS receiving end initiates the working mode operation instruction; after the UFS sending end enters the working state according to the working mode operation instruction, the UFS 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 UFS receiving end sends the speed mode switching request to the UFS sending end; after receiving the response signal of the UFS sending end completing the speed switching according to the speed mode switching request, the UFS receiving end re-receives the data of the UFS sending end according to the speed mode indicated by the speed mode switching request. Once the UFS receiving end monitors the data abnormality, the speed mode switching request is directly triggered to repair the link, which effectively avoids the influence of long time consumption on the communication efficiency of the UFS system; in addition, the abnormality monitoring and repair initiation are automatically completed by the UFS receiving end throughout the process, without the need for software intervention in the link repair process, which reduces the complexity of software development; in addition, without the need to distinguish the specific operation type corresponding to the abnormality, the repair process is automatically started when the data abnormality is monitored, which simplifies the link abnormality processing logic, thereby effectively improving the timeliness of the abnormality response. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a method flowchart for UFS fast repair based on an embodiment of the present application; Figure 2 is a device structure diagram for UFS fast repair based on an embodiment of the present application; Figure 3 is a UFS structure block diagram provided by an embodiment of the present application; Figure 4 is a method flowchart for UFS fast repair based on an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical scheme and advantages of the present application clearer, further detailed description of the present application will be given below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0019] It is to be noted that, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that in the flowchart. The terms "first", "second", and the like in the description and in the claims, as well as above-described accompanying drawings, are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the structures, proportions, sizes, etc. shown in the drawings of the present specification are only used to facilitate the understanding and reading of the disclosed content by those skilled in the art, and do not have technical substantive significance, and any modification of the structure, change of the proportion relationship or adjustment of the size, without affecting the effects and purposes that can be achieved by the present application, should still fall within the scope of the disclosed technical content. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" used in the present specification are only for the purpose of clear understanding of the description, and are not intended to limit the scope of the present application, and the change or adjustment of the relative relationship without substantially changing the technical content is also considered as the scope of the present application.
[0020] 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 the present application only and is not intended to limit the present application.
[0021] In a Universal Flash Storage (UFS) system, a UFS HOST (such as a controller or processor that needs to access a UFS storage device) and a UFS DEVICE (such as a UFS storage device) need to establish a communication link first, then the UFS HOST will initiate a speed switching operation to the UFS DEVICE, after the switching is completed, both sides will interact data in the latest agreed speed mode.
[0022] In actual data interaction process, especially when both sides communicate in the highest speed mode, it is easy to be interfered by environmental noise, voltage jitter and other external factors, resulting in that the receiving end (RX end) of MIPI MPHY (Mobile Industry Processor Interface M-PHY, responsible for signal transmission and reception of UFS system) receives error data. These error data will be further transmitted to MIPI Unipro (Mobile Industry Processor Interface Universal Protocol, responsible for data frame packaging, checking and link management). According to the MIPI Unipro protocol agreement, if data errors are detected, the data frame retransmission mechanism will be triggered. However, when the data frame is retransmitted for many times and still fails, and all timers (used for timing and waiting for retransmission results, and when the timer is expired, it is confirmed that the retransmission is invalid) supported by MIPI Unipro layer are all counted, the system will initiate PA recovery (Physical Layer Adaptation Recovery) process to try to rebuild the link. Among them, the speed mode recovery process (speed mode recovery) needs to consume hundreds of milliseconds to complete the link rebuilding. If the speed mode requester directly reads or writes the communication peer attribute (peer attribute, that is, the configuration information of UFS HOST and DEVICE, such as supported rate, device state, etc.) 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 recovered by relying on the software to actively initiate a re-linking request.
[0023] In addition, when the UFS HOST initiates the read-write operation of 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. However, the software triggered re-linking operation often needs to spend a lot of time, which affects the communication efficiency of the UFS system.
[0024] In view of this, embodiments of the present application provide a method, apparatus, storage device, and computer-readable storage medium based on UFS fast repair. This method can be applied to a UFS receiver, and the specific execution process is as follows: 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 instruction; after the UFS transmitter enters the working state according to the working mode operation instruction, the UFS receiver monitors data on the communication link; when the data monitoring result indicates that there is an abnormality 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 the speed switch has been completed according to the speed mode switching request, the UFS receiver re-receives 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 switch to request link repair, effectively avoiding the impact of long time consumption on the communication efficiency of the UFS system. In addition, in the embodiment of the present application, the UFS receiver automatically completes the anomaly detection and repair initiation throughout the entire process, without the need for software intervention in the link repair process, reducing the complexity of software development. In addition, there is no need to distinguish the specific operation type corresponding to the anomaly (such as data transmission, attribute reading and writing, etc.). As long as the data anomaly is detected, the repair process is automatically initiated, simplifying the link anomaly handling logic and effectively improving the timeliness of the anomaly response.
[0025] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0026] Reference Figure 1 , Figure 1 This is a flow chart of a method for quick repair based on UFS provided by an embodiment of the present application. The method can be applied to a UFS receiving end. The process may specifically include but is not limited to steps 110 to 140.
[0027] Step 110: When the power consumption of the communication link between the UFS receiving end and the UFS sending end is lower than a preset power consumption threshold, the UFS receiving end initiates a working mode operation instruction; Step 120: In response to the UFS transmitter entering the working state according to the working mode operation instruction, the UFS receiver monitors data on the communication link; Step 130: In response to the data monitoring result indicating that there is an abnormality in the data of the communication link, the UFS receiving end sends a speed mode switching request to the UFS sending end; Step 140: In response to receiving a response signal indicating that the UFS transmitter completes the speed switching 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.
[0028] The steps 110 to 140 are described in detail below.
[0029] It should be noted that the UFS receiving end is dynamically determined according to the current data transmission direction, specifically: when data is transmitted from the UFS DEVICE to the UFS HOST, the UFS HOST receiving the data is the receiving end; when the instruction is sent from the UFS HOST to the UFS DEVICE, the UFS DEVICE receiving the instruction becomes the receiving end. Correspondingly, the UFS sending end is also determined according to the current data transmission direction, specifically: when data is transmitted from the UFS DEVICE to the UFS HOST, the UFS DEVICE sending the data is the sending end; when the instruction is sent from the UFS HOST to the UFS DEVICE, the UFS HOST sending the instruction becomes the sending end.
[0030] In a feasible embodiment, in step 110, the power consumption of the communication link is lower than the preset power consumption threshold, corresponding to the low power consumption state of the UFS system (for example, the MPHY physical layer is in the SAVE state, at which time the link suspends data transmission to save power consumption). When the link is in this state, the UFS receiving end (whether the HOST or the DEVICE) can actively initiate a working mode operation instruction (such as a BURST action instruction) to notify the UFS sending end to switch from the low power consumption state to the working state capable of transmitting data, and to prepare for bidirectional data interaction.
[0031] In a feasible embodiment, in step 120, after the UFS sending end receives the working mode operation instruction in step 110 and switches to the working state (for example, the MPHY switches to the BURST mode and has data transmission capability) accordingly, the current UFS receiving end can monitor the data of the communication link. Data monitoring refers to that the receiving end checks whether the data received from the link is normal in real time, including: checking the underlying physical signal (such as the basic signal unit of transmission); checking the upper layer data frame (such as the complete data packet packaged according to the protocol), to ensure that the data does not have errors due to interference during transmission.
[0032] In a feasible embodiment, in step 130, if the monitoring result of the UFS receiving end shows that the data in the communication link is abnormal (for example, the physical signal distortion causes data error, or the data frame format does not meet the protocol requirements), whether the receiving end is the UFS HOST or the UFS DEVICE at this time, a speed mode switching request can be sent to the UFS sending end. This request will explicitly inform the sending end of the target speed to which it needs to switch (usually a speed that is more stable and has stronger anti-interference capability than the current speed), and solve the current data abnormality problem caused by speed mismatch or interference by adjusting the communication speed.
[0033] In a feasible embodiment, after the UFS sending end receives the speed mode switching request in step 130 and completes its own speed adjustment according to the request, it can return a response signal of “completed speed switching” to the UFS receiving end. After receiving this signal, the UFS receiving end can start receiving the data transmitted by the UFS sending end according to the target speed indicated in the previous speed mode switching request, thus the link exception is repaired through speed switching, and the two parties resume normal data interaction.
[0034] In a feasible embodiment, the data exception of the communication link can be determined in the following manner: when the data monitoring result indicates that the physical layer data of the communication link is abnormal, the UFS receiving end determines that the data of the communication link is abnormal; when the data monitoring result indicates that the physical layer data of the communication link is normal, and the link layer data of the communication link is abnormal, the UFS receiving end determines that the data of the communication link is abnormal. Specifically, the determination logic of the data exception of the communication link can be divided into two cases: the first case is that if the data monitoring result shows that the physical layer data of the communication link is abnormal (for example, the transmitted signal of the physical layer has symbol error, unstable signal level, transmission timing deviation, and other underlying signal problems), the UFS receiving end directly determines that the data of the communication link is abnormal; the second case 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-mentioned problems), but the link layer data is abnormal (for example, the data frame encapsulated by the link layer has syntax error, check code mismatch, incomplete frame structure, and other protocol level problems), in this case, the UFS receiving end also determines that the data of the communication link 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, it can be determined by the UFS receiving end as the data exception of the communication link.
[0035] In a feasible embodiment, before the UFS receiving end sends the speed mode switching request to the UFS sending end, a pre-stage of “link reset” can be added, and the specific operation is as follows: first, a link reset instruction (link reset operation) is generated, which has the core function of reducing the speed of the MPHY RX (MIPI physical layer receiving end) of the opposite end to the lowest speed; then, the UFS receiving end sends the link reset instruction to the UFS sending end through the communication link. After the UFS sending end receives the instruction, it can actively adjust the receiving rate (RX rate) of its own MPHY physical layer to the preset target rate according to the requirement. This rate is the lowest basic rate in the UFS protocol (not the current high speed rate that may be abnormal).
[0036] In a feasible embodiment, when the data monitoring result indicates that the data of the communication link is normal, it means that the underlying physical layer data is normal (e.g., the MPHY physical layer transmitted signal has no sign error, the level is stable, the timing has no deviation, and the underlying signal transmission quality meets the requirements), and the upper layer link layer data is normal (e.g., the Unipro link layer encapsulated data frame has no syntax error, the check code matches, the frame structure is complete, and the protocol level encapsulation and transmission are normal). After confirming that the data is normal, the UFS receiving end can directly enter the normal data receiving state, receive the data (which may be storage file data, device attribute information, etc.) transmitted by the UFS sending end according to the current communication speed and protocol specification agreed by both parties, and deliver the received data to the corresponding processing unit (such as the application processor on the HOST side or the storage control unit on the DEVICE side) according to the subsequent requirements, to ensure that the UFS communication link continuously and stably completes the data interaction task.
[0037] In a feasible embodiment, the speed mode switching request includes target speed mode information, which is determined by the UFS receiving end according to the historical abnormal record 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 explicitly indicates the communication speed standard (such as the specific rate level defined in the UFS protocol) that both the receiving end and the sending end need to be synchronized to subsequently, which is the core basis for the sending end to adjust its own speed and for the receiving end to subsequently resume data reception. In order to make the determined target speed mode information more suitable for the actual link situation and ensure the stability of the communication after switching, the embodiment designs corresponding determination logic: the UFS receiving end can retrieve and analyze the historical abnormal record of the communication link, which contains key information (such as the current communication rate when the abnormality occurs, the abnormality type, the stable rate after repair, etc.) when the past link has data abnormalities. Through the statistics and judgment of these historical data, the target speed mode suitable for the current scene is selected.
[0038] In a feasible embodiment, if the historical record shows that the current communication rate (such as high-speed mode) is prone to interference, symbol error, etc., since a lower rate usually has stronger ability to resist environmental noise and voltage jitter, it can reduce the probability of abnormal recurrence, so the receiving end can select a lower rate than the current rate as the target speed. If the historical record verifies that a certain fixed rate (such as the basic low-speed level specified in the UFS protocol or the rate within the "abnormal rate interval" determined by pre-test) has no abnormality for a long time and has high transmission stability, the receiving end can directly use this preset rate as the target speed without temporary adjustment, further improving the switching efficiency and reliability.
[0039] Referring to Figure 2 , Figure 2is an apparatus structure diagram provided by an embodiment of the present application based on UFS fast repair. The apparatus can be applied to the foregoing method based on UFS fast repair. The apparatus 200 includes: An instruction initiation module 210 is configured to initiate a working mode operation instruction by a UFS receiving end in a case where power consumption of a communication link between the UFS receiving end and a UFS sending end is lower than a preset power consumption threshold (i.e., in a low power consumption state). A data monitoring module 220 is configured to perform data monitoring on the communication link by the UFS receiving end in response to the UFS sending end entering a working state according to the working mode operation instruction. An exception handling module 230 is configured to send a speed mode switching request to the UFS sending end by the UFS receiving end in response to a data monitoring result indicating that data of the communication link is abnormal. A data receiving module 240 is configured to re-receive data of the UFS sending end according to a speed mode indicated by the speed mode switching request by the UFS receiving end in response to receiving a response signal of the UFS sending end completing speed switching according to the speed mode switching request.
[0040] In an available embodiment, the exception handling module 230 includes an exception diagnosis module, an exception detection module, and a repair control module. As to how to respond to the data monitoring result indicating that the data of the communication link is abnormal, the specific process is as follows: The exception diagnosis module first diagnoses physical layer data of the communication link. If the diagnosis result is abnormal, the exception diagnosis module sends physical layer exception information to the repair control module, and the repair control module determines that the data of the communication link is abnormal. If the diagnosis result is normal, the exception detection module detects link layer data of the communication link. If the detection result is abnormal, the exception detection module sends link layer exception information to the repair control module, and the repair control module determines that the data of the communication link is abnormal.
[0041] It should be noted that the abnormality diagnosis module can comprehensively detect all physical layer data frames transmitted in the communication link, including checking the underlying transmission characteristics such as signal symbol, timing, level stability, etc. Once any physical layer data abnormality (such as symbol error, signal distortion, etc.) is found, the specific error information (such as abnormal type, occurrence position, etc.) will be immediately transmitted to the repair control module. After receiving the abnormality information, the repair control module will quickly start the link repair process, which specifically includes: first triggering a link reset operation (link reset), by generating and sending a link reset instruction, the MPHY RX (physical layer receiving end) speed of the opposite end (UFS sending end) is reduced to the minimum basic rate, to ensure the stability of subsequent interaction; then, the repair control module generates a speed mode switching request containing target speed mode information and sends it to the opposite end, to promote both sides to switch to a more stable communication rate. Through this series of coherent operations, the repair control module can efficiently complete the repair of the link abnormality and restore the normal data interaction between the UFS receiving end and the sending end. By the link reset action, the UFS sending end is first reduced to the minimum speed, ensuring that the speed mode switching request frame can be stably transmitted to the opposite end at the minimum speed, avoiding the request frame transmission error caused by interference at the current high speed, thereby improving the reliability of the subsequent speed switching process.
[0042] In a feasible embodiment, the abnormality processing module 230 further includes an instruction generating unit and an instruction sending unit; before the UFS receiving end sends the speed mode switching request to the UFS sending end, the specific process includes: The instruction generating unit generates a link reset instruction, which is then sent to the UFS sending end by the instruction sending unit through the communication link, so that the UFS sending end adjusts the corresponding speed to the preset target rate.
[0043] It should be noted that UFS communication has a bidirectional transmission characteristic. When the data transmission direction is "UFS DEVICE→UFS HOST", the UFS HOST receives the data sent by the DEVICE, at which time the abnormality diagnosis module, the abnormality detection module and the repair control module in the scheme need to be deployed on the UFS HOST side; when the data transmission direction is "UFS HOST→UFS DEVICE", the UFS DEVICE receives the data (such as control instructions, configuration information, etc.) sent by the HOST, at which time the same core modules described above need to be deployed on the UFS DEVICE side, to ensure that no matter which end assumes the receiving responsibility, the data abnormality detection and link repair functions can be realized.
[0044] It should be noted that the logic implementation, execution subject, operation object, and processing flow involved in each module of the device based on UFS fast repair in this embodiment all correspond to the method based on UFS fast repair. For example, the function 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 determination and repair triggering logic of the exception handling module 230 corresponds to the content about data exception determination and speed mode switching request sending in the method, and the recovery receiving logic of the data receiving module 240 corresponds to step 140 in the method. Meanwhile, 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 of the physical layer and the link layer exception in the method. For specific correspondence and detailed implementation details, reference can be made to the related description in the method based on UFS fast repair, which will not be described here.
[0045] Referring to Figure 3 , Figure 3 is a UFS structure block diagram provided by an embodiment of the present application. The diagram presents the layered architecture of the UFS system from the application layer to the physical layer, and the interaction relationship with MIPI UniPro and MPHY (MIPI physical layer, responsible for the bottom layer physical implementation of signal transceiving). Each layer transmits data and control instructions through "SAP (Service Access Point, service access point, i.e., the interface for interaction between modules)", which not only implements the conventional UFS data communication process, but also provides a running carrier for the "exception detection-automatic repair" full-link logic in the present application.
[0046] Specifically, the Device Manager (device management module) is responsible for the overall management of the UFS device, interacts with other layers through "UIO_SAP" (UFS input / output service access point) and "UDM_SAP" (UFS device management service access point), and its functions cover the global control logic of the UFS receiving end. For example, when the power consumption of the communication link is lower than the preset threshold (such as the MPHY is in the low-power SAVE state), the Device Manager will drive the instruction initiation related functional unit to prompt the UFS receiving end to initiate the working mode operation instruction (corresponding to step 110), so as to wake up the opposite end to enter the working state.
[0047] The UFS Application Layer (UAP, UFS application layer) interacts with the lower layer UTP through "UTP_CMD_SAP" (UTP command service access point) and "UTP_TM_SAP" (UTP transmission management service access point), and undertakes the application layer initiation and analysis functions of core instructions such as "working mode operation instruction" and "speed mode switching request".
[0048] UFS Transport Protocol Layer (UTP, UFS transport protocol layer) is responsible for the transmission protocol processing (such as data encapsulation, command interaction) of UFS data, connects the UAP and UIC layers, and is a protocol support layer of "working mode operation instruction transfer and data transmission process". When the UFS receiving end initiates a working mode operation instruction, the instruction needs to be encapsulated into a format conforming to the protocol specification by the UTP layer, and then transmitted to the lower UIC through the "UIC_SAP" (UFS interconnection service access point), to ensure that the instruction accurately flows in the link (corresponding to the instruction transfer process of steps 110 to 120).
[0049] UFS InterConnect Layer (UIC, UFS interconnection layer) undertakes the interconnection function of the UFS system, and connects MIPI UniPro through the Cprot interface (which can be understood as a self-defined protocol interface for interaction with MIPI UniPro) downward, and connects UTP upward. It provides a data path for "UFS receiving end to monitor the communication link". Whether it is physical layer signal data or link layer frame data, it needs to flow through the UIC layer to be captured by the monitoring module of the upper layer (corresponding to the monitoring data source of step 120).
[0050] MIPI UniPro (MIPI unified protocol layer) complies with the MIPI Alliance specification and implements protocol processing of data link (such as link layer encapsulation, error checking), which is the core carrier of "link layer exception detection" and "repair control". Among them, the repair control module is responsible for receiving exception information from the RX detection module (i.e. exception detection module) and the MPHY RX diagnosis module (i.e. exception diagnosis module), and deciding and executing repair operations such as "speed mode switching request initiation" and "link reset instruction generation". When the data monitoring result shows an exception, it is the module that drives the UFS receiving end to send a speed mode switching request to the sending end (corresponding to step 130).
[0051] The RX detection module is responsible for detecting the UFS link layer (UniPro protocol layer) data. If an exception (such as frame structure error, verification failure) is found, it will immediately report to the repair control module, triggering the subsequent repair process, which matches the logic of "physical layer is normal but link layer is abnormal, which is judged as data exception" (corresponding to the second case of exception judgment).
[0052] The RMMI interface is an interface for transferring control / status information between modules, and is used for interaction of abnormal information and control instructions between the repair control module and the M-PHY RX diagnosis module. The RMMI interface ensures that the physical layer exception can be efficiently transferred to the repair control module. For example, when the M-PHY RX diagnosis module detects a physical layer exception, the information can be transferred to the repair control module through the RMMI interface to complete the exception reporting (corresponding to the first case of exception determination).
[0053] The M-PHY RX diagnosis module is responsible for detecting physical layer exceptions such as signal level, timing, symbol error, etc. If an exception is diagnosed, the repair control module is informed through the RMMI interface to ensure that the underlying signal problem can be discovered in a timely manner (corresponding to the monitoring of the physical layer data in step 120).
[0054] The M-TX / M-RX (M-PHY transmission / reception module) is a transceiver unit of the underlying physical signal, wherein the M-TX is responsible for transmitting the physical layer signal (corresponding to the pins "TX1P, TX1N, TX0P, TX0N"), and the M-RX is responsible for receiving the physical layer signal (corresponding to the pins "RX0P, RX0N, RX1N, RX1P"). They are the hardware basis of communication link data transmission and physical layer exception source. When the UFS receiving end receives data according to the speed mode indicated by the speed mode switching request, the new rate can be adapted through the M-RX unit to complete stable data reception, and finally realize normal communication after link repair.
[0055] Referring to Figure 4 , Figure 4 is a method based on UFS fast repair according to an embodiment of the present application. When the UFS HOST and the UFS DEVICE enter the data interaction stage, the flow will go through the switching of the low-power state and the working state: the UFS HOST first initiates the Hiberate (hibernate) operation to reduce the power consumption in the non-data transmission stage; when the UFS DEVICE receives the EOB (End Of Burst, end of burst transmission) operation instruction, it will control the M-PHY (MIPI physical layer, responsible for the underlying signal transmission and reception) to enter the SAVE (save) state, which is a low-power mode that only maintains the basic link connection and stops data transmission; at the same time, the M-PHY on the UFS HOST side also enters the SAVE state synchronously, and both sides are in a low-power standby state. When it is necessary to restore data interaction, the UFS HOST reinitiates the BURST (burst transmission) action to trigger the M-PHY on the UFS DEVICE side to jump from the SAVE state to the BURST working state, at which time the M-PHY RX diagnosis module (i.e., the exception diagnosis module) on the UFS DEVICE side immediately starts working and begins to diagnose the received physical layer signals (such as signal level, timing, symbol integrity, etc.) in real time.
[0056] If the diagnosis result of the MPHY RX diagnosis module is normal, it indicates that the physical layer data transmission is normal, and the MPHY will transmit the received physical layer data to the Unipro (MIPI unified protocol layer, responsible for link layer protocol processing) through the RMMI interface; then, the RX detection module (i.e., the abnormality detection module) of the Unipro further detects the link layer data (such as data frame structure, check code, protocol syntax, etc.). When the detection result of the RX detection module is normal, it indicates that the physical layer and the link layer are both normal, and the data will continue to be transmitted to the upper layer, the normal data interaction between the UFS HOST and the UFS DEVICE continues, and the process ends.
[0057] If the RX detection module detects a link layer data abnormality (such as frame structure error, check failure), it will immediately report the error information to the repair control module of the Unipro; after receiving the abnormality information, the repair control module initiates a speed mode switching request to the UFS HOST, and the request contains target speed mode information (such as a more stable low speed) determined based on historical abnormality records; after receiving the request, the UFS HOST re-negotiates with the UFS DEVICE and synchronizes to the latest speed mode, and the two parties resume data interaction in the new speed mode, and the process ends.
[0058] If the MPHY RX diagnosis module directly detects an abnormality (such as signal distortion, symbol error) in the physical layer data diagnosis stage, it will directly report the physical layer abnormality information to the repair control module of the Unipro through the RMMI interface; the repair control module also initiates a speed mode switching request to the UFS HOST, triggering the UFS HOST and the UFS DEVICE to re-negotiate the speed mode, and finally the two parties perform data interaction in the latest speed mode, and the process ends.
[0059] The embodiment of the application further discloses a storage device, wherein the storage device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the method for UFS fast repair is realized.
[0060] The embodiment of the application further discloses a computer readable storage medium, wherein the computer readable storage medium stores a program executable by a processor, and the program executable by the processor is used for executing the method for UFS fast repair when the program executable by the processor is executed by the processor.
[0061] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended 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 UFS fast recovery based on, applied to a UFS receiving end, characterized in that, The method comprises: 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 UFS receiving end initiates a working mode operation instruction; In response to the UFS sending end entering a working state according to the working mode operation instruction, the UFS receiving end monitors data of the communication link; In response to the data monitoring result indicating that the data of the communication link is abnormal, the UFS receiving end sends a speed mode switching request to the UFS sending end; In response to receiving a response signal that the UFS sending end completes speed switching according to the speed mode switching request, the UFS receiving end re-receives data of the UFS sending end according to the speed mode indicated by the speed mode switching request.
2. The method for fast repair based on UFS according to claim 1, wherein, The abnormality of the data of the communication link 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 receiving end determines that the data of the communication link is abnormal; When the data monitoring result indicates that the physical layer data of the communication link is normal and the link layer data of the communication link is abnormal, the UFS receiving end 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 receiving end sends the speed mode switching request to the UFS sending end, the method further comprises: The UFS receiving end generates a link reset instruction; The UFS receiving end sends the link reset instruction to the UFS sending end through the communication link, so that the UFS sending end adjusts the corresponding speed to a preset target rate.
4. The method for fast repair based on UFS according to claim 1, characterized in that, The method further comprises: When the data monitoring result indicates that the data of the communication link is normal, the UFS receiving end receives data of the UFS sending end.
5. The method for fast repair based on UFS according to claim 1, characterized in that, The speed mode switching request comprises target speed mode information, and the method further comprises: The UFS receiving end determines the target speed mode information according to the historical abnormality record 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. An apparatus for UFS fast repair, the apparatus comprising: The device is applied to the method for UFS fast repair based on any one of claims 1-5, and the device comprises: An instruction initiation module, configured to initiate, by the UFS receiving end, a working mode operation instruction in the case that the power consumption of the communication link between the UFS receiving end and the UFS sending end is lower than a preset power consumption threshold; A data monitoring module, configured to monitor, by the UFS receiving end, data of the communication link in response to the UFS sending end entering a working state according to the working mode operation instruction; An abnormality processing module, configured to send, by the UFS receiving end, a speed mode switching request to the UFS sending end in response to a data monitoring result indicating that the data of the communication link is abnormal; A data receiving module, configured to re-receive, by the UFS receiving end, data of the UFS sending end according to a speed mode indicated by the speed mode switching request in response to receiving a response signal that the UFS sending end completes speed switching according to the speed mode switching request.
7. The UFS-based quick repair based device according to claim 6, wherein, The abnormality processing module includes an abnormality diagnosis module, an abnormality detection module and a repair control module; The step of responding to the data monitoring result indicating that the data of the communication link is abnormal includes: The abnormality diagnosis module diagnoses the physical layer data of the communication link, and in response to the diagnosis result being abnormal, sends physical layer abnormality information to the repair control module, and the repair control module determines that the data of the communication link is abnormal; The abnormality diagnosis module diagnoses the physical layer data of the communication link. In response to the diagnosis result being normal, the abnormality detection module detects the link layer data of the communication link. In response to the detection result being abnormal, the link layer abnormality information is sent to the repair control module. The repair control module determines that there is an abnormality in the data of the communication link.
8. The UFS-based quick repair based device of claim 6, wherein, The exception handling module also includes an instruction generating unit and an instruction sending unit; Before the UFS receiving end sends the speed mode switching request to the UFS sending end, the method specifically includes: The instruction generation unit generates a link reset instruction; The instruction sending unit sends the link reset instruction to the UFS sending end through the communication link, so that the UFS sending end adjusts the corresponding speed to a preset target rate.
9. A storage device, comprising: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the UFS-based fast repair method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, the computer-executable instructions comprising: The computer-executable instructions are used to execute the UFS-based quick 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