Display chip verification method and device and terminal
The pixel initialization function and image display program of C language are called through the SystemVerilog program to collect and display the image data during the display chip simulation process in real time, which solves the problem of difficulty in manual comparison of data in the existing technology and realizes convenient display chip verification and data Flow accuracy judgment.
Patent Information
- Application Number
- CN202410754878.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
Existing display chip verification solutions rely on the comparison of random data input and output, which results in a large and difficult workload of manually comparing data module by module when processing multi-module, large-size images. It is error-prone, and the huge amount of data increases the workload.
The SystemVerilog program calls the pixel initialization function of C language to initialize the image width and height, collects image data to FIFO, and sequentially takes out each frame of image data from FIFO, and calls the image display program of C language to display the corresponding image on the window for real-time observation and verify.
It realizes convenient display chip verification, supports the display of different image sizes and data formats, significantly reduces the verification workload, is easy to integrate into the SOC verification environment, and verifies the accuracy of the internal data flow through real-time observation of images.
Smart Images

Figure CN118607428A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuit design, and in particular to a display chip verification method, device and terminal. Background Art
[0002] Existing display chip verification solutions mainly rely on comparing random data input with display output to ensure functional correctness. However, this method faces many challenges in practical applications. Since the display chip contains many modules, the debugging process requires manual comparison of random input data with actual output module by module, which is an extremely time-consuming and tedious task.
[0003] Especially when dealing with large-size display images, the workload of this data comparison will increase exponentially. Not only does it need to check the data of each pixel one by one, but it is also necessary to ensure the accuracy of visual effects such as color, brightness, and contrast. This detailed comparison process is not only time-consuming, but also prone to errors, especially when the visual differences are subtle. The huge amount of data not only increases the workload, but also significantly increases the difficulty of data comparison when processing images. Summary of the invention
[0004] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a display chip verification method, device and terminal, which are used to solve the technical problems that the existing display chip verification scheme adopts the method of comparing random number input with display output, and when facing multi-module, large-size images and image processing, the manual comparison of data module by module is labor-intensive and difficult.
[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a display chip verification method, which is applied to a SystemVerilog program. The method comprises: calling a pixel initialization function of a C language to initialize the width and height of an image and generate a window; when image data generated during the simulation of a display chip is detected, the image data is collected into a FIFO; each frame of image data is taken out from the FIFO in turn, and an image display program of a C language is called to display the corresponding images on the generated window respectively for subsequent verification.
[0006] In one embodiment of the present invention, the pixel initialization function initializes the width and height of the image, and generating a window includes: using the gtk_init function to initialize the GTK+ library and parse the standard command line options; calling the gtk_window_new function to create a window; using the gtk_drawing_area_new function to create a drawing area and return the corresponding drawing area value; calling the gtk_widget_size_reques function to set the width and height of the window according to the width and height of the image and the drawing area value, and using the gtk_widget_show_all function to display the window with a background of a default color.
[0007] In one embodiment of the present invention, each frame of image data is taken out from the FIFO in turn, and the C language image display program is called to display the corresponding images on the generated window respectively, including: when it is detected in real time in the FIFO that the image data accumulates to a data amount of one frame, the image data is taken out from the FIFO, and the C language image display program is called using C-DPI to display the images on the generated window respectively, until the images corresponding to the image data of all frames are displayed in real time.
[0008] In one embodiment of the present invention, when it is detected in real time in the FIFO that the image data has accumulated to a data amount of one frame, the image data is taken out from the FIFO, and the SystemVerilog program inputs the data address corresponding to the image data, the pixel height of the image, the pixel width of the image, and the data format of the image data, and calls the C language image display program to display the image on the generated window.
[0009] In one embodiment of the present invention, the C language image display program displays an image on a generated window, including: using the svGetArragePtr function to obtain the address of the image data; based on the address of the image data, taking out the corresponding image data; judging whether the data format of the image data satisfies the set data format, and converting the image data that does not satisfy the set data format into the set data format; wherein the data format types include: rgb888, rgb565 and YUV422; calling the gdk_draw_rgb_image function to display the corresponding image on the generated window according to the image data in the set format.
[0010] In one embodiment of the present invention, using the svGetArragePtr function to obtain the address of the image data includes:
[0011] Use the svGetArrayPtr function to convert the data address of the image data input by the SystemVerilog program into a pointer that can be processed by the C language, and assign it to a pointer variable of the defined guchar* type.
[0012] In one embodiment of the present invention, based on the address of the image data, extracting the corresponding image data includes: based on the data format of the image data, determining the data amount of the image data to be extracted according to the pixel height and pixel width of the image input by the SystemVerilog program; based on the address of the image data, extracting the image data of the corresponding data amount; wherein, the method of determining the data amount of the image data to be extracted includes: if the data format of the image data is RGB888, then the data amount of the image data to be extracted is calculated by multiplying the pixel width of the image by the pixel height and then by 3; if the data format of the image data is RGB565 and YUV422, then the data amount of the image data to be extracted is calculated by multiplying the pixel width of the image by the pixel height and then by 2.
[0013] In one embodiment of the present invention, the setting data format is rgb888.
[0014] To achieve the above-mentioned purpose and other related purposes, the present invention provides a display chip verification device, which is applied to a SystemVerilog program. The device includes: an initialization module, which is used to call a pixel initialization function in C language to initialize the width and height of an image and generate a window; an image data acquisition module, which is connected to the initialization module and is used to collect the image data into a FIFO when the image data generated in the simulation process is detected; a display module, which is connected to the image data acquisition module and is used to take out each frame of image data from the FIFO in turn, and call an image display program in C language to display the corresponding images on the generated window respectively for subsequent verification.
[0015] To achieve the above-mentioned purpose and other related purposes, the present invention provides a display chip verification terminal, comprising: one or more memories and one or more processors; the one or more memories are used to store computer programs; the one or more processors are connected to the memories and are used to run the computer program to execute the display chip verification method.
[0016] As described above, the present invention is a display chip verification method, device and terminal, which has the following beneficial effects: the present invention calls the pixel initialization function of C language through SystemVerilog program to initialize the width and height of the image, and collects the image data generated during the display chip simulation process into FIFO, then takes out each frame of image data from FIFO in turn, and calls the image display program of C language to display the corresponding images respectively, so as to facilitate subsequent display chip verification by observing the image. The present invention provides a convenient display chip verification solution, which verifies the accuracy of the internal data flow through real-time observation of the image, supports the display of different image sizes and data formats, and can intuitively compare image changes to determine whether the effect meets expectations. In addition, the solution is easy to integrate into the SOC verification environment, thereby significantly reducing the verification workload of the image chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 FIG. 4 is a flow chart of a display chip verification method according to an embodiment of the present invention.
[0018] Figure 2 Shown is a flowchart of a pixel initialization function in one embodiment of the present invention.
[0019] Figure 3 Shown is a flowchart of an image display program in one embodiment of the present invention.
[0020] Figure 4 FIG. 4 is a flow chart of a display chip verification method according to an embodiment of the present invention.
[0021] Figure 5 FIG. 4 is a schematic diagram showing the structure of a display chip verification device in an embodiment of the present invention.
[0022] Figure 6 Shown is a schematic diagram of the structure of a display chip verification terminal in one embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0024] It should be noted that in the following description, reference is made to the accompanying drawings, which describe several embodiments of the present invention. It should be understood that other embodiments may also be used, and that mechanical composition, structural, electrical and operational changes may be made without departing from the spirit and scope of the present invention. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present invention is limited only by the claims of the published patents. The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between an element or feature shown in the figure and another element or feature.
[0025] Throughout the specification, when a part is said to be "connected" to another part, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a part is said to "include" a certain constituent element, unless otherwise stated, it does not exclude other constituent elements, but means that other constituent elements may be included.
[0026] The terms first, second and third mentioned herein are used to describe various parts, components, regions, layers and / or segments, but are not limited thereto. These terms are only used to distinguish a certain part, component, region, layer or segment from other parts, components, regions, layers or segments. Therefore, the first part, component, region, layer or segment described below may refer to the second part, component, region, layer or segment within the scope of the present invention.
[0027] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions or operations is inherently mutually exclusive in some way.
[0028] The present invention provides a display chip verification method, which initializes the width and height of an image by calling a pixel initialization function of a C language through a SystemVerilog program, collects image data generated during the simulation of the display chip into a FIFO, then sequentially takes out each frame of image data from the FIFO, and calls an image display program of the C language to display the corresponding images respectively, so as to facilitate subsequent display chip verification by observing the image. The present invention provides a convenient display chip verification solution, which verifies the accuracy of the internal data flow by real-time observation of the image, supports display of different image sizes and data formats, and can intuitively compare image changes to determine whether the effect meets expectations. In addition, the solution is easy to integrate into the SOC verification environment, thereby significantly reducing the verification workload of the image chip.
[0029] The following is a detailed description of the embodiments of the present invention with reference to the accompanying drawings so that those skilled in the art can easily implement the present invention. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.
[0030] like Figure 1 A schematic flow chart showing a display chip verification method according to an embodiment of the present invention.
[0031] Applied to SystemVerilog program, the method comprises:
[0032] Step S1: Call the pixel initialization function of C language to initialize the width and height of the image and generate a window.
[0033] Specifically, at the beginning of the simulation, the SystemVerilog program will call the C language pixel initialization function (pix_init function) to initialize the width and height of the image according to the preset image size. This initialization process will create a pixel window that matches the set size, providing a basic framework for subsequent image processing and display.
[0034] Among them, SystemVerilog is referred to as SV language. It is based on Verilog language. It is an extension and enhancement of IEEE1364Verilog-2001 standard. It is compatible with Verilog 2001. It combines hardware description language (HDL) with modern high-level verification language (HVL) and has recently become the next generation hardware design and verification language.
[0035] In one embodiment, the input of the pixel initialization function (pix_init function) of the C language is the width and height of the image, which is used to initialize the size of the window.
[0036] like Figure 2 , step S1 comprises:
[0037] Step S11: Use the gtk_init function to initialize the GTK+ library and parse standard command line options; wherein the gtk_init() function is used to initialize the GTK test program. Specifically, the pix_init function first uses the gtk_init(&argc,&argv) function to initialize the GTK+ library and parse some standard command line options; the parameters &argc and &argv are the number of externally input parameters and the address of the parameter string array.
[0038] Step S12: Call the gtk_window_new function to create a window; specifically, call the gtk_window_new(GTK_WINDOW_TOPLEVEL) function to create a new top-level window GtkWindow, which may contain other components.
[0039] Step S13: Use the gtk_drawing_area_new function to create a drawing area and return the corresponding drawing area value; specifically, use the gtk_drawing_area_new function to create an area where drawing can be done, without inputting parameters, and the return value is an object of the GtkWidget* type, which is used to prepare for the subsequent setting of the window width and height.
[0040] Step S14: Call the gtk_widget_size_reques function to set the width and height of the window according to the width and height of the image and the drawing area value, and use the gtk_widget_show_all function to display the window with the background in the default color. Specifically, call the gtk_widget_size_request(GtkWidget*widget, gint width, gint height) function to set the width and height of the window, where the parameter GtkWidget*widget represents the drawing area, gint width and gint height represent the width and height of the image, and use the values passed in from the SystemVerilog program. Use the gtk_widget_show_all(GtkWidget*widget) function to display the window and all its contents on the screen, with the background in the default color. The parameter GtkWidget*widget is the top-level window created.
[0041] It should be noted that the gtk_init function, gtk_window_new function, gtk_drawing_area_new function, gtk_widget_size_reques function, and gtk_widget_show_all function mentioned are commonly used GTK controls.
[0042] Step S2: When image data generated during the simulation of the display chip is detected, the image data is collected into the FIFO.
[0043] Specifically, when the SystemVerilog program detects the image data generated during the simulation of the display chip, the data to be displayed is collected into the FIFO (first in first out queue) of the verification environment through the port of the verification environment, and the amount of data in the FIFO is detected at the same time. FIFO (First In First Out) is a first-in first-out data buffer.
[0044] Step S3: taking out each frame of image data from the FIFO in turn, calling the image display program in C language to display the corresponding images on the generated windows for subsequent verification.
[0045] In detail, by using the C language image display program to display the corresponding images on the generated window, it is very convenient to verify whether the data flow inside the display chip is correct by observing the image, and it supports the display of different image sizes and different data formats. When there are simple image changes, the image can be directly displayed on the screen to intuitively compare the difference before and after the change to determine whether the change is correct and whether the effect meets the expectations.
[0046] In one embodiment, taking out each frame of image data from the FIFO in sequence and calling the C language image display program to display the corresponding images on the generated window respectively include:
[0047] When the image data in the FIFO is detected in real time and reaches the amount of data accumulated for one frame, C-DPI is used to call the C language image display program to display the images on the generated window respectively, until the images corresponding to the image data of all frames are displayed in real time. Among them, C-DPI, that is, the SystemVerilog program integrates the DPI (Direct Programming Interface) function to achieve efficient integration with C / C++ and other non-Verilog programming languages. You can easily import C language subroutines by simply declaring and using them through the import statement, and then call these C subroutines conveniently like calling SystemVerilog internal subroutines.
[0048] Specifically, when it is detected that the image data in the FIFO reaches the data amount of one frame, the data is taken out of the FIFO and placed in the port that calls the image display program. The C-DPI is used to call the C language image display program to display the image on the generated window. The above steps are repeated until the last frame ends.
[0049] In a specific embodiment, when it is detected in real time in the FIFO that the image data has accumulated to a data amount of one frame, the image data is taken out from the FIFO, the SystemVerilog program inputs the data address corresponding to the image data, the pixel height of the image, the pixel width of the image, and the data format of the image data, and calls the C language image display program to display the images respectively on the generated windows.
[0050] In one embodiment, the C language image display program pix_show_image (int width, intheight, svOpenArrayHandle pos_sv, int pix_type), the input parameters are the data address of the image data (svOpenArray Handle pos_sv), the pixel height of the image (int height), the pixel width of the image (int width) and the data format of the image data (int pix_type); specifically, the svOpenArrayHandle type is an open array compatible with SystemVerilog, in order to provide the C language with an interactive data address, pix_type is defined for itself, 0 represents rgb888, 1 represents rgb565, and 2 represents YUV422.
[0051] like Figure 3 As shown, the C language image display program displays an image on the generated window including:
[0052] Step S31: Use svGetArragePtr function to get the address of image data;
[0053] Step S32: based on the address of the image data, fetch the corresponding image data;
[0054] Step S33: determining whether the data format of the image data satisfies the set data format, and converting the image data that does not satisfy the set data format into the set data format; wherein the types of data formats include: rgb888, rgb565 and YUV422;
[0055] Step S34: calling the gdk_draw_rgb_image function to display the corresponding image on the generated window according to the image data in the set format.
[0056] In one embodiment, step S31 includes:
[0057] Use the svGetArrayPtr function to convert the data address of the image data input by the SystemVerilog program into a pointer that can be processed by the C language, and assign it to a pointer variable of the defined guchar* type.
[0058] Specifically, first, define a pointer variable pos of type guchar*, where guchar is a basic data type defined in the Glib library, usually used for image processing. Use the svGetArrayPtr function to convert the data address pos_sv passed in by SystemVerilog into a pointer that can be processed by the C language, and assign it to pos.
[0059] In one embodiment, step S32 includes:
[0060] Since the data volume of a frame varies according to different image formats, the data volume of the image data to be retrieved is determined based on the data format of the image data and the pixel height and pixel width of the image input by the SystemVerilog program;
[0061] Based on the address of the image data, fetch the image data of corresponding data amount;
[0062] The method of determining the amount of image data to be retrieved includes:
[0063] If the data format of the image data is RGB888, the amount of image data to be retrieved is calculated by multiplying the pixel width of the image by the pixel height and then by 3;
[0064] If the data format of the image data is RGB565 and YUV422, the amount of image data to be retrieved is calculated by multiplying the pixel width of the image by the pixel height and then by 2.
[0065] In one embodiment, the setting data format is RGB888.
[0066] Methods for converting image data that does not meet the set data format into the set data format include:
[0067] If the data format of the image data is RGB565, the RGB565 format is converted into the RGB888 format; wherein, the method of converting RGB565 into RGB888 includes: multiplying each color component of the RGB565 format by a corresponding factor to expand it to 8 bits. Specifically: multiply the R value of RGB565 by 8, the G value by 4, and the B value by 8.
[0068] If the data format of the image data is YUV422, convert the YUV422 format to rgr888 format; the method of converting YUV422 to rgb888 is as follows:
[0069] b = 1.164(Y-16) + 2.018(U-128); (Formula 1)
[0070] g = 1.164(Y-16)-0.813(V-128)-0.391(U-128); (Formula 2)
[0071] r = 1.164(Y-16)+1.596(V-128); (Formula 3)
[0072] In this way, different sizes and data types can be displayed and conveniently instantiated in different places.
[0073] In order to better describe the above display chip verification method, it is now described in conjunction with the following specific embodiments.
[0074] Embodiment: A display chip verification method. Figure 4 FIG. 4 is a flow chart of the display chip verification method in this embodiment.
[0075] This solution consists of two parts. One part is a function written in SystemVerilog language used to call the display program, which can be directly instantiated in the verification environment. The other part is a display program written in C language, including the initialization part and the image display part.
[0076] At the beginning of the simulation, the SystemVerilog part first calls the C language image display program initialization function pix_init to set the width and height of the image according to the image size to be displayed. This process will create a pixel window that matches the image size, and the background is white by default. Next, it enters the standby state and waits for the output of image data. Once SystemVerilog detects that the image data begins to be transmitted, it will capture the data through the port of the verification environment and store them in the FIFO (first-in, first-out queue). At the same time, SystemVerilog continues to monitor the amount of data in the FIFO. When the data in the FIFO accumulates to the complete data amount of a frame (depending on the image format, the amount of data in a frame will vary, for example, the rgb888 format is pixel width times pixel height times three, the rgb565 format is pixel width times pixel height times two, and the yuv422 format is also pixel width times pixel height times two), SystemVerilog will use C-DPI (a cross-language call method) to call the image display program. Subsequently, SystemVerilog extracts the data stored in the FIFO and passes it to the input port of the image display program. This process will continue until the data of the last frame of image is processed.
[0077] In this way, images on the data stream can be displayed in real time during the simulation process. If the image size is small and the simulation speed is fast, even animation effects can be achieved, which greatly facilitates the observation of the correctness of the image data. In addition, this device can be instantiated multiple times in different locations in the verification environment to compare the image output effects after processing by different modules, thereby further verifying the performance and accuracy of the system.
[0078] Similar to the principle of the above embodiment, the present invention provides a display chip verification device.
[0079] The following provides specific embodiments in conjunction with the accompanying drawings:
[0080] like Figure 5 A schematic structural diagram of a display chip verification device according to an embodiment of the present invention is shown.
[0081] Applied to SystemVerilog program, the device comprises:
[0082] Initialization module 1 is used to call the pixel initialization function of C language to initialize the width and height of the image and generate a window;
[0083] An image data acquisition module 2, connected to the initialization module 1, for acquiring the image data into the FIFO when image data generated during the simulation process is detected;
[0084] The display module 3 is connected to the image data acquisition module 2 and is used to sequentially take out each frame of image data from the FIFO, and call the image display program in C language to display the corresponding images on the generated windows for subsequent verification.
[0085] It should be understood that Figure 5 The division of each module in the device embodiment is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. Moreover, these units can be all implemented in the form of software calling through processing elements; or all implemented in the form of hardware; or some units can be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware.
[0086] Since the implementation principle of the display chip verification device has been described in the above embodiments, it will not be repeated here.
[0087] The display chip verification method provided in the embodiment of the present invention can be implemented on the terminal side or the server side. As for the hardware structure of the display chip verification terminal, please refer to Figure 6, is an optional hardware structure diagram of a display chip verification terminal 1000 provided in an embodiment of the present invention. The terminal 1000 may be a mobile phone, a computer device, a tablet device, a personal digital processing device, a factory background processing device, etc. The terminal 1000 includes: at least one processor 1001, a memory 1002, at least one network interface 10010 and a user interface 1009. The various components in the device are coupled together through a bus system 1005. It can be understood that the bus system 1005 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1005 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 6 In the specification, various buses are labeled as bus systems.
[0088] The user interface 1009 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.
[0089] It is understood that the memory 1002 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), which is used as an external cache. By way of exemplary but not limiting explanation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable categories of memory.
[0090] The memory 1002 in the embodiment of the present invention is used to store various categories of data to support the operation of the terminal 1000. Examples of these data include: any executable program for operating on the terminal 1000, such as an operating system 10021 and an application 10022; the operating system 10021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 10022 may include various applications, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The display chip verification method provided in the embodiment of the present invention may be included in the application 10022.
[0091] The method disclosed in the above embodiment of the present invention can be applied to the processor 1001, or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1001 or the instruction in the form of software. The above processor 1001 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1001 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor 1001 can be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0092] In an exemplary embodiment, the terminal 1000 may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD) to execute the aforementioned method.
[0093] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0094] In the embodiments provided in the present application, the computer readable and writable storage medium may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store a desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
[0095] In summary, the display chip verification method, device and terminal of the present invention call the pixel initialization function of C language through the SystemVerilog program to initialize the width and height of the image, and collect the image data generated during the display chip simulation process into FIFO, then take out each frame of image data from FIFO in turn, and call the image display program of C language to display the corresponding images respectively, so as to facilitate the subsequent display chip verification by observing the image. The present invention provides a convenient display chip verification solution, which verifies the accuracy of the internal data flow through real-time observation of the image, supports the display of different image sizes and data formats, and can intuitively compare image changes to determine whether the effect is as expected. In addition, the solution is easy to integrate into the SOC verification environment, thereby significantly reducing the verification workload of the image chip. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.
[0096] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A display chip verification method, characterized in that: Applied to SystemVerilog program, the method comprises: Call the pixel initialization function of C language to initialize the width and height of the image and generate a window; When image data generated during the display chip simulation process is detected, the image data is collected into the FIFO; Each frame of image data is taken out from the FIFO in turn, and the image display program in C language is called to display the corresponding image on the generated window for subsequent verification.
2. The display chip verification method according to claim 1, characterized in that: The pixel initialization function initializes the width and height of the image, generating a window including: Use the gtk_init function to initialize the GTK+ library and parse standard command line options; Call gtk_window_new function to create a window; Use the gtk_drawing_area_new function to create a drawing area and return the corresponding drawing area value; Call the gtk_widget_size_reques function to set the width and height of the window according to the width and height of the image and the painting area value, and use the gtk_widget_show_all function to display the window with the background of the default color.
3. The display chip verification method according to claim 1, characterized in that: Take each frame of image data from FIFO in turn, call the C language image display program to display the corresponding image on the generated window, including: When it is detected in real time in FIFO that the image data has accumulated to the amount of data for one frame, the image data is taken out of FIFO, and C-DPI is used to call the C language image display program to display the images separately on the generated window until the images corresponding to the image data of all frames are displayed in real time.
4. The display chip verification method according to claim 3, characterized in that: When it is detected in real time in the FIFO that the image data has accumulated to a data amount of one frame, the image data is taken out from the FIFO, and the SystemVerilog program inputs the data address corresponding to the image data, the pixel height of the image, the pixel width of the image, and the data format of the image data, and calls the C language image display program to display the image on the generated window.
5. The display chip verification method according to claim 4, characterized in that: The C language image display program displays an image on the generated window including: Use the svGetArragePtr function to get the address of the image data; Based on the address of the image data, fetch the corresponding image data; Determine whether the data format of the image data satisfies the set data format, and convert the image data that does not satisfy the set data format into the set data format; wherein the types of data formats include: rgb888, rgb565 and YUV422; Call the gdk_draw_rgb_image function to display the corresponding image on the generated window according to the image data in the set format.
6. The display chip verification method according to claim 5, characterized in that: Use the svGetArragePtr function to get the address of the image data including: Use the svGetArrayPtr function to convert the data address of the image data input by the SystemVerilog program into a pointer that can be processed by the C language, and assign it to a pointer variable of the defined guchar* type.
7. The display chip verification method according to claim 5, characterized in that: Based on the address of the image data, the corresponding image data is retrieved including: Based on the data format of the image data, the amount of image data to be retrieved is determined according to the pixel height and pixel width of the image input by the SystemVerilog program; Based on the address of the image data, fetch the image data of corresponding data amount; The method of determining the amount of image data to be retrieved includes: If the data format of the image data is RGB888, the amount of image data to be retrieved is calculated by multiplying the pixel width of the image by the pixel height and then by 3; If the data format of the image data is RGB565 and YUV422, the amount of image data to be retrieved is calculated by multiplying the pixel width of the image by the pixel height and then by 2.
8. The display chip verification method according to claim 5, characterized in that: The setting data format is rgb888.
9. A display chip verification device, characterized in that: Applied to SystemVerilog program, the device comprises: The initialization module is used to call the pixel initialization function of the C language to initialize the width and height of the image and generate a window; An image data acquisition module, connected to the initialization module, for acquiring the image data into the FIFO when image data generated during the simulation is detected; The display module is connected to the image data acquisition module and is used to sequentially take out each frame of image data from the FIFO, and call the image display program in C language to display the corresponding images on the generated windows for subsequent verification.
10. A display chip verification terminal, characterized in that: include: one or more memories and one or more processors; The one or more memories are used to store computer programs; The one or more processors, connected to the memory, are configured to run the computer program to perform the method according to any one of claims 1 to 8.
Citation Information
Cited By
Efficient verification method based on Zdelta compression algorithm
CN121985114A
