Intermediate node comparison method, apparatus, and image processing verification system

By configuring comparison parameters and formatting through a declarative interface, the problem of difficulty in locating intermediate node errors in image processing hardware verification is solved, enabling efficient and accurate intermediate data verification and improving the continuity and accuracy of verification.

CN123178178APending Publication Date: 2026-11-27SHENZHEN YINGWEI INNOVATION MICROELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611316634.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing image processing hardware verification, it is difficult to efficiently determine the errors in intermediate processing steps, and manual verification is inefficient and lacks targeted judgment of quantitative errors, which affects the accuracy and continuity of verification.

Method used

The comparison parameters are declared and configured through a declarative interface, including the target intermediate node, reference data and comparison tolerance strategy. After acquiring and formatting the bus data, it is compared with the reference data to generate the comparison results.

Benefits of technology

It improves the efficiency of intermediate data verification and the accuracy of error location, enhances the continuity and accuracy of verification, and can directly locate anomalies in intermediate nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178178A_ABST
    Figure CN123178178A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of intermediate node comparison method, device and image processing verification system, it is related to image processing verification field, the method comprises: configuration comparison parameter is declared by declarative interface, comparison parameter at least includes: target intermediate node, reference data and comparison tolerance strategy;Bus data of target intermediate node is obtained, and bus data is formatted according to comparison tolerance strategy;The bus data after formatting processing is compared with reference data, and comparison result is generated.The method can establish the direct verification path for intermediate processing link, improve intermediate data verification efficiency and result reliability, reduce artificial investigation complexity, improve error positioning accuracy and verification iteration continuity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing verification technology, and in particular to an intermediate node comparison method, apparatus, and image processing verification system. Background Technology

[0002] In image processing hardware verification, existing solutions are usually based on simulation platforms and reference models, and end-to-end consistency comparison is used to verify the pipeline processing results.

[0003] However, end-to-end comparison only reflects the differences in the final output and makes it difficult to determine the intermediate processing stage where the error is located. When the intermediate data in the pipeline has high dimensionality and large volume, engineers often need to manually export and check it level by level, which results in low debugging efficiency and a lack of targeted judgment on deviations such as quantization errors, affecting the accuracy of verification and the continuity of iterative verification.

[0004] Therefore, how to achieve efficient verification of intermediate data in the image processing hardware pipeline and improve the accuracy of error localization and the continuity of verification has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides an intermediate node comparison method, apparatus, and image processing verification system to verify intermediate data in the image processing hardware pipeline, improve the ability to detect and locate anomalies in intermediate links, and meet the need for continuous verification processes.

[0006] In a first aspect, embodiments of this application provide an intermediate node comparison method applied to an image processing verification system. The image processing verification system includes a declarative interface, and the method includes:

[0007] The comparison parameters are declared and configured through a declarative interface. The comparison parameters include at least the target intermediate node, reference data, and comparison tolerance strategy.

[0008] Acquire the bus data of the target intermediate node and format the bus data according to the comparison tolerance strategy;

[0009] The formatted bus data is compared with the reference data to generate a comparison result.

[0010] In one possible embodiment, the comparison parameters also include: the clock branch corresponding to the target intermediate node;

[0011] The declarative interface internally instantiates a first clock instance and a second clock instance. The first clock instance and the second clock instance are generated by the declarative interface based on the corresponding clock template.

[0012] The clock branch is used to determine whether to use the first clock instance or the second clock instance to sample data from the target intermediate node;

[0013] Obtain bus data from the target intermediate node, including:

[0014] The target intermediate node is sampled using a first clock instance at the rising edge of the clock to obtain first sampled data, and / or the target intermediate node is sampled using a second clock instance at the falling edge of the clock to obtain second sampled data;

[0015] According to the clock branch corresponding to the target intermediate node, the first sampled data or the second sampled data is used as the target sampled data;

[0016] The target sampling data includes: bus data, alignment activation signal, frame start signal, and frame end signal.

[0017] In one possible embodiment, the bus data is formatted according to a comparison tolerance strategy, including:

[0018] When the frame start signal corresponding to the current frame of the target intermediate node is detected to be high, the reference data file corresponding to the current frame is read, and the reference data includes the reference data file.

[0019] When the alignment activation signal for the target alignment data in the current frame is determined to be high, the target alignment data corresponding to the current frame is extracted from the bus data, and the target alignment data is formatted according to the alignment tolerance strategy.

[0020] In one possible embodiment, reading the reference data file corresponding to the current frame includes:

[0021] Based on the frame number of the current frame and the preset naming rules for reference data files, read the reference data file corresponding to the current frame from the reference data;

[0022] If the reference data file is not found, the comparison of the current frame is skipped and the comparison of the next frame is performed, and a file missing alarm is generated.

[0023] In one possible embodiment, the formatted bus data is compared with reference data to generate a comparison result, including:

[0024] During the process of comparing the target comparison data of each frame after formatting with the reference data corresponding to each frame in the reference data file, for each frame, when the frame termination signal is detected to be high, the comparison of the current frame ends and the current frame number, the number of comparisons of the current frame, and the number of errors of the current frame are obtained.

[0025] Based on the number of comparisons and the number of errors for all frames from the start of the comparison to the current time, the cumulative number of comparisons and the cumulative number of errors are obtained;

[0026] The comparison result includes the current frame number, the number of comparisons for the current frame, the number of errors for the current frame, the cumulative number of comparisons, and the cumulative number of errors.

[0027] In one possible embodiment, after generating the alignment results, the method further includes:

[0028] The bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are annotated according to the name of the target intermediate node. The annotated bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are instantiated as corresponding signal lines, and the signal lines are reconnected to obtain the comparison simulation waveform.

[0029] If at least one of the comparison results is updated, the comparison simulation waveform is updated in real time using the updated comparison result; the at least one of the following count results is the current frame comparison count, the current frame error count, the cumulative comparison count, and the cumulative error count.

[0030] In one possible embodiment, the method further includes:

[0031] In response to a skip comparison instruction received from the declarative interface, skip comparison processing is performed on the specified frame in the target intermediate node indicated by the skip comparison instruction.

[0032] In one possible embodiment, the method further includes:

[0033] If the comparison is completed at least one target intermediate node, a deviation statistics report is generated based on the comparison results corresponding to at least one target intermediate node.

[0034] Secondly, embodiments of this application provide an intermediate node comparison device applied to an image processing verification system. The image processing verification system includes a declarative interface, and the device includes:

[0035] The configuration module is used to declare and configure the comparison parameters through a declarative interface. The comparison parameters include at least: target intermediate nodes, reference data, and comparison tolerance strategy.

[0036] The acquisition module is used to acquire the bus data of the target intermediate node and format the bus data according to the comparison tolerance strategy.

[0037] The comparison module is used to compare the formatted bus data with the reference data and generate comparison results.

[0038] In one possible embodiment, the comparison parameters also include: the clock branch corresponding to the target intermediate node;

[0039] The declarative interface internally instantiates a first clock instance and a second clock instance. The first clock instance and the second clock instance are generated by the declarative interface based on the corresponding clock template.

[0040] The clock branch is used to determine whether to use the first clock instance or the second clock instance to sample data from the target intermediate node;

[0041] The acquisition module is also specifically used for:

[0042] The target intermediate node is sampled using a first clock instance at the rising edge of the clock to obtain first sampled data, and / or the target intermediate node is sampled using a second clock instance at the falling edge of the clock to obtain second sampled data;

[0043] According to the clock branch corresponding to the target intermediate node, the first sampled data or the second sampled data is used as the target sampled data;

[0044] The target sampling data includes: bus data, alignment activation signal, frame start signal, and frame end signal.

[0045] In one possible embodiment, the acquisition module is further configured to:

[0046] When the frame start signal corresponding to the current frame of the target intermediate node is detected to be high, the reference data file corresponding to the current frame is read, and the reference data includes the reference data file.

[0047] When the alignment activation signal for the target alignment data in the current frame is determined to be high, the target alignment data corresponding to the current frame is extracted from the bus data, and the target alignment data is formatted according to the alignment tolerance strategy.

[0048] In one possible embodiment, the acquisition module is further configured to:

[0049] Based on the frame number of the current frame and the preset naming rules for reference data files, read the reference data file corresponding to the current frame from the reference data;

[0050] If the reference data file is not found, the comparison of the current frame is skipped and the comparison of the next frame is performed, and a file missing alarm is generated.

[0051] In one possible embodiment, the comparison module is further configured to:

[0052] During the process of comparing the target comparison data of each frame after formatting with the reference data corresponding to each frame in the reference data file, for each frame, when the frame termination signal is detected to be high, the comparison of the current frame ends and the current frame number, the number of comparisons of the current frame, and the number of errors of the current frame are obtained.

[0053] Based on the number of comparisons and the number of errors for all frames from the start of the comparison to the current time, the cumulative number of comparisons and the cumulative number of errors are obtained;

[0054] The comparison result includes the current frame number, the number of comparisons for the current frame, the number of errors for the current frame, the cumulative number of comparisons, and the cumulative number of errors.

[0055] In one possible embodiment, the comparison module is further configured to:

[0056] The bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are annotated according to the name of the target intermediate node. The annotated bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are instantiated as corresponding signal lines, and the signal lines are reconnected to obtain the comparison simulation waveform.

[0057] If at least one of the comparison results is updated, the comparison simulation waveform is updated in real time using the updated comparison result; the at least one of the following count results is the current frame comparison count, the current frame error count, the cumulative comparison count, and the cumulative error count.

[0058] In one possible embodiment, the intermediate node comparison device is further used for:

[0059] In response to a skip comparison instruction received from the declarative interface, skip comparison processing is performed on the specified frame in the target intermediate node indicated by the skip comparison instruction.

[0060] In one possible embodiment, the intermediate node comparison device is further used for:

[0061] If the comparison is completed at least one target intermediate node, a deviation statistics report is generated based on the comparison results corresponding to at least one target intermediate node.

[0062] Thirdly, embodiments of this application provide an image processing verification system, which includes a declarative interface;

[0063] The image processing verification system is used to employ the intermediate node comparison method provided by the first aspect and / or various possible embodiments of the first aspect.

[0064] Fourthly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0065] The memory stores the instructions that the computer executes;

[0066] The processor executes computer execution instructions stored in memory, causing the processor to perform the methods provided by the first aspect and / or various possible embodiments of the first aspect.

[0067] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the first aspect and / or various possible embodiments of the first aspect.

[0068] Sixthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the first aspect and / or various possible embodiments of the first aspect.

[0069] The intermediate node comparison method, apparatus, and image processing verification system provided in this application, by declaring and configuring comparison parameters including target intermediate nodes, reference data, and comparison tolerance strategies based on a declarative interface, can establish flexible and clear verification objects for specified intermediate processing stages in the image processing hardware pipeline. By acquiring the bus data of the target intermediate node and formatting the bus data according to the comparison tolerance strategy, the intermediate node data can be adapted to the corresponding error judgment requirements before comparison. Furthermore, by comparing the formatted bus data with the reference data and generating comparison results, the efficiency of intermediate data verification and the accuracy of error location can be improved, further enhancing the verification accuracy and the continuity of iterative verification. Attached Figure Description

[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0071] Figure 1 Flowchart of the intermediate node comparison method provided in the embodiments of this application Figure 1 ;

[0072] Figure 2 Flowchart of the intermediate node comparison method provided in the embodiments of this application Figure 2 ;

[0073] Figure 3 A schematic diagram of the intermediate node comparison device provided in this application;

[0074] Figure 4 A schematic diagram of the structure of the electronic device provided in this application.

[0075] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0076] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended specification.

[0077] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and purpose. For example, "first device" and "second device" are merely used to distinguish different devices and do not limit their order of execution. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0078] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0079] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0080] In modern digital imaging systems, image processing chips such as Image Signal Processors (ISPs) and Neural Processing Units (NPUs) typically employ deep pipelined architectures in their verification processes for the Device Under Test (DUT). This architecture decomposes complex image processing tasks into multiple serial or parallel processing stages. In such scenarios, the DUT usually contains multiple serial or parallel intermediate processing nodes, with image data transmitted between these nodes via a bus. The verification system generally combines a simulation platform, a reference model, and test stimuli to perform consistency checks on the processing results.

[0081] Most existing solutions employ an end-to-end verification approach, which involves inputting a test image into the image processing pipeline, obtaining the final output, and comparing the final output with reference data generated by a reference model to determine the correctness of the overall processing chain. While this method can reflect whether there are deviations in the final imaging result, its working principle mainly revolves around the end result and lacks direct verification capability for the intermediate nodes within the pipeline.

[0082] When the final output is abnormal, engineers usually need to manually extract the bus data of a certain intermediate processing stage and troubleshoot the source of the error step by step by combining the waveform. Since intermediate node data is often characterized by high dimensionality, large data volume, and complex format, manual verification is not only inefficient, but also easily affected by format conversion, data alignment, or timing misunderstanding.

[0083] Meanwhile, image processing often involves acceptable deviations such as quantization errors and rounding differences. Existing end-to-end solutions lack a targeted tolerance judgment mechanism for intermediate data, which can easily misjudge subtle differences that meet expectations as anomalies, or fail to detect potential problems caused by local design changes in a timely manner due to the lack of intermediate node comparison, thereby affecting the accuracy of error location and the continuity of iterative verification.

[0084] Therefore, achieving efficient verification of intermediate data in image processing hardware pipelines while ensuring both accurate error localization and reliable comparison results has become a pressing technical problem. To address this issue, a method for intermediate node alignment in an image processing verification system is provided. This method uses a declarative interface to configure alignment parameters, ensuring that these parameters include at least the target intermediate node, reference data, and an alignment tolerance strategy. Subsequently, the bus data of the target intermediate node is acquired and formatted according to the alignment tolerance strategy. The formatted bus data is then compared with the reference data to generate the alignment result. By integrating this method with the system architecture of the simulation platform, reference model, and image processing pipeline in the image processing verification system, a more direct verification path can be established for intermediate processing stages.

[0085] This application provides an intermediate node comparison method applicable to image processing verification systems for real-time comparison and verification of bus data at intermediate nodes in image processing. The image processing verification system can refer to a complete hardware and software environment for verifying the functional correctness of image processing chips (such as ISPs and NPUs). This system typically includes: a Design Under Test (DUT), a testbench, a Golden Model, a simulator, and a Universal Verification Methodology (UVM) framework. The verification system confirms the functional correctness of the DUT by inputting test data into the DUT, collecting output data, and comparing it with the expected output of the Golden Model.

[0086] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0087] Figure 1 This is a flowchart illustrating an intermediate node comparison method provided in an embodiment of this application. Figure 1 As shown, this intermediate node comparison method is applied to an image processing verification system. The image processing verification system includes a declarative interface and includes the following steps:

[0088] S101. Declare and configure comparison parameters through a declarative interface.

[0089] The comparison parameters include at least: target intermediate nodes, reference data, and comparison tolerance strategy. The image processing verification system can include multiple declarative interfaces. These interfaces are used to declare and configure the comparison parameters, allowing verification personnel to pre-declare executable configurations without manually specifying sampling points and judgment rules during simulation. The reference data is a set of comparison benchmark data configured through the declarative interfaces. The reference data is organized into multiple reference data files, each storing reference data for the corresponding frame. For example, the comparison behavior is configured declaratively through this interface, such as through the `compare_points` macro interface, providing a set of parameters (e.g., node name, signal to be compared, Golden data path, etc.). The macro automatically completes all underlying implementations.

[0090] The comparison parameters constitute the constraint set of this intermediate node comparison process. The target intermediate node is used to identify the specific processing node in the image processing pipeline that needs to be verified. For example, in an ISP containing 15 processing stages, the output of stage 3 (denoising stage), stage 7 (white balance stage), and stage 12 (edge ​​enhancement stage) can all be used as target intermediate nodes. Each intermediate node can correspond to a bus data signal, which outputs the processing result of that stage during the simulation. The reference data is used to provide a benchmark data source for consistency judgment. The comparison tolerance strategy is used to define the allowable error range and data adaptation rules, that is, to define the acceptable range of differences, including: integer bit width, fractional bit width, signed / unsigned identifier, signal inversion requirements, and tolerance threshold, etc.

[0091] In practice, the verification system reads the configuration content defined in the declarative interface during the test case loading phase and generates a comparison task object for this simulation accordingly. For example, the declarative interface uses macro declarations, where verification personnel write the target intermediate node name, reference data file path, data range information, and comparison tolerance strategy field into the test file. During the compilation or simulation initialization phase, the system parses these fields into structured parameters.

[0092] In one possible embodiment, the declarative interface can also adopt a class declaration approach, encapsulating the target intermediate node identifier, reference data read handle, and comparison tolerance strategy as class members, which are dynamically loaded through instantiation between different test cases, thereby adapting to multiple image processing pipeline versions or multiple intermediate node combination verification scenarios.

[0093] To ensure that subsequent steps can be executed, the verification system can perform validity checks after the parameters are loaded. The verification content includes at least whether the target intermediate node configuration is valid, whether the reference data path is accessible, whether the reference data format matches the declared configuration, whether the comparison tolerance strategy includes complete fields, and whether the parameter values ​​are within the allowed range.

[0094] When the target intermediate node configuration is invalid, the system generates an alarm and stops the creation of the current comparison task; when the reference data file does not exist or cannot be parsed, the system records the configuration abnormality status for identification in the subsequent comparison stage; when the key fields of the comparison tolerance strategy are missing, the system directly reports the configuration error using preset verification rules without entering the sampling process.

[0095] It should be noted that in this application, the target intermediate node can correspond to a denoising node, color transformation node, scaling node, or other intermediate processing node in the image processing pipeline. However, its implementation does not depend on a specific processing algorithm, but rather on the structural condition that the node can be recognized by the simulation platform and output bus signals. The reference data can originate from a data file generated offline from the reference model, or from the output buffer of a software model running synchronously with the simulation. When using a file, the verification system establishes a reference data mapping relationship based on the declared path, data format description, and data organization information. When using a memory object, the system binds the reference data read handle to the target intermediate node for subsequent reading. The comparison tolerance strategy in this application not only represents a simple threshold but also includes data format definitions and error judgment rules, ensuring that subsequently acquired bus data is first converted into an expression consistent with the reference data before performing difference judgment.

[0096] Based on the above analysis, this step abstracts the target intermediate nodes, reference data, and comparison tolerance strategies into a unified configuration object through a declarative interface. This transforms the verification of intermediate nodes in the image processing hardware pipeline from a temporary manual operation into a repeatable simulation task. With this approach, the subsequent sampling objects, reference benchmarks, and judgment criteria are fixed before the simulation begins, directly supporting data capture and automatic comparison at the intermediate node level. Furthermore, interruptions caused by incorrect node selection, missing reference data, or incomplete comparison tolerance strategy definitions are preemptively addressed during the configuration phase.

[0097] S102. Obtain the bus data of the target intermediate node and perform formatting processing according to the comparison tolerance strategy.

[0098] Bus data refers to the data output by the target intermediate node, which serves as the direct input to the comparison process. Its source is the sampled values ​​of the relevant bus signals of the target intermediate node at the sampling time during the simulation. In the image processing pipeline, bus data can be organized in a multi-channel, multi-bit-width format. For example, an intermediate node of an RGB image may simultaneously output data from three channels: R, G, and B, each channel being 8-bit or 16-bit.

[0099] Understandably, since image processing pipelines typically use a time-driven approach to transmit data, when performing this step, the verification system first establishes a sampling and monitoring relationship based on the target intermediate node determined in step S101, and samples the bus data according to the node output timing. Specifically, the simulation platform acquires the bus data of the target intermediate node at the sampling time and forms a bus data sequence according to a preset order. For pipeline nodes with paused transmission or timing interruptions, the system can record the bus value when it confirms that the data is in an acquireable state to ensure that the sampling result is consistent with the actual node output.

[0100] Furthermore, since the encoding method, bit width configuration, and numerical representation of the intermediate node bus data may not be completely consistent with the reference data, the verification system does not directly proceed to comparison after sampling. Instead, it performs formatting processing on the bus data according to the comparison tolerance strategy. The comparison tolerance strategy is used to define the allowable error range and processing rules during data comparison, and in this application, it may include data format adaptation rules and tolerance thresholds.

[0101] In practice, the system first performs preprocessing, transforming and aligning the raw bus data according to the declared configuration. When the target intermediate node output differs from the reference data in representation, the system adjusts the data according to the comparison tolerance strategy, restoring the data to an expression consistent with or comparable to the reference data. Subsequently, precision adaptation and error rule processing are performed to generate comparable values ​​for the preprocessed data. For multi-channel parallel output nodes, the system can also split and rearrange the bus data according to channel arrangement rules before writing it to a formatted buffer.

[0102] In one possible embodiment, the formatting process can also adopt a pipelined approach that separates preprocessing and postprocessing. Preprocessing is responsible for the basic format adaptation of the raw bus data, while postprocessing is responsible for precision mapping and error rule processing. This allows different comparison tolerance strategies to be reused on the same sampling result, thereby supporting multiple sets of verifications on the same node.

[0103] In another possible embodiment, the comparison tolerance strategy adopts an adaptive approach. After reading the reference data, the verification system dynamically generates a tolerance range based on its data characteristics and writes the dynamic threshold along with the formatted bus data into the comparison cache. This dynamic adjustment is still constrained by the upper limit in the declared configuration to ensure that the tolerance range is within a preset acceptable range.

[0104] When handling abnormal conditions, if an abnormal state occurs in the target intermediate node during the simulation, the system can mark the bus data collected in the corresponding interval; if the data length is found to be inconsistent with the expected reference data during the sampling process, the system can record the abnormal situation for identification in the subsequent comparison stage.

[0105] Based on the above analysis, this step converts the timing output of the target intermediate node in the simulation into a data representation consistent with the reference data, so that subsequent comparisons are no longer affected by differences in bit width, symbol interpretation, precision, and rounding methods. For quantization errors and format differences commonly encountered in image processing hardware verification, this step uses a comparison tolerance strategy to drive data adaptation and form a unified comparable object, thereby enabling reliable judgment of intermediate node verification while maintaining timing correspondence.

[0106] S103. Compare the formatted bus data with the reference data to generate a comparison result.

[0107] In this application, the reference data serves as the comparison benchmark. The source configuration was completed in step S101, and a unified representation basis was established with the formatted bus data in step S102. Therefore, this step directly performs a step-by-step comparison according to the sampling index. Specifically, the verification system first aligns the formatted bus data and the reference data, confirming that they belong to the same target intermediate node and the same data location, before calculating the difference values ​​between corresponding items.

[0108] Understandably, when the comparison tolerance strategy uses an absolute error rule, the system calculates the absolute difference between the formatted data and the reference data, and determines whether this difference is less than or equal to the tolerance threshold. When the comparison tolerance strategy includes a relative error rule, the system further calculates the relative deviation using the reference data amplitude as a normalization benchmark, and compares it with the upper limit of the relative tolerance. When the comparison tolerance strategy defines both absolute and relative tolerances, the system determines the judgment method based on whether both conditions are met simultaneously or either condition is met, according to the declared configuration. For multi-channel parallel nodes, the system calculates the difference for each channel separately and generates channel-level judgment results, which are then summarized into the overall judgment status of the current sampling position.

[0109] The comparison results include at least a pass status or an error status. In this application, when the verification system detects a difference exceeding the tolerance range for the first time, it records the corresponding data location, target intermediate node identifier, formatted bus data value, reference data value, and difference value, and updates the cumulative error count. If multiple consecutive sampling points have errors, the system continues to accumulate the error count and can keep the first error location unchanged so that verification personnel can prioritize locating the location of the first anomaly. If the reference data is missing, the system does not perform the comparison of the corresponding data based on the configuration anomaly marker formed in S101 and generates an alarm. For data intervals marked as abnormal in S102, the system identifies them separately as abnormal intervals and does not participate in the normal comparison result statistics.

[0110] Regarding the output method, the verification system writes the comparison results into a result object and simultaneously generates a status code that can be recognized by the regression framework. For example, the text report can record the target intermediate node name, reference data source, comparison tolerance strategy summary, total number of sampling points, number of pass points, number of error points, first error location, and cumulative number of errors. For batch regression scenarios, multiple test cases output their respective intermediate node comparison results, and the regression framework summarizes these into node-level, test case-level, or version-level statistics based on the status codes, for use in automated verification after design iterations.

[0111] The core of this step lies in automatically judging the formatted bus data and reference data under unified rules, while retaining sufficient contextual information to support error localization. Since intermediate node comparison does not depend on whether the final output image is abnormal, any shift in the intermediate processing result will be recorded at the corresponding node. Therefore, this step forms a direct verification path for the internal processing stages of the pipeline. Based on the above analysis, by generating results such as status, error status, and cumulative error count, the verification system can continuously monitor changes in intermediate node characteristics after design modifications and directly provide the target intermediate node and the location of the first error when an anomaly is detected, reducing the need for step-by-step manual troubleshooting when relying solely on the final result.

[0112] The intermediate node comparison method provided in this application integrates a declarative interface, node bus sampling, formatting driven by a comparison tolerance strategy, and result generation into a single image processing verification process. The intermediate node verification object, reference basis, and judgment criteria are uniformly configured before simulation. During simulation, bus data of the target intermediate node can be collected, and after adaptation of the symbol, bit width, precision, and rounding rules, it is compared item by item with the reference data. This establishes a direct and repeatable verification path for the internal nodes of the image processing hardware pipeline. Therefore, it can identify intermediate node anomalies even when the final output is normal but there has been a deviation in local processing. Furthermore, it can make judgments according to the declared comparison tolerance strategy when there are design deviations such as quantization errors or rounding differences, ensuring that the comparison results are both locatable and interpretable. It should be understood that the above examples are merely illustrative and not limiting.

[0113] Next, in Figure 1 Based on the embodiments, the intermediate node comparison method of the present application will be described in detail. For example, in the functional verification node of ISP chip or NPU chip, it is necessary to verify each processing stage in the pipeline; or in the regression testing stage, intermediate nodes are automatically verified after each design iteration; multiple nodes can also be jointly verified, and multiple node comparisons can be configured to form a complete pipeline verification process.

[0114] Figure 2 A flowchart illustrating an intermediate node comparison method provided in this application embodiment. Figure 2 ,like Figure 2 As shown, this embodiment is... Figure 1 Based on the embodiments, the intermediate node comparison method is further described in detail.

[0115] First, S201, declare the configuration comparison parameters through a declarative interface.

[0116] Step S201 is similar to step S101 above, and will not be described again here.

[0117] In one possible embodiment, the comparison parameters further include: the clock branch corresponding to the target intermediate node;

[0118] The declarative interface internally instantiates a first clock instance and a second clock instance, which are generated by the declarative interface based on the corresponding clock template.

[0119] The clock branch is used to determine whether to use the first clock instance or the second clock instance to sample data from the target intermediate node.

[0120] After the parameter configuration is completed, S202, the target intermediate node is sampled using the first clock instance at the rising edge of the clock to obtain the first sampled data, and / or the target intermediate node is sampled using the second clock instance at the falling edge of the clock to obtain the second sampled data.

[0121] Furthermore, in step S203, the first sampled data or the second sampled data is used as the target sampled data according to the clock branch corresponding to the target intermediate node.

[0122] The target sampling data includes: bus data, comparison activation signal, frame start signal, and frame end signal.

[0123] In practical implementation, the declarative interface can receive the target intermediate node name, corresponding clock branch, and sampling edge information from the configuration interface, and map this information to the instantiation parameters of the clock template. The first clock instance and the second clock instance can be derived from the same clock template, and they are configured to trigger sampling events on different clock edges. The template can preset the sampling period, phase offset, and edge triggering mode to ensure that the sampling time corresponds to the stable output range of the target intermediate node. The bus data output by the target intermediate node can be synchronously latched with the comparison activation signal, frame start signal, and frame end signal through the same sampling trigger source, and after sampling, target sampled data with frame boundary markers is formed.

[0124] Data can be sampled at either the rising or falling edge of the clock, and different designs may employ different edge strategies. To adapt to the timing requirements of the design, this embodiment instantiates two clock sampling instances simultaneously within the declarative interface, corresponding to the rising and falling edges respectively. The user-configured "clock branch" parameter determines which instance is used. During operation, when the verification system detects that the clock branch to which the stable state of the target intermediate node belongs is a rising edge branch, it calls the first clock instance to sample at the rising edge and uses the resulting first sampled data as the target sampled data; when the clock branch is a falling edge branch, it calls the second clock instance to sample at the falling edge and uses the resulting second sampled data as the target sampled data. The target sampled data then enters the subsequent formatting and comparison stages, where the comparison activation signal is used to determine whether the sampling point participates in the comparison, the frame start signal is used to locate the comparison start point of the current frame, and the frame end signal is used to determine the comparison end point of the current frame.

[0125] Specifically, the compare_points macro first instantiates two clocking modules, which are used to read the configured bus data, valid signal, and frame start and end signals at the rising and falling edges of the clock (module), respectively. Based on the identifier configured by the macro, that is, the configured comparison requirements, the selection branch corresponding to the target detection node is declared, and the two branch modules, which compare at the rising edge of the clock and compare at the falling edge of the clock, respectively, determine whether the data is stable when rising or falling. The specific implementation of the two branches is basically the same, the only difference being whether the clocking module uses the rising edge of the clock or the clocking module uses the falling edge of the clock.

[0126] With this method, the sampling edge of the target intermediate node can be kept consistent with its timing attributes, the relationship between the sampled data and the actual output of the node is more stable, and the bus data and frame control signal are synchronized into the subsequent comparison process, making the frame-level verification results of the intermediate node more accurate.

[0127] The following section will further detail the process of formatting bus data. It should be noted that the following description is merely one specific exemplary implementation of the technical solution of this application and does not constitute a limitation on the technical solution of this application.

[0128] In an optional implementation, S204, when the frame start signal corresponding to the current frame of the target intermediate node is detected to be high, the reference data file corresponding to the current frame is read.

[0129] S205. When the target comparison data in the current frame is determined to be effective when the comparison signal is high, the target comparison data corresponding to the current frame is extracted from the bus data, and the target comparison data is formatted according to the comparison tolerance strategy.

[0130] The reference data includes reference data files, which are divided into multiple reference data files based on frames. Each reference data file stores the reference data for the corresponding frame. In the image processing pipeline, data is transmitted in frames, and each frame contains a large number of pixel data points. This embodiment constructs a precise timing control mechanism through a frame start signal and a valid signal to ensure that Golden data is loaded at the correct time, and formatting operations are only performed on valid data. A signal going high, i.e., the operation of driving a signal from a low level (logic 0) to a high level (logic 1), is exemplified by the frame start signal going high, indicating that the signal changes from 0 to 1, marking the start of a new frame.

[0131] In actual implementation, the system first samples the bus data corresponding to the current frame from the target intermediate node and monitors whether the frame start signal is pulled high. When the frame start signal is valid, the controller retrieves the corresponding reference data file from the reference data in the storage unit according to the frame number of the current frame and loads the file into the comparison cache.

[0132] Subsequently, the system continuously monitors the comparison activation signal. When the comparison activation signal goes high, the system extracts the corresponding target comparison data from the bus data and performs formatting processing according to the comparison tolerance strategy. The target comparison data refers to the actual data read from the bus on the current clock cycle that needs to be compared. The target comparison data is only meaningful when the Valid signal is valid; if Valid is invalid, it should not be used for comparison even if there is data on the bus.

[0133] Optionally, the formatting process can be performed by a hardware logic module or a software parsing module. Specifically, it can unify the decimal places of fixed-point data by performing sign expansion, truncation, right shift, or left shift on the data bits, or correct boundary values ​​according to rounding rules, so that the target comparison data and the reference data in the reference data file maintain a comparable representation. In practical applications, this formatting module can also use other types of processing units, and this application does not limit this.

[0134] This processing method binds the reading of the reference data file to the current frame and the formatting of the target alignment data to the alignment activation signal, thus ensuring that the alignment input is preprocessed only within the valid frame segment. Since the formatting result is aligned according to the alignment tolerance strategy, subsequent comparisons with the reference data can directly reflect the valid differences of the current frame.

[0135] Specifically, in COMPARE state, the tool checks the Valid signal every cycle. Only when Valid is high does it perform the following sequence of operations: read bus data - tolerance formatting - point-by-point comparison with Golden - update the counter. If Valid is low, the cycle is skipped, no operation is performed, and the counter is not updated. This gating mechanism ensures that invalid data is not mistakenly included in the comparison statistics.

[0136] With this approach, frame-level reference data reading and target alignment data formatting can be completed within the same frame context. The correspondence between reference data and bus data is clearer, and quantization differences, bit width differences, and rounding differences can be handled according to the alignment tolerance strategy, making the alignment results more consistent with the actual error boundaries of the intermediate nodes of the image processing pipeline.

[0137] Furthermore, the process of reading the reference data file in the above steps specifically includes: reading the reference data file corresponding to the current frame from the reference data according to the frame number of the current frame and the preset configuration of the reference data file naming rules;

[0138] If the reference data file is not found, the comparison of the current frame is skipped and the comparison of the next frame is performed, and a file missing alarm is generated.

[0139] The frame number identifies the sequence number of the currently being processed frame. Frame numbers typically start from 0 or 1 and increment automatically after each frame is processed. In practice, after detecting a valid frame start signal for the current frame, the system reads the frame number and converts it into a filename identifier according to a preset format. Then, it searches for the corresponding file in the reference data directory based on the filename identifier.

[0140] When a reference data file exists, the system uses it as the comparison input for the current frame. If the reference data file does not exist, the path is inaccessible, or the file content cannot be opened, the system stops comparing the current frame and immediately switches to the next frame for comparison, simultaneously recording a file missing alarm. This alarm information can include at least the frame number, the target intermediate node identifier, and the file path information, facilitating the tracing of the source of the missing data.

[0141] In one specific embodiment, when the frame start signal goes high, the golden data file is read according to the frame number recorded internally by the image processing verification system and the golden data file name configured on the interface. The golden data file can be configured in real time by a separate macro interface. In addition, the image processing verification system can also provide a variety of schemes for configuring the golden data file, including configuration by specified frame number, configuration frame by frame in queue form, and batch configuration of multiple frames at one time. Furthermore, the system also provides a function to reset the golden data queue, which can clear the currently configured golden data queue and reconfigure it as needed.

[0142] If the reference file is read successfully, the initialization configuration begins, the current tool status cmp_done is set to "in comparison", the fid of the current frame number is updated, the golden data file of the current frame is opened and loaded into memory for comparison, and the current frame comparison count cur_total_cnt and the current frame comparison error count cur_error_cnt are reset.

[0143] Furthermore, when the tool attempts to open the Golden file, the following exception handling process is executed: First, the file system interface is called to attempt to open the file in read mode; if the file opens successfully, the file content is read into the memory buffer, the file handle is closed, the current tool status cmp_done is set to "comparing", and the normal comparison process begins; if the file opens unsuccessfully (return value is 0 or null), a file missing alarm is generated, the current tool status cmp_done is set to "file does not exist", and all comparison operations for the current frame are skipped; during the skipping period, the tool still listens for the frame termination signal. When the frame termination signal goes high, a normal frame end reset is performed, and then the tool returns to the idle state to wait for the next frame.

[0144] The above-mentioned correspondence between frame numbers and naming rules ensures that the reading of reference data is consistent with the frame sequence. Even when the file corresponding to the current frame is missing, the comparison of subsequent frames can continue uninterrupted, preventing the entire frame sequence verification from being interrupted due to a single frame file anomaly. The coordinated execution of file missing alarms and skipping the current frame comparison allows the verification system to retain missing records without affecting overall operation, providing a basis for reference data completion and problem localization.

[0145] In another optional embodiment, after obtaining the formatted target comparison data, a comparison result can be generated based on the target comparison data, namely S206, during the process of comparing the formatted target comparison data of each frame with the reference data corresponding to each frame in the reference data file, for each frame, when the frame termination signal is detected to be high, the comparison of the current frame is ended and the current frame number, the number of comparisons of the current frame, and the number of errors of the current frame are obtained.

[0146] S207. Based on the number of comparisons and the number of errors for all frames from the start of the comparison to the current time, obtain the cumulative number of comparisons and the cumulative number of errors.

[0147] S208. The current frame number, the number of comparisons for the current frame, the number of errors for the current frame, the cumulative number of comparisons, and the cumulative number of errors are taken as the comparison result.

[0148] The comparison status (cmp_done) register is used to identify the current status of the comparison tool. Possible values ​​include: "IDLE", "LOADING", "COMPARE", "DONE", "FILE_NOT_FOUND", and "SKIPPED". The comparison status is visible in real-time on the waveform and is an important indicator for engineers to judge the comparison progress.

[0149] The current frame comparison count (cur_total_cnt) refers to the total number of comparison operations actually performed by the tool within the current frame. That is, the total number of clock ticks in the current frame where the Valid signal is valid. This counter is reset at the end of the frame and is used to evaluate the comparison coverage of the current frame.

[0150] The current frame error count (cur_error_cnt) refers to the total number of times the alignment result is determined to be "failed" within the current frame. In other words, it represents the total number of data points where the absolute difference between the DUT value and the Golden value exceeds the tolerance threshold. This counter is reset at the end of the frame and is used to evaluate the quality of the current frame.

[0151] The total number of comparisons (total_cnt) is the total number of comparison operations performed across all frames from the start of the simulation to the current moment. This counter continuously increments during the simulation, unaffected by frame boundaries, and is used to evaluate the comparison coverage of the entire test case.

[0152] The cumulative error count (error_cnt) is the total number of failed comparisons across all frames from the start of the simulation to the current moment. This counter continuously increments during the simulation to assess the severity of errors across the entire test case.

[0153] In implementation, the formatted target comparison data is sent to the comparison unit point by point according to the valid timing within the current frame, and matched with the data items at the corresponding positions in the reference data file; when the frame termination signal is detected to be high, the comparison unit immediately ends the comparison process of the current frame and writes the final judgment result of the current frame into the result register or log file.

[0154] During the comparison process, for each data item comparison, the current frame comparison count and the cumulative comparison count are incremented by one. When an inconsistency is found, the current frame error count and the cumulative error count are simultaneously incremented, and the comparison status is updated. The frame termination signal can be directly provided by the frame end flag output by the intermediate node, or it can be generated by a combination of control signals corresponding to the frame length. In practical applications, this signal can also be implemented in other ways, and this application does not limit it.

[0155] During operation, the system locates the reference data file based on the current frame number and continuously compares the formatted data with the reference data item by item within that frame until the frame termination signal goes high, at which point the statistics end and the comparison results are output. This ensures that the comparison status and error statistics for each frame are recorded individually, while retaining overall cumulative information. This method combines frame-level judgment with global statistics in the output, allowing the comparison results to reflect both the pass / fail status of the current frame and the error distribution throughout the continuous verification process.

[0156] Based on the above embodiments, optionally, after obtaining the comparison results, the bus data, reference data, comparison effective signal, frame start signal, frame end signal, and comparison results can be annotated according to the name of the target intermediate node, and the annotated bus data, reference data, comparison effective signal, frame start signal, frame end signal, and comparison results can be instantiated as corresponding signal lines, and the signal lines can be reconnected to obtain the comparison simulation waveform;

[0157] If at least one of the comparison results is updated, the comparison simulation waveform is updated in real time using the updated comparison result; the at least one of the following count results is the current frame comparison count, the current frame error count, the cumulative comparison count, and the cumulative error count.

[0158] Annotation processing, for example, can involve adding the target intermediate node name as a prefix to the signal name. For instance, if the original signal name is a1_data and the node name is denoise_stage, the annotated signal name would be denoise_stage_a1_data, ensuring that all signals related to the same node share a common identifying characteristic in their names. Instantiation refers to connecting internal logic signals to the top-level signal layer of the verification platform via port mapping, making them visible in the waveform viewer.

[0159] Furthermore, after instantiation, each signal line is reconnected to a path accessible to the waveform viewer according to the new name and hierarchy. The purpose of reconnection is to ensure that engineers can quickly find all relevant signals in the waveform window by searching for node names.

[0160] In practical implementation, after generating the comparison results, the system can extract the identifier name of the current intermediate node from the comparison engine, write the name into the display attributes of the bus data, control signals and result objects, and then generate the corresponding signal line object based on the display attributes.

[0161] After establishing a mapping relationship between the signal line object and the time axis, sampled values, and status bits in the simulator, they are reconnected to the same waveform window, so that bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are presented with the same node semantics. When the comparison results are updated due to subsequent supplementary sampling, correction of tolerance thresholds, or re-judgment, the interface refresh module reads the updated result object and replaces the corresponding result markers and status displays in the original waveform, thereby synchronously updating the comparison simulation waveform.

[0162] This method, after the comparison results are generated, uniformly links the data, control signals, and judgment results to the target intermediate node name, and synchronously refreshes the waveform display when the results change, ensuring that the sampling process, frame boundaries, and comparison status of the intermediate node remain consistent and correlated. Therefore, verification personnel can directly view the current comparison status of the intermediate node and its changes in the waveform, forming a visual output corresponding to the simulation data.

[0163] In an optional embodiment, the intermediate node comparison method further includes: in response to a skip comparison instruction received from the declarative interface, performing skip comparison processing on a specified frame in the target intermediate node indicated by the skip comparison instruction.

[0164] In its implementation, after the skip comparison command is received by the declarative interface, the system parses the target intermediate node name, frame number, frame number range, or frame flag, and writes the parsing result into the comparison control table or frame filtering table. Upon receiving the skip command, the system executes the skip logic for the specified frame. During the skip period, the tool does not load Golden data, perform formatting, conduct comparisons, or update counters. When the frame termination signal arrives, the tool resets its state and waits normally for the next frame.

[0165] After obtaining the bus data of the current target intermediate node, the comparison control module will determine whether the current frame belongs to the specified frame indicated by the control table. If it is determined to be the specified frame, the frame format comparison, tolerance judgment and result writing will not be performed. Instead, the frame status will be marked as skipped and the data sampling and comparison control of the subsequent frames will be transferred.

[0166] Understandably, for scenarios with consecutive frame numbers, targeted skipping can be achieved by matching the current frame number with the skip range one by one; for scenarios with discrete frame numbers, a query and match can be performed using a set of frame numbers. If the frame start signal is used as the frame boundary identifier, the current frame number is established after the frame start signal is detected to be high, and the skip marker is continuously used until the frame ends.

[0167] When a specified frame is skipped, the system retains the frame's sampling information, skipping reason, and control status, recording it as "skipped" or "not compared" in the comparison results for subsequent waveform tracing and statistical summarization. If an updated skip comparison command is subsequently received, the system can incrementally update the control table to make the new specified frame effective. This processing method prevents some invalid frames, reset frames, or debugging frames in the target intermediate node from entering the comparison link, while maintaining continuous verification of subsequent normal frames. Because the skip control is associated with the current frame number, it can precisely mask specified frames, reducing the interference of invalid comparisons on statistical results and maintaining the stability and traceability of the intermediate node comparison process.

[0168] Specifically, in order to accommodate operations such as intermediate resets in the hardware, which require skipping the comparison of certain frames, the system can provide a switch macro. Within the frame where the comparison needs to be skipped, the switch can be called to turn off the comparison. The intermediate node comparison tool will set the cmp_done state to "skip the current frame" during that frame and will no longer compare the intermediate node data of this frame.

[0169] Optionally, to adapt the image processing verification system to more complex image processing hardware verification processes, the system can also implement multiple extended macro switches. In the workflow of the image processing hardware, it is necessary to ensure that the hardware can be reset at any point in time, discarding frame processing during the reset period. Therefore, in the verification process, the comparison of that frame needs to be skipped.

[0170] To adapt to similar needs in different scenarios, the system can provide several convenient encapsulated implementation methods, including macro switches for skipping single-frame comparison, skipping comparison from the configured start frame to the configured end frame, immediately temporarily disabling comparison and then restarting comparison at the configured frame number, and completely disabling comparison at a certain intermediate node. Operation and maintenance personnel only need to call the macro switch at the location where comparison needs to be disabled, configure the name of the intermediate node to be skipped and the frame number to be skipped, and the macro switch will pass parameters to the intermediate node comparison tool to achieve skipping comparison of the specified frame or disabling comparison of the specified node.

[0171] Furthermore, if at least one target intermediate node has completed the comparison, a deviation statistical report is generated based on the comparison results corresponding to at least one target intermediate node.

[0172] In this embodiment, the comparison result corresponding to at least one target intermediate node can be written into the result cache by the comparison engine after completing the frame-by-frame comparison of a single target intermediate node. The result cache establishes a corresponding statistical entry for each target intermediate node, and the statistical entry is updated according to the node name, frame number and intra-frame comparison record.

[0173] When generating the deviation statistics report, the statistics module reads the comparison status and count information from each statistical entry, merges and organizes them according to the target intermediate nodes, and then outputs the merged statistical information as a report file, text log, or data displayed on the interface. The report file can use comma-separated values ​​(CSV), lightweight data exchange format (JavaScript Object Notation, JSON), or tabular text format to facilitate subsequent regression analysis and automated processing. In practical applications, other models of this component can also be selected, and this application does not limit this.

[0174] The generation of the deviation statistics report can be triggered after all target intermediate nodes have completed the current round of comparison, or it can be incrementally refreshed when the comparison result of any target intermediate node is updated. The statistics module can update the corresponding deviation count based on the latest comparison result of each target intermediate node and retain historical cumulative information, so that the report reflects both the deviation of the current round and the cumulative deviation. If there is a difference in the deviation distribution between at least one target intermediate node, the report can also output the deviation percentage, the range of consecutive error frame numbers, and the abnormal frame sequence by node dimension, so as to facilitate the location of intermediate processing links where deviations are concentrated.

[0175] Optionally, after the simulation, a comprehensive statistical document is generated by the UVM reporting component of the alignment tool. The report summarizes the alignment results of all configured intermediate nodes, including the number of alignments, the number of errors, the error rate, a list of error frame numbers, and anomaly event records. The report is typically output as text to the simulation log, but can also be extended to structured formats such as JSON or Extensible Markup Language (XML) for subsequent automated analysis.

[0176] This process is executed after all test sequences have been completed and before the simulator exits. The `report_phase` can be used to output statistical reports, clean up resources, and perform final assertion checks. In this embodiment, the `uvm_component` component of the alignment tool iterates through the alignment results of all nodes in the `report_phase` to generate a deviation statistical report.

[0177] UVM also provides reporting macros (UVM_ERROR / UVM_WARNING) to output information of different severity levels in the simulation log. `uvm_error` indicates a functional error, which will increase the test failure count; `uvm_warning` indicates a warning, which will not cause test failures but will record potential problems. In this embodiment, the tool can be configured to whether to throw a `UVM_ERROR` and the maximum allowed number. By default, the intermediate node alignment tool only reports the overall alignment results through its own implemented `report_phase` without throwing a `UVM_ERROR` error.

[0178] Based on the above approach, the image processing verification system can, after completing the comparison at at least one target intermediate node, centrally summarize the comparison results scattered across each node into a deviation statistics report. This allows engineers to directly view the deviation status, error frequency, and cumulative trend of each node. This report corresponds one-to-one with the comparison results of the intermediate nodes, preserving node-by-node verification information while also generating statistical output for regression verification. This improves the efficiency of result aggregation and problem localization in multi-node parallel verification scenarios.

[0179] The intermediate node comparison method provided in this application configures the comparison parameters of the target intermediate node through a declarative macro interface, including bus data signals, reference data, comparison tolerance strategy, frame control signals, and clock sampling edges. During simulation, the intermediate node data is automatically captured using a dual-edge Clocking module, and formatting operations such as shift alignment, sign conversion, and signal flipping are performed according to the tolerance strategy to unify the hardware fixed-point data and Golden reference data to the same precision benchmark. Subsequently, a frame-level state machine drives point-by-point comparison, updating the comparison status, frame number, and multiple counters in real time, and renaming all signals with the node name as a prefix and connecting them to the waveform window to form a searchable and locatable signal cluster. After the simulation, the UVM component outputs a deviation statistics report containing the number of node-by-node comparisons, the number of errors, the error frame number, and abnormal events. This application's embodiments replace traditional manual script writing with declarative configuration, significantly reducing the barrier to entry; eliminate invalid errors caused by quantization rounding in image processing through tolerance formatting mechanism, significantly improving the credibility of comparison results; incorporate intermediate node verification into the regression automation process, eliminating the verification blind spot of only comparing terminal output, forming a complete pipeline verification closed loop.

[0180] Based on the same inventive concept, this application also provides an intermediate node comparison device for implementing the intermediate node comparison method described above. The solution provided by this intermediate node comparison device is similar to the solution described in the intermediate node comparison method above. Therefore, the specific limitations in one or more device embodiments provided below can be found in the limitations of the intermediate node comparison method above, and will not be repeated here.

[0181] Figure 3 This is a schematic diagram of the intermediate node comparison device provided in this application. Figure 3 As shown, the intermediate node comparison device 300 provided in this embodiment is applied to an image processing verification system. The image processing verification system includes a declarative interface, and the intermediate node comparison device 300 includes:

[0182] The configuration module 301 is used to declare and configure the comparison parameters through a declarative interface. The comparison parameters include at least: target intermediate nodes, reference data, and comparison tolerance strategy.

[0183] The acquisition module 302 is used to acquire the bus data of the target intermediate node and format the bus data according to the comparison tolerance strategy.

[0184] The comparison module 303 is used to compare the formatted bus data with the reference data and generate a comparison result.

[0185] In one possible embodiment, the comparison parameters also include: the clock branch corresponding to the target intermediate node;

[0186] The declarative interface internally instantiates a first clock instance and a second clock instance. The first clock instance and the second clock instance are generated by the declarative interface based on the corresponding clock template.

[0187] The clock branch is used to determine whether to use the first clock instance or the second clock instance to sample data from the target intermediate node;

[0188] Module 302 is also specifically used for:

[0189] The target intermediate node is sampled using a first clock instance at the rising edge of the clock to obtain first sampled data, and / or the target intermediate node is sampled using a second clock instance at the falling edge of the clock to obtain second sampled data;

[0190] According to the clock branch corresponding to the target intermediate node, the first sampled data or the second sampled data is used as the target sampled data;

[0191] The target sampling data includes: bus data, alignment activation signal, frame start signal, and frame end signal.

[0192] In one possible embodiment, the acquisition module 302 is further configured to:

[0193] When the frame start signal corresponding to the current frame of the target intermediate node is detected to be high, the reference data file corresponding to the current frame is read, and the reference data includes the reference data file.

[0194] When the alignment activation signal for the target alignment data in the current frame is determined to be high, the target alignment data corresponding to the current frame is extracted from the bus data, and the target alignment data is formatted according to the alignment tolerance strategy.

[0195] In one possible embodiment, the acquisition module 302 is further configured to:

[0196] Based on the frame number of the current frame and the preset naming rules for reference data files, read the reference data file corresponding to the current frame from the reference data;

[0197] If the reference data file is not found, the comparison of the current frame is skipped and the comparison of the next frame is performed, and a file missing alarm is generated.

[0198] In one possible embodiment, the comparison module 303 is further configured to:

[0199] During the process of comparing the target comparison data of each frame after formatting with the reference data corresponding to each frame in the reference data file, for each frame, when the frame termination signal is detected to be high, the comparison of the current frame ends and the current frame number, the number of comparisons of the current frame, and the number of errors of the current frame are obtained.

[0200] Based on the number of comparisons and the number of errors for all frames from the start of the comparison to the current time, the cumulative number of comparisons and the cumulative number of errors are obtained;

[0201] The comparison result includes the current frame number, the number of comparisons for the current frame, the number of errors for the current frame, the cumulative number of comparisons, and the cumulative number of errors.

[0202] In one possible embodiment, the comparison module 303 is further configured to:

[0203] The bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are annotated according to the name of the target intermediate node. The annotated bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison results are instantiated as corresponding signal lines, and the signal lines are reconnected to obtain the comparison simulation waveform.

[0204] If at least one of the comparison results is updated, the comparison simulation waveform is updated in real time using the updated comparison result; the at least one of the following count results is the current frame comparison count, the current frame error count, the cumulative comparison count, and the cumulative error count.

[0205] In one possible embodiment, the intermediate node comparison device 300 is further configured to:

[0206] In response to a skip comparison instruction received from the declarative interface, skip comparison processing is performed on the specified frame in the target intermediate node indicated by the skip comparison instruction.

[0207] In one possible embodiment, the intermediate node comparison device 300 is further configured to:

[0208] If the comparison is completed at least one target intermediate node, a deviation statistics report is generated based on the comparison results corresponding to at least one target intermediate node.

[0209] Each module in the above-mentioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0210] Figure 4 A schematic diagram of the structure of the electronic device provided in this application. Figure 4 As shown, the electronic device 400 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 400 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0211] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0212] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0213] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microcontroller (MCU) or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0214] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0215] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0216] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0217] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0218] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0219] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0220] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0221] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0222] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0223] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0224] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0225] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for comparing intermediate nodes, characterized in that, Applied to an image processing verification system, the image processing verification system including a declarative interface, the method includes: The comparison parameters are declared and configured through the declarative interface. The comparison parameters include at least: target intermediate nodes, reference data, and comparison tolerance strategy. Obtain the bus data of the target intermediate node, and format the bus data according to the comparison tolerance strategy; The formatted bus data is compared with the reference data to generate a comparison result.

2. The method according to claim 1, characterized in that, The comparison parameters also include: the clock branch corresponding to the target intermediate node; The declarative interface internally instantiates a first clock instance and a second clock instance, which are generated by the declarative interface based on the corresponding clock template. The clock branch is used to determine whether to use the first clock instance or the second clock instance to sample data from the target intermediate node. The step of acquiring the bus data of the target intermediate node includes: The target intermediate node is sampled using the first clock instance at the rising edge of the clock to obtain first sampled data, and / or the target intermediate node is sampled using the second clock instance at the falling edge of the clock to obtain second sampled data; According to the clock branch corresponding to the target intermediate node, the first sampled data or the second sampled data is used as the target sampled data; The target sampling data includes: the bus data, the comparison activation signal, the frame start signal, and the frame end signal.

3. The method according to claim 2, characterized in that, The step of formatting the bus data according to the comparison tolerance strategy includes: When the frame start signal corresponding to the current frame of the target intermediate node is detected to be high, the reference data file corresponding to the current frame is read, and the reference data includes the reference data file; When it is determined that the alignment activation signal of the target alignment data in the current frame is pulled high, the target alignment data corresponding to the current frame is extracted from the bus data, and the target alignment data is formatted according to the alignment tolerance strategy.

4. The method according to claim 3, characterized in that, The step of reading the reference data file corresponding to the current frame includes: Based on the frame number of the current frame and the preset naming rules for reference data files, the reference data file corresponding to the current frame is read from the reference data; If the reference data file is not read, the comparison of the current frame is skipped and the comparison of the next frame is performed, and a file missing alarm is generated.

5. The method according to claim 3, characterized in that, The step of comparing the formatted bus data with reference data to generate a comparison result includes: During the process of comparing the target comparison data of each frame after formatting with the reference data file corresponding to each frame in the reference data, for each frame, when the frame termination signal is detected to be high, the comparison of the current frame is ended and the current frame number, the number of comparisons of the current frame, and the number of errors of the current frame are obtained. Based on the number of comparisons and the number of errors for all frames from the start of the comparison to the current time, the cumulative number of comparisons and the cumulative number of errors are obtained; The current frame number corresponding to the current frame, the number of current frame comparisons, the number of current frame errors, the cumulative number of comparisons, and the cumulative number of errors are taken as the comparison result.

6. The method according to claim 5, characterized in that, After generating the comparison results, the method further includes: The bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison result are annotated according to the name of the target intermediate node. The annotated bus data, reference data, comparison activation signal, frame start signal, frame end signal, and comparison result are instantiated as corresponding signal lines, and the signal lines are reconnected to obtain the comparison simulation waveform. Upon receiving an update to at least one of the comparison results, the comparison simulation waveform is updated in real time using the updated comparison result; the at least one of the following is: the number of comparisons in the current frame, the number of errors in the current frame, the cumulative number of comparisons, and the cumulative number of errors.

7. The method according to claim 1, characterized in that, The method further includes: In response to a skip comparison instruction received from the declarative interface, skip comparison processing is performed on the specified frame in the target intermediate node indicated by the skip comparison instruction.

8. The method according to claim 1, characterized in that, The method further includes: If at least one of the target intermediate nodes has completed the comparison, a deviation statistics report is generated based on the comparison results corresponding to at least one of the target intermediate nodes.

9. An intermediate node comparison device, characterized in that, Applied to an image processing verification system, the image processing verification system includes a declarative interface, and the device includes: The configuration module is used to declare and configure the comparison parameters through the declarative interface. The comparison parameters include at least: target intermediate nodes, reference data, and comparison tolerance strategy. The acquisition module is used to acquire the bus data of the target intermediate node and format the bus data according to the comparison tolerance strategy. The comparison module is used to compare the formatted bus data with the reference data and generate comparison results.

10. An image processing verification system, characterized in that, The image processing verification system includes a declarative interface; The image processing verification system is used to employ the intermediate node comparison method according to any one of claims 1-8.