WO2012022065A1 - Method and system for realizing automatic tests of digital signal processor (dsp) - Google Patents

Method and system for realizing automatic tests of digital signal processor (dsp) Download PDF

Info

Publication number
WO2012022065A1
WO2012022065A1 PCT/CN2010/077649 CN2010077649W WO2012022065A1 WO 2012022065 A1 WO2012022065 A1 WO 2012022065A1 CN 2010077649 W CN2010077649 W CN 2010077649W WO 2012022065 A1 WO2012022065 A1 WO 2012022065A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
dsp
module
project
algorithm simulation
Prior art date
Application number
PCT/CN2010/077649
Other languages
French (fr)
Chinese (zh)
Inventor
陈思宏
田丰
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012022065A1 publication Critical patent/WO2012022065A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Definitions

  • the present invention relates to the field of digital signal processor technologies, and more particularly to a method and system for implementing automatic testing of a digital signal processor.
  • the Digital Signal Processor is a microprocessor with a special structure.
  • the Harvard structure with separate programs and data is used inside the DSP chip. It has a dedicated hardware multiplier and is widely used in pipeline operations. Special DSP instructions can be used to quickly implement various digital signal processing algorithms.
  • DSP chip is an important technical tool for the practical process of digital signal processing theory. Due to the excellent digital signal processing capability of the DSP, it has been widely used in the baseband digital signal processing part.
  • the digital layer is mainly used to implement the physical layer protocol and the related digital signal processing algorithm.
  • the general design flow of the DSP processing system is: The first step is to determine performance indicators and signal processing requirements based on the application system. In the second step, the algorithm is simulated in a high-level language according to the requirements of the system, and the relevant data of the algorithm simulation is saved as the basis for DSP test verification.
  • the third step is the DSP system software and hardware system design.
  • the fourth step is debugging and testing, comparing real-time results with simulation results.
  • Mode 1 add test code to the DSP project 11 source file, first write the data to be tested and the operating conditions to the DSP, and then compare the operation result with the simulation result at the corresponding test point to determine whether it is correct. .
  • the shortcomings of this method are obvious. It is easy to introduce new errors in the modification of the DSP engineering source code, and different test data and test conditions need to change the code of the DSP project, which is inefficient.
  • the relevant algorithm simulation software development programming interface 21 can be used to enable the algorithm simulation software to directly communicate with the DSP development tool, without writing test code to the DSP source program.
  • the DSP project can be tested.
  • This method The disadvantage is that only the fixed chip of the fixed manufacturer can adapt to this programming interface. Most other manufacturers' DSP chips do not support this programming interface, and the compatibility is poor.
  • Mode 3 integrates a script running environment in the existing DSP development software 31, for example, embedding a script running environment in an existing DSP development environment Code Warrior.
  • Simulation scripts can be run in a scripting environment for some automation and without the need to change DSP engineering code.
  • the shortcoming of this method is that the simulation environment is enclosed in the DSP development tool. It is necessary to write the corresponding test script for different test cases, and also requires the developer to be familiar with script programming.
  • the technical problem to be solved by the present invention is to provide a method and system for realizing automatic test of a digital signal processor, and to improve the ability of automatic testing of DSP engineering.
  • the present invention provides a method for implementing automatic test of a digital signal processor, comprising: constructing a test platform, and implementing algorithm simulation module and digital signal processor (DSP) development by running a unified script in the test platform Inter-module communication, controlling the algorithm simulation module to run an algorithm simulation project by the test platform to generate a test case, and controlling the DSP development module to run a DSP project corresponding to the algorithm simulation project and execute the test case, Get the test results for this DSP project.
  • DSP digital signal processor
  • the above method can have the following characteristics:
  • the algorithm simulation module generates a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter; the test platform automatically extracts the test case, according to the configured
  • the operating attribute parameter of the DSP project inputs the test condition and test data to a corresponding location of the DSP project and executes the test case.
  • the above method may also have the following features:
  • the test case includes the simulation test result obtained by the algorithm simulation module running the algorithm simulation project according to the test condition and test data, and the test platform outputs the test result output by the DSP development module and the simulation test. The results were compared to obtain comparative results.
  • the above method may also have the following features:
  • the test platform sets the comparison precision parameter used when the test result comparison module compares the results
  • test platform compares the test result output by the DSP development module with the simulated test result to obtain a comparison result, and the test result output by the DSP development module is compared according to the comparison precision parameter.
  • the simulation test results in the test cases output by the algorithm simulation module are compared to obtain comparison results.
  • the above method may also have the following features:
  • the method further includes:
  • the test platform classifies the comparison results and outputs a test report.
  • the present invention further provides a system for implementing automatic test of a digital signal processor, the system comprising a test platform; the test platform includes an algorithm simulation module and a digital signal processor (DSP) development module;
  • DSP digital signal processor
  • the test platform is configured to run a unified script to implement communication between the algorithm simulation module and the DSP development module, control the algorithm simulation module to run an algorithm simulation project to generate a test case, and control the DSP development module operation and the algorithm simulation.
  • the DSP project corresponding to the project executes the test case and obtains the test result of the DSP project.
  • the above system may also have the following characteristics:
  • the test platform also includes a configuration module
  • the configuration module is configured to set an operation attribute parameter of the algorithm simulation project, a running attribute parameter of the DSP project, and a use case parameter used to generate the test case;
  • the algorithm simulation module is configured to generate a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter;
  • the DSP development module is configured to input the test condition and test data to a corresponding location of the DSP project and execute the test case according to the configured operational attribute parameter of the DSP project.
  • the above system may also have the following characteristics:
  • the test platform further includes a data transmission module; the data transmission module is configured to detect whether the algorithm simulation module generates a new test case in real time, and when detecting a new test case, transmit the new test case to The DSP development module.
  • the above system may also have the following characteristics:
  • the test platform further includes a test result comparison module
  • the configuration module is further configured to: set a comparison precision parameter used when the test result comparison module compares results;
  • the test result comparison module is configured to compare the test result output by the DSP development module with the simulation test result outputted by the algorithm simulation module according to the comparison precision parameter in the configuration module to obtain a comparison result.
  • the above system may also have the following characteristics:
  • the test platform further includes a main control module, and the main control module is configured to trigger function execution of each functional module in the test platform according to a sequence of the process.
  • the invention provides a complete script test platform, so that the DSP engineering test is not restricted by the fixed manufacturer fixed DSP chip series, and the test engineering code does not change the DSP engineering structure, so that the developer does not need to be familiar with the script programming and does not need to modify the DSP engineering code.
  • Under the joint algorithm simulation software such as Matlab
  • DSP development tools such as Freesclar Code Warrior
  • FIG. 1 is a schematic diagram of a simulation test method 1 for a DSP in the prior art
  • 2 is a schematic diagram of a second simulation test method for a DSP in the prior art
  • 3 is a schematic diagram of a simulation test mode 3 for a DSP in the prior art
  • FIG. 4 is a structural diagram of a system for implementing automatic testing of a digital signal processor in an embodiment
  • FIG. 5 is a flow chart of a method for implementing automatic test of a digital signal processor in an embodiment
  • FIG. 6 is a flow chart of a method for implementing automatic testing of a digital signal processor in a specific embodiment.
  • the present invention implements a joint automatic simulation of algorithm simulation engineering and DSP engineering through a script program control algorithm simulation module and a digital signal processor (DSP) development module, and automatically compares the two tests. As a result, the output details are reported.
  • the system for implementing automatic test of the digital signal processor includes a test platform including an algorithm simulation module 41 and a digital signal processor (DSP) development module 42.
  • the test platform is configured to run a unified script to implement communication between the algorithm simulation module and the DSP development module, and is further configured to control the algorithm simulation module to run an algorithm simulation project to generate a test case, and control the DSP development module to run and the algorithm.
  • the DSP project corresponding to the simulation project is executed and the test case is executed, and the test result of the DSP project is obtained.
  • This test platform can be implemented in a variety of scripting languages, such as the Tool Command Language (TCL).
  • TCL scripting language is a general-purpose scripting language that runs on almost all platforms and is powerful and often used for rapid prototyping, scripting, graphical user interfaces, and testing.
  • the test platform also includes a main control module 43, a configuration module 44, a data transmission module 45, a test result comparison module 48, and a report output module 47.
  • the main control module is configured to trigger the function execution of each functional module in the test platform according to the timing of the process, and perform unified management on each functional module.
  • the triggering algorithm simulation module first reads the information of the configuration module and starts the running algorithm simulation project (for example, the Matlab simulation project corresponding to the DSP project to be tested), and triggers the data transmission module to detect whether a new test case is generated in real time, if If there is a call, the DSP development module is called for automatic testing.
  • the main control module controls each functional module according to the timing of the process until all the test cases generated by the algorithm simulation module are executed.
  • the configuration module is set to set the running attribute parameters of the algorithm simulation engineering, DSP engineering Run property parameters, as well as use case parameters for generating test cases.
  • the running attributes of the algorithm simulation engineering and the DSP engineering include the name and location of the project (including the stored file path information), the running parameters, the location of the imported test conditions and test data, the position of the test result output, and the test result. Storage location (including the name and location of the stored file).
  • the use case parameters of the test case include the path information generated by the test case, the test condition storage location, the test name and the file name and location where the test data is stored, and the file name and location of the DSP engineering test result.
  • the configuration module is the interface between the test platform and the user. The user only needs to modify the configuration file to complete the construction of the test platform.
  • This configuration module allows developers who do not understand scripting to work properly with TCL scripting test platforms through configuration files. This module is called by other modules of the platform to complete the automated test process.
  • the algorithm simulation module is a function module or implementation environment that is set to implement algorithm simulation software (such as Matlab software).
  • the algorithm simulation module is configured to generate a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation simulation project and the use case parameter.
  • the DSP development module is a functional module or implementation environment that is configured to implement DSP development tools (such as the CodeWarrior development tool) and is responsible for the compilation and operation of the DSP project.
  • the DSP development module is configured to input the test condition and test data to a corresponding location of the DSP project and execute the test case according to the configured operational attribute parameters of the DSP project.
  • the data transmission module is configured to detect in real time whether the algorithm simulation module generates a new test case, and when detecting a new test case, transmit the test case to the DSP development module.
  • the data transfer module stores the test case classifications to the locations set in the configuration module.
  • the data transfer module is also set to detect if there is last test data in the data folder of the platform, and if so, back up the data for regression test comparison.
  • the data transfer module can also include a data extension conversion unit through which the script can be programmed to convert the data format so that the user can recombine the test data according to the actual needs of the DSP project.
  • the configuration module is further configured to set a comparison precision parameter used when the test result comparison module compares the results.
  • the test result comparison module is configured to: simulate the test result output by the DSP development module and the simulation in the test case output by the algorithm simulation module according to the contrast precision parameter in the configuration module The test results are compared and the comparison results are obtained.
  • the comparison accuracy can be accurate to the first data and start to go wrong.
  • the report output module is configured to sort the comparison results and output a test report.
  • the output report can be divided into two categories. One is the real-time change, and the test is updated every time a test case is completed. The other is that all the use cases are summarized after the test is completed.
  • the final summary output report is subdivided into two, one is to summarize the pass rate and list whether the test case is passed, and the other is to list in detail which of the first test items of the test case is wrong.
  • the test platform can be run in the same computer (PC) as the algorithm simulation software (such as Matlab software) running by the algorithm simulation module.
  • the relevant files of the test platform are stored in a file directory of the PC.
  • AutoTest _WS stores all files of the test platform, including platform master files, configuration files, report files, error report files, and data directories and platforms.
  • Module directory ; directory AutoTest - WS subdirectory FOR - DSP - SIM stores the current test case data; Directory FOR - DSP - SIM subdirectory FOR - DSP - SIM - xxxx Use time as a label to store the previous test case data, FOR — DSP—SIM is an automatically generated directory; directory AutoTest—a subdirectory of WS stores platform-related module code; directory SOURCE's subdirectory log stores DSP project compilation information, executed command information, and instant update report directory SOURCE file.
  • a method for implementing automatic test of a digital signal processor includes:
  • Step 501 Construct a test platform, and implement communication between the algorithm simulation module and the digital signal processor (DSP) development module by running a unified script in the test platform;
  • DSP digital signal processor
  • Step 502 Control, by the test platform, the algorithm simulation module to run an algorithm simulation project to generate a test case
  • Step 503 Control the DSP development module to run a DSP project corresponding to the algorithm simulation project and execute the test case, and obtain test results for the DSP project.
  • the operating attribute parameter of the algorithm simulation engineering, the running attribute parameter of the DSP project, and the use case parameter used to generate the test case are set in the test platform; the algorithm simulation module simulates the simulation project according to the configured algorithm. Run attribute parameters and the use case parameters a test case including test conditions and test data; the test platform automatically extracts the test case, and inputs the test condition and test data to a corresponding position of the DSP project according to the configured run attribute parameter of the DSP project And executing the test case.
  • the test case includes the simulation test result obtained by the algorithm simulation module running the algorithm simulation engineering according to the test condition and the test data, and the test platform outputs the test result output by the DSP development module and the simulation The test results were compared to obtain comparison results.
  • the test platform sets the comparison precision parameter used by the test result comparison module to compare the results, and after obtaining the test result of the DSP project, the test result output by the DSP development module is compared according to the comparison precision parameter.
  • the simulation test results in the test cases output by the algorithm simulation module are compared to obtain comparison results.
  • the test platform can also sort the comparison results and output test 4 reports.
  • the present invention is applied to Freescale's DSP development tool CodeWarrior and MathWorks' algorithm simulation tool Matlab for automated test of DSP engineering.
  • the DSP project and its supporting algorithm simulation project that is, the Matlab project
  • the configuration file of the automated test platform is set
  • the attributes of the DSP engineering and the algorithm simulation project are configured through the file
  • the test conditions and data are inserted into the DSP project.
  • the location specifies the location in the DSP project where the result data is obtained.
  • the method for implementing automatic test of the digital signal processor includes:
  • Step 601 Execute the platform master script, and the automated test platform parses the configuration file.
  • Step 602 The test platform starts the matching Matlab project in the background by using the command mode;
  • Step 603 the Matlab project runs and generates relevant test case data (including the result of the simulation test) ) ;
  • Step 604 the test platform automatically queries the test case data generation folder to determine whether a new use case is generated, if any, step 605 is performed, otherwise, step 604 is executed; Step 605: Transfer the data to the platform test data storage directory.
  • Step 606 Start a DSP development tool to test the DSP project; the step includes: Step 6061, compiling and running the DSP project to be tested;
  • Step 6062 Import, according to the configuration file information, the relevant test condition and test data into the memory or register of the DSP at the specified engineering location;
  • Step 6063 Output the test result in the engineering location specified by the configuration file
  • Step 6064 the test platform compares the output result with the simulation result, and makes a detailed record
  • Step 6065 Update the test report file according to the comparison result
  • Step 607 Determine whether the Matlab project ends the operation. If yes, go to step 608. Otherwise, skip to step 604 to execute the loop until the Matlab project runs.
  • Step 608 After all the use cases are finished running, the test is refreshed and outputted.
  • the invention establishes a unified testing platform through the TCL scripting language, completes a unified testing platform of the joint algorithm simulation software and the DSP development software, and can perform high-efficiency automatic simulation of the DSP engineering through the platform, and the control algorithm simulation software (such as Matlab) Realize automatic generation of test conditions and data, control DSP development software (such as Code Warrior) to realize automatic compilation and operation of DSP engineering, automatic setting of test conditions, automatic import of test data, automatic export of test results, and test by platform The result is an automatic comparison to generate a test.
  • the invention integrates many scattered resources and steps involved in the whole DSP engineering test process through TCL scripts, and uniformly manages each test process through an automated script platform to realize the automation of the test process.
  • the present invention provides a method and system for realizing automatic test of a digital signal processor.
  • the DSP engineering test is not restricted by a fixed manufacturer's fixed DSP chip series, no test code is added, and the DSP project is not changed.
  • the structure allows developers to perform automated simulation tests on DSP projects without the need to be familiar with script programming and without modifying the DSP engineering code. Real-time generation of test data, automatic comparison of test results, Automatic generation of test reports; improved automation of DSP testing, saving labor costs and increasing production efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A method and a system for realizing automatic tests of a Digital Signal Processor (DSP) are provided. The method comprises: constructing a test platform, and realizing the communication between an algorithm simulation module (41) and a DSP development module (42) through running a unified script in the test platform (501); generating a test case through the test platform controlling the algorithm simulation module (41) to run an algorithm simulation project (502); and controlling the DSP development module (42) to run the DSP project corresponding to the algorithm simulation project and perform the test case, and obtaining the test result for the DSP project (503). The method and the system for realizing automatic tests of a DSP provided by the solution unite algorithm simulation software and a DSP development tool to perform automation simulation tests for the DSP project, and realize real-time generation of test data, automatic comparison of test results and automatic generation of a test report. The solution increases the automation level of the DSP test, saves the manpower cost and improves the production efficiency.

Description

实现数字信号处理器自动测试的方法及***  Method and system for realizing automatic test of digital signal processor
技术领域 Technical field
本发明涉及数字信号处理器技术领域, 尤其涉及实现数字信号处理器自 动测试的方法及***。  The present invention relates to the field of digital signal processor technologies, and more particularly to a method and system for implementing automatic testing of a digital signal processor.
背景技术 Background technique
数字信号处理器 (Digital Signal Processor, 简称 DSP)是一种具有特殊结 构的微处理器, DSP芯片内部釆用程序和数据分开的哈佛结构, 具有专门的 硬件乘法器, 广泛釆用流水线操作, 提供特殊的 DSP指令, 可以用来快速地 实现各种数字信号处理算法。 DSP芯片作为近年来迅速发展的可编程专用芯 片, 是数字信号处理理论实用化过程的重要技术工具。 由于 DSP出色的数字 信号处理能力, 在基带数字信号处理部分得到了广泛的应用, 在无线通信设 备的基带处理部分主要釆用数字电路实现物理层协议和相关的数字信号处理 算法。  The Digital Signal Processor (DSP) is a microprocessor with a special structure. The Harvard structure with separate programs and data is used inside the DSP chip. It has a dedicated hardware multiplier and is widely used in pipeline operations. Special DSP instructions can be used to quickly implement various digital signal processing algorithms. As a programmable special chip that has been rapidly developed in recent years, DSP chip is an important technical tool for the practical process of digital signal processing theory. Due to the excellent digital signal processing capability of the DSP, it has been widely used in the baseband digital signal processing part. In the baseband processing part of the wireless communication device, the digital layer is mainly used to implement the physical layer protocol and the related digital signal processing algorithm.
DSP处理***的一般设计流程是: 第一步,根据应用***确定性能指标、 信号处理要求。 第二步, 根据***的要求用高级语言进行算法模拟, 并将算 法模拟的相关数据保存作为 DSP测试验证的依据。 第三步, DSP***软硬件 ***设计。 第四步是调试及测试, 比较实时结果和模拟结果。  The general design flow of the DSP processing system is: The first step is to determine performance indicators and signal processing requirements based on the application system. In the second step, the algorithm is simulated in a high-level language according to the requirements of the system, and the relevant data of the algorithm simulation is saved as the basis for DSP test verification. The third step is the DSP system software and hardware system design. The fourth step is debugging and testing, comparing real-time results with simulation results.
目前对于 DSP的仿真测试, 主要有以下 3种方式:  At present, there are three main methods for the simulation test of DSP:
方式 1 , 如图 1所示, 在 DSP工程 11源文件中添加测试代码, 先将待测 数据与运行条件写入 DSP, 然后在相应的测试点将运算结果和仿真结果进行 比对判断是否正确。 这种方法的缺点很明显, 对 DSP工程源代码进行改动容 易引入新的错误, 并且不同的测试数据和测试条件都需要重新更改 DSP工程 的代码, 效率低下。  Mode 1, as shown in Figure 1, add test code to the DSP project 11 source file, first write the data to be tested and the operating conditions to the DSP, and then compare the operation result with the simulation result at the corresponding test point to determine whether it is correct. . The shortcomings of this method are obvious. It is easy to introduce new errors in the modification of the DSP engineering source code, and different test data and test conditions need to change the code of the DSP project, which is inefficient.
方式 2 , 如图 2所示, 对于某些系列的 DSP芯片, 可以使用相关的算法 模拟软件开发编程接口 21使算法模拟软件可以直接和 DSP开发工具通信, 可以无需对 DSP源程序编写测试代码便可以对 DSP工程进行测试。这种方法 的缺点是, 只有固定厂商的固定芯片可以适配此编程接口, 大多数其它厂家 的 DSP芯片不支持此编程接口, 兼容性能差。 Mode 2, as shown in Figure 2, for some series of DSP chips, the relevant algorithm simulation software development programming interface 21 can be used to enable the algorithm simulation software to directly communicate with the DSP development tool, without writing test code to the DSP source program. The DSP project can be tested. This method The disadvantage is that only the fixed chip of the fixed manufacturer can adapt to this programming interface. Most other manufacturers' DSP chips do not support this programming interface, and the compatibility is poor.
方式 3 , 如图 3所示, 在现有的 DSP开发软件 31中集成脚本运行环境, 例如在现有的 DSP开发环境 Code Warrior中嵌入脚本运行环境。 可以在脚本 环境中运行仿真脚本, 实现一定的自动化, 并且无需改动 DSP工程代码。 此 方法的不足是仿真环境封闭于 DSP开发工具中, 对于不同测试用例需要编写 相应的测试脚本, 同时也需要开发人员熟悉脚本编程。  Mode 3, as shown in FIG. 3, integrates a script running environment in the existing DSP development software 31, for example, embedding a script running environment in an existing DSP development environment Code Warrior. Simulation scripts can be run in a scripting environment for some automation and without the need to change DSP engineering code. The shortcoming of this method is that the simulation environment is enclosed in the DSP development tool. It is necessary to write the corresponding test script for different test cases, and also requires the developer to be familiar with script programming.
发明内容 Summary of the invention
本发明要解决的技术问题是提供实现数字信号处理器自动测试的方法及 ***, 提高对 DSP工程自动测试的能力。  The technical problem to be solved by the present invention is to provide a method and system for realizing automatic test of a digital signal processor, and to improve the ability of automatic testing of DSP engineering.
为了解决上述技术问题, 本发明提供了实现数字信号处理器自动测试的 方法, 包括: 构建测试平台, 通过在所述测试平台中运行统一的脚本实现算 法模拟模块和数字信号处理器 (DSP )开发模块间的通信, 通过所述测试平 台控制所述算法模拟模块运行算法仿真工程以生成测试用例, 并控制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述测试用 例, 得到对该 DSP工程的测试结果。  In order to solve the above technical problem, the present invention provides a method for implementing automatic test of a digital signal processor, comprising: constructing a test platform, and implementing algorithm simulation module and digital signal processor (DSP) development by running a unified script in the test platform Inter-module communication, controlling the algorithm simulation module to run an algorithm simulation project by the test platform to generate a test case, and controlling the DSP development module to run a DSP project corresponding to the algorithm simulation project and execute the test case, Get the test results for this DSP project.
优选地, 上述方法可以具有以下特点:  Preferably, the above method can have the following characteristics:
在所述测试平台中设置算法仿真工程的运行属性参数、 DSP工程的运行 属性参数, 以及用于生成测试用例的用例参数;  Setting an operation attribute parameter of the algorithm simulation project, a running attribute parameter of the DSP project, and a use case parameter for generating the test case in the test platform;
其中, 在通过所述测试平台控制所述算法模拟模块运行算法仿真工程以 生成测试用例, 并控制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述测试用例的处理中, 所述算法模拟模块根据所配置的所 述算法仿真工程的运行属性参数以及所述用例参数生成包含测试条件和测试 数据的测试用例; 所述测试平台自动提取所述测试用例, 根据所配置的所述 DSP工程的运行属性参数,将所述测试条件和测试数据输入至 DSP工程的相 应位置并执行所述测试用例。  Controlling, by the test platform, the algorithm simulation module to run an algorithm simulation project to generate a test case, and controlling the DSP development module to run a DSP project corresponding to the algorithm simulation project and executing the test case. The algorithm simulation module generates a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter; the test platform automatically extracts the test case, according to the configured The operating attribute parameter of the DSP project inputs the test condition and test data to a corresponding location of the DSP project and executes the test case.
优选地, 上述方法还可以具有以下特点: 所述测试用例中包括所述算法模拟模块根据所述测试条件和测试数据运 行所述算法仿真工程得到的模拟测试结果, 所述测试平台将所述 DSP开发模 块输出的测试结果与所述模拟测试结果进行对比得到对比结果。 Preferably, the above method may also have the following features: The test case includes the simulation test result obtained by the algorithm simulation module running the algorithm simulation project according to the test condition and test data, and the test platform outputs the test result output by the DSP development module and the simulation test. The results were compared to obtain comparative results.
优选地, 上述方法还可以具有以下特点:  Preferably, the above method may also have the following features:
所述测试平台设置所述测试结果对比模块进行结果对比时使用的对比精 度参数;  The test platform sets the comparison precision parameter used when the test result comparison module compares the results;
其中, 在所述测试平台将所述 DSP开发模块输出的测试结果与所述模拟 测试结果进行对比得到对比结果的处理中, 根据所述对比精度参数将所述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的模拟 测试结果进行对比得到对比结果。  Wherein the test platform compares the test result output by the DSP development module with the simulated test result to obtain a comparison result, and the test result output by the DSP development module is compared according to the comparison precision parameter. The simulation test results in the test cases output by the algorithm simulation module are compared to obtain comparison results.
优选地, 上述方法还可以具有以下特点:  Preferably, the above method may also have the following features:
在将测试结果与模拟测试结果进行对比得到对比结果之后, 所述方法还 包括:  After comparing the test result with the simulated test result to obtain a comparison result, the method further includes:
所述测试平台对所述对比结果进行分类整理, 输出测试 4艮告。  The test platform classifies the comparison results and outputs a test report.
为了解决上述技术问题, 本发明还提供了实现数字信号处理器自动测试 的***, 所述***包括测试平台; 所述测试平台中包括算法模拟模块和数字 信号处理器(DSP )开发模块;  In order to solve the above technical problem, the present invention further provides a system for implementing automatic test of a digital signal processor, the system comprising a test platform; the test platform includes an algorithm simulation module and a digital signal processor (DSP) development module;
所述测试平台设置为, 运行统一的脚本实现算法模拟模块和 DSP开发模 块间的通信, 控制所述算法模拟模块运行算法仿真工程以生成测试用例, 控 制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述测 试用例, 并得到对该 DSP工程的测试结果。  The test platform is configured to run a unified script to implement communication between the algorithm simulation module and the DSP development module, control the algorithm simulation module to run an algorithm simulation project to generate a test case, and control the DSP development module operation and the algorithm simulation. The DSP project corresponding to the project executes the test case and obtains the test result of the DSP project.
优选地, 上述***还可以具有以下特点:  Preferably, the above system may also have the following characteristics:
所述测试平台还包括配置模块,  The test platform also includes a configuration module,
所述配置模块设置为, 设置算法仿真工程的运行属性参数、 DSP工程的 运行属性参数, 以及用于生成测试用例的用例参数;  The configuration module is configured to set an operation attribute parameter of the algorithm simulation project, a running attribute parameter of the DSP project, and a use case parameter used to generate the test case;
所述算法模拟模块设置为, 根据所配置的所述算法仿真工程的运行属性 参数以及所述用例参数生成包含测试条件和测试数据的测试用例; 所述 DSP开发模块设置为,根据所配置的所述 DSP工程的运行属性参数, 将所述测试条件和测试数据输入至 DSP 工程的相应位置并执行所述测试用 例。 The algorithm simulation module is configured to generate a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter; The DSP development module is configured to input the test condition and test data to a corresponding location of the DSP project and execute the test case according to the configured operational attribute parameter of the DSP project.
优选地, 上述***还可以具有以下特点:  Preferably, the above system may also have the following characteristics:
所述测试平台还包括数据传输模块; 所述数据传输模块设置为, 实时检 测所述算法模拟模块是否产生新的测试用例, 检测到产生新的测试用例时, 将所述新的测试用例传输至所述 DSP开发模块。  The test platform further includes a data transmission module; the data transmission module is configured to detect whether the algorithm simulation module generates a new test case in real time, and when detecting a new test case, transmit the new test case to The DSP development module.
优选地, 上述***还可以具有以下特点:  Preferably, the above system may also have the following characteristics:
所述测试平台还包括测试结果对比模块;  The test platform further includes a test result comparison module;
所述配置模块还设置为, 设置所述测试结果对比模块进行结果对比时使 用的对比精度参数;  The configuration module is further configured to: set a comparison precision parameter used when the test result comparison module compares results;
所述测试结果对比模块设置为, 根据所述配置模块中的对比精度参数将 所述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的 模拟测试结果进行对比得到对比结果。  The test result comparison module is configured to compare the test result output by the DSP development module with the simulation test result outputted by the algorithm simulation module according to the comparison precision parameter in the configuration module to obtain a comparison result.
优选地, 上述***还可以具有以下特点:  Preferably, the above system may also have the following characteristics:
所述测试平台还包括主控模块; 所述主控模块设置为, 根据流程的时序 触发所述测试平台中各功能模块的功能执行。  The test platform further includes a main control module, and the main control module is configured to trigger function execution of each functional module in the test platform according to a sequence of the process.
本发明通过提供一个完整脚本测试平台, 使得 DSP工程测试不受固定厂 商固定 DSP芯片系列的约束, 不添加测试代码不改变 DSP工程结构,使得开 发人员无需熟悉脚本编程、 无需修改 DSP工程代码的情况下便可以联合算法 模拟软件 (如 Matlab )与 DSP开发工具(如 Freesclar Code Warrior )对 DSP工 程进行自动化仿真测试, 实现测试数据的实时产生、 测试结果的自动比对、 测试报告的自动生成; 可以提高 DSP测试的自动化程度, 节省人力成本, 提 高生产效率。 附图概述  The invention provides a complete script test platform, so that the DSP engineering test is not restricted by the fixed manufacturer fixed DSP chip series, and the test engineering code does not change the DSP engineering structure, so that the developer does not need to be familiar with the script programming and does not need to modify the DSP engineering code. Under the joint algorithm simulation software (such as Matlab) and DSP development tools (such as Freesclar Code Warrior) to carry out automated simulation test of DSP engineering, real-time production of test data, automatic comparison of test results, automatic generation of test reports; Improve the automation of DSP testing, save labor costs, and increase production efficiency. BRIEF abstract
图 1是现有技术中对 DSP的仿真测试方式一的示意图;  1 is a schematic diagram of a simulation test method 1 for a DSP in the prior art;
图 2是现有技术中对 DSP的仿真测试方式二的示意图; 图 3是现有技术中对 DSP的仿真测试方式三的示意图; 2 is a schematic diagram of a second simulation test method for a DSP in the prior art; 3 is a schematic diagram of a simulation test mode 3 for a DSP in the prior art;
图 4是实施例中实现数字信号处理器自动测试的***结构图;  4 is a structural diagram of a system for implementing automatic testing of a digital signal processor in an embodiment;
图 5是实施例中实现数字信号处理器自动测试的方法流程图;  5 is a flow chart of a method for implementing automatic test of a digital signal processor in an embodiment;
图 6是具体实施例中实现数字信号处理器自动测试的方法流程图。  6 is a flow chart of a method for implementing automatic testing of a digital signal processor in a specific embodiment.
本发明的较佳实施方式 Preferred embodiment of the invention
区别于现有技术中的 DSP测试模式, 本发明通过脚本程序控制算法模拟 模块和数字信号处理器(DSP )开发模块, 实现算法仿真工程和 DSP工程的 联合自动仿真, 并自动对比两者的测试结果, 输出详细 4艮告。 如图 4所示, 实现数字信号处理器自动测试的***包括测试平台, 测试 平台中包括算法模拟模块 41和数字信号处理器 ( DSP )开发模块 42。  Different from the DSP test mode in the prior art, the present invention implements a joint automatic simulation of algorithm simulation engineering and DSP engineering through a script program control algorithm simulation module and a digital signal processor (DSP) development module, and automatically compares the two tests. As a result, the output details are reported. As shown in FIG. 4, the system for implementing automatic test of the digital signal processor includes a test platform including an algorithm simulation module 41 and a digital signal processor (DSP) development module 42.
测试平台设置为, 运行统一的脚本实现算法模拟模块和 DSP开发模块间 的通信,还设置为控制所述算法模拟模块运行算法仿真工程以生成测试用例, 控制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述 测试用例, 得到对此 DSP工程的测试结果。  The test platform is configured to run a unified script to implement communication between the algorithm simulation module and the DSP development module, and is further configured to control the algorithm simulation module to run an algorithm simulation project to generate a test case, and control the DSP development module to run and the algorithm. The DSP project corresponding to the simulation project is executed and the test case is executed, and the test result of the DSP project is obtained.
此测试平台可以釆用多种脚本语言实现,例如可以是工具命令语言( Tool Command Language, 简称 TCL)。 TCL脚本语言是一种 4艮通用的脚本语言, 它几乎在所有的平台上都可以解释运行, 功能强大且经常被用于快速原型开 发、 脚本编程、 图形用户界面和测试等方面。  This test platform can be implemented in a variety of scripting languages, such as the Tool Command Language (TCL). The TCL scripting language is a general-purpose scripting language that runs on almost all platforms and is powerful and often used for rapid prototyping, scripting, graphical user interfaces, and testing.
测试平台中还包括主控模块 43、 配置模块 44、 数据传输模块 45、 测试 结果对比模块 48和报告输出模块 47。  The test platform also includes a main control module 43, a configuration module 44, a data transmission module 45, a test result comparison module 48, and a report output module 47.
主控模块设置为, 根据流程的时序触发所述测试平台中各功能模块的功 能执行, 对各功能模块进行统一管理。 具体地, 先触发算法模拟模块读取配 置模块的信息并启动运行算法仿真工程(例如对应于待测试的 DSP工程的 Matlab仿真工程) , 触发数据传输模块实时检测是否有新的测试用例生成, 如果有的话调用 DSP开发模块进行自动测试, 主控模块按流程的时序控制各 功能模块, 直至算法模拟模块生成的所有的测试用例被执行完毕。  The main control module is configured to trigger the function execution of each functional module in the test platform according to the timing of the process, and perform unified management on each functional module. Specifically, the triggering algorithm simulation module first reads the information of the configuration module and starts the running algorithm simulation project (for example, the Matlab simulation project corresponding to the DSP project to be tested), and triggers the data transmission module to detect whether a new test case is generated in real time, if If there is a call, the DSP development module is called for automatic testing. The main control module controls each functional module according to the timing of the process until all the test cases generated by the algorithm simulation module are executed.
配置模块设置为, 设置算法模拟仿真工程的运行属性参数、 DSP工程的 运行属性参数, 以及用于生成测试用例的用例参数。 其中, 算法模拟仿真工 程和 DSP工程的运行属性中包括工程的名称、 位置(包括所存放的文件路径 信息)、 运行参数、 导入测试条件和测试数据的位置、 测试结果输出的位置、 测试结果的存放位置 (包括存放的文件名称及位置) 。 测试用例的用例参数 包括测试用例生成的路径信息, 测试条件存放位置, 测试条件和测试数据存 放的文件名称及位置, DSP工程测试结果的存放的文件名称及位置。 The configuration module is set to set the running attribute parameters of the algorithm simulation engineering, DSP engineering Run property parameters, as well as use case parameters for generating test cases. The running attributes of the algorithm simulation engineering and the DSP engineering include the name and location of the project (including the stored file path information), the running parameters, the location of the imported test conditions and test data, the position of the test result output, and the test result. Storage location (including the name and location of the stored file). The use case parameters of the test case include the path information generated by the test case, the test condition storage location, the test name and the file name and location where the test data is stored, and the file name and location of the DSP engineering test result.
配置模块是测试平台和用户的接口, 用户只须修改配置文件就可以完成 测试平台的搭建。 此配置模块可以使不了解脚本编程的开发人员, 通过配置 文件就可以实现 TCL脚本编写的测试平台正常工作。 该模块被平台其他模块 调用, 完成自动化测试流程。  The configuration module is the interface between the test platform and the user. The user only needs to modify the configuration file to complete the construction of the test platform. This configuration module allows developers who do not understand scripting to work properly with TCL scripting test platforms through configuration files. This module is called by other modules of the platform to complete the automated test process.
算法模拟模块是设置为, 实现算法模拟软件(例如 Matlab软件)的功能 模块或实现环境。 算法模拟模块设置为, 根据所配置的所述算法模拟仿真工 程的运行属性参数以及所述用例参数生成包含测试条件和测试数据的测试用 例。  The algorithm simulation module is a function module or implementation environment that is set to implement algorithm simulation software (such as Matlab software). The algorithm simulation module is configured to generate a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation simulation project and the use case parameter.
DSP开发模块是设置为, 实现 DSP开发工具(例如 CodeWarrior开发工 具)的功能模块或实现环境, 负责 DSP工程的编译和运行。 DSP开发模块设 置为, 根据所配置的所述 DSP工程的运行属性参数, 将所述测试条件和测试 数据输入至 DSP工程的相应位置并执行所述测试用例。  The DSP development module is a functional module or implementation environment that is configured to implement DSP development tools (such as the CodeWarrior development tool) and is responsible for the compilation and operation of the DSP project. The DSP development module is configured to input the test condition and test data to a corresponding location of the DSP project and execute the test case according to the configured operational attribute parameters of the DSP project.
数据传输模块设置为 , 实时检测所述算法模拟模块是否产生新的测试用 例, 检测到产生新的测试用例时, 将此测试用例传输至所述 DSP开发模块。 数据传输模块将测试用例分类存放至配置模块中设置的位置。 数据传输模块 还设置为, 检测平台的数据文件夹中是否有上次测试数据, 如果有则将数据 进行备份以便回归测试比对。 数据传输模块中还可以包括一个数据扩展转化 单元, 其通过该接口可以进行脚本编程转换数据格式, 以便用户根据 DSP工 程的实际需求将测试数据重新组合。  The data transmission module is configured to detect in real time whether the algorithm simulation module generates a new test case, and when detecting a new test case, transmit the test case to the DSP development module. The data transfer module stores the test case classifications to the locations set in the configuration module. The data transfer module is also set to detect if there is last test data in the data folder of the platform, and if so, back up the data for regression test comparison. The data transfer module can also include a data extension conversion unit through which the script can be programmed to convert the data format so that the user can recombine the test data according to the actual needs of the DSP project.
配置模块还设置为, 设置所述测试结果对比模块进行结果对比时使用的 对比精度参数。  The configuration module is further configured to set a comparison precision parameter used when the test result comparison module compares the results.
测试结果对比模块设置为, 根据所述配置模块中的对比精度参数将所述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的模拟 测试结果进行对比得到对比结果, 此对比精度可以精确到第几个数据开始出 错。 The test result comparison module is configured to: simulate the test result output by the DSP development module and the simulation in the test case output by the algorithm simulation module according to the contrast precision parameter in the configuration module The test results are compared and the comparison results are obtained. The comparison accuracy can be accurate to the first data and start to go wrong.
报告输出模块设置为, 对所述对比结果进行分类整理, 输出测试报告。 输出报告可以分为 2类, 一类是实时变化的每完成一个用例的测试就更新一 次, 一类是所有用例都测试完后总结输出。 最后总结输出的报告又细分为 2 个, 一个是总结通过率并列出测试用例是否通过, 另一个是详细列出哪个测 试用例的第几个测试项的第几个数据出错。  The report output module is configured to sort the comparison results and output a test report. The output report can be divided into two categories. One is the real-time change, and the test is updated every time a test case is completed. The other is that all the use cases are summarized after the test is completed. The final summary output report is subdivided into two, one is to summarize the pass rate and list whether the test case is passed, and the other is to list in detail which of the first test items of the test case is wrong.
本发明中测试平台可以与算法模拟模块运行的算法模拟软件(如 Matlab 软件)运行于同一计算机(PC ) 内。 测试平台的相关文件存放于 PC机一文 件目录下, 例如, 目录自动测试( AutoTest ) _WS存放测试平台的所有文件, 包括平台主控文件、 配置文件、 报告文件、 错误报告文件以及数据目录和平 台模块目录; 目录 AutoTest— WS的子目录 FOR— DSP— SIM中存放当前测试用 例数据; 目录 FOR— DSP— SIM的子目录 FOR— DSP— SIM— xxxx 以时间作标签 存放以前的测试用例数据, FOR— DSP— SIM 为自动生成的目录; 目录 AutoTest— WS的子目录 SOURCE存放平台相关模块代码; 目录 SOURCE的 子目录 log存放 DSP工程的编译信息、 执行的命令信息、 即时更新的报告目 录 SOURCE文件。 In the present invention, the test platform can be run in the same computer (PC) as the algorithm simulation software (such as Matlab software) running by the algorithm simulation module. The relevant files of the test platform are stored in a file directory of the PC. For example, AutoTest _WS stores all files of the test platform, including platform master files, configuration files, report files, error report files, and data directories and platforms. Module directory; directory AutoTest - WS subdirectory FOR - DSP - SIM stores the current test case data; Directory FOR - DSP - SIM subdirectory FOR - DSP - SIM - xxxx Use time as a label to store the previous test case data, FOR — DSP—SIM is an automatically generated directory; directory AutoTest—a subdirectory of WS stores platform-related module code; directory SOURCE's subdirectory log stores DSP project compilation information, executed command information, and instant update report directory SOURCE file.
如图 5所示, 实现数字信号处理器自动测试的方法, 包括:  As shown in FIG. 5, a method for implementing automatic test of a digital signal processor includes:
步骤 501、 构建测试平台, 通过在所述测试平台中运行统一的脚本实现 算法模拟模块和数字信号处理器(DSP )开发模块间的通信;  Step 501: Construct a test platform, and implement communication between the algorithm simulation module and the digital signal processor (DSP) development module by running a unified script in the test platform;
步骤 502、 通过所述测试平台控制所述算法模拟模块运行算法仿真工程 以生成测试用例;  Step 502: Control, by the test platform, the algorithm simulation module to run an algorithm simulation project to generate a test case;
步骤 503、 控制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP 工程并执行所述测试用例, 得到对此 DSP工程的测试结果。  Step 503: Control the DSP development module to run a DSP project corresponding to the algorithm simulation project and execute the test case, and obtain test results for the DSP project.
其中, 在所述测试平台中设置算法模拟仿真工程的运行属性参数、 DSP 工程的运行属性参数, 以及用于生成测试用例的用例参数; 所述算法模拟模 块根据所配置的所述算法模拟仿真工程的运行属性参数以及所述用例参数生 成包含测试条件和测试数据的测试用例; 所述测试平台自动提取所述测试用 例, 根据所配置的所述 DSP工程的运行属性参数, 将所述测试条件和测试数 据输入至 DSP工程的相应位置并执行所述测试用例。 The operating attribute parameter of the algorithm simulation engineering, the running attribute parameter of the DSP project, and the use case parameter used to generate the test case are set in the test platform; the algorithm simulation module simulates the simulation project according to the configured algorithm. Run attribute parameters and the use case parameters a test case including test conditions and test data; the test platform automatically extracts the test case, and inputs the test condition and test data to a corresponding position of the DSP project according to the configured run attribute parameter of the DSP project And executing the test case.
所述测试用例中包括所述算法模拟模块根据所述测试条件和测试数据运 行所述算法模拟仿真工程得到的模拟测试结果, 所述测试平台将所述 DSP开 发模块输出的测试结果与所述模拟测试结果进行对比得到对比结果。  The test case includes the simulation test result obtained by the algorithm simulation module running the algorithm simulation engineering according to the test condition and the test data, and the test platform outputs the test result output by the DSP development module and the simulation The test results were compared to obtain comparison results.
所述测试平台设置所述测试结果对比模块进行结果对比时使用的对比精 度参数, 并在得到对此 DSP工程的测试结果后, 根据所述对比精度参数将所 述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的模 拟测试结果进行对比得到对比结果。  The test platform sets the comparison precision parameter used by the test result comparison module to compare the results, and after obtaining the test result of the DSP project, the test result output by the DSP development module is compared according to the comparison precision parameter. The simulation test results in the test cases output by the algorithm simulation module are compared to obtain comparison results.
测试平台还可以对所述对比结果进行分类整理, 输出测试 4艮告。  The test platform can also sort the comparison results and output test 4 reports.
具体实施例: Specific embodiment:
具体实施例中是应用本发明针对飞思卡尔(Freescale ) 的 DSP开发工具 CodeWarrior和 MathWorks的算法模拟工具 Matlab进行 DSP工程的自动化测 试验证。  In the specific embodiment, the present invention is applied to Freescale's DSP development tool CodeWarrior and MathWorks' algorithm simulation tool Matlab for automated test of DSP engineering.
具体实施例中, 事先设置 DSP工程及其配套的算法仿真工程即 Matlab 工程; 设置自动化测试平台的配置文件, 通过该文件配置 DSP工程及算法仿 真工程的属性,指定 DSP工程中***测试条件和数据的位置,指定 DSP工程 中获取结果数据的位置。  In a specific embodiment, the DSP project and its supporting algorithm simulation project, that is, the Matlab project, are set in advance; the configuration file of the automated test platform is set, the attributes of the DSP engineering and the algorithm simulation project are configured through the file, and the test conditions and data are inserted into the DSP project. The location, specifies the location in the DSP project where the result data is obtained.
如图 6所示, 实现数字信号处理器自动测试的方法中包括:  As shown in FIG. 6, the method for implementing automatic test of the digital signal processor includes:
步骤 601、 执行平台主控脚本, 自动化测试平台解析配置文件; 步骤 602、 测试平台通过命令方式在后台启动配套的 Matlab工程; 步骤 603、 Matlab工程运行并产生相关测试用例数据 (包含仿真测试的 结果) ;  Step 601: Execute the platform master script, and the automated test platform parses the configuration file. Step 602: The test platform starts the matching Matlab project in the background by using the command mode; Step 603, the Matlab project runs and generates relevant test case data (including the result of the simulation test) ) ;
步骤 604、 测试平台定时自动查询测试用例数据生成文件夹, 判断是否 有新用例产生, 若有, 执行步骤 605, 否则, 循环执行步骤 604; 步骤 605、 将数据传输到平台测试数据存放目录; Step 604, the test platform automatically queries the test case data generation folder to determine whether a new use case is generated, if any, step 605 is performed, otherwise, step 604 is executed; Step 605: Transfer the data to the platform test data storage directory.
步骤 606、 启动 DSP开发工具对 DSP工程进行测试; 此步骤中包括: 步骤 6061、 编译并运行待测试的 DSP工程;  Step 606: Start a DSP development tool to test the DSP project; the step includes: Step 6061, compiling and running the DSP project to be tested;
步骤 6062、 根据配置文件信息, 将相关的测试条件及测试数据在指定 的工程位置导入 DSP的内存或寄存器;  Step 6062: Import, according to the configuration file information, the relevant test condition and test data into the memory or register of the DSP at the specified engineering location;
步骤 6063、 在配置文件指定的工程位置将测试结果输出;  Step 6063: Output the test result in the engineering location specified by the configuration file;
步骤 6064、 测试平台将输出的结果和仿真结果进行比对, 并作详细记 录;  Step 6064, the test platform compares the output result with the simulation result, and makes a detailed record;
步骤 6065、 根据比对的结果更新测试报告文件;  Step 6065: Update the test report file according to the comparison result;
步骤 607、 判断 Matlab工程是否结束运行, 若是, 执行步骤 608, 否则, 跳到步骤 604循环执行, 直到 Matlab工程运行结束;  Step 607: Determine whether the Matlab project ends the operation. If yes, go to step 608. Otherwise, skip to step 604 to execute the loop until the Matlab project runs.
步骤 608、 当全部用例运行结束后, 重新整理测试才艮告并输出。  Step 608: After all the use cases are finished running, the test is refreshed and outputted.
用户可以通过查看测试 ^艮告了解测试情况, 还可以详细得知哪个测试用 例的第几个测试项的第几个数据出错。  Users can check the test report to understand the test situation, and also know in detail which of the first test items of the test case has the wrong data.
本发明通过 TCL脚本语言建立一个统一的测试平台, 完成一个联合算法 模拟软件和 DSP开发软件的统一测试平台,并通过该平台可以对 DSP工程进 行高效率的自动化仿真, 控制算法模拟软件(如 Matlab ) 实现测试条件和数 据的自动生成, 控制 DSP开发软件 (如 Code Warrior ) 实现 DSP工程的自动 编译运行、 测试条件的自动设置、 测试数据的自动导入、 测试结果的自动导 出, 并通过平台对测试结果进行自动比对生成测试 ^艮告。 本发明将整个 DSP 工程测试过程中涉及的很多零散资源和步骤通过 TCL脚本有机整合, 并将各 个测试过程通过自动化脚本平台统一管理, 实现测试过程的自动化。  The invention establishes a unified testing platform through the TCL scripting language, completes a unified testing platform of the joint algorithm simulation software and the DSP development software, and can perform high-efficiency automatic simulation of the DSP engineering through the platform, and the control algorithm simulation software (such as Matlab) Realize automatic generation of test conditions and data, control DSP development software (such as Code Warrior) to realize automatic compilation and operation of DSP engineering, automatic setting of test conditions, automatic import of test data, automatic export of test results, and test by platform The result is an automatic comparison to generate a test. The invention integrates many scattered resources and steps involved in the whole DSP engineering test process through TCL scripts, and uniformly manages each test process through an automated script platform to realize the automation of the test process.
当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的 但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。  It is a matter of course that the invention may be embodied in various other forms and modifications without departing from the spirit and scope of the invention.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct the associated hardware, such as a read only memory, a magnetic disk, or an optical disk. Optionally, all or part of the steps of the above embodiments may also be used. One or more integrated circuits are implemented. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, or may be implemented in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software.
工业实用性 本发明提供的实现数字信号处理器自动测试的方法及***, 通过一个完 整脚本测试平台,使得 DSP工程测试不受固定厂商固定 DSP芯片系列的约束, 不添加测试代码, 不改变 DSP工程结构, 使得开发人员无需熟悉脚本编程、 无需修改 DSP工程代码的情况下便可以联合算法模拟软件与 DSP开发工具对 DSP工程进行自动化仿真测试, 实现测试数据的实时产生、 测试结果的自动 比对、 测试报告的自动生成; 提高了 DSP测试的自动化程度, 节省了人力成 本, 提高了生产效率。 Industrial Applicability The present invention provides a method and system for realizing automatic test of a digital signal processor. Through a complete script test platform, the DSP engineering test is not restricted by a fixed manufacturer's fixed DSP chip series, no test code is added, and the DSP project is not changed. The structure allows developers to perform automated simulation tests on DSP projects without the need to be familiar with script programming and without modifying the DSP engineering code. Real-time generation of test data, automatic comparison of test results, Automatic generation of test reports; improved automation of DSP testing, saving labor costs and increasing production efficiency.

Claims

权 利 要 求 书 Claim
1、 一种实现数字信号处理器自动测试的方法, 该方法包括:  1. A method for implementing automatic testing of a digital signal processor, the method comprising:
构建测试平台, 通过在所述测试平台中运行统一的脚本实现算法模拟模 块和数字信号处理器 (DSP )开发模块间的通信, 通过所述测试平台控制所 述算法模拟模块运行算法仿真工程以生成测试用例, 并控制所述 DSP开发模 块运行与所述算法仿真工程对应的 DSP工程并执行所述测试用例, 得到对该 DSP工程的测试结果。  Constructing a test platform, and implementing communication between the algorithm simulation module and the digital signal processor (DSP) development module by running a unified script in the test platform, by using the test platform to control the algorithm simulation module to run an algorithm simulation project to generate Testing the use case, and controlling the DSP development module to run the DSP project corresponding to the algorithm simulation project and executing the test case, and obtaining test results of the DSP project.
2、 如权利要求 1所述的方法, 所述方法还包括:  2. The method of claim 1 further comprising:
在所述测试平台中设置算法仿真工程的运行属性参数、 DSP工程的运行 属性参数, 以及用于生成测试用例的用例参数;  Setting an operation attribute parameter of the algorithm simulation project, a running attribute parameter of the DSP project, and a use case parameter for generating the test case in the test platform;
其中, 在通过所述测试平台控制所述算法模拟模块运行算法仿真工程以 生成测试用例, 并控制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述测试用例的处理中, 所述算法模拟模块根据所配置的所 述算法仿真工程的运行属性参数以及所述用例参数生成包含测试条件和测试 数据的测试用例; 所述测试平台自动提取所述测试用例, 根据所配置的所述 DSP工程的运行属性参数,将所述测试条件和测试数据输入至 DSP工程的相 应位置并执行所述测试用例。  Controlling, by the test platform, the algorithm simulation module to run an algorithm simulation project to generate a test case, and controlling the DSP development module to run a DSP project corresponding to the algorithm simulation project and executing the test case. The algorithm simulation module generates a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter; the test platform automatically extracts the test case, according to the configured The operating attribute parameter of the DSP project inputs the test condition and test data to a corresponding location of the DSP project and executes the test case.
3、 如权利要求 2所述的方法, 其中,  3. The method of claim 2, wherein
所述测试用例中包括所述算法模拟模块根据所述测试条件和测试数据运 行所述算法仿真工程得到的模拟测试结果, 所述测试平台将所述 DSP开发模 块输出的测试结果与所述模拟测试结果进行对比得到对比结果。  The test case includes the simulation test result obtained by the algorithm simulation module running the algorithm simulation project according to the test condition and test data, and the test platform outputs the test result output by the DSP development module and the simulation test. The results were compared to obtain comparative results.
4、 如权利要求 3所述的方法, 所述方法还包括:  4. The method of claim 3, the method further comprising:
所述测试平台设置所述测试结果对比模块进行结果对比时使用的对比精 度参数;  The test platform sets the comparison precision parameter used when the test result comparison module compares the results;
其中, 在所述测试平台将所述 DSP开发模块输出的测试结果与所述模拟 测试结果进行对比得到对比结果的处理中, 根据所述对比精度参数将所述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的模拟 测试结果进行对比得到对比结果。 Wherein the test platform compares the test result output by the DSP development module with the simulated test result to obtain a comparison result, and the test result output by the DSP development module is compared according to the comparison precision parameter. The simulation test results in the test cases output by the algorithm simulation module are compared to obtain comparison results.
5、 如权利要求 3或 4所述的方法, 其中, 在将测试结果与模拟测试结果 进行对比得到对比结果之后, 所述方法还包括: 5. The method according to claim 3 or 4, wherein after comparing the test result with the simulated test result to obtain a comparison result, the method further comprises:
所述测试平台对所述对比结果进行分类整理, 输出测试 ^艮告。  The test platform sorts the comparison results and outputs a test.
6、 一种实现数字信号处理器自动测试的***, 所述***包括测试平台; 所述测试平台中包括算法模拟模块和数字信号处理器 ( DSP )开发模块; 所述测试平台设置为, 运行统一的脚本实现算法模拟模块和 DSP开发模 块间的通信, 控制所述算法模拟模块运行算法仿真工程以生成测试用例, 控 制所述 DSP开发模块运行与所述算法仿真工程对应的 DSP工程并执行所述测 试用例, 并得到对该 DSP工程的测试结果。  6. A system for implementing automatic testing of a digital signal processor, the system comprising a test platform; the test platform includes an algorithm simulation module and a digital signal processor (DSP) development module; the test platform is set to operate uniformly The script implements communication between the algorithm simulation module and the DSP development module, controls the algorithm simulation module to run an algorithm simulation project to generate a test case, controls the DSP development module to run a DSP project corresponding to the algorithm simulation project, and executes the Test the test case and get the test results for the DSP project.
7、 如权利要求 6所述的***, 其中, 所述测试平台还包括配置模块, 所述配置模块设置为, 设置算法仿真工程的运行属性参数、 DSP工程的 运行属性参数, 以及用于生成测试用例的用例参数;  7. The system according to claim 6, wherein the test platform further comprises a configuration module, the configuration module is configured to set an operation attribute parameter of the algorithm simulation project, a running attribute parameter of the DSP project, and a test for generating the test Use case parameters for use cases;
所述算法模拟模块设置为, 根据所配置的所述算法仿真工程的运行属性 参数以及所述用例参数生成包含测试条件和测试数据的测试用例;  The algorithm simulation module is configured to generate a test case including the test condition and the test data according to the configured run attribute parameter of the algorithm simulation project and the use case parameter;
所述 DSP开发模块设置为,根据所配置的所述 DSP工程的运行属性参数, 将所述测试条件和测试数据输入至 DSP 工程的相应位置并执行所述测试用 例。  The DSP development module is configured to input the test condition and test data to a corresponding location of the DSP project and execute the test case according to the configured operational attribute parameter of the DSP project.
8、 如权利要求 6或 7所述的***, 其中,  8. The system of claim 6 or 7, wherein
所述测试平台还包括数据传输模块; 所述数据传输模块设置为, 实时检 测所述算法模拟模块是否产生新的测试用例, 检测到产生新的测试用例时, 将所述新的测试用例传输至所述 DSP开发模块。  The test platform further includes a data transmission module; the data transmission module is configured to detect whether the algorithm simulation module generates a new test case in real time, and when detecting a new test case, transmit the new test case to The DSP development module.
9、 如权利要求 6所述的***, 其中,  9. The system of claim 6 wherein
所述测试平台还包括测试结果对比模块;  The test platform further includes a test result comparison module;
所述配置模块还设置为, 设置所述测试结果对比模块进行结果对比时使 用的对比精度参数;  The configuration module is further configured to: set a comparison precision parameter used when the test result comparison module compares results;
所述测试结果对比模块设置为, 根据所述配置模块中的对比精度参数将 所述 DSP开发模块输出的测试结果与所述算法模拟模块输出的测试用例中的 模拟测试结果进行对比得到对比结果。 The test result comparison module is configured to: the test result output by the DSP development module and the test case output by the algorithm simulation module according to the contrast precision parameter in the configuration module The simulation test results were compared to obtain comparison results.
10、 如权利要求 6所述的***, 其中,  10. The system of claim 6 wherein
所述测试平台还包括主控模块; 所述主控模块设置为, 根据流程的时序 触发所述测试平台中各功能模块的功能执行。  The test platform further includes a main control module, and the main control module is configured to trigger function execution of each functional module in the test platform according to a sequence of the process.
PCT/CN2010/077649 2010-08-17 2010-10-11 Method and system for realizing automatic tests of digital signal processor (dsp) WO2012022065A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010259051.8 2010-08-17
CN201010259051.8A CN102375778B (en) 2010-08-17 2010-08-17 Method and system for automatically testing digital signal processor (DSP)

Publications (1)

Publication Number Publication Date
WO2012022065A1 true WO2012022065A1 (en) 2012-02-23

Family

ID=45604708

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/077649 WO2012022065A1 (en) 2010-08-17 2010-10-11 Method and system for realizing automatic tests of digital signal processor (dsp)

Country Status (2)

Country Link
CN (1) CN102375778B (en)
WO (1) WO2012022065A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106133537A (en) * 2014-12-30 2016-11-16 京微雅格(北京)科技有限公司 A kind of FPGA function module emulation verification method and system thereof
CN112597005A (en) * 2020-12-14 2021-04-02 上海宏景智驾信息科技有限公司 Closed-loop simulation test system and method for automatic driving full-stack algorithm
CN115994096A (en) * 2023-03-21 2023-04-21 安徽隼波科技有限公司 Verification method for radar signal processing and simulation

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868461B (en) * 2012-08-07 2015-04-15 大唐移动通信设备有限公司 Base band test method, device and system
CN103020401B (en) * 2013-01-06 2016-08-03 北京经纬恒润科技有限公司 The method of testing of ECU, device and system
CN103442249B (en) * 2013-09-09 2015-09-23 国家电网公司 Video conferencing system emulation mode and platform
CN103698686B (en) * 2013-12-11 2017-04-12 华为技术有限公司 Signal testing method and signal testing equipment
CN105025522B (en) * 2015-06-09 2019-03-08 国家电网公司 Electrical power distribution automatization system wireless communication Auto-Test System based on Matlab
CN105868114B (en) * 2016-03-31 2019-04-05 复旦大学 FPGA software systems and its each module test system and method
CN107272647A (en) * 2017-06-30 2017-10-20 思澜科技(成都)有限公司 A kind of test device and its application method
CN107506297A (en) * 2017-07-27 2017-12-22 北京广利核***工程有限公司 Reactor protection system function test method and device based on emulation platform
CN107391334A (en) * 2017-08-01 2017-11-24 上海航天控制技术研究所 Digital simulation method based on complete autonomous Row control
CN109190281A (en) * 2018-09-19 2019-01-11 北京润科通用技术有限公司 A kind of multi-core DSP platform algorithm development method and device
CN109325900A (en) * 2018-09-19 2019-02-12 北京润科通用技术有限公司 A kind of dispositions method and system of algorithm
CN110990279B (en) * 2019-12-02 2023-05-12 小唐科技(上海)股份有限公司 Method for joint verification of DSP codes
WO2021237737A1 (en) * 2020-05-29 2021-12-02 深圳市大疆创新科技有限公司 Data processing method, electronic device, and computer-readable storage medium
CN112286530A (en) * 2020-11-12 2021-01-29 深圳虹川科技有限公司 JavaScript-based Internet of things equipment data format conversion system and method
CN112799968B (en) * 2021-04-08 2021-06-22 湖南高至科技有限公司 Test drive modeling system and method based on script
CN113407392B (en) * 2021-05-21 2022-07-29 鹏城实验室 Floating point arithmetic unit testing method and device, centralized control equipment and storage medium
CN113505030A (en) * 2021-06-16 2021-10-15 青岛本原微电子有限公司 Digital signal processor testing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5754760A (en) * 1996-05-30 1998-05-19 Integrity Qa Software, Inc. Automatic software testing tool
CN1193240A (en) * 1997-02-20 1998-09-16 三星电子株式会社 Detection-digital-signal processor in digital videl-disk reproducing device
CN1841340A (en) * 2005-03-28 2006-10-04 华为技术有限公司 Method and system for testing drive software

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5754760A (en) * 1996-05-30 1998-05-19 Integrity Qa Software, Inc. Automatic software testing tool
CN1193240A (en) * 1997-02-20 1998-09-16 三星电子株式会社 Detection-digital-signal processor in digital videl-disk reproducing device
CN1841340A (en) * 2005-03-28 2006-10-04 华为技术有限公司 Method and system for testing drive software

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106133537A (en) * 2014-12-30 2016-11-16 京微雅格(北京)科技有限公司 A kind of FPGA function module emulation verification method and system thereof
CN106133537B (en) * 2014-12-30 2019-03-05 京微雅格(北京)科技有限公司 A kind of FPGA function module emulation verification method and its system
CN112597005A (en) * 2020-12-14 2021-04-02 上海宏景智驾信息科技有限公司 Closed-loop simulation test system and method for automatic driving full-stack algorithm
CN115994096A (en) * 2023-03-21 2023-04-21 安徽隼波科技有限公司 Verification method for radar signal processing and simulation

Also Published As

Publication number Publication date
CN102375778B (en) 2014-12-31
CN102375778A (en) 2012-03-14

Similar Documents

Publication Publication Date Title
WO2012022065A1 (en) Method and system for realizing automatic tests of digital signal processor (dsp)
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
US8924937B1 (en) Method and system for generating verification information and tests for software
CN109062777B (en) General automatic test system of track traffic signal equipment
KR20090088605A (en) Method and apparatus for generating virtual software platform based on component model and validating software platform architecture using thereof
CN101924656A (en) Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration
CN110865971A (en) System and method for verifying SOC chip
US20070061641A1 (en) Apparatus and method for generating test driver
WO2013007068A1 (en) Automatic test system and method oriented to functions of hardware apparatus
CN113706110B (en) FPGA test tool integrated test management platform
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN111859834B (en) UVM-based verification platform development method, system, terminal and storage medium
Wahler et al. CAST: Automating software tests for embedded systems
JP4140917B2 (en) Verification work support system and method
CN107329889B (en) Method for automatically testing C compiler
CN106293687A (en) The control method of a kind of flow process of packing, and device
CN113254054B (en) Intelligent contract one-stop development system and method
CN112783769A (en) Self-defined automatic software testing method
CN114546823B (en) Method for reproducing debug scenario of logic system design and related equipment
Puri-Jobi Test automation for NFC ICs using Jenkins and NUnit
CN106354966B (en) The method of the conversion of chip id E project file and rapid configuration artificial debugging environment
CN112052007A (en) Source code debugging method, device, server and storage medium
CN112001138A (en) Efficient digital circuit algorithm verification device
Dai et al. Automatic test data generation for TTCN-3 using CTE
CN111338761A (en) 51 single-chip microcomputer virtual interrupt controller and implementation method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10856063

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10856063

Country of ref document: EP

Kind code of ref document: A1