UFS device and self-test method thereof, electronic device, and storage medium
By building a self-test control module in UFS devices, self-testing is realized without relying on the UFS host, solving the problems of long testing time and high cost of UFS devices, and improving testing efficiency and effectiveness.
Patent Information
- Application Number
- CN202411751492.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-02
AI Technical Summary
During the UFS equipment manufacturing process, CP and FT testing requires borrowing UFS hosts, resulting in longer testing time, increased costs, and less testing efficiency under different functional modes.
Design a UFS device with a built-in self-test control module that can realize self-testing through the self-test control module of the MIPI Unipro layer and the physical layer without relying on the UFS host. This module includes T-TX and T-RX modules, which can build speed switching request frames, send initial feature data, receive back feature data and perform verification, and complete data path testing.
It realizes self-testing of UFS devices in different speed modes, which reduces test time, improves test efficiency, reduces test costs, and avoids interaction time-consuming with UFS hosts.
Smart Images

Figure CN119232821B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of UFS device testing, and in particular to a UFS device and a self-testing method thereof, an electronic device, and a storage medium. Background Art
[0002] UFS (Universal Flash Storage) protocols include: UCS (UFS command set Layer) based on SCSI commands, UTP (UFS Tranport Layer), JEDEC (Joint Electron Device Engineering Council) defined protocols, UIC (UFS Intercollect Layer) MIPI (Mobile Industry Processor Interface) protocol and MIPI M-PHY protocol at the physical layer. Currently, UFS hosts and UFS devices are interconnected at the physical layer and data link layer through MIPI MPHY and MIPI Unipro. In the existing technology and protocol, the Unipro and M-PHY of the UFS device are configured and managed by the UFS host. The application layer of the UFS host constructs the frame format of the UFS protocol and transmits it to Unipro through the Cport interface of the UIC layer. Then, the frame header of the data frame is inserted through each layer of Unipro to form the Unipro protocol frame format, and then transmitted to M-PHY through the RMMI interface. Finally, the information is transmitted to the M-PHY of the UFS device through MIPI M-PHY. After receiving the information transmitted by the UFS host, the M-PHY of the UFS device will transmit it to Unipro through the RMMI interface. Unipro will disassemble the data frame into the frame format of UFS and upload it to the UTP layer through the Cport interface. After receiving the command, the UTP layer will construct a response to the UFS host. The data is first transmitted to Unipro through the Cport interface, and then transmitted to M-PHY through the RMMI interface. M-PHY transmits the data to the line connected to the UFS host. In this way, an information exchange between the UFS host and the UFS device is completed. It can be seen that the current communication link between the UFS host and the UFS device requires the cooperation of the two to achieve testing and detection.
[0003] The CP (chip probing) and FT (final test) stages involved in the manufacturing of UFS devices require the rental of a UFS host. The UFS device needs to be connected to the UFS host to perform data path tests on the UFS data link layer and physical layer, including tests on important functions such as speed mode switching. The startup time of the UFS host will greatly extend the CP test or FT test time, resulting in increased testing costs. In addition, when it is necessary to test the data link layer and physical layer of the UFS device in different functional modes (such as speed modes), the UFS host needs to be involved to switch the functional mode of the UFS device, so that the UFS device can interact and test data with the UFS host in different speed modes; however, the entire interaction process between the UFS host and the UFS device is time-consuming and has low testing efficiency. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a UFS device and a self-test method thereof, an electronic device, and a storage medium. The UFS device can realize self-testing through a built-in self-testing control module without relying on a UFS host, thereby reducing the test time, improving the test efficiency, and reducing the test cost.
[0005] In a first aspect, an embodiment of the present application provides a self-test method for a UFS device, wherein the UFS device comprises: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer comprises: a self-test control module having a T-TX module and a T-RX module; the physical layer comprises: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence;
[0006] The method comprises:
[0007] The T-TX module determines a first target speed mode from a plurality of candidate speed modes to be tested, and sends a first speed switching request frame constructed according to the first target speed mode to the T-RX module through the data path;
[0008] When the T-RX module successfully parses the first speed switching request frame, it performs speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode;
[0009] The T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data;
[0010] The T-RX module verifies the initial characteristic data and the returned characteristic data to obtain a verification result, and determines a path test condition under the first target speed mode to complete a data path test;
[0011] When the verification result is correct, the next candidate speed mode is switched to perform data path testing until all the candidate speed modes are traversed and the self-test is terminated.
[0012] In a second aspect, an embodiment of the present application provides a UFS device, including: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence;
[0013] The T-TX module is used to: determine a first target speed mode from a plurality of candidate speed modes to be tested, and send a first speed switching request frame constructed according to the first target speed mode to the T-RX module through the data path;
[0014] The T-RX module is used to: when the first speed switching request frame is parsed successfully, perform speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode;
[0015] The T-TX module is further used to: send the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data;
[0016] The T-RX module is also used to: perform verification processing on the initial characteristic data and the returned characteristic data to obtain a verification result, and determine the path test status under the first target speed mode to complete a data path test;
[0017] The T-TX module is used to: when the verification result is correct, switch to the next candidate speed mode to perform data path test until all the candidate speed modes are traversed and the self-test is terminated.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising at least one processor and a memory for communicating with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the self-test method of the UFS device as described in any one of the embodiments of the first aspect.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the self-test method of the UFS device as described in any one of the embodiments of the first aspect.
[0020] The embodiment of the present application includes: the UFS device includes: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence; during the self-test of the UFS device, first, the T-TX module determines a first target speed mode from a plurality of candidate speed modes to be tested, and sends a first speed switching request frame constructed according to the first target speed mode to the T-RX module through the data path; secondly, when the T-RX module successfully parses the first speed switching request frame, a speed mode switching process is performed to switch the working mode of the physical layer from the current speed mode to the first target speed mode; thereby, without relying on the UFS host, Instead, the built-in self-test control module switches different target speed modes for the physical layer, avoiding time-consuming interaction with the UFS host, which is conducive to reducing the test time; then, the T-TX module sends the constructed initial feature data to the M-TX module, so that the initial feature data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return feature data; then, the T-RX module verifies the initial feature data and the return feature data to obtain the verification result, and determines the path test status under the first target speed mode, completing a data path test; finally, when the verification result is correct, the next candidate speed mode is switched to perform a data path test until all candidate speed modes are traversed, the self-test is terminated, the test efficiency is improved, and the test cost is reduced. That is to say, the UFS device of the embodiment of the present application can realize self-testing through the built-in self-test control module without relying on the UFS host, reducing the test time, improving the test efficiency, and reducing the test cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic diagram of the structure of the interconnection layer of a UFS device provided by an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of the overall specific structure of a UFS device provided by an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of the steps of a self-test method for a UFS device provided by an embodiment of the present application;
[0024] Figure 4It is a schematic diagram of the overall process of a self-test method for a UFS device provided by an embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0027] It should be understood that in the description of the present application, the orientation descriptions, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0028] It should be noted that although a logical order is shown in the flowchart in the description of the present application, in some cases, the steps shown or described may be performed in an order different from that in the flowchart. In the description of the present application, a number of means one or more, and a plurality of means two or more. The description of "first" and "second" is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] First, some terms used in this application are explained:
[0031] Unipro: Unipro in UFS devices is a data link layer protocol, mainly used for connection and data transmission between the host and the device.
[0032] SCSI command: Small Computer System Interface. SCSI command is a system-level interface standard used between computers and their peripheral devices, mainly used to connect hard disks, floppy drives, optical drives, printers, scanners and other devices. SCSI commands include: SBC and SPC; SBC is the SCSI block command set, which defines commands for block devices, such as read and write operations; SPC is the SCSI main command set, which defines general SCSI commands.
[0033] Cport interface: A Cport is a service access point on the Unipro transport layer (L4) within a device, used to organize data transmission. Because data packets need to be processed and assembled at L4 into the data format required by the next layer, Cport can be regarded as an interface.
[0034] RMMI interface: RMMI (Reference M-PHY Module Interface) interface is the connection interface between MIPI M-PHY and Unipro. The RMMI interface is used to connect the MIPI Unipro layer and the MIPI M-PHY physical layer, allowing the MIPI Unipro layer to communicate with the MIPI M-PHY physical layer.
[0035] The present application discloses a UFS device and its self-test method, electronic device and computer-readable storage medium, and relates to the field of UFS device testing technology. The method includes: when the T-RX module successfully parses the first speed switching request frame constructed by the T-TX module based on the first target speed mode, the working mode of the physical layer is switched from the current speed mode to the first target speed mode; the initial characteristic data constructed by the T-TX module is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data; the initial characteristic data and the return characteristic data are verified and processed to obtain the verification result, the path test status under the first target speed mode is determined, and a data path test is completed; when the verification result is correct, the next candidate speed mode is switched for testing until all candidate speed modes are traversed to end the self-test. It can realize self-testing, reduce the test time, improve the test efficiency, and reduce the test cost.
[0036] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0037] like Figure 1 As shown, a UFS device provided by an embodiment of the present application includes: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence.
[0038] Specifically, the UFS device further includes: a first RMMI interface and a second RMMI interface, the T-TX module and the M-TX module are communicatively connected via the first RMMI interface, and the T-RX module and the M-RX module are communicatively connected via the second RMMI interface.
[0039] It can be understood that the T-TX module is used to determine a first target speed mode from a plurality of candidate speed modes to be tested, and send a first speed switch request frame constructed according to the first target speed mode to the T-RX module through a data path.
[0040] It can be understood that the T-RX module is used to: when the first speed switching request frame is parsed successfully, perform speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode.
[0041] It can be understood that the T-TX module is also used to send the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data.
[0042] It is understandable that the T-RX module is also used to: verify the initial characteristic data and the returned characteristic data to obtain a verification result, and determine the path test status under the first target speed mode to complete a data path test.
[0043] It can be understood that the T-TX module is used to: when the verification result is correct, switch to the next candidate speed mode to perform data path testing until all candidate speed modes are traversed and the self-test is terminated.
[0044] Therefore, the T-TX module of the self-test control module supports the construction of speed switching request frames and initial feature data; the T-RX module of the self-test control module supports feature value verification and error upload of feature data. In UFS devices, through the self-test control module, it is possible to traverse various candidate speed modes and switch to the target speed mode for testing without relying on the UFS host.
[0045] The self-test control module integrates the T-TX (test TX) module for the construction of the speed switching request frame and the initial feature data. The module also integrates the T-RX (test RX) module for the analysis of the speed switching request frame and the reception and verification of the returned feature data. When the feature data verification fails, the T-RX module will upload the alarm notification to the CPU (central processing unit) connected to the UFS device, and report it to the operator through the CPU.
[0046] It should be noted that the physical layer is specifically a MIPI MPHY layer, and a loopback module supporting the loopback mode exists in the MIPI MPHY layer.
[0047] like Figure 2As shown, according to some embodiments of the present application, the loopback module includes: a differential signal line, a transmission port and a receiving port that are communicatively connected through the differential signal line; the transmission port is communicatively connected to the M-TX module, and the receiving port is communicatively connected to the M-RX module. Specifically, the transmission port includes: a first TX interface TX1P, a second TX interface TX1N, a third TX interface TX0P, and a fourth TX interface TX0N; the receiving port includes: a first RX interface RX1P, a second RX interface RX1N, a third RX interface RX0P, and a fourth RX interface RX0N.
[0048] It is understandable that before using the UFS device for self-testing, it is necessary to enable the self-test control module through software, and configure the MIPI MPHY layer to enable the loopback module, so that the first TX interface TX1P is connected to the first RX interface RX1P, the second TX interface TX1N is connected to the second RX interface RX1N, the third TX interface TX0P is connected to the third RX interface RX0P, and the fourth TX interface TX0N is connected to the fourth RX interface RX0N. Thus, the M-TX module and the M-RX module are connected in the physical layer through the loopback module, and a data path is formed in the physical layer based on the M-TX module, the loopback module, and the M-RX module.
[0049] After enabling, specifically, the M-TX module of the physical layer is used to receive the frame data of the T-TX module of the MIPI Unipro layer, and output the frame data through TX1P / TX1N, TX0P / TX0N. The M-RX module of the physical layer is used to receive the data transmitted by the M-TX module through RX1P / RX1N, RX0P / RX0N and transmit it to the T-RX module of the MIPI Unipro layer.
[0050] Specifically, the UFS device also includes: a device management module, a UAP (UFS Application Layer) module that complies with the UFS protocol, a UTP (UFS Transport Protocol Layer) module, and a UIC layer. Among them, the device management module is used for device management, including the management of attributes, descriptors, and properties; the UAP module is used to support the UFS host and the UFS device to read and write data; the UTP module is used to support the UFS UAP layer and the MIPI Unipro layer to interact with each other. These modules ensure that other functions of the UFS device can be carried out normally.
[0051] It should be noted that the UFS device provided in the embodiment of the present application includes a MIPI Unipro layer and a physical layer. In the MIPI Unipro layer, the self-test control module supports the construction of a speed switching request frame, initial feature data, supports parsing of a speed switching request frame, and performs verification processing based on initial feature data and return feature data; the physical layer supports loopback mode internally to achieve docking of the M-TX module and the M-RX module, and to achieve data transmission at the physical layer. The MIPI Unipro layer and the physical layer cooperate with each other, enabling the UFS device to complete self-testing in the FT stage and the CP stage, reducing test time and costs.
[0052] It is understandable that the UFS device can complete the data path test between the MIPI Unipro layer and the physical layer without relying on the UFS host, including important functional tests such as speed mode switching. It should be noted that the self-test control module of the UFS device provided in the embodiment of the present application can also perform functional tests including but not limited to: sleep and wake-up of the MIPI Unipro layer and the physical layer, data flow control test of the data link layer, and other tests that comply with the Unipro CTS (Compatibility Test Suite) test agreed upon by the JEDEC Association.
[0053] The UFS device provided in the embodiment of the present application includes a self-test control module. By using the self-test control module, during the self-test of the UFS device, first, the T-TX module determines a first target speed mode from a plurality of candidate speed modes to be tested, and sends a first speed switching request frame constructed according to the first target speed mode to the T-RX module through a data path; secondly, when the T-RX module successfully parses the first speed switching request frame, a speed mode switching process is performed to switch the working mode of the physical layer from the current speed mode to the first target speed mode; thereby, the physical layer is switched to different speed modes by the built-in self-test control module without relying on the UFS host. The target speed mode avoids the time-consuming interaction with the UFS host, which is conducive to reducing the test time; then, the T-TX module sends the constructed initial feature data to the M-TX module, so that the initial feature data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return feature data; then, the T-RX module verifies the initial feature data and the return feature data to obtain the verification result, and determines the path test status under the first target speed mode, and completes a data path test; finally, when the verification result is correct, switch to the next candidate speed mode for data path test until all candidate speed modes are traversed and the self-test is ended. In this way, the UFS device completes the data path test between the MIPI Unipro layer and the physical layer under different target speed modes, completes the self-test, improves the test efficiency, and reduces the test cost. Therefore, the UFS device of the embodiment of the present application can realize self-testing through the built-in self-test control module without relying on the UFS host, reducing the test time, improving the test efficiency, and reducing the test cost.
[0054] Those skilled in the art will appreciate that the system structure shown in the figure does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0055] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0056] Those skilled in the art will appreciate that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0057] Based on the above system structure, various embodiments of the self-test method of the UFS device of the present application are proposed below.
[0058] like Figure 3 As shown, the self-test method of the UFS device can be applied to Figure 1 In the UFS device shown, the UFS device includes: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by a sequentially connected M-TX module, a loopback module, and an M-RX module. The self-test method of the UFS device may include but is not limited to steps S110 to S150.
[0059] Step S110: the T-TX module determines a first target speed mode from a plurality of candidate speed modes to be tested, and sends a first speed switching request frame constructed according to the first target speed mode to the T-RX module through a data path.
[0060] Step S120: When the T-RX module successfully parses the first speed switching request frame, a speed mode switching process is performed to switch the working mode of the physical layer from the current speed mode to the first target speed mode.
[0061] Step S130: the T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data.
[0062] Step S140: the T-RX module verifies the initial characteristic data and the returned characteristic data to obtain a verification result, and determines the path test status under the first target speed mode, thereby completing a data path test.
[0063] Step S150: When the verification result is correct, switch to the next candidate speed mode to perform data path testing until all candidate speed modes are traversed and the self-test ends.
[0064] According to some embodiments of the present application, the M-TX module includes: a transmitting port, the M-RX module includes: a receiving port, and the loopback module includes: a differential signal line; the transmitting port and the receiving port are communicatively connected via the differential signal line; before step S110, the method further includes: receiving a first enabling instruction and a second enabling instruction; enabling the self-test control module in response to the first enabling instruction; enabling the loopback module in response to the second enabling instruction. Ensuring that the loopback module and the self-test control module work properly lays a good hardware foundation for the UFS device to perform self-test.
[0065] Steps S110 to S120 are further described, specifically including: after the T-TX module determines the first target speed mode, a first speed switching request frame is constructed based on the first target speed mode, the T-TX module initiates a frame request transmission to the M-TX module of the physical layer, and sends the first speed switching request frame to the M-TX module, and the first speed switching request frame is transmitted through the loopback module and the M-RX module in sequence; the M-RX module uploads the first speed switching request frame to the T-RX module, so that the T-RX module parses the first speed switching request frame to determine the first target speed mode to be switched, and if the parsing is successful, the working mode of the physical layer is switched from the current speed mode to the first target speed mode; and the test preparation is completed.
[0066] According to some embodiments of the present application, the UFS device further includes a first RMMI interface and a second RMMI interface, the T-TX module is connected to the M-TX module through the first RMMI interface, and the T-RX module is connected to the M-RX module through the second RMMI interface. Step S130 includes but is not limited to the following steps: first, the T-TX module sends the constructed initial feature data to the M-TX module through the first RMMI interface; then, the M-TX module transmits the initial feature module to the M-RX module through the loopback module in the first target speed mode; then, the M-RX module returns the received initial feature data to the T-RX module through the second RMMI interface; finally, the T-RX module receives the initial feature data after transmission to obtain the return feature data. In this way, in the MIPI Unipro layer, the T-RX module of the self-test control module initiates data transmission to the physical layer through the first RMMI interface, the initial feature data is sent from the M-TX module of the physical layer to the M-RX module through the loopback module, the M-RX module uploads the initial feature data to the T-RX module through the second RMMI interface, and the T-RX module receives the return feature data (that is, the initial feature data returned after transmission through the physical layer); without the need to interact with the UFS host, the internal UFS device completes the self-transmission of data to facilitate the subsequent verification of the feature data to determine the path test status.
[0067] The front speed mode is switched to the first target speed mode to facilitate testing in the first target speed mode.
[0068] According to some embodiments of the present application, the self-test method of the UFS device is further described, and the method also includes: when the verification result is wrong, or when the speed mode switching process fails, the T-RX module determines that the data path test fails; when the data path test fails, an alarm notification is generated; and the alarm notification is sent to a central processor that is connected to the UFS device. Thus, a verification error alarm mechanism is formed to promptly notify the operator of the operation error, so that the operator can intervene in time.
[0069] Specifically, the alarm notification includes: a verification error alarm and a mode switching error alarm.
[0070] In one embodiment, after obtaining the verification result, the method further includes: when the verification result is wrong, the T-RX module determines that the data path test fails; when the data path test fails, a verification error alarm is generated; and the verification error alarm is sent to a central processor that is in communication with the UFS device. Thus, a verification error alarm mechanism is formed to promptly notify the operator of the operation error, so that the operator can intervene in time and filter out the wrong UFS chip.
[0071] In one embodiment, after the speed mode switching process is performed, the method further includes: when the speed mode switching process fails, the T-RX module determines that the data path test fails; when the data path test fails, a mode switching error alarm is generated; and the mode switching error alarm is sent to a central processor that is in communication with the UFS device. Thus, a switching error alarm mechanism is formed to promptly notify the operator of the operation error.
[0072] Through step S110 to step S150, during the self-test of the UFS device, first, the T-TX module determines the first target speed mode from multiple candidate speed modes to be tested, and sends the first speed switching request frame constructed according to the first target speed mode to the T-RX module through the data path; secondly, when the T-RX module successfully parses the first speed switching request frame, it performs speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode; thereby, without relying on the UFS host, the physical layer is switched to different target speed modes through the built-in self-test control module, avoiding the conflict with the UFS host. The interaction time is reduced, which is conducive to reducing the test time; then, the T-TX module sends the constructed initial feature data to the M-TX module, so that the initial feature data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return feature data; then, the T-RX module verifies the initial feature data and the return feature data to obtain the verification result, and determines the path test status under the first target speed mode, completing a data path test; finally, when the verification result is correct, switch to the next candidate speed mode to perform the data path test until all candidate speed modes are traversed, and the self-test is ended, thereby improving the test efficiency and reducing the test cost. Therefore, the UFS device of the embodiment of the present application can realize self-testing through the built-in self-test control module without relying on the UFS host, thereby reducing the test time, improving the test efficiency, and reducing the test cost.
[0073] According to some embodiments of the present application, step S150 is further described, wherein the next candidate speed mode is switched to perform a data path test, including but not limited to steps S210 to S250.
[0074] Step S210: When the verification result is correct and all candidate speed modes have not been traversed, the T-TX module determines a second target speed mode from the remaining candidate speed modes that do not include the first target speed mode.
[0075] Step S220: The T-TX module sends the second speed switching request frame constructed according to the second target speed mode to the T-RX module through the data path.
[0076] Step S230: When the T-RX module successfully parses the second speed switching request frame, a speed mode switching process is performed to switch the working mode of the physical layer from the current first target speed mode to the second target speed mode.
[0077] Step S240: the T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the second target speed mode and then received by the T-RX module to obtain the return characteristic data.
[0078] Step S250: The T-RX module verifies the initial characteristic data and the returned characteristic data to obtain a verification result, and determines the path test status under the second target speed mode, thereby completing the data path test under the second target speed mode.
[0079] Through steps S210 to S250, when the data path test based on the first target speed mode is completed, it is automatically determined whether the candidate speed mode traversal is completed. If not, the new second target speed mode is switched to complete the data path test under the second target speed mode; and so on, all candidate speed modes are automatically traversed, and data path tests are performed based on each candidate speed mode, thereby improving test efficiency and test reliability.
[0080] According to some embodiments of the present application, the verification process in step S140 and step S250 of the embodiment of the present application is further explained, wherein the T-RX module performs verification processing on the initial characteristic data and the return characteristic data to obtain a verification result, including but not limited to: the T-RX module performs data verification calculation processing on the initial characteristic data to obtain a first verification value; the T-RX module performs data verification calculation processing on the return characteristic data to obtain a second verification value; when the first verification value is the same as the second verification value, the verification result is judged to be correct; when the first verification value is different from the second verification value, the verification result is judged to be wrong. In this way, by performing data verification calculation processing on the initial characteristic data and the return characteristic data, the first verification value and the second verification value are calculated relatively quickly, and the verification result is obtained based on the first verification value and the second verification value, providing a reliable reference for the path test situation.
[0081] It should be noted that the verification algorithm used in the process of data verification calculation and processing of the initial feature data and the returned feature data is consistent. The verification algorithm can be CRC verification or other verification algorithms; this application does not make specific restrictions on the type of verification algorithm used.
[0082] The manner of determining the path test status in step S140 and step S250 is further described; specifically, when the verification result is correct, the path test status is determined as: test success; when the verification result is wrong, the path test status is determined as: test failure.
[0083] Combination Figure 4 , describing the overall specific process of the self-test method of the UFS device in the embodiment of the present application.
[0084] Step S401: enabling the self-test control module and the loopback module.
[0085] Step S402: the T-TX module of the self-test control module constructs a speed switching request frame based on the target speed mode, and initiates transmission processing of the speed switching request frame to the physical layer.
[0086] Step S403: the T-RX module of the self-test control module receives the speed switching request frame and parses the speed switching request frame.
[0087] Step S404: Determine whether the analysis is successful. If yes, execute step S406 and subsequent steps; if no, execute step S405.
[0088] Step S405: Determine that the test fails and send an alarm notification to the CPU.
[0089] Step S406: the self-test control module controls the physical layer to switch to the target speed mode through the RMMI interface.
[0090] Step S407: The T-TX module initiates a data transmission to the M-TX module, and sends the constructed initial feature data to the physical layer.
[0091] Step S408: The T-RX module receives the returned characteristic data after transmission through the physical layer, and performs verification processing to obtain a verification result.
[0092] Step S409: Determine whether the verification result is correct. If so, execute step S410 and subsequent steps; if not, execute step S405.
[0093] Step S410: Determine whether the candidate speed patterns have been traversed. If not, jump to step S402 and subsequent steps; if yes, end.
[0094] In summary, the UFS device provided in the embodiment of the present application, on the one hand, completes the data path test of the MIPI Unipro data link layer and the physical layer in different speed modes based on the self-test function of the self-test control module without relying on the UFS host. In this way, the dependence on the UFS host can be eliminated through self-testing in the FT stage or the CP stage, and the duration of the FT test and the CP test can be shortened, reducing the production cost. On the other hand, the UFS device itself can implement functional tests between the MIPI Unipro layer (that is, the MIPI Unipro data link layer) and the physical layer, such as speed mode switching, sleep wake-up of the data link layer and the physical layer, and data flow control tests of the data link layer, which are in accordance with the UniproCTS test agreed by the JEDEC Association. In addition, the embodiment of the present application can be applied to the simulation verification and digital prototype verification stage of the chip design stage to perform self-test verification of the data link layer, effectively reduce the dependence on the UFS host, and improve the efficiency of chip design verification. It can be seen that the embodiment of the present application can effectively reduce the duration of the CP stage and the FT test in the chip manufacturing stage, thereby reducing the chip manufacturing cost.
[0095] like Figure 5 As shown, the present application also provides an electronic device, including:
[0096] The processor 501 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0097] The memory 502 may be implemented in the form of a read-only memory, a static storage device, a dynamic storage device, or a random access memory. The memory 502 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 502, and the processor 501 calls and executes the self-test method of the UFS device in the embodiment of this application;
[0098] Input / output interface 503, used to implement information input and output;
[0099] Communication interface 504, used to realize communication interaction between the present apparatus and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0100] A bus 505 that transmits information between various components of the device (e.g., the processor 501, the memory 502, the input / output interface 503, and the communication interface 504);
[0101] The processor 501 , the memory 502 , the input / output interface 503 and the communication interface 504 are connected to each other in communication within the device via the bus 505 .
[0102] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the self-test method of the UFS device is implemented.
[0103] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0104] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0105] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present application. These equivalent deformations or substitutions are all included in the scope defined by the present application.
Claims
1. A self-test method for a UFS device, characterized in that: The UFS device includes: a MIPI Unipro layer and a physical layer connected in communication; the MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence; The method comprises: The T-TX module determines a first target speed mode from a plurality of candidate speed modes to be tested, and sends a first speed switching request frame constructed according to the first target speed mode to the T-RX module through the data path; When the T-RX module successfully parses the first speed switching request frame, it performs speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode; The T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data; The T-RX module verifies the initial characteristic data and the returned characteristic data to obtain a verification result, and determines a path test condition under the first target speed mode to complete a data path test; When the verification result is correct, the next candidate speed mode is switched to perform data path testing until all the candidate speed modes are traversed and the self-test is terminated.
2. The self-test method of the UFS device according to claim 1, characterized in that: The UFS device further includes a first RMMI interface and a second RMMI interface, the T-TX module is communicatively connected to the M-TX module via the first RMMI interface, and the T-RX module is communicatively connected to the M-RX module via the second RMMI interface; The T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data, including: The T-TX module sends the constructed initial feature data to the M-TX module through the first RMMI interface; The M-TX module transmits the initial feature data to the M-RX module through the loopback module in the first target speed mode; The M-RX module returns the received initial feature data to the T-RX module through the second RMMI interface; The T-RX module receives the initial characteristic data after transmission and obtains the return characteristic data.
3. The self-test method of the UFS device according to claim 1, characterized in that: The switching to the next candidate speed mode to perform data path testing includes: When the verification result is correct and all the candidate speed modes have not been traversed, the T-TX module determines a second target speed mode from the remaining candidate speed modes excluding the first target speed mode; The T-TX module sends a second speed switching request frame constructed according to the second target speed mode to the T-RX module through the data path; When the T-RX module successfully parses the second speed switching request frame, it performs speed mode switching processing to switch the working mode of the physical layer from the current first target speed mode to the second target speed mode; The T-TX module sends the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the second target speed mode and then received by the T-RX module to obtain the return characteristic data; The T-RX module verifies the initial characteristic data and the returned characteristic data to obtain a verification result, determines a path test condition under the second target speed mode, and completes a data path test under the second target speed mode.
4. The self-test method of the UFS device according to claim 1 or 3, characterized in that: The T-RX module performs verification processing on the initial feature data and the returned feature data to obtain a verification result, including: The T-RX module performs data verification calculation processing on the initial feature data to obtain a first verification value; The T-RX module performs data verification calculation processing on the returned characteristic data to obtain a second verification value; When the first verification value is the same as the second verification value, the verification result is judged to be correct; When the first verification value is different from the second verification value, it is determined that the verification result is wrong.
5. The self-test method of the UFS device according to claim 1, characterized in that: The loopback module includes: a differential signal line, a sending port and a receiving port that are communicatively connected through the differential signal line; the sending port is communicatively connected to the M-TX module, and the receiving port is communicatively connected to the M-RX module; Before the T-TX module determines the first target speed mode from a plurality of candidate speed modes to be tested, the method further includes: receiving a first enabling instruction and a second enabling instruction; enabling the self-test control module in response to the first enabling instruction; In response to the second enabling instruction, the loopback module is enabled.
6. The self-test method of the UFS device according to claim 1 or 3, characterized in that: The method further comprises: When the verification result is erroneous, or when the speed mode switching process fails, the T-RX module determines that the data path test fails; When the data path test fails, generating an alarm notification; The alarm notification is sent to a central processing unit that is communicatively connected to the UFS device.
7. A UFS device, characterized in that: include: MIPI Unipro layer and physical layer of communication connection; The MIPI Unipro layer includes: a self-test control module having a T-TX module and a T-RX module; the physical layer includes: a data path determined by an M-TX module, a loopback module, and an M-RX module connected in sequence; The T-TX module is used to: determine a first target speed mode from a plurality of candidate speed modes to be tested, and transmit a first speed switching request frame constructed according to the first target speed mode through The data path is sent to the T-RX module; The T-RX module is used to: when the first speed switching request frame is parsed successfully, perform speed mode switching processing to switch the working mode of the physical layer from the current speed mode to the first target speed mode; The T-TX module is further used to: send the constructed initial characteristic data to the M-TX module, so that the initial characteristic data is transmitted through the data path based on the first target speed mode and then received by the T-RX module to obtain the return characteristic data; The T-RX module is also used to: perform verification processing on the initial characteristic data and the returned characteristic data to obtain a verification result, and determine the path test status under the first target speed mode to complete a data path test; The T-TX module is used to: when the verification result is correct, switch to the next candidate speed mode to perform data path test until all the candidate speed modes are traversed and the self-test is terminated.
8. The UFS device according to claim 7, characterized in that: The loopback module includes: a differential signal line, a sending port and a receiving port that are communicatively connected through the differential signal line; the sending port is communicatively connected to the M-TX module, and the receiving port is communicatively connected to the M-RX module; the sending port is communicatively connected to the M-TX module, and the receiving port is communicatively connected to the M-RX module.
9. An electronic device, characterized in that: The device comprises at least one processor and a memory for communicating with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the self-test method of the UFS device as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the self-test method of the UFS device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for accelerating test of storage chip and electronic equipment
CN118711649A
Method of testing universal flash storage (UFS) interface and memory device implementing method of testing UFS interface
US20130097460A1