JPH03292575A - Address generating device - Google Patents
Address generating deviceInfo
- Publication number
- JPH03292575A JPH03292575A JP2095814A JP9581490A JPH03292575A JP H03292575 A JPH03292575 A JP H03292575A JP 2095814 A JP2095814 A JP 2095814A JP 9581490 A JP9581490 A JP 9581490A JP H03292575 A JPH03292575 A JP H03292575A
- Authority
- JP
- Japan
- Prior art keywords
- register
- memory
- graphics data
- address
- pixels
- 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
Links
Landscapes
- Image Input (AREA)
- Image Generation (AREA)
- Memory System (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明(よ 文字や図形などのグラフィックスデータを
発生する情報処理システムにおいて、グラフィックスデ
ータを保持するメモリに対してアドレスを発生するアド
レス発生装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to an address generation device that generates an address for a memory that holds graphics data in an information processing system that generates graphics data such as characters and figures. It is something.
従来の技術
従来のアドレス発生装置の一例(例えば 日経データプ
ロ・マイコン、MCl−164−002,1986年6
月、日経マグロウヒル社)を第4図に示す。Prior Art An example of a conventional address generator (for example, Nikkei Data Pro Microcomputer, MCl-164-002, June 1986)
(Nikkei McGraw-Hill, Inc.) is shown in Figure 4.
第4図は 2次元空間上でのグラフィックスデータのピ
クセルとメモリ上でのアドレスとの関係を示す構成図で
あも 第4図において、410は2次元空間上でのグラ
フィックスデー久 411〜413はグラフィックスデ
ータ410のピクセル猟 420はグラフィックスデー
タ410を保持するメモリ、 421〜423はメモリ
420上のアドレスであム メモリ420の1ワードを
構成するビット数をnとすも
グラフィックスデータ410のビクセル(戴1行(X方
向)のn個毎に 順次メモリ420に保持されも 例え
ば n個のビクセル群411、412、413、・・・
はそれぞれアドレス421、422、423、・・・に
保持されも メモリ上のアドレスをA R,そのアドレ
スが示すワード内のビット位置をBP、2次元空間上の
X座標をX、 Y座標をY、空間幅ワード数をWDT
、原点アドレスをORGとすると、ピクセルの座標(X
、Y)からアドレスARとビット位置BPは次の式で求
められも
AR=ORG+WDTxY+ [X/n] −(1)B
P=mo d (X、 n) −
(2)ただL [a]はaを越えない最大の整数、m
0d(a、b)はa / bの剰余とす4発明が解決し
ようとする課題
近低 プロセッサの実行速度は年々著しく向上する傾向
にあるバ それに対してメモリのアクセス速度が追いつ
いていな(〜 従って、情報処理システムを設計する上
で、メモリに対するアクセスをいかに高速に行うかがキ
ーポイントとなっていも このため番ミ キャッシュメ
モリを外部のメモリとの間に設置し アクセス速度のギ
ャップを埋める工夫が一般に行われていも アクセスす
るデータがキャッシュメモリにない場合(よ キャッシ
ュメモリと外部のメモリとの間でデータの入れ替えが発
生すも このた取 アクセスするデータが局所的であれ
ばキャッシュメモリの効果は大きく、大局的であれば効
果は少なt〜
文字や図形などのグラフィックスデータを発生する場合
、例えば直線を発生する場合を考えると、ピクセルの座
標は8近傍に変化しうも 第5図圏グラフィックスデー
タ510上での座標変化の例を示す。第5図の例におい
て、現在のビクセルのアドレスをTA、Rとすると、X
座標の正負方向(1)、(5)に変化する場合に(友
変化後のビクセルのアドレスもTARであム その他の
6方向(2)〜(4)、(6)〜(8)に変化する場合
にζよ 変化後のピクセルのアドレスは(1)式からT
AR−WDT、 TAR+WDTとなり、TARから
WDTだけ離れたアドレスとなム ここで、 8近傍の
各方向に変化する確率が等しいとしたときへ 隣接する
アドレスTAR−1、TAR,TAR+1のいずれかに
変化する確率を求めも 例えii 1ワードを構成する
ビット数n=16の場合、各ビクセルの変化方向は8通
りなので、 1ワードでは16X8=128通りの場合
があa そのう板 隣接するアドレスに変化するのζよ
各ピクセルともX座標の正負方向の2通りだけなので
、 1ワードでは16X2=32通りであム 従って確
率(よ32/128=0. 25
となり、アドレスの連続性は少なl、% その他のグ
ラフィックスデータの発生にお0てL 座標Gt 8近
傍に変化しうるた八 アドレスの連続性は一般に少ない
と考えられる。従って、グラフィックスデータの局所性
は少なく、キャッシュメモリの効果が少なくなム
さらC二 近年はグラフィックスデータの高解像度化
が進んでいる。現在のCRTの解像度は高解像度のもの
で約100dpi (1インチあたりI00ピクセル
)程度であり、プリンタの解像度は高解像度のもので約
300〜400dpiである。FIG. 4 is a configuration diagram showing the relationship between pixels of graphics data in a two-dimensional space and addresses on the memory. In FIG. 420 is a memory that holds the graphics data 410, 421 to 423 are addresses on the memory 420, where n is the number of bits constituting one word of the memory 420, and the graphics data 410 is For example, groups of n pixels 411, 412, 413,...
are held at addresses 421, 422, 423, etc., respectively. The address in memory is A, the bit position in the word indicated by that address is BP, the X coordinate in two-dimensional space is X, and the Y coordinate is Y. , the number of space width words is WDT
, let the origin address be ORG, then the pixel coordinates (X
, Y), address AR and bit position BP can be found using the following formula: AR=ORG+WDTxY+ [X/n] - (1)B
P=mod (X, n) −
(2) where L [a] is the largest integer not exceeding a, m
0d (a, b) is the remainder of a / b 4 Problems to be solved by the invention The execution speed of processors has been increasing significantly year by year, but the access speed of memory has not kept up with it (~ Therefore, when designing an information processing system, the key point is how fast the memory can be accessed.For this reason, it is important to install cache memory between external memory and fill the gap in access speed. Even if this is generally done, if the data to be accessed is not in the cache memory (if the data is exchanged between the cache memory and external memory), the effect of cache memory is that if the data to be accessed is local. is large, and the effect is small in the global picture.When generating graphics data such as characters and figures, for example when generating a straight line, the pixel coordinates may change to around 8. An example of a coordinate change on the area graphics data 510 is shown.In the example of FIG. 5, if the current pixel addresses are TA and R,
When the coordinates change in the positive and negative directions (1) and (5),
The address of the pixel after the change is also TAR.When changing in the other six directions (2) to (4) and (6) to (8), the address of the pixel after the change is TAR from equation (1).
AR-WDT, TAR+WDT, and the address is WDT away from TAR. Now, suppose that the probabilities of change in each of the 8 neighboring directions are equal. If the address changes to one of the adjacent addresses TAR-1, TAR, or TAR+1. For example, if the number of bits that make up one word is n = 16, there are 8 ways for each pixel to change, so there are 16 x 8 = 128 ways for one word. Because each pixel has only two ways of X coordinate, positive and negative, there are 16x2 = 32 ways for one word. Therefore, the probability (y32/128 = 0.25), and the continuity of the address is small l,% When other graphics data is generated, the L coordinate Gt may change to around 8, and the continuity of addresses is generally considered to be low.Therefore, the locality of graphics data is low, and the effect of cache memory is small. Namusara C2 In recent years, the resolution of graphics data has been increasing.The resolution of current CRTs is about 100 dpi (100 pixels per inch), and the resolution of printers is about 100 dpi (I00 pixels per inch). It is approximately 300 to 400 dpi.
特に マンマシンインターフェース向上のためのグラフ
ィカルユーザーインターフェースが普及するに従uX、
CRTにもプリンタと同程度の解像度が必要になって来
てい4 CRTはプリンタと異なりリアルタイム性が
要求されるた取 グラフィックスデータの高速発生が不
可欠となる。しかし低解像度でも高解像度でも発生する
グラフィックスデータの形状自体の大きさは同じなので
、高解像度になるほどグラフィックスデータを構成する
ピクセル数が増加し 処理時間が増大する。In particular, as graphical user interfaces for improving man-machine interfaces become widespread,
CRTs are now required to have the same resolution as printers.4 Unlike printers, CRTs require real-time performance, and high-speed generation of graphics data is essential. However, since the size of the shape itself of the graphics data generated is the same regardless of whether the resolution is low or high, the higher the resolution, the greater the number of pixels composing the graphics data and the longer the processing time.
例えば 第6図に示すような形状610を発生する場合
低解像度のグラフィックスデータ620では4ビクセ
ルで構成されるM X方向とY方向の解像度をそれぞ
れ2倍にした高解像度のグラフィックスデータ630で
は16ピクセル必要にな4 低解像度ではアドレス62
1〜624の4つのアドレスにアクセスすればよい力(
高解像度ではアドレス631〜638の8つのアドレス
にアクセスしなくてはならな(℃ 高解像度になるほど
、発生するグラフィックスデータの形状は面的な広がり
を持ったへ アクセスするアドレス数が増加すム 前に
説明したようにメモリに対するアクセスは遅いた数 メ
モリに対するアクセス回数が大きく増えると、全体の処
理時間が大きく増大する。For example, when generating a shape 610 as shown in FIG. 6, low-resolution graphics data 620 is composed of 4 pixels, and high-resolution graphics data 630 with twice the resolution in both the X and Y directions is 16 pixels required 4 Address 62 for low resolution
The ability to access four addresses from 1 to 624 (
At high resolution, eight addresses from 631 to 638 must be accessed (°C) As the resolution increases, the shape of the generated graphics data becomes wider in area.The number of addresses to be accessed increases. As explained earlier, accessing memory is slow. If the number of accesses to memory increases significantly, the overall processing time increases significantly.
上記のように 第4図の構成を持つようなアドレス発生
装置で1友 発生するグラフィックスデータのピクセル
間のアドレスの連続性が少ないためキャッシュメモリの
効果が発揮されにくく、また高解像度のグラフィックス
データではメモリに対するアクセス回数が大きく増加し
処理時間が増大してしまう。As mentioned above, an address generator with the configuration shown in Figure 4 is a good choice.Since there is little continuity of addresses between pixels of generated graphics data, it is difficult to demonstrate the effect of cache memory, and it is difficult to use high-resolution graphics. For data, the number of accesses to memory increases significantly, increasing processing time.
請求項1の本発明はかかる点に鑑へ 発生するグラフィ
ックスデータのピクセル間のアドレスの連続性を大きく
することができるアドレス発生装置を提供することを特
徴とする
請求項2の本発明はかかる点に鑑へ 高解像度でのメモ
リに対するアクセス回数を少なくすることができるアド
レス発生装置を提供することを目的とすも
課題を解決するための手段
請求項1の本発明(よ 上記の課題を解決するために−
,グラフィックスデータのX座標を保持する第一のレジ
スタと、グラフィックスデータのY座標を保持する第二
のレジスタと、グラフィックスデータを2次元空間上の
ピクセルの集合として保持しY方向に隣接するピクセル
を連続するアドレスで表わすメモリと、前記第一のレジ
スタの値と前記第二のレジスタの値で指定されるピクセ
ルの座標を前記メモリ上でのアドレスに変換する変換手
段を備えたアドレス発生装置であも
請求項2の本発明(上 上記の課題を解決するために
グラフィックスデータのX座標を保持する第一のレジス
タと、グラフィックスデータのY座標を保持する第二の
レジスタと、グラフィックスデータを2次元空間上のピ
クセルの集合として保持し2次元空間を1辺が2ビクセ
ル以上の矩形領域でタイル状に分割して各矩形領域内の
ピクセルを同一のアドレスで表わすメモリと、前記第一
のレジスタの値と前記第二のレジスタの値で指定される
ピクセルの座標を前記メモリ上でのアドレスに変換する
変換手段を備えたアドレス発生装置である。In view of this point, the present invention as claimed in claim 1 provides an address generation device that can increase the continuity of addresses between pixels of generated graphics data. In view of the above, it is an object of the present invention to provide an address generator capable of reducing the number of accesses to a memory at high resolution. In order to-
, a first register that holds the X coordinate of graphics data, a second register that holds the Y coordinate of graphics data, and a register that holds the graphics data as a set of pixels in a two-dimensional space that are adjacent in the Y direction. an address generator comprising: a memory for representing pixels to be stored as consecutive addresses; and a conversion means for converting the coordinates of the pixel specified by the value of the first register and the value of the second register into an address on the memory. The present invention of claim 2 (above) is an apparatus for solving the above problems.
A first register that holds the X coordinate of graphics data, a second register that holds the Y coordinate of graphics data, and a register that holds the graphics data as a set of pixels in a two-dimensional space and divides the two-dimensional space into one. A memory that is divided into tiles in a rectangular area with sides of 2 pixels or more and represents pixels in each rectangular area with the same address, and a pixel specified by the value of the first register and the value of the second register. The address generating device is provided with a conversion means for converting the coordinates of , into an address on the memory.
作 用
請求項1の本発明は上記した構成により、グラフィック
スデータを保持するメモリがY方向に隣接するピクセル
を連続するアドレスで表わし レジスタに保持される(
X、Y)座標から変換手段がメモリへのアドレスを発生
するので、発生するグラフィックスデータのピクセル間
のアドレスの連続性を大きくすることができも
請求項2の本発明は上記した構成により、グラフィック
スデータを保持するメモリが矩形領域内のピクセルを1
つのアドレスで表わし レジスタに保持される(X、
Y)座標から変換手段がメモリへのアドレスを発生す
るので、高解像度で発生するグラフィックスデータのピ
クセルが占めるアドレス数が少なくなり、メモリへのア
クセス回数を少なくすることができも
実施例
第1図は請求項1の本発明のアドレス発生装置の一実施
例を示すブロック図である。第1図において、 110
はX座標(X)を保持するレジス久120はY座1 (
Y)を保持するレジス久 130は2次元空間上でのグ
ラフィックスデー久 131〜133はグラフィックス
データ130のピクセル猟 140はグラフィックスデ
ータ130を保持するメモリ、 141〜143はメモ
リ140上のアドレス 150はレジスタ110の値と
レジスタ120の値で示される(X、 Y)座標をメ
モリ140上のアドレスに変換する変換半成151はア
ドレス(AR)を保持するレジス久152は空間高ワー
ド数(HGT)を保持するレジス久 153は値′ 1
″を保持するレジス久154はレジスタ152の値とレ
ジスタ153の値を選択するセレク久 155はレジス
タ151の値とセレクタ154の出力を加減算する加減
算器 156はワード内ビット位置(BP)を保持する
レジス久 157はレジスタ156の値を±1するイン
クリメンタ/デクリメンタ 158はグラフィックスデ
ータ130の原点アドレス(ORG)とメモリ140の
1ワードを構成するビット数(n)を保持するレジスタ
猟 159は演算器であも
以上のように構成された本実施例のアドレス発生装置に
ついて、以下にその動作を説明すも グラフィックスデ
ータ130のピクセルCL n列毎の領域に分割され
各領域の1行のn個毎く Y座標が増加する順番で順
次メモリ140に保持され4 例え(瓜 ピクセル群1
31、132、133、・・・はそれぞれアドレス14
1、142、143、・・・に保持されも
ピクセルの座標(X、 Y)からアドレスARとビッ
ト位置BPを求める場合には レジスタ110、120
、152の値とレジスタ群158の値との間で演算器1
59により次の計算を行℃(レジスタ151、156に
格納すム
AR=○RG+Y+HGTX [X/n] ・(3)B
P=mod (X、 n) ・=(4
)ただり、[a]はaを越えない最大の整数、m0d(
a、b)はa / bの剰余とすもピクセルの座標がX
座標の正負方向に変化する場合にζ友 次のような動作
が行われも まず、レジスタ156の値がインクリメン
タ/デクリメンタ157により±1され 再びレジスタ
156に格納されも このときオーバーフロー/アンダ
ーフローが発生すると、さら番二 レジスタ151の値
とセレクタ154により選択されたレジスタ152の値
が加減算器155により加減算(AR±HGT)され
再びレジスタ151に格納されもこの動作は 座標変化
が左右のワード境界を越える場゛合に発生すも
ピクセルの座標がY座標の正負方向に変化する場合に(
友 次のような動作が行われも レジスタ151の値と
セレクタ154により選択されたレジスタ153の値が
加減算器155により加減算(AR±1)され 再びレ
ジスタ151に格納されも
ピクセルの座標がそれ以外の斜め4方向に変化する場合
にCt 次のような動作が行われも まず、レジスタ
151の値とセレクタ154により選択されたレジスタ
153の値が加減算器155により加減算−(AR±1
)され 再びレジスタ151に格納されも 同時へ レ
ジスタ156の値がインクリメンタ/デクリメンタ15
7により±1され 再びレジスタ156に格納されも
このときオーバーフロー/アンダーフローが発生すると
、さらく レジスタ151の値とセレクタ154により
選択されたレジスタ152の値が加減算器155により
再び加減算((AR±1)±HGT)され 再びレジス
タ151に格納されもここて 従来例と同様&へ ピク
セルの座標が8近傍の各方向に変化する確率が等しいと
したときα 隣接するアドレスに変化する確率を求める
。Operation The present invention according to claim 1 has the above-described configuration, so that the memory for holding graphics data represents pixels adjacent in the Y direction by consecutive addresses, and the data is stored in a register (
Since the conversion means generates an address to the memory from the (X, Y) coordinates, it is possible to increase the continuity of addresses between pixels of generated graphics data. The memory that holds graphics data stores pixels within a rectangular area as 1
represented by two addresses and held in a register (X,
Y) Since the conversion means generates addresses to the memory from the coordinates, the number of addresses occupied by pixels of graphics data generated at high resolution is reduced, and the number of accesses to the memory can be reduced. FIG. 1 is a block diagram showing an embodiment of the address generation device of the present invention. In Figure 1, 110
holds the X coordinate (X) Regis Ku 120 holds the Y coordinate 1 (
130 is a graphics data storage in two-dimensional space. 131 to 133 are pixel captures of graphics data 130. 140 is a memory that holds graphics data 130. 141 to 143 are addresses on memory 140 150 converts the (X, Y) coordinates indicated by the values of the register 110 and the register 120 into an address on the memory 140. The conversion half 151 holds the address (AR). The register 152 stores the space high word number (HGT). ) is the value '1
155 is an adder/subtractor that adds and subtracts the value of register 151 and the output of selector 154. 156 is a register that holds the bit position (BP) in a word. 157 is an incrementer/decrementer that increases the value of the register 156 by ±1. 158 is a register that holds the origin address (ORG) of the graphics data 130 and the number of bits (n) that constitute one word of the memory 140. 159 is an operation. The operation of the address generating device of this embodiment configured as described above will be explained below. Each pixel is stored in the memory 140 in order of increasing Y coordinate.
31, 132, 133, ... are each address 14
1, 142, 143, etc. When calculating the address AR and bit position BP from the pixel coordinates (X, Y), use registers 110 and 120.
, 152 and the value of the register group 158.
59, perform the following calculation (store in registers 151 and 156) AR=○RG+Y+HGTX [X/n] ・(3)B
P=mod (X, n) ・=(4
) or [a] is the largest integer not exceeding a, m0d(
a, b) is the remainder of a/b and the pixel coordinates are X
When the coordinates change in the positive/negative direction, the following operations are performed: First, the value in the register 156 is incremented by ±1 by the incrementer/decrementer 157, and then stored in the register 156 again.At this time, overflow/underflow occurs. When this occurs, the value of the register 151 and the value of the register 152 selected by the selector 154 are added and subtracted by the adder/subtractor 155 (AR±HGT).
This operation occurs when the coordinate change crosses the left and right word boundaries, but when the pixel coordinate changes in the positive/negative direction of the Y coordinate (
Friend: Even if the following operation is performed, the value of the register 151 and the value of the register 153 selected by the selector 154 are added/subtracted (AR±1) by the adder/subtractor 155 and stored in the register 151 again, but the pixel coordinates are different from the above. When Ct changes in four diagonal directions, the following operation is performed. First, the value of the register 151 and the value of the register 153 selected by the selector 154 are added and subtracted by the adder/subtractor 155 - (AR±1
) and stored in register 151 again, the value in register 156 is stored in incrementer/decrementer 15 at the same time.
7 and stored in register 156 again.
If an overflow/underflow occurs at this time, the value of the register 151 and the value of the register 152 selected by the selector 154 are added/subtracted again by the adder/subtractor 155 ((AR±1)±HGT) and stored in the register 151 again. Similarly to the conventional example > Assuming that the probability that the coordinates of a pixel changes in each of the eight neighboring directions is equal, calculate the probability that the coordinates of a pixel change to an adjacent address α.
例えば lワードを構成するビット数n=16の場合
各ピクセルの変化方向は8通りなので、 1ワードでは
16X8=128通りの場合がある。For example, when the number of bits composing l word is n = 16
Since each pixel can change in 8 ways, there are 16×8=128 ways in one word.
そのう板 隣接するアドレスに変化するのは 左右端の
ピクセルが5通りでその他のピクセルが8通りなので、
1ワードでは2X5+14X8=122通りであも
従って確率は
122/128=0. 95・・・
となり、従来例の確率0.25と比較してアドレスの連
続性を大きくすることができも
な耘 本実施例でC″L Iビクセルを表現するビット
数を1ビツトとした力交 複数ビットで表現しても同様
の効果が得られる。また 本実施例ではグラフィックス
データのピクセルを、n列毎の領域に分割し 各領域の
1行のn個毎へ Y座標が増加する順番で順次メモリ上
のアドレスを割り邑てた力交 この他の方法でLY力方
向隣接するピクセルのアドレスが連続するように割り当
てれば同様の効果が得られも
第2図は請求項2の本発明のアドレス発生装置の一実施
例を示すブロック図であム 第2図において、 210
はX座標(X)を保持するレジス久220はY座標(Y
)を保持するレジス久 230は2次元空間上でのグラ
フィックスデー久 231〜233はグラフィックスデ
ータ23−0のピクセル脈 240はグラフィックスデ
ータ230を保持するメモリ、 241〜243はメモ
リ240上のアドレス 250はレジスタ210の値と
レジスタ220の値で示される(X、 Y)座標をメ
モリ240上のアドレスに変換する変換平成251はア
ドレス(AR)を保持するレジス久252は空間幅ワー
ド数(WDT)を保持するレジス久 253は値° 1
′を保持するレジス久254はレジスタ252の値とレ
ジスタ253の値を選択するセレク久 255はレジス
タ251の値とセレクタ254の出力を加減算する加減
算器 256はワード内のX方向ビット位置(XBP)
を保持するレジス久 257はレジスタ256の値を±
1するインクリメンタ/デククメン久258はワード内
のY方向ビット位置(YBP)を保持するレジス久 2
59はレジスタ258の値を±1するインクリメンタ/
デククメン久 260はグラフィックスデータ230の
原点アドレス(ORG)とグラフィックスデータ230
を分割する矩形領域のX方向のピクセル数(u)とグラ
フィックスデータ230を分割する矩形領域のY方向の
ピクセル数(V)を保持するレジスタ玖261は演算器
であム メモリ240の1ワードを構成するビット数を
nとすム
以上のように構成された本実施例のアドレス発生装置に
ついて、以下にその動作を説明すも グラフィックスデ
ータ230のピクセルt;&uxvの大きさを持つ矩形
領域でタイル上に分割されもただUAu、 vはu
x v=nを満たす2以上の整数とする。この矩形領域
に含まれるn個のピクセルは 順次メモリ240に保持
されも 例えばピクセル群231、232、233、・
・・はそれぞれアドレス241、242、243、・・
・に保持される。ピクセルのワード内でのビット位置4
& X方向ビット位置とY方向ビット位置で表わす。That board, there are 5 ways to change the address to the adjacent address for the left and right pixels and 8 ways for the other pixels, so
In one word, there are 2X5+14X8=122 ways.
Therefore, the probability is 122/128=0. 95..., which makes it impossible to increase the continuity of addresses compared to the probability of 0.25 in the conventional example. A similar effect can be obtained even if the pixels of the graphics data are expressed using multiple bits.Also, in this example, the pixels of the graphics data are divided into areas of every n columns, and the Y coordinate increases every n pieces in one row of each area. A similar effect can be obtained by allocating the addresses of pixels adjacent in the LY force direction using another method, but FIG. 2 is a block diagram showing an embodiment of the address generator of the present invention. In FIG. 2, 210
220 holds the X coordinate (X), and the Regis 220 holds the Y coordinate (Y
) 230 is a graphics data register in two-dimensional space 231 to 233 are pixel lines of graphics data 23-0 240 is a memory that holds graphics data 230 241 to 243 are addresses on memory 240 250 is a conversion that converts the (X, Y) coordinates indicated by the values of the register 210 and the register 220 into an address on the memory 240. 251 is a conversion that holds an address (AR). A register 252 is the number of space width words (WDT). ) holds the value 1
255 is an adder/subtractor that adds or subtracts the value of register 251 and the output of selector 254. 256 is the X-direction bit position (XBP) in the word.
The register 257 that holds the value of the register 256
The incrementer/decrement register 258 that increments 1 is a register register that holds the Y-direction bit position (YBP) within a word.
59 is an incrementer that increases the value of register 258 by ±1.
260 is the origin address (ORG) of the graphics data 230 and the graphics data 230
The register 261 that holds the number of pixels (u) in the X direction of the rectangular area into which the graphics data 230 is divided and the number (V) of pixels in the Y direction of the rectangular area into which the graphics data 230 is divided is an arithmetic unit. The operation of the address generator of this embodiment, which is configured as follows, where n is the number of bits constituting the image data 230, will be described below. Even if it is divided into tiles, it is just UAu, v is u
Let x be an integer of 2 or more that satisfies v=n. The n pixels included in this rectangular area are sequentially stored in the memory 240, for example, pixel groups 231, 232, 233, .
...are addresses 241, 242, 243, etc., respectively.
・Holded to . Bit position 4 within the pixel word
& Expressed by the bit position in the X direction and the bit position in the Y direction.
ピクセルの座標(X、 Y)からアドレスARとX方
向ビット位置XBPとY方向ビット位置YBPを求める
場合に?L レジスタ210、220.252の値と
レジスタ群260の値との間で演算器261により次の
計算を行1.% レジスタ251.256、258に
格納すa
AR=ORG+WDTX[Y/v ]+[X/uコ・・
・(5)
XBP=mod (X、 u) −(
6)YBP=mod (Y、 v)
−(7)ただL [a]はaを越えない最大の整数
、m。What if you want to find the address AR, X-direction bit position XBP, and Y-direction bit position YBP from the pixel coordinates (X, Y)? The following calculation is performed by the arithmetic unit 261 between the values of the L registers 210 and 220.252 and the values of the register group 260 in line 1. % Store in registers 251, 256, 258 a AR=ORG+WDTX[Y/v]+[X/u...
・(5) XBP=mod (X, u) −(
6) YBP=mod (Y, v)
-(7) Just L [a] is the largest integer not exceeding a, m.
d(a、b)はa / bの剰余とすムピクセルの座標
がX座標の正負方向に変化する場合には 次のような動
作が行われも まず、レジスタ256の値がインクリメ
ンタ/デクリメンタ257により±1され 再びレジス
タ256に格納される。このときオーバーフロー/アン
ダーフローが発生すると、さらく レジスタ251の値
とセレクタ254により選択されたレジスタ253の値
が加減算器255により加減算(AR±1)され 再び
レジスタ251に格納されも この動作(よ 座標変化
が左右のワード境界を越える場合に発生する。d(a,b) is the remainder of a/b.When the coordinate of a pixel changes in the positive/negative direction of the X coordinate, the following operation is performed.First, the value of the register 256 is changed to The signal is changed to ±1 and stored in the register 256 again. If an overflow/underflow occurs at this time, the value of the register 251 and the value of the register 253 selected by the selector 254 are added/subtracted (AR±1) by the adder/subtractor 255 and stored in the register 251 again. Occurs when a coordinate change crosses a left or right word boundary.
ピクセルの座標がY座標の正負方向に変化する場合には
次のような動作が行われる。まず、レジスタ258の
値がインクリメンタ/デクリメンタ259により±1さ
れ 再びレジスタ258に格納される。このときオーバ
ーフロー/アンダーフローが発生すると、さら艮 レジ
スタ251の値とセレクタ254により選択されたレジ
スタ252の値が加減算器255により加減算(AR±
WDT)され 再びレジスタ251に格納されもこの動
作(L 座標変化が上下のワード境界を越える場合に発
生すも
ピクセルの座標がそれ以外の斜め4方向に変化する場合
に41 次のような動作が行われも まず、レジスタ
256の値がインクリメンタ/デクリメンタ257によ
り±1され 再びレジスタ256に格納されも 同時く
レジスタ258の値がインクリメンタ/デクリメンタ
259により±1され 再びレジスタ258に格納され
も このときインクリメンタ/デクリメンタ257でオ
ーバーフロー/アンダーフローが発生すると、さら凶レ
ジスタ251の値とセレクタ254により選択されたレ
ジスタ253の値が加減算器255により加減算(AR
±1)され 再びレジスタ251に格納されも インク
リメンタ/デクリメンタ259でオーバーフロー/アン
ダーフローが発生すると、レジスタ251の値とセレク
タ254により選択されたレジスタ252の値が加減算
器255により加減算(AR±WDT)され 再びレジ
スタ251に格納されも インクリメンタ/デクリメン
タ257、259の両方でオーバーフロー/アンダーフ
ローが発生すると、 レジスタ251の値とセレクタ2
54により選択されたレジスタ253の値が加減算器2
55により加減算(AR±1)され レジスタ251に
格納され さ装置レジスタ251の値とセレクタ254
により選択されたレジスタ252の値が加減算器255
により加減算((AR±1)±WDT)され 再びレジ
スタ251に格納されも
ここで、従来例と同様番ミ 第6図に示す形状610
を発生する場合を考えも 第3図へ 第6図に示す従来
例の高解像度のグラフィックスデータ630と同じ解像
度を持つ本実施例でのグラフィックスデータ310を示
も 第3図j& 1ワードを構成するビット数n=1
6、矩形領域のX方向のピクセル数u=4、矩形領域の
Y方向のピクセル数v=4とした例であ4 グラフィッ
クスデータ310では 第6図に示す形状610は第6
図に示すグラフィックスデータ630と同じ16ビクセ
ルで構成される力(アドレス311〜312の2つのア
ドレスにアクセスするだけでよ(−従って、従来例の8
アドレスと比較すると、メモリに対するアクセス回数を
少なくすることができムな耘 本実施例で(よ 1ビク
セルを表現するビット数を1ビツトとしたカミ 複数ビ
ットで表現しても同様の効果が得られも また 矩形領
域の形状を4×4ピクセルの正方形で説明したカミ こ
れ以外でも一辺が2ビクセル以上で正方形に近い矩形領
域であれば同様の効果が得られも
発明の効果
以上のよう置 請求項1の本発明によれば グラフィッ
クスデータのY方向に隣接するピクセルがメモリ上の連
続するアドレスで表わされ ピクセルの(’X、 Y
)座標から変換手段がメモリへのアドレスを高速に発生
すも 従って、発生するグラフィックスデータのピクセ
ル間のアドレスの連続性が大きくなるた敦 キャッシュ
メモリによるメモリアクセスの高速化を効果的に行うこ
とができ、その実用的効果は太き(〜
また 請求項2の本発明によれは グラフィ・ソクスデ
ータのピクセルが正方形に近い矩形領域単位にメモリ上
の同一のアドレスで表わされ ピクセルの(X、Y)座
標から変換手段がメモリへのアドレスを高速に発生すム
従って、高解像度で発生するグラフィックスデータの
ピクセルが占めるアドレス数を少なくし メモリへのア
クセス回数を少なくすることで処理の高速化を行うこと
ができ、その実用的効果は太き(ちWhen the coordinates of a pixel change in the positive and negative directions of the Y coordinate, the following operations are performed. First, the value of the register 258 is incremented by ±1 by the incrementer/decrementer 259 and stored in the register 258 again. If an overflow/underflow occurs at this time, the value of the register 251 and the value of the register 252 selected by the selector 254 are added or subtracted by the adder/subtractor 255 (AR±
WDT) and stored in the register 251 again.This operation (L) occurs when the coordinate change crosses the upper and lower word boundaries, but when the pixel coordinate changes in the other four diagonal directions, the following operation occurs. The values in the register 256 are first incremented by ±1 by the incrementer/decrementer 257 and stored in the register 256 again. At the same time, the value in the register 258 is incremented by ±1 by the incrementer/decrementer 259 and stored in the register 258 again. When an overflow/underflow occurs in the incrementer/decrementer 257, the value of the register 251 and the value of the register 253 selected by the selector 254 are added/subtracted by the adder/subtractor 255 (AR
±1) is stored in the register 251 again, but when an overflow/underflow occurs in the incrementer/decrementer 259, the value of the register 251 and the value of the register 252 selected by the selector 254 are added/subtracted by the adder/subtractor 255 (AR±WDT ) and stored in register 251 again.If overflow/underflow occurs in both incrementer/decrementer 257 and 259, the value of register 251 and selector 2
The value of the register 253 selected by 54 is added to the adder/subtractor 2
55 is added and subtracted (AR±1) and stored in the register 251. The value of the device register 251 and the selector 254 are
The value of the register 252 selected by the adder/subtractor 255
They are added and subtracted ((AR±1)±WDT) and stored in the register 251 again.
Figure 3 shows graphics data 310 in this embodiment that has the same resolution as the high-resolution graphics data 630 of the conventional example shown in Figure 6. Constituent bit number n = 1
6. In this example, the number of pixels in the X direction of the rectangular area is u = 4, and the number of pixels in the Y direction of the rectangular area is v = 4. In the graphics data 310, the shape 610 shown in FIG.
The force consists of the same 16 pixels as the graphics data 630 shown in the figure (only the two addresses 311 and 312 need to be accessed (-therefore, the conventional 8
Compared to addresses, it is not possible to reduce the number of accesses to the memory. In this example, the number of bits to represent one pixel is set to one bit. Also, the shape of the rectangular area is described as a 4 x 4 pixel square.Other than this, the same effect can be obtained if the rectangular area is 2 pixels or more on a side and is close to a square, but the effect is more than the effect of the invention. According to the invention No. 1, adjacent pixels in the Y direction of graphics data are represented by consecutive addresses on the memory, and the pixel's ('X, Y
) Although the conversion means from coordinates generates addresses to memory at high speed, the continuity of addresses between pixels of the generated graphics data increases. To effectively speed up memory access using cache memory. According to the present invention as claimed in claim 2, the pixels of graphics data are represented by the same address on the memory in units of rectangular areas close to squares, and the practical effect is thick (~). Y) The conversion means from coordinates generates addresses to memory at high speed. Therefore, by reducing the number of addresses occupied by pixels of graphics data generated at high resolution and reducing the number of accesses to memory, processing speed is increased. can be carried out, and its practical effects are significant.
第1図は請求項1の発明における一実施例のアドレス発
生装置のブロック医 第2図は請求項2の発明における
一実施例のアドレス発生装置のブロック@ 第3図は同
実施例の動作を示す説明は第4図は従来のアドレス発生
装置の一例を示す構成医 第5図は同従来例の動作を示
す説明図 第6図は同従来例の動作を示す説明図である
。FIG. 1 shows a block diagram of an address generator according to an embodiment of the invention according to claim 1. FIG. 2 shows a block diagram of an address generator according to an embodiment according to the invention according to claim 2. FIG. 4 is an explanatory diagram showing an example of a conventional address generation device; FIG. 5 is an explanatory diagram showing the operation of the conventional example; FIG. 6 is an explanatory diagram showing the operation of the conventional example.
Claims (2)
レジスタと、グラフィックスデータのY座標を保持する
第二のレジスタと、グラフィックスデータを2次元空間
上のピクセルの集合として保持しY方向に隣接するピク
セルを連続するアドレスで表わすメモリと、前記第一の
レジスタの値と前記第二のレジスタの値で指定されるピ
クセルの座標を前記メモリ上でのアドレスに変換する変
換手段を具備することを特徴とするアドレス発生装置。(1) A first register that holds the X coordinate of graphics data, a second register that holds the Y coordinate of graphics data, and a register that holds the graphics data as a set of pixels in a two-dimensional space in the Y direction. , a memory for representing pixels adjacent to each other as consecutive addresses, and a conversion means for converting the coordinates of the pixel specified by the value of the first register and the value of the second register into an address on the memory. An address generator characterized by the following.
レジスタと、グラフィックスデータのY座標を保持する
第二のレジスタと、グラフィックスデータを2次元空間
上のピクセルの集合として保持し2次元空間を1辺が2
ピクセル以上の矩形領域でタイル状に分割して各矩形領
域内のピクセルを同一のアドレスで表わすメモリと、前
記第一のレジスタの値と前記第二のレジスタの値で指定
されるピクセルの座標を前記メモリ上でのアドレスに変
換する変換手段を具備することを特徴とするアドレス発
生装置。(2) A first register that holds the X coordinate of graphics data, a second register that holds the Y coordinate of graphics data, and a two-dimensional register that holds the graphics data as a set of pixels in a two-dimensional space. 1 side of space is 2
A memory that is divided into tiles in a rectangular area larger than pixels and represents pixels in each rectangular area with the same address, and a memory that stores the coordinates of the pixel specified by the value of the first register and the value of the second register. An address generation device characterized by comprising conversion means for converting into an address on the memory.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2095814A JPH03292575A (en) | 1990-04-11 | 1990-04-11 | Address generating device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2095814A JPH03292575A (en) | 1990-04-11 | 1990-04-11 | Address generating device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03292575A true JPH03292575A (en) | 1991-12-24 |
Family
ID=14147894
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2095814A Pending JPH03292575A (en) | 1990-04-11 | 1990-04-11 | Address generating device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03292575A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010198156A (en) * | 2009-02-24 | 2010-09-09 | Fujitsu Semiconductor Ltd | Image drawing device |
-
1990
- 1990-04-11 JP JP2095814A patent/JPH03292575A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010198156A (en) * | 2009-02-24 | 2010-09-09 | Fujitsu Semiconductor Ltd | Image drawing device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5621866A (en) | Image processing apparatus having improved frame buffer with Z buffer and SAM port | |
| US6133923A (en) | Method and apparatus for texture data | |
| JPS62262188A (en) | Picture processor | |
| JPH04276870A (en) | Method and apparatus for rotary processing of image | |
| JPH03292575A (en) | Address generating device | |
| CN113284053A (en) | Method and medium for realizing arbitrary angle rotation of 2D (two-dimensional) graph | |
| EP0130340B1 (en) | Memory mapping and readout system | |
| JPS59214377A (en) | Picture data processor | |
| KR900002631B1 (en) | Image data processing method and apparatus | |
| KR20230066905A (en) | Address mapping apparatus and method considering shared memory and cache interleaving | |
| JPS5972568A (en) | Picture converter | |
| JPH0374071B2 (en) | ||
| JP2967228B2 (en) | Image data transfer device | |
| JP3214389B2 (en) | Data converter | |
| JPH0727566B2 (en) | Local area projection calculator | |
| JPS62109182A (en) | High-speed drawing system for straight line | |
| US5305431A (en) | Method and system for rendering polygons on a raster display | |
| JP3468580B2 (en) | Data curve drawing device | |
| JP2647073B2 (en) | Graphic display device | |
| JPH04329482A (en) | Image rotation processing method and processing device for relevant method | |
| KR920008266B1 (en) | Memory system for effective analyzation of image | |
| JPH0520450A (en) | Image processing device | |
| JPS63195696A (en) | Fast lithography | |
| JPH02232784A (en) | Clipping method and graphics system and workstation | |
| JPH05181788A (en) | Dma mechanism for special shape area |