CN109683877B - SystemC-based GPU software and hardware interaction TLM system - Google Patents
SystemC-based GPU software and hardware interaction TLM system Download PDFInfo
- Publication number
- CN109683877B CN109683877B CN201811516374.3A CN201811516374A CN109683877B CN 109683877 B CN109683877 B CN 109683877B CN 201811516374 A CN201811516374 A CN 201811516374A CN 109683877 B CN109683877 B CN 109683877B
- Authority
- CN
- China
- Prior art keywords
- transaction level
- module
- read
- host
- gpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Image Generation (AREA)
Abstract
The invention relates to the technical field of computer hardware modeling, in particular to a GPU software and hardware interaction TLM model based on SystemC. The GPU software and hardware interaction TLM model based on SystemC comprises a host agent layer model and a host interface layer model, wherein the host agent layer model provides an interaction path between a software driver and the host interface layer model, the host interface layer model provides an interaction path between the host agent layer model and the GPU hardware TLM model, and the interaction content comprises issuing of an OpenGL CM (Command Packet) Command Packet, reading and writing of a system structure register, interrupt processing and loading or obtaining of image and texture data. The invention realizes the TLM model-based GPU software and hardware model interaction method, solves the problem of software drive and hardware model interaction in GPU modeling, and effectively helps RTL design development and verification.
Description
Technical Field
The invention relates to the technical field of computer hardware modeling, in particular to a GPU software and hardware interaction TLM system based on SystemC.
Background
At present, China autonomously develops a domestic Graphic Processing Unit (GPU), but since a domestic commercial or military GPU chip is always adopted at home, the GPU is lack of design experience in the aspect of autonomous development of the GPU, and belongs to the stage of exploring and developing a core technology, meanwhile, the GPU chip has a huge hardware logic scale, and is realized from system architecture document compiling to rtl design, so that the GPU chip is a long project, and even if the rtl design is finished, the verification of functional performance and the like also needs a large amount of time, so that in order to improve the progress and reliability of autonomously developing Graphic processor projects, a college method is urgently needed to shorten the whole design period and assist the design process of a Graphic processor, and the method is (Transaction Level Modeling, TLM) Transaction Level Modeling. TLM (object-level modeling method) is an advanced digital system modeling method that can quickly build system models at early stages of a project, separating the communication details between models from the details of functional units or communication architectures. The communication mechanism (e.g., bus or FIFO) is modeled as a channel and presented to the module in the form of a SystemC interface class. Transaction requests typically occur when interface functions of these channel models are invoked, and the interface functions encapsulate the underlying details of the information exchange. At a business level, TLM emphasizes the functionality of data transfer itself-the content of the data and the start and end points of the transfer, and involves as few implementations as possible.
Disclosure of Invention
Based on the problems in the background art, the GPU software and hardware interaction TLM model design based on the SystemC can solve the interaction problem of the software driver and the GPU hardware model, and opens up software and hardware interaction channels for function verification on the hardware microstructure TLM model in advance.
The invention provides a Graphics Processing Unit (GPU) hardware and software interaction TLM system based on SystemC, which is characterized by comprising a host agent layer model and a host interface layer model, wherein the host agent layer model and the host interface layer model are used for realizing the hardware and software interaction of driving software and a GPU hardware model.
Optionally, the host agent layer model is configured to implement data interaction between the C language-based driver software and the host interface layer model based on SystemC, and specifically includes: the device comprises a Command issuing module, a read-write module, an interrupt processing module and a main memory reading module, wherein the Command issuing module is used for sending an OpenGL CM (Command Package) Command packet, and the Command packet carries OpenGL functional codes and related parameter information; the read-write module is used for reading and writing the architecture register, and the architecture register is used for representing the working state and the mode of the GPU.
Optionally, the host interface layer model is configured to implement interaction between a GPU host interface layer model based on a SystemC transaction level interface and a GPU PCIe hardware model, and the host interface layer model includes: the system comprises a host memory read-write transaction level module, a system structure register read-write transaction level module, an interrupt state read-write transaction level module and a direct memory read DMA configuration transaction level module, wherein the host memory read-write transaction level module provides a host memory read-write transaction level interface, the system structure register read-write transaction level module provides a system structure register read-write transaction level interface, the interrupt state read-write transaction level module provides an interrupt state read-write transaction level interface, and the direct memory read DMA configuration transaction level module provides a DMA configuration transaction level interface for calling a host agent layer model and a GPU hardware model.
Optionally, the command issuing module is connected to the DMA configuration transaction level module through the DMA configuration transaction level interface, and issues the CM command packet to the host interface layer model in the form of a DMA descriptor, where the DMA descriptor includes a DMA destination address, a DMA source address, a DMA path, and a DMA length.
The read-write module is connected with the architecture register read-write transaction level module through the architecture register read-write transaction level interface and is used for configuring a GPU working mode and acquiring a GPU working state.
The interrupt processing module is connected with the interrupt state read-write transaction level module through the interrupt state read-write transaction level interface and is used for acquiring and clearing host interrupt.
The main memory reading module is connected with the host memory reading and writing transaction level module through the host memory reading and writing transaction level interface and is used for reading and writing main memory data.
The GPU software and hardware interaction TLM system based on SystemC comprises a host agent layer model and a host interface layer model, wherein the host agent layer model provides an interaction path of a software driver and the host interface layer model, the host interface layer model provides an interaction path of the host agent layer model and the GPU hardware TLM model, and the interaction content comprises issuing of an OpenGL CM (Command Packet) Command Packet, reading and writing of a system structure register, interrupt processing and loading or obtaining of image and texture data. The method can solve the interaction problem of the software driver and the GPU hardware model, and can open a software and hardware interaction channel for performing functional verification on the hardware microstructure TLM model in advance.
Drawings
FIG. 1 is a schematic structural diagram of a GPU software and hardware interaction TLM model based on SystemC provided by the invention;
Detailed Description
A Graphics Processing Unit (GPU) hardware and software interaction TLM system based on SystemC is shown in figure 1 and comprises a host agent layer model and a host interface layer model, wherein the host agent layer model and the host interface layer model are used for realizing the hardware and software interaction between driving software and a GPU hardware model.
Optionally, the host agent layer model is configured to implement data interaction between the C language-based driver software and the host interface layer model based on SystemC, and specifically includes: the device comprises a Command issuing module, a read-write module, an interrupt processing module and a main memory reading module, wherein the Command issuing module is used for sending an OpenGL CM (Command Package) Command packet, and the Command packet carries OpenGL functional codes and related parameter information; the read-write module is used for reading and writing the architecture register, and the architecture register is used for representing the working state and the mode of the GPU.
Optionally, the host interface layer model is configured to implement interaction between a GPU host interface layer model based on a SystemC transaction level interface and a GPU PCIe hardware model, and the host interface layer model includes: the system comprises a host memory read-write transaction level module, a system structure register read-write transaction level module, an interrupt state read-write transaction level module and a direct memory read DMA configuration transaction level module, wherein the host memory read-write transaction level module provides a host memory read-write transaction level interface, the system structure register read-write transaction level module provides a system structure register read-write transaction level interface, the interrupt state read-write transaction level module provides an interrupt state read-write transaction level interface, and the direct memory read DMA configuration transaction level module provides a DMA configuration transaction level interface for calling a host agent layer model and a GPU hardware model.
Optionally, the method specifically includes:
the command issuing module is connected with the direct memory access DMA configuration transaction level module through the DMA configuration transaction level interface, and issues the CM command packet to the host interface layer model in a DMA descriptor mode, wherein the DMA descriptor comprises a DMA destination address, a DMA source address, a DMA path and a DMA length.
The read-write module is connected with the architecture register read-write transaction level module through the architecture register read-write transaction level interface and is used for configuring a GPU working mode and acquiring a GPU working state.
The interrupt processing module is connected with the interrupt state read-write transaction level module through the interrupt state read-write transaction level interface and is used for acquiring and clearing host interrupt.
The main memory reading module is connected with the host memory reading and writing transaction level module through the host memory reading and writing transaction level interface and is used for reading and writing main memory data.
The GPU software and hardware interaction TLM system based on SystemC comprises a host agent layer model and a host interface layer model, wherein the host agent layer model provides an interaction path of a software driver and the host interface layer model, the host interface layer model provides an interaction path of the host agent layer model and the GPU hardware TLM model, and the interaction content comprises issuing of an OpenGL CM (Command Packet) Command Packet, reading and writing of a system structure register, interrupt processing and loading or obtaining of image and texture data. The method can solve the interaction problem of the software driver and the GPU hardware model, and can open a software and hardware interaction channel for performing functional verification on the hardware microstructure TLM model in advance.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (1)
1. A Graphics Processing Unit (GPU) hardware and software interaction TLM system based on SystemC is characterized by comprising a host agent layer model and a host interface layer model, wherein the host agent layer model and the host interface layer model are used for realizing the hardware and software interaction between driving software and a GPU hardware model;
the host agent layer model is used for realizing data interaction between the driving software based on the C language and the host interface layer model based on the SystemC, and specifically comprises the following steps: the device comprises a Command issuing module, a read-write module, an interrupt processing module and a main memory reading module, wherein the Command issuing module is used for sending an OpenGL CM (Command Package) Command packet, and the Command packet carries OpenGL functional codes and related parameter information; the read-write module is used for reading and writing an architecture register, and the architecture register is used for representing the working state and the mode of the GPU;
the host interface layer model is used for realizing interaction between a GPU host interface layer model based on a SystemC transaction-level interface and a GPU PCIe hardware model, and comprises: the system comprises a host memory read-write transaction level module, an architecture register read-write transaction level module, an interrupt state read-write transaction level module and a direct memory read DMA configuration transaction level module, wherein the host memory read-write transaction level module provides a host memory read-write transaction level interface, the architecture register read-write transaction level module provides an architecture register read-write transaction level interface, the interrupt state read-write transaction level module provides an interrupt state read-write transaction level interface, and the direct memory read DMA configuration transaction level module provides a DMA configuration transaction level interface for calling a host agent layer model and a GPU hardware model;
the command issuing module is connected with the direct memory access DMA configuration transaction level module through the DMA configuration transaction level interface, and issues the CM command packet to the host interface layer model in a DMA descriptor mode, wherein the DMA descriptor comprises a DMA destination address, a DMA source address, a DMA path and a DMA length;
the read-write module is connected with the read-write transaction level module of the architecture register through the read-write transaction level interface of the architecture register and is used for configuring a GPU working mode and acquiring a GPU working state;
the interrupt processing module is connected with the interrupt state read-write transaction level module through the interrupt state read-write transaction level interface and is used for acquiring and clearing host interrupt;
the main memory reading module is connected with the host memory reading and writing transaction level module through the host memory reading and writing transaction level interface and is used for reading and writing main memory data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811516374.3A CN109683877B (en) | 2018-12-11 | 2018-12-11 | SystemC-based GPU software and hardware interaction TLM system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811516374.3A CN109683877B (en) | 2018-12-11 | 2018-12-11 | SystemC-based GPU software and hardware interaction TLM system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109683877A CN109683877A (en) | 2019-04-26 |
CN109683877B true CN109683877B (en) | 2022-03-15 |
Family
ID=66186543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811516374.3A Active CN109683877B (en) | 2018-12-11 | 2018-12-11 | SystemC-based GPU software and hardware interaction TLM system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109683877B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110942478B (en) * | 2019-11-18 | 2023-09-19 | 中国航空工业集团公司西安航空计算技术研究所 | Texture integrity calculation method and calculation unit based on SystemC |
CN110941898B (en) * | 2019-11-18 | 2023-10-17 | 中国航空工业集团公司西安航空计算技术研究所 | Design model and design method of graphic processor |
CN111008515B (en) * | 2019-11-18 | 2023-06-09 | 中国航空工业集团公司西安航空计算技术研究所 | TLM microstructure for GPU hardware sub-texture replacement storage algorithm |
CN111047504B (en) * | 2019-11-21 | 2023-06-13 | 中国航空工业集团公司西安航空计算技术研究所 | TLM microstructure for GPU sub-image processing based on SystemC |
CN110955572A (en) * | 2019-11-21 | 2020-04-03 | 中国航空工业集团公司西安航空计算技术研究所 | GPU (graphics processing Unit) chip-oriented host interface unit performance simulation method and platform |
CN112579254B (en) * | 2020-12-08 | 2022-03-29 | 成都海光微电子技术有限公司 | Simulation method and device of graphic processor, electronic equipment and storage medium |
CN115719047B (en) * | 2022-11-14 | 2023-06-06 | 沐曦集成电路(上海)有限公司 | Waveform GPU-based joint simulation system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1828551A (en) * | 2006-04-13 | 2006-09-06 | 电子科技大学 | High speed synergy emulation method for transaction-grade software and hardware |
CN101630343A (en) * | 2009-08-18 | 2010-01-20 | 中兴通讯股份有限公司 | Simulation method and simulation system |
CN106888271A (en) * | 2017-03-30 | 2017-06-23 | 北京萤芯科技有限公司 | A kind of software and hardware interactive interface applied in BLE5.0 protocol systems and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090132991A1 (en) * | 2007-11-16 | 2009-05-21 | Nec Laboratories America, Inc | Partial order reduction for scalable testing in system level design |
-
2018
- 2018-12-11 CN CN201811516374.3A patent/CN109683877B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1828551A (en) * | 2006-04-13 | 2006-09-06 | 电子科技大学 | High speed synergy emulation method for transaction-grade software and hardware |
CN101630343A (en) * | 2009-08-18 | 2010-01-20 | 中兴通讯股份有限公司 | Simulation method and simulation system |
CN106888271A (en) * | 2017-03-30 | 2017-06-23 | 北京萤芯科技有限公司 | A kind of software and hardware interactive interface applied in BLE5.0 protocol systems and system |
Non-Patent Citations (1)
Title |
---|
基于SystemC和SystemVerilog的联合仿真平台设计;卢艳君;《科学技术创新》;20170930;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109683877A (en) | 2019-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109683877B (en) | SystemC-based GPU software and hardware interaction TLM system | |
CN107346351B (en) | Method and system for designing an FPGA based on hardware requirements defined in source code | |
CN112256601B (en) | Data access control method, embedded storage system and embedded equipment | |
CN100555257C (en) | The memory controller of the dma operation between the processing page replicative phase and method | |
US11675613B2 (en) | Flexible physical function and virtual function mapping | |
US20100141664A1 (en) | Efficient GPU Context Save And Restore For Hosted Graphics | |
EP1966730A2 (en) | System and method for generating a plurality of models at different levels of abstraction from a single master model | |
EP3547248B1 (en) | Method and system for controlling write processing to an external memory | |
US20110062987A1 (en) | Asynchronous conversion circuitry apparatus, systems, and methods | |
CN100464319C (en) | Device and method for implementing communication between processes | |
CN113868039B (en) | Test method, device and related equipment | |
CN109840878B (en) | GPU parameter management method based on SystemC | |
CN110825435B (en) | Method and apparatus for processing data | |
CN111931442A (en) | FPGA embedded FLASH controller and electronic device | |
US11475199B1 (en) | Parallelizing simulation and hardware co-simulation of circuit designs through partitioning | |
TWI410963B (en) | Operating system supplemental disk caching computer system, method and graphics subsystem | |
CN109727186B (en) | SystemC-based GPU (graphics processing Unit) fragment coloring task scheduling method | |
EP2325747A2 (en) | Virtual platform for prototyping system-on-chip designs | |
CN109657360A (en) | A kind of modeling method and view system towards GPU chip hardware framework | |
WO2024119930A1 (en) | Scheduling method and apparatus, and computer device and storage medium | |
US10481814B1 (en) | Architecture for asynchronous memory transfer for kernels implemented in integrated circuits | |
CN109741235A (en) | A kind of host interface means and modeling method based on GPU chip | |
CN104834613B (en) | To access the computer system of virtual machine and method | |
CN109753713B (en) | Digital circuit function modeling method and system based on internal entity state transition | |
JP5262774B2 (en) | Simulation control program, simulation apparatus, and simulation control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |