KR100438767B1 - Line drawing device using dda algorithm, resulting in increase of performance and processing speed - Google Patents

Line drawing device using dda algorithm, resulting in increase of performance and processing speed Download PDF

Info

Publication number
KR100438767B1
KR100438767B1 KR1019970041158A KR19970041158A KR100438767B1 KR 100438767 B1 KR100438767 B1 KR 100438767B1 KR 1019970041158 A KR1019970041158 A KR 1019970041158A KR 19970041158 A KR19970041158 A KR 19970041158A KR 100438767 B1 KR100438767 B1 KR 100438767B1
Authority
KR
South Korea
Prior art keywords
data
output
point
bits
line drawing
Prior art date
Application number
KR1019970041158A
Other languages
Korean (ko)
Other versions
KR19990018065A (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 KR1019970041158A priority Critical patent/KR100438767B1/en
Publication of KR19990018065A publication Critical patent/KR19990018065A/en
Application granted granted Critical
Publication of KR100438767B1 publication Critical patent/KR100438767B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE: A line drawing device using DDA(Digital Differential Analyzer) algorithm is provided to apply decimal arithmetic to one of x-axis and y-axis with a slope between a start point and an end point, and to perform overflow and round-off for the decimal arithmetic, thereby improving correctness. CONSTITUTION: A data input unit(20) compares inputted data in a start point or data in a current point incremented from the data of the start point with inputted data in an end point, to output the data in the start point or the current point smaller than the data in the end point. An increment processing unit(40) adds an output of the data input unit(20) and bits of a fixed number according to increment of the fixed number bits to output an added result as data in the current point, or adds an output of the data input unit(20) and overflow of accumulated bits of a decimal point to output an added result as data in the current point. A data output unit(60) outputs a result of the increment processing unit(40) intactly, or rounds off one decimal place of the accumulated bits of a decimal point to add to the output of the increment processing unit(40). If the increment for the x-axis is bits of the fixed number, the increment for the y-axis becomes bits of the decimal point, and vice versa.

Description

디.디.에이. 알고리즘을 이용한 라인 드로잉 장치D.D.A. Line Drawing Device Using Algorithm

본 발명은 컴퓨터 그래픽에 관한 것으로서, 특히 그래픽 가속장치(graphic accelerator)에서 라인 드로잉(line drawing)을 수행하는 디.디.에이.(DDA:Digital Differential Analyzer) 알고리즘을 이용한 라인 드로잉 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to computer graphics, and more particularly, to a line drawing device using a DDA (Digital Differential Analyzer) algorithm for performing line drawing in a graphic accelerator.

근래에 컴퓨터 그래픽 분야의 발전에 따라 그래픽 처리의 속도를 좌우하는 그래픽 가속장치의 중요성은 날로 커지고 있다. 그 중에서도 제한된 시간 동안에 얼마나 빨리 라인 드로잉을 하는가를 결정하는 라인 드로잉 엔진(line drawing engine)은 그래픽 가속장치의 성능을 평가하는데 있어서 중요한 역할을 하고 있다.In recent years, with the development of the field of computer graphics, the importance of the graphics accelerator which determines the speed of graphics processing is increasing. Among other things, the line drawing engine, which determines how fast a line is drawn in a limited time, plays an important role in evaluating the performance of the graphics accelerator.

선을 기본으로 하여 도형등을 그리는데 사용되는 라인 드로잉 엔진을 구현하기 위한 대표적인 방법으로서 크게 브레젠함(Bresenham)과 디.디.에이(DDA) 알고리즘이 있다.Bresenham and DDA algorithms are the main methods for implementing the line drawing engine used to draw shapes based on lines.

종래에는 브레젠함 알고리즘을 이용하여 라인 드로잉 엔진을 구현하였지만, 이 알고리즘은 x,y 좌표값으로서 소숫점 이하의 수치에 대해서는 처리하지 못하며, 또한 끝점(end point)을 미리 알지 못하므로 처리 속도가 떨어지는 단점이 있었다.Conventionally, the line drawing engine is implemented by using the Bressenham algorithm. However, this algorithm does not process numerical values below the decimal point as x, y coordinate values, and also does not know the end point in advance. There was this.

이에 따라 최근에는 디.디.에이. 알고리즘을 이용하여 라인 드로잉 엔진을 구현하는데 관심이 주목되고 있으며, 특히 3차원 그래픽에 활용할 경우에는 더욱 유용한 것으로 알려졌다. 디.디.에이. 알고리즘은 간략히 설명하면, x,y 좌표상에서 시작점과 끝점으로부터 두 지점간의 기울기(slope)를 알아냄으로써 그 기울기에 따라 시작점에서 끝점으로의 라인 드로잉을 수행하는 것이다.As a result, D.D.A. Attention has been paid to the implementation of line drawing engines using algorithms, especially when used in 3D graphics. D.D.A. In short, the algorithm finds a slope between two points from the starting point and the ending point on the x and y coordinates, and performs line drawing from the starting point to the end point according to the slope.

그러나, 이러한 디.디.에이. 알고리즘을 라인 드로잉 엔진으로서 구현하는데 있어서, 소숫점 이하로 된 기울기를 처리할 경우에 x축 및 y축 모두에 소숫점 처리방식을 사용한다면 처리 속도가 떨어진다.However, these D.A. In implementing the algorithm as a line drawing engine, the processing speed is lowered if the decimal point processing method is used on both the x-axis and the y-axis when dealing with the gradient below the decimal point.

본 발명이 이루고자 하는 기술적 과제는, 시작점과 끝점간의 기울기를 이용하여 x축 또는 y축중 한 축에 대해 소숫점 처리를 수행함으로써 성능 및 처리 속도를 향상시키고, 간단한 회로 구성으로 소숫점 처리시에 발생되는 오버플로(overflow) 및 반올림(round)을 수행함으로써 정확도를 높이는 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치를 제공하는데 있다.The technical problem to be achieved by the present invention is to improve the performance and processing speed by performing a decimal point processing on one axis of the x-axis or y-axis using the slope between the starting point and the end point, and the overflow generated during the decimal point processing with a simple circuit configuration De-D.C improves accuracy by performing overflow and rounding. The present invention provides a line drawing apparatus using an algorithm.

도 1은 본 발명에 의한 디.디.에이.알고리즘을 이용한 라인 드로잉 장치의 상세한 블럭도이다.1 is a detailed block diagram of a line drawing apparatus using a D.A. algorithm according to the present invention.

도 2는 도 1에 도시된 장치를 x축 및 y축 모두에 적용하여 구현된 라인 드로잉 장치의 상세한 블럭도이다.FIG. 2 is a detailed block diagram of a line drawing apparatus implemented by applying the apparatus shown in FIG. 1 to both the x-axis and the y-axis.

상기 과제를 이루기 위하여, 본 발명에 의한 디.디.에이.알고리즘을 이용한 라인 드로잉 장치는, 데이타 입력부, 증분 처리부 및 데이타 출력부로 구성되는 것이 바람직하다. 데이타 입력부는 시작점의 데이타 또는 시작점의 데이타로부터 증분된 현재 지점의 데이타를 끝점의 데이타와 비교하여 끝점의 데이타보다 작으면 출력한다. 증분 처리부는 정수 비트인 증분치에 따라 데이타 입력부의 출력과 정수 비트를 가산하여 현재 지점의 데이타로서 출력하거나, 소숫점 비트인 증분치에 따라 데이타 입력부의 출력과 누산된 소숫점 비트들의 오버플로를 가산하여 현재 지점의 데이타로서 출력한다. 데이타 출력부는 증분 처리부의 출력을 그대로 출력하거나, 증분 처리부의 출력에 누산된 소숫점 비트들의 소숫점 제1의 자리의 비트를 반올림으로서 가산하여 출력한다. 여기서, 라인 드로잉 장치는 x축 및 y축 각각에 대해 라인 드로잉을 수행하며, x축에 대한 증분치가 정수 비트이면, y축에 대한 증분치는 소숫점 비트이며, 그 역으로도 성립된다.In order to achieve the above object, it is preferable that the line drawing apparatus using the D.A. algorithm according to the present invention comprises a data input unit, an incremental processing unit, and a data output unit. The data input unit compares the data of the current point incremented from the data of the start point or the data of the start point with the data of the end point and outputs if it is smaller than the data of the end point. The increment processing unit adds the output of the data input unit and the integer bit according to the increment value, which is an integer bit, and outputs the data as the current point, or adds the overflow of the output of the data input unit and the accumulated decimal point bits according to the increment value, which is the decimal point bit. Output as data of the current point. The data output section outputs the output of the increment processing section as it is, or adds the bits of the decimal point first digits of the decimal point bits accumulated in the output of the increment processing section by rounding them up. Here, the line drawing apparatus performs line drawing on each of the x and y axes, and if the increment value on the x axis is an integer bit, the increment value on the y axis is a decimal point bit and vice versa.

이하, 본 발명에 의한 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치의 구성 및 동작을 첨부한 도면을 참조하여 다음과 같이 설명한다.Hereinafter, D.D.A. according to the present invention. The configuration and operation of the line drawing apparatus using the algorithm will be described as follows with reference to the accompanying drawings.

도 1은 본 발명에 의한 디.디.에이.알고리즘을 이용한 라인 드로잉 장치의 상세한 블럭도로서, 멀티플렉서(MUX)(22), 비교기(24) 및 레지스터(26)로 이루어진 데이타 입력부(20), 제1~제3 가산기(42,46,50) 및 레지스터들(44,48,52)로 이루어진 증분 처리부(40) 및 제4 가산기(64) 및 레지스터들(62,66)로 이루어진 데이타 출력부(60)로 구성된다.1 is a detailed block diagram of a line drawing apparatus using a D.A. algorithm according to the present invention, which includes a data input unit 20 including a multiplexer (MUX) 22, a comparator 24, and a register 26, Incremental processing section 40 consisting of first to third adders 42, 46, 50 and registers 44, 48, 52 and data output section consisting of fourth adder 64 and registers 62, 66 It consists of 60.

도 1에 도시된 장치는 라인 드로잉을 수행하기 위해서 먼저, x,y 좌표상에서의 시작점(start point)과 끝점(end point)의 데이타들을 입력해야 한다. 이때 x축 및 y축 각각에 대해서, 시작점의 데이타를 xa,ya라고 하고, 끝점의 데이타를 xb,yb라고 하고, 시작점의 데이타에서 끝점의 데이타로의 이동 간격을 나타내는 증분치를 x_inc,y_inc라고 하자. 설명을 간단히 하기 위해서 도 1에 도시된 장치는 y축에 대해 라인 드로잉을 수행하는 것으로 되어 있지만, x축에 대해서도 동일하게 수행한다.In order to perform the line drawing, the apparatus shown in FIG. 1 must first input data of a start point and an end point on x and y coordinates. For each of the x-axis and y-axis, the data at the starting point is called xa, ya, the data at the end point is called xb, yb, and the incremental value representing the interval between the data at the starting point and the data at the end point is called x_inc, y_inc. . For the sake of simplicity, the apparatus shown in FIG. 1 is supposed to perform line drawing on the y axis, but the same on the x axis.

전술한 증분치(x_inc,y_inc)는 시작점과 끝점간의 기울기에 상응하는 값으로서 다음과 같이 구분하여 나타낼 수 있다.The above-mentioned increments (x_inc, y_inc) are values corresponding to the slope between the starting point and the ending point and may be expressed as follows.

1) 기울기가 1보다 크거나 같은 경우: y_inc = 11) If slope is greater than or equal to 1: y_inc = 1

x_inc = 0.xxx...x_inc = 0.xxx ...

2) 기울기가 1보다 작은 경우: y_inc = 0.xxx...2) If the slope is less than 1: y_inc = 0.xxx ...

x_inc = 1x_inc = 1

즉, 기울기가 1보다 크거나 같은 경우에는 x,y 좌표상에서 45°를 기준으로 기울기가 y축에 많이 기울어져 있으므로 y축의 증분치를 1로 하고, 이에 반하여 x축의 증분치를 소숫점으로 나타내고, 반면 기울기가 1보다 작은 경우에는 기울기가 x축에 많이 기울어져 있으므로, x축의 증분치를 1로 하고, 이에 반하여 y축의 증분치를 소숫점으로 나타낼 수 있다.In other words, if the slope is greater than or equal to 1, since the inclination is inclined to the y-axis much on the basis of 45 ° on the x and y coordinates, the increment value of the y-axis is 1, whereas the increment value of the x-axis is represented by the decimal point, while the slope is If is less than 1, since the inclination is inclined much on the x-axis, the increment value of the x-axis may be 1, whereas the increment value of the y-axis may be represented by a decimal point.

이와 같이 기울기를 이용하여 증분치를 나타내면, x축 및 y축중 한 축의 증분치는 정수 1비트만 필요하며, 다른 축의 증분치는 정확도를 위한 소숫점 비트로 결정된다. 도 1에 도시된 본 발명의 장치는 정확도를 높이기 위해서 소숫점을 16비트로 예로 하여 구현되었다. 그러나, 이러한 수치에 한정되어 적용되지는 않는다.In this way, when the increment is expressed using the slope, the increment value of one axis of the x-axis and the y-axis needs only one integer bit, and the increment value of the other axis is determined by the decimal point bits for accuracy. The device of the present invention shown in FIG. 1 is implemented with 16 decimal points as an example to increase accuracy. However, the present invention is not limited to these numerical values.

이제, 도 1을 참조하여 본 발명의 라인 드로잉 장치의 동작을 설명한다.The operation of the line drawing apparatus of the present invention will now be described with reference to FIG.

먼저, 데이타 입력부(20)는 초기에 시작점의 데이타(ya) 및 끝점의 데이타(yb)를 입력하여 시작점의 데이타(ya)를 증분 처리부(40)로 출력한다. 또한, 시작점의 데이타(ya)로부터 증분 처리된 현재 지점의 데이타(yi)를 다시 입력하여 끝점의 데이타(yb)와 비교하고, 비교된 결과 끝점의 데이타(yb)가 아니면 증분 처리부(40)로 출력하고 전술한 동작을 반복하며, 끝점의 데이타(yb)이면 출력단자 y_out로 출력한다.First, the data input unit 20 initially inputs the data ya of the starting point and the data yb of the ending point, and outputs the data ya of the starting point to the incremental processing unit 40. In addition, the data of the current point incrementally processed from the data ya of the starting point is input again and compared with the data yb of the end point. The above operation is repeated, and if the data yb of the end point is output, the output terminal y_out is output.

구체적으로, 멀티플렉서(22)는 시작점의 데이타(ya) 및 증분 처리된 현재 지점의 데이타(yi)를 선택신호(y_sel)에 의해 선택적으로 출력한다. 즉, 선택신호(y_sel)에 따라 시작점의 데이타(ya)인지 아니면 현재 지점의 데이타(yi)인지 구분된다.Specifically, the multiplexer 22 selectively outputs the data ya of the starting point and the data yi of the incremented current point by the selection signal y_sel. That is, according to the selection signal y_sel, it is discriminated whether it is data ya of the starting point or data yi of the current point.

비교기(24)는 멀티플렉서(22)에서 선택된 데이타와 끝점의 데이타(yb)를 비교한다. 비교된 결과, 시작점의 데이타(ya) 또는 현재 지점의 데이타(yi)가 끝점의 데이타(yb)보다 작으면 그대로 레지스터(26)로 출력하고, 그렇지 않으면 이때의 데이타를 최종값 즉, 끝점의 데이타(yb)로 여기고 출력단자 y_out를 통해 출력한다.The comparator 24 compares the data selected in the multiplexer 22 with the data yb of the endpoint. As a result of the comparison, if the data ya of the starting point or the data yi of the current point is smaller than the data yb of the end point, the data is output to the register 26 as it is, otherwise the data at this time is the final value, that is, the data of the end point. It is regarded as (yb) and printed through the output terminal y_out.

레지스터(26)는 비교기(24)의 출력을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과를 출력한다. 이러한 레지스터(26)를 이용하는 것은 라인 드로잉 장치의 특성상 동작 주파수(예컨대, 현재 시점으로 클럭신호는 적어도 80MHz 이상임)가 높고, 보다 크고 정확한 값을 얻기 위해서 많은 비트수가 사용되므로, 동기를 맞추어 줄 필요가 있기 때문이다. 또한, 이하 설명되는 다른 레지스터들도 동일한 역할을 한다.The register 26 latches the output of the comparator 24 in synchronization with the clock signal gclk, and outputs the latched result. The use of such a register 26 has a high operating frequency (e.g., the clock signal is at least 80 MHz or more at this point in time) and a large number of bits are used to obtain a larger and more accurate value. Because there is. In addition, the other registers described below play the same role.

다음에, 증분 처리부(40)는 정수 비트인 증분치(y_inc)에 따라 데이타 입력부(20)의 출력과 증분치(y_inc)를 가산하고, 가산된 결과를 전술한 증분 처리된 현재 지점의 데이타(yi)로서 데이타 입력부(20)로 피드백하거나, 소숫점 비트인 증분치(y_inc)에 따라 데이타 입력부(20)의 출력과 누산된 소숫점 비트들의 오버플로를 가산하고, 가산된 결과를 마찬가지로 피드백한다.Next, the increment processing unit 40 adds the output of the data input unit 20 and the increment value y_inc according to the increment value y_inc, which is an integer bit, and adds the added result to the data of the current point of incremental processing described above ( yi) is fed back to the data input unit 20, or the output of the data input unit 20 and the overflow of the accumulated decimal point bits are added according to the increment value y_inc, which is a decimal point bit, and the added result is fed back as well.

여기서, 증분치(y_inc)는 전술한 바와 같이 기울기에 따라 달라지며, 기울기는 마이크로프로세서(microprocessor) 또는 그래픽 가속장치내 셋업-엔진(set-up engin)에서 미리 구해진다. 증분치(y_inc)는 최상위 비트인 1비트의 정수부와 나머지 비트인 16비트의 소숫점부로 이루어진다.Here, the increment y_inc depends on the slope as described above, and the slope is obtained in advance in a set-up engin in a microprocessor or graphics accelerator. The increment value y_inc is composed of an integer part of 1 bit, which is the most significant bit, and a decimal point part of 16 bits, which is the remaining bit.

구체적으로, 제1 가산기(42)는 정수용 가산기로서, 최상위 1비트의 증분치(y_inc)를 입력하여 레지스터(26)의 출력과 가산한다. 레지스터(44)는 제1 가산기(42)의 출력을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과를 출력한다.Specifically, the first adder 42 is an integer adder and inputs an incremental value y_inc of the most significant 1 bit to add to the output of the register 26. The register 44 latches the output of the first adder 42 in synchronization with the clock signal gclk, and outputs the latched result.

한편, 제2 가산기(46)는 소숫점용 가산기로서, 나머지 16비트의 증분치(y_inc)를 입력하여 초기치 또는 이전의 16비트의 증분치와 가산한다. 레지스터(48)는 제2 가산기(46)의 출력을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과에서 최상위 1비트를 제외한 나머지 16비트를 다시 제2 가산기(46)로 피드백한다. 즉, 레지스터(48)는 제2 가산기(46)의 출력에서 발생되는 오버플로를 래치하기 위해 17비트로 이루어지며, 오버플로에 해당하는 최상위 1비트를 제3 가산기(50)로 출력한다.On the other hand, the second adder 46 is a decimal point adder, and adds the remaining 16-bit increment value y_inc to the initial value or the previous 16-bit increment value. The register 48 latches the output of the second adder 46 in synchronization with the clock signal gclk, and feeds back the remaining 16 bits except the most significant 1 bit from the latched result back to the second adder 46. That is, the register 48 is composed of 17 bits to latch the overflow generated at the output of the second adder 46, and outputs the most significant 1 bit corresponding to the overflow to the third adder 50.

제3 가산기(50)는 정수용 가산기로서, 레지스터(44) 및 레지스터(48)의 출력들을 가산하는데, 여기서, 레지스터(48)의 출력은 전술한 오버플로에 해당한다. 레지스터(52)는 제3 가산기(50)의 출력을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과를 전술한 증분 처리된 현재 지점의 데이타(yi)로서 멀티플렉서(22)로 피드백한다.The third adder 50 is an integer adder, which adds the outputs of the register 44 and the register 48, where the output of the register 48 corresponds to the aforementioned overflow. The register 52 latches the output of the third adder 50 in synchronization with the clock signal gclk, and feeds back the latched result to the multiplexer 22 as the above-mentioned incremental current data yi.

전술한 증분 처리부(40)의 제1 및 제2 가산기(42,46)에서 실제로 가산 동작을 하는 가산기는 한 쪽뿐이다.There is only one adder that actually adds in the first and second adders 42 and 46 of the incremental processing section 40 described above.

즉, 증분치(y_inc)가 1인 경우에 제2 가산기(46)로 입력되는 16비트의 소숫점 비트는 없으므로 레지스터(48)로부터 출력되는 오버플로가 생기지 않고, 이에 따라 제3 가산기(50)로 입력되는 오버플로도 없다. 이때 실제로 동작하는 제1 가산기(42)는 데이타 입력부(20)의 출력을 증분치(y_inc)인 1만큼 가산한다. 가산된 결과는 데이타 입력부(20)로 다시 피드백되고 현재 지점의 데이타(yi)가 결국 끝점의 데이타(yb)와 동일할 때까지 제1 가산기(42)의 가산 동작은 반복된다.That is, when the increment y_inc is 1, since there are no 16-bit decimal point bits input to the second adder 46, no overflow is output from the register 48, and thus, the third adder 50 is generated. There is no overflow entered. In this case, the actually operated first adder 42 adds the output of the data input unit 20 by 1, which is an increment value y_inc. The added result is fed back to the data input unit 20 and the adding operation of the first adder 42 is repeated until the data yi of the current point is eventually equal to the data yb of the end point.

반대로, 증분치(y_inc)가 1미만의 소숫점 비트인 경우에 제1 가산기(42)로 1이 입력되지 않으므로 레지스터(44)의 출력은 결국 데이타 입력부(20)의 출력과 동일하다. 이때 실제로 동작하는 제2 가산기(46)는 증분치(y_inc)인 16비트의 소숫점 비트를 이전값과 계속 누적하고, 오버플로가 발생하면 레지스터(48)는 이를 래치한다. 제3 가산기(50)는 레지스터(44)의 출력과 레지스터(48)에 래치된 최상위 1비트 즉, 오버플로를 가산한다. 가산된 결과는 데이타 입력부(20)로 다시 피드백되고 현재 지점의 데이타(yi)가 결국 끝점의 데이타(yb)와 동일할 때까지 제2 및 제3 가산기(46,50)의 가산 동작은 반복된다.On the contrary, if the increment y_inc is less than one decimal point bit, 1 is not input to the first adder 42, so that the output of the register 44 is the same as the output of the data input unit 20. At this time, the second adder 46, which is actually operating, continuously accumulates 16-bit decimal point bits, which is an increment value y_inc, with the previous value, and the register 48 latches the overflow when an overflow occurs. The third adder 50 adds the output of the register 44 and the most significant one bit, i.e., overflow, latched in the register 48. The added result is fed back to the data input unit 20 and the adding operation of the second and third adders 46 and 50 is repeated until the data yi of the current point is eventually equal to the data yb of the end point. .

끝으로, 데이타 출력부(60)는 증분 처리부(40)에서 데이타 입력부(20)로 피드백되는 현재 지점의 데이타(yi)를 동시에 입력하여 그대로 출력단자 y_out를 통해 출력하거나, 누산된 소숫점 비트들의 소숫점 제1의 자리의 비트를 현재 지점의 데이타(yi)에 가산하여 출력단자 y_out를 통해 출력한다.Finally, the data output unit 60 simultaneously inputs the data yi of the current point fed back from the increment processing unit 40 to the data input unit 20 and outputs the data through the output terminal y_out as it is, or the decimal point of accumulated decimal point bits. The bit of the first digit is added to the data yi of the current point and output through the output terminal y_out.

구체적으로, 레지스터(62)는 증분 처리부(40)에서 제2 가산기(46)의 출력을 래치하는 레지스터(48)의 출력중 15번째 비트값 즉, 소숫점 제1의 자리의 비트값을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과를 출력한다.Specifically, the register 62 stores the 15th bit value of the output of the register 48 that latches the output of the second adder 46 by the increment processor 40, that is, the bit value of the decimal point first digit. In synchronization with gclk), the latched result is output.

제4 가산기(64)는 반올림 가산기로서, 현재 지점의 데이타(yi)와 레지스터(62)의 출력을 가산한다. 즉, 제4 가산기(64)가 레지스터(62)의 출력을 입력하는 경우는 전술한 제2 가산기(46)와 관련하여 증분치(y_inc)가 1미만의 소숫점 비트인 경우에 제2 가산기(46)의 출력에서 0.5이상을 반올림하기 위해서이다.The fourth adder 64 is a round adder, which adds the data yi of the current point and the output of the register 62. That is, when the fourth adder 64 inputs the output of the register 62, the second adder 46 when the increment value y_inc is less than one decimal point in relation to the second adder 46 described above. To round off more than 0.5 at the output of.

따라서, 앞서 레지스터(48)의 동작을 설명할 때 생략하였지만, 레지스터(48)의 출력에서 오버플로에 해당하는 최상위 1비트 [16]는 제3 가산기(50)로 출력되고, 다음 15번째 비트 [15]는 레지스터(62)로 출력되고, 16비트의 소숫점 비트 [15:0]는 제2 가산기(46)로 피드백된다.Therefore, while the operation of the register 48 has been omitted earlier, the most significant one bit [16] corresponding to the overflow in the output of the register 48 is output to the third adder 50, and the next 15th bit [ 15] is output to the register 62, and the 16-bit decimal point bits [15: 0] are fed back to the second adder 46.

레지스터(66)는 제4 가산기(64)의 출력을 클럭신호(gclk)에 동기하여 래치하고, 래치된 결과를 출력단자 y_out를 통해 출력한다.The register 66 latches the output of the fourth adder 64 in synchronization with the clock signal gclk, and outputs the latched result through the output terminal y_out.

지금까지 설명한 본 발명의 라인 드로잉 장치에 따르면, 시작점의 데이타(ya), 끝점의 데이타(yb) 및 증분치(y_inc)를 입력하고, 증분치(y_inc)에 따라 증분된 현재 지점의 데이타(yi)를 끝점의 데이타(yb)와 동일할 때까지 출력함으로써 y축에 대해 라인 드로잉이 이루어진다는 것을 알 수 있었다.According to the line drawing device of the present invention described so far, the data of the current point (yi) of the starting point, the data of the end point (yb) and the increment value (y_inc) are input and incremented according to the increment value (y_inc). ) Is output until it is the same as the data (yb) of the end point.

도 2는 도 1에 도시된 장치를 x축 및 y축 모두에 적용하여 구현된 라인 드로잉 장치의 상세한 블럭도로서, 100은 y축에 대한 라인 드로잉부를 나타내고, 200은 x축에 대한 라인 드로잉부를 나타낸다.FIG. 2 is a detailed block diagram of a line drawing apparatus implemented by applying the apparatus shown in FIG. 1 to both the x-axis and the y-axis, where 100 represents a line drawing portion for the y-axis, and 200 represents a line drawing portion for the x-axis. Indicates.

도 2에 도시된 각 부의 구성과 동작은 도 1을 참조하여 설명된 바와 동일하므로, 그 설명을 생략한다. 단, x축에 대한 라인 드로잉부(100)로 입력되는 증분치(x_inc)가 1이면, y축에 대한 라인 드로잉부(200)로 입력되는 증분치(y_inc)는 1미만의 소숫점 비트가 되며, 그 역으로도 될수 있다.Since the configuration and operation of each unit illustrated in FIG. 2 are the same as those described with reference to FIG. 1, the description thereof will be omitted. However, if the increment x_inc input to the line drawing unit 100 for the x-axis is 1, the increment y_inc input to the line drawing unit 200 for the y-axis becomes less than one decimal point bit. And vice versa.

결국, x축에 대한 라인 드로잉부(100)에서 제1 가산기(42')가 증분치(x_inc)에 따라 실제로 가산 동작을 하면, y축에 대한 라인 드로잉부(200)에서는 제2 가산기(46)가 증분치(y_inc)에 따라 실제로 가산 동작을 하게 되며, 그 역으로도 될수 있다.As a result, when the first adder 42 'actually adds in the line drawing unit 100 for the x-axis according to the increment value x_inc, the second adder 46 in the line drawing unit 200 for the y-axis. ) Will actually add up according to the increment (y_inc), and vice versa.

이상에서 설명한 바와 같이, 본 발명에 의한 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치는 시작점과 끝점간의 기울기를 이용하여 x축 또는 y축중 한 축에 대해 소숫점 처리를 수행함으로써 성능 및 처리 속도를 향상시키고, 간단한 회로 구성으로 소숫점 처리시에 발생되는 오버플로(overflow) 및 반올림을 수행함으로써 정확도를 높이는 효과가 있다.As described above, D.D.A. according to the present invention. The line drawing device using the algorithm improves performance and processing speed by performing the decimal point processing on one of the x-axis or the y-axis using the slope between the starting point and the end point, and the overflow that occurs during the decimal point processing with a simple circuit configuration ( The accuracy is improved by performing overflow) and rounding.

Claims (6)

그래픽 가속장치에서 시작점의 데이타, 끝점의 데이타 및 증분치를 입력하여 라인 드로잉을 수행하는 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치에 있어서,A graphics accelerator that performs line drawing by entering data at the start point, data at the end point, and increments. In the line drawing apparatus using an algorithm, 입력된 상기 시작점의 데이타 또는 상기 시작점의 데이타로부터 증분된 현재 지점의 데이타를 입력된 상기 끝점의 데이타와 비교하여 상기 끝점의 데이타보다 작으면 출력하는 데이타 입력수단;Data input means for outputting the data of the inputted starting point or the current point incremented from the data of the starting point and comparing the data of the inputted end point with the data of the inputted end point; 정수 비트인 상기 증분치에 따라 상기 데이타 입력수단의 출력과 상기 정수 비트를 가산하여 상기 현재 지점의 데이타로서 출력하거나, 소숫점 비트인 상기 증분치에 따라 상기 데이타 입력수단의 출력과 누산된 소숫점 비트들의 오버플로를 가산하여 상기 현재 지점의 데이타로서 출력하는 증분 처리수단; 및Add the output of the data input means and the integer bit according to the increment value, which is an integer bit, and output the data as the data of the current point, or output of the data input means and accumulated decimal point bits according to the increment value, which is a decimal point bit. Increment processing means for adding an overflow and outputting the data as the current point; And 상기 증분 처리수단의 출력을 그대로 출력하거나, 상기 증분 처리수단의 출력에 상기 누산된 소숫점 비트들의 소숫점 제1의 자리의 비트를 반올림으로서 가산하여 출력하는 데이타 출력수단을 구비하고,A data output means for outputting the output of the increment processing means as it is, or adding the output of the incremental decimal means by rounding the bits of the first decimal place of the accumulated decimal point bits, 상기 라인 드로잉 장치는 x축 및 y축 각각에 대해 상기 라인 드로잉을 수행하며, 상기 x축에 대한 증분치가 상기 정수 비트이면, 상기 y축에 대한 증분치는 상기 소숫점 비트이며, 그 역으로도 성립되는 것을 특징으로 하는 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치.The line drawing apparatus performs the line drawing for each of the x and y axes, and if the increment value for the x axis is the integer bit, the increment value for the y axis is the decimal point bit and vice versa. D.D.A, characterized in that Line drawing device using algorithm. 제1항에 있어서, 상기 증분치는 상기 시작점의 데이타와 상기 끝점의 데이타간의 기울기에 따라 달라지며, 상기 기울기가 1보다 크거나 같은 경우에 상기 증분치는 상기 정수 비트로 나타내고, 상기 기울기가 1보다 작은 경우에 상기 증분치는 상기 소숫점 비트로 나타내는 것을 특징으로 하는 디.디.에이.알고리즘을 이용한 라인 드로잉 장치.The method of claim 1, wherein the increment value is dependent on the slope between the data of the start point and the data of the end point, and when the slope is greater than or equal to 1, the increment value is represented by the integer bit, and the slope is less than 1. And the incremental value is represented by the decimal point bit. The line drawing apparatus using the D.D.algorithm. 제1항에 있어서, 상기 데이타 입력수단은,The method of claim 1, wherein the data input means, 상기 시작점의 데이타 및 상기 현재 지점의 데이타를 선택신호에 응답하여 선택적으로 출력하는 선택수단;Selection means for selectively outputting data of the starting point and data of the current point in response to a selection signal; 상기 선택수단의 출력과 상기 끝점의 데이타를 비교하고, 상기 선택수단의 출력이 상기 끝점의 데이타보다 작으면 상기 증분 처리수단으로 출력하고, 상기 선택수단의 출력이 상기 끝점의 데이타보다 크거나 같으면 상기 라인 드로잉 장치의 출력으로서 출력하는 비교수단; 및Comparing the output of the selecting means with the data of the end point; outputting the selecting means to the incremental processing means if the output of the selecting means is smaller than the data of the end point; and if the output of the selecting means is greater than or equal to the data of the end point, Comparison means for outputting as an output of the line drawing apparatus; And 상기 증분 처리수단으로 출력되는 상기 비교수단의 출력을 클럭신호에 응답하여 래치하는 레지스터를 구비하는 것을 특징으로 하는 디.디.에이.알고리즘을 이용한 라인 드로잉 장치.And a register for latching an output of said comparing means outputted to said incremental processing means in response to a clock signal. 제1항에 있어서, 상기 증분 처리수단은,The method of claim 1, wherein the incremental processing means, 상기 데이타 입력수단의 출력과 상기 정수 비트를 가산하는 제1 가산기;A first adder for adding an output of said data input means and said integer bit; 상기 제1 가산기의 출력을 클럭신호에 응답하여 래치하는 제1 레지스터;A first register for latching an output of the first adder in response to a clock signal; 상기 소숫점 비트와 이전의 소숫점 비트를 가산하여 상기 누산된 소숫점 비트들로서 출력하는 제2 가산기;A second adder that adds the decimal point bit and the previous decimal point bit and outputs the accumulated decimal point bits; 상기 누산된 소숫점 비트들을 래치하고, 래치된 결과에서 상기 오버플로를 제외한 나머지 비트를 상기 이전의 소숫점 비트로서 출력하는 제2 레지스터;A second register for latching the accumulated decimal point bits and outputting the remaining bits except the overflow in the latched result as the previous decimal point bits; 상기 제1 레지스터의 출력과 상기 오버플로를 가산하는 제3 가산기; 및A third adder for adding the output of the first register and the overflow; And 상기 제3 가산기의 출력을 상기 클럭신호에 응답하여 래치하는 제3 레지스터를 구비하는 것을 특징으로 하는 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치.And a third register for latching an output of the third adder in response to the clock signal. Line drawing device using algorithm. 제4항에 있어서, 상기 제2 레지스터는,The method of claim 4, wherein the second register, 상기 오버플로를 상기 제3 가산기로 출력하고, 상기 나머지 비트를 상기 이전의 소숫점 비트로서 상기 제2 가산기로 출력하고, 상기 나머지 비트의 소숫점 제1의 자리의 비트를 상기 반올림으로서 상기 데이타 출력수단으로 출력하는 것을 특징으로 하는 디.디.에이.알고리즘을 이용한 라인 드로잉 장치.Output the overflow to the third adder, output the remaining bits to the second adder as the previous decimal point bits, and round the bits of the first decimal place of the remaining bits to the data output means. Line drawing apparatus using a D. D. algorithm, characterized in that the output. 제1항에 있어서, 상기 데이타 출력수단은,The method of claim 1, wherein the data output means, 상기 누산된 소숫점 비트들의 소숫점 제1의 자리의 비트를 상기 반올림으로서 클럭신호에 응답하여 래치하는 상기 제4 레지스터;The fourth register for latching a bit of a decimal point first digit of the accumulated decimal point bits in response to a clock signal as the rounding; 상기 증분 처리수단의 출력과 상기 제4 레지스터의 출력을 가산하는 제4 가산기; 및A fourth adder for adding the output of said incremental processing means and the output of said fourth register; And 상기 제4 가산기의 출력을 상기 클럭신호에 응답하여 래치하는 제5 레지스터를 구비하는 것을 특징으로 하는 디.디.에이. 알고리즘을 이용한 라인 드로잉 장치.And a fifth register configured to latch the output of the fourth adder in response to the clock signal. Line drawing device using algorithm.
KR1019970041158A 1997-08-26 1997-08-26 Line drawing device using dda algorithm, resulting in increase of performance and processing speed KR100438767B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970041158A KR100438767B1 (en) 1997-08-26 1997-08-26 Line drawing device using dda algorithm, resulting in increase of performance and processing speed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970041158A KR100438767B1 (en) 1997-08-26 1997-08-26 Line drawing device using dda algorithm, resulting in increase of performance and processing speed

Publications (2)

Publication Number Publication Date
KR19990018065A KR19990018065A (en) 1999-03-15
KR100438767B1 true KR100438767B1 (en) 2004-07-16

Family

ID=37348988

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970041158A KR100438767B1 (en) 1997-08-26 1997-08-26 Line drawing device using dda algorithm, resulting in increase of performance and processing speed

Country Status (1)

Country Link
KR (1) KR100438767B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100313541B1 (en) * 1999-12-29 2001-11-07 박종섭 Line drawing circuit by using midpoint algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0121311A2 (en) * 1983-03-07 1984-10-10 Tektronix, Inc. Raster display smooth line generation
JPS6376062A (en) * 1986-09-19 1988-04-06 Matsushita Electric Ind Co Ltd Digital differential analyzing device
JPS63318633A (en) * 1987-06-23 1988-12-27 Matsushita Electric Ind Co Ltd Digital differential analyzer
JPH08161512A (en) * 1994-12-02 1996-06-21 Fujitsu Ltd Graphic display device
JPH08272985A (en) * 1995-03-30 1996-10-18 Canon Inc Method and device for graphic processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0121311A2 (en) * 1983-03-07 1984-10-10 Tektronix, Inc. Raster display smooth line generation
JPS6376062A (en) * 1986-09-19 1988-04-06 Matsushita Electric Ind Co Ltd Digital differential analyzing device
JPS63318633A (en) * 1987-06-23 1988-12-27 Matsushita Electric Ind Co Ltd Digital differential analyzer
JPH08161512A (en) * 1994-12-02 1996-06-21 Fujitsu Ltd Graphic display device
JPH08272985A (en) * 1995-03-30 1996-10-18 Canon Inc Method and device for graphic processing

Also Published As

Publication number Publication date
KR19990018065A (en) 1999-03-15

Similar Documents

Publication Publication Date Title
Dong et al. PLAC: Piecewise linear approximation computation for all nonlinear unary functions
US5177703A (en) Division circuit using higher radices
KR100438767B1 (en) Line drawing device using dda algorithm, resulting in increase of performance and processing speed
US20070118584A1 (en) Apparatus and method for calculation of divisions and square roots
US5339267A (en) Preprocessor of division device employing high radix division system
US20080001966A1 (en) Straight line drawing method, straight line drawing program and straight line drawing apparatus
US5341322A (en) Bit level pipeline divide circuit and method therefor
CN114691086A (en) High-performance approximate multiplier based on operand clipping and calculation method thereof
US20020165890A1 (en) Method and apparatus for linear interpolation using gradient tables
JP2645422B2 (en) Floating point processor
US6601230B2 (en) Low power circuit design through judicious module selection
GB2136176A (en) High-speed processing of line segment coordinates
JP3385808B2 (en) Coordinate input device
KR200222599Y1 (en) Floating point type normalizer
KR100501739B1 (en) An efficient Modular Adder Architecture and its computing method
JPH08202533A (en) Division processor
JPH0553759A (en) Fixed decimal point arithmetic unit
JP2550597B2 (en) Squarer
JPH0764767A (en) Adder
KR100223752B1 (en) Parallel multiplier
JP2777265B2 (en) High radix square root arithmetic unit
KR200156144Y1 (en) A circuit of absolute value
JPH06175822A (en) Decimal arithmetic instruction processor
Janani et al. Power of CLZ instruction in numerical computations
KR0138856B1 (en) Multi-nary not logic device

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20070514

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee