Automatic test method and device for programmable logic device
By generating configuration base plate switch instructions and establishing multi-stage test circuits, the problem of inefficiency in testing multiple programmable logic devices in the prior art is solved, and efficient automated testing is achieved.
Patent Information
- Application Number
- CN202411590854.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art cannot effectively test multiple programmable logic devices, resulting in low testing efficiency.
By obtaining the test tasks uploaded by the user, determining the programmable logic devices and test content to be tested, generating configuration base plate switch instructions, establishing multi-stage test circuits, and performing synchronous testing.
The testing efficiency of multiple programmable logic devices is greatly improved, and efficient automated testing of multiple devices is achieved.
Smart Images

Figure CN119535185A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hardware testing, and in particular to an automated testing method and device for a programmable logic device. Background Art
[0002] As programmable devices become larger and larger and more and more devices are used, for existing test solutions, the test project is configured through Tcl scripts, and EDA tools and cables are called to perform board tests.
[0003] Traditional testing solutions can only test a single programmable logic device and cannot meet the testing requirements of multiple devices. Therefore, the testing efficiency of multiple programmable logic devices is low.
[0004] Therefore, there is an urgent need for an automated testing strategy for programmable logic devices to solve the problem of low testing efficiency of multiple programmable logic devices. Summary of the invention
[0005] The embodiment of the present invention provides an automated testing method and apparatus for a programmable logic device, so as to solve the problem of low testing efficiency of multiple programmable logic devices.
[0006] In order to solve the above problem, an embodiment of the present invention provides an automated testing method for a programmable logic device, which is applied to a host computer and includes:
[0007] Get the test tasks uploaded by the user;
[0008] Based on the test task, determine a number of programmable logic devices to be tested and test contents; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other;
[0009] Based on each of the programmable logic devices to be tested, a configuration backplane switch instruction is generated, and each of the programmable logic devices to be tested is connected based on the configuration backplane switch instruction to generate a multi-stage test circuit;
[0010] Based on the test content, each programmable logic device to be tested is synchronously tested through the multi-stage test circuit.
[0011] As an improvement of the above solution, the configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is respectively connected to the first programmable switch and the second programmable switch;
[0012] Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface;
[0013] The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
[0014] As an improvement of the above solution, the configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes:
[0015] When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard;
[0016] When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard;
[0017] When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
[0018] As an improvement of the above solution, the configuration backplane switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; the generation of the configuration backplane switch instruction based on each of the programmable logic devices to be tested includes:
[0019] Judging the programmable logic device to be tested;
[0020] If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction;
[0021] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction;
[0022] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission;
[0023] If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
[0024] As an improvement of the above solution, after performing synchronous testing on each programmable logic device to be tested, it also includes: generating an automatic test report through the host computer configuration software based on the test results.
[0025] Accordingly, an embodiment of the present invention further provides an automated testing device for a programmable logic device, which is applied to a host computer and includes: a data acquisition module, a data selection module, an instruction generation module and a testing module;
[0026] The data acquisition module is used to acquire the test tasks uploaded by the user;
[0027] The data selection module is used to determine a number of programmable logic devices to be tested and test contents based on the test task; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other;
[0028] The instruction generation module is used to generate a configuration backplane switch instruction based on each of the programmable logic devices to be tested, and connect each of the programmable logic devices to be tested based on the configuration backplane switch instruction to generate a multi-stage test circuit;
[0029] The test module is used to perform synchronous testing on each programmable logic device to be tested based on the test content through the multi-stage test circuit.
[0030] As an improvement of the above solution, the configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is respectively connected to the first programmable switch and the second programmable switch;
[0031] Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface;
[0032] The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
[0033] As an improvement of the above solution, the configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes:
[0034] When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard;
[0035] When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard;
[0036] When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
[0037] As an improvement of the above solution, the configuration backplane switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; the generation of the configuration backplane switch instruction based on each of the programmable logic devices to be tested includes:
[0038] Judging the programmable logic device to be tested;
[0039] If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction;
[0040] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction;
[0041] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission;
[0042] If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
[0043] As an improvement of the above solution, after performing synchronous testing on each programmable logic device to be tested, it also includes: generating an automatic test report through the host computer configuration software based on the test results.
[0044] As can be seen from the above, the present invention has the following beneficial effects:
[0045] The present invention provides an automated testing method for programmable logic devices, which obtains a test task uploaded by a user; based on the test task, determines a number of programmable logic devices to be tested and test content; wherein the programmable logic device to be tested is connected to a configuration baseboard, and each of the configuration baseboards is connected to each other; based on each of the programmable logic devices to be tested, generates a configuration baseboard switch instruction, and connects each of the programmable logic devices to be tested based on the configuration baseboard switch instruction to generate a multi-stage test circuit; based on the test content, performs a synchronous test on each programmable logic device to be tested through the multi-stage test circuit. The present invention generates a multi-stage test circuit by setting a configuration baseboard to be connected to the programmable logic device to be tested, and controls the connection of the programmable logic device to be tested by setting a configuration baseboard switch instruction, and completes the synchronous test of each programmable logic device to be tested based on the multi-stage test circuit, which greatly improves the test efficiency of multiple programmable logic devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of an automated testing method for a programmable logic device provided by an embodiment of the present invention;
[0047] Figure 2 It is a structural schematic diagram of an automated testing device for a programmable logic device provided by an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present invention;
[0049] Figure 4 It is a structural schematic diagram of a configuration base plate provided by an embodiment of the present invention;
[0050] Figure 5 is a schematic diagram of a configuration base plate connection provided by an embodiment of the present invention;
[0051] Figure 6 is a schematic diagram of the connection of a test configuration base plate provided by an embodiment of the present invention;
[0052] Figure 7 is a schematic diagram of a test configuration baseboard connection provided by another embodiment of the present invention;
[0053] Figure 8 is a schematic diagram of a test configuration baseboard connection provided by another embodiment of the present invention;
[0054] Fig. 9 is a schematic diagram of TD Download provided by an embodiment of the present invention;
[0055] Fig.10 is a schematic diagram of a Device Chain provided in one embodiment of the present invention;
[0056] Fig.11 is a schematic diagram of an SVF file provided by an embodiment of the present invention;
[0057] Fig.12 It is a schematic diagram of an EDA-based testing system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0059] Embodiment 1
[0060] See also Figure 1 , Figure 1 1 is a flow chart of an automated testing method for a programmable logic device provided by an embodiment of the present invention, which is applied to a host computer, such as Figure 1 As shown, this embodiment includes steps 101 to 104, and each step is specifically as follows:
[0061] Step 101: Obtain the test task uploaded by the user.
[0062] Step 102: Based on the test task, determine a number of programmable logic devices to be tested and test contents; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other.
[0063] In this embodiment, the configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is connected to the first programmable switch and the second programmable switch respectively;
[0064] Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface;
[0065] The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
[0066] In a specific embodiment, to better illustrate the configuration of the base plate, see Figure 4 It should be noted that the programmable switch 1 (i.e., the first programmable switch described in the present invention) can, through the main control chip, connect and close JTAG3TDI (i.e., the third TDI interface described in the present invention) with JTAG1 TDI (i.e., the first TDI interface described in the present invention) and JTAG2 TDO (i.e., the second TDO interface described in the present invention); the programmable switch 2 (i.e., the first programmable switch described in the present invention) can, through the main control chip, connect and close JTAG1 TDO (i.e., the first TDO interface described in the present invention) with JTAG2 TDO (i.e., the second TDO interface described in the present invention) and JTAG3 TDO (i.e., the third TDO interface described in the present invention).
[0067] In this embodiment, the configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes:
[0068] When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard;
[0069] When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard;
[0070] When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
[0071] In a specific embodiment, to better illustrate the connection between the configuration base plates, see Figure 5The main control chip of the configuration baseboard is the EF2L45 device, which realizes the reception and transmission of the serial port protocol and its forwarding to the next level; the encoder realizes the address encoding of the configuration baseboard; the JTAG1 interface (that is, the first JTAG interface described in the present invention) is connected to the previous level JTAG, if it is the first level, it is connected to the programmer; the JTAG2 interface (that is, the second JTAG interface described in the present invention) is used to receive and test programmable logic devices, such as EF2 / EF3 / EG4 / SF1, etc.; the JTAG3 interface (that is, the third JTAG interface described in the present invention) is connected to the next level JTAG.
[0072] Step 103: Generate a configuration backplane switch instruction based on each of the programmable logic devices to be tested, and connect each of the programmable logic devices to be tested based on the configuration backplane switch instruction to generate a multi-stage test circuit.
[0073] In a specific embodiment, the switch command of the configuration baseboard is sent through the serial port and is parsed by the main control chip on the configuration baseboard to control the switch of the configuration baseboard.
[0074] In this embodiment, the configuration backplane switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; the generation of the configuration backplane switch instruction based on each of the programmable logic devices to be tested includes:
[0075] Judging the programmable logic device to be tested;
[0076] If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction;
[0077] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction;
[0078] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission;
[0079] If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
[0080] In a specific embodiment, to better illustrate the connection of the configuration base plate:
[0081] See also Figure 6 , only the device under test 1 is tested, and the programmable switch 2 corresponding to the configuration base plate 1 (i.e., the first configuration base plate of the present invention) is configured as follows Figure 6 As shown: In the configuration baseboard 1, programmable switch 2 connects the TDO interface of JTAG2 and the TDO interface of JTAG1, and programming switch 1 can be turned on to ignore it.
[0082] See also Figure 7 , only test the device under test 1 + the device under test 2, the configuration base plate 1 and 2 (ie, the first configuration base plate and the second configuration base plate of the present invention) programmable switch configuration as follows Figure 7As shown: in the configuration baseboard 1, the programmable switch 1 connects the TDO interface of JTAG2 and the TDI interface of JTAG3, and the programmable switch 2 connects the TDO interface of JTAG1 and the TDO interface of JTAG3; in the configuration baseboard 2, the programmable switch 2 connects the TDO interface of JTAG2 and the TDO interface of JTAG1, and the configuration of the programmable switch 1 can be ignored;
[0083] See also Figure 8 , only test the device under test 2 + the device under test 3, the configuration base plate 1, 2 and 3 (ie, the first configuration base plate, the second configuration base plate and the third configuration base plate of the present invention) programmable switch configuration as follows Figure 8 As shown: in configuration baseboard 1, programmable switch 1 connects the TDI interface of JTAG1 and the TDI interface of JTAG3, and programmable switch 2 connects the TDO interface of JTAG1 and the TDO interface of JTAG3; in configuration baseboard 2, programmable switch 1 connects the TDO interface of JTAG2 and the TDI interface of JTAG3, and programmable switch 2 connects the TDO interface of JTAG1 and the TDO interface of JTAG3; in configuration baseboard 3, programmable switch 2 connects the TDO interface of JTAG2 and the TDO interface of JTAG1, and the configuration of programmable switch 1 can be ignored.
[0084] In this embodiment, after performing synchronous testing on each programmable logic device to be tested, the method further includes: generating an automatic test report through upper computer configuration software based on the test results.
[0085] In a specific embodiment, the EDA tool download module (Anlogic TD Download) has many functions and supports many chips. In the case of continuously adding new devices, the above method can be used to quickly cascade with the new devices by configuring the baseboard. The TD Download screenshot is as follows: Fig. 9 As shown, there are many download modes. The test of this interface does not involve JTAG cascade; Device Chain, the test of this interface is as follows Fig.10 As shown, cascading support may be required; the generated SVF file options are as follows Fig.11 shown.
[0086] Step 104: Based on the test content, perform a synchronous test on each programmable logic device to be tested through the multi-stage test circuit.
[0087] In a specific embodiment, the host computer calls the TCL script to let the EDA tool generate the relevant SVF file, and through the communication interface, it will select or close the devices at each level to realize the cascade of single-stage / multi-stage devices to achieve the verification of EDA functions. The system diagram is shown in Fig.12 shown.
[0088] See also Figure 2 , Figure 2 It is a structural diagram of an automatic test device for a programmable logic device provided by an embodiment of the present invention, which is applied to a host computer and includes: a data acquisition module 201, a data selection module 202, an instruction generation module 203 and a test module 204;
[0089] The data acquisition module is used to acquire the test tasks uploaded by the user;
[0090] The data selection module is used to determine a number of programmable logic devices to be tested and test contents based on the test task; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other;
[0091] The instruction generation module is used to generate a configuration backplane switch instruction based on each of the programmable logic devices to be tested, and connect each of the programmable logic devices to be tested based on the configuration backplane switch instruction to generate a multi-stage test circuit;
[0092] The test module is used to perform synchronous testing on each programmable logic device to be tested based on the test content through the multi-stage test circuit.
[0093] As an improvement of the above solution, the configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is respectively connected to the first programmable switch and the second programmable switch;
[0094] Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface;
[0095] The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
[0096] As an improvement of the above solution, the configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes:
[0097] When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard;
[0098] When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard;
[0099] When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
[0100] As an improvement of the above solution, the configuration backplane switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; the generation of the configuration backplane switch instruction based on each of the programmable logic devices to be tested includes:
[0101] Judging the programmable logic device to be tested;
[0102] If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction;
[0103] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction;
[0104] If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission;
[0105] If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
[0106] As an improvement of the above solution, after performing synchronous testing on each programmable logic device to be tested, it also includes: generating an automatic test report through the host computer configuration software based on the test results.
[0107] This embodiment obtains the test task uploaded by the user; based on the test task, determines a number of programmable logic devices to be tested and the test content; wherein the programmable logic device to be tested is connected to the configuration baseboard, and each of the configuration baseboards is connected to each other; based on each of the programmable logic devices to be tested, generates a configuration baseboard switch instruction, and connects each of the programmable logic devices to be tested based on the configuration baseboard switch instruction to generate a multi-level test circuit; based on the test content, performs a synchronous test on each programmable logic device to be tested through the multi-level test circuit. The present invention generates a multi-level test circuit by setting a configuration baseboard to connect with the programmable logic device to be tested, and controls the connection of the programmable logic device to be tested by setting the configuration baseboard switch instruction, and completes the synchronous test of each programmable logic device to be tested based on the multi-level test circuit, which greatly improves the test efficiency of multiple programmable logic devices.
[0108] Embodiment 2
[0109] See also Figure 3 , Figure 3 It is a schematic diagram of the structure of a terminal device provided in one embodiment of the present invention.
[0110] A terminal device of this embodiment includes: a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, the steps of the above-mentioned automated testing method for programmable logic devices in the embodiment are implemented, for example: Figure 1 Alternatively, when the processor executes the computer program, the functions of each module in the above-mentioned device embodiments are realized, for example: Figure 2 All modules of the automated test setup for programmable logic devices are shown.
[0111] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the automated testing method of the programmable logic device described in any of the above embodiments.
[0112] Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0113] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 301 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0114] The memory 302 can be used to store the computer program and / or module. The processor 301 implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0115] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0116] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0117] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. An automated testing method for a programmable logic device, characterized in that: Applied to the host computer, including: Get the test tasks uploaded by the user; Based on the test task, determine a number of programmable logic devices to be tested and test contents; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other; Based on each of the programmable logic devices to be tested, a configuration backplane switch instruction is generated, and each of the programmable logic devices to be tested is connected based on the configuration backplane switch instruction to generate a multi-stage test circuit; Based on the test content, each programmable logic device to be tested is synchronously tested through the multi-stage test circuit.
2. The automated testing method for a programmable logic device according to claim 1, characterized in that: The configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is respectively connected to the first programmable switch and the second programmable switch; Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface; The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
3. The automated testing method for a programmable logic device according to claim 2, characterized in that: The configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes: When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard; When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard; When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
4. The automated testing method for a programmable logic device according to claim 3, characterized in that: The configuration base switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; The step of generating a configuration backplane switch instruction based on each of the programmable logic devices to be tested comprises: Judging the programmable logic device to be tested; If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction; If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction; If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission; If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
5. The automated testing method for a programmable logic device according to claim 4, characterized in that: After the synchronous testing of each programmable logic device to be tested is performed, the method further includes: generating an automatic test report through the upper computer configuration software based on the test result.
6. An automated testing device for a programmable logic device, characterized in that: Applied to the host computer, including: data acquisition module, data selection module, instruction generation module and test module; The data acquisition module is used to acquire the test tasks uploaded by the user; The data selection module is used to determine a number of programmable logic devices to be tested and test contents based on the test task; wherein the programmable logic devices to be tested are connected to a configuration baseboard, and each of the configuration baseboards is connected to each other; The instruction generation module is used to generate a configuration backplane switch instruction based on each of the programmable logic devices to be tested, and connect each of the programmable logic devices to be tested based on the configuration backplane switch instruction to generate a multi-stage test circuit; The test module is used to perform synchronous testing on each programmable logic device to be tested through the multi-stage test circuit based on the test content.
7. The automated testing device for a programmable logic device according to claim 6, characterized in that: The configuration baseboard includes: a first JTAG interface, a second JTAG interface, a third JTAG interface, a first programmable switch, a second programmable switch, a main control chip and an encoder; the encoder is connected to the main control chip, and the main control chip is respectively connected to the first programmable switch and the second programmable switch; Wherein, the first JTAG interface includes a first TCK interface, a first TMS interface, a first TDI interface and a first TDO interface; the second JTAG interface includes a second TCK interface, a second TMS interface, a second TDI interface and a second TDO interface; the third JTAG interface includes a third TCK interface, a third TMS interface, a third TDI interface and a third TDO interface; The first TCK interface, the second TCK interface and the third TCK interface are connected to each other; the first TMS interface, the second TMS interface and the third TMS interface are connected to each other; the first TDI interface and the second TDO interface are connected to the third TDI interface through a first programmable switch; the second TDO interface and the third TDO interface are connected to the first TDO interface through a second programmable switch.
8. The automated testing device for a programmable logic device according to claim 7, characterized in that: The configuration baseboard includes: a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, and the configuration baseboard is connected to the programmable device to be tested through a second JTAG interface; and further includes: When the first configuration baseboard is connected to the host computer and the configuration baseboard respectively, the first JTAG interface of the first configuration baseboard is connected to the host computer through the programmer, and the third JTAG interface is connected to the first JTAG interface corresponding to the currently connected configuration baseboard; When the second configuration baseboard is connected to the two configuration baseboards respectively, the first JTAG interface of the second configuration baseboard is connected to the third JTAG interface of the currently connected configuration baseboard, and the third JTAG interface is connected to the first JTAG interface of the currently connected configuration baseboard; When the third configuration baseboard is connected to the first configuration baseboard, the first JTAG interface of the third configuration baseboard is connected to the third JTAG interface of the currently connected first configuration baseboard, and the third JTAG interface is not connected.
9. The automated testing device for a programmable logic device according to claim 8, characterized in that: The configuration base switch instruction includes a first switch instruction, a second switch instruction, a third switch instruction and a fourth switch instruction; The step of generating a configuration backplane switch instruction based on each of the programmable logic devices to be tested comprises: Judging the programmable logic device to be tested; If the number of the programmable logic devices to be tested is one, and the configuration baseboard to which the current programmable logic device to be tested is connected is the first configuration baseboard, a first switch instruction is generated, so that the first configuration baseboard controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the second TDO interface based on the first switch instruction; If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a first configuration baseboard and a second configuration baseboard, a second switch instruction is generated, so that the first configuration baseboard controls the first programming switch corresponding to the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the second switch instruction, and controls the second programming switch corresponding to the first configuration baseboard to connect the first TDO interface and the third TDO interface based on the second switch instruction, so that the second configuration baseboard controls the second programming switch corresponding to the second configuration baseboard to connect the first TDO interface and the second TDO interface based on the second switch instruction; If the number of the programmable logic devices to be tested is two, and the configuration baseboards of the programmable logic devices to be tested include a second configuration baseboard and a third configuration baseboard, a third switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the first TDI interface and the third TDI interface based on the third switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the third switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the third switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the third control instruction; wherein the first configuration baseboard is used for data transmission; If the number of programmable baseboard devices to be tested is three, and the configuration baseboards of the programmable logic device to be tested include a first configuration baseboard, a second configuration baseboard and a third configuration baseboard, a fourth switch instruction is generated, so that the first configuration baseboard controls the first programming switch of the first configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, the second configuration baseboard controls the first programming switch of the second configuration baseboard to connect the second TDO interface and the third TDI interface based on the fourth switch instruction, controls the second programming switch of the second configuration baseboard to connect the first TDO interface and the third TDO interface based on the fourth switch instruction, and the third configuration baseboard controls the second programming switch of the third configuration baseboard to connect the first TDO interface and the second TDO interface based on the fourth control instruction.
10. The automated testing device for a programmable logic device according to claim 9, characterized in that: After the synchronous testing of each programmable logic device to be tested is performed, the method further includes: generating an automatic test report through the upper computer configuration software based on the test result.