CN115695228B - LVDS function test method, device, terminal equipment and storage medium - Google Patents

LVDS function test method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115695228B
CN115695228B CN202211274592.7A CN202211274592A CN115695228B CN 115695228 B CN115695228 B CN 115695228B CN 202211274592 A CN202211274592 A CN 202211274592A CN 115695228 B CN115695228 B CN 115695228B
Authority
CN
China
Prior art keywords
test
lvds
instruction
local program
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211274592.7A
Other languages
Chinese (zh)
Other versions
CN115695228A (en
Inventor
姚鑫
尹玉涛
胡金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hangsheng Electronic Co Ltd
Original Assignee
Shenzhen Hangsheng Electronic Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hangsheng Electronic Co Ltd filed Critical Shenzhen Hangsheng Electronic Co Ltd
Priority to CN202211274592.7A priority Critical patent/CN115695228B/en
Publication of CN115695228A publication Critical patent/CN115695228A/en
Application granted granted Critical
Publication of CN115695228B publication Critical patent/CN115695228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses an LVDS function test method, a device, terminal equipment and a storage medium, and relates to the field of communication, wherein the LVDS function test method comprises the following steps: a first set of interface service end and a first set of interface client end are established on a local program; establishing a second set of interface service end and a second set of interface client end on the test application; establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client; and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result. The invention not only can test LVDS functions in an android environment, but also can flexibly expand other test instructions according to the needs, and provides a path for realizing other functional requirements. In addition, the testing method is simple and convenient to operate, and the professional requirements on testing personnel are greatly reduced.

Description

LVDS function test method, device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for testing LVDS functions, a terminal device, and a storage medium.
Background
With the continuous advancement of electronic design technology, the interconnection of high-rate signals and the application of broadband channels are increasing, the required data volume to be transmitted is larger and the demand for high transmission rate is also larger and larger. LVDS is becoming a preferred interface standard for broadband high-speed system design due to its inherent low voltage, low power consumption, and high-speed transmission benefits. Currently, LVDS (Low-Voltage DIFFERENTIAL SIGNALING) technology is increasingly used in the field of communications, and in particular, LVDS is playing an irreplaceable role in base stations, large switches, and other high-speed data transmission systems. With the application of LVDS technology, it is necessary to test the function of LVDS in order to ensure the normal transmission of signals.
At present, the LVDS function test technology needs to use professional software and instruments to perform the test, the device to be tested is connected through a test box, and after 2 different test boxes are connected to a computer, special software is required to be developed to perform the test. That is, the prior art performs the LVDS function, which requires a test box, a flying lead, special software and a professional tester, and the test technique is complex and depends on many conditions, which results in high test cost. And the technology cannot be tested in an android environment only.
Therefore, the current difficulty in LVDS functional testing is a problem to be solved.
Disclosure of Invention
The invention mainly aims to provide an LVDS function test method, an LVDS function test device, terminal equipment and a storage medium, and aims to solve the technical problem of difficult LVDS function test.
In order to achieve the above object, the present invention provides an LVDS function test method, including:
a first set of interface service end and a first set of interface client end are established on a local program;
Establishing a second set of interface service end and a second set of interface client end on the test application;
Establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client;
and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result.
Optionally, the step of establishing a communication environment between the local program and the test application based on the first socket server and the second socket client, the first socket client and the second socket server includes:
establishing a first long connection from the test application to the local program based on the first socket server and the second socket client;
Establishing a second long connection from the local program to the test application based on the first socket client and the second socket server;
And establishing a bidirectional communication environment between the local program and the test application according to the first long connection and the second long connection.
Optionally, the step of testing the low voltage differential signaling LVDS function by running a test instruction in the communication environment to obtain a corresponding test result includes:
In the communication environment, based on a preset test instruction set and the first long connection, sending a test instruction to the local program through the test application;
Analyzing the test instruction through the local program and executing the test instruction to obtain a corresponding test result;
And based on the second long connection, sending the test result back to the test application as a corresponding result of LVDS function test.
Optionally, before the step of establishing the second set of interface service end and the second set of interface client end on the test application, the method further includes:
starting a test application;
And reading a pre-configured file through the test application to obtain the preset test instruction set.
Optionally, the step of analyzing the test instruction by the local program and executing the test instruction to obtain a corresponding test result includes:
analyzing the test instruction through the local program to obtain an LVDS instruction;
and executing the LVDS instruction to obtain the corresponding test result.
Optionally, the step of executing the LVDS instruction to obtain the corresponding test result includes:
and inserting the LVDS instruction into a gap of an LVDS instruction execution table and executing the LVDS instruction to obtain a corresponding test result.
Optionally, the step of establishing the first set of interface service end and the first set of interface client end on the local program includes:
starting a terminal device where the local program is located;
Socket resources are added to the local program of the terminal equipment;
starting the local program;
and establishing the first set of interface server and the first set of interface client on the local program according to the set of interface resources.
In addition, to achieve the above object, the present invention also provides an LVDS function test apparatus, including:
the first establishing module is used for establishing a first set of interface service end and a first set of interface client end on a local program;
The second establishing module is used for establishing a second set of interface service end and a second set of interface client end on the test application;
the communication module is used for establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client;
and the test module is used for testing the low-voltage differential signal LVDS function by running a test instruction in the communication environment to obtain a corresponding test result.
In addition, to achieve the above object, the present invention also provides a terminal device, which includes a memory, a processor, and an LVDS function test program stored on the memory and executable on the processor, wherein the LVDS function test program when executed by the processor implements the steps of the LVDS function test method as described above.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon an LVDS function test program which, when executed by a processor, implements the steps of the LVDS function test method as described above.
The embodiment of the invention provides an LVDS function test method, an LVDS function test device, a terminal device and a storage medium, wherein a first set of interface service end and a first set of interface client end are established on a local program; establishing a second set of interface service end and a second set of interface client end on the test application; establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client; and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result. Based on the invention, after a communication environment is established between the local program and the test program through the socket, the test application sends the test instruction to the local program, the local program analyzes the test instruction and executes the test instruction to obtain a corresponding test result, and then the local program sends the test result back to the test application, so that the LVDS function can be tested in the android environment, other test instructions can be flexibly expanded according to the needs, and a path is provided for realizing other functional needs. In addition, the testing method is simple and convenient to operate, and the professional requirements on testing personnel are greatly reduced.
Drawings
FIG. 1 is a schematic diagram of a functional module of a terminal device to which an LVDS functional test device of the present invention belongs;
Fig. 2 is a flowchart of a first exemplary embodiment of an LVDS functional testing method according to the present invention;
FIG. 3 is a flowchart of a second exemplary embodiment of an LVDS function test method according to the present invention;
FIG. 4 is a flowchart of a third exemplary embodiment of an LVDS function test method according to the present invention;
FIG. 5 is a flowchart of a fourth exemplary embodiment of an LVDS function test method according to the present invention;
FIG. 6 is a flowchart of a LVDS function test method according to a fifth exemplary embodiment of the present invention;
FIG. 7 is a flow chart of packet interactions according to an embodiment of the present invention;
FIG. 8 is a LVDS instruction execution table according to an embodiment of the present invention;
FIG. 9 is a flowchart of a sixth exemplary embodiment of an LVDS function test method according to the present invention;
Fig. 10 is an overall flowchart of an embodiment of an LVDS functional testing method according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present invention are: a first set of interface service end and a first set of interface client end are established on a local program; establishing a second set of interface service end and a second set of interface client end on the test application; establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client; and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result. Based on the invention, after a communication environment is established between the local program and the test program through the socket, the test application sends the test instruction to the local program, the local program analyzes the test instruction and executes the test instruction to obtain a corresponding test result, and then the local program sends the test result back to the test application, so that the LVDS function can be tested in the android environment, other test instructions can be flexibly expanded according to the needs, and a path is provided for realizing other functional needs. In addition, the testing method is simple and convenient to operate, and the professional requirements on testing personnel are greatly reduced.
Technical terms related to the embodiment of the invention:
LVDS (Low-Voltage DIFFERENTIAL SIGNALING, low-Voltage differential signal): LVDS is a differential signal technology with low power consumption, low bit error rate, low crosstalk and low radiation, the transmission technology can reach more than 155Mbps, the core of the LVDS technology is to adopt extremely low voltage swing high-speed differential transmission data, point-to-point or point-to-multipoint connection can be realized, and the transmission medium can be copper PCB (printed circuit board) connection or balanced cable. LVDS is currently the preferred signal form for high-speed I/O interfaces, with the following advantages: ① High speed transmission capability. ② Low power consumption characteristics. ③ The supply voltage is low. ④ Stronger noise immunity. ⑤ Electromagnetic interference is effectively suppressed. ⑥ The time sequence positioning is accurate.
Socket interface (Socket): a socket, also called a socket, is an abstraction of an endpoint that performs bi-directional communication between application processes on different virtual machines or different hosts in a network. One socket is the end of the network where processes communicate, providing a mechanism for application layer processes to exchange data using network protocols. In terms of the position, the sleeve interface is connected with the application process in an upper mode, and the lower network protocol stack is an interface for the application program to communicate through the network protocol and is an interface for the application program to interact with the network protocol stack.
Serializer/deserializer: also called as a deserializer, is an interface circuit in high-speed data communication. Serializers/deserializers have become very common in the field of high speed data communications, and they play an important role not only in fiber optic data propagation, but also in short-range chip interconnects just as twisted pair wires are used in networks. The active synchronous interface structure, the front-end clock structure, the differential data packet transmission structure and the like are mainly structured.
Thread (Thread): a thread is the smallest unit that an operating system can perform operational scheduling. It is included in the process and is the actual unit of operation in the process. One thread refers to a single sequential control flow in a process, and multiple threads can be concurrent in a process, each thread executing different tasks in parallel. In Unix System V and SunOS, lightweight processes are also called lightweight processes, but lightweight processes are more often referred to as kernel threads, and user threads are called threads.
CRC (Cyclic Redundancy Check ): the fast algorithm is used to generate short fixed digit check code based on network data packet, computer file and other data, and is mainly used to detect or check the possible error after data transmission or storage. CRC uses the principle of division and remainder to realize the function of error detection, and has the advantages of clear principle, simple realization and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a functional module of a terminal device to which the LVDS functional testing apparatus of the present invention belongs. The LVDS function testing device is a device which is based on terminal equipment and tests LVDS functions in an android environment, and can flexibly expand other testing instructions according to requirements, so that the device which is simple and convenient in operation method and strong in function expansibility is achieved, and the device can be borne on the terminal equipment in a hardware or software mode.
In this embodiment, the terminal device to which the LVDS function test apparatus belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and an LVDS function test program, where the LVDS function test device may establish a first set of interface service terminals and a first set of interface client terminals on a local program; establishing a second set of interface service end and a second set of interface client end on the test application; establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client; by running a test instruction in the communication environment, testing the low-voltage differential signaling (LVDS) function, obtaining corresponding test results and other information and storing the corresponding test results in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein, the LVDS function test procedure in the memory 130, when executed by the processor, implements the following steps:
a first set of interface service end and a first set of interface client end are established on a local program;
Establishing a second set of interface service end and a second set of interface client end on the test application;
Establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client;
and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
establishing a first long connection from the test application to the local program based on the first socket server and the second socket client;
Establishing a second long connection from the local program to the test application based on the first socket client and the second socket server;
And establishing a bidirectional communication environment between the local program and the test application according to the first long connection and the second long connection.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
In the communication environment, based on a preset test instruction set and the first long connection, sending a test instruction to the local program through the test application;
Analyzing the test instruction through the local program and executing the test instruction to obtain a corresponding test result;
And based on the second long connection, sending the test result back to the test application as a corresponding result of LVDS function test.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
starting a test application;
And reading a pre-configured file through the test application to obtain the preset test instruction set.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
analyzing the test instruction through the local program to obtain an LVDS instruction;
and executing the LVDS instruction to obtain the corresponding test result.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
and inserting the LVDS instruction into a gap of an LVDS instruction execution table and executing the LVDS instruction to obtain a corresponding test result.
Further, the LVDS functional test program in the memory 130, when executed by the processor, further performs the steps of:
starting a terminal device where the local program is located;
Socket resources are added to the local program of the terminal equipment;
starting the local program;
and establishing the first set of interface server and the first set of interface client on the local program according to the set of interface resources.
The method embodiment of the invention is proposed based on the above-mentioned terminal equipment architecture but not limited to the above-mentioned architecture.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first exemplary embodiment of an LVDS functional testing method according to the present invention. The LVDS function test method comprises the following steps:
Step S110, a first set of interface service end and a first set of interface client end are established on a local program;
Specifically, first, the local program is mainly used for analyzing and executing the instruction sent by the test application, and then returning the result obtained by execution to the test application. Second, the socket is used to describe IP addresses and ports, which are handles of a communication chain, and can be used to implement communications between different virtual machines or different computers. A host on a network typically runs multiple service software while providing several services. Each service opens a socket and binds to a port, with different ports corresponding to different services. The first set of interface server is mainly used for waiting for connection of the test application, and the first set of interface client is used for attempting to connect the test application. Thus, in order to achieve communication between the native program and the test application, a first set of interface servers and a first set of interface clients need to be established on the native program.
Step S120, a second socket server and a second socket client are established on the test application;
Specifically, first, the test application is mainly used to connect the native program, i.e., send or receive instructions to the native program. Next, similar to step S110, in order to implement the connection with the local program, a second socket server and a second socket client need to be established on the test application. For example, the second socket client is used for establishing communication with the first socket server on the local program; the second set of interface service end is used for establishing communication with the first set of interface client end.
Step S130, based on the first set of interface service end and the second set of interface client end, the first set of interface client end and the second set of interface service end establish a communication environment between the local program and the test application;
Specifically, the communication environment is established between the local program and the test application, two programs on the network realize data exchange by establishing communication, the data exchange between the two programs needs an interface, namely a socket, the socket is an intermediary of communication between different programs, and the connection between the server and the client is realized through the socket, so that the communication end only needs to understand the socket through the socket without knowing more. By the method, the LVDS function can be tested conveniently, and the requirements on professional quality of testers can be reduced. For example, based on the first set of interface server and the second set of interface client, communication is established between the server of the local program and the client of the test application; based on the first socket client and the second socket server, the client of the local program establishes communication with the server of the test application.
Step S140, testing the low voltage differential signaling LVDS function by running the test instruction in the communication environment, to obtain a corresponding test result.
Specifically, the purpose of running the test instruction is to test the LVDS function, and the specific content of the LVDS function to be tested can be adjusted according to the requirements of the customer. For example, in the communication environment, a test instruction is sent from a test application to a local program, the local program receives the test instruction sent by the test application, analyzes the instruction and then executes the instruction to form a test result, and returns the test result to the test application, so that the LVDS function is tested through the process to obtain a corresponding test result.
According to the scheme, the first set of interface service end and the first set of interface client end are established on the local program; establishing a second set of interface service end and a second set of interface client end on the test application; establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client; and testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment to obtain a corresponding test result. Based on the scheme, the communication environment is established between the local program and the test application by establishing the socket on the local program and the test application, the socket serves as a medium in the communication process, communication between different services can be realized without knowing more data among the services, the LVDS function is tested in the communication environment by running the test instruction, a corresponding test result is obtained, the LVDS function test process is simple to operate, the dependency condition is reduced, the test difficulty is obviously reduced, the professional quality requirement of a tester is greatly reduced, the testing can be performed only in the android environment, and the application range is wider.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a second exemplary embodiment of the LVDS function test method of the present invention. Based on step S130 in the embodiment shown in fig. 2, the step of establishing a communication environment between the local program and the test application based on the first socket server and the second socket client, the first socket client and the second socket server includes:
Step S1301, based on the first socket server and the second socket client, establishing a first long connection from the test application to the local program;
specifically, a long connection means that a plurality of data packets can be continuously transmitted over one connection, and if no data packet is transmitted during connection maintenance, both sides are required to transmit link detection packets, which are often used for point-to-point communication, and the number of connections cannot be too large. Based on the first socket server and the second socket client, a first long connection from the test application to the local program is established, which can remain unchanged while the first socket server waits for connection with the second socket client.
Step S1302, establishing a second long connection from the local program to the test application based on the first socket client and the second socket server;
specifically, similar to step S1301, based on the first socket client and the second socket server, a second long connection from the local program to the test application is established, and can be kept unchanged while the second socket server waits for connection with the first socket client.
Step S1303, establishing a bidirectional communication environment between the local program and the test application according to the first long connection and the second long connection.
In particular, at least one pair of sockets is required to establish a network communication connection, and the first long connection and the second long connection share two pairs of sockets, and a bidirectional communication environment is established between a local program and an application program. For example, in the communication environment, the client sends a data request, the server receives the request and processes the request, then sends response data to the client, the client reads the data, finally closes the connection, and the one-time interaction is finished; or in this communication environment, sending a data request to the local program through the test application; analyzing and executing the request through the local program to obtain a corresponding processing result; and based on the second long connection, sending the processing result back to the test application, and ending one interaction.
The long connection is established based on the socket, and the newly added socket connection is mainly divided into two aspects, namely, the long connection from a local program to a test application is established when the system is started, a client is established after the test application is started, and the server is connected; and establishing a client when the system is started from a long connection from the test application to the local program, attempting connection according to a period of 3 seconds/time, and establishing a server after the test application is started.
According to the scheme, the first long connection from the test application to the local program is established specifically based on the first set of interface service end and the second set of interface client end; establishing a second long connection from the local program to the test application based on the first socket client and the second socket server; and establishing a bidirectional communication environment between the local program and the test application according to the first long connection and the second long connection. Based on the scheme, two long connections are established, a two-way communication environment is established between the local program and the test application, and conditions are created for running test instructions and testing LVDS functions between the subsequent local program and the test application.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a third exemplary embodiment of the LVDS function test method according to the present invention. Based on step S140 in the embodiment shown in fig. 2, the step of testing the low voltage differential signaling LVDS function in the communication environment by running a test instruction, and obtaining a corresponding test result includes:
step S1401, in the communication environment, based on a predetermined test instruction set and the first long connection, issuing a test instruction to the local program through the test application;
Specifically, in the communication environment, the predetermined test instruction set mainly determines the specific content of the LVDS function to be tested, and the predetermined test instruction set is updated after each start of the test application. And the test instructions in the preset test instruction set are sent out to the local program through the test application by the first long connection.
Step S1402, analyzing the test instruction by the local program and executing the test instruction to obtain a corresponding test result;
Specifically, after receiving a test instruction sent by a test application based on the first long connection, the local program analyzes the test instruction through the local program to obtain an LVDS instruction; and executing the LVDS instruction to obtain the corresponding test result.
Step S1403, based on the second long connection, sends the test result back to the test application as a corresponding result of LVDS functional test.
Specifically, based on step S1402, after the received test instruction is parsed and run by the local program, a corresponding test result is obtained, the test result is transmitted from the client of the local program to the server of the test application through the second long connection, that is, the test result is sent back to the test application, one-time interaction between the local program and the test application is completed, the test result received by the test application is a corresponding result of the LVDS function test, the result can be output as required, the result does not have to be displayed on an interface, the sending instruction can also be implemented by broadcasting, and the result can be displayed or saved in a log.
According to the scheme, specifically, in the communication environment, based on a preset test instruction set and the first long connection, a test instruction is sent to the local program through the test application; analyzing the test instruction through the local program and executing the test instruction to obtain a corresponding test result; and based on the second long connection, sending the test result back to the test application as a corresponding result of LVDS function test. Based on the scheme, the specific content of the LVDS function to be tested is determined through a preset test instruction set, a test instruction is sent to a local program through a test application, the local program analyzes the received test instruction into an LVDS instruction, a corresponding test result is obtained through executing the LVDS instruction, the test result is returned to the test application through a second long connection, one-time interaction between the test application and the local program is completed, and a result of testing the LVDS function is obtained.
Further, referring to fig. 5, fig. 5 is a flowchart illustrating a fourth exemplary embodiment of the LVDS function test method of the present invention. Based on step S120 in the embodiment shown in fig. 2, before the step of establishing the first socket server and the first socket client on the local program, the method further includes:
step S1201, starting a test application;
Specifically, the test application is mainly used for sending a test instruction to the local program and receiving a processing result of the test instruction by the local program, and completing interaction with the local program, so that the test of the LVDS function is realized. In addition, the test application can define the instruction content to be sent by the test in a configuration file mode. When testing the LVDS function, the test application needs to be started first.
Step S1202, reading a pre-configured file by the test application to obtain the predetermined test instruction set.
Specifically, the pre-configured file is mainly used for obtaining the predetermined test instruction set, the pre-configured file determines specific content of the predetermined test instruction set, and the predetermined test instruction set determines test instructions sent from the test application to the local program. Therefore, other test instructions can be flexibly expanded through the pre-configured file, and paths are provided for realizing other functional requirements. Therefore, after the test application is started, the test application firstly reads the pre-configured file, initializes the preset instruction set, and then establishes a socket server and a client on the test application to connect with the local program. The preconfigured file adopts json format, and the main fields are name, instruction, repetition times and repetition delay.
The embodiment adopts the scheme, and particularly starts the test application; and reading a pre-configured file through the test application to obtain the preset test instruction set. Based on the scheme, after the test application is started, the test application firstly reads the preconfigured file to determine the preset instruction set, and the obtained preset instruction set is mainly used for determining the specific content of the test instruction sent by the test application to the local program, so that the flexible expansion of other test instructions through the preconfigured file is realized, and a path is provided for the realization of other functional requirements. In addition, the use scenario may not be limited to testing, but may be extended to the implementation of some system functions. For example, the method can be used for reading diagnosis information from the other end of the LVDS, controlling an LVDS serializer/deserializer register and the like, and corresponding system functions can be realized by determining a preset instruction set for testing application control and configuration corresponding files as long as the protocol format is met.
Further, referring to fig. 6 and fig. 7, fig. 6 is a flowchart illustrating a fifth exemplary embodiment of the LVDS function test method according to the present invention, and fig. 7 is a packet interaction flowchart. Based on step S1402 in the embodiment shown in fig. 4, the step of analyzing the test instruction by the local program and executing the test instruction to obtain a corresponding test result includes:
step S14021, analyzing the test instruction by the local program to obtain an LVDS instruction;
Specifically, when the local program communicates with the test application, the packet group adopts a fixed protocol format, namely a format of 'packet header + length + sequence number + identification + data + CRC code + packet tail'. The data packet group package is initiated by the test application, and the local program receives and processes and returns the result. Based on step S1202, after obtaining the predetermined instruction list, the second socket oral client obtains the first test instruction, and determines the validity of the test instruction, that is, determines whether the instruction conforms to the corresponding format; if yes, adding a packet head, a packet tail and a CRC check field into the data of the test instruction to obtain a test instruction data packet conforming to the corresponding format, and sending the data packet to a local program; if not, the error processing flow is entered.
After receiving the data packet of the test instruction through the first socket joint oral terminal of the local program, analyzing the data packet of the test instruction, and judging whether the packet head, the packet tail and the length meet the required format; if so, checking the CRC data; otherwise, the corresponding error processing flow is entered.
Step S14022, executing the LVDS instruction to obtain the corresponding test result.
Specifically, after the received test instruction is analyzed, an LVDS instruction is obtained, the LVDS instruction is inserted into a gap of an LVDS instruction execution table and executed, and a corresponding test result is obtained.
The LVDS instruction execution table is formed by arranging a plurality of execution tasks, the corresponding tasks are executed according to the arrangement of the execution tasks in sequence, then the tasks to be executed are not void-free, and instead, some voids, namely idle frames, exist in the LVDS instruction execution table.
For example, referring to fig. 8, fig. 8 is an LVDS instruction execution table, and as shown in fig. 8, for convenience of description, a control class service frame is denoted by CMDE, a touch screen class service frame is denoted by ETAT, and an idle frame is denoted by SPO. According to the LVDS instruction execution table, the CMDE instruction is executed, then the ETAT instruction is executed, then the SPO instruction is executed, then the ETAT instruction is executed, and the process is circulated until the process is finished. When no other instruction is inserted into the SPO, the instruction is executed as usual, that is, the gap is still executed, which means that after the execution of the first ETAT instruction is completed, the next ETAT instruction is not executed immediately, but is a gap between a period of time, in which the SPO instruction is executed, and the SPO instruction can be replaced by inserting other instructions without affecting the operation of other functions. When the LVDS instruction is inserted into the gap, the LVDS instruction replaces the execution of the SPO instruction, so that the LVDS instruction is not required to be executed after the execution of the instruction existing in the whole LVDS instruction execution table is completed, but is inserted into a priority queue, and the LVDS instruction does not run immediately, thereby ensuring that the original LVDS function is not affected when the test program is executed, and improving the execution efficiency.
After the LVDS instruction is executed, the obtained test result forms a return result according to the serial number, and the package format is the same as the format of the sending instruction. The sequence numbers are continuously circulated from 0to 0xFF, namely 255 instructions exist at most at the same time.
According to the scheme, the test instruction is analyzed through the local program to obtain an LVDS instruction; and executing the LVDS instruction to obtain the corresponding test result. Based on the scheme, the received test instruction is analyzed and operated through the local program, so that the LVDS function is tested, a corresponding test result is obtained, the method is one of main steps for testing the LVDS function, the whole process is easy and convenient to operate, and testers do not need to know more details.
Further, referring to fig. 9, fig. 9 is a flowchart of a sixth exemplary embodiment of the LVDS functional testing method of the present invention. Based on step S110 in the embodiment shown in fig. 2, the step of establishing the first socket server and the first socket client on the local program includes:
step S1101, starting a terminal device where the local program is located;
Specifically, after the terminal device where the local program is located is started, the content of init.rc is read first, where init.rc is a script file, although simple, but important. The initial operating form of the system is constructed by reading init. Rc.
For example, for an android device, the start-up of the android device must go through three phases: boot loader (Bootloader), linux Kernel (Linux Kernel), and android system services. Strictly speaking, the Android system is actually a series of "service processes" running on the Linux kernel, and the "laozhong" of these service processes is init, which is the first started process in Android, so the process identifier (Process Identification, PID) is 0, and it constructs the initial running form of the system by parsing init. I.e. the other android system service programs are mostly described in this rc script and started up with certain conditions.
Step S1102, adding socket resources to the local program of the terminal device;
specifically, based on step S1101, after the terminal device where the local program is located is started and the init. Rc script file is read, a socket resource is added to the local program of the terminal device, so as to prepare for subsequent establishment of a socket.
Step S1103, starting the local program;
Specifically, the host develops a local program to process the control signal of the LVDS serializer/deserializer, that is, the local program is installed on the terminal device, and after the terminal device is started, based on the foregoing step S1101 and step S1102, the local program is started, so as to create conditions for the subsequent establishment of the socket.
Step S1104, according to the socket resources, the first socket server and the first socket client are established on the local program.
Specifically, after the local program is started, in addition to initializing the original function, two threads are started according to the socket resources, one of the threads establishes a first socket server and waits for test application connection; another establishes a first socket client, attempting to connect to the test application.
The embodiment specifically starts the terminal device where the local program is located through the scheme; socket resources are added to the local program of the terminal equipment; starting the local program; and establishing the first set of interface server and the first set of interface client on the local program according to the set of interface resources. Based on the scheme, the initial running form of the system is constructed by reading the init.rc file after starting the terminal equipment where the local program is located, socket resources are added on the local program, the local program is started to initialize the original functions, two socket interfaces are built, and preparation is made for the subsequent establishment of a communication environment between the local program and the test application.
Further, referring to fig. 10, fig. 10 is an overall flow chart of the LVDS function test method of the present invention. The overall flow of the LVDS function test method is specifically described as follows:
Firstly, after a terminal device (such as an android device) where a local program is located is started, firstly reading content of init.rc, and then adding socket resources on the local program on the terminal device. Starting the local program, starting two threads except initializing the original functions, and one thread is used for establishing a first set of interface server end to wait for testing application connection; another establishes a first socket client, attempting to connect to the test application.
Then, starting a test application, wherein the test application can read a pre-configured file, initialize a pre-determined instruction set, and start two threads for establishing a second socket server and a second socket client to connect with a local program. Establishing a first connection between a local program and a test application based on a second socket client and a first socket server; and establishing a second connection between the local program and the test application based on the first socket client and the second socket server.
Moreover, the LVDS interface is a digital video signal transmission mode developed by the national semiconductor company (NS) to overcome the disadvantages of large power consumption, large electromagnetic interference and the like when broadband high-rate data is transmitted in a TTL level mode. LVDS signaling is typically implemented by providing serializers/deserializers and LVDS lines by a professional manufacturer, and consists of three parts: differential signal transmitter, differential signal interconnect, differential signal receiver. The transmitter is used for converting unbalanced transmission TTL signals into balanced transmission LVDS signals and has independent and integrated components; the receiver is used for converting the balanced transmission LVDS signals into unbalanced transmission TTL signals, and has high input impedance; the interconnect includes a coupling line (cable or PCB trace) terminating in a matching resistor.
In this scheme, the transmitter integrates the serializer for the data exporter and the receiver integrates the deserializer for the data sink. Such as a display scene, a host-side integrated serializer, a display-side integrated deserializer, and the like. The serializer/deserializer allows it to be configured using a serial port, which the vendor will provide in a basic protocol format, controlled by the integrator of the serializer/deserializer. The host develops a local program to process the control signal of the LVDS serializer/deserializer. The LVDS control signal and the state of the serializer/deserializer need to be tested and confirmed according to the needs of the customer, and the test result is provided.
Then, the test application sends a test instruction to the local program through the first connection, the local program receives the test instruction, and then the test instruction is primarily analyzed to form an LVDS instruction, and the LVDS instruction is inserted into a gap of an LVDS instruction execution table queue and is executed; after the LVDS instruction is executed, a return result is formed according to the sequence number, the data packet format of the result is the same as the format of the transmitted test instruction, the test return result can be output according to the need, the result is not necessarily displayed on an interface, can be displayed and stored in a log, and the transmitted instruction can be realized by broadcasting.
According to the scheme, communication based on a socket interface is provided for solving the problem of difficult testing of LVDS control signals, connection between a local program of an LVDS serializer/deserializer and a test application is established, the function that the test application can send/receive instructions of the LVDS serializer/deserializer is achieved, logic of the application can be adjusted according to project requirements after development, and testers do not need to know more details.
In addition, the embodiment of the invention also provides an LVDS function test device, which comprises:
the first establishing module is used for establishing a first set of interface service end and a first set of interface client end on a local program;
The second establishing module is used for establishing a second set of interface service end and a second set of interface client end on the test application;
the communication module is used for establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client;
and the test module is used for testing the low-voltage differential signal LVDS function by running a test instruction in the communication environment to obtain a corresponding test result.
The principle and implementation process of LVDS function test implemented in this embodiment are referred to the above embodiments, and are not described herein.
In addition, the embodiment of the invention also provides a terminal device, which comprises a memory, a processor and an LVDS function test program stored in the memory and capable of running on the processor, wherein the LVDS function test program is executed by the processor to realize the steps of the LVDS function test method.
Because the LVDS function test program is executed by the processor, all the technical solutions of all the embodiments are adopted, and therefore, at least all the beneficial effects brought by all the technical solutions of all the embodiments are not described in detail herein.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores an LVDS function test program, and the LVDS function test program realizes the steps of the LVDS function test method when being executed by a processor.
Because the LVDS function test program is executed by the processor, all the technical solutions of all the embodiments are adopted, and therefore, at least all the beneficial effects brought by all the technical solutions of all the embodiments are not described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to perform the method of each embodiment of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. The LVDS function test method is characterized by comprising the following steps of:
A first set of interface server and a first set of interface client are established on a local program, wherein the local program is arranged on a terminal device to control an LVDS serializer/deserializer;
starting a test application;
Reading a preconfigured file through the test application to obtain a preset test instruction set, wherein the preconfigured file adopts json format, and the preconfigured file field comprises a name, an instruction, the repetition times and the repetition delay;
Establishing a second set of interface service end and a second set of interface client end on the test application;
Establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client, the first set of interface client and the second set of interface server;
And testing the low-voltage differential signaling (LVDS) function by running a test instruction in the communication environment based on the preset test instruction set to obtain a corresponding test result.
2. The LVDS functional testing method of claim 1, wherein the step of establishing a communication environment between the local program and the test application based on the first socket server and the second socket client, the first socket client and the second socket server includes:
establishing a first long connection from the test application to the local program based on the first socket server and the second socket client;
Establishing a second long connection from the local program to the test application based on the first socket client and the second socket server;
And establishing a bidirectional communication environment between the local program and the test application according to the first long connection and the second long connection.
3. The LVDS function testing method of claim 2, wherein the step of testing the low voltage differential signaling LVDS function by running a test command in the communication environment based on the predetermined test command set to obtain a corresponding test result includes:
in the communication environment, based on the preset test instruction set and the first long connection, sending a test instruction to the local program through the test application;
Analyzing the test instruction through the local program and executing the test instruction to obtain a corresponding test result;
And based on the second long connection, sending the test result back to the test application as a corresponding result of LVDS function test.
4. The LVDS functional testing method of claim 3, wherein the step of parsing the test command by the local program and executing the test command to obtain the corresponding test result includes:
analyzing the test instruction through the local program to obtain an LVDS instruction;
and executing the LVDS instruction to obtain the corresponding test result.
5. The LVDS functional testing method of claim 4, wherein the step of executing the LVDS instruction to obtain the corresponding test result includes:
and inserting the LVDS instruction into a gap of an LVDS instruction execution table and executing the LVDS instruction to obtain a corresponding test result.
6. The LVDS functional testing method of claim 1, wherein the step of establishing the first set of interface service and the first set of interface client on the local program includes:
starting a terminal device where the local program is located;
Socket resources are added to the local program of the terminal equipment;
starting the local program;
and establishing the first set of interface server and the first set of interface client on the local program according to the set of interface resources.
7. An LVDS functional testing apparatus, wherein the LVDS functional testing apparatus comprises:
The first establishing module is used for establishing a first set of interface service end and a first set of interface client end on a local program, wherein the local program is arranged on terminal equipment so as to control an LVDS serializer/deserializer;
The starting module is used for starting the test application;
The reading module is used for reading a preconfigured file through the test application to obtain a preset test instruction set, wherein the preconfigured file adopts json format, and the preconfigured file field comprises a name, an instruction, the repetition times and the repetition time delay;
The second establishing module is used for establishing a second set of interface service end and a second set of interface client end on the test application;
the communication module is used for establishing a communication environment between the local program and the test application based on the first set of interface server and the second set of interface client;
and the test module is used for testing the low-voltage differential signal LVDS function by running the test instruction in the communication environment based on the preset test instruction set to obtain a corresponding test result.
8. A terminal device comprising a memory, a processor and an LVDS functional test program stored on the memory and executable on the processor, the LVDS functional test program when executed by the processor implementing the steps of the LVDS functional test method according to any one of claims 1-6.
9. A storage medium having stored thereon an LVDS functional test program which when executed by a processor performs the steps of the LVDS functional test method of any one of claims 1-6.
CN202211274592.7A 2022-10-18 2022-10-18 LVDS function test method, device, terminal equipment and storage medium Active CN115695228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211274592.7A CN115695228B (en) 2022-10-18 2022-10-18 LVDS function test method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211274592.7A CN115695228B (en) 2022-10-18 2022-10-18 LVDS function test method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115695228A CN115695228A (en) 2023-02-03
CN115695228B true CN115695228B (en) 2024-05-14

Family

ID=85066301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211274592.7A Active CN115695228B (en) 2022-10-18 2022-10-18 LVDS function test method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115695228B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6772380B1 (en) * 1999-04-21 2004-08-03 Seagate Technology Llc Smart tester and method for testing a bus connector
CN106788787A (en) * 2016-11-30 2017-05-31 上海卫星工程研究所 Spaceborne high speed LVDS parallel signals quickly test the method with analysis
CN110858171A (en) * 2018-08-23 2020-03-03 中移(杭州)信息技术有限公司 System, method and device for application test, terminal equipment and medium
CN111487524A (en) * 2020-05-15 2020-08-04 上海华力微电子有限公司 Universal chip test system, test method and storage medium
CN112367219A (en) * 2020-10-27 2021-02-12 中国核动力研究设计院 DCS platform module LVDS multi-channel test conversion card and application method thereof
CN112583672A (en) * 2020-12-18 2021-03-30 北京睿芯高通量科技有限公司 TCP server stability testing method based on timestamp
CN113032244A (en) * 2021-02-23 2021-06-25 中国工商银行股份有限公司 Interface testing method, device, computer system and computer readable storage medium
CN113190388A (en) * 2021-04-13 2021-07-30 厦门路桥信息股份有限公司 TCP interface test method, medium, equipment and device
CN113328887A (en) * 2021-05-28 2021-08-31 卡斯柯信号有限公司 Load board testing system and method based on M-LVDS bus
CN113656232A (en) * 2021-08-23 2021-11-16 北京炬力北方微电子股份有限公司 System level testing device of SOC chip high-speed serial differential bus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7242209B2 (en) * 2004-05-03 2007-07-10 Dft Microsystems, Inc. System and method for testing integrated circuits

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6772380B1 (en) * 1999-04-21 2004-08-03 Seagate Technology Llc Smart tester and method for testing a bus connector
CN106788787A (en) * 2016-11-30 2017-05-31 上海卫星工程研究所 Spaceborne high speed LVDS parallel signals quickly test the method with analysis
CN110858171A (en) * 2018-08-23 2020-03-03 中移(杭州)信息技术有限公司 System, method and device for application test, terminal equipment and medium
CN111487524A (en) * 2020-05-15 2020-08-04 上海华力微电子有限公司 Universal chip test system, test method and storage medium
CN112367219A (en) * 2020-10-27 2021-02-12 中国核动力研究设计院 DCS platform module LVDS multi-channel test conversion card and application method thereof
CN112583672A (en) * 2020-12-18 2021-03-30 北京睿芯高通量科技有限公司 TCP server stability testing method based on timestamp
CN113032244A (en) * 2021-02-23 2021-06-25 中国工商银行股份有限公司 Interface testing method, device, computer system and computer readable storage medium
CN113190388A (en) * 2021-04-13 2021-07-30 厦门路桥信息股份有限公司 TCP interface test method, medium, equipment and device
CN113328887A (en) * 2021-05-28 2021-08-31 卡斯柯信号有限公司 Load board testing system and method based on M-LVDS bus
CN113656232A (en) * 2021-08-23 2021-11-16 北京炬力北方微电子股份有限公司 System level testing device of SOC chip high-speed serial differential bus

Also Published As

Publication number Publication date
CN115695228A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
JP2539181B2 (en) Access control method and communication interface system through dynamic communication channel
CN107704346B (en) SOC chip debugging method and system
KR20130040220A (en) Message passing framework for audio/video streaming in a topology of devices
CN110389711B (en) Method, device, and non-transitory computer-readable medium for assisting endpoint device in implementing SR-IOV functionality
JP2021532621A (en) Host to communicate with FPGA, method to communicate with FPGA, and FPGA interface chip
CN115114202B (en) Embedded WEB Server Based on Optical Fiber Communication Interface Expansion
CN115695228B (en) LVDS function test method, device, terminal equipment and storage medium
US6990538B2 (en) System comprising a state machine controlling transition between deskew enable mode and deskew disable mode of a system FIFO memory
CN109189711B (en) Serial console interface based on Ethernet and application method thereof
CN114629830B (en) Method and system for automatically controlling test center instrument test
CN115776653A (en) Vehicle-mounted data acquisition method, device, equipment and medium
CN112602294B (en) Method and device for detecting bandwidth
CN115373927B (en) Product testing method, device, electronic equipment and computer readable medium
Luderer et al. A virtual circuit switch as the basis for distributed systems
CN218162477U (en) Data transmission board and system based on hardware simulation accelerator
CN220511133U (en) Ethernet testing device and Ethernet testing system
CN113704163B (en) Testing device and method for verifying SRIO protocol integrity
JP2003067270A (en) Communication protocol test equipment
CN118012681A (en) Full duplex function verification method and device for universal asynchronous receiving and transmitting device
CN117914969A (en) Dual-protocol communication device and dual-protocol communication method
CN115604246A (en) Data long-distance transmission method and device, electronic equipment and storage medium
Wang et al. Reconfigurable optical demultiplexer calling framework based on gRPC Design
Song et al. Design of Communication Software Based on FC-AE-ASM Protocol
CN117081970A (en) Ethernet physical layer outer loop testing method and device and electronic equipment
CN116938742A (en) Network chip networking simulation verification system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Yao Xin

Inventor after: Yin Yutao

Inventor after: Hu Jin

Inventor before: Yao Xin

GR01 Patent grant
GR01 Patent grant