A TLM device and operation method of a GPU three-dimensional clipping module based on SysML view
Design the TLM device of the GPU three-dimensional clipping module through SysML view, and use processes and sockets to achieve graphical verification of the chip design, solving the problem of extending the development cycle caused by the increase in chip design complexity, and achieving a shortened design cycle and accelerated development progress. effect.
Patent Information
- Application Number
- CN202011542787.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-12-24
Smart Images

Figure CN112581583B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer hardware modeling, and relates to a TLM device based on a GPU three-dimensional clipping module, and in particular to a TLM device and an operation method of a GPU three-dimensional clipping module based on a SysML view. Background Art
[0002] SysML is a new system modeling language proposed by the International Council on Systems Engineering (INCOSE) and the Object Management Engineering (OMG) based on the reuse and extension of the subset of UML2.0. SysML defines new modeling elements by extending the existing UML2.0 with new attributes and constraints.
[0003] SysML is the abbreviation of System Modeling Language, which is an object-oriented graphical modeling language. Compared with UML (Unified Modeling Language), it has expanded some new elements and is more conducive to system engineering modeling. Compared with other modeling languages such as SCADE, SysML can not only model software, but also model hardware and the entire system. In the traditional chip design process, as the complexity of the design continues to increase, the design code and a large amount of documents will become more and more difficult to master. SysML uses a variety of graphics to present the overall design from multiple angles, so that large and complex systems can be clearly and quickly displayed, providing modeling and visualization support for software and hardware development, shortening the design cycle, accelerating the development progress, and assisting system design and verification.
[0004] This patent uses the SysML graphical modeling language to design a thing-level model of the GPU 3D trimming module, which can verify the 3D trimming module algorithm and architecture in the early stage of chip design, greatly shortening the project development cycle. Summary of the invention
[0005] Based on the problems existing in the background technology, the present invention provides a TLM device and operation method of a GPU three-dimensional clipping module based on a SysML view, which converts complex, cumbersome and ambiguous text into a clear graphic mode, and realizes the preliminary verification of the GPU three-dimensional clipping module architecture.
[0006] The technical solution of the present invention is:
[0007] A TLM device of a GPU three-dimensional clipping module based on a SysML view is special in that: it includes several processes and sockets; the above processes include a geu2sgu_tcu_busy_manage_thread process and a TCU_process_cthread process; the above TCU_process_cthread process implements clipping of three basic graphic elements, namely, points, lines and triangles, according to six clipping planes and plane coefficients of a viewing volume, and composes new basic graphic elements from clipped vertex information;
[0008] The above sockets include geu2sgu_tcu_busy_socket socket, tcu2fifo03_vertex_data_initiator_socket socket, and tcu2fifo04_vertex_data_initiator_socket socket;
[0009] The above socket is used to realize the interconnection communication function with external modules.
[0010] An operation method of a TLM device of a GPU three-dimensional clipping module based on a SysML view, which is special in that it includes the following operation steps:
[0011] 1) Variable initialization;
[0012] 2) Determine the status of the 3D clipping FIFO. If it is empty, set geu2sgu_tcu_busy to 0 and return to step 1); if the FIFO is not empty, set geu2sgu_tcu_busy to 1;
[0013] 3) Get complete clipping data from the 3D clipping FIFO;
[0014] 4) Determine currPktType;
[0015] When currPktType is glEnd packet, primVertex data is passed to the view transformation FIFO, then currVertexNum is cleared, and the process returns to step 2) to determine the state of the 3D clipping FIFO;
[0016] When currPktType is not glEnd package, go directly to the next step;
[0017] 5) Start clipping from the 0th plane, first calculate the relationship between the primitive vertices and the plane, and then perform primitive clipping according to the point, line, and triangle categories;
[0018] 6) After the cutting process, determine the cutting result;
[0019] If the clipping is retained, determine whether the current plane index is equal to 6. If it is not equal to 6, continue to clip the next plane. If it is equal to 6, pass the primVertex data to the window transformation FIFO or split the polygon into triangles and pass them to the window transformation FIFO for processing according to currVertexNum, then clear currVertexNum and return to step 2) to determine the 3D clipping FIFO status;
[0020] If it is cut and discarded, determine the current command packet type;
[0021] When the command packet type is rasterPos packet type, the 0th bit of the packet header is set to 1, and then the primVertex data is passed to the window transformation FIFO, and currVertexNum is cleared, and the process returns to step 2 to determine the 3D clipping FIFO status;
[0022] When the command packet type is not rasterPos, currVertexNum is cleared directly and the process returns to step 2 to determine the 3D clipping FIFO status.
[0023] As a preferred embodiment: the above step 3) specifically includes:
[0024] 3.1) Determine whether the current packet is a glEnd packet by using vabFlag and vaoFlag;
[0025] 3.2) The rasterPosFlag flag is used to determine whether the current package is a raster coordinate package;
[0026] 3.3) Parse the vtFlag field through simple_or_complex_mode, determine the primitive type and number of primitive vertices of the current packet in turn, and use vabFlag and vaoFlag to obtain all vertex information of the current primitive from the 3D clipping FIFO.
[0027] The present invention has the following advantages:
[0028] The present invention provides a TLM device of a GPU three-dimensional tailoring module based on a SysML view, which presents the overall design of the GPU three-dimensional tailoring module function from two perspectives through the internal block diagram and activity diagram of the three-dimensional tailoring module, converts complex and cumbersome and ambiguous text into a clear graphic mode, realizes the preliminary verification of the GPU three-dimensional tailoring module architecture, provides modeling and visualization support for software and hardware development, shortens the design cycle, speeds up the development progress, and assists system design and verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is an internal block diagram of the GPU 3D clipping module of the present invention;
[0030] Figure 2 This is an activity diagram of the GPU 3D clipping module processing process of the present invention. DETAILED DESCRIPTION
[0031] The technical solution of the present invention is described clearly and completely below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present invention.
[0032] See also Figure 1-2 , a TLM device of a GPU three-dimensional clipping module based on a SysML view, comprising a plurality of processes and sockets; the processes comprising a geu2sgu_tcu_busy_manage_thread process and a TCU_process_cthread process; the TCU_process_cthread process implements clipping of three basic primitives, namely, points, lines and triangles, according to six clipping planes and plane coefficients of a viewing volume, and composes new basic primitives from clipped vertex information;
[0033] The above sockets include geu2sgu_tcu_busy_socket socket, tcu2fifo03_vertex_data_initiator_socket socket, and tcu2fifo04_vertex_data_initiator_socket socket;
[0034] The above socket is used to realize the interconnection communication function with external modules.
[0035] An operating method of a TLM device of a GPU three-dimensional clipping module based on a SysML view comprises the following operating steps:
[0036] 1) Variable initialization;
[0037] 2) Determine the status of the 3D clipping FIFO. If it is empty, set geu2sgu_tcu_busy to 0 and return to step 1); if the FIFO is not empty, set geu2sgu_tcu_busy to 1;
[0038] 3) Get complete clipping data from the 3D clipping FIFO;
[0039] 4) Determine currPktType;
[0040] When currPktType is glEnd packet, primVertex data is passed to the view transformation FIFO, then currVertexNum is cleared, and the process returns to step 2) to determine the state of the 3D clipping FIFO;
[0041] When currPktType is not glEnd package, go directly to the next step;
[0042] 5) Start clipping from the 0th plane, first calculate the relationship between the primitive vertices and the plane, and then perform primitive clipping according to the point, line, and triangle categories;
[0043] 6) After the cutting process, determine the cutting result;
[0044] If the clipping is retained, determine whether the current plane index is equal to 6. If it is not equal to 6, continue to clip the next plane. If it is equal to 6, pass the primVertex data to the window transformation FIFO or split the polygon into triangles and pass them to the window transformation FIFO for processing according to currVertexNum, then clear currVertexNum and return to step 2) to determine the 3D clipping FIFO status;
[0045] If it is cut and discarded, determine the current command packet type;
[0046] When the command packet type is rasterPos packet type, the 0th bit of the packet header is set to 1, and then the primVertex data is passed to the window transformation FIFO, and currVertexNum is cleared, and the process returns to step 2 to determine the 3D clipping FIFO status;
[0047] When the command packet type is not rasterPos, currVertexNum is cleared directly and the process returns to step 2 to determine the 3D clipping FIFO status.
[0048] As a preferred embodiment: the above step 3) specifically includes:
[0049] 3.1) Determine whether the current packet is a glEnd packet by using vabFlag and vaoFlag;
[0050] 3.2) The rasterPosFlag flag is used to determine whether the current package is a raster coordinate package;
[0051] 3.3) Parse the vtFlag field through simple_or_complex_mode, determine the primitive type and number of primitive vertices of the current packet in turn, and use vabFlag and vaoFlag to obtain all vertex information of the current primitive from the 3D clipping FIFO.
[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for operating a TLM device of a GPU three-dimensional tailoring module based on a SysML view, characterized in that: The TLM device includes several processes and sockets; the processes include a geu2sgu_tcu_busy_manage_thread process and a TCU_process_cthread process; the TCU_process_cthread process implements clipping of three basic graphic elements, namely, points, lines and triangles, according to six clipping planes and plane coefficients of the visual scene body, and forms new basic graphic elements with the clipped vertex information; The sockets include geu2sgu_tcu_busy_socket socket, tcu2fifo03_vertex_data_initiator_socket socket, and tcu2fifo04_vertex_data_initiator_socket socket; The socket is used to realize the interconnection communication function with the external module; The operation method comprises the following steps: 1) Variable initialization; 2) Determine the status of the 3D clipping FIFO. If it is empty, set geu2sgu_tcu_busy to 0 and return to step 1); if the FIFO is not empty, set geu2sgu_tcu_busy to 1; 3) Get complete clipping data from the 3D clipping FIFO; 4) Determine currPktType; When currPktType is glEnd packet, primVertex data is passed to the view transformation FIFO, then currVertexNum is cleared and the process returns to step 2) to determine the status of the 3D clipping FIFO; When currPktType is not glEnd package, go directly to the next step; 5) Start clipping from the 0th plane, first calculate the relationship between the primitive vertices and the plane, and then clip the primitives according to the point, line, and triangle categories; 6) After the cutting process, determine the cutting result; If the clipping is retained, determine whether the current plane index is equal to 6. If it is not equal to 6, continue to clip the next plane. If it is equal to 6, pass the primVertex data to the window transformation FIFO or split the polygon into triangles and pass them to the window transformation FIFO for processing according to currVertexNum, then clear currVertexNum and return to step 2) to determine the 3D clipping FIFO status; If it is cut and discarded, determine the current command packet type; When the command packet type is rasterPos packet type, the 0th bit of the packet header is set to 1, and then the primVertex data is passed to the window transformation FIFO, and currVertexNum is cleared, and then the process returns to step 2 to determine the 3D clipping FIFO status; When the command packet type is not rasterPos, currVertexNum is cleared directly and the process returns to step 2 to determine the 3D clipping FIFO status.
2. The method for operating a TLM device of a GPU 3D clipping module based on SysML view according to claim 1, characterized in that: The step 3) specifically includes: 3.1) Determine whether the current packet is a glEnd packet by using vabFlag and vaoFlag; 3.2) The rasterPosFlag flag determines whether the current package is a raster coordinate package; 3.3) Parse the vtFlag field through simple_or_complex_mode, determine the primitive type and number of primitive vertices of the current packet in turn, and use vabFlag and vaoFlag to obtain all vertex information of the current primitive from the 3D clipping FIFO.
Citation Information
Patent Citations
3-D clipping in a graphics processing unit
CN101529473A
A graphic pipeline device based on a GPU chip and a modeling method
CN109598077A
A three-dimensional cutting circuit of a graphic processor
CN109727184A
A method and apparatus for collecting and using sensor data from a vehicle
CN111149141A
TLM model for GPU geometric primitive start mark management in plane clipping based on SystemC
CN111241776A
