JPH02212890A - Graphic data writing device - Google Patents

Graphic data writing device

Info

Publication number
JPH02212890A
JPH02212890A JP1034329A JP3432989A JPH02212890A JP H02212890 A JPH02212890 A JP H02212890A JP 1034329 A JP1034329 A JP 1034329A JP 3432989 A JP3432989 A JP 3432989A JP H02212890 A JPH02212890 A JP H02212890A
Authority
JP
Japan
Prior art keywords
data
memory means
out memory
output
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1034329A
Other languages
Japanese (ja)
Inventor
Yoshiaki Haniyu
羽生 嘉昭
Shogo Oneda
章吾 大根田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP1034329A priority Critical patent/JPH02212890A/en
Publication of JPH02212890A publication Critical patent/JPH02212890A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To shorten a graphic drawing time by providing a 1st and a 2nd first-in first-out memory means stored with start point addresses and end point addresses, a data holding means which holds the density of a figure and data on colors, and a 3rd first-in first-out memory means. CONSTITUTION:A start point and end point writing means 110 writes a calculation result in 1st and 2nd first-in first-out memory means 132 and 131 without waiting for the operation end of an address generating means 152, and moves to the calculation of next line coordinates. When the operation time of the address generating means 152 is shorter than that of the software processing of the means 110, the address generating means 152 starts next operation without waiting for the calculation of the means 110 as long as the values of the start point and end point of a next straight line are stored on memory means 132 and 131. Further, data on the density and colors of a figure are held in a data holding means 124 and then written in a memory means 134. Therefore, the same data is written in the memory means 134 repeatedly unless there is alteration. Consequently, the drawing time of a figure can be shortened.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は2図形データ書込装置に関し、例えば二次元配
列メモリ上に、任意の図形パターンの情報を書込む場合
に利用される。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a two-figure data writing device, which is used, for example, to write information of an arbitrary figure pattern onto a two-dimensional array memory.

[従来の技術] 二次元画像の処理を行なう場合1画像をX軸方向及びY
軸方向のそれぞれ微小位置毎に分割し。
[Prior art] When processing a two-dimensional image, one image is
Divide into each minute position in the axial direction.

画像を多数の画素を二次元配列したものとして表現する
。メモリ上で画像処理を行なう場合には。
An image is expressed as a two-dimensional array of many pixels. When performing image processing on memory.

多数の画素の各々に1つ以上のメモリを割り当てた二次
元配列メモリを用いる。
A two-dimensional array memory is used in which one or more memories are allocated to each of a large number of pixels.

この種のメモリ上で任意の図形パターンを描画する場合
、X軸方向及びY軸方向のアドレスの計算が比較的複雑
になるので、通常はコンピュータのソフトウェア処理に
よって、図形パターンを構成する各画素を順次にメモリ
上に書込むようにしている。
When drawing an arbitrary graphic pattern on this type of memory, calculating the addresses in the X-axis and Y-axis directions is relatively complicated, so each pixel that makes up the graphic pattern is usually calculated by computer software processing. It is written sequentially into memory.

しかし当然のことながら、ソウトウエア処理では処理に
時間がかかるので、複雑な図形パターンを短時間で描画
することはできない、特に、内部が塗りつぶされた二次
元図形を描画する場合には。
However, as a matter of course, software processing takes time, so it is not possible to draw complex graphic patterns in a short time, especially when drawing two-dimensional figures with filled interiors.

処理すべき画素の数が膨大であるから、その描画にも膨
大な時間を要する。
Since the number of pixels to be processed is enormous, it also takes an enormous amount of time to draw them.

この種の図形の描画時間を短縮するために、従来より、
ソフトウェア処理の中の比較的m純な部分をハードウェ
ア装置で置き換えることが行なわれている0例えば、X
座標がx 1. 、 Y座標がyの点P1から、X座標
がx2.Y座標がyの点P2まで、X軸に沿った直線を
描画する場合、xlとx2の間の各座B (xl+1.
xl+2.xl+3.=)を順次に発生するカウンタを
設けることによって、描画時間を短縮することができる
や [発明が解決しようとする課題] ところで、例えば第2図に示すような二次元図形パター
ンは、多数の直線の集りとして表わすことができろ。従
って、この二次元図形パターンを描画する場合には、そ
れを構成する各直線の座標を計算するとともに、計算さ
れた各々の直線の描画を繰り返し行なう必要がある。
In order to reduce the drawing time of this type of figure, conventionally,
For example, X
The coordinates are x1. , from point P1 whose Y coordinate is y, to whose X coordinate is x2. When drawing a straight line along the X axis to point P2 whose Y coordinate is y, each locus B (xl+1.
xl+2. xl+3. By providing a counter that sequentially generates =), it is possible to shorten the drawing time. [Problem to be solved by the invention] By the way, for example, a two-dimensional graphic pattern as shown in FIG. It can be expressed as a collection of. Therefore, when drawing this two-dimensional graphic pattern, it is necessary to calculate the coordinates of each straight line composing the pattern and to repeatedly draw each calculated straight line.

この場合、前述のカウンタを設ければ、直線の描画を短
時間で行なうことができる。しかし、各直線の座標の計
算は複雑であるので、ソフトウェア処理で行なわざるを
得ない、従ってその場合、ハードウェアとソフトウェア
との組合せによって図形パターンの描画が行なわれる。
In this case, if the above-mentioned counter is provided, straight lines can be drawn in a short time. However, since the calculation of the coordinates of each straight line is complicated, it has to be done by software processing. Therefore, in that case, the graphic pattern is drawn by a combination of hardware and software.

つまり、ソフトウェアによって1つの直線の始点と終点
の各座標を計算し、その計算結果をパラメータとしてハ
ードウェア装置に渡し、ハードウェア装置はそのパラメ
ータに従って直線の描画を行なう、また。
That is, the software calculates the coordinates of the starting point and ending point of a straight line, passes the calculation results as parameters to the hardware device, and the hardware device draws the straight line according to the parameters.

ハードウェア装置が直線を描画している間に、ソフトウ
ェアでは次の直線の始点と終点とを計算する。このよう
な処理が繰り返される。
While the hardware device is drawing a straight line, the software calculates the start and end points of the next straight line. Such processing is repeated.

ところが、ソフトウェアの1つの族11A座標の計算処
理等に要する時間と、ハードウェア装置が1つの直線を
描画するのに要する時間とは共に一定でないので、通常
、両者は一致しない、そして。
However, the time required for the software to calculate the coordinates of one family 11A and the time required for the hardware device to draw one straight line are not constant, so they usually do not match.

直線の長さが長い場合には、ハードウェアの直線描画時
間が、ソフトウェア処理よりもかなり長くなるので、ソ
フトウェアでは、ハードウェアの処理が終了するのを長
い間待った後で、計算結果をハードウェア装置に渡すこ
とになる。つまり、ソフトウェア処理の中で、無駄な時
間待ちをせざるを得ない。
When the length of a straight line is long, the time it takes for the hardware to draw a straight line is much longer than for software processing, so the software waits for a long time for the hardware to finish processing, and then transfers the calculation results to the hardware. It will be passed to the device. In other words, there is no choice but to waste time waiting during software processing.

そこで本発明は、この種のソフトウェアの時間持ちをな
りシ1図形描画時間を更に短縮することを課題とする。
Therefore, it is an object of the present invention to further shorten the time required for drawing a figure by using this type of software.

[課題を解決するための手段] 上記iagを解決するために、本発明においては。[Means to solve the problem] In order to solve the above iag, in the present invention.

複数の始点アドレスを記憶する。第1の先入れ先出しメ
モリ手段;複数の終点アドレスを記憶する、第2の先入
れ先出しメモリ手段;図形の濃度もしくは色のデータを
保持する、データ保持手段;データ入力端子が前記デー
タ保持手段の出力端子に接続され、複数の濃度もしくは
色のデータを記憶する。第3の先入れ先出しメモリ手段
;前記第1及び第2の先入れ先出しメモリ手段ならびに
、前記データ保持手段のデータ入力端子と接続され、図
形の始点と終点のアドレス値を計算するとともに、計算
した始点及び終点のアドレス値をそれぞれ前記第1及び
第2の先入れ先出しメモリ手段のデータ入力端子に印加
した状態で、第1.第2及び第3の先入れ先出しメモリ
手段に全てに同時に書込み信号を印加する。始点終点書
込み手段;前記第1.第2及び第3の先入れ先出しメモ
リ手段に読み出しパルスを印加する、読み出しパルス発
生手段;前記第1及び第2の先入れ先出しメモリ手段の
データ出力端子に接続され、始点と終点のアドレスに基
づいてそれらの間のアドレスを順次に発生するカウンタ
を含む、アドレス発生手段;及び前記アドレス発生手段
の出力端子、及び前記第3の先入れ先出しメモリ手段の
出力端子と接続された1図形出力手段=を設ける。
Store multiple starting point addresses. First first-in, first-out memory means; second first-in, first-out memory means for storing a plurality of end point addresses; data holding means for holding density or color data of a figure; a data input terminal is connected to an output terminal of the data holding means and stores data for multiple densities or colors. Third first-in, first-out memory means; connected to the first and second first-in, first-out memory means and the data input terminal of the data holding means, which calculates the address values of the starting and ending points of the figure, and also calculates the address values of the calculated starting and ending points. With address values applied to the data input terminals of the first and second first-in first-out memory means, respectively, the first. A write signal is applied to the second and third first-in-first-out memory means all simultaneously. Start point end point writing means; the first point. Read pulse generating means for applying a read pulse to the second and third first-in, first-out memory means; connected to the data output terminals of the first and second first-in, first-out memory means, and between them based on the addresses of the start and end points; address generating means including a counter for sequentially generating addresses of; and one-figure output means = connected to an output terminal of said address generating means and an output terminal of said third first-in, first-out memory means.

[作用] 本発明によれば、始点終点書込み手段が計算により求め
た始点と終点とに基づいて、アドレス発生手段が、カウ
ンタで始点と終点との間のアドレスを順次に発生するの
で、始点と終点との間を補関し、直線を構成する全ての
画素のアドレスを短時間で発生することができる。また
、始点終点書込み手段とアドレス発生手段との間に、第
1及び第2の先入れ先出しメモリ手段が備わっているの
で、アドレス発生手段の1回の処理がアドレス発生手段
のソフトウェア処理よりも遅い場合でも。
[Operation] According to the present invention, the address generation means uses a counter to sequentially generate addresses between the start point and the end point based on the start point and end point calculated by the start point and end point writing means. The addresses of all the pixels forming the straight line can be generated in a short time by interpolating between them and the end point. Furthermore, since the first and second first-in, first-out memory means are provided between the start point/end point writing means and the address generation means, even if one processing of the address generation means is slower than the software processing of the address generation means, .

始点終点書込み手段は、アドレス発生手段の動作が終了
するのを待つことなく、計算結果を第1及び第2の先入
れ先出しメモリ手段を書込むことによって、次の直1/
s座標の計算に移ることができる。
The start/end point writing means writes the calculation results to the first and second first-in, first-out memory means without waiting for the completion of the operation of the address generating means to write the calculation results to the first and second first-in, first-out memory means.
Now we can move on to calculating the s coordinate.

逆に、アドレス発生手段の動作時間が始点終点書込み手
段のソフトウェア処理より短い場合にも、次の直線の始
点と終点の値が、第1及び第2の先入れ先出しメモリ手
段上に蓄積されていれば、アドレス発生手段は、始点終
点書込み手段の計算を待つことなく1次の動作に移るこ
とができる。従って1時間待ちが不要になるので、図形
の描画時間を短縮することができる。
Conversely, even if the operating time of the address generation means is shorter than the software processing of the start and end point writing means, if the values of the start and end points of the next straight line are stored in the first and second first-in, first-out memory means, , the address generation means can move on to the primary operation without waiting for the calculation by the start/end point writing means. Therefore, it is no longer necessary to wait for one hour, so that the drawing time for figures can be shortened.

また1本発明によれば5図形の濃度もしくは色のデータ
は、データ保持手段に保持された後で第3の先入れ先出
しメモリ手段に書込まれる。従って、描画すべき図形の
濃度もしくは色に変更がない限り、データ保持手段に保
持した同一のデータを繰り返し第3の先入れ先出しメモ
リ手段に書込めばよいので、始点終点書込み手段は、濃
度もしくは色が変化するまで、データ保持手段のデータ
を更新する必要はなく、処理がn略化されるので、濃度
もしくは色の変更がない場合には、更に図形の描画時間
が短縮される。
According to one aspect of the present invention, the density or color data of the five figures is stored in the data holding means and then written into the third first-in first-out memory means. Therefore, as long as there is no change in the density or color of the figure to be drawn, it is sufficient to repeatedly write the same data held in the data holding means into the third first-in, first-out memory means. There is no need to update the data in the data holding means until a change occurs, and the processing is simplified, so if there is no change in density or color, the drawing time of the figure is further shortened.

本発明のその他の目的及び特徴は、以下の9図面を参照
した実施例説明により明らかになろう。
Other objects and features of the present invention will become clear from the description of the embodiments with reference to the following nine drawings.

[実施例] 第1図に1本発明を実施する一形式の画像処理装置の電
気回路を示す、この画像処理装置においては、1ペ一ジ
分の二次元配列された画素の各々にそれぞれ割り当てた
メモリを備えるページメモIJ 160が備わっており
5処理された画像の情報が、このページメモリ160上
に二次元両像として書込まれ、蓄積される。第1図を参
照すると、ページメモリ160には1画素(メモリ)の
X座標を指定するためのXアドレス端子7百素のY座標
を指定するためのYアドレス端子、書込みストローブ入
力端子WE、及びデータ入力端子DIを備えている。
[Example] Fig. 1 shows an electric circuit of one type of image processing device that implements the present invention. A page memo IJ 160 having a memory is provided, and the information of the processed image is written and stored as two-dimensional images on this page memory 160. Referring to FIG. 1, the page memory 160 has an X address terminal for specifying the X coordinate of one pixel (memory), a Y address terminal for specifying the Y coordinate of 700 pixels, a write strobe input terminal WE, and It is equipped with a data input terminal DI.

マイクロコンピュータ!10は、図示しないキーボード
やディスクメモリ装置などの入力装置と接続されており
、所定の指示があると、入力された画像情報に従って、
ページメモリ16〇二次元記憶領域上に図形データの書
込みを行なう、この実施例では、入力される画像情報は
、コード化されており1例えば第2図に示す3角形の図
形であれば、それを示す3点PI、P2及びP3の各座
標値と、その図形の濃度又は色を示す値を含んでいる。
Microcomputer! 10 is connected to an input device (not shown) such as a keyboard or a disk memory device, and when a predetermined instruction is given, the image information is input.
Page memory 160 Graphic data is written on the two-dimensional storage area. In this embodiment, the input image information is encoded. For example, if it is a triangular figure shown in FIG. It includes coordinate values of three points PI, P2, and P3 indicating the figure, and a value indicating the density or color of the figure.

このコード化された画像情報を第2図に示すような二次
元画素群の情報に変換する動作は、マイクロコンピュー
タ110のソフトウェア処理と、第1図に示すその他の
ハードウェア回路の処理との組合せによって実行される
The operation of converting this coded image information into two-dimensional pixel group information as shown in FIG. 2 is a combination of software processing of the microcomputer 110 and processing of other hardware circuits as shown in FIG. executed by

なお、第2図において、ハツチングで示す部分は塗りつ
ぶす部分を示しており、第3図は第2図の一部分A1を
拡大した状態を示している。
In addition, in FIG. 2, the hatched portion indicates the portion to be filled in, and FIG. 3 shows an enlarged view of a portion A1 in FIG. 2.

第2図に示す3角形パターンは1例えばX軸に沿う方向
に向かう、多数の直線によって表現することができる。
The triangular pattern shown in FIG. 2 can be expressed by a large number of straight lines, for example, in a direction along the X-axis.

つまり、この3角形の下端のY座JRYsと上端のY座
標Ygとの間の任意のY座標YOにおいて、この3角形
とそれに接する部分との境界のX座標Xs及びXsを求
め、それらの点を結ぶ直線を描画する。その動作を、Y
sとYeの間の全てのya標について、第3図に示す矢
印の順に繰り返し行なえば、第2図の3角形が描画され
る。
In other words, at an arbitrary Y coordinate YO between the Y coordinate JRYs at the lower end of this triangle and the Y coordinate Yg at the upper end, find the X coordinates Xs and Xs of the boundary between this triangle and the part that touches it, and calculate those points. Draw a straight line connecting them. The movement, Y
If the process is repeated for all ya marks between s and Ye in the order of the arrows shown in FIG. 3, the triangle shown in FIG. 2 will be drawn.

第1図に示す装置においては、二次元図形を構成する多
数の直線の各々の始点のX座II(Xs)と終点のX座
41(Xs)とそのY座1% (Y)がマイクロコンピ
ュータ110の計算によって求められる。そして、マイ
クロコンピュータ110とページメモリ160との間に
接続された電気回路が。
In the device shown in Fig. 1, the starting point of each of the many straight lines constituting a two-dimensional figure, the X locus II (Xs), the ending point X locus 41 (Xs), and the Y locus 1% (Y) are controlled by a microcomputer. It is obtained by calculation of 110. And an electric circuit connected between the microcomputer 110 and the page memory 160.

ハードウェア処理によって、各々の始点と終点とを結ぶ
直線を構成する各画素のアドレス情報を順次に発生し、
そのアドレスに濃度データDATAを書込むように動作
する。
Through hardware processing, address information for each pixel forming a straight line connecting each starting point and ending point is sequentially generated.
It operates to write density data DATA to that address.

第1図を参照すると、マイクロコンピュータ110のデ
ータバスに4つのラッチ121,122゜123及び1
24が接続されており、それぞれのラッチが、マイクロ
コンピュータ110の出力する終点Xe、始点Xs、Y
座標Y、及び濃度データDATAを保持する。
Referring to FIG. 1, the data bus of the microcomputer 110 has four latches 121, 122, 123, and
24 are connected, and each latch receives the end point Xe, start point Xs, and Y output from the microcomputer 110.
Coordinate Y and density data DATA are held.

ラッチ121,122,123及び124の出力端子Q
には、それぞれ、先入れ先出しメモリ(FIF○:ファ
ーストインファーストアウト)131、、132.1.
33及び134が接続されている。この例では、4つの
メモリ131〜134は全て同一の記憶容量を備えてい
る。これらのメモリには、データ入力端子IN、IF込
みストローブ入力端子W、データ出力端子OUT、読出
しストローブ入力端子R,フルフラグ出力端子FF。
Output terminal Q of latches 121, 122, 123 and 124
are first-in-first-out memories (FIF○: first-in-first-out) 131, 132.1, respectively.
33 and 134 are connected. In this example, all four memories 131-134 have the same storage capacity. These memories include a data input terminal IN, an IF strobe input terminal W, a data output terminal OUT, a read strobe input terminal R, and a full flag output terminal FF.

及びエンプティフラグ出力端子FEが備わっている。and an empty flag output terminal FE.

メモリ131〜134は各々N組のデータをその内部に
一度に蓄積することができるが、N組全てのデータが書
込まれると、フルフラグ出力端子FFがアクティブレベ
ル(低レベル:L)になり、蓄積したデータが全て読み
出されて内部のデータが空になると、エンプティフラグ
出力端子FEがアクティブレベル(L)になる。
Each of the memories 131 to 134 can store N sets of data at once, but when all N sets of data are written, the full flag output terminal FF becomes active level (low level: L). When all the accumulated data is read out and the internal data becomes empty, the empty flag output terminal FE becomes active level (L).

マイクロコンピュータ110が出力する終点座標Xeは
、ラッチ121にラッチされた後、メモリ131に書込
まれ、その後で読み出されて、比較器153の入力端子
Pに印加される。同様に、マイクロコンピュータ110
.が出力する始点座標Xttは、ラッチ122にラッチ
された後、メモリ132に書込まれ、その後で読み出さ
れて、カウンタ152のプリセットデータ入力端子Aに
印加される。
The end point coordinate Xe output by the microcomputer 110 is latched by the latch 121, written to the memory 131, and then read out and applied to the input terminal P of the comparator 153. Similarly, the microcomputer 110
.. The starting point coordinates Xtt outputted by is latched by the latch 122, written to the memory 132, and then read out and applied to the preset data input terminal A of the counter 152.

カウンタ152は、データ入力端子Aに印加されろデー
タをプリセットした後で1発振器151の出力するクロ
ックパルスを計数し、計数値をその出力端子Qに出力す
る。カウンタ152のプリセット値はXsなので、カウ
ンタ152の出力端子Qに呪われる値は、Xs、Xs+
1.Xs+2゜X s + 3 lX s + 4 #
・・・・と順次に変化する。この値は、ページメモリ1
60のXアドレス端子に印加され、同時に比較器153
の入力端子Qに印加される。
After presetting the data applied to the data input terminal A, the counter 152 counts the clock pulses output from the first oscillator 151 and outputs the counted value to its output terminal Q. Since the preset value of the counter 152 is Xs, the cursed value at the output terminal Q of the counter 152 is Xs, Xs+
1. Xs+2゜Xs+3 lXs+4#
...changes sequentially. This value is page memory 1
60 and at the same time comparator 153.
is applied to the input terminal Q of.

比較器153は、2組の入力端子PとQの値を比較する
。そして、Pの値とQの値が同一でない間は出力端子P
≠Qをアクティブ(H)にするが。
Comparator 153 compares the values of two sets of input terminals P and Q. Then, while the value of P and the value of Q are not the same, the output terminal P
≠ Make Q active (H).

Qの値がPの値に達すると、即ち生成したX座標のアド
レスが終点の座IRX eに達すると、出力端子P≠Q
のレベルを低レベルLに切換え、1ライン分の動作が終
了したことを示す。
When the value of Q reaches the value of P, that is, when the address of the generated X coordinate reaches the end point IRX e, the output terminal P≠Q
The level of is switched to low level L, indicating that the operation for one line has been completed.

比較器153のP≠Q端子から出力される信号は、カウ
ンタヱ52の計数許可入力端子ENに印加され、信号が
Lになると、カウンタ152は計数動作が禁止される。
The signal output from the P≠Q terminal of the comparator 153 is applied to the counting permission input terminal EN of the counter 52, and when the signal becomes L, the counting operation of the counter 152 is prohibited.

従って、カウンタ152は、計数値がXeに達した時に
計数が停止し、XsからXsまでの範囲で計数を行なう
Therefore, the counter 152 stops counting when the count value reaches Xe, and counts in the range from Xs to Xs.

ゲート154の2つの入力端子には、それぞれ、比較器
153のP≠Q端子から出力される信号及び発振111
51の出力するクロックパルスが印加される。従って、
ゲート154の出力端子には。
The two input terminals of the gate 154 receive the signal output from the P≠Q terminal of the comparator 153 and the oscillation 111, respectively.
51 is applied. Therefore,
At the output terminal of gate 154.

比較器153のP#Q端子がHの時に、即ちカウンタ1
52が計数を行なっている時に、クロックパルスのレベ
ルを反転した信号が呪われる。
When the P#Q terminal of the comparator 153 is H, that is, the counter 1
When 52 is counting, the signal that is the inverted level of the clock pulse is cursed.

つまり、カウンタ152が計数を行なって、それの出力
するXアドレスが更新される毎に、1つのクロックパル
スが、ページメモリ160の書込みストローブ入力端子
WEに印加される。
That is, one clock pulse is applied to the write strobe input terminal WE of page memory 160 each time counter 152 counts and the X address it outputs is updated.

読み出しパルス発生器140は、その内部に図示しない
パルス発生器を備えており、先入れ先出しメモリ134
のエンプティフラグ出力端子FEがHの時(メモリ内に
データが存在する時)に、比較器153のP≠Q端子か
ら出力される信号がL(カウンタが計数停止中)である
と、パルスを発生する。このパルスは、4つの先入れ先
出しメモリ131〜134の各々の読出しストローブ入
力端子Rと、カウンタ152のデータロード入力端子L
Dに印加される。
The read pulse generator 140 includes a pulse generator (not shown) therein, and has a first-in first-out memory 134.
When the empty flag output terminal FE of the comparator 153 is H (when data exists in the memory) and the signal output from the P≠Q terminal of the comparator 153 is L (the counter is stopping counting), a pulse is generated. Occur. This pulse is applied to the read strobe input terminal R of each of the four first-in first-out memories 131 to 134 and the data load input terminal L of the counter 152.
applied to D.

読み出しパルス発生器140がパルスを1つ出力する毎
に、4つの先入れ先出しメモリ131〜134が、それ
らの各々の保持する先頭のデータXs、Xs、Y及びD
ATAを出力端子に出力するとともに、カウンタ152
は入力されるデータXsをプリセットする。
Every time the read pulse generator 140 outputs one pulse, the four first-in first-out memories 131 to 134 read the first data Xs, Xs, Y, and D held by each of them.
While outputting ATA to the output terminal, the counter 152
presets the input data Xs.

カウンタ152がデータXsをプリセットすると、その
出力端子Qの値がXsになり、また比較器のPの値がX
sになるので、PとQの比較結果は不一致になり、比較
器153のP≠Q端子から出力される信号はHに切換わ
る。従って、カウンタ152の計数が許可され、Xsか
らXsまでのアドレスが順次に出力され、それと同時に
書込みパルスがゲート154から出力される。
When the counter 152 presets data Xs, the value of its output terminal Q becomes Xs, and the value of P of the comparator becomes Xs.
s, the comparison result between P and Q becomes inconsistent, and the signal output from the P≠Q terminal of the comparator 153 switches to H. Therefore, counter 152 is allowed to count, addresses from Xs to Xs are sequentially output, and at the same time a write pulse is output from gate 154.

また、先入れ先出しメモリ133の出力するY座標の値
Y、及び先入れ先出しメモリ134の出力する濃度デー
タDATAは、それぞれページメモリ160のYアドレ
ス入力端子及びデータ入力端子DIに印加される。
Further, the Y coordinate value Y output from the first-in first-out memory 133 and the density data DATA output from the first-in first-out memory 134 are applied to the Y address input terminal and data input terminal DI of the page memory 160, respectively.

従って、読出しパルス発生器140が1つのパルスを発
生する毎に、 YIg、標値がYの位置で、X座標値が
x3からXsまでの位置の1つの直線を構成する画素群
の各々のアドレスがページメモリ160に順次に印加さ
れ、そのアドレスに、濃度データDATAが、ゲート1
54の出力する書込みパルスに同期して順次に書込まれ
る。つまり、読出しパルス発生器140が1つのパルス
を発生する毎に、ページメモリ160上で1つの線分の
描画が実行される。
Therefore, each time the readout pulse generator 140 generates one pulse, YIg, the address of each pixel group constituting one straight line at the position where the standard value is Y and the X coordinate value is from x3 to Xs. are sequentially applied to the page memory 160, and the concentration data DATA is applied to the address of the gate 1.
The data are sequentially written in synchronization with the write pulses outputted by 54. That is, each time the read pulse generator 140 generates one pulse, one line segment is drawn on the page memory 160.

第4図に、第1図のマイクロコンピュータ110の処理
の概略を示す、第4図の処理の内容を説明する。
FIG. 4 shows an outline of the processing of the microcomputer 110 of FIG. 1, and the contents of the processing of FIG. 4 will be explained.

ステップ1では、内部メモリ上に描画すべき図形の情報
が存在するか否かをチエツクする。描画すべき情報があ
る場合には1次のステップ2で、1組の図形データを読
込む0例えば、第2図に示す3角形の場合なら、その種
別を示すコード、3つの頂点PI、P2.P3の各座標
値、及び濃度の値DAT^が読込まれる。
In step 1, it is checked whether there is information on the figure to be drawn on the internal memory. If there is information to be drawn, in the first step 2, a set of figure data is read.0For example, in the case of the triangle shown in Figure 2, a code indicating its type, three vertices PI, P2 .. Each coordinate value of P3 and the density value DAT^ are read.

ステップ3では、描画する図形の領域の中で最も小さい
Y座標値Ysを、直線描画用のY座標値レジスタにスト
アする1例えば第2図の3角形の場合には、頂点P1の
Y座標値をY!lとしてレジスタにストアする。
In step 3, the smallest Y coordinate value Ys in the area of the figure to be drawn is stored in the Y coordinate value register for straight line drawing.For example, in the case of the triangle shown in FIG. Y! Store it in the register as l.

ステップ4では、レジスタにストアされたY座標値(最
初はYs)の水平線(X軸に平行な線)と、3角形の輪
郭の線分との2つの交点のX座標値を求め、座標値の小
さい方を始点座41xs+大きい方を終点座標Xsとす
る。
In step 4, the X coordinate value of the two intersections between the horizontal line (line parallel to the X axis) of the Y coordinate value (initially Ys) stored in the register and the line segment of the outline of the triangle is determined, and the coordinate value The smaller one is the starting point coordinate 41xs+the larger one is the ending point coordinate Xs.

ステップ5では、まず、ステップ4で求めた終点のX座
標値Xeをデータバスに出力すると共にパルスCKIを
出力してXsをラッチ121に保持させ1次に、始点の
X座標値X8をデータバスに出力すると共にパルスCK
2を出力してXsをラッチ122に保持させ、更に、ス
テップ3でレジスタにストアしたY座標値をデータバス
に出力すると共にパルスCK3を出力してYをラッチ1
23に保持させる。続いて、図形データの濃度データD
ATAをデータバスに出力すると共に、パルスCK’ 
4を出力してDATAをラッチ124に保持させる。
In step 5, first, the X coordinate value Xe of the end point obtained in step 4 is output to the data bus, and a pulse CKI is output to hold Xs in the latch 121. and pulse CK.
2 is output to hold Xs in the latch 122, and further, the Y coordinate value stored in the register in step 3 is output to the data bus, and a pulse CK3 is output to hold Y in the latch 1.
23 to be held. Next, the density data D of the figure data
At the same time as outputting ATA to the data bus, pulse CK'
4 and causes the latch 124 to hold DATA.

ステップ6では、先入れ先出しメモリ134の出力する
フルプラグFFの状態を参照する。それがアクティブレ
ベルなら、即ちメモリ134の記憶領域に空きがなけれ
ば、空きができるまで、つまりFFがアクティブでなく
なるまで待つ。
In step 6, the state of the full plug FF output from the first-in, first-out memory 134 is referred to. If it is at the active level, that is, if there is no free space in the storage area of the memory 134, it waits until a free space becomes available, that is, until the FF is no longer active.

なお、この例では先入れ先出しメモリ134の出力する
フルフラグを参照しているが、4つの先入れ先出しメモ
リ131〜134は同一構成であり、この例では後述す
るように4つのメモリに同時に同一容量の情報を書込む
ので、4つのメモリ131〜134のいずれが出力する
フルフラグを参照しても同じ結果が得られる。
In this example, the full flag output from the first-in, first-out memory 134 is referred to, but the four first-in, first-out memories 131 to 134 have the same configuration, and in this example, the same amount of information is written to the four memories at the same time, as will be described later. Therefore, the same result can be obtained no matter which of the four memories 131 to 134 outputs the full flag.

ステップ6でフルフラグFFがアクティブでなければ、
ステップ7に進み、CKOに1つのパルスを出力する。
If full flag FF is not active in step 6,
Proceed to step 7 and output one pulse to CKO.

そのパルスの立下り時点において、先入れ先出しメモリ
131,132,133及び134には、それぞれXe
、Xs、Y及びDATAが同時に書込まれる。
At the falling edge of the pulse, first-in, first-out memories 131, 132, 133, and 134 contain Xe
, Xs, Y and DATA are written simultaneously.

ステップ8では、レジスタにストアしたY座標値をイン
クリメント(+1)する、そして次のステップ9でその
内容をチエツクする。つまり、Yの値が描画する図形領
域の中で最も大きいY座標値Yaを越えたか否かを調べ
る* Y) Y6なら、1つの図形の書込みが終了した
ことになる。
In step 8, the Y coordinate value stored in the register is incremented (+1), and in the next step 9, the contents are checked. That is, it is checked whether the Y value exceeds the largest Y coordinate value Ya in the graphic area to be drawn.*Y) If Y6, it means that writing of one graphic has been completed.

Y>Yaでなければ、ステップ9の次にステップ4に戻
って、更新されたY座標値について、再び直線の始点X
sと終点Xsを求め、その直線を描画する。この動作が
、Y)Yeになるまで繰り返し実行される。
If Y>Ya, return to step 4 after step 9 and calculate the starting point X of the straight line again for the updated Y coordinate value.
s and the end point Xs, and draw the straight line. This operation is repeatedly executed until Y)Ye is reached.

一方、先入れ先出しメモリ131〜134にデータが書
込まれると、エンプティフラグFEが非アクティブにな
るので、読み出しパルス発生器140は、先入れ先出し
メモリ131〜134の各々の読出しストローブ入力端
子Rに、1つのパルスを出力する。その結果、カウンタ
152がX座標のアドレス情報を順次に発生するととも
に、ゲート1.54が書込みパルスを出力し、ページメ
モリ160に直線を楕成する画素群のデータが順次に高
速で書込まれろ、その直線の書込みが終了した時に、エ
ンプティフラグFEがアクティブでなければ、即ち次の
直線のデータがメモリ1.31〜134上に存在する時
には、読み出しパルス発生器140が直ちに次のパルス
をメモリ131〜134に出力し1次の直線の描画動作
に移る。
On the other hand, when data is written to the first-in, first-out memories 131 to 134, the empty flag FE becomes inactive, so the read pulse generator 140 outputs one pulse to the read strobe input terminal R of each of the first-in, first-out memories 131 to 134. Output. As a result, the counter 152 sequentially generates X-coordinate address information, and the gate 1.54 outputs a write pulse, so that the data of the pixel group forming an elliptical straight line is sequentially written into the page memory 160 at high speed. , when writing of that straight line is completed, if the empty flag FE is not active, that is, when data of the next straight line exists in the memories 1.31 to 134, the read pulse generator 140 immediately writes the next pulse to the memory. It outputs signals 131 to 134 and moves on to the drawing operation of the first-order straight line.

つまり、先入れ先出しメモリ131−134の出力側で
は、それらのメモリにデータが存在する限り、マイクロ
コンピュータ110の動作タイミングとは無関係に(即
ち非同期で)、直線の描画動作を行なう、逆にマイクロ
コンピュータ110は、先入れ先出しメモリ131−1
34の記憶領域の空きがなくならない限り、カウンタ1
52等のハードウェア回路の直線描画動作の実行とは無
関係に、つまり第4図のステップ6で時間待ちをするこ
となく、座標Xs、Xeの計算などの処理を続けること
ができる。従って、無駄な動作がなくなり、処理時間が
短縮される。
In other words, on the output side of the first-in, first-out memories 131-134, as long as data exists in those memories, a straight line drawing operation is performed regardless of the operation timing of the microcomputer 110 (i.e., asynchronously). is first-in first-out memory 131-1
Counter 1 will remain as long as there is no free space in the storage area of 34.
Processing such as calculation of the coordinates Xs and Xe can be continued regardless of the execution of the straight line drawing operation by the hardware circuit such as 52, that is, without waiting for time in step 6 of FIG. Therefore, unnecessary operations are eliminated and processing time is shortened.

ところで、この種の画像処理装置で扱われる個々の図形
上の濃度もしくは色は一定である。従って、同一の図形
に対する描画処理を行なっている間は。
Incidentally, the density or color of each figure handled by this type of image processing apparatus is constant. Therefore, while performing drawing processing on the same figure.

ページメモリ160に書込むべき濃度(もしくは色)デ
ータDATAは一定である。この実施例では、マイクロ
コンピュータ110が出力する濃度データDATAはラ
ッチ124によって一時的に保持され。
Density (or color) data DATA to be written into page memory 160 is constant. In this embodiment, the concentration data DATA output from the microcomputer 110 is temporarily held by the latch 124.

その保持されたデータが、Xs、Xs及びYtt先入れ
先出しメモリ131〜133に書込む時に、先入れ先出
しメモリ134に同時に書込まれる。
When the held data is written to the Xs, Xs, and Ytt first-in-first-out memories 131-133, it is simultaneously written to the first-in, first-out memory 134.

このため、濃度データDATAを変更する必要のない間
は、マイクロコンピュータ110は、第41!lのステ
ップ5で、ラッチ124にデータDATAを書込む処理
を省略する。つまり、濃度又は色が同じ図形を描画して
いる間は、ステップ5では、Xa。
Therefore, while there is no need to change the concentration data DATA, the microcomputer 110 does not change the 41st! In step 5 of 1, the process of writing data DATA to the latch 124 is omitted. That is, while drawing figures with the same density or color, in step 5, Xa.

Xs及びYだけを書込めばよく、図形の描画時間が更に
短縮される。
It is only necessary to write Xs and Y, which further reduces the drawing time of the figure.

[効果] 以上のとおり1本発明を用いれば、ハードウェア装置と
ソフトウェア処理との組合せによって、高速で図形を描
画することが可能になる。特に、ソフトウェアとハード
ウェアとの間のデータの受渡しの部分でソフトウェア側
及びハードウェア側の無駄な時間待ちを減らすことがで
きるので、実質的な図形の描画時間が従来より大幅に短
縮されろ。
[Effects] As described above, by using the present invention, it becomes possible to draw figures at high speed by combining a hardware device and software processing. In particular, it is possible to reduce wasted waiting time on the software and hardware sides in the part of data transfer between the software and hardware, so that the actual figure drawing time can be significantly shortened compared to the conventional method.

また特に、図形の濃度や色の変更が少ない場合には、始
点終点書込み手段(110)のデータ保持手段(124
)に対するデータ更新処理の回数が少なくなるので、ソ
フトウェアの処理量が減り、図形の描画時間が更に短縮
される。
In particular, when there are few changes in the density or color of the figure, the data holding means (124) of the start point/end point writing means (110)
), the amount of software processing is reduced, and the time required to draw figures is further shortened.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は5本発明を実施する画像処理装置の主要部の電
気回路を示すブロック図である。 第2図は、第1図の装置が描画する図形の一例を示す平
面図、第3図は第2図の一部分AIを拡大して示す平面
図である。 第4図は、第1図のマイクロコンピュータ11Oの動作
の概略を示すフローチャートである。 110:マイクロコンピュータ(始点終点書込み手段)
121〜I24:ラッチ    124:(データ保持
手R)131〜】34:先入れ先出しメモリ 131:  (第2の先入れ先出しメモリ手段)132
:  (第1の先入れ先出しメモリ手段)134:(第
3の先入れ先出しメモリ手段)140:読み出しパルス
発生器(読み出しパルス発生手段)151:発撮語 152:カウンタ(アドレス発生手段)153:比較器
        154:ゲート160:ページメモリ 14図 厄 斎 図 e X和
FIG. 1 is a block diagram showing the electrical circuit of the main part of an image processing apparatus embodying the present invention. FIG. 2 is a plan view showing an example of a figure drawn by the apparatus shown in FIG. 1, and FIG. 3 is a plan view showing an enlarged part AI of FIG. FIG. 4 is a flow chart showing an outline of the operation of the microcomputer 11O shown in FIG. 110: Microcomputer (starting point/end point writing means)
121-I24: Latch 124: (Data holding hand R) 131-] 34: First-in, first-out memory 131: (Second first-in, first-out memory means) 132
: (First first-in, first-out memory means) 134: (Third first-in, first-out memory means) 140: Read pulse generator (read pulse generation means) 151: Sent word 152: Counter (address generation means) 153: Comparator 154: Gate 160: Page memory 14 diagram Yakusai diagram e X sum

Claims (1)

【特許請求の範囲】 複数の始点アドレスを記憶する、第1の先入れ先出しメ
モリ手段; 複数の終点アドレスを記憶する、第2の先入れ先出しメ
モリ手段; 図形の濃度もしくは色のデータを保持する、データ保持
手段; データ入力端子が前記データ保持手段の出力端子に接続
され、複数の濃度もしくは色のデータを記憶する、第3
の先入れ先出しメモリ手段;前記第1及び第2の先入れ
先出しメモリ手段ならびに、前記データ保持手段のデー
タ入力端子と接続され、図形の始点と終点のアドレス値
を計算するとともに、計算した始点及び終点のアドレス
値をそれぞれ前記第1及び第2の先入れ先出しメモリ手
段のデータ入力端子に印加した状態で、第1、第2及び
第3の先入れ先出しメモリ手段に全てに同時に書込み信
号を印加する、始点終点書込み手段; 前記第1、第2及び第3の先入れ先出しメモリ手段に読
み出しパルスを印加する、読み出しパルス発生手段; 前記第1及び第2の先入れ先出しメモリ手段のデータ出
力端子に接続され、始点と終点のアドレスに基づいてそ
れらの間のアドレスを順次に発生するカウンタを含む、
アドレス発生手段;及び前記アドレス発生手段の出力端
子、及び前記第3の先入れ先出しメモリ手段の出力端子
と接続された、図形出力手段; を備える図形データ書込装置。
[Claims] First first-in, first-out memory means for storing a plurality of starting point addresses; Second first-in, first-out memory means for storing a plurality of end-point addresses; Data holding means for holding density or color data of figures. ; a third data input terminal connected to the output terminal of the data holding means and storing data of a plurality of densities or colors;
first-in, first-out memory means; connected to the first and second first-in, first-out memory means and the data input terminal of the data holding means, which calculates the address values of the starting point and ending point of the figure, and the calculated address values of the starting point and ending point; starting point and ending point writing means for simultaneously applying a write signal to all of the first, second and third first-in, first-out memory means while applying a write signal to the data input terminals of the first and second first-in, first-out memory means, respectively; read pulse generating means for applying read pulses to the first, second and third first-in, first-out memory means; connected to the data output terminals of the first and second first-in, first-out memory means; Contains a counter that sequentially generates addresses between them,
A graphic data writing device comprising: address generating means; and graphic output means connected to an output terminal of the address generating means and an output terminal of the third first-in, first-out memory means.
JP1034329A 1989-02-14 1989-02-14 Graphic data writing device Pending JPH02212890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1034329A JPH02212890A (en) 1989-02-14 1989-02-14 Graphic data writing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1034329A JPH02212890A (en) 1989-02-14 1989-02-14 Graphic data writing device

Publications (1)

Publication Number Publication Date
JPH02212890A true JPH02212890A (en) 1990-08-24

Family

ID=12411115

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1034329A Pending JPH02212890A (en) 1989-02-14 1989-02-14 Graphic data writing device

Country Status (1)

Country Link
JP (1) JPH02212890A (en)

Similar Documents

Publication Publication Date Title
US5291582A (en) Apparatus for performing direct memory access with stride
JPS60239796A (en) Circuit and apparatus for altering data in display memory
EP0409285B1 (en) Method and apparatus for data transfer between processor elements
JPS63198174A (en) Graphic processor
JPH0355832B2 (en)
JPH087569B2 (en) Display controller
JPS63159961A (en) Transfer controller for direct memory access
JPH02212890A (en) Graphic data writing device
US4987553A (en) Straight line drawing control apparatus
JPH0438389Y2 (en)
JP4482996B2 (en) Data storage apparatus and method and image processing apparatus
JPH0112309Y2 (en)
EP0357076A2 (en) Inclined rectangular pattern generating system
JP2605609B2 (en) Dot display processing device
JPS5840664A (en) Buffer memory device
JP2000242802A (en) Graphic processor
JPH09212253A (en) Fifo processing circuit and data pattern generating device using same
JPH07234946A (en) Method and device for plotting polygon
JPH0388022A (en) Image display device
JPH0519158B2 (en)
JPH0528399B2 (en)
JPH03225394A (en) Character generation device
JPH0954834A (en) Image display controller
JPH0683768A (en) Data transfer system
JPS6165292A (en) Graphic display unit