FPGA-based cable testing method and equipment

Through the FPGA-based cable testing system, the data eye diagram is used to evaluate cable quality, which solves the problems of high subjectivity, high cost and poor applicability of cable testing in the existing technology, and achieves efficient and accurate cable quality evaluation. .

CN115542136BActive Publication Date: 2024-09-10SUZHOU IND PARK FISCHER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211200769.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2024-09-10
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing cable testing methods have problems such as high subjectivity, high cost, high equipment requirements, and inability to be suitable for production testing. In particular, the quality assessment of high-speed cables is not intuitive and accurate enough.

Method used

Using an FPGA-based cable test system, it reduces equipment costs and test complexity by generating and receiving high-speed signals, sampling and analyzing the bit error rate of the signals, generating data eye diagrams to evaluate cable quality, and integrating low-speed signal and power supply line tests. sex.

Benefits of technology

It achieves high-speed, accurate and intuitive cable quality assessment, reduces test costs, is suitable for production environments, and improves test efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115542136B
    Figure CN115542136B
Patent Text Reader

Abstract

The present invention relates to a cable testing method and device based on FPGA, comprising a generating module for generating a test signal, a receiving module for receiving a signal, an analyzing module for calculating and analyzing the signal, and a human-computer interaction module for configuring parameters. The cable testing method comprises a high-speed signal testing method, which sets a reference point P at T / 2 within N consecutive clock cycles T of the test signal. N , and sample the benchmark result A N ; then in P N The time point is delayed or advanced by time t, and a level offset v is applied to the signal to obtain the sampling result nA N ; By adding nA N With A N A comparison is made to obtain a two-dimensional matrix of bit error rates at the corresponding sampling points, and then the two-dimensional matrix is ​​rendered into a data eye diagram. The cable quality is evaluated based on the eye width and eye height of the data eye diagram. This not only allows for convenient and intuitive acquisition of test results, but also reduces the cost of adapting to cables of different specifications and ensures the accuracy of the test results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a cable testing method and equipment based on FPGA, which are applicable to the field of communication technology. Background Art

[0002] High-speed cables are communication cables used for interconnecting devices that require a large amount of data interaction. As the data rate between devices continues to increase, the specifications of high-speed cables are also constantly improving. Correspondingly, the requirements for the quality of high-speed cables are also constantly increasing.

[0003] There are several testing methods for cables in the industry: one is visual inspection, where the tester uses the human eye to determine whether the cable has poor workmanship; the second is to use consumer-grade equipment to simulate the actual user's use and detect whether the cable is qualified based on whether the equipment can work normally. For example, the test of DP cables generally requires at least one host with integrated or independent graphics and one monitor. If the host can light up the monitor normally through the DP cable, the DP cable is considered qualified. The DP protocol defines 4 groups of high-speed differential signals (lanes) for transmitting video signals. Each group of high-speed differential signals corresponds to a physical channel (that is, a pair of differential lines), and the DP protocol can work normally in 1\2\4 lanes. At the same time, because the host may slow down when the physical link is not good, after lighting up the monitor, it is necessary to further evaluate the quality of the cable based on the resolution of the video signal; the third is to use a network analyzer to evaluate the cable quality.

[0004] Among the test methods in the above-mentioned industries, the evaluation method of the first method is too subjective and prone to errors, and the accuracy and credibility of the results are not high; the second method is not only cumbersome, but also not intuitive in reflecting the test results, and the higher the specification of the cable, the higher the specification of the test equipment required, which leads to excessively high testing costs; the third method can only be used in laboratories due to the high cost of network analyzers and cannot be applied to production testing. Summary of the invention

[0005] In order to solve the defects of the above-mentioned prior art, the present invention proposes a cable testing method based on FPGA. The technical solution adopted by the present invention is: adopting a cable testing system based on FPGA, the testing system comprising:

[0006] A generating module, used for generating a test signal, the generating module includes a high-speed signal generator, a low-speed signal generator, and a DC module for providing a level to the cable under test;

[0007] A receiving module, used for receiving a test signal, the receiving module comprising a high-speed signal receiver, a low-speed signal receiver, a sampling module for sampling the high-speed signal received by the high-speed signal receiver, and an AD module for adding a load to the level provided by the DC module and sampling;

[0008] An analysis module, connected to the receiving module and used to calculate and analyze the signals collected by the sampling module and the AD module;

[0009] A human-computer interaction module is connected to the generating module, the receiving module and the analyzing module and is used to configure the test parameters of the generating module, the receiving module and the analyzing module;

[0010] When testing the cable under test, two ends of the cable under test are connected to the output end of the generating module and the input end of the receiving module respectively.

[0011] The cable testing method includes a high-speed signal testing method, the method including:

[0012] S1. Preset the qualified eye width X and qualified eye height Y of the high-speed signal test of the tested cable in the human-computer interaction module according to the specifications and models of the tested cable;

[0013] S2, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates and sends a high-speed test signal through a high-speed signal generator. The clock period of the high-speed test signal is T, and the basic level is V;

[0014] S3, the receiving module receives the high-speed test signal through the high-speed signal receiver, samples the high-speed test signal through the sampling module, and sends the sampling result to the analysis module;

[0015] Specifically, the sampling method of the sampling module includes:

[0016] a. Let the time point at T / 2 in a single clock cycle T of the high-speed test signal be the reference point P, and the reference points in N consecutive clock cycles T be recorded as P n , respectively for point P n Sampling is performed to obtain point P n The corresponding sampling benchmark result A n , where 1≤n≤N, and N is an integer greater than or equal to 2;

[0017] b. At point P n Advance or delay time t at the time point m , recorded as sampling point P mn , respectively for point P mn The corresponding high-speed test signal applies a level bias v m , then sample and record the corresponding sampling result A mn, in a single clock cycle T, for point P n The number of times the time advance or delay and the level offset are applied is M, where 1≤m≤M, and M is an integer greater than or equal to 2, and 0<t m <T,0<|v m |<|V|;

[0018] S4, the analysis module calculates the bit error rate S of the high-speed test signal according to the sampling result, and generates a two-dimensional matrix for displaying the distribution position of the bit error rate S according to the sampling position corresponding to the calculated bit error rate S, and then sends the two-dimensional matrix to the human-computer interaction module;

[0019] Specifically, the method for calculating the bit error rate S is as follows: mn The corresponding sampling benchmark result A n Compare one by one, such as A mn =A n , then P mn The sampling of the point does not have a bit error, otherwise a bit error occurs, and the number of bit errors C is recorded m , then calculate the bit error rate S m = C m / N, where the number of bit errors is C m A mn is not equal to the corresponding A n The number of bits, that is, the number of bit errors;

[0020] The method of generating a two-dimensional matrix is ​​to overlap the waveforms of N clock cycles of the high-speed signal and the sampling points therein, and then place point P mn The point after overlap is set as Q m , click Q m The corresponding bit error rate S m , the two-dimensional matrix is ​​the point Q m The point matrix formed by the collection of

[0021] S5. The human-computer interaction module generates a data eye diagram according to the two-dimensional matrix, and compares the actual eye width x and the actual eye height y of the data eye diagram with the qualified eye width X and the qualified eye height Y. If x≥X and y≥Y, the human-computer interaction module determines that the high-speed signal test of the tested cable is qualified, otherwise it is determined to be unqualified.

[0022] The ideal waveform of a digital signal has no time delay when switching between "0" (low level) and "1" (high level). However, in actual situations, due to the inevitable errors in the production process of the cable, a climbing or falling process will occur when the jump from "0" to "1" or from "1" to "0". The shorter the time consumed by the jump, the better the signal transmission quality of the cable. The present invention sets the reference point P in N consecutive clock cycles of the signal. n, and sample the benchmark points to obtain the benchmark result A n At this time, if the reference point P in each clock cycle T n The origin (where the X axis represents time and the Y axis represents level) is delayed or advanced by time t m By performing M sampling, M sampling results can be obtained in each clock cycle T. When M is large enough, the time period of the signal jump can be covered and the sampling results of the jump process can be obtained. Then, by delaying or advancing the M groups in N clock cycles by time t m The same sampling point P mn The sampling results are compared with the benchmark results A n By comparison, the bit error rate S of each set of sampling results can be calculated respectively. After overlapping the waveforms of N clock cycles and the sampling points therein (the overlapping principle can refer to the principle of generating eye diagrams by oscilloscopes), the overlapping sampling positions (i.e. Q m ) on the X-axis, and rendering the sampling points according to the bit error rate S corresponding to each group of overlapping sampling points, the one-dimensional distribution of the bit error rate on the X-axis can be intuitively displayed. Since the bit error rate of the signal will gradually increase during the transition process, the one-dimensional distribution of the bit error rate can also intuitively reflect the time consumed by the transition process.

[0023] On the basis of the above, since applying a level bias to the signal will also increase the bit error rate of the signal, if for each sampling point P mn Apply a level bias v m , get the sampling result A mn Then, the same method as above is used to compare with the benchmark result A n Compare and calculate the corresponding bit error rate S m , and then overlap the waveforms of N clock cycles to get the bit error rate S m The two-dimensional matrix of the distribution position is calculated by the human-computer interaction module according to the bit error rate S m The two-dimensional matrix can be rendered into a data eye diagram by analyzing the eye width and eye height of the data eye diagram to quickly, accurately and intuitively test the quality of the cable. Not only is the test process convenient, it does not require a lot of cost to purchase equipment, and the test results are also highly accurate.

[0024] Further, in step S5, the method of generating a data eye diagram according to the two-dimensional matrix is: according to the bit error rate S m The value of the point Q in the two-dimensional matrix corresponding to it m Rendering is performed at the point where the m <10 -9 , then the corresponding point Q mThe point is rendered in the first color, otherwise it is rendered in other colors except the first color. Specifically, the standard value of the bit error rate S can be adjusted by the tester according to the actual specifications and test requirements of the cable, so as to improve the versatility and flexibility of the test method.

[0025] Furthermore, in step S5, the actual eye width x is the width of the first color area in the data eye diagram, and the actual eye height y is the height of the first color area in the data eye diagram.

[0026] Furthermore, the cable testing method also includes a low-speed signal testing method, which includes:

[0027] S1, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates a low-speed test signal according to the communication protocol through the low-speed signal generator and sends it to the receiving module;

[0028] S2, the receiving module receives the low-speed test signal through the low-speed signal receiver and identifies it. If the identification is normal, it sends a qualified signal to the human-computer interaction module, otherwise it sends a failed signal to the human-computer interaction module;

[0029] By judging whether the data carried by the low-speed signal can interact normally through the cable under test and completing the process specified by the corresponding protocol, it is simple and convenient to test whether the low-speed signal transmission of the cable under test is normal. By integrating the low-speed signal test into the entire cable testing method, the versatility of the cable testing method is improved, the cost of purchasing test equipment is further reduced, and the test efficiency is also improved.

[0030] Furthermore, the cable testing method also includes a power line testing method for the tested cable, the method comprising:

[0031] S1. Set the line loss qualified value s in the human-computer interaction module according to the specifications of the tested cable;

[0032] S2, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and provides a test level for the tested cable through the DC module;

[0033] S3, after the receiving module detects the test level through the AD module, it collects the current level value a through the AD module and sends the sampling result to the analysis module;

[0034] S4, the receiving module adds a load to the tested cable through the AD module, then collects the level value b after the load is added through the AD module, and sends the sampling result to the analysis module;

[0035] S5. The analysis module calculates the actual line loss s'=(ab) / a*100% according to the sampling result, and compares the actual line loss s' with the qualified line loss value s. If s'≤s, the analysis module sends a qualified signal to the human-computer interaction module, otherwise it sends a failed signal;

[0036] By integrating the power line test into the entire cable testing method, the versatility of the cable testing method is further improved, the cost is further reduced, and the efficiency is improved.

[0037] The present invention also provides a cable testing device based on FPGA, and the device adopts the above-mentioned cable testing method based on FPGA.

[0038] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:

[0039] The FPGA-based cable testing method and device of the present invention performs a time offset during sampling and applies a level bias to the signal to obtain a number of sampling points after time offset and level bias; then compares the sampling points with reference points to obtain a two-dimensional matrix of bit error rates corresponding to the sampling points; then renders the two-dimensional matrix into a data eye diagram, and evaluates the cable quality according to the eye width and eye height of the data eye diagram. This method not only allows for convenient and intuitive acquisition of test results, but also reduces the cost consumed to adapt to cables of different specifications, and also ensures the accuracy of the test results, and can be applied to cable production testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0041] Figure 1 is a logic control diagram of an embodiment of a test system in the present invention;

[0042] Figure 2 is a signal waveform diagram when no level bias is applied in the present invention;

[0043] Figure 3 yes Figure 2 The rendering corresponding to the waveform shown;

[0044] Figure 4 is a signal waveform diagram after level bias is applied in the present invention;

[0045] Figure 5 yes Figure 4 The data eye diagram corresponding to the waveform shown. DETAILED DESCRIPTION

[0046] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0048] Reference Figure 1-5 This embodiment provides a cable testing method based on FPGA. The method adopts a cable testing system based on FPGA. The testing system includes:

[0049] A generating module, used for generating a test signal, the generating module includes a high-speed signal generator, a low-speed signal generator, and a DC module for providing a level to the cable under test;

[0050] A receiving module, used for receiving a test signal, the receiving module comprising a high-speed signal receiver, a low-speed signal receiver, a sampling module for sampling the high-speed signal received by the high-speed signal receiver, and an AD module for adding a load to the level provided by the DC module and sampling;

[0051] An analysis module, connected to the receiving module and used to calculate and analyze the signals collected by the sampling module and the AD module;

[0052] A human-computer interaction module is connected to the generating module, the receiving module and the analyzing module and is used to configure the test parameters of the generating module, the receiving module and the analyzing module;

[0053] When testing the cable under test, two ends of the cable under test are connected to the output end of the generating module and the input end of the receiving module respectively.

[0054] The cable testing method includes a high-speed signal testing method, a low-speed signal testing method and a power line testing method. By integrating high-speed signal, low-speed signal and power line testing into a single testing device, the versatility of the cable testing method and equipment is improved, the testing cost is further reduced, and the testing efficiency is improved.

[0055] First, the high-speed signal testing method includes:

[0056] S1. Preset the qualified eye width X and qualified eye height Y of the high-speed signal test of the tested cable in the human-computer interaction module according to the specifications of the tested cable. Specifically, the values ​​of the qualified eye width X and the qualified eye height Y are set by the tester according to the specifications of the tested cable;

[0057] S2, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates and sends a high-speed test signal through a high-speed signal generator. The clock period of the high-speed test signal is T, and the basic level is V;

[0058] S3, the receiving module receives the high-speed test signal through the high-speed signal receiver, samples the high-speed test signal through the sampling module, and sends the sampling result to the analysis module;

[0059] Specifically, the sampling method of the sampling module includes:

[0060] a. Let the time point at T / 2 in a single clock cycle T of the high-speed test signal be the reference point P, and the reference points in N consecutive clock cycles T are recorded as P n (1≤n≤N, n is an integer, N is an integer greater than or equal to 2), that is, record points P1, P2, .. N , respectively for point P n Sampling is performed to obtain point P n The corresponding sampling benchmark result A n , that is, for points P1, P2, ···P N Sampling is performed to obtain the sampling benchmark results A1, A2, .. . . A corresponding to each point N ;

[0061] b. At point P n Advance or delay time t at the time point m , recorded as sampling point P mn , respectively for point P mn The corresponding high-speed test signal applies a level bias v m , then sample and record the corresponding sampling result A mn , in a single clock cycle T, for point P n The number of times the time advance or delay and level offset are applied is M (1≤m≤M, m is an integer, M is an integer greater than or equal to 2, and 0<t m <T,0<|v m |<|V|), that is:

[0062] First, at points P1, P2, ... N The time point at which the sampling point is located is advanced or delayed by time t1 and recorded as sampling point P 11 , P 12 、···P 1N , respectively for point P 11 , P 12 、···P 1N The corresponding high-speed test signal is applied with a level bias v1, then sampled, and the corresponding sampling result A is recorded11 , A 12 、···A 1N ; Then repeat the above steps at points P1, P2, ···P N Advance or delay time t2 at the time point, record the sampling point P 21 , P 22 、···P 2N , and then point P 11 , P 12 、···P 1N The corresponding high-speed test signal is sampled after applying level bias v2 to obtain the sampling result A 21 , A 22 、···A 2N ; ···; until the above steps are repeated to advance or delay time t M , record the sampling point P M1 , P M2 、···P MN , and then P M1 , P M2 、···P MN The corresponding high-speed test signal applies a level bias v M After sampling, obtain sampling result A M1 , A M2 、···A MN ;

[0063] S4, the analysis module calculates the bit error rate S of the high-speed test signal according to the sampling result, and generates a two-dimensional matrix for displaying the distribution position of the bit error rate S according to the sampling position corresponding to the calculated bit error rate S, and then sends the two-dimensional matrix to the human-computer interaction module;

[0064] Specifically, the method for calculating the bit error rate S is as follows: mn The corresponding sampling benchmark result A n Compare one by one, such as A mn =A n , then P mn The sampling of the point does not have a bit error, otherwise a bit error occurs, and the number of bit errors C is recorded m , then calculate the bit error rate S m = C m / N, that is:

[0065] The sampling result A 11 , A 12 、···A 1N The corresponding sampling benchmark results A1, A2, ... A N Compare one by one, such as A 11 =A1, then P 11 If the sampling of point A does not have bit error, otherwise it will be recorded as bit error;12 =A2, then P 12 The sampling of the point does not have a bit error, otherwise it is recorded as a bit error; ···; For example, A 1N =A N , then P 1N The sampling of the point does not have a bit error, otherwise it is recorded as a bit error; then the number of bit errors C1 is counted, and A is calculated 1n The corresponding bit error rate S1 = C1 / N;

[0066] Then the sampling result A 21 , A 22 、···A 2N The corresponding sampling benchmark results A1, A2, ... A N Compare one by one, such as A 21 =A1, then P 21 If the sampling of point A does not have bit error, otherwise it will be recorded as bit error; 22 =A2, then P 22 The sampling of point does not have bit error, otherwise it is recorded as bit error; 2N =A N , then P 2N The sampling of the point does not have a bit error, otherwise it is recorded as a bit error; then the number of bit errors C2 is counted, and A is calculated 2n The corresponding bit error rate S2 = C2 / N;

[0067] ···

[0068] Until the sampling result A M1 , A M2 、···A MN The corresponding sampling benchmark results A1, A2, ... A N Compare one by one, such as A M1 =A1, then P M1 If the sampling of point A does not have bit error, otherwise it will be recorded as bit error; M2 =A2, then P M2 The sampling of point does not have bit error, otherwise it is recorded as bit error; MN =A N , then P MN The sampling of the point does not have a bit error, otherwise it is recorded as a bit error; then the number of bit errors C is counted M , and calculate A Mn The corresponding bit error rate S M = C M / N;

[0069] Specifically, the method for generating a two-dimensional matrix is: overlap the waveforms of N clock cycles of the high-speed signal and the sampling points therein, and then replace the point P mn The point after overlap is set as Qm , click Q m The corresponding bit error rate S m , the two-dimensional matrix is ​​the point Q m The point matrix formed by the collection of is:

[0070] Overlap the waveforms of N clock cycles of the high-speed signal and the sampling points therein, and then 11 , P 12 、···P 1N The point after overlap is set as Q1, and point P 21 , P 22 、···P 2N The point after overlap is set as Q2,..., and point P M1 , P M2 、···P MN The point after overlap is set as Q M , where Q1 corresponds to bit error rate S1, Q2 corresponds to bit error rate S2, ···Q M Corresponding bit error rate S M , the two-dimensional matrix is ​​the points Q1, Q2, ···Q M The point matrix formed by the collection of

[0071] S5. The human-computer interaction module generates a data eye diagram according to the two-dimensional matrix, and compares the actual eye width x and the actual eye height y of the data eye diagram with the qualified eye width X and the qualified eye height Y. If x≥X and y≥Y, the human-computer interaction module determines that the high-speed signal test of the tested cable is qualified, otherwise it is determined to be unqualified.

[0072] The ideal waveform of a digital signal has no time delay when switching between "0" (low level) and "1" (high level). However, in actual situations, due to the inevitable errors in the production process of the cable, a climbing or falling process will occur when the jump from "0" to "1" or from "1" to "0". The shorter the time consumed by the jump, the better the signal transmission quality of the cable. The present invention sets the reference point P in N consecutive clock cycles of the signal. n , and sample the benchmark points to obtain the benchmark result A n At this time, if the reference point P in each clock cycle T n is the origin (where the X axis represents time and the Y axis represents level, such as Figure 2 The waveform is shown in the figure) by delaying or advancing the time t m By performing M sampling, M sampling results can be obtained in each clock cycle T. When M is large enough, the time period of the signal jump can be covered and the sampling results of the jump process can be obtained. Then, by delaying or advancing the M groups in N clock cycles by time t m The same sampling point P mnThe sampling results are compared with the benchmark results A n By comparison, the bit error rate S of each set of sampling results can be calculated respectively. After overlapping the waveforms of N clock cycles and the sampling points therein (the overlapping principle can refer to the principle of generating eye diagrams by oscilloscopes), the overlapping sampling positions (i.e. Q m ) on the X-axis, and by rendering the sampling points according to the bit error rate S corresponding to each group of overlapping sampling points, the data distribution diagram of the bit error rate on the X-axis can be intuitively displayed (such as Figure 3 As shown in the figure, since the bit error rate of the signal will gradually increase during the transition process, the transition time can be determined by the size of the color area represented by the qualified bit error rate value (in this embodiment, the corresponding point is rendered white if the bit error rate is qualified), thereby achieving the purpose of judging whether the cable is good or bad.

[0073] On the basis of the above, since applying a level bias to the signal will also increase the bit error rate of the signal, if for each sampling point P mn Apply a level bias v m (like Figure 4 As shown in the waveform diagram), obtain the sampling result A mn Then, the same method as above is used to compare with the benchmark result A n Compare and calculate the corresponding bit error rate S m , and then overlap the waveforms of N clock cycles to get the bit error rate S m The two-dimensional matrix of the distribution position is calculated by the human-computer interaction module according to the bit error rate S m The value of 2D matrix is ​​rendered into a data eye diagram (such as Figure 5 As shown in the figure, the quality of the cable can be quickly, accurately and intuitively tested by analyzing the eye width and eye height of the data eye diagram. Not only is the test process convenient, it does not require a lot of cost to purchase equipment, and the test results are also highly accurate.

[0074] In a more preferred embodiment, in step S5 of the high-speed signal testing method, the method of generating a data eye diagram according to the two-dimensional matrix is: according to the bit error rate S m The value of the point Q in the two-dimensional matrix corresponding to it m Rendering is performed at the point where the m <10 -9 , then the corresponding point Q m The point where the bit error rate is located is rendered as the first color, otherwise it is rendered as other colors except the first color. Specifically, the standard value of the bit error rate S can be adjusted by the tester according to the actual specifications and test requirements of the cable, thereby improving the versatility and flexibility of the test method. In this embodiment, the first color is white, and other colors are rendered with the corresponding S m The value of 10-9 As the difference between them increases, it gradually changes from white to black.

[0075] In a more preferred embodiment, in step S5 of the high-speed signal testing method, the actual eye width x is the width of the first color area in the data eye diagram, and the actual eye height y is the height of the first color area in the data eye diagram. In this embodiment, the actual eye width x and the actual eye height y are the width and height of the white area.

[0076] In the above-mentioned high-speed signal test method, the values ​​of N and M can be set according to actual conditions, but in theory, the larger the values ​​of N and M, the more accurate the final test result.

[0077] Secondly, the low-speed signal test methods include:

[0078] S1, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates a low-speed test signal according to the communication protocol through the low-speed signal generator and sends it to the receiving module;

[0079] S2, the receiving module receives the low-speed test signal through the low-speed signal receiver and identifies it. If the identification is normal, it sends a qualified signal to the human-computer interaction module, otherwise it sends a failed signal to the human-computer interaction module;

[0080] By judging whether the data carried by the low-speed signal can interact normally through the cable under test and completing the process specified by the corresponding protocol, it is simple and convenient to test whether the low-speed signal transmission of the cable under test is normal.

[0081] In addition, the power line test methods include:

[0082] S1. Set the line loss qualified value s in the human-computer interaction module according to the specifications of the tested cable;

[0083] S2, the human-machine interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and provides a test level for the tested cable through the DC module;

[0084] S3, after the receiving module detects the test level through the AD module, it collects the current level value a through the AD module and sends the sampling result to the analysis module;

[0085] S4, the receiving module adds a load to the tested cable through the AD module, then collects the level value b after the load is added through the AD module, and sends the sampling result to the analysis module;

[0086] S5. The analysis module calculates the actual line loss s'= (ab) / a*100% according to the sampling results, and compares the actual line loss s' with the qualified line loss value s. If s'≤s, the analysis module sends a qualified signal to the human-computer interaction module, otherwise it sends an unqualified signal.

[0087] On the other hand, the present invention further provides a cable testing device based on FPGA, which adopts the above-mentioned cable testing method based on FPGA.

[0088] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:

[0089] The FPGA-based cable testing method and device of the present invention performs a time offset during sampling and applies a level bias to the signal to obtain a number of sampling points after time offset and level bias; then compares the sampling points with reference points to obtain a two-dimensional matrix of bit error rates corresponding to the sampling points; then renders the two-dimensional matrix into a data eye diagram, and evaluates the cable quality according to the eye width and eye height of the data eye diagram, which not only can conveniently and intuitively obtain test results, but also reduces the cost consumed to adapt to cables of different specifications, and also ensures the accuracy of the test results.

[0090] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the contents of the present invention and implement them accordingly. They cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A cable testing method based on FPGA, characterized in that: A cable test system based on FPGA is used, and the test system includes: A generating module, used for generating a test signal, the generating module comprising a high-speed signal generator, a low-speed signal generator, and a DC module for providing a level to the cable under test; A receiving module, used to receive the test signal, the receiving module comprising a high-speed signal receiver, a low-speed signal receiver, a sampling module for sampling the high-speed signal received by the high-speed signal receiver, and an AD module for adding a load to the level provided by the DC module and sampling; An analysis module, connected to the receiving module and used to calculate and analyze the signals collected by the sampling module and the AD module; A human-computer interaction module, connected to the generating module, the receiving module and the analyzing module and used to configure the test parameters of the generating module, the receiving module and the analyzing module; When testing the cable under test, two ends of the cable under test are connected to the output end of the generating module and the input end of the receiving module respectively; The cable testing method includes a high-speed signal testing method, and the high-speed signal testing method includes: S1. Preset the qualified eye width X and qualified eye height Y of the high-speed signal test of the tested cable in the human-computer interaction module according to the specification model of the tested cable; S2, the human-computer interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates and sends a high-speed test signal through the high-speed signal generator, wherein the clock period of the high-speed test signal is T and the basic level is V; S3, the receiving module receives the high-speed test signal through the high-speed signal receiver, samples the high-speed test signal through the sampling module, and sends the sampling result to the analysis module; the sampling method of the sampling module includes: a. Let the time point at T / 2 in a single clock cycle T of the high-speed test signal be the reference point P, and the reference points in N consecutive clock cycles T be recorded as P n , respectively for point P n Sampling is performed to obtain point P n The corresponding sampling benchmark result A n , where 1≤n≤N, and N is an integer greater than or equal to 2; b. At point P n Advance or delay time t at the time point m , recorded as sampling point P mn , respectively for point P mn The corresponding high-speed test signal applies a level bias v m , then sample and record the corresponding sampling result A mn , in a single clock cycle T, for point P n The number of times the time advance or delay and the level offset are applied is M, where 1≤m≤M, and M is an integer greater than or equal to 2, and 0<t m <T,0<|v m |<|V|; S4, the analysis module calculates the bit error rate S of the high-speed test signal according to the sampling result, and generates a two-dimensional matrix for displaying the distribution position of the bit error rate S according to the sampling position corresponding to the calculated bit error rate S, and then sends the two-dimensional matrix to the human-computer interaction module; The method for calculating the bit error rate S is: mn The corresponding sampling benchmark result A n Compare one by one, such as A mn =A n , then P mn The sampling of the point does not have a bit error, otherwise a bit error occurs, and the number of bit errors C is recorded m , then calculate the bit error rate S m =C m / N; The method for generating the two-dimensional matrix is: overlap the waveforms of N clock cycles of the high-speed signal and the sampling points therein, and then place the point P mn The point after overlap is set as Q m , click Q m The corresponding bit error rate S m , the two-dimensional matrix is ​​the point Q m The point matrix formed by the collection of S5. The human-computer interaction module generates a data eye diagram according to the two-dimensional matrix, and compares the actual eye width x and the actual eye height y of the data eye diagram with the qualified eye width X and the qualified eye height Y. If x≥X and y≥Y, the human-computer interaction module determines that the high-speed signal test of the tested cable is qualified, otherwise it is determined to be unqualified.

2. The FPGA-based cable testing method according to claim 1, characterized in that: In step S5, the method for generating the data eye diagram according to the two-dimensional matrix is: according to the bit error rate S m The value of the point Q in the two-dimensional matrix corresponding to it m Rendering is performed at the point where the m <10 -9 , then the corresponding point Q m The point is rendered in the first color, otherwise it is rendered in other colors except the first color.

3. The FPGA-based cable testing method according to claim 2, characterized in that: In step S5, the actual eye width x is the width of the first color area in the data eye diagram, and the actual eye height y is the height of the first color area in the data eye diagram.

4. The FPGA-based cable testing method according to claim 1, characterized in that: The cable testing method further includes a low-speed signal testing method, which includes: S1, the human-computer interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and generates a low-speed test signal according to the communication protocol through the low-speed signal generator and sends it to the receiving module; S2. The receiving module receives the low-speed test signal through the low-speed signal receiver and identifies it. If the identification is normal, a qualified signal is sent to the human-computer interaction module; otherwise, a failed signal is sent to the human-computer interaction module.

5. The FPGA-based cable testing method according to claim 1, characterized in that: The cable testing method also includes a method for testing a power line of a tested cable, and the method for testing a power line of a tested cable includes: S1. Setting a line loss qualified value s in the human-computer interaction module according to the specification of the tested cable; S2, the human-computer interaction module controls the generating module to establish a connection with the receiving module according to the interface type and protocol of the tested cable, and provides a test level for the tested cable through the DC module; S3, after the receiving module monitors the test level through the AD module, the receiving module collects the current level value a through the AD module and sends the sampling result to the analysis module; S4, the receiving module adds a load to the tested cable through the AD module, then collects the level value b after the load is added through the AD module, and sends the sampling result to the analysis module; S5. The analysis module calculates the actual line loss s'=(ab) / a*100% according to the sampling result, and compares the actual line loss s' with the qualified line loss value s. If s'≤s, the analysis module sends a qualified signal to the human-computer interaction module, otherwise it sends an unqualified signal.

6. A cable testing device based on FPGA, characterized in that: A cable testing method based on FPGA as described in any one of claims 1 to 5 is adopted.