Verification picture output method, device, equipment, storage medium and program product
By generating and comparing visual verification images of GPU chip simulation models, the efficiency problem of abnormal verification of simulation models is solved, ensuring the correctness of simulation models and the reliability of chip function verification.
Patent Information
- Application Number
- CN202411705698.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-11-26
AI Technical Summary
How to efficiently verify whether the simulation model is abnormal, and ensure the correctness of the simulation model construction and output.
By acquiring the image data output by the rasterization unit in the target simulation model corresponding to the GPU chip, a visualization verification image is generated. The model reads the sampling point display data of the image primitive using a preset bitmap generation model, fills the bitmap according to the color and mask data, generates a target bitmap as a visualization verification image, and compares the output results of different simulation models to determine anomalies.
This improves the efficiency of verifying whether the simulation model is abnormal, ensures the accuracy and efficiency of debugging the simulation model before cross-validation, and enhances the reliability of chip functional verification.
Smart Images

Figure CN119690761B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a method, apparatus, device, storage medium, and program product for verifying image output. Background Technology
[0002] Chip functional verification is a crucial stage in ensuring a chip can be used correctly. Typically, this is achieved by building a simulation model of the chip. Multiple simulation models with different focuses can be built, all of which implement the chip's functionality. In some scenarios, cross-validation can be performed using multiple simulation models, and the verification results are used to determine the chip's functional verification outcome. Therefore, ensuring the correctness of the simulation model's construction and output is essential.
[0003] Therefore, the problem of how to efficiently verify whether a simulation model is abnormal urgently needs to be solved. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, device, storage medium, and program product for efficiently verifying whether a simulation model is abnormal, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for verifying image output. The method includes:
[0006] Obtain the rasterization data output from the rasterization unit in the target simulation model corresponding to the GPU chip; the rasterization data includes the display data of all sampling points covered by at least one primitive;
[0007] Based on the graph data, generate visualization verification images corresponding to each of the at least one graph element; these visualization verification images are used to determine whether the target simulation model has any anomalies.
[0008] In one embodiment, obtaining the image data output by the rasterization unit in the target simulation model corresponding to the GPU chip includes:
[0009] Obtain the first display data of each sampling point output by the rasterization unit transmitted through the first interface;
[0010] Acquire the second display data of each sampling point output by the rasterization unit transmitted through the second interface;
[0011] The first display data and the second display data are stored as the display data of the sampling point in the target format file, and the target format file is used as the image data.
[0012] In one embodiment, the first display data includes at least one of the following:
[0013] The location data of this sampling point; this location data is used to characterize the position of the sampling point on the target screen;
[0014] The graphic element identifier corresponding to the sampling point; this graphic element identifier is used to characterize the target graphic element to which the sampling point belongs;
[0015] The mask data for this sampling point; this mask data is used to characterize whether the sampling point is valid for the target primitive;
[0016] The second display data includes at least one of the following:
[0017] The attribute data of the sampling point; this attribute data is used to characterize at least the display attributes of the sampling point;
[0018] The mask data for this sampling point.
[0019] In one embodiment, acquiring first display data of each sampling point output by the rasterization unit transmitted via a first interface; acquiring second display data of each sampling point output by the rasterization unit transmitted via a second interface, including:
[0020] For each sampling point of each graphic element, if the first display data is obtained from the first interface but the second display data is not obtained from the second interface, the second interface is continuously monitored until the second display data of the sampling point is obtained from the second interface;
[0021] Alternatively, if the second display data is obtained from the second interface but the first display data is not obtained from the first interface, the first interface is continuously monitored until the first display data of the sampling point is obtained from the first interface.
[0022] In one embodiment, based on the graph data, generating a visual verification image corresponding to each of the at least one graph element includes:
[0023] For each graphic element, the display data of each sampling point of the graphic element is read using a preset bitmap generation model, and the corresponding visualization verification image is generated based on the display data.
[0024] In one embodiment, the display attribute includes a color attribute; the process by which the preset bitmap generation model reads the display data of each sampling point of the primitive and generates the corresponding visualization verification image based on the display data includes:
[0025] When a color attribute indicator parameter is configured in the preset bitmap generation model, the attribute value of the color attribute of each sampling point is determined from the target format file according to the file position indicated by the color attribute indicator parameter, and the position data and mask data of each sampling point are determined from the target format file.
[0026] Based on the color attribute value and mask data of each sampling point, fill the filling area corresponding to the data at that position in the initial bitmap;
[0027] Based on the filled initial bitmap, a target bitmap is generated, and this target bitmap is used as the visualization verification image.
[0028] In one embodiment, based on the attribute value of the color attribute of each sampling point and the mask data, the filling area corresponding to the data at that position in the initial bitmap is filled, including:
[0029] Based on the attribute values of the color attributes of each sampling point and the mask data, the fill color corresponding to each sampling point is determined; wherein, the mask data consists of valid bit values and / or invalid bit values, and the lower the proportion of the valid bit values in the mask data, the lighter the fill color;
[0030] Fill the area corresponding to the data at that position in the initial bitmap with the fill color corresponding to each sampling point.
[0031] In one embodiment, the method further includes:
[0032] With the reference model and RTL model of the GPU chip respectively used as the target simulation model, and the first visualization verification image corresponding to the reference model and the second visualization verification image corresponding to the RTL model determined, the first visualization verification image and the second visualization verification image are compared.
[0033] Based on the comparison results, determine whether there are any anomalies in the reference model and the RTL model.
[0034] Secondly, this application also provides a device for verifying image output. The device includes:
[0035] The data acquisition module is used to acquire the rasterization unit output data in the target simulation model corresponding to the GPU chip based on a preset transmission interface; the rasterization unit data includes the display data of all sampling points covered by at least one primitive;
[0036] The image generation module is used to generate a visual verification image corresponding to each of the at least one graphic element based on the graphic element data; the visual verification image is used to determine whether there is an anomaly in the target simulation model.
[0037] In one embodiment, the data acquisition module is specifically used for:
[0038] Obtain the first display data of each sampling point output by the rasterization unit transmitted through the first interface;
[0039] Acquire the second display data of each sampling point output by the rasterization unit transmitted through the second interface;
[0040] The first display data and the second display data are stored as the display data of the sampling point in the target format file, and the target format file is used as the image data.
[0041] In one embodiment, the first display data includes at least one of the following:
[0042] The location data of this sampling point; this location data is used to characterize the position of the sampling point on the target screen;
[0043] The graphic element identifier corresponding to the sampling point; this graphic element identifier is used to characterize the target graphic element to which the sampling point belongs;
[0044] The mask data for this sampling point; this mask data is used to characterize whether the sampling point is valid for the target primitive;
[0045] The second display data includes at least one of the following:
[0046] The attribute data of the sampling point; this attribute data is used to characterize at least the display attributes of the sampling point;
[0047] The mask data for this sampling point.
[0048] In one embodiment, the data acquisition module is specifically used for:
[0049] For each sampling point of each graphic element, if the first display data is obtained from the first interface but the second display data is not obtained from the second interface, the second interface is continuously monitored until the second display data of the sampling point is obtained from the second interface;
[0050] Alternatively, if the second display data is obtained from the second interface but the first display data is not obtained from the first interface, the first interface is continuously monitored until the first display data of the sampling point is obtained from the first interface.
[0051] In one embodiment, the image generation module is specifically used for:
[0052] For each graphic element, the display data of each sampling point of the graphic element is read using a preset bitmap generation model, and the corresponding visualization verification image is generated based on the display data.
[0053] In one embodiment, the display attribute includes a color attribute; the image generation module is specifically used for:
[0054] When a color attribute indicator parameter is configured in the preset bitmap generation model, the attribute value of the color attribute of each sampling point is determined from the target format file according to the file position indicated by the color attribute indicator parameter, and the position data and mask data of each sampling point are determined from the target format file.
[0055] Based on the color attribute value and mask data of each sampling point, fill the filling area corresponding to the data at that position in the initial bitmap;
[0056] Based on the filled initial bitmap, a target bitmap is generated, and this target bitmap is used as the visualization verification image.
[0057] In one embodiment, the image generation module is specifically used for:
[0058] Based on the attribute values of the color attributes of each sampling point and the mask data, the fill color corresponding to each sampling point is determined; wherein, the mask data consists of valid bit values and / or invalid bit values, and the lower the proportion of the valid bit values in the mask data, the lighter the fill color;
[0059] Fill the area corresponding to the data at that position in the initial bitmap with the fill color corresponding to each sampling point.
[0060] In one embodiment, the device further includes a comparison module for:
[0061] With the reference model and RTL model of the GPU chip respectively used as the target simulation model, and the first visualization verification image corresponding to the reference model and the second visualization verification image corresponding to the RTL model determined, the first visualization verification image and the second visualization verification image are compared.
[0062] Based on the comparison results, determine whether there are any anomalies in the reference model and the RTL model.
[0063] Thirdly, this application also provides a computer device, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described in any of the first aspects above.
[0064] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0065] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0066] The aforementioned verification image output method, apparatus, device, storage medium, and program product acquire rasterization data output from the rasterization unit in the target simulation model corresponding to the GPU chip. This rasterization data includes display data for all sampling points covered by at least one raster. Based on this rasterization data, a visual verification image corresponding to each of the at least one raster is generated. This visual verification image is used to determine whether the target simulation model has any anomalies. In this way, verification personnel can directly view and determine whether the visual verification image contains errors, thereby determining whether the target simulation model has any anomalies. This allows for further debugging of the target simulation model, improving the efficiency of verifying whether the simulation model is abnormal. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a flowchart illustrating the verification of an image output method in one embodiment;
[0069] Figure 2 This is a schematic diagram of the process for obtaining image data in one embodiment;
[0070] Figure 3 This is a schematic diagram illustrating the process of generating a visual verification image using a preset bitmap generation model in one embodiment.
[0071] Figure 4 This is a flowchart illustrating the process of filling a bitmap in one embodiment;
[0072] Figure 5 This is a schematic diagram of the structure of the first pixel processor receiving data in one embodiment;
[0073] Figure 6 This is a schematic diagram of the structure of the second pixel processor receiving data in one embodiment;
[0074] Figure 7 This is a flowchart illustrating the process of receiving display data from sampling points in one embodiment;
[0075] Figure 8 This is a schematic diagram illustrating the processing steps of a bitmap generation script in one embodiment;
[0076] Figure 9 This is a structural block diagram of a verification image output device in one embodiment;
[0077] Figure 10This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0078] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that many specific details are set forth in the following description in order to provide a full understanding of this application, but this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.
[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0080] It is understandable that "at least one" refers to one or more, and "multiple" refers to two or more. "At least a part of an element" refers to part or all of an element.
[0081] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having,” etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0082] The rasterization unit is a crucial component in a GPU (Graphics Processing Unit) chip. It performs culling, cropping, and transformations on primitives output by the shader before rasterization. The data output by the rasterization unit is then processed by the pixel shader thread and the output merger (OM) module to obtain the image output by the GPU.
[0083] Typically, chip functionality can be verified by building simulation models. Multiple simulation models with different focuses can be built, all of which implement the chip's functions. In some scenarios, multiple simulation models can be used for cross-validation, and the chip functionality verification result can be determined based on the model outputs. Therefore, ensuring the correctness of the simulation model's construction and output is crucial.
[0084] In view of this, embodiments of this application provide a method for verifying image output, which can be used to efficiently verify whether there are any anomalies in the simulation model, so as to help debug the simulation model before actual cross-validation and ensure its normal operation.
[0085] It should be noted that the verification image output method provided in this application can be executed by a verification image output device, which can be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware. The computer device can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and servers. The server can be a standalone server or a server cluster composed of multiple servers. The following description uses the application of this method to a computer device as an example.
[0086] In one embodiment, such as Figure 1 As shown, a method for verifying image output is provided, including the following steps:
[0087] Step 101: Obtain the rasterization data output by the rasterization unit in the target simulation model corresponding to the GPU chip. The rasterization data includes the display data of all sampling points covered by at least one primitive.
[0088] As mentioned above, various simulation models of GPU chips can be constructed, each with different focuses and roles in the verification process. The target simulation model can be any simulation model corresponding to any GPU chip. The target simulation model can be implemented using software algorithms.
[0089] For example, a golden reference model of a GPU chip can be built, such as an SV model, which is written in SystemVerilog. The SV model is written by verification engineers based on the GPU chip's design documents and focuses more on functional implementation. Alternatively, an RTL model of the GPU chip can be built, which is closer to the hardware implementation. Specifically, an RTL model refers to modeling and simulating the behavior of the GPU using a Register Transfer Level (RTL) description language. This type of model is mainly used in digital circuit design and hardware description languages (HDLs), especially when designing FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits) using languages such as SystemVerilog or VHDL. The RTL model provides an abstraction level between high-level algorithm descriptions and concrete gate-level implementations. It allows designers to describe the internal data flow, control logic, and interactions between components of the GPU without directly involving transistor-level details. Through the RTL model, designers can verify the correctness of the GPU architecture, optimize performance, and perform power consumption analysis. Therefore, the functions and interfaces implemented in the SV model are the same as those in the RTL model, and both can be used for cross-validation to verify the functionality of the designed chip.
[0090] Therefore, the target simulation model can be an SV model or an RTL model. Both will contain rasterization units for simulation.
[0091] A GPU primitive is a basic geometric unit defined by one or more vertices, and it forms the basis for GPU rendering operations. Primitives are typically simple geometric shapes, such as points, line segments, or triangles. These primitives are the fundamental elements that make up 3D models, and the GPU uses them to generate the final 2D image. During the rasterization process of primitives by the rasterization unit, primitives are converted into pixels on the screen, or sampling points. For example, for each primitive, the GPU calculates the area it covers to determine the sampling points within that area.
[0092] Optionally, the target simulation model can process multiple primitives or a single primitive. Therefore, in this embodiment, the primitive data includes display data of all sampling points covered by at least one primitive. In other words, for each rasterized primitive, the rasterization unit outputs the display data of all sampling points corresponding to that primitive.
[0093] The displayed data refers to the data used to describe the display characteristics of the sampling point.
[0094] Optionally, a verification environment is deployed in the computer device, in which a pixel processor implementing the algorithm is instantiated. The pixel processor is used to obtain the image data output by the rasterization unit in the target simulation model corresponding to the GPU chip, and based on the image data, at least one visualization verification image corresponding to each image element is generated.
[0095] Optionally, the verification environment instantiates pixel processors corresponding to different simulation models. This allows different pixel processors to acquire image data from the rasterization units in different simulation models and generate visual verification images. For example, the verification environment instantiates a first pixel processor and a second pixel processor. When the target simulation model is the first simulation model (e.g., an SV model), the first pixel processor acquires the image data from the rasterization units in the target simulation model; when the target simulation model is the second simulation model (e.g., an RTL model), the second pixel processor acquires the image data from the rasterization units in the target simulation model. This allows for the adaptation of corresponding pixel processors to different simulation models, improving the effectiveness and accuracy of the generated visual verification images.
[0096] Optionally, the verification environment can be a UVM (Universal Verification Methodology) verification environment. The pixel processor is part of the verification environment and receives image data transmitted from the DUT interface in the verification environment.
[0097] Step 102: Based on the graph data, generate at least one visualization verification image corresponding to each graph element; the visualization verification image is used to determine whether there are any anomalies in the target simulation model.
[0098] For example, when the rasterization unit processes only one primitive, the primitive data only includes the display data of all sampling points covered by that single primitive. Based on this, a visualization verification image corresponding to that single primitive can be generated. And when the rasterization unit processes multiple primitives, the primitive data only includes the display data of all sampling points covered by any one primitive. Based on this, a visualization verification image corresponding to each primitive can be generated.
[0099] Typically, the SV model is cross-validated with the RTL model in a validation environment to identify inconsistencies. For example, under normal circumstances, if the output data of the two models are inconsistent, it indicates that one of the models is abnormal. If they are consistent, the model is considered to be functioning correctly. However, if both the SV model and the RTL model output incorrect data but are consistent, the model is still considered to be normal. In this process, the validator cannot determine whether the model is abnormal based on the output data of the two models; they can only determine it based on the comparison result, thus affecting the overall validation result.
[0100] In this embodiment of the application, abstract image data output by the rasterization unit in the target simulation model can be obtained, and a visual verification image can be generated based on this.
[0101] In this context, the visual verification primitives refer to images that can be seen by verification personnel. Computer equipment can display these visual verification images for verification personnel to view. If the target simulation model has anomalies, the output visual verification image will also be abnormal; for example, the image colors may not be the target colors, or there may be holes in the image. Conversely, if the visual verification image is normal, it indicates that the model is normal. In this way, verification personnel can use this method to determine in advance whether the target simulation model itself is constructed correctly during the development process, and to debug the model to ensure the correctness of its functions if anomalies are detected.
[0102] The aforementioned verification image output method obtains rasterization data output from the rasterization unit in the target simulation model corresponding to the GPU chip. This rasterization data includes display data of all sampling points covered by at least one raster. Based on this rasterization data, a visual verification image corresponding to each of the at least one raster is generated. This visual verification image is used to determine whether the target simulation model has any anomalies. In this way, verification personnel can directly view and judge whether the visual verification image has any errors, thereby determining whether the target simulation model has any anomalies. This allows for further debugging of the target simulation model, improving the efficiency of verifying whether the simulation model has any anomalies.
[0103] In one embodiment, retrieving the image data output by the rasterization unit in the target simulation model corresponding to the GPU chip includes: acquiring the image data output by the rasterization unit based on a preset transmission interface.
[0104] In this way, the output of the rasterization unit can be precisely connected through a preset transmission interface, thereby improving the accuracy of obtaining image data.
[0105] Optionally, the preset transmission interface includes a first interface and a second interface, which are used to obtain different types of image data.
[0106] In one embodiment, such as Figure 2 A schematic diagram of a process for obtaining graph data is shown. The process of obtaining graph data output by rasterization units in the target simulation model corresponding to the GPU chip includes:
[0107] Step 201: Obtain the first display data of each sampling point output by the rasterization unit transmitted through the first interface.
[0108] Step 202: Obtain the second display data of each sampling point output by the rasterization unit transmitted through the second interface.
[0109] For example, the display data for each sampling point can be divided into first display data and second display data, and the first display data and second display data contain at least different types of sampling point display data.
[0110] The first interface is primarily used to receive the first display data. The second interface is primarily used to receive the second display data. Optionally, the verification environment includes a detector for each DUT interface. Whenever valid data transmission is detected at that interface, it is captured as a data packet and broadcast. The verification environment can then write the broadcast data into a target format file.
[0111] In one optional implementation, if multiple primitives exist, the rasterization unit outputs the display data of all sampled points of each primitive sequentially. In other words, the computer device first obtains the display data of all sampled points of the first primitive output by the rasterization unit, and then continues to receive the display data of all sampled points of the second primitive output by the rasterization unit, until all the display data of all sampled points of all primitives have been received. If a single primitive exists, the display data of all sampled points of that single primitive is received directly.
[0112] Specifically, for a given graphic element, the process of receiving its graphic data is as follows: Display data from each sampling point output by the rasterization unit is received sequentially. For example, first, the first display data of the first sampling point transmitted via the first interface and the second display data of the first sampling point transmitted via the second interface are received. Once the data of the first sampling point is received and written to the target format file, the process continues to receive the first display data of the second sampling point transmitted via the first interface and the second display data of the second sampling point transmitted via the second interface, and write them to the target format file, until all display data from all sampling points of the graphic element has been received.
[0113] For example, the first display data includes at least one of the following:
[0114] Location data of the sampling point; location data is used to characterize the position of the sampling point on the target screen. Optionally, the location data may be, for example, the coordinates of the sampling point, such as the X and Y coordinate values on the screen.
[0115] The primitive identifier corresponding to each sampling point; the primitive identifier is used to characterize the target primitive to which the sampling point belongs. In other words, the display data of sampling points corresponding to the same primitive contains the same primitive identifier. In this way, the primitive to which each sampling point belongs can be determined, so as to generate the corresponding visual verification image based on this.
[0116] Mask data for sampling points; mask data is used to characterize whether a sampling point is valid for the target primitive. A description of the mask data is provided below.
[0117] For example, the second display data includes at least one of the following:
[0118] Attribute data for the sampling points; the attribute data is used to characterize at least the display attributes of the sampling points. Examples include color attributes, shape data, and other attributes, not all of which are fully illustrated here. Optionally, each sampling point may have up to 128 attribute data types.
[0119] The mask data for the sampling points. In a real GPU, attribute data and location data are transmitted to different components for processing. Both data processing require mask data; therefore, both attribute and location data are output along with mask data. Optionally, in this embodiment, when two sets of mask data for sampling points are received, only the first set received is retained.
[0120] Optionally, typically, after rasterization, the sampling points covered by the primitive are obtained. These sampling points form multiple 2x2 pixel blocks (Quads), each containing 2x2 sampling points. The rasterization unit outputs the attributes of the 2x2 sampling points in each pixel block to the pixel shader thread. Each thread processes one sampling point, colors it according to its attributes, and outputs the attributes of the colored sampling point to the output merging module OM. Additionally, the rasterization unit outputs the screen position data of the 2x2 sampling points in each pixel block to the output merging module OM. At this point, the output merging module obtains the attributes and coordinates of the 2x2 sampling points of all pixel blocks, performs depth testing, stencil testing, and blending, and outputs the final image. Therefore, there are cases where the rasterization unit outputs display data for sampling points on a pixel block basis. Therefore, in an optional embodiment of this application, for a given primitive, display data for each sampling point in multiple pixel blocks of that primitive can be received separately.
[0121] Furthermore, for a given pixel block, in some cases, not every sampling point within that pixel block is valid for the primitive. For example, for a triangular primitive, some sampling points in the pixel block along the triangle's edges may be inside the triangle, while others may be outside. In this case, mask data is needed to mark which sampling points are valid for the primitive; that is, to mark which sampling points are located inside the primitive. This mask data is part of the display data and is transmitted from the corresponding interface along with the position data and / or attribute data.
[0122] Step 203: Store the first display data and the second display data as display data of the sampling points into the target format file, and use the target format file as image data.
[0123] Optionally, the target format file can be a CSV file. For example, the display data for one sampling point can be written into a single line of a CSV file. For instance, the first two columns are the location data of the sampling point, i.e., the x / y coordinates; the third column is the mask data for the sampling point; the following 128 columns are the attribute data; and the last column is the primitive identifier. It is understood that the display data can also be written to the target format file in other orders; no specific limitation is made here. Furthermore, the target format file can also be other formats, which are not fully exemplified here.
[0124] In one embodiment, the mask data output by the rasterization unit may be 1 bit, 4 bits, or 8 bits. In this embodiment, to facilitate the subsequent generation of more vivid and detailed visual verification images based on the mask data, the mask data can be converted to 8 bits and written to a target format file. For example, when the mask data output by the rasterization unit is 1 bit, such as 1, it is converted to 11111111 and written to the file; when the mask data output by the rasterization unit is 4 bits, such as 1100, it is converted to 11001100 and written to the file; when the mask data output by the rasterization unit is 8 bits, such as 11110000, it is directly written to the file. Alternatively, if the mask data is all 0s, it means that the sampling point is invalid, and the display data of that sampling point can be ignored.
[0125] Optionally, one graphic element corresponds to one target format file. For example, if there are multiple graphic elements, multiple target format files are generated. In this case, after receiving the display data of all sampled points of a certain graphic element, the target format file can be output as the graphic element data corresponding to that graphic element.
[0126] In this embodiment, different types of display data are received through different interfaces to improve the accuracy of display data acquisition. Furthermore, the display data is written to a target format file to form complete graphic element data, facilitating the generation of visual verification images for each graphic element, thereby improving verification effectiveness.
[0127] In one embodiment, storing the first display data and the second display data as sample points into a target format file includes: during the process of receiving the first display data, storing the received first display data into a first queue, and during the process of receiving the second display data, storing the received second display data into a second queue; and after the first display data and the second display data have been received, storing the first display data in the first queue and the second display data in the second queue into the target format file.
[0128] Optionally, when receiving the display data of the next sampling point, the received display data continues to be stored in the queue, and at this time, the historical data in the queue will be popped out slowly.
[0129] In this embodiment of the application, by setting up a queue, it can be ensured that the first and second display data of each sampling point are received completely, and that the data is written to the target format file after complete data reception.
[0130] In one embodiment, acquiring first display data of each sampling point output by the rasterization unit transmitted through the first interface; acquiring second display data of each sampling point output by the rasterization unit transmitted through the second interface includes: for each sampling point of each graphic element, if first display data is acquired from the first interface but second display data is not acquired from the second interface, continuously monitoring the second interface until second display data of the sampling point is acquired from the second interface. Alternatively, if second display data is acquired from the second interface but first display data is not acquired from the first interface, continuously monitoring the first interface until first display data of the sampling point is acquired from the first interface.
[0131] Since the first and second display data are output from different interfaces, and in some cases these interfaces are asynchronous, it is necessary to match the first and second display data for the same sampling point before storing them in the target format file. Because each interface strictly maintains order, only sequential matching is required, and the number of attribute data for each sampling point is pre-configured by the registers. Based on this, in this embodiment, if the first display data is received but the second display data has not yet been received, the process waits until all display data for the current sampling point is received. Then, it is determined whether there is first and second display data for the next sampling point, and this process is repeated until all display data for all sampling points of a graphic element has been received, ensuring complete data reception and data alignment, that is, ensuring that each display data matches its corresponding sampling point and avoiding mismatches.
[0132] Optionally, since there is a lot of attribute data, for the attribute data of a certain sampling point, the last attribute data is accompanied by an end flag. When the end flag is detected, it is determined that the attribute data of that sampling point has been received.
[0133] In one embodiment, generating at least one visual verification image corresponding to each graphic element based on graphic data includes: for each graphic element, using a preset bitmap generation model to read the display data of each sampling point of the graphic element and generating a visual verification image corresponding to the graphic element based on the display data.
[0134] Among them, a preset bitmap generation model can be deployed in advance in the verification environment to generate a visual verification image based on the data in the target format file.
[0135] Here, the preset bitmap generation model reads the target format file, extracts the data, and then generates a visual verification image. Since the preset bitmap generation model is pre-compiled, the efficiency of obtaining the visual verification image can be improved.
[0136] In one embodiment, such as Figure 3 This document illustrates a flowchart illustrating the process of generating a visual verification image using a preset bitmap generation model. The process by which the preset bitmap generation model reads the display data of each sampling point of a graphic element and generates a corresponding visual verification image based on the display data includes:
[0137] Step 301: If a color attribute indicator parameter is configured in the preset bitmap generation model, determine the attribute value of the color attribute of each sampling point from the target format file according to the file position indicated by the color attribute indicator parameter, and determine the position data and mask data of each sampling point from the target format file.
[0138] The display attributes include color attributes, such as red (-r), blue (-b), and green (-g). The values of these color attributes can be used to draw the colors of visual verification images.
[0139] The preset bitmap generation model supports multiple parameters, the values of which can be pre-configured to facilitate the generation of visual verification images. For example, the preset bitmap generation model supports the following parameters:
[0140] -f: Specifies the target file format. For example, if this parameter is configured to specify a CSV file, then the CSV file can be opened and its image data can be read.
[0141] -sw: Specifies the image width. The generated visual verification image will have the width specified by this parameter. Verifiers can configure the value of this parameter as needed.
[0142] -sh: Specifies the image height. The generated visual verification image will have the height specified by this parameter. Verifiers can configure the value of this parameter as needed.
[0143] -p: Specifies the default color attribute. When this parameter is configured, the initial bitmap is filled with that color, resulting in a visual verification image based on that color.
[0144] -r: Specifies which column in the target format file the red attribute should appear in.
[0145] -g: Specifies which column in the target format file the green attribute should appear in.
[0146] -b: Specifies which column in the target format file the blue attribute should appear in.
[0147] -c: Activate the inspector. This parameter is used to activate the inspector in the preset bitmap generation model. The inspector detects holes inside the generated visualization verification image and outputs error messages if holes are found.
[0148] As can be seen, -r, -g, and -b are color attribute indicator parameters, which indicate the location of the attribute value of each color attribute in the file so that the model can obtain the attribute value. If -r, -g, and -b are configured, the attribute value of the color attribute of each sampling point is determined from the target format file according to the file location indicated by the color attribute indicator parameters.
[0149] Step 302: Fill the area corresponding to the position data in the initial bitmap according to the attribute value of the color attribute of each sampling point and the mask data.
[0150] Specifically, the color depth of the filling area corresponding to each sampling point can be determined based on the attribute value of the color attribute and the mask data, so as to facilitate filling. For example, anti-aliasing processing is performed on the sampling points of the triangle edge based on the mask data. Since some of the sampling points on the edge may be located inside the triangle and others outside the triangle, the edge filling color is lighter.
[0151] Here, the target fill color corresponding to each sampling point can be determined based on the attribute value of the color attribute and the mask data of each sampling point. The target fill area to be filled is determined based on the position data of the sampling point, and the target fill area is filled using the target fill color until all areas corresponding to the graphic element are filled.
[0152] Optionally, if -r, -g, and -b are not configured, the default color specified by -p is determined, as well as the position data and mask data of each sampling point are determined from the target format file. In this way, the fill area corresponding to the position data in the initial bitmap is filled according to the mask data and default color of each sampling point.
[0153] Step 303: Generate a target bitmap based on the filled initial bitmap, and use the target bitmap as a visual verification image.
[0154] In this embodiment, considering that the sampling point is sometimes located at the edge of a triangle, but not completely, the triangle may not completely cover the area. Without color processing, this would appear abrupt. Therefore, it is necessary to blur the edges of the triangle. This is achieved by combining mask data with anti-aliasing processing to improve the readability of the visual verification image.
[0155] In one embodiment, such as Figure 4This diagram illustrates a process for filling a bitmap. Based on the color attribute values and mask data of each sampling point, the diagram fills the areas corresponding to the position data in the initial bitmap, including:
[0156] Step 401: Determine the fill color corresponding to each sampling point based on the attribute value of the color attribute and the mask data of each sampling point.
[0157] Step 402: Fill the area corresponding to the position data in the initial bitmap according to the fill color corresponding to each sampling point.
[0158] The mask data consists of valid bit values and / or invalid bit values, and the lower the proportion of valid bit values in the mask data, the lighter the fill color. For example, 1 represents a valid bit value and 0 represents an invalid bit value.
[0159] For example, if the mask data is all 1s, the color remains unchanged. If the mask data is not all 1s, the color value is processed according to the number of 1s in the mask data. The fewer the number of 1s, the lighter the color, achieving an anti-aliasing effect. For instance, for a certain sampling point, if a standard pink is determined based on the color attribute value, and the mask data is not all 0s, the fill color corresponding to that sampling point will be a light pink.
[0160] Optionally, when the color attribute value of the sampled point is obtained, this attribute value is a floating-point number. Since each channel of R / G / B in the bitmap is a byte (8 bits), the floating-point number can be converted to a byte to facilitate the generation of the target bitmap.
[0161] In this embodiment, the fill color can be easily determined by combining the number of valid bits and invalid bits in the mask data.
[0162] In one embodiment, generating a target bitmap based on the padded initial bitmap includes:
[0163] Initialize the bitmap file header (bmp file header); generate the target bitmap based on the initialized bitmap file header and the padded initial bitmap.
[0164] The file header defines information such as the type, format, and size of the bitmap file. If the file header is incorrect, image tools will not be able to open the BMP bitmap. Therefore, generating a bitmap file header ensures that the target bitmap can be opened accurately and displayed to verification personnel for inspection.
[0165] In one embodiment, the method further includes: comparing the first visualization verification image and the second visualization verification image when the reference model and the RTL model of the GPU chip are used as target simulation models respectively, and determining the first visualization verification image corresponding to the reference model and the second visualization verification image corresponding to the RTL model; and determining whether there are any anomalies in the reference model and the RTL model based on the comparison result.
[0166] For example, if the first and second visual verification images do not match, it is determined that at least one of the two models is abnormal. In this way, multiple models can be verified simultaneously.
[0167] For ease of understanding, the verification image generation method provided in this application will be described below with a complete embodiment.
[0168] In the UVM verification environment, the pixel processor detects in real time the coordinate data, primitive ID, and mask data of the sampling points of the target primitive output by the rasterization unit transmitted through the first interface, and places them into the first queue. It also detects the attribute data and mask data of the sampling points of the target graphic output by the rasterization unit transmitted through the second interface, and places them into the second queue. The coordinate data describes the position of the sampling point on the target screen, the attribute data describes the attributes of the sampling point, and the mask data describes whether the sampling point is valid for the target primitive. The primitive ID describes the primitive to which the sampling point belongs. For example, ... Figure 5 As shown, the first pixel processor can be used to receive the coordinate data, attribute data, primitive identifier, and mask data of the sampling points of the target primitive output by the rasterization unit in the SV model; such as Figure 6 As shown, a second pixel processor can be used to receive the coordinate data, attribute data, primitive identifier, and mask data of the sampling points of the target primitive output by the rasterization unit in the RTL model.
[0169] Because the first and second interfaces are asynchronous, interface data matching is required. That is, if the coordinate data of a sampling point is received from the first interface but the attribute data for that sampling point is not received, the process continues to wait until all attribute data for that sampling point is received from the second interface. The last attribute has a flag; detecting this flag indicates the end of attribute reception. The coordinate data (x and y coordinates), mask data, attribute data, and primitive identifiers of the sampling point received from the first and second queues are written to a single line in a CSV file. The first and second queues continue to store data for subsequent sampling points. The process of receiving display data from sampling points can be found in [reference needed]. Figure 7 The flowchart shown is shown.
[0170] When mask data is received, it can be converted. That is, regardless of whether the mask data is single-bit or four-bit, it is converted into 8-bit data and written into the corresponding column. For example, 1 is converted into 11111111; 1100 is converted into 11001100.
[0171] Then continue receiving all the data from the next sampling point.
[0172] Once all the data from the sampling points of the target primitive has been received, output this CSV file.
[0173] In addition, a bitmap generation script (i.e., the aforementioned preset bitmap generation model) is pre-deployed in the computer device, and the parameters supported by this script are described above.
[0174] The specific values of the parameters of the bitmap generation script can be pre-configured, and then the bitmap generation script reads the CSV file output from the verification environment.
[0175] The operation of generating a bitmap of the target primitives based on a CSV file is as follows:
[0176] Read each line sequentially. First, read the primitive identifier corresponding to the sampling point in the first line. If the primitive identifier has not been read before, it is considered a new primitive. For this primitive, initialize the bitmap file header. If the storage location of the color attribute in the CSV file is not specified in the script, determine the default color for generating the bitmap. If the storage location of the color attribute in the CSV file is specified in the script, retrieve the attribute value of the sampling point from the corresponding column according to the specified location, and convert the color attribute value from floating-point value to byte. Specifically, if the color attribute value is greater than 1.0, it is set to 1.0; if the color attribute value is less than 0.0, it is set to 0.0.
[0177] Based on the color attribute value and mask, fill the corresponding positions in the initial bitmap. After all sampling points of this primitive have been processed, generate the target bitmap corresponding to this primitive based on the filling result and the file header. Then, continue reading the sampling point data of the next primitive to generate the bitmap corresponding to the next primitive. Refer to the bitmap generation script for the processing procedure. Figure 8 As shown.
[0178] The method provided in this application can assist simulation models in verifying whether the models are abnormal. With the help of this tool, simulation models can be debugged first and stabilized before being used for cross-validation with RTL models, so that problems are exposed early, verification and development are accelerated, and the SV model is verified and debugged to ensure the correctness of its functions before cross-validation with RTL models.
[0179] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0180] Based on the same inventive concept, this application also provides a verification image output device for implementing the verification image output method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more verification image output device embodiments provided below can be found in the limitations of the verification image output method described above, and will not be repeated here.
[0181] In one embodiment, such as Figure 9 As shown, a verification image output device 900 is provided, comprising: a data acquisition module 901 and an image generation module 902, wherein:
[0182] The data acquisition module 901 is used to acquire the rasterization data output by the rasterization unit in the target simulation model corresponding to the GPU chip based on a preset transmission interface; the rasterization data includes the display data of all sampling points covered by at least one primitive;
[0183] Image generation module 902 is used to generate visual verification images corresponding to the at least one graphic element based on the graphic element data; the visual verification images are used to determine whether there is anomaly in the target simulation model.
[0184] In one embodiment, the data acquisition module 901 is specifically used for:
[0185] Obtain the first display data of each sampling point output by the rasterization unit transmitted through the first interface;
[0186] Acquire the second display data of each sampling point output by the rasterization unit transmitted through the second interface;
[0187] The first display data and the second display data are stored as the display data of the sampling point in the target format file, and the target format file is used as the image data.
[0188] In one embodiment, the first display data includes at least one of the following:
[0189] The location data of this sampling point; this location data is used to characterize the position of the sampling point on the target screen;
[0190] The graphic element identifier corresponding to the sampling point; this graphic element identifier is used to characterize the target graphic element to which the sampling point belongs;
[0191] The mask data for this sampling point; this mask data is used to characterize whether the sampling point is valid for the target primitive;
[0192] The second display data includes at least one of the following:
[0193] The attribute data of the sampling point; this attribute data is used to characterize at least the display attributes of the sampling point;
[0194] The mask data for this sampling point.
[0195] In one embodiment, the data acquisition module 901 is specifically used for:
[0196] For each sampling point of each graphic element, if the first display data is obtained from the first interface but the second display data is not obtained from the second interface, the second interface is continuously monitored until the second display data of the sampling point is obtained from the second interface;
[0197] Alternatively, if the second display data is obtained from the second interface but the first display data is not obtained from the first interface, the first interface is continuously monitored until the first display data of the sampling point is obtained from the first interface.
[0198] In one embodiment, the image generation module 902 is specifically used for:
[0199] For each graphic element, the display data of each sampling point of the graphic element is read using a preset bitmap generation model, and the corresponding visualization verification image is generated based on the display data.
[0200] In one embodiment, the display attribute includes a color attribute; the image generation module 902 is specifically used for:
[0201] When a color attribute indicator parameter is configured in the preset bitmap generation model, the attribute value of the color attribute of each sampling point is determined from the target format file according to the file position indicated by the color attribute indicator parameter, and the position data and mask data of each sampling point are determined from the target format file.
[0202] Based on the color attribute value and mask data of each sampling point, fill the filling area corresponding to the data at that position in the initial bitmap;
[0203] Based on the filled initial bitmap, a target bitmap is generated, and this target bitmap is used as the visualization verification image.
[0204] In one embodiment, the image generation module 902 is specifically used for:
[0205] Based on the attribute values of the color attributes of each sampling point and the mask data, the fill color corresponding to each sampling point is determined; wherein, the mask data consists of valid bit values and / or invalid bit values, and the lower the proportion of the valid bit values in the mask data, the lighter the fill color;
[0206] Fill the area corresponding to the data at that position in the initial bitmap with the fill color corresponding to each sampling point.
[0207] In one embodiment, the device further includes a comparison module for:
[0208] With the reference model and RTL model of the GPU chip respectively used as the target simulation model, and the first visualization verification image corresponding to the reference model and the second visualization verification image corresponding to the RTL model determined, the first visualization verification image and the second visualization verification image are compared.
[0209] Based on the comparison results, determine whether there are any anomalies in the reference model and the RTL model.
[0210] Each module in the aforementioned verification image output device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0211] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores verification image output data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a verification image output method.
[0212] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0213] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0214] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0215] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0216] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0217] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0218] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for verifying image output, characterized in that, The method includes: In the verification environment, based on the first and second interfaces in the preset transmission interface, the pixel processor acquires the image data output by the rasterization unit in the target simulation model corresponding to the GPU chip; the image data includes display data of all sampling points covered by at least one primitive; the target simulation model is any simulation model corresponding to the GPU chip, and different simulation models correspond to different pixel processors; wherein, the image data acquired by the first and second interfaces are of different types; the display data is data used to describe the display characteristics of the sampling point, the display data includes second display data transmitted by the second interface, the second display data includes attribute data used to characterize the display attributes of the sampling point, and the display attributes include color attributes; Based on the image data, generate a visualization verification image corresponding to each of the at least one image element; including: for each image element, using a preset bitmap generation model to read the display data of each sampling point of the image element; if a color attribute indicator parameter is configured in the preset bitmap generation model, determining the attribute value of the color attribute of each sampling point from the target format file according to the file position indicated by the color attribute indicator parameter; and determining the position data and mask data of each sampling point from the target format file; filling the filling area corresponding to the position data in the initial bitmap according to the attribute value of the color attribute of each sampling point and the mask data; generating a target bitmap based on the filled initial bitmap, and using the target bitmap as the visualization verification image; The visual verification image is used to determine whether the target simulation model has any anomalies; The method further includes: With the reference model and RTL model of the GPU chip respectively used as the target simulation model, and a first visualization verification image corresponding to the reference model and a second visualization verification image corresponding to the RTL model determined, the first visualization verification image and the second visualization verification image are compared; based on the comparison result, it is determined whether the reference model and the RTL model have any anomalies.
2. The method according to claim 1, characterized in that, The acquisition of image data output by the rasterization unit in the target simulation model corresponding to the GPU chip includes: Obtain the first display data of each sampling point output by the rasterization unit transmitted through the first interface; Acquire the second display data of each sampling point output by the rasterization unit transmitted through the second interface; The first display data and the second display data are stored as the display data of the sampling points in a target format file, and the target format file is used as the image data.
3. The method according to claim 2, characterized in that, The first displayed data includes at least one of the following: The location data of the sampling point; the location data is used to characterize the position of the sampling point on the target screen; The graphic element identifier corresponding to the sampling point; the graphic element identifier is used to characterize the target graphic element to which the sampling point belongs; The mask data of the sampling point; the mask data is used to characterize whether the sampling point is valid for the target primitive; The second displayed data includes at least one of the following: The attribute data of the sampling points; The attribute data is used to characterize at least the display attributes of the sampling points; The mask data of the sampling points.
4. The method according to claim 2, characterized in that, The first display data of each sampling point output by the rasterization unit transmitted through the first interface is obtained; Acquiring the second display data of each sampling point output by the rasterization unit transmitted through the second interface includes: For each sampling point of each of the aforementioned graphic elements, if the first display data is obtained from the first interface but the second display data is not obtained from the second interface, the second interface is continuously monitored until the second display data of the sampling point is obtained from the second interface; Alternatively, if the second display data is obtained from the second interface but the first display data is not obtained from the first interface, the first interface is continuously monitored until the first display data of the sampling point is obtained from the first interface.
5. The method according to claim 2, characterized in that, The step of generating a target bitmap based on the filled initial bitmap includes: Initialize the bitmap file header; Generate the target bitmap based on the initial bitmap file header and the padded initial bitmap.
6. The method according to claim 4, characterized in that, The step of filling the filling area corresponding to the position data in the initial bitmap according to the attribute value of the color attribute of each sampling point and the mask data includes: Based on the attribute values of the color attributes of each sampling point and the mask data, the fill color corresponding to each sampling point is determined; wherein, the mask data consists of valid bit values and / or invalid bit values, and the lower the proportion of the valid bit values in the mask data, the lighter the fill color; Fill the area corresponding to the position data in the initial bitmap according to the fill color corresponding to each sampling point.
7. The method according to claim 2, characterized in that, The step of storing the first display data and the second display data as display data for the sampling points into a target format file includes: During the process of receiving the first display data, the received first display data is stored in a first queue, and during the process of receiving the second display data, the received second display data is stored in a second queue. Once the first display data and the second display data have been received, the first display data in the first queue and the second display data in the second queue are stored in the target format file.
8. A device for verifying image output, characterized in that, The device includes: The data acquisition module is used in a verification environment to acquire, using a pixel processor, image data output by rasterization units in a target simulation model corresponding to a GPU chip, based on a first interface and a second interface in a preset transmission interface. The image data includes display data for all sampling points covered by at least one primitive. The target simulation model is any simulation model corresponding to the GPU chip, with different simulation models corresponding to different pixel processors. The first and second interfaces acquire image data of different types. The display data describes the display characteristics of the sampling point, including second display data transmitted via the second interface. The second display data includes attribute data characterizing the display attributes of the sampling point, including color attributes. The image generation module is used to generate visualization verification images corresponding to the at least one graphic element based on the graphic element data. Specifically, it is used to: for each graphic element, read the display data of each sampling point of the graphic element using a preset bitmap generation model; when a color attribute indicator parameter is configured in the preset bitmap generation model, determine the attribute value of the color attribute of each sampling point from the target format file according to the file position indicated by the color attribute indicator parameter; and determine the position data and mask data of each sampling point from the target format file; fill the filling area corresponding to the position data in the initial bitmap according to the attribute value of the color attribute and the mask data of each sampling point; generate a target bitmap based on the filled initial bitmap, and use the target bitmap as the visualization verification image; the visualization verification image is used to determine whether the target simulation model has any anomalies. The comparison module is used to compare the first visualization verification image and the second visualization verification image when the reference model and the RTL model of the GPU chip are used as the target simulation model and a first visualization verification image corresponding to the reference model and a second visualization verification image corresponding to the RTL model are determined respectively; and to determine whether there are any anomalies in the reference model and the RTL model based on the comparison results.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Constrained random verification method and device for picture processing class IPs
CN104615537A