Data link detection method, device, equipment and storage medium

By determining the sampling time in a mobile device and detecting the correctness of the test data of the data signal line, and evaluating the signal transmission quality, the signal transmission quality problems caused by inequality of the data signal line and noise interference are solved, and the quality of the finished product is improved.

CN115834432BActive Publication Date: 2025-08-08XIAMEN UNISOC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211473913.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-08-08
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

In mobile devices, due to factors such as inequality of data signal lines and noise interference, the data transmission delays are different on different data signal lines, which affects data synchronization and signal transmission quality, resulting in a decline in finished product quality.

Method used

By determining the sampling time, the test data block is sampled in the data signal line, the test data is detected whether the test data is correct, and the correct sampling time is determined as the effective sampling time, and the signal transmission quality is evaluated based on the effective sampling time.

Benefits of technology

The signal transmission quality of the data signal line is improved, the probability of problematic products flowing into the market is reduced, and the quality of the finished product is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834432B_ABST
    Figure CN115834432B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data link detection method, apparatus, device, and storage medium, which are applied to a first device connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines. The method includes: determining a sampling time of at least one sampling cycle, and sampling a test data block on the at least two data signal lines based on the sampling time of the at least one sampling cycle; for each sampling cycle, obtaining test data based on the test data blocks sampled on the at least two data signal lines, and detecting whether the test data is correct; if the test data is correct, determining the sampling time of the sampling cycle as a first effective sampling time; and determining the signal transmission quality of the at least two data signal lines based on the determined first effective sampling time. This is used to improve the quality of finished products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data link detection method, apparatus, device and storage medium. Background Art

[0002] In the circuits of mobile devices, the SDIO bus is usually used to connect the control end of the mobile device to the external communication module. Among them, the SDIO bus usually includes one control signal line and four data signal lines. Since data is transmitted in the data signal line, in order to increase the data transmission speed, the data is usually divided into multiple data blocks, and the multiple data blocks are transmitted respectively in different data signal lines. Based on this, when designing the circuit, it is necessary to ensure that each data line in the SDIO bus has the same length so that the data blocks between the control end and the external communication module can be synchronized, that is, the control end or the external communication module can receive the correct data blocks at the same time through the four data signal lines, so that the high-speed signal has better integrity when transmitted, so that the other end can obtain the corresponding signal more easily and accurately.

[0003] However, in actual applications, due to various factors, such as different welding points, noise interference, or unequal data line lengths, data transmission delays vary across different data signal lines. This reduces the time it takes for different data signal lines to synchronize data within a clock cycle, and reduces the time it takes for modules transmitting data via the data signal lines to correctly parse data within a clock cycle, meaning the signal transmission quality of the data signal lines deteriorates. Therefore, it is necessary to test the signal transmission quality of data signal lines between different modules of mobile devices during the production process to identify mobile devices with poor signal transmission quality and prevent them from entering the market, thereby reducing the quality of the finished product. Summary of the Invention

[0004] In view of this, the present application provides a data link detection method, device, equipment and storage medium, which are used to reduce the flow of defective products into the market and improve the quality of finished products by detecting the signal transmission quality of the data line.

[0005] In a first aspect, an embodiment of the present application provides a data link detection method, which is applied to a first device, wherein the first device is connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, and the method includes:

[0006] determining a sampling time of at least one sampling period, and sampling a test data block in at least two data signal lines based on the sampling time of the at least one sampling period;

[0007] For each sampling period, test data is acquired based on the test data blocks sampled in the at least two data signal lines, and whether the test data is correct is detected; when the test data is correct, the sampling period of the sampling period is determined as a first valid sampling time;

[0008] The signal transmission qualities of the at least two data signal lines are determined according to the determined first effective sampling time.

[0009] Preferably, before sampling the test data blocks in the at least two data signal lines at the sampling time based on the at least one sampling period, the method further includes:

[0010] sending a test instruction message to the second device via the control signal line;

[0011] A test response message sent by the second device is received through the control signal line.

[0012] Preferably, before sampling the test data blocks in the at least two data signal lines at the sampling time based on the at least one sampling period, the method further includes:

[0013] Determining that the transmission mode of the target bus is a first mode;

[0014] Sampling test data in a target data signal line based on a sampling time of the at least one sampling period; wherein the target signal line is any one of the at least two data signal lines;

[0015] For each sampling period, detecting whether the test data sampled in the target data line is correct, and determining the sampling time corresponding to the correct test data as the second effective sampling time;

[0016] Updating the transmission mode of the target bus to a second mode;

[0017] The sampling of the test data blocks in the at least two data signal lines based on the sampling time of the at least one sampling period includes:

[0018] When the transmission mode of the target bus is the second mode, sampling test data blocks in at least two data signal lines based on a sampling time of the at least one sampling period;

[0019] Determining the signal transmission quality of the at least two data signal lines according to the determined first effective sampling time includes:

[0020] The signal transmission qualities of the at least two data signal lines are determined according to the determined first effective sampling time and the second effective sampling time.

[0021] Preferably, it also includes:

[0022] Get the preset sampling times of test data;

[0023] Obtaining the number of times the test data has been sampled, and detecting whether the number of times the test data has been sampled reaches a preset number of times the test data has been sampled;

[0024] The determining of a sampling time of at least one sampling period and sampling a test data block based on the sampling time of the at least one sampling period comprises:

[0025] When the number of times the test data has been sampled does not reach a preset number of times the test data has been sampled, determining a sampling time of an i-th sampling period; in the i-th sampling period, sampling the test data on the at least two data signal lines based on the sampling time of the i-th sampling period; wherein the value of i is the sum of the number of times the test data has been sampled and 1;

[0026] The method of acquiring test data using the test data blocks sampled from the at least two data signal lines for the sampling time of each sampling period and detecting whether the test data is correct; and determining the sampling time of the sampling period as the first effective sampling time when the test data is correct comprises:

[0027] For the sampling time of the i-th sampling period, acquiring test data according to the test data blocks sampled in the at least two data signal lines, and detecting whether the test data is correct; when the test data is correct, determining the sampling time of the i-th sampling period as the first effective sampling time;

[0028] When the test data is correct, after determining the sampling time of the i-th sampling period as the first effective sampling time, the method further includes:

[0029] The number of samplings is updated according to the value of i, and the step of obtaining the number of samplings of the test data is re-executed, and it is detected whether the number of samplings of the test data reaches the preset number of samplings of the test data, until the step of obtaining test data according to the test data blocks sampled in the at least two data signal lines for the sampling time of the i-th sampling cycle, and detecting whether the test data is correct; when the test data is correct, the sampling time of the i-th sampling cycle is determined as the first valid sampling time, until the number of samplings of the test data reaches the preset number of samplings of the test data.

[0030] Preferably, when the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, determining the sampling time of the i-th sampling period includes:

[0031] Determine a sampling reference value according to a preset sampling number of the test data, and obtain a first preset interval time of the sampling time;

[0032] When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, the sampling time of the i-th sampling period is determined according to the sampling reference value and the first preset interval time of the sampling time.

[0033] Preferably, when the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, determining the sampling time of the i-th sampling period includes:

[0034] Obtaining a second preset interval time of the sampling time;

[0035] When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, the sampling time of the i-th sampling period is determined according to the second preset interval time of the sampling time and the sampling time of the i-1-th sampling period.

[0036] Preferably, the target bus includes: a secure digital input and output interface SDIO bus.

[0037] In a second aspect, an embodiment of the present application provides a data link detection method, which is applied to a second device, wherein the first device is connected to the second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, and the method includes:

[0038] Dividing the test data into at least two test data blocks according to the at least two data signal lines;

[0039] The at least two test data blocks are respectively sent to the first device via the at least two data signal lines; wherein different data signal lines transmit different test data blocks.

[0040] Preferably, before dividing the test data into at least two test data blocks according to the at least two data signal lines, the method further includes:

[0041] receiving a test instruction message sent by the first device through the control signal line;

[0042] A test response message is sent to the first device through the control signal line.

[0043] In a third aspect, an embodiment of the present application provides a data link detection device, which is applied to a first device, wherein the first device is connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, and the device includes:

[0044] a processing unit, configured to determine a sampling time of at least one sampling period, and sample a test data block in at least two data signal lines based on the sampling time of the at least one sampling period;

[0045] The processing unit is further configured to obtain test data according to the test data blocks sampled in the at least two data signal lines at a sampling time of each sampling period, and detect whether the test data is correct; and when the test data is correct, determine the sampling time of the sampling period as a first valid sampling time;

[0046] The determining unit is configured to determine the signal transmission qualities of the at least two data signal lines according to the determined first effective sampling time.

[0047] In a fourth aspect, an embodiment of the present application provides a data link detection device, which is applied to a second device, wherein the first device is connected to the second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, and the device includes:

[0048] a processing unit, configured to divide the test data into at least two test data blocks according to the at least two data signal lines;

[0049] The sending unit is configured to send the at least two test data blocks to the first device respectively through the at least two data signal lines; wherein different data signal lines transmit different test data blocks.

[0050] In a fifth aspect, an embodiment of the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method described in any one of the first aspect or the method described in any one of the second aspect.

[0051] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect or any method described in the second aspect.

[0052] By adopting the solution provided in the embodiment of the present application, at least one sampling time can be first determined, and a test data block can be sampled on at least two data signal lines based on the at least one sampling time. For each sampling time, test data can be obtained based on the test data block sampled on each data signal line at the sampling time, and the test data can be detected to determine whether it is correct. If the test data is correct, the sampling time corresponding to the correct test data is determined as the first effective sampling time. Since a greater number of first effective sampling times indicates that there are more moments when different data signal lines can transmit signals simultaneously, the probability of correctly acquiring data is greater, that is, the signal transmission quality is better. Based on this, in the embodiment of the present application, the signal transmission quality of at least two data signal lines can be determined based on the first effective sampling time, and the transmission quality of at least two data signal lines can be detected, so that products with poor signal transmission quality on at least two data signal lines can be found, thereby reducing the probability of defective products entering the market and improving the quality of finished products. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0054] Figure 1 A schematic diagram of a data link detection method provided in an embodiment of the present application;

[0055] Figure 2 A flowchart of a data link detection method provided in an embodiment of the present application;

[0056] Figure 3a A schematic diagram of another data link detection method provided in an embodiment of the present application;

[0057] Figure 3b A schematic diagram of another data link detection method provided in an embodiment of the present application;

[0058] Figure 4a A schematic diagram of another data link detection method provided in an embodiment of the present application;

[0059] Figure 4b A schematic diagram of another data link detection method provided in an embodiment of the present application;

[0060] Figure 5 A flowchart of another data link detection method provided in an embodiment of the present application;

[0061] Figure 6 A flowchart of another data link detection method provided in an embodiment of the present application;

[0062] Figure 7 A flowchart of another data link detection method provided in an embodiment of the present application;

[0063] Figure 8 A schematic diagram of the structure of a data link detection device provided in an embodiment of the present application;

[0064] Figure 9 A schematic structural diagram of another data link detection device provided in an embodiment of the present application;

[0065] Figure 10 A schematic structural diagram of another data link detection device provided in an embodiment of the present application;

[0066] Figure 11 A schematic structural diagram of another data link detection device provided in an embodiment of the present application;

[0067] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0069] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0070] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0071] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0072] Before providing a detailed introduction to the embodiments of the present application, the terms that are applied or may be applied to the embodiments of the present application are first explained.

[0073] SDIO (Secure Digital Input and Output) is an external interface.

[0074] CLK (Clock signal), clock signal.

[0075] CMD (Command line), control signal line.

[0076] DAT (Data line), data signal line.

[0077] In the circuits of mobile devices, the SDIO bus is usually used to connect the control end of the mobile device to the external communication module. Among them, the SDIO bus usually includes one control signal line and four data signal lines. Since data is transmitted in the data signal line, in order to increase the data transmission speed, the data is usually divided into multiple data blocks, and the multiple data blocks are transmitted respectively in different data signal lines. Based on this, when designing the circuit, it is necessary to ensure that each data line in the SDIO bus has the same length so that the data blocks between the control end and the external communication module can be synchronized, that is, the control end or the external communication module can receive the correct data blocks at the same time through the four data signal lines, so that the high-speed signal has better integrity when transmitted, so that the other end can obtain the corresponding signal more easily and accurately.

[0078] However, in actual applications, due to various factors, such as different welding points, noise interference, or unequal lengths of data lines, data transmission delays on different data signal lines are different, resulting in a decrease in the time it takes for different data signal lines to synchronize data within a clock cycle. This also reduces the time it takes for modules transmitting data through data signal lines to correctly parse data within a clock cycle. Figure 4b As shown, the signal transmission quality of the data signal line has deteriorated. Based on this, it is necessary to test the signal transmission quality of the data signal lines between different modules of the mobile device during the production process of the mobile device. Mobile devices with poor signal transmission quality in the data signal line can be identified to prevent them from entering the market and reducing the quality of the finished product.

[0079] In response to the above problems, the embodiments of the present application provide a data link detection method, apparatus, device and storage medium, which can first determine at least one sampling time, and sample a test data block in at least two data signal lines based on the at least one sampling time. For each sampling time, test data is obtained based on the test data block sampled in each data signal line, and whether the test data is correct is detected. When the test data is correct, the sampling time corresponding to the correct test data is determined as the first effective sampling time. Since the greater the number of first effective sampling times, the more moments when different data signal lines can transmit signals simultaneously, the greater the probability of correctly obtaining data, that is, the better the signal transmission quality, based on this, in the embodiments of the present application, the signal transmission quality of at least two data signal lines can be determined based on the first effective sampling time, and the transmission quality of at least two data signal lines can be detected, so that products with poor signal transmission quality in at least two data signal lines can be found, thereby reducing the probability of problem products entering the market and improving the quality of finished products. The following is a detailed description.

[0080] See also Figure 1 , is a structural diagram of an electronic device provided in an embodiment of the present application. Figure 1 As shown, the electronic device includes a first device 10 and a second device 11. The first device 10 and the second device 11 are connected via a target bus 12. For example, the target bus is an SDIO bus. The target bus includes a control signal line 121 and at least two data signal lines 122. When the target bus is an SDIO bus, the SDIO bus includes four data signal lines 122.

[0081] Among them, the first device 10 can be a processor, which is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and / or processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the first device 10 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0082] The second device 11 may be other devices that communicate with the processor, for example, a wireless network communication device, or other devices that need to transmit data with the first device 10 through a data signal line.

[0083] In actual circuit design, it is generally required that at least two data signal lines between the first device 10 and the second device 11 be of equal length, and the distance between the first device 10 and the second device 11 should not be too far, otherwise the signal transmission quality will be poor. To ensure the communication quality between the first device 10 and the second device 11, the transmission quality of the data signal line between the first device 10 and the second device 11 can be tested. In this application, the signal transmission quality between the at least two data signal lines between the first device 10 and the second device 11 can be determined by detecting the time during which the at least two data signal lines between the first device 10 and the second device 11 can synchronously transmit signals within a sampling period.

[0084] See also Figure 2 , is a flow chart of a data link detection method provided in an embodiment of the present application. The detection method is applied to the above Figure 1 In the first device 10 shown. Figure 2 As shown, the method includes:

[0085] Step S201: Determine a sampling time of at least one sampling cycle, and sample test data blocks in at least two data signal lines based on the sampling time of the at least one sampling cycle.

[0086] It should be understood that during the transmission of the data signal line, the data is transmitted in the form of an analog signal. Depending on the specific value of the transmitted data, the level signal of the analog signal is also different, for example, a high level signal or a low level signal. During the transmission of the data block, there is a process of level signal switching, such as Figure 3a As shown. When parsing data, the data is usually parsed based on whether the analog signal is a high level signal or a low level signal. During the switching process of the level signal, since it is impossible to parse whether the level signal is a high level signal or a low level signal, this part of the data is invalid data. Therefore, during the data transmission process, the data block transmitted by the data signal line contains valid data parts that can be parsed by the device and invalid data parts that cannot be parsed by the device, such as Figure 3b As shown. When the device collects data in the data signal line, if the data collected at the current collection time is the valid data part, the data transmitted by the opposite end can be correctly parsed. If the data collected at the current collection time is the invalid data part, the data transmitted by the opposite end cannot be correctly parsed. In a sampling cycle, the longer the time that the valid data part can be collected, the greater the probability of obtaining the valid data part, and it can be considered that the signal quality transmitted by the data signal line is better. When the data is divided into multiple data blocks and transmitted simultaneously through different data signal lines, the longer the time that the valid data part can be collected simultaneously between different data signal lines in a sampling cycle, the greater the probability of correctly obtaining the data transmitted by the opposite end, and it can be considered that the signal transmission quality between different data signal lines is better.

[0087] For example, assume that the first device and the second device are connected via an SDIO bus, and there are four data signal lines between the first device and the second device. In an ideal state, when the four data signal lines are of equal length, it can be assumed that the acquisition time of the valid data corresponding to the four data signal lines is exactly the same, such as Figure 4a However, in actual implementation, due to various factors, there are different delays when transmitting data between different data signal lines, resulting in different acquisition times of the valid data parts corresponding to different data signals. Figure 4b Because the transmitted data is divided into different data blocks and transmitted via different data signal lines, when collecting data from the four data signal lines, the data sent by the other end can only be correctly parsed when all four data signal lines simultaneously collect valid data. The longer the four data signal lines simultaneously collect valid data within a sampling period, the greater the probability of correctly acquiring the data transmitted by the other end, and the better the signal transmission quality between the different data signal lines.

[0088] In the implementation of the present application, in order to detect the signal transmission quality of the data signal line between the first device and the second device, the signal transmission quality of the data signal line between the first device and the second device can be determined by detecting the acquisition time when valid data portions are simultaneously acquired from different data signal lines within a sampling cycle. Because sampling can only be performed once within a sampling cycle, and when data is acquired at the same sampling time in different sampling cycles, the valid portion or invalid portion acquired in different sampling cycles is the same. Therefore, in order to detect the time when valid data portions are simultaneously acquired from different data signal lines within a sampling cycle, the time when valid data portions are simultaneously acquired from different data signal lines can be determined by using multiple sampling cycles, with each sampling cycle having a different sampling time.

[0089] Based on this, the first device needs to determine the sampling time of each sampling cycle. At this time, at least one sampling time can be determined according to the preset interval time of the sampling time, that is, the sampling time of at least one sampling cycle is determined according to the preset interval time of the sampling time. Based on the sampling time of each sampling cycle, a test data block is sampled at the sampling time of each sampling cycle. Among them, the preset interval time can be the interval time between the sampling times of adjacent sampling cycles, or it can be a pre-set sampling reference time. The preset interval time is the interval time between the sampling time and the sampling reference time. Of course, the sampling time of each sampling cycle can also be determined by other means, and this application does not limit this.

[0090] Since it is necessary to determine the time at which valid data is collected on different data signal lines within a sampling period, the sampling period can be divided into m sampling times, where the time interval between each two adjacent sampling times is the same, where m is an integer greater than 0. Since only one sampling can be performed per sampling period, to verify which of the m sampling times collects valid data and which collects invalid data, data blocks can be collected at different sampling times within each of the m sampling periods. This allows the sampling time of each of the m sampling periods to be determined.

[0091] It should be understood that m is the number of sampling times pre-set according to actual needs. The larger m is, the more accurate the sampling time determination is. For example, m is 256, 128, 1024, etc.

[0092] As a possible implementation, when determining the sampling time of at least one sampling cycle, the first device may determine the sampling time of the current sampling cycle based on the sampling time of the previous sampling cycle. In this case, the first device may obtain a second preset interval of the sampling time. The second preset interval is the interval between the preset sampling times. In this case, the sampling time of the first sampling cycle needs to be preset. For example, the sampling time of the first sampling cycle may be preset as T / 256, and the second preset interval may be preset as T / 256. Thus, when the sampling time of the first sampling cycle is determined to be T / 256, the sampling time of the second sampling cycle may be determined to be 2T / 256, the sampling time of the third sampling cycle may be determined to be 3T / 256, and the sampling time of the qth sampling cycle may be determined to be qT / 256, where q is an integer greater than 0 and not greater than 256, and T represents the sampling period. By separately determining the sampling time of each sampling cycle, data blocks can be collected from at least two data signal lines in each sampling cycle based on the sampling time of that sampling cycle.

[0093] As another possible implementation, when determining the sampling time of at least one sampling cycle, the first device may pre-set a reference time, namely, a sampling reference value. The sampling time of each sampling cycle is determined relative to the sampling reference value. In this case, the first device may first determine the sampling reference value. And obtain a first preset interval time of the sampling time. The first preset interval time is the interval time of the sampling time relative to the sampling reference value. In this case, the first device may determine the sampling time of each sampling cycle based on the sampling reference value and the first preset interval time. For example, assuming that the preset sampling reference value is T / 128 and the first preset interval time is T / 128, the sampling time of the i-th sampling cycle is a+(i-1)*b, where a represents the sampling reference value and b represents the first preset interval time. That is, the sampling time of the i-th sampling cycle is T / 128+(i-1)*T / 128.

[0094] After determining the sampling time of at least one sampling period, the first device samples the test data block in at least two data signals according to the corresponding sampling time in each sampling period based on the sampling time of the at least one sampling period.

[0095] It should be noted that when determining the sampling time of at least one sampling period, the first device may determine the sampling time of all sampling periods. Alternatively, the first device may determine only the sampling time of the current sampling period each time, and after determining whether the sampling time of the current sampling period is the first valid sampling time, determine the sampling time of the next sampling period when entering the next sampling period. This application does not impose any restrictions on this.

[0096] Step S202: For the sampling time of each sampling cycle, obtain test data according to the test data blocks sampled in at least two data signal lines, and detect whether the test data is correct; when the test data is correct, determine the sampling time of the sampling cycle as the first effective sampling time.

[0097] In an embodiment of the present application, when performing a quality inspection of a data signal line between a first device and a second device, the second device may transmit a test data block to the first device via at least two data signal lines between the second device and the first device. The second device may divide the test data into at least two test data blocks, and transmit the at least two test data blocks to the first device via the at least two data signal lines. When the first device collects data via the at least two data signal lines, since the test data blocks transmitted via the at least two data signal lines represent different portions of the test data, the first device needs to collect valid data portions via both of the at least two data signal lines in order to obtain data from different portions of the test data and synthesize the test data.

[0098] Based on this, the first device collects test data blocks from at least two data signals based on the sampling time of each sampling cycle. After obtaining at least two collected data blocks, the first device parses the collected test data blocks, determines the position of each test data block in the test data, and synthesizes test data using each collected test data block. In an embodiment of the present application, when the second device sends test data to the first device, the test data is data in a preset fixed format. That is, it is data in a data format used for testing. After synthesizing the collected data blocks into test data, the first device needs to detect whether the test data is correct. In this case, the first device can detect whether the data format of the test data is data in the preset fixed format. If so, it can determine that the test data is correct. If not, it is determined that the test data is incorrect.

[0099] When the first device determines that the test data is correct, it means that the test data blocks collected by the first device in at least two data signal lines are all valid data parts, and the sampling time of the sampling cycle can be determined as the first valid time.

[0100] Alternatively, when the first device determines that the test data is wrong, it means that the test data block collected by the first device in at least two data signal lines contains invalid data parts, and the sampling time of the sampling cycle can be determined as invalid time.

[0101] As a possible implementation method, in order to prevent the data block from being tampered with during the transmission process, the second device adds verification information to each test data block when dividing the test data into at least two test data blocks. For example, a CRC check code is added to each test data block. At this time, after the first device collects the test data blocks on at least two data signal lines based on the sampling time of the current sampling period, it is necessary to first parse each test data block and verify the test data blocks according to the verification information carried in each test data block. If the verification information of at least one test data block is wrong, it means that the currently collected test data block is incorrect. At this time, the sampling time of the current sampling period can be directly determined as an invalid time. Alternatively, if it is detected that the verification information of each test data block is correct, the test data blocks can be combined into test data to further detect whether the test data is correct. The specific detection process can be referred to the above description and will not be repeated here.

[0102] Exemplarily, the first device and the second device are connected via four data signal lines. The first device collects test data blocks, namely test data blocks a, b, c, and d, on the four data signal lines at the sampling time of each sampling cycle. After collecting test data blocks a, b, c, and d, the first device can analyze and parse the test data blocks a, b, c, and d to obtain verification information in the test data blocks a, b, c, and d, assuming that the verification information of the test data blocks a, b, c, and d is a CRC checksum. The first device can respectively detect whether the CRC checksums of the test data blocks a, b, c, and d are correct. If the CRC checksums of the test data blocks a, b, c, and d are all correct, the first device can synthesize test data based on the position of the test data blocks in the test data. The first device can further detect whether the synthesized test data is data in a preset fixed format. If it is data in the preset fixed format, the test data is determined to be correct, and the sampling time of the sampling cycle is determined as the first effective sampling time.

[0103] Based on the above process, the first device can determine whether the sampling time of each sampling period is the first valid sampling time.

[0104] Step S203: Determine the signal transmission qualities of at least two data signal lines according to the determined first effective sampling time.

[0105] In an embodiment of the present application, after the first device determines whether the sampling time of each sampling period is the first valid sampling time, it can obtain all first valid sampling times. Since the first valid sampling time is the time when at least two data signal lines simultaneously collect a large valid data portion, the first device can determine the signal transmission quality of the at least two data signal lines based on all determined first valid sampling times.

[0106] As a possible implementation, the first device can determine the signal transmission quality of at least two data signal lines by determining the ratio of the total length of all first valid sampling times to the time of a sampling cycle. For example, when the ratio of the total length of all first valid sampling times to the time of a sampling cycle is greater than a first preset threshold, it indicates that the first valid sampling times account for a large proportion of the sampling cycle, and it can be determined that the signal transmission quality of the at least two data signal lines is good. If the ratio of the total length of all first valid sampling times to the time of a sampling cycle is not greater than the first preset threshold, it indicates that the first valid sampling times account for a small proportion of the sampling cycle, and it can be determined that the signal transmission quality of the at least two data signal lines is poor.

[0107] As a possible implementation method, the first device can also first determine the second effective sampling time. That is, when the first device and the second device use one data signal line to transmit data, the first device determines that when data is transmitted through one data signal line, the corresponding acquisition time that can collect the valid data part is the second effective sampling time. At this time, the first device can calculate the ratio between the total length of the first effective sampling time and the total length of the second effective sampling time, and determine the signal transmission quality of at least two data signal lines based on the ratio. For example, when the ratio is greater than the second preset threshold, it means that the first effective sampling time accounts for a large proportion in the sampling period, and it can be determined that the signal transmission quality of at least two data signal lines is good. If the ratio is not greater than the second preset threshold, it means that the first effective sampling time accounts for a small proportion in the sampling period, and it can be determined that the signal transmission quality of at least two data signal lines is poor.

[0108] In this way, at least one sampling time can be first determined, and based on the at least one sampling time, a test data block can be sampled on at least two data signal lines. For each sampling time, test data can be obtained based on the test data block sampled on each data signal line, and the test data can be checked for correctness. If the test data is correct, the sampling time corresponding to the correct test data is determined as the first effective sampling time. Since a greater number of first effective sampling times indicates that there are more moments when different data signal lines can simultaneously transmit signals, the probability of correctly acquiring data is greater, i.e., the signal transmission quality is better. Based on this, in embodiments of the present application, the signal transmission quality of at least two data signal lines can be determined based on the first effective sampling time, thereby detecting the transmission quality of at least two data signal lines. This allows products with poor signal transmission quality on at least two data signal lines to be identified, thereby reducing the probability of defective products entering the market and improving the quality of finished products.

[0109] See also Figure 5 , is a data link detection method provided in an embodiment of the present application. The method is applied to the attached Figure 1 The second device. The first device is connected to the second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines. Figure 5 As shown, the method includes:

[0110] Step S501: Divide test data into at least two test data blocks according to at least two data signal lines.

[0111] In an embodiment of the present application, a second device needs to send test data to a first device. To increase the data transmission speed, when the second device transmits data to the first device, it is typically necessary to divide the data into different data blocks and transmit the different data blocks via different data signal lines. Therefore, the second device can divide the test data in a preset fixed format into at least two test data blocks based on the number of at least two data signal lines.

[0112] As a possible implementation manner, the number of the test data blocks is the same as the number of the at least two data signal lines.

[0113] For example, there are four data signal lines between the second device and the first device. Assuming that the preset fixed format test data is 8 bytes, the second device can divide the 8-byte test data into four 2-byte test data blocks.

[0114] As a possible implementation, the second device can add verification information, such as a CRC check code, to each test data block to prevent the test data block from being tampered with during transmission over the data signal line.

[0115] Step S502: Send the at least two test data blocks to the first device through at least two data signal lines respectively.

[0116] Different data signal lines transmit different test data blocks.

[0117] In an embodiment of the present application, after dividing the test data into different test data blocks, the second device can send the test data blocks to the first device respectively through different data signal lines, wherein different test data blocks are transmitted through different data signal lines.

[0118] See also Figure 6 , is a flow chart of a data link detection method provided in an embodiment of the present application. Figure 6 As shown, the method includes:

[0119] Step S601: The first device obtains a preset number of sampling times of test data.

[0120] In an embodiment of the present application, the number of times test data is collected is the number of sampling times divided into a sampling period. The first device can obtain a preset number of sampling times for the test data. The first device can obtain the sampling times in response to a user's setting operation. The sampling times can be pre-set or set by default and stored in a storage device. The first device can obtain the preset sampling times from the storage device.

[0121] Step S602: The first device obtains the number of times the test data has been sampled, and detects whether the number of times the test data has been sampled reaches a preset number of times the test data has been sampled.

[0122] In an embodiment of the present application, after the first device obtains the preset number of sampling times for the test data, it is necessary to detect whether the current number of sampling times has reached the preset number of sampling times. In this case, the first device obtains the number of sampling times for the test data and compares the number of sampling times for the test data with the preset number of sampling times to detect whether the number of sampling times for the test data has reached the preset number of sampling times for the test data.

[0123] It should be noted that the first device executes different steps according to different detection results. When the test data has been sampled for a preset number of times, step S610 is directly executed. If the test data has been sampled for a preset number of times, the test data needs to be sampled, and the following step S603 is executed.

[0124] Step S603: The first device determines a sampling time of at least one sampling period.

[0125] In the embodiment of the present application, when the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, the sampling time of the i-th sampling period is determined.

[0126] The value of i is the sum of the number of sampling times and 1.

[0127] That is, when the first device determines that the number of times the test data has been sampled has not reached the preset number of times the test data has been sampled, it indicates that further test data collection is required. In other words, when the sampling period is divided into m sampling times, the preset number of sampling times is m. When the first device determines that the number of times the test data has been sampled has not reached the preset number of times the test data has been sampled, it indicates that the sampling period for the first device to sample the test data has not reached m sampling periods. In this case, the first device needs to collect test data. When the current sampling period is the i-th sampling period, the first device needs to first determine the sampling time for the i-th sampling period.

[0128] As a possible implementation method, when the number of times the test data has been sampled does not reach the preset number of sampling times of the test data, determining the sampling time of the i-th sampling cycle includes: determining a sampling reference value based on the preset number of sampling times of the test data, and obtaining a first preset interval time of the sampling time; when the number of times the test data has been sampled does not reach the preset number of sampling times of the test data, determining the sampling time of the i-th sampling cycle based on the sampling reference value and the first preset interval time of the sampling time.

[0129] In an embodiment of the present application, the first preset interval is the time interval between the sampling time and the sampling reference value. The sampling time of each sampling cycle is determined based on the sampling reference time. When the first device determines that the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, when the current sampling cycle is the i-th sampling cycle, it is necessary to first determine the sampling time of the i-th sampling cycle. In this case, the first device can determine the sampling reference value based on the preset number of times the test data has been sampled, that is, the sampling reference value is determined to be a time value equal to the preset number of sampling times. For example, the sampling reference value can be determined as T / preset number of sampling times. After determining the sampling reference value, the first device can determine the sampling time of each cycle according to the first preset interval. For example, the first preset interval includes: (p-1)×T / m, where p represents the p-th sampling cycle and p is an integer greater than 0; T represents the sampling cycle; and m represents the preset number of times the test data has been sampled. When determining the sampling time of the i-th sampling cycle, the first device can calculate the sampling time of the i-th sampling cycle based on the sampling reference value and the first preset interval. At this time, the first device determines that the sampling time of the i-th sampling period is T / m+(p-1)×T / m. For details, please refer to step S201 and will not be described in detail here.

[0130] It should be understood that the first preset interval time is related to the sampling period and gradually increases as the sampling period increases.

[0131] As another possible implementation, when the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, determining the sampling time of the i-th sampling period includes:

[0132] Obtain a second preset interval of the sampling time; when the number of sampled test data does not reach the preset number of sampled test data, determine the sampling time of the i-th sampling period according to the second preset interval of the sampling time and the sampling time of the i-1-th sampling period.

[0133] That is, the second preset interval is the time interval between the sampling times of two adjacent sampling periods. The first device can now determine the sampling time of the current sampling period based on the sampling time of the previous sampling period and the second preset interval. In other words, the first device only needs to obtain the sampling time of the (i-1)th sampling period and the second preset interval to calculate the sampling time of the i-th sampling period. The specific determination process can be referred to step S201 and will not be further described here.

[0134] It should be understood that the second preset interval time may be fixed, which is merely the interval time of the sampling time.

[0135] Through the above different methods, the first device can determine the sampling time of the i-th sampling period.

[0136] Step S604: In the i-th sampling period, the first device sends a test instruction message to the second device via the control signal line. The second device receives the test instruction message sent by the first device via the control signal line.

[0137] The test instruction message is used to instruct the second device to send test data.

[0138] In an embodiment of the present application, in the i-th sampling period, the first device needs to obtain test data, and the first device needs to send a test instruction message to the second device to instruct the second device to send the test data to the first device. The second device receives the test instruction message via the control signal line.

[0139] For example, when entering the system download process, the first device needs to automatically detect the data transmission quality between it and the second device. In this case, the first device needs to send a test command message to the second device during the i-th sampling cycle of the test process, instructing the second device to send test data. The second device receives the test command message via a control signal line.

[0140] Step S605: The second device sends a test response message to the first device via the control signal line. The first device receives the test response message sent by the second device via the control signal line.

[0141] In an embodiment of the present application, after receiving a test instruction message transmitted by the first device via a control signal line, the second device can be informed by the test instruction message that it needs to send test data to the first device. When the second device is able to send test data to the first device, it sends a test response message to the first device via the control signal line. After receiving the test response message via the control signal line, the first device is informed that the second device can send test data. At this point, the first device can sample the test data block when the sampling time of the sampling period arrives.

[0142] Step S606: The second device divides the test data into at least two test data blocks according to the at least two data signal lines.

[0143] For details, please refer to step S501 and will not be described again here.

[0144] Step S607: The second device sends at least two test data blocks to the first device via at least two data signal lines. The first device samples the test data blocks via the at least two data signal lines based on the sampling time of the i-th sampling cycle.

[0145] Different data signal lines transmit different test data blocks.

[0146] For details, please refer to step S502 and step S201 and no further details will be given here.

[0147] Step S608: For the sampling time of the i-th sampling cycle, obtain test data based on the test data blocks sampled in at least two data signal lines, and detect whether the test data is correct; when the test data is correct, determine the sampling time of the i-th sampling cycle as the first effective sampling time.

[0148] For details, please refer to step S202 and no further details will be given here.

[0149] In step S609, the first device updates the number of sampling times according to the value of i, and re-executes the step of obtaining the number of sampling times of the test data, and detects whether the number of sampling times of the test data reaches the preset number of sampling times of the test data, and then obtains the test data according to the test data blocks sampled in at least two data signal lines for the sampling time of the i-th sampling cycle, and detects whether the test data is correct; when the test data is correct, the sampling time of the i-th sampling cycle is determined as the first effective sampling time, until the number of sampling times of the test data reaches the preset number of sampling times of the test data.

[0150] In an embodiment of the present application, after the first device completes sampling the test data in the i-th sampling cycle and determines whether the sampling time of the i-th sampling cycle is the first valid sampling time, the current i-th sampling cycle can end and enter a sampling cycle. At this time, the first device updates the number of times sampled. The first device can automatically add 1 to the number of times sampled obtained in the above step S602, or directly update the i value to the sampled data. After updating the number of times sampled, steps S602 to S608 can be re-executed until the number of times sampled reaches the preset sampling number. At this time, it can be completed to determine which sampling times among the m sampling times are the first valid sampling times and which times are invalid times.

[0151] Step S610: The first device determines the signal transmission quality of at least two data signal lines according to the determined first effective sampling time.

[0152] For details, please refer to step S203 and will not be repeated here.

[0153] See also Figure 7 , provides a flow chart of a data link detection method for an embodiment of the present application. Figure 6 The method shown in FIG. 1 adds the steps of determining the effective sampling time corresponding to a data signal line. Figure 7 As shown, the method includes:

[0154] Step S701: A first device determines that the transmission mode of a target bus is a first mode.

[0155] In an embodiment of the present application, the target bus has two transmission modes: a first mode and a second mode. When the target bus transmission mode is the first mode, data is transmitted between the first device and the second device via a target data signal line. The target data signal line can be any one of the at least two data signal lines. It can also be a pre-defined one of the at least two data signal lines. When the target bus transmission mode is the second mode, data is transmitted between the first device and the second device via the at least two data signal lines.

[0156] In order to more accurately determine the signal transmission quality of at least two data signal lines between the first device and the second device, the second effective sampling time in a sampling cycle when a data signal line between the first device and the second device transmits data can be first determined. Then, when the at least two data signal lines between the first device and the second device transmit data simultaneously, the first effective sampling time in a sampling cycle is determined, and the signal transmission quality of the at least two data signal lines is determined based on the first effective sampling time and the second effective sampling time. Based on this, it is necessary to first determine the second effective sampling time in a sampling cycle when a data signal line between the first device and the second device transmits data. At this time, the first device can set the transmission mode of the target bus to the first mode so that the test data is transmitted between the first device and the second device through the target data signal line.

[0157] Step S702: The first device obtains a preset number of sampling times of test data.

[0158] For details, please refer to step S601 and will not be repeated here.

[0159] Step S703: The first device obtains the number of times the test data has been sampled, and detects whether the number of times the test data has been sampled reaches a preset number of times the test data has been sampled.

[0160] For details, please refer to step S602 and will not be repeated here.

[0161] Step S704: The first device determines a sampling time of at least one sampling period.

[0162] For details, please refer to step S603 and no further details will be given here.

[0163] Step S705: In the i-th sampling period, the first device sends a test instruction message to the second device via the control signal line. The second device receives the test instruction message sent by the first device via the control signal line.

[0164] The test instruction message carries the transmission mode of the target bus, and the transmission mode of the target bus is the first mode.

[0165] In this embodiment of the present application, when a first device sends a test command message to a second device, it can include the target bus transmission mode in the message, so that the second device can transmit data according to the specified transmission mode. The second device then receives the test command message, parses it, and obtains the target bus transmission mode contained therein. For details, refer to step S604 and will not be further described here.

[0166] Step S706: The second device sends a test response message to the first device via the control signal line. The first device receives the test response message sent by the second device via the control signal line.

[0167] For details, please refer to step S605 and will not be repeated here.

[0168] Step S707: The second device sends the test data to the first device via the target data signal line. The first device samples the test data in the target data signal line based on the sampling time of the i-th sampling cycle.

[0169] In this embodiment of the present application, after receiving a test instruction message, the second device needs to send test data to the first device. At this time, because the transmission mode of the target bus is the first mode, the second device can send the test data to the first device via the target data signal line. The first device samples the test data on the target data signal line at the sampling time of the i-th sampling cycle.

[0170] Step S708 : The first device detects whether the test data sampled in the target data line is correct for the sampling time of the i-th sampling cycle, and determines the sampling time corresponding to the correct test data as the second effective sampling time.

[0171] In an embodiment of the present application, after acquiring the test data, the first device needs to detect whether the test data is correct. If the test data is detected to be correct, the sampling time of the i-th sampling period can be determined as the second effective sampling time. The first device's detection of whether the test data is correct can be referred to step S608 and will not be further described here.

[0172] Step S709: update the sampled times according to the value of i, and re-execute the step of obtaining the sampled times of the test data, and detect whether the sampled times of the test data reaches the preset sampling times of the test data, to the step of obtaining the test data according to the test data blocks sampled in at least two data signal lines for the sampling time of the i-th sampling cycle, and detect whether the test data is correct; when the test data is correct, determine the sampling time of the i-th sampling cycle as the first valid sampling time, until the sampled times of the test data reaches the preset sampling times of the test data.

[0173] For details, please refer to step S609 and will not be repeated here.

[0174] Step S710 : When the number of times the test data has been sampled reaches a preset number of times the test data has been sampled, the first device updates the transmission mode of the target bus to the second mode.

[0175] In an embodiment of the present application, when the transmission mode of the target bus is the first mode, if the number of times the test data has been sampled reaches a preset number of times the test data has been sampled, it is necessary to determine the effective sampling time in a sampling cycle when the transmission mode of the target bus is the second mode. In this case, the first device sets the transmission mode of the target bus to the second mode.

[0176] Step S711: The first device obtains a preset number of sampling times of test data.

[0177] For details, please refer to step S601 and will not be repeated here.

[0178] Step S712: The first device obtains the number of times the test data has been sampled, and detects whether the number of times the test data has been sampled reaches a preset number of times the test data has been sampled.

[0179] For details, please refer to step S602 and will not be repeated here.

[0180] Step S713: The first device determines a sampling time of at least one sampling period.

[0181] For details, please refer to step S603 and no further details will be given here.

[0182] Step S714: In the i-th sampling period, the first device sends a test instruction message to the second device via the control signal line. The second device receives the test instruction message sent by the first device via the control signal line.

[0183] The test instruction message is used to instruct the second device to send test data.

[0184] For details, please refer to step S604 and will not be described again here.

[0185] Step S715: The second device sends a test response message to the first device via the control signal line. The first device receives the test response message sent by the second device via the control signal line.

[0186] For details, please refer to step S605 and will not be repeated here.

[0187] Step S716: The second device divides the test data into at least two test data blocks according to the at least two data signal lines.

[0188] For details, please refer to step S606 and no further details will be given here.

[0189] Step S717: The second device sends at least two test data blocks to the first device via at least two data signal lines. The first device samples the test data blocks via the at least two data signal lines based on the sampling time of the i-th sampling cycle.

[0190] Different data signal lines transmit different test data blocks.

[0191] For details, please refer to step S607 and no further details will be given here.

[0192] Step S718: For the sampling time of the i-th sampling cycle, obtain test data based on the test data blocks sampled in at least two data signal lines, and detect whether the test data is correct; when the test data is correct, determine the sampling time of the i-th sampling cycle as the first effective sampling time.

[0193] For details, please refer to step S608 and will not be repeated here.

[0194] In step S719, the first device updates the number of sampling times according to the value of i, and re-executes the step of obtaining the number of sampling times of the test data, and detects whether the number of sampling times of the test data reaches the preset sampling number of the test data, and then obtains the test data according to the test data blocks sampled in at least two data signal lines for the sampling time of the i-th sampling cycle, and detects whether the test data is correct; when the test data is correct, the sampling time of the i-th sampling cycle is determined as the first effective sampling time, until the number of sampling times of the test data reaches the preset sampling number of the test data.

[0195] For details, please refer to step S609 and will not be repeated here.

[0196] Step S720: The first device determines the signal transmission quality of at least two data signal lines according to the determined first effective sampling time.

[0197] For details, please refer to step S203 and will not be repeated here.

[0198] See also Figure 8 , is a structural diagram of a data link detection device provided in an embodiment of the present application. The detection device is applied to a first device, and the first device is connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines. Figure 8 As shown, the detection device includes:

[0199] The processing unit 801 is configured to determine a sampling time of at least one sampling period, and sample test data blocks in at least two data signal lines based on the sampling time of the at least one sampling period.

[0200] The processing unit 801 is further used to obtain test data according to the test data blocks sampled in at least two data signal lines for the sampling time of each sampling cycle, and to detect whether the test data is correct; when the test data is correct, the sampling time of the sampling cycle is determined as the first effective sampling time.

[0201] The determining unit 802 is configured to determine the signal transmission qualities of at least two data signal lines according to the determined first effective sampling time.

[0202] As a possible implementation, Figure 9 As shown, the above detection device also includes:

[0203] The sending unit 803 is configured to send a test instruction message to the second device via the control signal line.

[0204] The receiving unit 804 is configured to receive a test response message sent by the second device through the control signal line.

[0205] As a possible implementation manner, the determining unit 802 is further configured to determine that the transmission mode of the target bus is the first mode.

[0206] The processing unit 801 is further configured to sample test data in the target data signal line based on a sampling time of at least one sampling cycle; and for each sampling time of the sampling cycle, detect whether the test data sampled in the target data line is correct, and determine the sampling time corresponding to the correct test data as the second effective sampling time.

[0207] The target signal line is any one of the at least two data signal lines.

[0208] The processing unit 801 is further configured to update the transmission mode of the target bus to the second mode.

[0209] The processing unit 801 is specifically configured to sample the test data blocks in at least two data signal lines based on a sampling time of at least one sampling cycle when the transmission mode of the target bus is the second mode.

[0210] The determining unit 802 is specifically configured to determine the signal transmission qualities of at least two data signal lines according to the determined first effective sampling time and the second effective sampling time.

[0211] As a possible implementation, the processing unit 801 is further configured to obtain a preset sampling number of test data; and obtain the number of times the test data has been sampled, and detect whether the number of times the test data has been sampled reaches the preset sampling number of the test data.

[0212] The processing unit 801 is specifically configured to determine a sampling time for an i-th sampling period when the number of times the test data has been sampled does not reach a preset number of times the test data has been sampled; and sample the test data on at least two data signal lines based on the sampling time of the i-th sampling period during the i-th sampling period. The value of i is the sum of the number of times the test data has been sampled and 1.

[0213] For the sampling time of the i-th sampling cycle, test data is obtained according to the test data blocks sampled in at least two data signal lines, and whether the test data is correct is detected; when the test data is correct, the sampling time of the i-th sampling cycle is determined as the first effective sampling time.

[0214] The processing unit 801 is further configured to update the number of samplings according to the value of i, and re-execute the step of obtaining the number of samplings of the test data, and detect whether the number of samplings of the test data reaches the preset number of samplings of the test data, until the step of obtaining the test data according to the test data blocks sampled in at least two data signal lines for the sampling time of the i-th sampling cycle, and detecting whether the test data is correct; when the test data is correct, determining the sampling time of the i-th sampling cycle as the first valid sampling time, until the number of samplings of the test data reaches the preset number of samplings of the test data.

[0215] As a possible implementation method, the processing unit 801 is specifically used to determine a sampling reference value based on a preset number of sampling times of the test data, and obtain a first preset interval time of the sampling time; when the number of sampled times of the test data does not reach the preset number of sampling times of the test data, the sampling time of the i-th sampling cycle is determined based on the sampling reference value and the first preset interval time of the sampling time.

[0216] As a possible implementation method, the processing unit 801 is specifically used to obtain a second preset interval time of the sampling time; when the number of times the test data has been sampled does not reach the preset number of sampling times of the test data, the sampling time of the i-th sampling cycle is determined based on the second preset interval time of the sampling time and the sampling time of the i-1th sampling cycle.

[0217] As a possible implementation manner, the target bus includes: a secure digital input and output interface SDIO bus.

[0218] See also Figure 10 , is a structural diagram of a data link detection device provided in an embodiment of the present application. The detection device is applied to a second device, and the first device is connected to the second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines. Figure 10 As shown, the detection device includes:

[0219] The processing unit 1001 is configured to divide the test data into at least two test data blocks according to at least two data signal lines.

[0220] The sending unit 1002 is configured to send at least two test data blocks to the first device via at least two data signal lines, wherein different data signal lines transmit different test data blocks.

[0221] As a possible implementation, Figure 11 As shown, the detection device also includes:

[0222] The receiving unit 1003 is configured to receive a test instruction message sent by the first device through a control signal line.

[0223] The sending unit 1002 is further configured to send a test response message to the first device through the control signal line.

[0224] Corresponding to the above embodiments, the present application also provides an electronic device. Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 1200 may include: a processor 1201, a memory 1202, and a communication unit 1203. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation on the embodiments of the present invention. It can be a bus structure or a star structure, and can also include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0225] The communication unit 1203 is configured to establish a communication channel so that the storage device can communicate with other devices, receive user data from other devices, or send user data to other devices.

[0226] The processor 1201 is the control center of the storage device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 1202, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 1201 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0227] The memory 1202 is used to store the execution instructions of the processor 1201. The memory 1202 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0228] When the execution instructions in the memory 1202 are executed by the processor 1201, the electronic device 1200 can execute Figure 7 Some or all of the steps in the illustrated embodiments.

[0229] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program that, when executed, may include some or all of the steps of each embodiment of the data link detection method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0230] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention or certain portions of the embodiments.

[0231] In this specification, reference can be made to the same or similar parts between the various embodiments. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A data link detection method, characterized in that: Applied to a first device, the first device is connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, the method comprising: determining a sampling time of at least one sampling period, and sampling a test data block in at least two data signal lines based on the sampling time of the at least one sampling period; For each sampling period, test data is acquired based on the test data blocks sampled in the at least two data signal lines, and whether the test data is correct is detected; when the test data is correct, the sampling period of the sampling period is determined as a first valid sampling time; determining signal transmission qualities of the at least two data signal lines according to the determined first effective sampling time; Before sampling the test data blocks in at least two data signal lines at a sampling time based on the at least one sampling period, the method further includes: Determining that the transmission mode of the target bus is a first mode; Sampling test data in a target data signal line based on a sampling time of the at least one sampling period; wherein the target data signal line is any one of the at least two data signal lines; For each sampling period, detecting whether the test data sampled in the target data signal line is correct, and determining the sampling time corresponding to the correct test data as the second effective sampling time; Updating the transmission mode of the target bus to a second mode; The sampling of the test data blocks in the at least two data signal lines based on the sampling time of the at least one sampling period includes: When the transmission mode of the target bus is the second mode, sampling test data blocks in at least two data signal lines based on a sampling time of the at least one sampling period; Determining the signal transmission quality of the at least two data signal lines according to the determined first effective sampling time includes: The signal transmission qualities of the at least two data signal lines are determined according to the determined first effective sampling time and the second effective sampling time.

2. The method according to claim 1, characterized in that Before sampling the test data blocks in the at least two data signal lines at a sampling time based on the at least one sampling period, the method further includes: sending a test instruction message to the second device via the control signal line; A test response message sent by the second device is received through the control signal line.

3. The method according to claim 1, characterized in that Also includes: Get the preset sampling times of test data; Obtaining the number of times the test data has been sampled, and detecting whether the number of times the test data has been sampled reaches a preset number of times the test data has been sampled; The determining of a sampling time of at least one sampling period and sampling a test data block based on the sampling time of the at least one sampling period comprises: When the number of times the test data has been sampled does not reach a preset number of times the test data has been sampled, determining a sampling time of an i-th sampling period; in the i-th sampling period, sampling the test data on the at least two data signal lines based on the sampling time of the i-th sampling period; wherein the value of i is the sum of the number of times the test data has been sampled and 1; The method of acquiring test data using the test data blocks sampled from the at least two data signal lines for the sampling time of each sampling period and detecting whether the test data is correct; and determining the sampling time of the sampling period as the first effective sampling time when the test data is correct comprises: For the sampling time of the i-th sampling period, acquiring test data according to the test data blocks sampled in the at least two data signal lines, and detecting whether the test data is correct; when the test data is correct, determining the sampling time of the i-th sampling period as the first effective sampling time; When the test data is correct, after determining the sampling time of the i-th sampling period as the first effective sampling time, the method further includes: The number of samplings is updated according to the value of i, and the step of obtaining the number of samplings of the test data is re-executed, and it is detected whether the number of samplings of the test data reaches the preset number of samplings of the test data, until the step of obtaining test data according to the test data blocks sampled in the at least two data signal lines for the sampling time of the i-th sampling cycle, and detecting whether the test data is correct; when the test data is correct, the sampling time of the i-th sampling cycle is determined as the first valid sampling time, until the number of samplings of the test data reaches the preset number of samplings of the test data.

4. The method according to claim 3, characterized in that When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, determining the sampling time of the i-th sampling period includes: Determine a sampling reference value according to a preset sampling number of the test data, and obtain a first preset interval time of the sampling time; When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, the sampling time of the i-th sampling period is determined according to the sampling reference value and the first preset interval time of the sampling time.

5. The method according to claim 3, characterized in that When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, determining the sampling time of the i-th sampling period includes: Obtaining a second preset interval time of the sampling time; When the number of times the test data has been sampled does not reach the preset number of times the test data has been sampled, the sampling time of the i-th sampling period is determined according to the second preset interval time of the sampling time and the sampling time of the i-1-th sampling period.

6. The method according to any one of claims 1 to 5, characterized in that The target bus includes: a secure digital input and output interface SDIO bus.

7. A data link detection device, characterized in that: Applied to a first device, the first device is connected to a second device via a target bus, wherein the target bus includes a control signal line and at least two data signal lines, the apparatus comprises: a processing unit, configured to determine a sampling time of at least one sampling period, and sample a test data block in at least two data signal lines based on the sampling time of the at least one sampling period; The processing unit is further configured to obtain test data according to the test data blocks sampled in the at least two data signal lines at a sampling time of each sampling period, and detect whether the test data is correct; and when the test data is correct, determine the sampling time of the sampling period as a first valid sampling time; a determining unit, configured to determine signal transmission qualities of the at least two data signal lines according to the determined first effective sampling time; The determining unit is further configured to determine that the transmission mode of the target bus is the first mode; The processing unit is further configured to sample test data in a target data signal line based on a sampling time of the at least one sampling cycle; wherein the target data signal line is any one of the at least two data signal lines; detect whether the test data sampled in the target data signal line is correct at the sampling time of each sampling cycle, and determine the sampling time corresponding to the correct test data as a second valid sampling time; and update the transmission mode of the target bus to the second mode; The processing unit is specifically configured to sample the test data blocks in the at least two data signal lines based on the sampling time of the at least one sampling period when the transmission mode of the target bus is the second mode; The determining unit is specifically configured to determine the signal transmission qualities of the at least two data signal lines according to the determined first effective sampling time and the second effective sampling time.

8. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Determining data valid windows in a system and method for testing an integrated circuit device

    US20120047411A1