KR20060135104A - Geometry transformation pipeline architecture without a stall for 3-dimension graphics, geometry transformation processor and register file architecture of the same - Google Patents

Geometry transformation pipeline architecture without a stall for 3-dimension graphics, geometry transformation processor and register file architecture of the same Download PDF

Info

Publication number
KR20060135104A
KR20060135104A KR1020050054768A KR20050054768A KR20060135104A KR 20060135104 A KR20060135104 A KR 20060135104A KR 1020050054768 A KR1020050054768 A KR 1020050054768A KR 20050054768 A KR20050054768 A KR 20050054768A KR 20060135104 A KR20060135104 A KR 20060135104A
Authority
KR
South Korea
Prior art keywords
pipeline
data
steps
execution step
vertex data
Prior art date
Application number
KR1020050054768A
Other languages
Korean (ko)
Other versions
KR100679861B1 (en
Inventor
이광엽
오민석
김재우
Original Assignee
이광엽
한국전자통신연구원
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 이광엽, 한국전자통신연구원 filed Critical 이광엽
Priority to KR1020050054768A priority Critical patent/KR100679861B1/en
Publication of KR20060135104A publication Critical patent/KR20060135104A/en
Application granted granted Critical
Publication of KR100679861B1 publication Critical patent/KR100679861B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/80Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
    • G06F15/8007Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors single instruction multiple data [SIMD] multiprocessors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization

Abstract

A geometry transformation pipeline architecture without stall for 3-D graphics, a geometry transformation processor, and a register file architecture thereof are provided to carry out geometry transformation and shading process by carrying out minimum steps for each pipeline and operate two peak data, thereby removing stall of the pipelines caused by dependency of data and reducing processing time delay. A geometry transformation pipeline architecture without stall for 3-D graphics includes an adding operation pipeline(ADDV) for adding two input values, a multiplying operation pipeline(MULV) for multiplying two input values, a comparison operation pipeline(CMPV) for comparing size of the two input values, a load operation pipeline for loading data from a memory, a storing operation pipeline(STRV) for storing data to the memory, a shift operation pipeline(MOVV) for shifting data between registers, a reciprocal number operation pipeline(CONV) for calculating reciprocal number for the input values, and a reciprocal square root operating pipeline(RSQ) for calculating reciprocal square roots for the input values. The reciprocal number operation pipeline and the reciprocal square root operating pipeline are respectively formed of four execution steps and the others are respectively formed of two execution steps.

Description

3차원 그래픽 기하변환 파이프라인 구조, 기하변환 프로세서 및 레지스터 파일 구조{GEOMETRY TRANSFORMATION PIPELINE ARCHITECTURE WITHOUT A STALL FOR 3-DIMENSION GRAPHICS, GEOMETRY TRANSFORMATION PROCESSOR AND REGISTER FILE ARCHITECTURE OF THE SAME}3D graphics geometry pipeline, geometry processor, and register file structure

도 1 은 3차원 그래픽 기하 처리 과정을 도시한 블록도.1 is a block diagram illustrating a three-dimensional graphics geometric process.

도 2 는 128 비트 SIMD 구조에서 위치 데이터의 행렬 곱셈 연산 과정을 도시한 도.2 illustrates a matrix multiplication operation of position data in a 128-bit SIMD structure.

도 3 은 종래의 파이프라인 구조를 이용하여 도 2 의 행렬 곱셈 연산을 수행하는 모습을 도시한 도.FIG. 3 illustrates a matrix multiplication operation of FIG. 2 using a conventional pipeline structure. FIG.

도 4 는 96 비트 SIMD 구조에서 빛 데이터의 행렬 곱셈 연산 과정을 도시한 도.4 illustrates a matrix multiplication operation of light data in a 96-bit SIMD structure.

도 5 는 종래의 파이프라인 구조를 이용하여 도 4 의 행렬 곱셈 연산을 수행하는 모습을 도시한 도.FIG. 5 illustrates a matrix multiplication operation of FIG. 4 using a conventional pipeline structure. FIG.

도 6 은 본 발명에 따른 기하변환 프로세서의 각 명령어별 파이프라인 구조를 도시한 도.FIG. 6 is a diagram illustrating a pipeline structure for each instruction of a geometric transformation processor according to the present invention. FIG.

도 7 은 본 발명에 따른 파이프라인 구조를 이용하여 정규화식을 처리하는 모습을 도시한 도.7 is a diagram illustrating a normalized expression process using a pipeline structure according to the present invention.

도 8 은 본 발명에 따른 파이프라인 구조를 이용하여 2개의 정점 데이터에 대한 정규화식을 처리하는 모습을 도시한 도.8 is a view showing a process of normalizing two vertex data using a pipeline structure according to the present invention.

도 9 는 2개의 위치 데이터에 대한 행렬 곱셈 연산 과정을 도시한 도.9 is a diagram illustrating a matrix multiplication operation procedure for two position data.

도 10 은 본 발명에 따른 파이프라인 구조를 이용하여 2개의 위치 데이터에 대하여 병렬로 행렬 곱셈 연산을 수행하는 모습을 도시한 도.10 illustrates a matrix multiplication operation performed on two position data in parallel using a pipeline structure according to the present invention.

도 11 은 2개의 빛 데이터에 대한 행렬 곱셈 연산 과정을 도시한 도.11 is a diagram illustrating a matrix multiplication operation procedure for two light data.

도 12 는 본 발명에 따른 파이프라인 구조를 이용하여 2개의 빛 데이터에 대하여 병렬로 행렬 곱셈 연산을 수행하는 모습을 도시한 도.12 illustrates a matrix multiplication operation performed on two light data in parallel using a pipeline structure according to the present invention.

도 13 은 본 발명에 따른 기하변환 프로세서의 레지스터 파일 구조를 도시한 블록도.13 is a block diagram showing a register file structure of a geometry conversion processor in accordance with the present invention.

본 발명은 3차원 그래픽 기하변환 파이프라인 구조, 기하변환 프로세서 및 레지스터 파일 구조에 관한 것으로서, 보다 구체적으로는 기하변환 및 음영처리를 위한 각 파이프라인에 최소한의 실행 단계를 포함하고 2개의 정점 데이터를 중첩하여 병렬로 연산함으로써 파이프라인의 정지(stall) 발생을 최소화하여 기하처리의 속도를 크게 개선할 수 있는 3차원 그래픽 기하변환 파이프라인 구조, 기하변환 프로세서 및 레지스터 파일 구조에 관한 것이다.The present invention relates to a three-dimensional graphics geometry pipeline structure, a geometry processor, and a register file structure, and more particularly, includes two vertex data with minimal execution steps in each pipeline for geometry transformation and shading. The present invention relates to a three-dimensional graphics geometric transformation pipeline structure, a geometric transformation processor, and a register file structure that can greatly improve the speed of geometric processing by minimizing the occurrence of stall in the pipeline by performing parallel operation in parallel.

3차원 그래픽 프로세서에서 기하변환을 위하여 기하(Geometry) 처리가 필요한데, 상기 처리 과정은 호스트에 의해 처리된 모델 데이터의 정보들을 입력받음으로써 시작된다. 모델 데이터는 한 좌표의 정보, 각 좌표의 수직 방향을 나타내는 노말 벡터(Normal Vector), 물질과 광원의 Ambient, Diffuse, Specular 색 속성 정보와 각 단계에서 요구되는 파라미터들이 포함된다.Geometry processing is required for geometric transformation in a 3D graphics processor, which starts by receiving information of model data processed by a host. The model data includes information about one coordinate, a normal vector representing the vertical direction of each coordinate, information on the material, light source Ambient, Diffuse, and Specular color attributes, and parameters required for each step.

도 1 은 3차원 그래픽 기하(Geometry) 처리 과정을 도시한 블록도이다. 도 1 에 도시한 바와 같이, 기하 처리는 입력되는 모델 데이터에 대한 위치 변환(Transformation) 과정과 색 계산(Lighting) 과정으로 이루어진다. 위치 변환 과정은 입력되는 모델 데이터에 대한 공간상의 위치를 변환하는 과정이며, 색 계산 과정은 모델 데이터를 구성하는 각 정점의 빛에 대한 색을 계산하게 된다. 따라서, 통상적으로 기하 처리를 T & L 처리라고도 한다.FIG. 1 is a block diagram illustrating a three-dimensional graphics geometry process. As shown in FIG. 1, the geometric process is performed by a position transformation process and a color calculation process on input model data. The position conversion process is a process of transforming a spatial position of input model data, and the color calculation process calculates a color of light of each vertex constituting the model data. Therefore, geometric processing is also commonly referred to as T & L processing.

위치 변환(Transformation) 과정에서는 동차 좌표(Homogeneous Coordinates)를 사용하여 모델의 정점 좌표를 x, y, z, w 로 나타내게 된다. 따라서, 모델의 정점 좌표 변환시 크기 변환, 회전 변환과 이동 변환을 동시에 한번의 4×4 변환 행렬(Matrix) 곱셈으로 처리할 수 있으며 이러한 특성은 3차원 그래픽에서 매우 유용하다. 동차 좌표는 모델 정점 좌표에 w를 1로 설정하고, 4×4 행렬 변환 행렬의 마지막 대각 성분에 1을 넣어 이용하게 된다.In the transformation process, homogeneous coordinates are used to represent vertex coordinates of the model as x, y, z, and w. Therefore, when transforming vertex coordinates of a model, the size transformation, rotation transformation, and movement transformation can be simultaneously processed by one 4 × 4 transformation matrix multiplication, which is very useful in 3D graphics. Homogeneous coordinates are used by setting w to 1 in model vertex coordinates and inserting 1 into the last diagonal component of the 4x4 matrix transformation matrix.

위치 변환 과정은 모델의 좌표를 시점과 이동 정보로 변환하는 모델/뷰 변환 과정(Model/View Transformation), 3차원 뷰 볼륨(View Volume)으로 투영하는 프로젝션 과정(Projection), 뷰 볼륨 밖에 위치하는 모델의 정점을 절단하는 클리핑 과정(Clipping), 모델의 정점 좌표 x, y, z 를 w 로 나누는 과정(Divide by w), 그리고 2차원 화면 좌표로 모델 좌표를 변환하는 뷰포트 변환 과정(ViewPort Transformation)으로 이루어진다.The position transformation process includes a model / view transformation process that transforms the coordinates of the model into view and movement information, a projection process that projects into a three-dimensional view volume, and a model located outside the view volume. Clipping process for cutting vertices of the image, dividing by vertex coordinates x, y, and z into the model (Divide by w), and viewport transformation process for transforming the model coordinates into two-dimensional screen coordinates. Is done.

기하변환 과정은 각 처리 단계마다 모델의 좌표 데이터와 처리 방법의 병렬성이 크게 내재되어 있다. 따라서, 이를 최대한으로 이용하는 동시에 여러 데이터를 파이프라인으로 빠르게 처리하는 병렬구조가 기하변환 프로세서에 적합하게 된다.The geometric transformation process has great inherent parallelism between the coordinate data of the model and the processing method for each processing step. Therefore, a parallel structure that utilizes this to the maximum and simultaneously processes multiple data into a pipeline is suitable for the geometry conversion processor.

기하변환 프로세서에 적용될 수 있는 병렬구조로는 VLIW(Very Long Instruction Word) 구조, SIMD(Single Instruction stream Multiple Data stream) 구조 및 MIMD(Multiple Instruction stream Multiple Data stream) 구조가 있다. 먼저, VLIW 구조는 기하변환 과정의 각 처리 단계의 병렬성과 모델의 좌표 간의 병렬성을 이용하는 구조로서, 모델의 한 좌표에 대하여 한 명령어가 여러 연산을 수행할 수 있다. 또한, SIMD 구조는 모델의 좌표 x, y, z, w 성분 간의 병렬성을 이용하는 구조로서, 하나의 명령어로 모델의 한 좌표 성분 x, y, z, w 를 동시에 연산할 수 있다. 마지막으로, MIMD 구조는 모델의 좌표간의 병렬성과 모델의 좌표 x, y, z, w 성분 간의 병렬성을 이용하는 구조로서, 모델의 한 좌표 성분 x, y, z, w 를 동시에 연산할 수 있는 명령어 여러개를 동시에 수행시켜 한번에 여러개의 모델 좌표를 동시에 처리할 수 있다. 다른 기하변환 프로세서 역시 3차원 그래픽 데이터를 효율적으로 처리하기 위해 위와 같은 병렬구조를 채택하고 있다.Parallel structures applicable to the geometry conversion processor include a VLIW (Very Long Instruction Word) structure, a SIMD (Single Instruction stream Multiple Data stream) structure and a MIMD (Multiple Instruction stream Multiple Data stream) structure. First, the VLIW structure is a structure that uses the parallelism between the parallelism of each processing step of the geometric transformation process and the coordinates of the model, and one instruction can perform several operations on one coordinate of the model. In addition, the SIMD structure is a structure using parallelism between the coordinate x, y, z, w components of the model, it is possible to simultaneously calculate a coordinate component x, y, z, w of the model with one command. Finally, the MIMD structure is a structure that uses the parallelism between the coordinates of the model and the parallelism between the x, y, z and w components of the model. You can process multiple model coordinates at the same time by running. Other geometric transformation processors also employ such parallel structures to efficiently process 3D graphics data.

상기 세가지 병렬 구조 중 MIMD 구조는 3차원 그래픽 데이터의 병렬성을 최대한으로 이용하기 때문에 기하변환 과정을 가장 효율적으로 처리할 수 있다. 그러나, 다중 데이터를 처리하는 부동 소수점 기능 유닛이 여러개로 구성되기 때문에 상당히 큰 데이터 패스가 형성되며, 3차원 그래픽 데이터를 여러 기능 유닛에 효율적으로 분배하기 위한 분배 유닛으로 인해 제어부도 상당히 복잡해지게 된다.Among the three parallel structures, the MIMD structure can most efficiently process the geometric transformation process because it utilizes the parallelism of three-dimensional graphic data to the maximum. However, since a large number of floating point functional units for processing multiple data are formed, a considerably large data path is formed, and a control unit also becomes quite complicated due to a distribution unit for efficiently distributing three-dimensional graphic data to several functional units.

또한, VLIW 구조 역시 3차원 그래픽 데이터와 처리 과정의 병렬성을 이용하여 기하변환 처리 과정시 큰 장점이 있으나, 명령어의 복잡도로 인해 명령어 디코더를 포함한 제어부가 매우 복잡하며, VLIW 구조의 특징상 기하변환 처리 과정의 프로그램 생성시 유연성(Flexibility)이 크게 감소하여 고정 기능 유닛(Fixed Functional Unit)과 같은 구조가 될 수 있다.In addition, the VLIW structure also has a great advantage in the geometric transformation process using the parallelism of 3D graphic data and processing process, but the control unit including the instruction decoder is very complicated due to the complexity of the instruction, Flexibility is greatly reduced when the program is generated, resulting in a structure such as a fixed functional unit.

따라서, 프로세서의 사용 면적과 프로그램 유연성이 중요시되는 내장형 시스템의 3차원 그래픽 가속이 중요한 기하변환 프로세서에서는 MIMD 구조와 VLIW 구조 보다는 데이터 패스의 크기가 비교적 작고 제어부가 간단하면서도 3D 그래픽 데이터의 병렬성을 최대한 이용할 수 있는 SIMD 구조가 적합하다.Therefore, in the geometry conversion processor where the 3D graphics acceleration of the embedded system where the processor footprint and the program flexibility are important is important, the data path is relatively small and the control is simpler than the MIMD and VLIW structures. SIMD structures are suitable.

도 2 는 128 비트 SIMD 구조에서 위치 데이터의 행렬 곱셈 연산 과정을 도시한 도로서, 기하변환 과정에서 주가 되는 4×4 행렬과 1×4 행렬 곱셈 연산을 처리하는 과정을 도시하였다. 도 2 에 도시한 바와 같이, 4×4 행렬과 1×4 행렬 곱셈 연산을 128 비트 SIMD 구조를 적용한 프로세서에서 처리할 경우 (a) 내지 (g) 과정으로 처리할 수 있으며, 이는 7개의 명령어 수행으로 4×4 행렬과 1×4 행렬 곱셈 연산 처리할 수 있음을 의미한다.FIG. 2 is a diagram illustrating a matrix multiplication operation of position data in a 128-bit SIMD structure, and illustrates a process of processing a 4x4 matrix and a 1x4 matrix multiplication operation, which are main parts of a geometric transformation process. As shown in FIG. 2, when a 4 × 4 matrix and a 1 × 4 matrix multiplication operation is processed by a processor employing a 128-bit SIMD structure, processes (a) to (g) may be performed. This means that a 4x4 matrix and a 1x4 matrix multiplication operation can be performed.

프로세서의 파이프라인 구조 역시 병렬 구조 채택과 마찬가지로 기하변환 프로세서의 성능에 크게 영향을 미치게 된다. 그러므로, 기하변환 프로세서의 명령어 파이프라인이 데이터 의존성(Data Dependency)이나 처리 유닛 의존성(Resource Dependency) 등 파이프라인 해저드(Pipeline Hazard)로 정지(stall)될 경우 연속적인 반복 수행(Loop)으로 구성된 기하변환(Geometry Transformation) 처리 과정은 상당히 큰 성능 저하를 야기하게 된다.The pipeline structure of the processor, as well as the parallel architecture, has a significant impact on the performance of the geometry converter. Therefore, if the instruction pipeline of the geometry processor is stalled with a pipeline Hazard, such as data dependencies or resource dependencies, then the geometry consists of successive loops. (Geometry Transformation) processing will cause significant performance degradation.

도 3 은 종래의 파이프라인 구조를 이용하여 도 2 의 행렬 곱셈 연산을 수행하는 모습을 도시한 도로서, 데이터 의존성으로 인한 파이프라인의 정지(stall)을 나타낸다. 도 3 에 도시한 바와 같이, 종래의 파이프라인은 명령어 해석 단계인 ID 단계, 부동소수점 연산 단계인 EX1, EX2 및 EX3 단계, 그리고 연산 결과를 저장하는 WB 단계로 구성된다. 일반적인 부동소수점 연산은 3개의 수행 단계를 갖는다.FIG. 3 is a diagram illustrating a matrix multiplication operation of FIG. 2 using a conventional pipeline structure. FIG. 3 illustrates a pipeline stall due to data dependency. As shown in FIG. 3, the conventional pipeline is composed of an ID stage, which is an instruction interpretation stage, EX1, EX2, and EX3 stages, which are floating point arithmetic stages, and a WB stage, which stores operation results. A typical floating point operation has three execution steps.

종래의 파이프라인 구조를 통해 도 2 에 도시한 행렬 곱셈 연산을 처리할 경우, 4×4 행렬의 각 열과 1×4 행렬의 각 행을 곱하는 MULV 연산은 다른 처리가 완료될 필요없이 독립적으로 처리가 가능하므로 파이프라인의 정지(stall) 없이 처리되게 된다. 그런데, (a)의 결과값과 (b)의 결과값을 더하는 (e) 단계, (c)의 결과값과 (d)의 결과값을 더하는 (f) 단계, 그리고 (e)의 결과값과 (f)의 결과값을 더하는 (g) 단계의 연산은 각기 전 단계가 완료된 이후에 처리가 가능하게 된다. 먼저, (e) 단계의 경우 (a)와 (b)의 연산 단계의 EX3가 완료된 이후에 EX1이 시작되므로 파이프라인의 정지(stall) 없이 처리되게 된다. 그러나, (f) 단계의 경우 연산 단계의 EX1이 시작되는 시점에서 (c)의 연산 단계의 EX3는 완료되지만 (d)는 연산 단계 중 EX2 만이 완료된 상태가 되므로 (d)의 EX3이 완료될 때까지 한번의 정지(stall)가 발생하게 된다. 마찬가지로, (g)의 처리를 위하여는 (e)와 (f)의 EX3가 완료될 때까지 2번의 파이프라인 정지(stall)가 발생하게 된다. 결국, (e) 내지 (g) 에서 데이터 의존성을 해결하기 위한 데이터 전방전달(Data Forwarding)이 파이프라인 정지(stall)없이 수행될 수 없게 된다. 이러한 데이터 의존성에 의한 파이프라인의 정지는 부동소수점 연산기의 수행 단계가 길어질수록 많이 발생하게 되며, 도 3 과 같은 행렬 곱셈 연산 뿐만 아니라 데이터 로드/스토어(data Load/Store) 등 기하변환의 전과정에 걸쳐 수차례 발생하게 된다.When processing the matrix multiplication operation shown in FIG. 2 through the conventional pipeline structure, the MULV operation of multiplying each column of the 4x4 matrix and each row of the 1x4 matrix is performed independently without any other processing. It is possible to do so without stalling the pipeline. However, (e) adding the result of (a) and the result of (b), (f) adding the result of (c) and the result of (d), and the result of (e) The operation of step (g), which adds the result value of (f), can be processed after each previous step is completed. First, in the case of step (e), since EX1 starts after EX3 of the operation steps (a) and (b) is completed, the process is processed without stall of the pipeline. However, in the case of step (f), when EX1 of the calculation step is started, EX3 of the calculation step of (c) is completed, but (d) becomes the state in which only EX2 is completed during the calculation step. There will be one stall until. Similarly, for the processing of (g), two pipeline stalls occur until EX3 of (e) and (f) is completed. As a result, data forwarding for solving the data dependency in (e) to (g) cannot be performed without pipeline stall. The stopping of the pipeline due to such data dependence occurs as the execution stage of the floating-point operator increases, and not only the matrix multiplication operation as shown in FIG. 3, but also the entire geometric transformation such as data load / store. It occurs several times.

또한, 데이터 의존성에 의한 파이프라인의 정지 현상은 음영(light) 처리 과정에서도 마찬가지로 발생하게 된다. 도 4 는 96 비트 SIMD 구조에서 빛 데이터의 행렬 곱셈 연산 과정을 도시한 도이고, 도 5 는 종래의 파이프라인 구조를 이용하여 도 4 의 행렬 곱셈 연산을 수행하는 모습을 도시한 도이다. 도 5 에 도시한 바와 같이, 하나의 빛 데이터를 로드하여 처리할 경우 전방 전달(forwarding)만으로도 파이프라인의 정지(stall)를 막을 수 없게 되므로, 한번의 사이클(cycle)이 멈추는 상황이 발생하게 된다. 결과적으로, 이와 같이 파이프라인이 자주 정지하게 될 경우 빛 처리 프로세서의 처리 속도가 크게 저하되는 문제점이 있었다.In addition, pipeline stoppages due to data dependence may occur in the light processing process. 4 is a diagram illustrating a matrix multiplication operation of light data in a 96-bit SIMD structure, and FIG. 5 is a diagram illustrating a matrix multiplication operation of FIG. 4 using a conventional pipeline structure. As shown in FIG. 5, when one light data is loaded and processed, the forwarding of the pipeline does not prevent the stall of the pipeline. Therefore, one cycle stops. . As a result, if the pipeline is stopped frequently, there is a problem that the processing speed of the light processing processor is greatly reduced.

본 발명은 상기 종래 기술의 성능 향상을 위하여 창출된 것으로, 본 발명의 목적은 3차원 그래픽의 기하변환 및 음영처리시 파이프라인의 실행 단계를 최소화하고 2개의 정점 데이터에 대한 연산을 중첩하여 병렬로 처리함으로써 파이프라인의 정지(stall) 발생을 현저하게 줄이거나 없앰으로써 처리 성능을 크게 개선할 수 있는 3차원 그래픽 기하변환 파이프라인 구조를 제공하는 것이다.SUMMARY OF THE INVENTION The present invention was created to improve the performance of the prior art, and an object of the present invention is to minimize the execution stage of the pipeline during geometric transformation and shading of three-dimensional graphics, and to overlap the operations on two vertex data in parallel. Processing provides a three-dimensional graphics geometry pipeline structure that can significantly improve processing performance by significantly reducing or eliminating pipeline stalls.

또한, 본 발명의 또 다른 목적은 실행 단계를 최소화하고 2개의 정점 데이터에 대한 연산을 병렬로 처리함으로써 가속화되는 파이프라인 구조가 적용된 기하변환 프로세서 및 상기 2개의 정점 데이터를 처리하기 위하여 상기 기하변환 프로세서에 적용되는 레지스터 파일 구조를 제공하는 것이다.Still another object of the present invention is to provide a geometry conversion processor with a pipeline structure that is accelerated by minimizing execution steps and processing operations on two vertex data in parallel and the geometry conversion processor to process the two vertex data. To provide a register file structure that applies to.

상기 목적을 달성하기 위하여, 본 발명에 따른 3차원 그래픽 기하변환 파이프라인 구조는, 3차원 그래픽을 구성하는 각 정점 데이터에 대하여 공간상의 위치를 변환하는 기하변환(Geometry Transformation) 및 빛에 대한 색을 계산하는 음영처리(lighting)를 포함하는 기하 처리시 부동소수점 연산을 수행하고, 에스아이엠디(SIMD : Single Instruction stream Multiple Data stream) 구조가 적용된 3차원 그래픽 기하변환 파이프라인 구조로서, 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행(EX) 단계를 포함하는 덧셈 연산 파이프라인, 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인, 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인, 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인, 데이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인, 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인, 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인, 그리고 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고, 파이프라인 구조가 2개의 정점 데이터에 대하여 중첩하여 병렬로 기하 처리를 수행하는 것을 특징으로 한다.In order to achieve the above object, the three-dimensional graphics geometric transformation pipeline structure according to the present invention, the geometric transformation (Geometry Transformation) for transforming the position in space with respect to each vertex data constituting the three-dimensional graphics (Color) It is a 3D graphic geometry transformation pipeline structure that performs floating-point calculation and performs a single-instruction stream multiple data stream (SIMD) structure. A multiplication operation pipeline including an addition operation, an execution operation consisting of two steps (EX), a multiplication operation of two input values, and a multiplication operation pipeline including an execution step consisting of two steps, A comparison operation pipeline including size comparison operations, a two-step execution step, loading data from memory, and A load operation pipeline comprising an execution step consisting of a system, a storage operation pipeline including a data execution step consisting of two steps, moving data between registers, and a moving step including an execution step consisting of two steps An inverse square root operation comprising an operation pipeline, an inverse calculation pipeline for an input value, an inverse calculation pipeline comprising four execution steps, and an inverse square root for the input value, an four step execution step It includes a pipeline, the pipeline structure is characterized in that the geometric processing in parallel to the two vertex data overlap.

또한, 상기의 또 다른 목적을 달성하기 위하여, 본 발명에 따른 기하변환 프로세서는, 3차원 그래픽을 구성하는 각 정점 데이터에 대하여 공간상의 위치를 변환하는 기하변환을 수행하고, 기하변환시 부동소수점 연산을 위하여 파이프라인 구조를 사용하며, 에스아이엠디 구조가 적용된 기하변환 프로세서로서, 파이프라인 구조가, 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 덧셈 연산 파이프라인, 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인, 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인, 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인, 데 이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인, 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인, 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인, 그리고 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고, 기하변환 프로세서가 2개의 정점 데이터에 대하여 중첩하여 병렬로 기하변환을 수행하는 것을 특징으로 한다.In addition, in order to achieve the above object, the geometric transformation processor according to the present invention performs a geometric transformation for transforming the position in space for each vertex data constituting the three-dimensional graphics, and performs floating-point operation during geometric transformation A geometry conversion processor using a pipelined structure for which a SMD structure is applied, wherein the pipelined structure includes an add operation pipeline including an execution step consisting of two steps of adding and inputting two input values, and two inputs. A multiplication pipeline comprising multiplying values, a multistage execution step, comparing the magnitudes of the two input values, and a comparison arithmetic pipeline including two steps of execution steps, loading data from memory Load operation pipeline, including two execution steps, and storing data in memory A storage operation pipeline including a two-step execution step, moving data between registers, a moving operation pipeline including a two-step execution step, calculating an inverse of an input value, and consisting of four steps An inverse calculation pipeline including an execution step, and an inverse square root calculation pipeline including an execution step consisting of four steps, the inverse square root of the input value being computed, and the geometric transformation processor overlapping the two vertex data It is characterized by performing a geometric transformation in parallel.

이때, 기하변환 프로세서에 의해 사용되는 레지스터 파일 구조는, 2개의 정점 데이터 중 하나인 제 1 정점 데이터의 기하변환에 사용되는 제 1 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 1 매트릭스 그룹, 2개의 정점 데이터 중 나머지 하나인 제 2 정점 데이터의 기하변환에 사용되는 제 2 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 2 매트릭스 그룹, 모델/뷰 변환을 매트릭스 중 일부를 역전치하여 연산되는 역전치 매트릭스를 저장하고, 9개의 레지스터로 이루어지는 모델/뷰 매트릭스 그룹, 제 1 정점 데이터 및 제 2 정점 데이터를 저장하고, 8개의 레지스터로 이루어지는 정점 그룹, 그리고 제 1 정점 데이터 및 제 2 정점 데이터에 대하여 병렬로 기하변환을 수행하면서 발생하는 중간 연산결과를 임시 저장하고, 24개의 레지스터로 이루어지는 작업 그룹을 포함하는 것을 특징으로 한다.In this case, the register file structure used by the geometry conversion processor stores a first matrix used for the geometric transformation of the first vertex data, which is one of two vertex data, and has a first matrix group consisting of 16 registers. A second matrix group used for the geometric transformation of the second vertex data, which is the other one of the vertex data, and a second matrix group consisting of 16 registers, and an inverted matrix computed by inverting a part of the matrix by model / view transformation And store a model / view matrix group of nine registers, a first vertex data and a second vertex data, a vertex group consisting of eight registers, and parallel to the first and second vertex data. 24 registers are stored temporarily for the results of intermediate operations that occur during geometric conversion. It characterized in that it comprises a work group consisting of.

또한, 상기의 또 다른 목적을 달성하기 위하여, 본 발명에 따른 음영처리 프 로세서는, 3차원 그래픽을 구성하는 각 정점 데이터에 대하여 빛에 대한 색을 계산하는 음영처리를 수행하고, 음영처리시 부동소수점 연산을 위하여 파이프라인 구조를 사용하며, 에스아이엠디 구조가 적용된 음영처리 프로세서로서, 파이프라인 구조가, 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 덧셈 연산 파이프라인, 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인, 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인, 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인, 데이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인, 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인, 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인, 그리고 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고, 음영처리 프로세서가 2개의 정점 데이터에 대하여 중첩하여 병렬로 음영처리를 수행하는 것을 특징으로 한다.In addition, in order to achieve the above object, the shading processor according to the present invention, for each vertex data constituting the three-dimensional graphics to perform a shading process for calculating the color for the light, and floating during the shading process A shading processor using a pipeline structure for a decimal point operation and an SMMD structure, the pipeline structure includes an addition operation pipeline including an add operation of two input values and an execution step consisting of two steps; Multiplying two input values, multiplying a pipeline including an execution step consisting of two steps, comparing the size of the two input values, and comparing the pipeline, including a two-step execution step, and Load operation pipeline, which loads from memory and includes two stages of execution, storing data in memory A storage operation pipeline including a two-step execution step, moving data between registers, a moving operation pipeline including a two-step execution step, calculating the inverse of an input value, and performing a four step execution An inverse arithmetic pipeline comprising steps, and an inverse square root calculation pipeline for an input value, the inverse square arithmetic pipeline including an execution step consisting of four steps, wherein the shading processor overlaps two vertex data It is characterized in that the shading in parallel.

이때, 음영처리 프로세서에 의해 사용되는 레지스터 파일 구조는, 2개의 정점 데이터 중 하나인 제 1 정점 데이터의 음영처리에 사용되는 제 1 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 1 매트릭스 그룹, 2개의 정점 데이터 중 나머지 하나인 제 2 정점 데이터의 음영처리에 사용되는 제 2 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 2 매트릭스 그룹, 모델/뷰 변환을 매트릭스 중 일부를 역전치하여 연산되는 역전치 매트릭스를 저장하고, 9개의 레지스터로 이루어지는 모델/뷰 매트릭스 그룹, 제 1 정점 데이터 및 제 2 정점 데이터를 저장하고, 8개의 레지스터로 이루어지는 정점 그룹, 그리고 제 1 정점 데이터 및 제 2 정점 데이터에 대하여 병렬로 음영처리를 수행하면서 발생하는 중간 연산결과를 임시 저장하고, 24개의 레지스터로 이루어지는 작업 그룹을 포함하는 것을 특징으로 한다.In this case, the register file structure used by the shading processor stores a first matrix used for shading first vertex data, which is one of two vertex data, and includes a first matrix group consisting of 16 registers, A second matrix group used for shading the second vertex data, which is the other one of the vertex data, and a second matrix group consisting of 16 registers, and an inverted matrix calculated by inverting a part of the matrix by model / view transformation And store a model / view matrix group of nine registers, a first vertex data and a second vertex data, a vertex group consisting of eight registers, and parallel to the first and second vertex data. 24 registers are stored temporarily for the results of intermediate operations that occur during shading. It characterized in that it comprises a work group consisting of.

이하에서는, 첨부한 도면을 참조하여 본 발명의 장점, 특징 및 바람직한 실시례에 대해 상세히 설명하도록 한다.Hereinafter, with reference to the accompanying drawings will be described in detail the advantages, features and preferred embodiments of the present invention.

종래 기술에 언급한 바와 같이, 기하변환(Geometry Transformation) 프로세서는 프로세서의 사용 면적과 프로그램 유연성이 중요시되는 내장형 시스템의 3차원 그래픽 가속이 매우 중요하므로, 본 발명에 따른 파이프라인 구조 및 이를 적용하는 기하변환 프로세서는 데이터 패스의 크기가 비교적 작고 제어부가 간단하면서도 3차원 그래픽 데이터의 병렬성을 최대한 이용할 수 있는 SIMD 구조를 적용하도록 한다.As mentioned in the prior art, the 3D graphics acceleration of the embedded system, in which the use area of the processor and the program flexibility are important, is very important. The conversion processor allows the SIMD structure to be applied which can utilize the parallelism of the three-dimensional graphic data while the data path is relatively small and the control is simple.

본 발명에 따른 기하변환 SIMD 형식 명령어는 도 6 에 도시한 바와 같이 기본적으로 4 단계로 이루어진 파이프라인 수행단계를 갖는다. 다만, 역수 연산 명령어 CONV와 역제곱근 연산 명령어 RSQ는 6 단계로 이루어진 파이프라인 수행단계를 갖도록 한다.The geometric SIMD format instruction according to the present invention basically has a pipeline execution step consisting of four steps as shown in FIG. 6. However, the inverse operation instruction CONV and the inverse square operation instruction RSQ have a six stage pipeline execution stage.

도 6 은 본 발명에 따른 기하변환 프로세서의 각 명령어별 파이프라인 구조를 도시한 도이다. 도 6 에 도시한 바와 같이, 곱셈 연산을 수행하는 MULV, 덧셈 연산을 수행하는 ADDV 및 비교 연산을 수행하는 CMPV, 데이터의 로드를 수행하는 LDRV, 데이터의 저장을 위한 STRV 및 데이터의 이동을 수행하는 MOVV는 명령어 해석 단계인 ID 단계, 실행 단계인 2개의 EX 단계(EX1, EX2) 및 연산 결과를 저장하는 WB 단계의 4 단계로 이루어진 파이프라인 구조를 갖는다. 또한, 역수 연산을 수행하는 CONV 및 역제곱근 연산을 수행하는 RSQ는 ID 단계, 4개의 EX 단계(EX1, EX2, EX3, EX4) 및 WB 단계의 6 단계로 이루어진 파이프라인 구조를 갖는다. 이하에서는 각각에 대하여 보다 상세히 설명하도록 한다.6 is a diagram illustrating a pipeline structure for each instruction of the geometric transformation processor according to the present invention. As shown in FIG. 6, a MULV performing a multiplication operation, an ADDV performing an addition operation, a CMPV performing a comparison operation, an LDRV performing a load of data, an STRV for storing data, and a movement of data are performed. The MOVV has a pipeline structure consisting of four stages: an ID stage, which is an instruction interpretation stage, two EX stages (EX1, EX2), which are execution stages, and a WB stage, which stores operation results. In addition, the CONV that performs the inverse operation and the RSQ that performs the inverse square operation have a pipeline structure consisting of six stages: an ID stage, four EX stages (EX1, EX2, EX3, EX4), and a WB stage. Hereinafter, each will be described in more detail.

먼저, 곱셈 연산(MULV), 덧셈 연산(ADDV) 및 비교 연산(CMPV) 등과 같은 부동소수점 연산 명령어는 부동소수점 연산의 긴 지연시간으로 인하여 2개의 EX 단계를 갖는데, 각 EX 단계에서 수행되는 동작을 설명하면 이하와 같다.First, floating point arithmetic instructions such as multiplication (MULV), addition (ADDV), and comparison (CMPV) have two EX stages due to the long delay time of floating point operations. It is as follows when it demonstrates.

먼저, 덧셈 연산(ADDV)과 곱셈 연산(MULV)의 각 EX 단계에서 수행되는 동작은 표 1 과 같다. 표 1 은 덧셈 연산(ADDV)과 곱셈 연산(MULV)의 2개의 EX 단계에서 수행되는 동작을 나타낸 것으로서, 종래의 3개의 EX 단계로 이루어진 파이프라인 구조에서 각 EX 단계에서 수행되는 동작과 비교한 것이다. 표 1 에서 '덧셈'은 덧셈 연산에서 수행되는 동작을 나타내고 '곱셈'은 곱셈 연산에서 수행되는 동작을 나타낸다.First, operations performed in each EX step of the addition operation ADDV and the multiplication operation MULV are shown in Table 1 below. Table 1 shows the operations performed in the two EX stages of the addition operation (ADDV) and the multiplication operation (MULV), and compares them with the operations performed in each EX stage in the pipeline structure of the conventional three EX stages. . In Table 1, 'addition' denotes an operation performed by an addition operation and 'multiplication' denotes an operation performed by a multiplication operation.

종래의 파이프라인 구조Conventional pipeline structure 본 발명에 따른 파이프라인 구조Pipeline structure according to the present invention 단계step 수행동작Performance 단계step 수행동작Performance 1One 지수 처리(덧셈, 곱셈) 가수의 정렬(덧셈) 크기 비교(덧셈) 위치 교환(덧셈) 스티키 생성(덧셈, 곱셈) 가수의 곱셈(곱셈)Exponential processing (addition, multiplication) Mantissa sorting (adding) Size comparison (adding) Position exchange (adding) Sticky generation (addition, multiplication) Singer multiplication (multiplication) 1One 지수 처리(덧셈, 곱셈) 가수의 정렬(덧셈) 크기 비교(덧셈) 위치 교환(덧셈) 스티키 생성(덧셈, 곱셈) 가수의 곱셈(곱셈)Exponential processing (addition, multiplication) Mantissa sorting (adding) Size comparison (adding) Position exchange (adding) Sticky generation (addition, multiplication) Singer multiplication (multiplication) 22 가수의 가감산(덧셈) 선행 '0' 개수 검출(덧셈, 곱셈)Addition / subtraction of adders (addition) Detects leading zeros (addition, multiplication) 2 2 가수의 가감산(덧셈) 선행 '0' 개수 검출(덧셈, 곱셈) 지수 처리(덧셈, 곱셈) 라운딩(덧셈, 곱셈) 정규화(덧셈, 곱셈)Addition and subtraction (addition) of mantissa Detecting the number of leading zeros (addition, multiplication) Exponential processing (addition, multiplication) Rounding (addition, multiplication) Normalization (addition, multiplication) 33 지수 처리(덧셈, 곱셈) 라운딩(덧셈, 곱셈) 정규화(덧셈, 곱셈)Exponential processing (addition, multiplication) rounding (addition, multiplication) normalization (addition, multiplication)

2 단계의 EX 단계를 갖는 본 발명에 따른 파이프라인 구조는 3 단계의 EX 단계를 갖는 종래의 파이프라인 구조와 전체 지연시간에 있어서 차이는 없지만 라운딩 및 정규화 과정을 가수의 가감산 과정 등과 같은 단계에서 처리하게 된다. 이는 종래의 2 단계 및 3 단계를 하나의 단계(2 단계)로 통합하게 되므로 임계 경로에 영향을 주어 연산기의 성능 저하가 발생할 수 있다. 임계 경로란 클럭의 최대 주파수에 영향을 줄 수 있는 지연시간이 가장 긴 데이터 경로를 의미한다. 따라서, 상기 2 단계 및 3 단계의 통합이 임계 경로에 영향을 줌으로 인해 동작 주파수를 더 낮게 설정하여야 한다. 그러나, 일반적으로 부동소수점 곱셈기와 덧셈기의 파이프라인 단계 중에서 여러 동작을 수행하는 1 단계가 2 단계 및 3 단계에 비하여 지연시간이 상대적으로 길고, 라운딩(반올림)과 정규화 과정이 직렬로 형성되는 일반적인 구조와 달리 병렬로 처리할 경우 종래의 2 단계와 3 단계를 통합한 본 발명에 따른 상기 2 단계의 지연시간을 크게 줄일 수 있다. 결국, 본 발명에 따른 2 단계의 EX 단계를 갖는 파이프라인 구조는 임계 경로에 큰 영향을 주지 않게 되므로, 3 단계의 EX 단계를 갖는 종래의 파이프라인 구조에 비하여 지연시간에 대한 성능 저하가 없게 된다.The pipeline structure according to the present invention having the EX stage of two stages has no difference in the overall delay time with the conventional pipeline structure having the three stages of EX stages, but the rounding and normalization process is performed at the same stage as the addition and subtraction process of the mantissa. Will be processed. This is because the conventional two and three steps are integrated into one step (step 2), which may affect the critical path and cause a decrease in the performance of the operator. The critical path is the data path with the longest delay that can affect the maximum frequency of the clock. Therefore, the operation frequency should be set lower because the integration of the second and third stages affects the critical path. However, in general, the first stage performing the various operations among the pipeline stages of the floating-point multiplier and the adder has a relatively long delay compared to the second and third stages, and the general structure in which the rounding and normalization processes are formed in series. Unlike the parallel processing, the delay time of the two stages according to the present invention incorporating the conventional two and three stages can be greatly reduced. As a result, the pipeline structure having the two-stage EX stage according to the present invention does not significantly affect the critical path, so that there is no performance degradation with respect to the delay time as compared to the conventional pipeline structure having the three-stage EX stage. .

표 2 는 라운딩과 정규화 과정의 배타성을 이용하여 상기 두 과정을 병렬로 수행하는 예를 나타낸 것이다.Table 2 shows an example of performing the above two processes in parallel using the exclusivity of the rounding and normalization process.

동작action Yes 가산, d>1 인 감산Addition, subtraction of d> 1 라운딩 (추가 좌우 쉬프트 필요)Rounding (requires additional left and right shifts) 1.xxxxxxxx +/- 0.000xxxxxGRS 1.xxxxxxxxxxxxxx or 1x.xxxxxxxxxxxxxx >> 1 or 0.1xxxxxxxxxxxxx << 11.xxxxxxxx +/- 0.000xxxxxGRS 1.xxxxxxxxxxx xxx or 1x.xxxxxxxxxx xxxx >> 1 or 0.1xxxxxxxxxxx xx << 1 d=1 인 감산 Subtract d = 1 정규화Normalization 1.xxxxxxxx - 0.1xxxxxxxx 0.xxxxxxxxx << 선행 '0' 개수1.xxxxxxxx-0.1xxxxxxxx 0.xxxxxxxxx << Leading '0' Count 라운딩Rounding 1.xxxxxxxx - 0.1xxxxxxxx 1.xxxxxxxxx 1.xxxxxxxx-0.1xxxxxxxx 1.xxxxxxxx x d=0 인 감산Subtraction with d = 0 정규화Normalization 1.xxxxxxxx - 1.xxxxxxxx 0.xxxxxxxxx << 선행 '0' 개수1.xxxxxxxx-1.xxxxxxxx 0.xxxxxxxxx << Leading '0' Count

한편, 비교 연산(CMPV)은 2개의 입력값 A, B의 크기를 비교하는 연산으로서, 'A≥B'일 경우 결과값으로 '1'을 그렇지 않을 경우 결과값으로 '0'을 출력하게 된다. 비교 연산(CMPV)의 EX1 단계에서는 입력값 A와 B의 크기에 대한 비교 결과가 완료되며, EX2 단계에서는 상기 비교 결과를 바이패스(bypass)하게 된다.On the other hand, the comparison operation (CMPV) compares the magnitudes of two input values A and B, and outputs '1' as a result value when 'A≥B' and '0' as a result value. . In the EX1 step of the comparison operation CMPV, a comparison result of the magnitudes of the input values A and B is completed. In the EX2 step, the comparison result is bypassed.

데이터 로드(LDRV) 및 데이터 저장(STRV)와 같은 메모리 전송 명령어 역시 두개의 EX 단계를 갖는데, EX1 단계에서는 메모리의 주소를 계산하고 EX2 단계에서는 메모리와 데이터 교환이 이루어진다. 레지스터 간의 데이터의 이동을 위한 MOVV 명령어는 프로세서의 제어 및 파이프라인 구성의 편의를 위하여 2번의 바이패스(Bypass) 단계(EX 단계)를 갖는다.Memory transfer instructions such as data load (LDRV) and data store (STRV) also have two EX stages, where the EX1 stage calculates the address of the memory and the EX2 stage exchanges data with the memory. The MOVV instruction for moving data between registers has two bypass stages (EX stage) for ease of processor control and pipeline configuration.

또한, 부동소수점 연산 명령어 중 역수 연산(CONV)과 역제곱근 연산(RSQ)은 각기 입력값의 역수 및 역제곱근을 산출하는 명령어로서, 각기 4개의 EX 단계를 갖는다. 역수 연산(CONV)과 역제곱근 연산(RSQ) 명령어의 EX1 내지 EX4 단계는 모두 역수 및 역제곱근을 산출을 위한 단계들로서 각 단계에서는 역수 연산을 위한 독립적인 승산/가산 연산기가 포함되게 된다.In addition, among the floating-point arithmetic instructions, the inverse arithmetic operation (CONV) and the inverse square root operation (RSQ) are instructions for calculating the inverse and inverse square root of input values, respectively, and have four EX steps. The EX1 to EX4 steps of the inverse operation (CONV) and inverse square operation (RSQ) instructions are both steps for calculating the inverse and inverse square root, and each step includes an independent multiplication / addition operator for inverse operation.

기하변환 처리 과정 중 행렬 곱셈 이외에 자주 사용되는 연산으로 정규화 과정이 있는데, 그 처리 방정식은 수학식 1 과 같다.In addition to matrix multiplication, there is a normalization process. The processing equation is represented by Equation 1 below.

Figure 112005033614095-PAT00001
Figure 112005033614095-PAT00001

수학식 1 은 이하와 같은 방법으로 여러 기본 연산들을 조합하여 본 발명에 따른 기하변환 프로세서에서 동작이 가능하게 된다. 이때 S 는 벡터를 나타낸다.Equation 1 can be operated in the geometry conversion processor according to the present invention by combining several basic operations in the following manner. Where S represents a vector.

(1) S 로드(1) S rod

(2) S' = S × S(2) S '= S × S

(3) A = S'(x) + S'(y)(3) A = S '(x) + S' (y)

(4) B = A + S'(Z)(4) B = A + S '(Z)

(5) C = RSQ(B)(5) C = RSQ (B)

(6) S'' = S × C(6) S '' = S × C

상기 정규화식을 본 발명에 따른 파이프라인 구조로 처리하는 과정은 도 7 에 도시되어 있다. 도 7 은 본 발명에 따른 파이프라인 구조를 이용하여 정규화식을 처리하는 모습을 도시한 도이다. 이때, 상기 S'(x), S'(y), S'(z)는 S' 벡터의 각 구성 요소인 32-bit 입력값을 나타낸다. 도 7 에 도시한 바와 같이, 본 발명에 따른 파이프라인 구조로 하나의 정점 데이터에 대하여 상기 정규화식을 처리할 경우 전단계 처리가 완료되지 않음으로 인하여 각 단계마다 파이프라인의 정지(stall)가 발생하게 된다. 구체적으로, 각 단계가 전단계에서 처리된 값을 입력값으로 하게 되므로 (2) 내지 (5) 단계의 수행에 앞서 파이프라인의 정지(stall)이 발생하게 된다. 특히, (5) 단계의 역제곱근 연산(RSQ)의 경우 6 단계의 파이프라인 구조로 이루어지고 EX 단계 또한 4 단계로 이루어지므로, (6) 단계는 (5) 단계의 EX4 단계가 완료될 때까지 3번의 파이프라인 정지(stall)이 발생한 후에 수행되게 된다. 따라서, 빈번한 파이프라인의 정지로 인하여 지연시간이 길어져 프로세서의 처리성능이 크게 저하되게 된다.The process of processing the regular expression into the pipeline structure according to the present invention is shown in FIG. 7 is a diagram illustrating a normalized expression process using a pipeline structure according to the present invention. In this case, S '(x), S' (y), and S '(z) represent 32-bit input values that are components of the S' vector. As shown in FIG. 7, when the normalization expression is processed for one vertex data in the pipeline structure according to the present invention, the stall of the pipeline occurs at each step because the previous step is not completed. do. Specifically, since each step has a value processed in the previous step as an input value, a stall of the pipeline occurs before performing steps (2) to (5). In particular, since the inverse square root operation (RSQ) of step (5) consists of a pipeline structure of six steps and the EX step also consists of four steps, the step (6) is performed until the step EX4 of step (5) is completed. It will be executed after three pipeline stalls. Therefore, the delay time increases due to frequent pipeline stoppages, which greatly reduces the processing performance of the processor.

따라서, 본 발명에 따른 파이프라인 구조는 정규화 처리시 파이프라인의 정지를 최대한 줄여 프로세서의 처리성능을 향상시키기 위하여 2개의 정점 데이터에 대한 정규화 처리를 병렬로 수행하도록 한다. 이때, 정점 데이터는 포인트, 에지의 종점, 또는 2개의 에지가 만나는 다각형의 모서리 등을 나타내며, 각 정점 데이터는 기하변환 파이프라인의 임의 단계에서 사용되는 모든 가능한 데이터의 프래그먼트(fragment)를 포함한다. 프래그먼트는, 예를 들어 위치 좌표, 색채,노말(normal) 및 텍스쳐 좌표와 같은 데이터이다. 즉, 정점 데이터는 이하의 위치 데이터 및 빛 데이터를 포함한다.Accordingly, the pipeline structure according to the present invention allows the normalization processing of two vertex data to be performed in parallel in order to minimize the stopping of the pipeline during the normalization processing and to improve the processing performance of the processor. In this case, the vertex data represents a point, an end point of an edge, or an edge of a polygon where two edges meet each other, and each vertex data includes a fragment of all possible data used at any stage of the geometric transformation pipeline. Fragments are for example data such as position coordinates, color, normal and texture coordinates. That is, the vertex data includes the following position data and light data.

도 8 은 본 발명에 따른 파이프라인 구조를 이용하여 2개의 정점 데이터에 대한 정규화식을 처리하는 모습을 도시한 도이다. 도 8 에서 흰색으로 표시된 부분은 제 1 정점 데이터에 대한 정규화 처리((1) 내지 (7) 단계)를 나타내고, 회색으로 음영 처리된 부분은 제 2 정점 데이터에 대한 정규화 처리((i) 내지 (vii) 단계)를 나타낸다. 도 8 에 도시한 바와 같이, 본 발명에 따른 파이프라인 구조는 2개의 정점 데이터에 대하여 정규화 처리 각 단계의 명령어를 교차적으로 수행함으로써 파이프라인의 정지(stall)를 크게 줄일 수 있게 된다. 구체적으로, 도 7 에서 파이프라인의 정지가 발생하는 시점에 다른 정점 데이터에 대한 명령어가 수행되게 되므로 제 1 정점 데이터의 (5) 단계, 그리고 제 2 정점 데이터의 (v) 단계 어전에는 파이프라인의 정지가 발생하지 않게 된다. 또한, 역제곱근 연산(RSQ)가 4 단계의 EX 단계를 갖는 6 단계 파이프라인으로 처리되지만, 파이프라인의 정지 시점에서 다른 정점 데이터의 명령어가 수행되므로 파이프라인의 정지를 2개로 줄일 수 있게 된다. 따라서, 2개의 정점 데이터에 대한 정규화처리를 하는 전과정 동안 파이프라인의 정지가 2개만이 발생하게 되므로 지연시간을 크게 줄여 프로세서의 처리성능을 크게 향상시킬 수 있게 된다. 한편, 파이프라인의 정지를 더욱 줄이기 위하여 보다 많은 정점 데이터를 병렬로 처리할 수도 있음은 물론이다.8 is a diagram illustrating a process of normalizing two vertex data using a pipeline structure according to the present invention. In FIG. 8, the portions marked in white represent normalization processes (steps (1) to (7)) for the first vertex data, and the shaded portions in gray represent normalization processes for the second vertex data ((i) to ( vii) step). As shown in FIG. 8, the pipeline structure according to the present invention can significantly reduce the stall of the pipeline by performing alternately the instructions of each step of the normalization process on the two vertex data. Specifically, in FIG. 7, since the instruction for the other vertex data is executed at the time when the pipeline stops, the step (5) of the first vertex data and the step (v) of the second vertex data are performed. The stop does not occur. In addition, although the inverse square root operation (RSQ) is processed as a six-stage pipeline having four stages of EX stages, the stop of the pipeline can be reduced to two since instructions of other vertex data are executed at the time of stopping the pipeline. Therefore, since only two pipeline stops occur during the normalization process of two vertex data, the processing time of the processor can be greatly improved by reducing the delay time. On the other hand, more vertex data can be processed in parallel to further reduce the stall of the pipeline.

본 발명에 따른 기하변환 프로세서는 상기와 같은 정규화 처리 이외에도, 기하변환 처리시 가장 주요하게 사용되는 행렬 곱셈 연산에서 파이프라인 해저드로 인한 성능 저하를 줄이기 위하여 도 6 과 같은 파이프라인 구조를 적용하게 된다. 이 경우 곱셈 연산(MULV)과 덧셈 연산(ADDV)이 각기 2개의 실행 단계(EX1, EX2)를 갖게 되므로 3개의 실행 단계를 갖는 종래의 파이프라인 구조에 의해 행렬 곱셈 연산을 하는 경우에 비하여 파이프라인의 정지(stall)를 줄일 수 있게 된다. 또한, 본 발명에 따른 파이프라인 구조는 정규화 처리와 같이 2개의 정점 데이터(위치 데이터)에 대한 행렬 곱셈 연산을 중첩하여 병렬로 처리함으로써 파이프라인의 정지를 크게 줄이거나 없앨 수 있게 된다. 본 발명에 따른 파이프라인 구조에 의한 위치 데이터의 연산 과정은 도 9 및 도 10 을 참조하여 설명하도록 한다.In addition to the normalization process as described above, the geometry conversion processor according to the present invention applies the pipeline structure as shown in FIG. 6 in order to reduce performance degradation due to pipeline hazards in matrix multiplication operations which are most used in the geometry transformation process. In this case, the multiplication operation (MULV) and the addition operation (ADDV) each have two execution steps (EX1, EX2), so that the pipeline multiplication operation is performed by the conventional pipeline structure having three execution steps. It is possible to reduce stalls. In addition, the pipeline structure according to the present invention can greatly reduce or eliminate the stoppage of the pipeline by superimposing a matrix multiplication operation on two vertex data (position data) like a normalization process in parallel. The calculation process of the position data by the pipeline structure according to the present invention will be described with reference to FIGS. 9 and 10.

도 9 는 2개의 위치 데이터에 대한 행렬 곱셈 연산 과정을 도시한 도이다. 도 9 에 도시한 바와 같이, 본 발명에 따른 파이프라인 구조는 2개의 위치 데이터 (X1, Y1, Z1, W1) 및 (X2, Y2, Z2, W2)에 대한 행렬 곱셈 연산을 중첩하여 처리하게 되며, 이 경우 각 위치 데이터에 대하여 (1) 내지 (7) 단계, 그리고 (i) 내지 (vii) 단계의 7 단계로 각기 병렬로 연산이 이루어지게 된다.9 is a diagram illustrating a matrix multiplication operation process for two position data. As shown in FIG. 9, the pipeline structure according to the present invention superimposes a matrix multiplication operation on two position data (X1, Y1, Z1, W1) and (X2, Y2, Z2, W2). In this case, the calculation is performed in parallel with the seven steps of steps (1) to (7) and (i) to (vii) for each position data.

도 10 은 본 발명에 따른 파이프라인 구조를 이용하여 2개의 위치 데이터에 대하여 병렬로 행렬 곱셈 연산을 수행하는 모습을 도시한 도이다. 도 10 에 도시한 바와 같이, 먼저 위치 데이터 1(X1, Y1, Z1, W1)에 대한 (1) 내지 (6) 단계의 연산이 수행되게 된다. 이때, (5) 단계 및 (6) 단계는 각기 (1) 단계 및 (2) 단계, 그리고 (3) 단계 및 (4) 단계의 MULV 연산이 완료된 이후에 수행될 수 있는데, (5) 단계 및 (6) 단계의 실행 단계(EX1) 이전에 전 단계의 실행 단계(EX2)가 완료되므로 파이프라인의 정지(stall) 없이 연산이 진행되게 된다. 한편, (7) 단계는 (5) 단계와 (6) 단계의 실행 단계가 완료된 이후에 실행될 수 있는데, (6) 단계의 EX2 단계가 완료되지 않은 상태이므로 한번의 파이프라인 정지(stall)가 발생하게 된다. 따라서, 본 발명에 따른 파이프라인 구조는 (6) 단계 이후에 위치 데이터 2(X2, Y2, Z2, W2)에 대한 연산을 수행하게 된다. 위치 데이터 2에 대한 연산 역시 위치 데이터 1에 대한 연산과 마찬가지로 (i) 내지 (vi) 단계까지 파이프라인의 정지(stall) 없이 수행되게 된다. 하지만, (vii) 단계의 수행 시점에서 (vi) 단계의 EX2 단계가 완료되지 않은 상태이므로, 파이프라인의 정지(stall)이 발생하는 것을 방지하기 위하여 위치 데이터 1의 나머지 (7) 단계를 수행하게 된다. (7) 단계가 수행된 이후에는 위치 데이터 2에 대한 (vii) 단계를 수행하도록 한다.10 is a diagram illustrating a matrix multiplication operation performed on two position data in parallel using a pipeline structure according to the present invention. As shown in Fig. 10, first, operations in steps (1) to (6) are performed on the position data 1 (X1, Y1, Z1, W1). In this case, steps (5) and (6) may be performed after the MULV operation of steps (1) and (2), and (3) and (4) is completed, respectively, (5) and Since the execution step EX2 of the previous step is completed before the execution step EX1 of the step (6), the operation proceeds without stall of the pipeline. On the other hand, step (7) may be executed after the execution steps of steps (5) and (6) have been completed, and once the EX2 step of (6) is not completed, a pipeline stall occurs. Done. Therefore, the pipeline structure according to the present invention performs the operation on the position data 2 (X2, Y2, Z2, W2) after step (6). Similarly to the operation for the position data 1, the operation for the position data 2 is performed without the stall of the pipeline from the steps (i) to the (vi). However, since the step EX2 of step (vi) is not completed at the time of performing step (vii), perform step (7) of the remaining position data 1 to prevent the stall of the pipeline from occurring. do. After step (7) is performed, step (vii) for position data 2 is performed.

따라서, 본 발명에 따른 기하변환 프로세서는 곱셈 및 덧셈 연산을 위한 파이프라인 구조로 2 단계의 실행 단계를 갖는 4 단계 파이프라인을 설계 및 적용할 뿐만 아니라, 모델 데이터의 2개의 정점에 대한 연산을 중첩적으로 처리함으로써 데이터 의존성으로 인한 파이프라인 정지를 제거할 수 있게 된다. 따라서, 본 발명에 따른 기하변환 프로세서는 기하변환의 전과정에서 2개의 정점 데이터를 중첩 하여 처리함으로써 파이프라인 정지가 전혀 발생하지 않게 된다.Therefore, the geometric transformation processor according to the present invention not only designs and applies a four-stage pipeline with two stages of execution as a pipeline structure for multiplication and addition operations, but also superimposes operations on two vertices of model data. By doing so, you can eliminate pipeline stalls caused by data dependencies. Therefore, the geometric transformation processor according to the present invention overlaps and processes two vertex data in the entire process of the geometric transformation so that no pipeline stop occurs.

한편, 도 10 과 같이 위치 데이터 1의 연산 중 파이프라인의 정지(stall)가 발생하는 단계에서 위치 데이터 2의 연산을 중첩하여 수행하는 대신에, 위치 데이터 1과 위치 데이터 2의 각 연산 단계를 교차적으로 수행할 수도 있음은 물론이다. 즉, (1) 단계 --> (i) 단계 --> (2) 단계 --> (ii) 단계 ... 와 같은 순서로 2개의 위치 데이터에 대한 연산을 수행할 수도 있다.On the other hand, instead of overlapping the calculation of the position data 2 in the stage where the pipeline stall occurs during the operation of the position data 1 as shown in FIG. 10, the respective operation steps of the position data 1 and the position data 2 are crossed. Of course it can also be done. That is, the operation on the two position data may be performed in the order of (1)-> (i)-> (2)-> (ii).

본 발명에 따른 파이프라인 구조는 상기와 같이 기하변환 프로세서 뿐만 아니라 색 계산(음영처리)을 수행하는 음영처리 프로세서에 적용할 수도 있음은 물론이다. 본 발명에 따른 파이프라인 구조를 음영처리 프로세서에 적용할 경우 색 계산시 발생하는 데이터 의존성으로 인한 파이프라인의 정지(stall)를 없앨 수 있게 된다. 본 발명에 따른 파이프라인 구조에 의한 빛 데이터의 연산 과정은 도 11 및 도 12 를 참조하여 설명하도록 한다.The pipeline structure according to the present invention can be applied not only to the geometric conversion processor but also to the shading processor that performs color calculation (shading) as described above. When the pipeline structure according to the present invention is applied to the shading processor, it is possible to eliminate the stall of the pipeline due to the data dependency that occurs during the color calculation. The operation of calculating light data by the pipeline structure according to the present invention will be described with reference to FIGS. 11 and 12.

도 11 은 2개의 빛 데이터에 대한 행렬 곱셈 연산 과정을 도시한 도이다. 도 11 에 도시한 바와 같이, 빛 데이터 1(X1, Y1, Z1)과 빛 데이터 2(X2, Y2, Z2)에 대한 연산 과정은 각기 (1) 내지 (5), 그리고 (i) 내지 (v)의 5 단계로 수행되게 된다.11 is a diagram illustrating a matrix multiplication operation process for two light data. As shown in FIG. 11, the calculation process for the light data 1 (X1, Y1, Z1) and the light data 2 (X2, Y2, Z2) is performed by (1) to (5), and (i) to (v), respectively. Will be performed in 5 steps.

도 12 는 본 발명에 따른 파이프라인 구조를 이용하여 2개의 빛 데이터에 대하여 병렬로 행렬 곱셈 연산을 수행하는 모습을 도시한 도이다. 도 12 에 도시한 바와 같이, 본 발명에 따른 파이프라인 구조는 먼저 빛 데이터 1에 대한 연산 중 (1) 내지 (4) 단계를 수행하게 된다. 이때, (4) 단계는 (3) 단계의 완료 여부에 상관없이 (1) 단계 및 (2) 단계만 완료되면 수행이 가능하므로 파이프라인의 정지(stall) 없이 수행되게 된다. 한편, (5) 단계는 (3) 단계와 (4) 단계가 완료된 이후에 수행 가능하므로, 본 발명에 따른 파이프라인 구조는 파이프라인의 정지를 방지하기 위하여 빛 데이터 2에 대한 (i) 내지 (iv) 단계 연산을 수행하게 된다. 마찬가지로, 빛 데이터 2의 (v) 단계 연산 역시 (iii) 단계와 (iv) 단계가 완료된 후에 수행 가능하므로, 빛 데이터1 에대한 (5) 단계 연산을 수행한 후 빛 데이터 2에 대한 (v) 단계 연산을 수행하게 된다.FIG. 12 is a diagram illustrating a matrix multiplication operation performed on two light data in parallel using a pipeline structure according to the present invention. As shown in FIG. 12, the pipeline structure according to the present invention first performs steps (1) to (4) during operation on light data 1. At this time, step (4) can be performed without completing the pipeline (stall) because only step (1) and step (2) can be performed regardless of whether step (3) is completed. On the other hand, since step (5) can be performed after steps (3) and (4) are completed, the pipeline structure according to the present invention can be used for (i) to ( iv) perform a step operation. Similarly, step (v) of light data 2 can also be performed after steps (iii) and (iv) are completed, so that step (v) for light data 2 is performed after step (5) Perform a step operation.

따라서, 빛 데이터에 대한 연산 역시 빛 데이터를 2개씩 로드하여 빛 수식을 처리함으로써 전방전달을 통해 파이프라인의 정지 없이 빛 계산을 수행할 수 있게 된다. 따라서, 사이클의 낭비없이 빛 처리를 수행하여 음영 처리 프로세서의 처리 속도를 향상시킬 수 있게 된다.Therefore, the calculation of the light data can also be performed by loading the light data two by one to process the light equation to perform the light calculation without stopping the pipeline through the forward transmission. Thus, light processing can be performed without wasting cycles, thereby improving the processing speed of the shading processor.

빛 데이터 역시 상기 위치 데이터와 마찬기자로 도 12 와 같이 빛 데이터 1의 연산 중 파이프라인의 정지(stall)가 발생하는 단계에서 빛 데이터 2의 연산을 중첩하여 수행하지 않고, 빛 데이터 1과 빛 데이터 2의 각 연산 단계를 교차적으로 수행할 수도 있다.Like the position data, the light data does not overlap with the calculation of the light data 2 at the stage of the stall of the pipeline during the operation of the light data 1 as shown in FIG. Each operation step of 2 may be performed alternately.

한편, 2개의 정점 데이터를 중첩하여 파이프라인 수행을 위해서는 기하변환 프로세서의 레지스터 파일이 이에 적합한 구조로 구성되어야 한다. 기하변환 프로세서는 총 73개의 32 비트 레지스터로 구성되며, 이를 그룹화함으로써 효율적으 로 접근할 수 있는 레지스터 파일 구조를 가지게 된다. 이때, 32 비트는 하나의 레지스터의 크기를 나타내는 것으로서 파일 구조에 따라 그 크기가 달라질 수도 있음은 물론이다. 따라서, 정점 데이터를 하나씩 처리할 때에 비하여 더 많은 레지스터가 필요하게 되지만, 파이프라인이 멈추지 않고 처리할 수 있도록 지원하게 되므로, 결과적으로 기하변환 과정의 처리 속도를 향상시키게 된다. 도 13 은 본 발명에 따른 기하변환 프로세서의 레지스터 파일 구조를 도시한 블록도이고, 각 레지스터 파일 그룹에 저장되는 데이터는 표 3 에 나타내었다.Meanwhile, in order to perform pipeline pipeline by overlapping two vertex data, a register file of a geometry conversion processor should be configured with a structure suitable for this. The geometry conversion processor consists of a total of 73 32-bit registers, grouping them together to have a register file structure that can be accessed efficiently. At this time, 32 bits indicates the size of one register, and the size may vary depending on the file structure. Therefore, although more registers are needed than when processing the vertex data one by one, the pipeline can be processed without stopping, resulting in an increase in the speed of the geometric transformation process. FIG. 13 is a block diagram illustrating a register file structure of a geometry conversion processor according to the present invention, and data stored in each register file group is shown in Table 3. FIG.

레지스터 그룹Register group 저장 데이터Save data 매트릭스 그룹1(Matrix Group, MG1)Matrix Group 1 (MG1) 4×4 모델/뷰 매트릭스4 × 4 model / view matrix 매트릭스 그룹2(Matrix Group, MG2)Matrix Group (MG2) 4×4 프로젝션 매트릭스4 × 4 projection matrix 모델/뷰(Model/View) M[3×3]-T(NMG)Model / View M [3 × 3] -T (NMG) 3×3 노멀 벡터(Normal Vector) 매트릭스3 × 3 Normal Vector Matrix 작업 그룹(Working Group, WG)Working Group (WG) 임시 데이터(Temporary Data)Temporary Data 정점 그룹(Vertex Group, VG)Vertex Group (VG) 2개의 정점 데이터(Vertex Data)2 Vertex Data

도 13 및 표 3 에 나타난 바와 같이, 기하변환 단계에서 매트릭스가 4×4 구조로 이루어지므로 각 매트릭스 그룹(MG1, MG2)은 각기 4×4 행렬을 저장할 수 있는 크기인 16개의 레지스터(16×32 비트)로 이루어지게 된다. 모델/뷰 변환을 위한 매트릭스에서 그 일부인 3×3 부분을 역전치하여 연산된 매트릭스가 NMG이므로, NMG의 크기 또한 3×3, 즉 9개의 레지스터(9×32 비트)로 구성된다. 또한, 정점 그룹(VG)는 2개의 정점 데이터(vertex)를 저장하게 되는데, 하나의 정점 데이터가 4개의 변수값(x, y, z, w)으로 이루어지므로 전체 8개의 레지스터(8×32 비트)로 구성된다.As shown in FIG. 13 and Table 3, in the geometric transformation step, since the matrix has a 4 × 4 structure, each matrix group MG1 and MG2 has 16 registers (16 × 32) each of which can store a 4 × 4 matrix. Bit). Since the matrix calculated by inverting the 3x3 portion of the matrix for model / view conversion is NMG, the size of the NMG is also 3x3, that is, 9 registers (9x32 bits). In addition, the vertex group VG stores two vertex data. Since one vertex data is composed of four variable values (x, y, z, and w), eight registers (8x32 bits) are used. It consists of

또한, 작업 그룹의 경우 2개의 정점 데이터에 대한 행렬 곱셈 연산의 각 단계마다의 연산 결과를 임시 저장하게 되는데, 도 10 과 같은 파이프라인 구조에서 임시 저장하여야 할 값이 최대일 때 24개가 된다. 보다 구체적으로, 도 10 에서 (1) 내지 (4) 단계까지는 각기 별개의 곱셈 연산이 수행되므로 각 단계마다 4개씩 임시 저장 데이터가 발생하여 (4) 단계까지 16개의 레지스터를 사용하게 된다. 한편, (5) 단계의 덧셈 연산은 (1) 단계와 (2) 단계의 연산 결과를 덧셈하게 되므로 (5) 단계가 완료되면 (1) 단계와 (2) 단계의 연산 결과는 저장할 필요가 없으므로 사용하는 12개의 레지스터를 사용하게 된다. 마찬가지로 (6) 단계가 완료되는 시점에서는 8개의 레지스터만을 사용하게 된다. 한편, 이후 수행되는 (i) 단계 내지 (iv) 단계는 (6) 단계와 무관하게 병렬로 수행되는 단계이므로, (iv) 단계가 완료될 때 사용하는 레지스터는 24개(8+16)가 된다. 또한, 덧셈 연산을 수행하는 (v) 단계 및 (vi) 단계에서는 각기 20개와 16개의 레지스터를 사용하게 된다. 그리고, 위치 데이터 1에 대한 덧셈 연산인 위치 데이터 2에 대한 덧셈 연산인 (7) 단계와 (vii) 단계에서는 각기 12개와 8개의 레지스터를 사용하게 된다. 따라서, 2개의 위치 데이터에 대한 전체 연산 과정 중에서 최대로 사용되는 레지스터의 수는 24개가 되므로 작업 그룹의 크기 역시 24개의 연산 결과를 저장할 수 있는 24개의 레지스터(24×32 비트)로 이루어지도록 한다.In addition, in the case of the workgroup, the result of each step of the matrix multiplication operation for the two vertex data is temporarily stored. In the pipeline structure as shown in FIG. More specifically, since the multiplication operation is performed in each of steps (1) to (4) in FIG. 10, four temporary stored data are generated in each step, and 16 registers are used up to step (4). On the other hand, since the addition operation of step (5) adds the operation results of step (1) and (2), the operation results of step (1) and (2) need not be stored when step (5) is completed. 12 registers are used. Similarly, when step (6) is completed, only eight registers are used. On the other hand, since steps (i) to (iv) are performed in parallel regardless of step (6), 24 (8 + 16) registers are used when step (iv) is completed. . In addition, in steps (v) and (vi), which perform an addition operation, 20 and 16 registers are used, respectively. In addition, in steps (7) and (vii), which are addition operations on position data 2, which are addition operations on position data 1, 12 and 8 registers are used, respectively. Therefore, the maximum number of registers used in the entire operation process for the two position data is 24, so the size of the workgroup is also made up of 24 registers (24 x 32 bits) that can store 24 calculation results.

한편, 색 계산을 수행하는 음영처리 프로세서의 경우 사용되는 매트릭스의 크기(3×3)와 정점 데이터(빛 데이터, (x, y, z))가 위치 데이터에 비하여 작으므로 상기 도 13 및 표 3 에서 제시한 레지스터 파일 구조를 공통적으로 사용하도록 한다.On the other hand, in the case of a shading processor that performs color calculation, since the size of the matrix (3 × 3) and the vertex data (light data ((x, y, z))) used are smaller than the position data, FIGS. 13 and 3 Make common use of the register file structure presented in.

이상 설명한 바대로, 본 발명에 따른 3차원 그래픽 기하변환 파이프라인 구조, 기하변환 프로세서 및 레지스터 파일 구조는 기하변환 및 음영처리를 위한 각 파이프라인에 최소한의 실행 단계를 포함할 뿐만 아니라 2개의 정점 데이터를 중첩하여 병렬로 연산하므로, 정점 데이터의 연산시 데이터의 의존성에 의하여 발생하는 파이프라인의 정지(stall) 및 이로 인한 처리시간 지연을 줄일 수 있는 현저한 효과가 있다.As described above, the three-dimensional graphics geometry pipeline structure, geometry processor, and register file structure in accordance with the present invention not only include minimal execution steps in each pipeline for geometry and shading, but also two vertex data. Since the operations are overlapped and computed in parallel, there is a remarkable effect of reducing the stall of the pipeline and the processing time delay caused by the dependency of the data when computing the vertex data.

또한, 2개의 정점 데이터를 병렬로 계산하는데 적합한 레지스터 파일 구조를 적용하므로 효과적인 정점 데이터의 기하변환 및 음영처리가 가능하게 된다. 따라서, 휴대특성을 갖는 내장형 SoC(System on Chip) 설계시 종래의 3차원 그래픽 기하 처리 프로세서를 사용하는 것에 비하여 매우 빠른 처리시간을 제공할 수 있게 된다.In addition, by applying a register file structure suitable for calculating two vertex data in parallel, it is possible to effectively transform and shade the vertex data. Therefore, when designing an embedded SoC (Portable System on Chip) having portable characteristics, it is possible to provide a very fast processing time compared to using a conventional 3D graphics processing processor.

본 발명의 바람직한 실시례가 특정 용어들을 사용하여 기술되어 왔지만, 그러한 기술은 오로지 설명을 하기 위한 것이며, 다음의 청구범위의 기술적 사상 및 범위로부터 이탈되지 않고서 여러 가지 변경 및 변화가 가해질 수 있는 것으로 이해되어져야 한다.While the preferred embodiments of the present invention have been described using specific terms, such descriptions are for illustrative purposes only, and it is understood that various changes and modifications may be made without departing from the spirit and scope of the following claims. Should be done.

Claims (5)

3차원 그래픽을 구성하는 각 정점 데이터에 대하여 공간상의 위치를 변환하는 기하변환(Geometry Transformation) 및 빛에 대한 색을 계산하는 음영처리(lighting)를 포함하는 기하 처리시 부동소수점 연산을 수행하고, 에스아이엠디(SIMD : Single Instruction stream Multiple Data stream) 구조가 적용된 3차원 그래픽 기하변환 파이프라인 구조로서,For each vertex data constituting 3D graphics, floating point operations are performed during geometry processing, including geometry transformation for transforming spatial positions and lighting for calculating color for light. A three-dimensional graphic geometric transformation pipeline structure with a single instruction stream multiple data stream (SIMD) structure. 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행(EX) 단계를 포함하는 덧셈 연산 파이프라인;An add operation pipeline including an add operation of two input values and including an execution step consisting of two steps; 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인;A multiplication operation pipeline multiplying two input values and including an execution step consisting of two steps; 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인;A comparison operation pipeline which compares the magnitudes of the two input values and includes an execution step consisting of two steps; 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인;A load operation pipeline that loads data from memory and includes an execution step consisting of two steps; 데이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인;A storage operation pipeline that stores data in memory and includes an execution step consisting of two steps; 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인;A move operation pipeline for moving data between registers and including an execution step consisting of two steps; 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인; 및A reciprocal calculation pipeline that calculates the reciprocal of the input value and includes an execution step of four steps; And 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고,Calculate an inverse square root of the input, and include an inverse square root pipeline that includes four execution steps, 상기 파이프라인 구조가 2개의 상기 정점 데이터에 대하여 중첩하여 병렬로 상기 기하 처리를 수행하는 것을 특징으로 하는 3차원 그래픽 기하변환 파이프라인 구조.And the pipeline structure overlaps the two vertex data to perform the geometry processing in parallel. 3차원 그래픽을 구성하는 각 정점 데이터에 대하여 공간상의 위치를 변환하는 기하변환(Geometry Transformation)을 수행하고, 상기 기하변환시 부동소수점 연산을 위하여 파이프라인 구조를 사용하며, 에스아이엠디(SIMD : Single Instruction stream Multiple Data stream) 구조가 적용된 기하변환 프로세서로서,Perform geometric transformation to transform the position in space for each vertex data constituting the 3D graphic, use a pipeline structure for floating point calculation during the geometric transformation, and use Single Instruction (SIMD) geometry conversion processor with stream multiple data stream) 상기 파이프라인 구조가,The pipeline structure, 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행(EX) 단계를 포함하는 덧셈 연산 파이프라인;An add operation pipeline including an add operation of two input values and including an execution step consisting of two steps; 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인;A multiplication operation pipeline multiplying two input values and including an execution step consisting of two steps; 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인;A comparison operation pipeline which compares the magnitudes of the two input values and includes an execution step consisting of two steps; 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인;A load operation pipeline that loads data from memory and includes an execution step consisting of two steps; 데이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인;A storage operation pipeline that stores data in memory and includes an execution step consisting of two steps; 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인;A move operation pipeline for moving data between registers and including an execution step consisting of two steps; 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인; 및A reciprocal calculation pipeline that calculates the reciprocal of the input value and includes an execution step of four steps; And 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고,Calculate an inverse square root of the input, and include an inverse square root pipeline that includes four execution steps, 상기 기하변환 프로세서가 2개의 상기 정점 데이터에 대하여 중첩하여 병렬로 상기 기하변환을 수행하는 것을 특징으로 하는 기하변환 프로세서.And the geometric transformation processor overlaps the two vertex data to perform the geometric transformation in parallel. 제 2 항의 상기 기하변환 프로세서에 의해 사용되는 레지스터 파일 구조로서,A register file structure used by the geometry conversion processor of claim 2, 상기 2개의 정점 데이터 중 하나인 제 1 정점 데이터의 기하변환에 사용되는 제 1 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 1 매트릭스 그룹;A first matrix group for storing a first matrix used for geometric transformation of first vertex data, which is one of the two vertex data, and having 16 registers; 상기 2개의 정점 데이터 중 나머지 하나인 제 2 정점 데이터의 기하변환에 사용되는 제 2 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 2 매트릭스 그룹;A second matrix group for storing a second matrix used for geometric transformation of second vertex data, which is the other one of the two vertex data, and having 16 registers; 모델/뷰 변환을 매트릭스 중 일부를 역전치하여 연산되는 역전치 매트릭스를 저장하고, 9개의 레지스터로 이루어지는 모델/뷰 매트릭스 그룹;A model / view matrix group comprising nine registers for storing an inverted matrix that is calculated by inverting a portion of the matrix for model / view transformation; 상기 제 1 정점 데이터 및 상기 제 2 정점 데이터를 저장하고, 8개의 레지스터로 이루어지는 정점 그룹; 및A vertex group that stores the first vertex data and the second vertex data, and includes eight registers; And 상기 제 1 정점 데이터 및 상기 제 2 정점 데이터에 대하여 병렬로 상기 기하변환을 수행하면서 발생하는 중간 연산결과를 임시 저장하고, 24개의 레지스터로 이루어지는 작업 그룹을 포함하는 것을 특징으로 하는 레지스터 파일 구조.And a working group consisting of 24 registers for temporarily storing intermediate operation results generated while performing the geometric transformation in parallel on the first vertex data and the second vertex data. 3차원 그래픽을 구성하는 각 정점 데이터에 대하여 빛에 대한 색을 계산하는 음영처리(lighting)를 수행하고, 상기 음영처리시 부동소수점 연산을 위하여 파이프라인 구조를 사용하며, 에스아이엠디(SIMD : Single Instruction stream Multiple Data stream) 구조가 적용된 음영처리 프로세서로서,For each vertex data constituting the three-dimensional graphics, the lighting is performed to calculate the color of the light, and the pipelined structure is used to calculate the floating point during the shading. Shading processor with Instruction stream Multiple Data stream) 상기 파이프라인 구조가,The pipeline structure, 2개의 입력값을 덧셈 연산하고, 2 단계로 이루어진 실행(EX) 단계를 포함하는 덧셈 연산 파이프라인;An add operation pipeline including an add operation of two input values and including an execution step consisting of two steps; 2개의 입력값을 곱셈 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 곱셈 연산 파이프라인;A multiplication operation pipeline multiplying two input values and including an execution step consisting of two steps; 2개의 입력값의 크기를 비교 연산하고, 2 단계로 이루어진 실행 단계를 포함하는 비교 연산 파이프라인;A comparison operation pipeline which compares the magnitudes of the two input values and includes an execution step consisting of two steps; 데이터를 메모리로부터 로드하고, 2 단계로 이루어진 실행 단계를 포함하는 로드 연산 파이프라인;A load operation pipeline that loads data from memory and includes an execution step consisting of two steps; 데이터를 메모리에 저장하고, 2 단계로 이루어진 실행 단계를 포함하는 저장 연산 파이프라인;A storage operation pipeline that stores data in memory and includes an execution step consisting of two steps; 레지스터 간에 데이터를 이동하고, 2 단계로 이루어진 실행 단계를 포함하는 이동 연산 파이프라인;A move operation pipeline for moving data between registers and including an execution step consisting of two steps; 입력값에 대한 역수를 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역수 연산 파이프라인; 및A reciprocal calculation pipeline that calculates the reciprocal of the input value and includes an execution step of four steps; And 입력값에 대한 역제곱근을 산출하고, 4 단계로 이루어진 실행 단계를 포함하는 역제곱근 연산 파이프라인을 포함하고,Calculate an inverse square root of the input, and include an inverse square root pipeline that includes four execution steps, 상기 음영처리 프로세서가 2개의 상기 정점 데이터에 대하여 중첩하여 병렬로 상기 음영처리를 수행하는 것을 특징으로 하는 음영처리 프로세서.And the shading processor overlaps the two vertex data to perform the shading in parallel. 제 4 항의 상기 음영처리 프로세서에 의해 사용되는 레지스터 파일 구조로서,A register file structure used by the shading processor of claim 4, wherein 상기 2개의 정점 데이터 중 하나인 제 1 정점 데이터의 음영처리에 사용되는 제 1 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 1 매트릭스 그룹;A first matrix group for storing a first matrix used for shading first vertex data, which is one of the two vertex data, and having 16 registers; 상기 2개의 정점 데이터 중 나머지 하나인 제 2 정점 데이터의 음영처리에 사용되는 제 2 매트릭스를 저장하고, 16개의 레지스터로 이루어지는 제 2 매트릭스 그룹;A second matrix group for storing a second matrix used for shading second vertex data, which is one of the two vertex data, and having 16 registers; 모델/뷰 변환을 매트릭스 중 일부를 역전치하여 연산되는 역전치 매트릭스를 저장하고, 9개의 레지스터로 이루어지는 모델/뷰 매트릭스 그룹;A model / view matrix group comprising nine registers for storing an inverted matrix that is calculated by inverting a portion of the matrix for model / view transformation; 상기 제 1 정점 데이터 및 상기 제 2 정점 데이터를 저장하고, 8개의 레지스터로 이루어지는 정점 그룹; 및A vertex group that stores the first vertex data and the second vertex data, and includes eight registers; And 상기 제 1 정점 데이터 및 상기 제 2 정점 데이터에 대하여 병렬로 상기 음영처리를 수행하면서 발생하는 중간 연산결과를 임시 저장하고, 24개의 레지스터로 이루어지는 작업 그룹을 포함하는 것을 특징으로 하는 레지스터 파일 구조.And a working group consisting of 24 registers for temporarily storing an intermediate operation result generated while performing the shading process in parallel with respect to the first vertex data and the second vertex data.
KR1020050054768A 2005-06-24 2005-06-24 Geometry transformation pipeline system without a stall for 3-dimension graphics, geometry transformation processing system and register file architecture of the same KR100679861B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050054768A KR100679861B1 (en) 2005-06-24 2005-06-24 Geometry transformation pipeline system without a stall for 3-dimension graphics, geometry transformation processing system and register file architecture of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050054768A KR100679861B1 (en) 2005-06-24 2005-06-24 Geometry transformation pipeline system without a stall for 3-dimension graphics, geometry transformation processing system and register file architecture of the same

Publications (2)

Publication Number Publication Date
KR20060135104A true KR20060135104A (en) 2006-12-29
KR100679861B1 KR100679861B1 (en) 2007-02-07

Family

ID=37813169

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050054768A KR100679861B1 (en) 2005-06-24 2005-06-24 Geometry transformation pipeline system without a stall for 3-dimension graphics, geometry transformation processing system and register file architecture of the same

Country Status (1)

Country Link
KR (1) KR100679861B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100919236B1 (en) * 2007-05-22 2009-09-30 한국전자통신연구원 A method for 3D Graphic Geometric Transformation using Parallel Processor
KR20210044405A (en) 2019-10-15 2021-04-23 한국기술교육대학교 산학협력단 Visualization pipeline apparatus for cluster based scientific visualization tools and its visualization method
WO2021167767A1 (en) * 2020-02-18 2021-08-26 Advanced Micro Devices, Inc. Look-ahead teleportation for reliable computation in multi-simd quantum processor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR980003050A (en) * 1996-06-20 1998-03-30 박병재 Oil pump drive system of automatic transmission for vehicle

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100919236B1 (en) * 2007-05-22 2009-09-30 한국전자통신연구원 A method for 3D Graphic Geometric Transformation using Parallel Processor
KR20210044405A (en) 2019-10-15 2021-04-23 한국기술교육대학교 산학협력단 Visualization pipeline apparatus for cluster based scientific visualization tools and its visualization method
WO2021167767A1 (en) * 2020-02-18 2021-08-26 Advanced Micro Devices, Inc. Look-ahead teleportation for reliable computation in multi-simd quantum processor

Also Published As

Publication number Publication date
KR100679861B1 (en) 2007-02-07

Similar Documents

Publication Publication Date Title
US11797302B2 (en) Generalized acceleration of matrix multiply accumulate operations
US8049760B2 (en) System and method for vector computations in arithmetic logic units (ALUs)
US8904152B2 (en) Efficient complex multiplication and fast fourier transform (FFT) implementation on the ManArray architecture
US7242414B1 (en) Processor having a compare extension of an instruction set architecture
US8024394B2 (en) Dual mode floating point multiply accumulate unit
US6038582A (en) Data processor and data processing system
US11816481B2 (en) Generalized acceleration of matrix multiply accumulate operations
EP0314335A2 (en) A parallel surface processing system for graphics display
Chiricescu et al. Morphable multipliers
US6714197B1 (en) Processor having an arithmetic extension of an instruction set architecture
KR100679861B1 (en) Geometry transformation pipeline system without a stall for 3-dimension graphics, geometry transformation processing system and register file architecture of the same
KR100919236B1 (en) A method for 3D Graphic Geometric Transformation using Parallel Processor
US6732259B1 (en) Processor having a conditional branch extension of an instruction set architecture
US8564601B2 (en) Parallel and vectored Gilbert-Johnson-Keerthi graphics processing
US11789701B2 (en) Controlling carry-save adders in multiplication
EP1163591B1 (en) Processor having a compare extension of an instruction set architecture
KR100451147B1 (en) High-speed multiplier, realized in small size so as to be used as a multiplier engine of a processor and designed in single structure having regularity
JPH09325953A (en) Processor and data processor
Sima et al. Software-based geometry operations for 3D computer graphics
KR20070089547A (en) Geometry lighting pipeline architecture for 3-dimension graphics
CN116225532A (en) General processor supporting acceleration vector operation
WO2000048080A9 (en) Processor having a compare extension of an instruction set architecture
Sheng et al. Implementation of OpenVG path and paint algorithms on synchronous data triggered architecture with optimization
JP2017123034A (en) Image processing apparatus including cip and image processing method

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee