A method and device for self-generated image test case coverage

The problem of single data source and disk space dependence in the prior art is solved by precompiling files and conversion scripts, and the test images in multiple formats are generated, and the image signal processor is configured by stimulating files is configured, thus achieving efficient image simulation verification.

CN119766989APending Publication Date: 2025-04-04XINDONG MICROELECTRONICS TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411821010.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

During the existing image simulation verification process, the data source is single, the ability to be compatible with various formats is poor, and the disk space is too dependent on, resulting in reduced simulation efficiency and excessive disk space consumption.

Method used

By calling the conversion script for precompiling files, the original image is converted into test images in multiple formats, and the configuration parameters are passed to the image signal processor by stimulating the file, which automatically generates data sources and test cases and reduces dependence on disk space.

Benefits of technology

It realizes automated generation of test images and data sources covering multiple formats, improves simulation efficiency, reduces disk space usage, and avoids the problems of single data sources and cumbersome simulation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766989A_ABST
    Figure CN119766989A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image signal processing, and in particular to a method and device for self-generated image test case coverage. It mainly includes: using a precompiled file to call a conversion script, converting an original image into at least one test image through the conversion script, and the converted test image can cover all format requirements in the test; passing the corresponding configuration parameters in the precompiled file to the stimulus file, obtaining the test image specified by the configuration parameters in the stimulus file, and inputting the test image into the image signal processor; configuring the image signal processor according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters. The present invention can avoid the problems of single data source and cumbersome multi-format simulation process, and avoid the problem of space occupation by a large number of files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image signal processing, and in particular to a method and device for self-generated image test case coverage. Background Art

[0002] When performing simulation test or functional test on image signal processor (ISP), in the traditional verification method, it is necessary to first establish a simulation model of image signal processor, generate test images of different formats respectively through algorithms such as MATLAB, and infuse each format of test image into the simulation model as the data source of a test, and then configure the test parameters in the register according to the characteristics of the format, input the test parameters into the simulation model through the stimulus file, so that the image signal processor completes the entire simulation verification process of the test image of the format according to the test parameter requirements. In this simulation method, only one test image of a fixed format can be used each time, and the data source is relatively single.

[0003] Secondly, image processing also involves image calibration. When calibrating an image, it is necessary to sample a large number of image coordinates at different angles. The sampling operation needs to be performed using tools other than simulation tools, and the operation is cumbersome and cannot be automated.

[0004] Third, when performing coverage testing, a large number of data sources in different formats and scenarios need to be used. In the existing technology, these data need to be prepared in advance in the corresponding folders waiting to be read, which requires tedious preliminary preparation and causes a large amount of memory usage.

[0005] Fourthly, according to the experience of image signal processing simulation, each node of the simulation object needs to store the intermediate file after the simulation processing of the node through the dump model (Dump), so as to compare the processing results. The intermediate file capacity usually required for the simulation test of a frame of 4k RGB888 image is 32MB. In the actual test process, in addition to the intermediate files, it is also necessary to store the output files of the monitoring module added in the middle of each verification module, as well as the final online or offline output of the final result file. If it is necessary to complete the simulation verification of all formats, and there are multiple frames of test images in each format, the total amount of file data to be stored is extremely large, and at least several G-units of disk space are required to achieve it.

[0006] In order to verify the many functions and registers of the ISP, a large number of image test cases need to be covered. In the current simulation verification scenario, based on the above reasons, sufficient disk space must be prepared for simulation verification, data sources must be manually generated, and configurations must be manually modified, resulting in reduced simulation efficiency. In addition, during the simulation, a large number of intermediate files will be accumulated, which will also cause other programs using the same disk to be forced to interrupt due to insufficient space. If you have to wait until the end of the simulation to filter and delete them, it will require manual attention to the progress of the simulation, which is obviously unrealistic.

[0007] In view of this, how to overcome the defects of the existing technology and solve the problems of single data source, poor compatibility with various formats and excessive reliance on disk space in the existing image simulation verification process is a problem to be solved in this technical field. Summary of the invention

[0008] In view of the above defects or improvement needs of the prior art, the present invention solves the problems of single data source, poor compatibility with various formats and excessive reliance on disk space in the existing image simulation verification process.

[0009] The embodiment of the present invention adopts the following technical solution:

[0010] In the first aspect, the present invention provides a method for self-generated image test case coverage, specifically: using a precompiled file to call a conversion script, converting an original image into at least one test image through the conversion script, and the converted test image can cover all format requirements in the test; passing the corresponding configuration parameters in the precompiled file to the stimulus file, obtaining the test image specified by the configuration parameters in the stimulus file, and inputting the test image into an image signal processor; configuring the image signal processor according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters.

[0011] Preferably, the converting of the original image into at least one test image through a conversion script specifically includes: obtaining each image attribute to be covered during the test in a precompiled file, wherein the image attributes include: one or more of image format, frame rate, resolution, test mode and test scene; extracting pixel values ​​in the original image, and generating test images for each image attribute one by one according to the extracted pixel values, according to the pixel arrangement order and pixel bit width in each image attribute.

[0012] Preferably, the method of obtaining the test image specified by the configuration parameters in the excitation file specifically includes: obtaining all generated test images according to the file path in the configuration parameters, converting the pixel data of the test image into an input interface data format supported by the image signal processor, storing the converted pixel data in a designated memory in a read-only file format, and using the pixel data in the memory as an offline data source of the image signal processor; and / or, when a test image needs to be input, generating a corresponding excitation signal according to the file path in the configuration parameters, obtaining the test image under the file path through the excitation signal, and using the obtained test image as an online data source of the image signal processor.

[0013] Preferably, the image signal processor is configured according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters, specifically including: the stimulus file transfers the configuration parameters to the image signal processor, and configures the registers of the image signal processor; the image signal processor is driven by the configured registers, so that the image signal processor tests one or more test images according to the configuration parameters, wherein the configuration parameters include: one or more of the image attributes of the current test, the process control parameters of the current test, the end condition of the current test, whether to start the next round of testing, and the number of times the test is repeated.

[0014] Preferably, the stimulus file passes the configuration parameters to the image signal processor, specifically including: using a precompiled file to schedule the built-in parameters of the simulation model, assigning values ​​to external variables corresponding to the configuration parameters, and passing the assigned external parameters to the parameters with the same name inside the register transfer language; and / or, using the precompiled file to schedule the calculation formula in cshell, calculating all parameters coupled with each image attribute according to the configuration parameters of the image attribute, and assigning the calculated parameter values ​​to the corresponding registers by scheduling the built-in parameters of the simulation model; and / or, using the precompiled file to classify the coupled registers in the register transfer language, matching the configuration parameters according to the classification results, and assigning the matching configuration parameters to the registers.

[0015] Preferably, the image signal processor tests the test images one by one according to the corresponding configuration parameters, specifically including: when the test image contains more than one frame of images, the excitation file sets the number of frames to be tested according to the configuration parameters, and tests each frame of the image one by one until the testing of all the frames to be tested is completed; and / or, when the test image has more than one image attribute, after the test image processing of the current image attribute is completed, the excitation file obtains the test image of the next image attribute according to the configuration parameters, and tests it according to the configuration parameters of the corresponding image attributes until the test image testing of all image attributes is completed.

[0016] Preferably, the testing according to the configuration parameters of the corresponding image attributes specifically includes: before and / or after each level of processing nodes of the image signal processor, obtaining the intermediate data after each level of processing nodes processes the test image through a dump module; comparing the intermediate data of each level with the corresponding expected data according to the configuration parameters, and obtaining the test results based on all the comparison results.

[0017] Preferably, the image signal processor tests the test images one by one according to the corresponding configuration parameters, and also includes: when the current test passes, using the preprocessing file to schedule the memory cleanup process to clean up the intermediate data and / or unnecessary files; and / or, when the proportion of failed tests in the completed test process is greater than or equal to a specified threshold, interrupting the test process and compressing and retaining the intermediate data with comparison errors so that troubleshooting can be performed after the test is completed.

[0018] In a second aspect, the present invention provides a device for self-generated image test case coverage, specifically: comprising at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, and the memory stores instructions that can be executed by the at least one processor, and after the instructions are executed by the processor, they are used to complete the method for self-generated image test case coverage in the first aspect.

[0019] In a third aspect, the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the method provided in the first aspect.

[0020] In a fourth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the method provided in the first aspect.

[0021] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer or a processor, causes the computer or the processor to execute the method provided in the first aspect.

[0022] Compared with the prior art, the beneficial effects of the present invention are: using precompiled files to centrally schedule the overall process of simulation testing, generating test images covering multiple formats as test cases based on conversion scripts, and transferring configuration parameters of test images in different formats through stimulus files. This method can automatically generate data sources, test cases, and cover original cases in a centrally scheduled manner, avoiding the problems of single data source and cumbersome multi-format simulation processes. Furthermore, in the preferred embodiment of the present invention, precompiled files are used to manage and delete files generated during testing, saving disk space and thus avoiding the problem of space occupied by a large number of files. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 A flow chart of a method for self-generated image test case coverage provided by an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of a process of generating a plurality of different types of test images as data sources in the method provided by the present invention;

[0026] Figure 3 A flow chart of another method for self-generated image test case coverage provided by an embodiment of the present invention;

[0027] Figure 4 A flow chart of another method for self-generated image test case coverage provided by an embodiment of the present invention;

[0028] Figure 5 A schematic diagram of the process of parameter configuration through a precompiled file in the method provided by the present invention;

[0029] Figure 6 A schematic diagram of the process of comparing results using precompiled files in the method provided by the present invention;

[0030] Figure 7 A schematic diagram of the process of central scheduling through precompiled files in the method provided by the present invention;

[0031] Figure 8 A schematic diagram of a device structure for self-generated image test case coverage provided by an embodiment of the present invention;

[0032] The reference numerals are as follows:

[0033] 11: processor; 12: memory. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0035] The present invention is an architecture of a specific functional system, so the specific embodiments mainly illustrate the functional logical relationship between the various structural modules, and do not limit the specific software and hardware implementation methods.

[0036] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0037] In this embodiment, a corresponding simulation model is established for the ISP that needs to be simulated and tested, and a corresponding simulation environment is established. In specific implementation, the simulation model is generally described based on an algorithm model of image signal processing such as cmodel, and then the hardware circuit is implemented through register transfer language (RTL). In actual implementation, the simulation model is preferably established using a compiled Verilog simulator (Verilog compile simulation, abbreviated as: vcs) to allow direct interaction between makefile, python, and system Verilog.

[0038] The simulation environment mainly includes: pictures as data sources, conversion scripts for generating or converting test images, stimulus files for data infusion or control signals during the simulation process, and objects that need to be simulated in the end. In this embodiment, the data source can use images of various formats or resolutions, and each image is used as a test case for the simulation test; the conversion script is not limited to being written in python, perl or matlab; the stimulus file for the simulation can be written in system verilog, which is a common hardware description language; the simulation object is an existing ISP or ISP design scheme, and the real image processor circuit is usually simulated by a digital circuit. Since the simulation object and its simulation model have the same function and processing flow, in this embodiment, the simulation object itself and its simulation model are not distinguished without ambiguity. The process of comparing the final results of the simulation is not limited to comparing the intermediate data processed by each node with the theoretical data or the existing correct data.

[0039] like Figure 1 As shown, the specific steps of the method for self-generated image test case coverage provided by the embodiment of the present invention are as follows:

[0040] Step 101: Use a precompiled file to call a conversion script, and convert the original image into at least one test image through the conversion script. The converted test image can cover all format requirements in the test.

[0041] In the above simulation environment, the whole process of simulation test can be centrally scheduled through precompiled files, so as to realize the interaction between languages, and realize the flexible configuration of parameters and the dynamic control of simulation process. In the Linux environment, the engineering management file program makefile is used as a precompiled file for central scheduling. In this embodiment, the makefile file is used as an example for explanation. In actual implementation, the appropriate precompiled file type can be selected according to actual needs.

[0042] In order to meet the test requirements of multiple types of image test cases during simulation verification, it is necessary to generate multiple different types of test images as data sources. In this embodiment, in order to simplify the generation process of the data source and support the dynamic generation of different types of data sources, such as Figure 2 As shown, use makefile to call the encoded conversion script to convert an original image into test images of multiple formats and resolutions according to format requirements. In actual implementation, the original image that needs to be simulated is not limited to a static image, but can also be multiple continuous images for dynamic simulation, or photos of the same object at different angles for image calibration. In the above manner, it is only necessary to set the parameters in the conversion script in advance according to the format to be generated, and convert the original image into the format to be generated through the script, so that the data source required for the test can be generated in batches based on one image, thereby realizing the automation of data source acquisition. In actual implementation, the data source images to be used can be generated in real time as needed during each test, or they can be generated in one stop and saved in a specified folder waiting to be read.

[0043] Furthermore, in order to solve the problem of multi-angle sampling during image calibration, in the method provided in this embodiment, fixed lens parameters can also be input, and then multiple angles of the image can be transformed through a script to obtain calibration parameters of multiple groups of images under a distortion lens. This can solve the cumbersome action of manually using a camera module to sample fixed scenes from multiple angles in the prior art. The original image can be inverted, rotated, tilted, etc. through a script to derive multi-angle images, so no other tools are needed for sampling, and automated sampling is achieved.

[0044] Step 102: passing corresponding configuration parameters in the precompiled file to the stimulus file, obtaining a test image specified by the configuration parameters in the stimulus file, and inputting the test image into the image signal processor.

[0045] Before the simulation starts, the conversion script is called through the makefile to determine which data source to generate based on the format required by this test; or the storage path of the test image and other parameter information are obtained based on the calculation script of the calibration parameters.

[0046] In the existing simulation verification process, each format of the test image needs to be reconfigured independently. If the ISP module is too large or there are too many formats to be tested, it is not conducive to subsequent adjustment and maintenance. Figure 3 As shown, the configuration parameters required for all formats of test images are pre-specified, stimulus instilled through makefile, and the parameters of the corresponding required format are modified and calculated, and finally passed to RTL, so that ISP starts the simulation process according to the current parameters. In this way, the corresponding configurations can be uniformly transmitted according to the resolution and format of different images, without the need to reconfigure the parameters of ISP when simulating each format, so that simulation can be carried out in the most convenient way. In specific implementation, system verilog can be used to implement stimulus.

[0047] In this embodiment, the precompiled file schedules the stimulus file to obtain the test image in the required format. The stimulus file can control the addresses where all pixels are stored and wait for transfer, and input the data source offline; or control when to read the file input directly into the ISP, and input the data source online. This method can take into account both system-level verification and IP-level verification requirements.

[0048] After completing the data source input, the registers of the image signal processor are configured through the stimulus file so that corresponding processing instructions can be issued to the image signal processor through the register parameters during the simulation verification process.

[0049] Step 103: The image signal processor is configured according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters.

[0050] This embodiment dynamically generates the required test images by dynamically scheduling the conversion script through the precompiled file, and dynamically instills the required configuration parameters through the stimulus file. In this way, the conversion script can provide a data source of the corresponding format according to the configuration parameters to meet the simulation requirements, without the need to adapt the format to the data source. When it is necessary to test images of multiple formats, it is only necessary to generate the corresponding test images one by one and configure the corresponding parameters, and continuous testing can be automatically performed without replacing the data source or reconfiguring the parameters each time the test is performed.

[0051] Furthermore, in the actual implementation process, each test image may contain multiple frames of image data in different formats. In a specific scenario, the first and second frame formats of the test image are RGB32 and RGB565 respectively. At this time, the conversion script will generate two frames of data sources of RGB32 and RGB565 according to the parameters in the precompiled file, pass the relevant configuration parameters to the simulation stimulus through the central scheduling, and then input the data source in the format of the first frame RGB32 and the second frame RGB565 in sequence through the simulation stimulus. In this way, two different formats can be tested together in the same environment. It can be seen that the test method provided in this embodiment can not only meet the needs of testing multiple formats at the same time, but also meet the dynamic needs of multiple frames in one format.

[0052] After steps 101 to 103 provided in this embodiment, central scheduling can be achieved through precompiled files to complete the generation and acquisition of test images in various formats and parameter configuration of different test scenarios. The generated intermediate files can also be managed, thereby conveniently and efficiently completing image test case coverage in various different scenarios.

[0053] When generating a test image, you first need to prepare an original image for simulation. The original image can be a single-frame static image, a multi-frame continuous dynamic image, or multiple images from different angles. Then, use Figure 3 The steps shown are to convert the original image into the test image to be covered by the conversion script.

[0054] Step 201: Obtain each image attribute that needs to be covered during testing in the precompiled file.

[0055] During the simulation test, the images to be tested have various pixel formats, such as RGB, YUV444, YUV (422 / 420) (full plane / half plane) and RAW. In different formats, the bits and arrangements of each pixel component are also different. For example, when the component width (pixel width) occupied by the bit is 8 bits, the pixel format is called RGB32 or RGB88; when the component arrangement (pixel arrangement) is to place three RGB components every 32 bits and fill the high bits with zeros, or RGB is placed cyclically across the 32-bit boundary, the pixel format is called RGB32 or RGB24. In addition, other targeted parameters may be required for the verification of some special functions; for example, when performing distortion correction, additional parameters for pre-calibration of the image are required.

[0056] In order to facilitate the management of parameters and formats, before the simulation begins, first prepare the image attribute list (LIST) of the test image according to the test requirements. The image attributes in the LIST include: image format, frame rate, resolution, test mode and test scene, one or more of them, as well as other attributes required for the simulation test or ISP internal. The precompiled file obtains the image attributes required for the current simulation verification from the LIST and sends it to the conversion script. The conversion script will use the sent image attributes as the parameters of the conversion script and start to generate the corresponding format data source.

[0057] Step 202: extract pixel values ​​from the original image, and generate test images for each image attribute one by one according to the extracted pixel values ​​according to the pixel arrangement order and pixel width in each image attribute.

[0058] In order to complete the format conversion, each pixel value in the original image can be extracted, and then the extracted pixel values ​​can be rearranged according to the component width and component arrangement requirements specified by the current image attributes. In the specific implementation, a conversion script written in Python can be used to call the interface in the opencv library to extract pixel values, and output a format file that meets the requirements as a converted test image based on the arrangement order and pixel width of the pixels in the corresponding format. When multiple frame tests are required, it is necessary to generate test images of the required number of frames based on the required number of frames. For example: when the first round of simulation assumes that the format needs to be RGB32 to run 20 frames of dynamic, it is necessary to generate 20 frames of files in the corresponding format through the conversion script.

[0059] After step 201 to step 202 provided in this embodiment, the generation of the test image in the required format can be completed through the precompiled file and the conversion script.

[0060] In specific scenarios, the generated test images can be stored as an offline data source according to actual needs, or they can be converted into a format and used as an online data source when necessary.

[0061] (1) Obtain all generated test images according to the file path in the configuration parameters, convert the pixel data of the test images into an input interface data format supported by the image signal processor, store the converted pixel data in a specified memory in a read-only file format, and use the pixel data in the memory as an offline data source of the image signal processor.

[0062] After the test image is generated, the test image can be stored in a file format such as (.log). In actual use, the file path corresponding to the test image is found by writing a good simulation stimulus file, and all the pixel data in the file is stored in the simulation model of the memory by reading the file, such as in the double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, abbreviated as DDR) simulation model. In some scenarios, when the test image stored in the DDR simulation model is used as ISP offline data, an external video data mover (VDMA) is required to convert the data stored in the memory into input interface data supported by the ISP through VDMA.

[0063] (2) When a test image needs to be input, a corresponding excitation signal is generated according to the file path in the configuration parameters, and the test image under the file path is obtained through the excitation signal, and the obtained test image is used as an online data source of the image signal processor.

[0064] When the test image is used as an online data source, there is no need to pre-store pixel data. When data input is required, the excitation signal is started to call the conversion script to generate the data source for inputting the ISP, and data is read from the file in the corresponding format only when needed.

[0065] Through the above methods, data sources in various formats can be automatically generated and obtained, and a variety of different data source acquisition methods can be provided to meet the simulation test requirements of different scenarios.

[0066] After obtaining the test image, Figure 4 As shown, the image signal processor is configured according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters.

[0067] Step 301: The stimulus file transmits configuration parameters to the image signal processor to configure registers of the image signal processor.

[0068] In the method provided in this embodiment, Figure 5 As shown, the configuration parameters are transmitted through the central scheduling of the preprocessing file, and the stimulus starts the configuration of the image signal processor according to the configuration parameters, so that the image signal processor starts to work until the end. In a specific implementation, a makefile can be used for central scheduling to pass the parameters to the simulation program vcs.

[0069] Step 302: driving the image signal processor through the configured registers, so that the image signal processor tests one or more test images according to the configuration parameters.

[0070] During the simulation test, the parameters injected by the stimulus are stored in the corresponding registers of the image signal processor, and the values ​​in the registers are used to guide each module to complete the corresponding test steps. The configuration parameters that may be used include: one or more of the image attributes of the current test, the process control parameters of the current test, the end condition of the current test, whether to start the next round of testing, and the number of repeated tests.

[0071] After step 301 to step 302 provided in this embodiment, there is no need to reconfigure the image signal processor for different formats or test requirements in each simulation test, and different registers can be configured under different formats to drive the correct operation of the image signal processor.

[0072] In actual implementation, the built-in parameters of the simulation model can be scheduled by the makefile and passed to the RTL to complete the parameter configuration in the register. For different implementation scenarios, the precompiled file can also adaptively calculate or adjust the configuration parameters according to actual needs. The following are some available parameter adjustment methods. In the specific implementation process, the following adjustment methods can be used individually or simultaneously, or they can be combined with other adjustment methods supported by RTL.

[0073] (1) Passing parameters: Use the precompiled file to schedule the built-in parameters of the simulation model, assign values ​​to the external variables corresponding to the configuration parameters, and pass the assigned external parameters to the parameters with the same name inside the register transfer language.

[0074] In a specific scenario, the makefile schedules the built-in parameter -plvalue+ of the simulation model vcs, assigns values ​​to variables outside the RTL according to the preset configuration parameter values, and passes the configuration parameter values ​​to the parameters with the same name inside the RTL through external variables.

[0075] (2) Calculation: Use the precompiled file to schedule the calculation formula in cshell, calculate all parameters coupled with each image attribute according to the configuration parameters of the image attribute, and assign the calculated parameter values ​​to the corresponding registers by scheduling the built-in parameters of the simulation model.

[0076] In a specific scenario, use makefile to schedule the calculation formula in cshell first, and then assign the value by scheduling the built-in parameter -plvalue+ of the simulation model vcs. This method can be used with a source format parameter ,Update all register values ​​coupled to the format in the RTL. For example, when the format is x, value A = 2x, value B = 2x + 3. When the relationship between these parameters and the source format parameters is fixed, other registers coupled to the value can be modified by simply modifying the format. This method solves the inefficiency of manually modifying the configuration and also increases the automation performance of the entire method.

[0077] (3) Matching search: Use the precompiled file to classify the registers coupled in the register transfer language, match the configuration parameters according to the classification results, and assign the matching configuration parameters to the registers.

[0078] In a specific scenario, when multiple coupled registers in the RTL need to be classified for operation, the connections between the coupled registers can be matched and classified, and classified through the built-in filter, for and other functions of the makefile, and then the matching results can be used as conditions and assigned values ​​when the conditions are met.

[0079] In the specific implementation, makefile and python language can be used in combination to complete the above process to achieve a good coordination effect, thereby realizing the calculation, modification and transfer of parameters, and assisting in completing the simulation test process.

[0080] In the method provided in this embodiment, central scheduling is performed through a precompiled file, so that the image signal processor can automatically test the current test image according to the corresponding configuration parameters without human control. After the current format is processed, the stimulus file starts to determine whether to simulate the second format and how many frames to perform according to the parameters passed by the makefile, and loops in a similar manner according to the encoding of the stimulus file until all formats are traversed and the final result is obtained. Specifically: when the test image contains more than one frame of images, the stimulus file sets the number of frames to be tested according to the configuration parameters, and tests each frame of the image one by one until all the frames to be tested are tested; when the test image has more than one image attribute, after the test image of the current image attribute is processed, the stimulus file obtains the test image of the next image attribute according to the configuration parameters, and tests according to the configuration parameters of the corresponding image attributes until the test image of all image attributes is tested.

[0081] During the simulation test, a dump data module is generally added to the simulation model to monitor the data flow model before each module in the simulation process. This type of model can write the data of each module interaction into a physical file in the form of a file, and then compare the obtained physical file with the cmodel or standard result to obtain the simulation test result of each module. Specifically: before and / or after each level of processing node of the image signal processor, the intermediate data of each level of processing node after processing the test image is obtained through the dump module; the intermediate data of each level is compared with the corresponding expected data according to the configuration parameters, and the test results are obtained according to all the comparison results. Furthermore, the test process of each module can also be controlled by the configuration parameters. The configuration parameters passed by the makefile can determine which modules in the image signal processor need to generate LOG files for DEBUG and which nodes do not need to generate them, thereby reducing the DEBUG time and the number of intermediate files generated.

[0082] During the simulation test, the intermediate files or results of each level of processing module output will be stored in the form of external files. In order to facilitate subsequent comparison and clearing, the intermediate files can be classified by system Verilog during output, and classified according to module classification or attention level. After the comparison is completed, the comparison results can also be converted into pictures through scripts to facilitate manual visual observation of the phenomenon.

[0083] In actual implementation, in order to perform image processing or result comparison, a large number of intermediate files or other temporary files will be generated, which are not needed by users but occupy a large amount of storage space. Therefore, in the method provided in this embodiment, after the test is completed, these files can also be judged by the configuration parameters in the precompiled file, and the files that need to be used are retained, and the files that are no longer needed are deleted.

[0084] In the method provided in this embodiment, after the image signal processor starts running, the stimulus file detects whether the current format simulation has ended and compares whether it has passed. Figure 6 As shown, after the simulation of the test image of each format is completed, RTL will feedback the result of the format verification. If the final comparison result passes, the redundant files will be deleted, and if it fails, the necessary problem files will be retained.

[0085] (1) When this test passes, schedule the memory cleanup process using the preprocessing file to clean up intermediate data and / or unnecessary files.

[0086] In this embodiment, each format of the test image is used as a test case. After the simulation test of each test case is completed, the precompiled file is used for central scheduling, and the format results are compared. After all the simulation processes of this test are completed, the makefile will schedule the linux deletion command to optimize the current intermediate file according to the final result and the screening conditions set in advance. If the comparison is successful, the intermediate file will be deleted; if the comparison is wrong, the wrong intermediate file will be retained; for other temporary files or unnecessary files, all will be deleted. The next time the test is performed, the new test case will overwrite the old test case that has passed the test, so as to perform long-term testing and save disk space.

[0087] (2) When the proportion of failed tests during a completed test is greater than or equal to a specified threshold, the test process is interrupted and the intermediate data with comparison errors is compressed and retained so that the problem can be troubleshooted after the test is completed.

[0088] During the continuous testing of images in multiple formats, if the verification fails multiple times, it indicates that there are major errors in the image processor. In specific implementations, a threshold can be set for the simulation verification process so that design errors in the image processor can be handled in a timely manner. For example, the threshold is set to 50%. When simulation tests of 20 formats are required, if more than 10 formats fail the test, it is considered that the proportion of failed tests is greater than the threshold. At this time, it is necessary to interrupt the simulation in advance, and report an error to allow the user to intervene in advance to check the problem, or compress and retain half of these comparison error files, saving space while waiting for the simulation to be completed before troubleshooting the problems in each format.

[0089] like Figure 7 As shown, the method provided in this embodiment can achieve close coordination between multiple different scripts, programs, and platforms through central scheduling, ultimately automate the entire process through parameter matching and transmission, and simultaneously optimize memory.

[0090] Furthermore, using central scheduling as the core of the entire simulation method is not limited to completing the functions described in this embodiment, but can also achieve simulation coverage of more scenarios and efficient application according to configuration parameters and full utilization of different programming languages. It is even possible to access AI big models through API interfaces to perform artificial intelligence simulation tasks.

[0091] The self-generated image test case coverage method provided in this embodiment can simultaneously solve the problems of a single data source, poor compatibility with various formats, and excessive reliance on disk space in the existing image simulation verification process. Through the mutual cooperation of various programs, commands, and models, the high investment in manpower and memory in the simulation verification process can be reduced, effectively reducing a large part of the R&D costs.

[0092] Based on the method for self-generated image test case coverage provided in the above embodiment, the present invention also provides a device for self-generated image test case coverage that can be used to implement the above method, such as Figure 8 , which is a schematic diagram of the device architecture of an embodiment of the present invention. The device covered by the self-generated image test case of this embodiment includes one or more processors 11 and a memory 12. Among them, Figure 8 A processor 11 is taken as an example.

[0093] The processor 11 and the memory 12 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0094] The memory 12 is a non-volatile computer-readable storage medium as a method for self-generated image test case coverage, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the method for self-generated image test case coverage in the above embodiment. The processor 11 executes various functional applications and data processing of the device for self-generated image test case coverage by running the non-volatile software programs, instructions and modules stored in the memory 12, that is, the method for self-generated image test case coverage in the above embodiment is implemented.

[0095] The memory 12 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 12 may optionally include a memory remotely arranged relative to the processor 11, and these remote memories may be connected to the processor 11 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0096] The program instructions / modules are stored in the memory 12, and when executed by one or more processors 11, the method for self-generated image test case coverage in the above embodiment is executed, for example, the above described Figure 1 , Figure 3 and Figure 4 The steps shown.

[0097] An embodiment of the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 8 A processor 11 in the embodiment may enable the one or more processors to execute the method for self-generated image test case coverage in the above embodiment, for example, executing the above described Figure 1 , Figure 3 and Figure 4 The steps shown can also be implemented Figure 2 , Figure 3 and Figure 6 The various modules and units described.

[0098] It is worth noting that the information interaction, execution process, etc. between the modules and units within the above-mentioned devices and systems are based on the same concept as the processing method embodiment of the present invention. The specific contents can be found in the description of the method embodiment of the present invention and will not be repeated here.

[0099] A person skilled in the art may understand that all or part of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for self-generated image test case coverage, characterized in that: include: Use the precompiled file to call the conversion script, and convert the original image into at least one test image through the conversion script. The converted test image can cover all format requirements in the test; Pass the corresponding configuration parameters in the precompiled file to the stimulus file, obtain the test image specified by the configuration parameters in the stimulus file, and input the test image into the image signal processor; The image signal processor is configured according to the configuration parameters in the stimulus file, and the image signal processor tests the test images one by one according to the corresponding configuration parameters.

2. The method for self-generated image test case coverage according to claim 1, characterized in that: The converting of the original image into at least one test image by the conversion script comprises: Obtain each image attribute that needs to be covered during the test in the precompiled file, where the image attributes include: one or more of image format, frame rate, resolution, test mode, and test scene; Extract the pixel values ​​in the original image, and generate test images for each image attribute one by one according to the pixel arrangement order and pixel width in each image attribute based on the extracted pixel values.

3. The method for self-generated image test case coverage according to claim 1, characterized in that: The test image specified by the configuration parameters in the acquisition stimulus file includes: Obtain all generated test images according to the file path in the configuration parameters, convert the pixel data of the test images into the input interface data format supported by the image signal processor, store the converted pixel data in a designated memory in a read-only file mode, and use the pixel data in the memory as an offline data source of the image signal processor; And / or, when a test image needs to be input, a corresponding excitation signal is generated according to the file path in the configuration parameters, the test image under the file path is obtained through the excitation signal, and the obtained test image is used as an online data source of the image signal processor.

4. The method for self-generated image test case coverage according to claim 1, characterized in that: The configuring the image signal processor according to the configuration parameters in the stimulus file, and the image signal processor testing the test images one by one according to the corresponding configuration parameters, comprises: The stimulus file passes the configuration parameters to the image signal processor to configure the registers of the image signal processor; The image signal processor is driven by the configured registers so that the image signal processor tests one or more test images according to the configuration parameters, wherein the configuration parameters include: one or more of the image attributes of the current test, the process control parameters of the current test, the end condition of the current test, whether to start the next round of testing, and the number of times the test is repeated.

5. The method for self-generated image test case coverage according to claim 4, characterized in that: The stimulus file transmits configuration parameters to the image signal processor including: Use precompiled files to schedule the built-in parameters of the simulation model, assign values ​​to the external variables corresponding to the configuration parameters, and pass the assigned external parameters to the parameters with the same name inside the register transfer language; and / or, using a precompiled file to schedule a calculation formula in cshell, calculating all parameters coupled with each image attribute according to the configuration parameters of the image attribute, and assigning the calculated parameter values ​​to corresponding registers by scheduling built-in parameters of the simulation model; And / or, using a precompiled file to classify the coupled registers in the register transfer language, matching the configuration parameters according to the classification results, and assigning matching configuration parameters to the registers.

6. The method for self-generated image test case coverage according to claim 1, characterized in that: The image signal processor tests the test images one by one according to the corresponding configuration parameters, including: When the test image contains more than one frame, the stimulus file sets the number of frames to be tested according to the configuration parameters, and tests each frame one by one until all the frames to be tested are completed; And / or, when the test image has more than one image attribute, after the test image processing of the current image attribute is completed, the stimulus file obtains the test image of the next image attribute according to the configuration parameters, and performs testing according to the configuration parameters of the corresponding image attribute until the test image testing of all image attributes is completed.

7. The method for self-generated image test case coverage according to claim 6, characterized in that: The testing according to the configuration parameters of the corresponding image attributes includes: Before and / or after each level of processing nodes of the image signal processor, obtaining, through a dump module, intermediate data after each level of processing nodes processes the test image; The intermediate data of each level is compared with the corresponding expected data according to the configuration parameters, and the test results are obtained based on all the comparison results.

8. The method for self-generated image test case coverage according to claim 7, characterized in that: The image signal processor tests the test images one by one according to the corresponding configuration parameters and further comprises: When this test passes, schedule the memory cleanup process using the preprocessed file to clean up intermediate data and / or unnecessary files; And / or, when the proportion of failed tests in a completed test process is greater than or equal to a specified threshold, the test process is interrupted and intermediate data with comparison errors is compressed and retained so that the problem can be troubleshooted after the test is completed.

9. A device for self-generated image test case coverage, characterized in that: The method comprises at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, wherein the memory stores instructions executable by the at least one processor, and wherein the instructions, after being executed by the processor, are used to complete the method for self-generated image test case coverage as described in any one of claims 1 to 8.

10. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are executed by one or more processors to complete the method for self-generated image test case coverage as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Image signal processor verification method, apparatus and device, and readable storage medium

    CN121303009A