CN114859217A - Automatic testing method and device for digital chip PWM module, digital chip and system - Google Patents

Automatic testing method and device for digital chip PWM module, digital chip and system Download PDF

Info

Publication number
CN114859217A
CN114859217A CN202210561541.6A CN202210561541A CN114859217A CN 114859217 A CN114859217 A CN 114859217A CN 202210561541 A CN202210561541 A CN 202210561541A CN 114859217 A CN114859217 A CN 114859217A
Authority
CN
China
Prior art keywords
pwm
frequency
duty ratio
module
waveform
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.)
Pending
Application number
CN202210561541.6A
Other languages
Chinese (zh)
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.)
Xiamen Ziguang Zhanrui Technology Co ltd
Original Assignee
Xiamen Ziguang Zhanrui Technology 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 Xiamen Ziguang Zhanrui Technology Co ltd filed Critical Xiamen Ziguang Zhanrui Technology Co ltd
Priority to CN202210561541.6A priority Critical patent/CN114859217A/en
Publication of CN114859217A publication Critical patent/CN114859217A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/31708Analysis of signal quality
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/3181Functional testing

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Nonlinear Science (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention provides an automatic testing method, a device, a digital chip and a system of a digital chip PWM module, wherein the testing method specifically comprises the following steps: setting a clock source of a PWM module to be tested, and outputting the frequency and duty ratio of a PWM waveform, so that the PWM module to be tested generates a corresponding PWM waveform, and sending a command to a waveform testing device, so that the waveform testing device automatically measures the frequency and duty ratio of the current PWM waveform; reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and duty ratio, if the frequency and the duty ratio are consistent with the set frequency and duty ratio, passing the test, otherwise, failing to pass the test, and directly ending the test; the method is adopted to test various combination modes of clock sources, frequency and duty ratios.

Description

Automatic testing method and device for digital chip PWM module, digital chip and system
Technical Field
The invention relates to the technical field of chip testing, in particular to an automatic testing method and device of a digital chip PWM module, a digital chip and a system.
Background
A PWM (Pulse Width Modulation) module is a basic functional module of a digital chip, and in order to ensure the function of the PWM module, the PWM module needs to be tested and verified comprehensively. Due to the influence of a variety of parameters, a PWM module can theoretically generate hundreds of millions of waveforms, one for each combination below.
Different clock sources, a PWM module can have 3 to 5 clock sources.
Each clock source may generate a different frequency, for example, an 8-bit divided, 16-bit pattern, which may generate 256 × 25536 — 6537216 waveforms.
Waveforms with duty cycles of 0 to 100% can be generated at each frequency.
One chip typically integrates around 4 PWM modules.
For the billions of waveforms that can be generated, typically around 800 waveforms are measured, even according to typical parameters. The traditional measuring method firstly writes PWM parameters to generate PWM waveforms, then uses an oscilloscope to measure the frequency and the duty ratio, and finally manually checks the result. The whole process needs to consume a large amount of time, and is not beneficial to industrialized testing.
Disclosure of Invention
In order to solve the above problems, the present invention provides an automatic testing method, device, digital chip and system for digital chip PWM module, which can automatically control the generation of PWM waveform and compare the measurement result to complete the full automatic test.
In one aspect, the present invention provides an automated testing method for a digital chip PWM module, comprising:
1) setting a clock source of a PWM module to be tested;
2) setting the frequency of a PWM waveform output by a PWM module under the current clock source;
3) under the current frequency, setting the duty ratio of a PWM waveform output by a PWM module, so that the PWM module to be tested generates a corresponding PWM waveform according to the set clock source, frequency and duty ratio;
4) sending a command to a waveform testing device to enable the waveform testing device to automatically measure the frequency and the duty ratio of the current PWM waveform;
5) reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and the set duty ratio, if the frequency and the duty ratio are consistent with the set frequency and the set duty ratio, passing the test, and entering the step 6), otherwise, failing the test, and directly ending the test;
6) judging whether the last duty ratio is tested, if so, entering a step 7), and if not, returning to the step 3);
7) judging whether the last frequency is tested, if so, entering a step 8), and if not, returning to the step 2);
8) and judging whether the last clock source is tested, if so, finishing the test of the PWM module to be tested, and otherwise, returning to the step 1).
Optionally, if the digital chip includes a plurality of PWM modules, the method further includes:
before the step 1), selecting one PWM module from the plurality of PWM modules as the PWM module to be tested, and gating a signal path between the PWM module to be tested and the waveform measuring device.
Optionally, at each frequency, the duty ratios are sequentially set from 0 to 100% in steps of 1%.
In another aspect, the present invention provides an automatic testing apparatus for a digital chip PWM module, comprising:
the first setting module is used for setting a clock source of the PWM module to be tested;
the second setting module is used for setting the frequency of the PWM waveform output by the PWM module;
the third setting module is used for setting the duty ratio of the PWM waveform output by the PWM module;
a sending module, configured to send a command to a waveform testing device, so that the waveform measuring device measures a frequency and a duty ratio of a PWM waveform corresponding to a current clock source, a current frequency, and a current duty ratio;
the comparison module is used for reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and the set duty ratio, if the frequency and the duty ratio are consistent with the set frequency and the set duty ratio, the test is passed, otherwise, the test is not passed;
the first judgment module is used for judging whether the last duty ratio is tested;
the second judgment module is used for judging whether the last frequency is tested;
and the third judgment module is used for judging whether the last clock source is tested.
In another aspect, the present invention provides a digital chip, which includes at least one PWM module, and further includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the above-mentioned method for automatically testing the PWM module of the digital chip.
In another aspect, the present invention provides an automated testing system for a digital chip PWM module, the system comprising:
the digital chip comprises at least one PWM module, a memory, a processor and a computer program which is stored on the memory and can be run on the processor, and the processor realizes the automatic test method of the PWM module of the digital chip when executing the program;
and the waveform measuring device is connected with the digital chip and used for receiving a command of the digital chip and automatically measuring the frequency and the duty ratio of the PWM waveform corresponding to the current clock source, the current frequency and the current duty ratio.
Optionally, the digital chip is connected to the waveform measuring device through a serial bus.
Optionally, if the digital chip includes a plurality of PWM modules, the system further includes:
and the path selection circuit is used for inputting the PWM waveform output by the PWM module to be tested into the waveform measuring device.
Optionally, the waveform measuring device is a digital oscilloscope.
According to the automatic testing method, device, digital chip and system for the digital chip PWM module, provided by the invention, the generation of the PWM waveform is automatically controlled and compared with the measurement result, the PWM waveforms of various combination modes of a clock source, frequency and duty ratio are covered, the full-automatic test is completed, and the testing efficiency is improved.
Drawings
Fig. 1 is a schematic flowchart of an automated testing method for a digital chip PWM module according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of different combinations of clock source, frequency and duty cycle;
fig. 3 is a schematic structural diagram of an automatic testing apparatus for a digital chip PWM module according to an embodiment of the present invention;
fig. 4 is a block diagram of an automated testing system for a digital chip PWM module according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 1 is a flowchart of an automated testing method for a digital chip PWM module according to an embodiment of the present invention.
Referring to fig. 1, the method is applied to a digital chip, and may include the steps of:
and 101, setting a clock source of the PWM module to be tested.
And 102, setting the frequency of the PWM waveform output by the PWM module under the current clock source.
And 103, setting the duty ratio of the PWM waveform output by the PWM module under the current frequency, so that the PWM module to be tested generates a corresponding PWM waveform according to the set clock source, frequency and duty ratio.
And 104, sending a command to the waveform testing device so that the waveform measuring device automatically measures the frequency and the duty ratio of the current PWM waveform.
And 105, reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and the set duty ratio, if the frequency and the duty ratio are consistent with the set frequency and the set duty ratio, continuing to execute the step 106, and if the frequency and the duty ratio are not consistent with the set frequency and the set duty ratio, directly ending the test.
And step 106, judging whether the last duty ratio is tested, if so, executing step 107, otherwise, returning to step 103.
In each step 103, the duty ratio is sequentially increased according to the set step length, in this embodiment, the value range of the duty ratio is 0-100%, and the duty ratio is sequentially set according to the step length of 1%, that is, set to 0, 1%, 2%, … …, and 100%. At each frequency, a PWM waveform corresponding to a different duty cycle is tested.
Step 107, determining whether the last frequency is tested, if so, executing step 108, otherwise, returning to step 102.
The frequency varies by the number of bits per execution of step 102. As to how the frequency is taken, depending on the specific parameters, taking 8-bit frequency division, 16-bit mode as an example, it is possible to generate 256 × 25536 — 6537216 waveforms.
And 108, judging whether the last clock source is tested, if so, ending the test of the PWM module to be tested, otherwise, returning to the step 101.
Each time step 101 is performed, a clock source is switched.
Further, if the digital chip includes a plurality of PWM modules, before performing step 101, step 100 is performed: one PWM module is selected from the plurality of PWM modules to serve as the PWM module to be tested, and a signal path between the PWM module to be tested and the waveform measuring device is gated. Then, the automated testing is performed according to the steps 101-108. Step 109 is subsequently performed: and judging whether the last PWM module is tested. And sequentially selecting each PWM module as a PWM module to be tested, gating a corresponding signal path, and testing each PWM module until the last PWM module is tested.
Fig. 2 shows different combinations of clock source, frequency and duty cycle for testing the PWM module 1. It can be seen that each PWM module is tested using a different clock source, a different frequency is tested at each clock source, and a different duty cycle is tested at each frequency.
According to the automatic testing method for the digital chip PWM module, provided by the embodiment of the invention, the generation of the PWM waveform is automatically controlled to be compared with the measurement result, the PWM waveforms of various combination modes of a clock source, frequency and duty ratio are covered, the full-automatic test is completed, and the testing efficiency is improved.
Fig. 3 is a schematic structural diagram of an automatic testing apparatus for a digital chip PWM module according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first setting module 301, a second setting module 302, a third setting module 303, a sending module 304, a comparing module 305, a first judging module 306, a second judging module 307, and a third judging module 308, wherein,
the first setting module 301 is configured to set a clock source of the PWM module to be tested;
a second setting module 302, configured to set a frequency of a PWM waveform output by the PWM module;
a third setting module 303, configured to set a duty ratio of a PWM waveform output by the PWM module;
a sending module 304, configured to send a command to the waveform testing apparatus, so that the waveform measuring apparatus measures the frequency and the duty ratio of the PWM waveform corresponding to the current clock source, the current frequency, and the current duty ratio;
a comparing module 305, configured to read the frequency and duty ratio of the PWM waveform measured by the waveform measuring apparatus, and compare the frequency and duty ratio with the set frequency and duty ratio, if the frequency and duty ratio are consistent, the test is passed, otherwise the test is not passed;
a first judging module 306, configured to judge whether the last duty cycle is tested;
a second judging module 307, configured to judge whether the last frequency is tested;
the third determining module 308 is configured to determine whether the last clock source is tested.
The automatic testing device for the digital chip PWM module according to the embodiments of the present invention is used for executing the above method embodiments, and specific processes and details thereof may refer to the above method embodiments, and are not described herein again.
In another aspect, an embodiment of the present invention provides a digital chip, where the digital chip includes at least one PWM module, and further includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the program, the processor implements the method for automatically testing the PWM module of the digital chip provided in the foregoing method embodiment.
On the other hand, an embodiment of the present invention further provides an automated testing system for a digital chip PWM module, fig. 4 shows a block diagram of a structure of the system, and as shown in fig. 4, the system includes:
the digital chip 401 comprises at least one PWM module, and further comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the automatic testing method of the digital chip PWM module provided in the above method embodiment when executing the program;
and a waveform measuring device 402 connected to the digital chip 401 for receiving a command from the digital chip 401 and automatically measuring the frequency and duty ratio of the PWM waveform corresponding to the current clock source, the current frequency and the current duty ratio.
The waveform measuring device 402 may be a digital oscilloscope with an automatic measuring function. The digital chip 401 and the waveform measuring device 402 are connected by a serial bus. And the digital chip reads the frequency and the duty ratio of the PWM waveform through serial port communication and then compares the frequency and the duty ratio with the set frequency and the set duty ratio.
Further, referring to fig. 4, the digital chip 401 includes 4 PWM modules, and the system further includes:
and a path selection circuit 403, configured to input the PWM waveform output by the PWM module to be tested to the waveform measurement device 402.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. An automatic test method for a digital chip PWM module is characterized by comprising the following steps:
1) setting a clock source of a PWM module to be tested;
2) setting the frequency of a PWM waveform output by a PWM module under the current clock source;
3) under the current frequency, setting the duty ratio of a PWM waveform output by a PWM module, so that the PWM module to be tested generates a corresponding PWM waveform according to the set clock source, frequency and duty ratio;
4) sending a command to a waveform testing device to enable the waveform testing device to automatically measure the frequency and the duty ratio of the current PWM waveform;
5) reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and the set duty ratio, if the frequency and the duty ratio are consistent with the set frequency and the set duty ratio, passing the test, and entering the step 6), otherwise, failing the test, and directly ending the test;
6) judging whether the last duty ratio is tested, if so, entering a step 7), and if not, returning to the step 3);
7) judging whether the last frequency is tested, if so, entering a step 8), and if not, returning to the step 2);
8) and judging whether the last clock source is tested, if so, finishing the test of the PWM module to be tested, and otherwise, returning to the step 1).
2. The method of claim 1, wherein if the digital chip comprises a plurality of PWM modules, the method further comprises:
before the step 1), selecting one PWM module from the plurality of PWM modules as the PWM module to be tested, and gating a signal path between the PWM module to be tested and the waveform measuring device.
3. The method according to claim 1, characterized in that at each frequency the duty cycle is set in steps of 1% from 0 to 100%.
4. An automated testing apparatus for digital chip PWM modules, the apparatus comprising:
the first setting module is used for setting a clock source of the PWM module to be tested;
the second setting module is used for setting the frequency of the PWM waveform output by the PWM module;
the third setting module is used for setting the duty ratio of the PWM waveform output by the PWM module;
a sending module, configured to send a command to a waveform testing device, so that the waveform measuring device measures a frequency and a duty ratio of a PWM waveform corresponding to a current clock source, a current frequency, and a current duty ratio;
the comparison module is used for reading the frequency and the duty ratio of the PWM waveform measured by the waveform measuring device, comparing the frequency and the duty ratio with the set frequency and the set duty ratio, if the frequency and the duty ratio are consistent with the set frequency and the set duty ratio, the test is passed, otherwise, the test is not passed;
the first judgment module is used for judging whether the last duty ratio is tested;
the second judgment module is used for judging whether the last frequency is tested;
and the third judgment module is used for judging whether the last clock source is tested.
5. A digital chip comprising at least one PWM module, further comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the method for automated testing of PWM modules of a digital chip according to any one of claims 1 to 3.
6. An automated test system for digital chip PWM modules, said system comprising:
a digital chip, the digital chip comprising at least one PWM module, further comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the automated testing method of the digital chip PWM module according to any one of claims 1 to 3 when executing the program;
and the waveform measuring device is connected with the digital chip and used for receiving a command of the digital chip and automatically measuring the frequency and the duty ratio of the PWM waveform corresponding to the current clock source, the current frequency and the current duty ratio.
7. The system of claim 6, wherein the digital chip and the waveform measuring device are connected by a serial bus.
8. The system of claim 6, wherein if the digital chip includes a plurality of PWM modules, the system further comprises:
and the path selection circuit is used for inputting the PWM waveform output by the PWM module to be tested into the waveform measuring device.
9. The system of claim 6, wherein the waveform measuring device is a digital oscilloscope.
CN202210561541.6A 2022-05-23 2022-05-23 Automatic testing method and device for digital chip PWM module, digital chip and system Pending CN114859217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210561541.6A CN114859217A (en) 2022-05-23 2022-05-23 Automatic testing method and device for digital chip PWM module, digital chip and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210561541.6A CN114859217A (en) 2022-05-23 2022-05-23 Automatic testing method and device for digital chip PWM module, digital chip and system

Publications (1)

Publication Number Publication Date
CN114859217A true CN114859217A (en) 2022-08-05

Family

ID=82640123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210561541.6A Pending CN114859217A (en) 2022-05-23 2022-05-23 Automatic testing method and device for digital chip PWM module, digital chip and system

Country Status (1)

Country Link
CN (1) CN114859217A (en)

Similar Documents

Publication Publication Date Title
US3927371A (en) Test system for large scale integrated circuits
CN109582525A (en) Test code verification method, verifying device, equipment and storage medium
WO2010061523A1 (en) Testing method and program product used therein
TW202247617A (en) Optical transmitter tuning using machine learning and reference parameters
CN113347067B (en) Bandwidth determination method, device and equipment for PCIe signal
JP2002517762A (en) Integrated circuit tester with amorphous logic
JP2014532861A (en) Programmable test equipment
CN114859217A (en) Automatic testing method and device for digital chip PWM module, digital chip and system
JP2952131B2 (en) Test equipment for semiconductor integrated circuits
CN112560393B (en) Comparison verification method and device of EDA software tool
JPH03136261A (en) Measurement of direct current-voltage characteristic of semiconductor device
CN111665432B (en) Verification method, device, equipment and storage medium for chip pin multiplexing module
CN110446936B (en) Waveform signal detection method and device
JP2000149593A (en) Ic testing apparatus
CN219369857U (en) Device for measuring time constant and chip
JPH102937A (en) Ic tester
CN212255587U (en) Detection apparatus for chip consumption
CN107807882B (en) Sequential algorithm block testing method and device based on MPU operation
KR20240033767A (en) Apparatus for testing can fd communication module for vehicle and method thereof
CN117332733A (en) Method, equipment and storage medium for positioning errors of logic system design
CN116560928A (en) Multi-graphics processor performance balance test method, device and medium thereof
JPH05142303A (en) Dynamic inspecting method for digital logic circuit
CN117169768A (en) Power consumption testing device, system and method
CN116125297A (en) Simulation method and device for battery circulation working condition
JPH10239395A (en) Testing device for semiconductor

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