JPH08194826A - Graphic controller - Google Patents

Graphic controller

Info

Publication number
JPH08194826A
JPH08194826A JP7006344A JP634495A JPH08194826A JP H08194826 A JPH08194826 A JP H08194826A JP 7006344 A JP7006344 A JP 7006344A JP 634495 A JP634495 A JP 634495A JP H08194826 A JPH08194826 A JP H08194826A
Authority
JP
Japan
Prior art keywords
horizontal line
transfer
data
line segment
video memory
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.)
Granted
Application number
JP7006344A
Other languages
Japanese (ja)
Other versions
JP3313527B2 (en
Inventor
Koichi Nishide
康一 西出
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP00634495A priority Critical patent/JP3313527B2/en
Priority to US08/558,781 priority patent/US5721885A/en
Publication of JPH08194826A publication Critical patent/JPH08194826A/en
Application granted granted Critical
Publication of JP3313527B2 publication Critical patent/JP3313527B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

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
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • G09G5/393Arrangements for updating the contents of the bit-mapped memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE: To improve line plotting performance by collectively transferring pixel data constituting a horizontal line. CONSTITUTION: A control circuit in a line plotting circuit 132a detects a horizontal line segment from a straight line requested at its plotting by the use of a Bresnham error term. At the time, NOPEL indicating the number of pixels of the horizontal line segment and a data transfer request TRRQ are sent from the circuit 132a to a data transfer control unit 134. The unit 134 transfers plural data corresponding to the number of pixels constituting the horizontal line segment to a video memory as a block. Thereby pixel data constituting a horizontal line can be collectively transferred and line plotting performance can be improved.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明はパーソナルコンピュー
タのディスプレイモニタを制御するグラフィックスコン
トローラに関し、特にビットマップ形式のビデオメモリ
を有し、そのビデオメモリにデータを転送して図形を描
画するグラフィックスコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphics controller for controlling a display monitor of a personal computer, and more particularly to a graphics controller having a bit map type video memory and transferring data to the video memory to draw a figure. Regarding

【0002】[0002]

【従来の技術】近年、携帯可能なラップトップタイプま
たはノートブックタイプのポータブルパーソナルコンピ
ュータが種々開発されている。従来、この種のパーソナ
ルコンピュータに使用されるグラフィックスコントロー
ラには、直線などの基本図形の作成、領域の塗り潰しと
いった描画機能が設けられている。これら描画機能の
内、直線の描画は、グラフィックスコントローラ内に設
けられたライン描画回路によって実行される。
2. Description of the Related Art In recent years, various portable laptop or notebook type portable personal computers have been developed. Conventionally, a graphics controller used in this type of personal computer is provided with a drawing function such as creation of a basic figure such as a straight line and filling of a region. Of these drawing functions, the drawing of a straight line is executed by a line drawing circuit provided in the graphics controller.

【0003】ホストCPUから直線の描画が要求された
時、ライン描画回路は、その直線の始点座標から終点座
標までの2次元座標値をピクセル毎に算出しながら、ピ
クセル単位で描画データをビデオメモリに転送する。こ
のような描画処理は、描画対象の直線が水平ラインであ
っても同様にして行われる。
When the host CPU requests drawing of a straight line, the line drawing circuit calculates the two-dimensional coordinate value from the starting point coordinates to the ending point coordinates of the straight line for each pixel, and draws the drawing data in pixel units in the video memory. Transfer to. Such drawing processing is similarly performed even if the straight line to be drawn is a horizontal line.

【0004】水平ラインの描画においては、ビデオメモ
リ上における隣り合うピクセルのリニアアドレスは連続
している。このため、原理的には、1回のメモリ転送サ
イクルで複数ピクセル分の画像データをまとめてビデオ
メモリに転送できるはずである。
In drawing a horizontal line, linear addresses of adjacent pixels on a video memory are continuous. Therefore, in principle, it should be possible to collectively transfer the image data of a plurality of pixels to the video memory in one memory transfer cycle.

【0005】しかしながら、従来のライン描画回路で
は、前述したように水平ラインと他のラインとの区別は
されておらず、どの様なラインを描画する場合でも1回
のデータ転送サイクルで転送されるのは常に1ピクセル
である。このため、水平ラインの描画においても、他の
ラインの描画と同様に、そのラインを構成するピクセル
数だけデータ転送サイクルを何度も繰り返し実行する必
要があり、描画に多くの時間がかかる欠点があった。
However, in the conventional line drawing circuit, the horizontal line and other lines are not distinguished from each other as described above, and no matter what line is drawn, data is transferred in one data transfer cycle. Is always 1 pixel. Therefore, in drawing a horizontal line, as in the case of drawing other lines, it is necessary to repeatedly execute the data transfer cycle by the number of pixels forming the line, which is disadvantageous in that drawing takes a lot of time. there were.

【0006】[0006]

【発明が解決しようとする課題】従来のライン描画回路
では、2次元座標値をピクセル毎に算出しながら、ピク
セル単位で描画データがビデオメモリに転送される。こ
のため、1回のデータ転送サイクルで転送されるのは常
に1ピクセルである。従って、水平ラインの描画におい
ても、その水平ラインを構成するピクセル数だけデータ
転送サイクルを何度も繰り返し実行する必要があり、描
画に多くの時間がかかる欠点があった。
In the conventional line drawing circuit, the drawing data is transferred to the video memory in pixel units while calculating the two-dimensional coordinate value for each pixel. Therefore, one pixel is always transferred in one data transfer cycle. Therefore, even in the drawing of a horizontal line, it is necessary to repeat the data transfer cycle as many times as the number of pixels forming the horizontal line, and there is a drawback that drawing takes a lot of time.

【0007】この発明はこのような点に鑑みてなされた
もので、描画対象の直線が水平ライン成分を含む場合に
はその水平ラインを構成するピクセルデータをまとめて
転送できるようにし、直線の描画速度を大幅に向上する
ことができるグラフィクスコントローラを提供すること
を目的とする。
The present invention has been made in view of the above point, and when a straight line to be drawn includes a horizontal line component, pixel data forming the horizontal line can be collectively transferred to draw a straight line. It is an object of the present invention to provide a graphics controller that can significantly improve speed.

【0008】[0008]

【課題を解決するための手段および作用】この発明は、
ビットマップ形式のビデオメモリを有し、ディスプレイ
モニタを制御するグラフィックスコントローラにおい
て、直線の描画が指定された時、その直線の中に含まれ
る水平ライン線分を検出する手段と、検出された水平ラ
イン線分毎にそれを構成するピクセル数を計数する手段
と、前記水平ライン線分毎にそれを構成するピクセル数
に相当する複数の描画データを前記ビデオメモリにブロ
ック転送し、それら描画データを前記ビデオメモリ上の
連続する番地に書き込むデータ転送手段とを具備するこ
とを特徴とする。
Means and Actions for Solving the Problems
In a graphics controller that has a bit map format video memory and controls a display monitor, when drawing a straight line is specified, a means for detecting a horizontal line segment included in the straight line and a detected horizontal line segment. A unit for counting the number of pixels forming each line segment, and a plurality of drawing data corresponding to the number of pixels forming each horizontal line segment are block-transferred to the video memory, and the drawing data are Data transfer means for writing to consecutive addresses on the video memory.

【0009】このグラフィックスコントローラにおいて
は、ホストシステムから描画要求された直線の中に水平
ライン線分が含まれていると、その水平ライン線分が検
出される。例えば、水平ラインの描画が要求された場合
には、その要求された水平ライン全体が水平ライン線分
として検出される。また、ある傾きを持った直線の描画
が要求された場合には、通常、その直線は垂直座標値が
互いに異なる複数の水平ライン線分から構成されている
ので、それら複数の水平ライン線分がそれぞれ検出され
ることによる。そして、各水平ライン線分のピクセル数
が計数され、水平ライン線分毎にそれを構成するピクセ
ル数に相当する複数の描画データがビデオメモリにまと
めて転送される。
In this graphics controller, if a horizontal line segment is included in the straight lines requested by the host system for drawing, the horizontal line segment is detected. For example, when a horizontal line is requested to be drawn, the entire requested horizontal line is detected as a horizontal line segment. Also, when drawing a straight line having a certain inclination is required, since the straight line is usually composed of a plurality of horizontal line segments having different vertical coordinate values, each of the plurality of horizontal line segments is Because it is detected. Then, the number of pixels of each horizontal line segment is counted, and a plurality of drawing data corresponding to the number of pixels constituting each horizontal line segment are collectively transferred to the video memory.

【0010】従って、ピクセル単位でビデオメモリに転
送する従来のグラフィックスコントローラよりも直線描
画の性能を大幅に向上することができる。また、水平ラ
イン線分を検出する手段には、ブレゼンハムのアルゴミ
ズムを用いて前記直線を描画するための座標値をピクセ
ル毎に算出して、垂直座標が変化するピクセル位置を検
出する手段を利用することができる。ブレゼンハムのア
ルゴミズムは、現在の座標値(X,Y)の次の座標値を
(X+1,Y)と(X+1,Y+1)のどちらにするか
をピクセル毎に決定していくという座標値生成のための
アルゴリズムであり、(X+1,Y)と(X+1,Y+
1)のどちらにするかはブレゼンハムエラーターム
(E)の値によって決定される。ブレゼンハムエラータ
ーム(E)≧0であれば、(X+1,Y+1)が選択さ
れる。したがって、このブレゼンハムエラーターム
(E)の値によって、直線中においてY座標が変化する
ピクセル位置を検出することができる。
Therefore, it is possible to greatly improve the performance of straight line drawing as compared with the conventional graphics controller which transfers data to the video memory pixel by pixel. As means for detecting the horizontal line segment, means for calculating the coordinate value for drawing the straight line for each pixel using Bresenham's argomizm and detecting the pixel position where the vertical coordinate changes is used. be able to. Bresenham's argomizm is because the coordinate value is generated by determining for each pixel whether the next coordinate value of the current coordinate value (X, Y) is (X + 1, Y) or (X + 1, Y + 1). Algorithm (X + 1, Y) and (X + 1, Y +
Which of 1) is used is determined by the value of the Bresenham error term (E). If the Bresenham error term (E) ≧ 0, (X + 1, Y + 1) is selected. Therefore, the pixel position where the Y coordinate changes in the straight line can be detected by the value of this Bresenham error term (E).

【0011】また、水平ライン線分を指定するラインパ
ラメタの値をBITブロック転送のためのパラメタ値に
変換する手段を設けることにより、水平ライン線分を構
成するピクセルのブロック転送を通常のBITブロック
転送回路を利用して行うことができる。BITブロック
転送は通常のグラフィクスコントローラがサポートする
基本機能であるので、このBITブロック転送を利用す
ることにより、専用ハードウェアを設ける事なく、水平
ライン線分を構成するピクセルをブロック転送すること
ができる。
Further, by providing means for converting the value of the line parameter designating the horizontal line segment into the parameter value for the BIT block transfer, the block transfer of the pixels constituting the horizontal line segment is performed in the normal BIT block. This can be done using a transfer circuit. Since the BIT block transfer is a basic function supported by a normal graphics controller, the pixels forming the horizontal line segment can be block transferred without using dedicated hardware by using this BIT block transfer. .

【0012】[0012]

【実施例】以下、図面を参照してこの発明の実施例を説
明する。図1には、この発明の一実施例に係わるグラフ
ィックスコントローラを利用した表示制御サブシステム
の全体の構成が示されている。この表示制御サブシステ
ム4は、XGA仕様に準拠したものであり、ポータブル
コンピュータ本体に標準装備されるフラットパネルディ
スプレイ40およびポータブルコンピュータ本体に着脱
自在に接続されるカラーCRTディスプレイ50双方に
対する表示制御を行なう。表示制御サブシステム4は、
図示のように、VLバスやPCIバスなどのローカルバ
ス3に接続されている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows the overall configuration of a display control subsystem using a graphics controller according to an embodiment of the present invention. The display control subsystem 4 conforms to the XGA specification and performs display control on both the flat panel display 40 that is standardly equipped in the portable computer main body and the color CRT display 50 that is detachably connected to the portable computer main body. . The display control subsystem 4 is
As shown, it is connected to a local bus 3 such as a VL bus or a PCI bus.

【0013】表示制御サブシステム4には、グラフィッ
クスコントローラ10、およびビデオメモリ30が設け
られている。これらグラフィックスコントローラ10お
よびビデオメモリ30は、ポータブルコンピュータのシ
ステムポード上に搭載されている。
The display control subsystem 4 is provided with a graphics controller 10 and a video memory 30. The graphics controller 10 and the video memory 30 are mounted on the system board of the portable computer.

【0014】グラフィックスコントローラ10はゲート
アレイによって実現される1個のLSIであり、この表
示制御システム4の主要部を成す。このグラフィックス
コントローラ10は、ホストCPU1からの指示に従っ
てフラットパネルディスプレイ40およびカラーCRT
ディスプレイ50を制御する。また、このグラフィック
スコントローラ10は、バスマスタとして機能し、シス
テムメモリ2を直接アクセスすることができる。
The graphics controller 10 is one LSI realized by a gate array, and constitutes the main part of this display control system 4. The graphics controller 10 includes a flat panel display 40 and a color CRT according to an instruction from the host CPU 1.
Control the display 50. Further, the graphics controller 10 functions as a bus master and can directly access the system memory 2.

【0015】ビデオメモリ30は、フラットパネルディ
スプレイ40またはカラーCRTディスプレイ50に表
示すべき画面イメージを格納するビットマップメモリで
ある。このビデオメモリ30は例えばシンクロナスDR
AMから構成されている。シンクロナスDRAMは、ク
ロック同期式オペレーション、コマンドによる動作モー
ド制御、2バンクメモレセルアレイ構成という特徴を持
つメモリである。ビデオメモリ30は、例えば、256
K×16ビット構成のシンクロナスDRAMチップを2
個並列接続することによって実現できる。この場合、3
2ビット幅単位でデータのリード/ライトが行なわれ
る。
The video memory 30 is a bit map memory for storing a screen image to be displayed on the flat panel display 40 or the color CRT display 50. This video memory 30 is, for example, a synchronous DR
It is composed of AM. The synchronous DRAM is a memory having features of clock synchronous operation, operation mode control by command, and two-bank memory cell array configuration. The video memory 30 is, for example, 256
2 synchronous DRAM chips with K × 16 bits
It can be realized by connecting them in parallel. In this case 3
Data is read / written in 2-bit width units.

【0016】XGA仕様に適合したアプリケーションプ
ログラム等で作成されたイメージデータは、パックドピ
クセル方式によってビデオメモリ30に格納される。こ
のパックドピクセル方式は、メモリ上の連続する複数の
ビットで1画素を表す色情報マッピング形式であり、例
えば、1画素を1,2,4,8,16、または24ビッ
トで表す方式が採用されている。一方、VGA仕様のイ
メージデータは、VGA仕様に適合したアプリケーショ
ンプログラム等で作成されるものであり、メモリプレー
ン方式によってビデオメモリ30に格納される。このメ
モリプレーン方式は、メモリ領域を同一アドレスで指定
される複数のプレーンに分割し、これらプレーンに各画
素の色情報を割り当てる方式である。例えば、4プレー
ンを持つ場合には、1画素は、各プレーン毎に1ビット
づつの合計4ビットのデータによって表現される。
Image data created by an application program or the like conforming to the XGA specifications is stored in the video memory 30 by the packed pixel method. This packed pixel method is a color information mapping format in which one pixel is represented by a plurality of consecutive bits on a memory. For example, a method in which one pixel is represented by 1, 2, 4, 8, 16 or 24 bits is adopted. ing. On the other hand, the VGA specification image data is created by an application program or the like conforming to the VGA specification and is stored in the video memory 30 by the memory plane method. This memory plane method is a method in which a memory area is divided into a plurality of planes designated by the same address, and color information of each pixel is assigned to these planes. For example, when there are four planes, one pixel is represented by a total of 4 bits of data, one bit for each plane.

【0017】また、ビデオメモリ30には、テキストデ
ータも格納される。1文字分のテキストデータは、XG
A、VGAのどちらの仕様においても,8ビットのコー
ドと8ビットのアトリビュートからなる合計2バイトの
サイズを持つ。アトリビュートは、フォアグランドの色
を指定する4ビットデータとバックグランドの色を指定
する4ビットデータから構成されている。
Text data is also stored in the video memory 30. Text data for one character is XG
Both the A and VGA specifications have a total size of 2 bytes consisting of an 8-bit code and an 8-bit attribute. The attribute is composed of 4-bit data specifying a foreground color and 4-bit data specifying a background color.

【0018】グラフィックスコントローラ10は、レジ
スタ制御回路11、システムバスインターフェース1
2、グラフィクスアクセラレータ13、メモリ制御回路
14、CRTコントローラ(CRTC)16、スプライ
トメモリ19、シリアライザ20、ラッチ回路21、フ
ォアグランド/バックグランドマルチプレクサ22、グ
ラフィック/テキストマルチプレクサ23、カラーパレ
ット制御回路24、スプライトカラーレジスタ25、C
RTビデオマルチプレクサ26、スプライト制御回路2
7、フラットパネルエミュレーション回路28、および
DAC(D/Aコンバータ)35から構成されている。
The graphics controller 10 includes a register control circuit 11 and a system bus interface 1.
2, graphics accelerator 13, memory control circuit 14, CRT controller (CRTC) 16, sprite memory 19, serializer 20, latch circuit 21, foreground / background multiplexer 22, graphic / text multiplexer 23, color palette control circuit 24, sprite Color register 25, C
RT video multiplexer 26, sprite control circuit 2
7, a flat panel emulation circuit 28, and a DAC (D / A converter) 35.

【0019】レジスタ制御回路11は、システムバスイ
ンターフェース12を介してローカルバス3からのアド
レスおよびデータを受けとり、アドレスのデコード、お
よびそのデコード結果によって指定される各種レジスタ
に対するリード/ライト制御を行なう。
The register control circuit 11 receives an address and data from the local bus 3 via the system bus interface 12, decodes the address, and performs read / write control on various registers designated by the decoding result.

【0020】システムバスインターフェース12は、ロ
ーカルバス3を介してホストCPU1とのインターフェ
ース制御を行なうものであり、バースト転送をサポート
している。さらに、システムバスインターフェース12
には、キャッシュ121が内蔵されている。このキャッ
シュ121は、CPU1やアクセラレータ13とビデオ
メモリ30との間のイメージデータの転送を高速にする
ために利用されるものであり、ビデオメモリ30のイメ
ージデータの一部を保持する。CPU1やアクセラレー
タ13によってリード要求されたイメージデータがキャ
ッシュ121に存在する場合は、そのキャッシュ121
からイメージデータが読み出されてCPU1またはアク
セラレータ13に転送される。この場合、ビデオメモリ
30はリードアクセスされない。
The system bus interface 12 controls the interface with the host CPU 1 via the local bus 3 and supports burst transfer. In addition, the system bus interface 12
Has a cache 121 built therein. The cache 121 is used to speed up the transfer of image data between the CPU 1 or the accelerator 13 and the video memory 30, and holds a part of the image data in the video memory 30. If the image data requested to be read by the CPU 1 or the accelerator 13 exists in the cache 121, the cache 121
The image data is read from and transferred to the CPU 1 or the accelerator 13. In this case, the video memory 30 is not read-accessed.

【0021】グラフィクスアクセラレータ13は、CP
U1からの指示に応答して、ビデオメモリ30中のイメ
ージデータに対してさまざまな描画機能を提供する。こ
のアクセラレータ13は、BitBlt(bit bl
ock transfer)等の画素のブロック転送、
線描画、円弧描画、領域の塗りつぶし、画素間の論理/
算術演算、画面の切り出し、マップのマスク、X−Y座
標でのアドレッシング、ページングによるメモリ管理機
能等を有している。
The graphics accelerator 13 is a CP
In response to an instruction from U1, the image data in the video memory 30 is provided with various drawing functions. This accelerator 13 is BitBlt (bit bl
block transfer of pixels, such as
Line drawing, arc drawing, area filling, logic between pixels /
It has arithmetic operations, screen cutout, map mask, XY coordinate addressing, memory management function by paging, and the like.

【0022】このアクセラレータ13は、図2に示され
ているように、コプロレジスタ131、X−Yアドレス
発生ユニット132、リニアアドレス変換ユニット13
3、データ転送制御ユニット134、ページングユニッ
ト135、および演算ユニット(ALU)136から構
成されている。
As shown in FIG. 2, the accelerator 13 includes a copro register 131, an XY address generation unit 132, and a linear address conversion unit 13.
3, a data transfer control unit 134, a paging unit 135, and an arithmetic unit (ALU) 136.

【0023】コプロレジスタ131は、CPU1によっ
てアクセス可能な複数のI/Oレジスタを備えている。
これら各レジスタには、アクセラレータ13の描画機能
を使用するためのパラメタ値などがセットされる。
The coprocessor register 131 includes a plurality of I / O registers accessible by the CPU 1.
A parameter value for using the drawing function of the accelerator 13 is set in each of these registers.

【0024】X−Yアドレス発生ユニット132は、B
itBltによって転送される矩形領域アクセスまたは
線描画などのためのX−Yの2次元アドレスを発生す
る。この場合、線描画のためのX−Yアドレスは、X−
Yアドレス発生ユニット132内蔵のライン描画回路1
32aによって算出される。このライン描画回路132
aには、ライン描画速度を向上するために、描画対象の
ラインからそれに含まれる水平ライン成分を検出し、そ
の水平ライン単位でビデオメモリ30へのデータ転送を
データ転送制御ユニット134に実行させるためのロジ
ックが組み込まれている。この場合、転送要求は信号T
RRQ(Transfer request)によって
ライン描画回路132aからデータ転送制御ユニット1
34に通知され、その時の転送ピクセル数はNOPEL
(Number of pixelto transf
er)によって指示される。ここで、実際には、NOP
ELは、転送ピクセル数−1を示している。
The XY address generation unit 132 is
It generates an XY two-dimensional address for accessing a rectangular area transferred by itBlt or drawing a line. In this case, the XY address for line drawing is X-
Line drawing circuit 1 with built-in Y address generation unit 132
32a. This line drawing circuit 132
In a, in order to improve the line drawing speed, a horizontal line component included in the line to be drawn is detected, and the data transfer control unit 134 is caused to perform data transfer to the video memory 30 in units of the horizontal line. Has built-in logic. In this case, the transfer request is signal T
The data transfer control unit 1 from the line drawing circuit 132a by RRQ (Transfer request)
34 is notified, and the number of transfer pixels at that time is NOPEL
(Number of pixelto transf
er). Here, in fact, NOP
EL indicates the number of transfer pixels-1.

【0025】このライン描画回路132aの構成はこの
発明の特徴とする部分であり、その詳細は図3以降で説
明する。リニアアドレス変換ユニット133は、セグメ
ンテーションなどを用いてX−Yアドレスをメモリアク
セスのためのリニアアドレス(物理アドレス)に変換す
る。この場合、リニアアドレス変換ユニット133によ
るリニアアドレス変換処理は、スタートアドレスについ
てのみ行われ、それに後続するアドレスについてはデー
タ転送制御ユニット134のリニアアドレス制御ユニッ
ト134aによって実行される。ページングユニット1
35は、CPU1と同じ仮想記憶機構をサポートするた
めのものであり、ページング有効時にはリニアアドレス
変換ユニット133またはリニアアドレス制御ユニット
134aが作ったリニアアドレスをページングによって
実アドレスに変換する。この変換では、アドレス変換バ
ッファ(TLB)が使用される。また、ページング無効
時にはリニアアドレスをそのまま実アドレスとして出力
する。
The configuration of the line drawing circuit 132a is a feature of the present invention, and its details will be described with reference to FIG. The linear address conversion unit 133 converts the XY address into a linear address (physical address) for memory access using segmentation or the like. In this case, the linear address conversion processing by the linear address conversion unit 133 is performed only for the start address, and the addresses subsequent to the start address are executed by the linear address control unit 134a of the data transfer control unit 134. Paging unit 1
Reference numeral 35 is for supporting the same virtual memory mechanism as the CPU 1, and when paging is valid, the linear address created by the linear address translation unit 133 or the linear address control unit 134a is translated into a real address by paging. An address translation buffer (TLB) is used in this translation. When paging is invalid, the linear address is output as it is as a real address.

【0026】データ転送制御ユニット134は、システ
ムメモリ2およびビデオメモリ30それぞれとの間のデ
ータ転送制御を行なうものであり、前述のリニアドレス
制御ユニット134aに加え、システムメモリインタフ
ェース134b、およびピクセルデータ制御ユニット1
34cを備えている。
The data transfer control unit 134 controls data transfer between the system memory 2 and the video memory 30, and in addition to the linear dress control unit 134a described above, a system memory interface 134b and pixel data control. Unit 1
34c.

【0027】ピクセルデータ制御ユニット134cは、
シフト回路201、およびデータバッファ202を備え
ており、シフト、論理算術演算、ビットマスク、カラー
比較等のピクセルデータ演算、およびVGA互換のBi
tBit機能をサポートする。論理算術演算は、ALU
136と共同して行われる。
The pixel data control unit 134c includes
A shift circuit 201 and a data buffer 202 are provided, and pixel data operations such as shift, logical arithmetic operation, bit mask, and color comparison, and VGA compatible Bi
Supports tBit function. Logical arithmetic operations are ALU
It is done in collaboration with 136.

【0028】図1のメモリ制御回路14は、ビデオメモ
リ30をアクセス制御するためのものであり、CPU
1、およびアクセラレータ13からのイメージデータの
リード/ライト要求に従ってビデオメモリ30をリード
/ライトアクセスすると共に、CRTC16からの表示
アドレスに従って、画面リフレッシュのためにビデオメ
モリ30をリードアクセスする。
The memory control circuit 14 of FIG. 1 is for controlling access to the video memory 30, and is a CPU.
1 and read / write access to the video memory 30 according to the read / write request of the image data from the accelerator 13 and read access to the video memory 30 for screen refreshing according to the display address from the CRTC 16.

【0029】このメモリ制御回路14には、シンクロナ
スDRAMに対するアクセス効率を高めるためのアドレ
ス制御ロジックおよひコマンド制御ロジックが組み込ま
れている。これらロジックは、プリチャージサイクルの
挿入無しでシンクロナスDRAMに対する複数回のリー
ド/ライトサイクルを連続して実行することを可能す
る。また、メモリ制御回路14は、アドレスカウンタを
内蔵しており、リードアドレスをスタートアドレスとし
てそれに続く複数の番地に対してデータを連続してリー
ド/ライトするバースト転送機能を有している。
The memory control circuit 14 incorporates an address control logic and a command control logic for improving the access efficiency to the synchronous DRAM. These logics make it possible to continuously execute a plurality of read / write cycles for the synchronous DRAM without inserting a precharge cycle. Further, the memory control circuit 14 has a built-in address counter and has a burst transfer function of continuously reading / writing data to a plurality of addresses following the read address as a start address.

【0030】メモリ制御回路14とビデオメモリ30間
のデータバス幅は、ローカルバス3のデータ転送幅と同
じ、例えば32ビットに設定されている。CRTコント
ローラ16、スプライトメモリ19、シリアライザ2
0、ラッチ回路21、フォアグランド/バックグランド
マルチプレクサ22、グラフィック/テキストマルチプ
レクサ23、カラーパレット制御回路24、スプライト
カラーレジスタ25、CRTビデオマルチプレクサ2
6、スプライト制御回路27、フラットパネルエミュレ
ーション回路28、およびDAC(D/Aコンバータ)
35は、画面リフレッシシュのために、ビデオメモリ3
0からイメージデータをリードしてそれをビデオ信号に
変換する表示制御回路を構成する。
The data bus width between the memory control circuit 14 and the video memory 30 is set to the same as the data transfer width of the local bus 3, for example, 32 bits. CRT controller 16, sprite memory 19, serializer 2
0, latch circuit 21, foreground / background multiplexer 22, graphic / text multiplexer 23, color palette control circuit 24, sprite color register 25, CRT video multiplexer 2
6, sprite control circuit 27, flat panel emulation circuit 28, and DAC (D / A converter)
35 is a video memory 3 for screen refresh.
A display control circuit for reading image data from 0 and converting it into a video signal is configured.

【0031】CRTコントローラ(CRTC)16は、
フラットパネルディスプレイ40またはCRTディスプ
レイ50を制御するための各種表示タイミング信号(水
平同期信号、垂直同期信号等)や、ビデオメモリ30か
ら画面表示すべきイメージデータを読み出すための表示
アドレスを発生する。
The CRT controller (CRTC) 16 is
It generates various display timing signals (horizontal synchronizing signal, vertical synchronizing signal, etc.) for controlling the flat panel display 40 or the CRT display 50, and a display address for reading image data to be displayed on the screen from the video memory 30.

【0032】スプライトメモリ19には、グラフィクス
モードではスプライトデータ、テキストモードではフォ
ントが書き込まれる。テキストモードでは、ビデオメモ
リ30から読み出されたテキストデータのコードがイン
デックスとしてスプライトメモリ19に供給され、その
コードに対応するフォントが読み出される。
Sprite data is written in the graphics mode in the sprite memory 19, and fonts are written in the text mode. In the text mode, the code of the text data read from the video memory 30 is supplied to the sprite memory 19 as an index, and the font corresponding to the code is read.

【0033】シリアライザ20は、ビデオメモリ30か
ら読み出された複数画素分のパラレルピクセルデータを
ピクセル単位(シリアル)に分割して出力するためのパ
ラレル/シリアル変換回路であり、グラフィクスモード
では、ビデオメモリ30から読み出されるイメージデー
タとスプライトメモリ19から読み出されるスプライト
データをそれぞれパラレル/シリアル変換し、テキスト
モードでは、スプライトメモリ19から読み出されるフ
ォントデータをパラレル/シリアル変換する。
The serializer 20 is a parallel / serial conversion circuit for dividing the parallel pixel data for a plurality of pixels read from the video memory 30 into pixel units (serial) and outputting the data. In the graphics mode, the serializer 20 is used. The image data read from 30 and the sprite data read from the sprite memory 19 are respectively parallel / serial converted, and in the text mode, the font data read from the sprite memory 19 is parallel / serial converted.

【0034】ラッチ回路21は、コードデータからフォ
ントデータへの変換の遅れ時間だけアトリビュートの出
力タイミングを遅延させるためのものであり、テキスト
モードにおいてビデオメモリ30から読み出されるテキ
ストデータのアトリビュートを保持する。フォアグラン
ド/バックグランドマルチプレクサ22は、テキストモ
ードにおいてアトリビュートのフォアグランド色(前面
色)/バックグランド色(背景色)の一方を選択する。
この選択は、シリアライザ20から出力されるフォント
データの値“1”(フォアグランド),“0”(バック
グランド)によって制御される。グラフィックス/テキ
ストマルチプレクサ23は、グラフィックスモードとテ
キストモードの切替えを行なうためのものであり、グラ
フィックスモードにおいてはシリアライザ20から出力
されるメモリデータを選択し、テキストモードにおいて
はフォアグランド/バックグランドマルチプレクサ22
の出力を選択する。
The latch circuit 21 is for delaying the attribute output timing by the delay time of conversion from code data to font data, and holds the attribute of text data read from the video memory 30 in the text mode. The foreground / background multiplexer 22 selects one of the attribute foreground color (front color) / background color (background color) in the text mode.
This selection is controlled by the values "1" (foreground) and "0" (background) of the font data output from the serializer 20. The graphics / text multiplexer 23 is for switching between the graphics mode and the text mode. In the graphics mode, the memory data output from the serializer 20 is selected, and in the text mode, the foreground / background is selected. Multiplexer 22
Select the output of

【0035】カラーパレット制御回路24は、グラフィ
ックスまたはテキストデータの色変換を行なうためのも
のである。このカラーパレット制御回路24は、2段構
成のカラーパレットテーブルを備えている。第1のカラ
ーパレットテーブルは、16個のカラーパレットレジス
タから構成されている。各カラーパレットレジスタに
は、6ビットのカラーパレットデータが格納されてい
る。第2のカラーパレットテーブルは、256個のカラ
ーパレットレジスタから構成されている。各カラーパレ
ットレジスタには、R,G,Bそれぞれ8ビットから構
成される24ビットのカラーデータが格納されている。
The color palette control circuit 24 is for performing color conversion of graphics or text data. The color pallet control circuit 24 has a two-stage color pallet table. The first color palette table is composed of 16 color palette registers. 6-bit color palette data is stored in each color palette register. The second color pallet table is composed of 256 color pallet registers. Each color palette register stores 24-bit color data consisting of 8 bits for each of R, G, and B.

【0036】グラフィックスモードにおいては、8ビッ
ト/ピクセルのXGA仕様のメモリデータは、第1のカ
ラーパレットテーブルを介さずに、第2のカラーパレッ
トテーブルに直接送られ、そこでR,G,Bそれぞれ8
ビットから構成されるカラーデータに変換される。ま
た、4ビット/ピクセルのVGA仕様のメモリデータ
は、まず第1のカラーパレットテーブルに送られ、そこ
で6ビットのカラーデータに変換されて出力される。そ
して、この6ビットのカラーデータには、カラーパレッ
ト制御回路19内蔵のカラー選択レジスタから出力され
る2ビットデータが加えられ、これにより合計8ビット
のカラーデータとなる。この後、その8ビットのカラー
データは、第2のカラーパレットテーブルに送られ、そ
こでR,G,Bそれぞれ8ビットから構成されるカラー
データに変換される。
In the graphics mode, 8-bit / pixel XGA specification memory data is sent directly to the second color palette table without going through the first color palette table, where R, G, and B respectively. 8
Converted to color data composed of bits. The 4-bit / pixel VGA memory data is first sent to the first color palette table, where it is converted into 6-bit color data and output. Then, the 6-bit color data is added with the 2-bit data output from the color selection register incorporated in the color palette control circuit 19 to make a total of 8-bit color data. After that, the 8-bit color data is sent to the second color palette table, where it is converted into color data of 8 bits for each of R, G, and B.

【0037】一方、テキストモードにおいては、XG
A,VGAどちらの仕様のテキストデータも、第1およ
び第2の2段のカラーパレットテーブルを介して、R,
G,Bそれぞれ8ビットから構成されるカラーデータに
変換される。
On the other hand, in the text mode, XG
Text data of both A and VGA can be read via R, R, and R via the first and second two-stage color palette tables.
Each of G and B is converted into color data composed of 8 bits.

【0038】また、XGAのグラフィクスモードにおい
ては、1画素が16ビットまたは24ビットから構成さ
れるダイレクトカラーモードがあり、この場合には、そ
のピクセルデータは、カラーパレット制御回路24を介
さずに、CRTビデオマルチプレクサ26に直接供給さ
れる。
In the XGA graphics mode, there is a direct color mode in which one pixel is composed of 16 bits or 24 bits. In this case, the pixel data of the pixel does not go through the color palette control circuit 24. It is directly supplied to the CRT video multiplexer 26.

【0039】スプライトカラーレジスタ25は、ハード
ウェアカーソルなどのスプライト表示色を指定するスプ
ライト表示データを格納する。CRTビデオマルチプレ
クサ26は、CRTビデオ表示出力を選択するものであ
り、カラーパレット制御回路24の出力、シリアライザ
20からのダイレクトカラー出力、スプライト表示デー
タ、または外部ビデオデータの選択を行なう。この選択
動作は、CRTC16からの表示タイミング信号によっ
て制御される。外部ビデオデータは、例えば表示制御シ
ステム4の外部から入力される動画などのビデオデータ
である。スプライト制御回路27は、シリアライザ20
によってパラレル/シリアル変換されたスプライトデー
タに従ってスプライトカラーレジスタ25のスプライト
表示データを出力する。
The sprite color register 25 stores sprite display data designating a sprite display color such as a hardware cursor. The CRT video multiplexer 26 selects the CRT video display output, and selects the output of the color palette control circuit 24, the direct color output from the serializer 20, the sprite display data, or the external video data. This selection operation is controlled by the display timing signal from the CRTC 16. The external video data is video data such as a moving image input from outside the display control system 4, for example. The sprite control circuit 27 uses the serializer 20.
The sprite display data of the sprite color register 25 is output according to the parallel / serial converted sprite data.

【0040】フラットパネルエミュレーション回路28
は、CRTビデオ出力を変換してフラットパネルディス
プレイ40用のフラットビデオデータを生成する。DA
C35は、CRTビデオマルチプレクサ26から出力さ
れるCRTビデオデータをアナログR,G,B信号に変
換してCRTディスプレイ50に供給する。
Flat panel emulation circuit 28
Converts the CRT video output to produce flat video data for flat panel display 40. DA
The C 35 converts the CRT video data output from the CRT video multiplexer 26 into analog R, G, B signals and supplies the analog R, G, B signals to the CRT display 50.

【0041】次に、図3を参照して、アクセラレータ1
3に設けられたライン描画回路132aの具体的な構成
を説明する。ライン描画回路132aは、直線の描画が
指定された時、その直線の中に含まれる水平ライン線分
をブレゼンハムアルコリズムのエラータームを用いて検
出し、その水平ライン線分毎に転送ピクセル数(NOP
EL)を算出する構成であり、図示のように、転送先X
−Yアドレス演算回路201、制御回路202、ピクセ
ルカウント(PCNT)回路203、およびブレゼンハ
ムエラーターム演算回路204を備えている。
Next, referring to FIG. 3, the accelerator 1
A specific configuration of the line drawing circuit 132a provided in No. 3 will be described. When the drawing of a straight line is designated, the line drawing circuit 132a detects a horizontal line segment included in the straight line using the error term of Bresenham algorithm, and the number of pixels to be transferred for each horizontal line segment ( NOP
EL) is calculated, and the transfer destination X
A Y address calculation circuit 201, a control circuit 202, a pixel count (PCNT) circuit 203, and a Bresenham error term calculation circuit 204 are provided.

【0042】これら各回路の動作を分かり易くするため
に、まず、ブレゼンハムのアルゴリズムを用いた転送先
X−Yアドレス(DX,DY)の算出原理を説明する。
ブレゼンハムのアルゴリズムは、ライン描画機能を実行
するために使用されるアルゴリズムであり、現在の座標
値(X,Y)の次の座標値を、(X+1,Y)と(X+
1,Y+1)のどちらにするかをピクセル毎に決定し、
これにより始点座標と終点座標間を結ぶ各ピクセルの座
標値を求める。このアルゴリズムでは、第1オクタント
(オクタント0)に正規化された次の3つのパラメタが
使用される。
In order to make the operation of each of these circuits easy to understand, the principle of calculation of the transfer destination XY address (DX, DY) using the Bresenham algorithm will be described first.
Bresenham's algorithm is an algorithm used to execute the line drawing function. The next coordinate value of the current coordinate value (X, Y) is (X + 1, Y) and (X +
1, Y + 1) for each pixel,
As a result, the coordinate value of each pixel connecting the start point coordinate and the end point coordinate is obtained. This algorithm uses the following three parameters normalized to the first octant (octant 0).

【0043】1.ブレゼンハムエラータ−ムE { E=2×deltaY−deltaX} 2.ブレゼンハム定数K1 {K1=2×deltaY} 3.ブレゼンハム定数K2 {K2=2×(deltaY−deltaX)} ここで、deltaXは、終点座標と始点座標とのXア
ドレス値の差を示し、deltaYは、終点座標と始点
座標とのYアドレス値の差を示している。例えば、図4
に示されているように、デスティネーションマップ上の
転送先始点座標が(STDX,STDY)で、転送先終
点座標が(LIMDX,LIMDY)の場合には、 deltaX=LIMDX−STDX deltaY=LIMDY−STDY となる。
1. Bresenham error term E {E = 2 × deltaY-deltaX} 2. Bresenham constant K1 {K1 = 2 × deltaY} 3. Bresenham's constant K2 {K2 = 2 × (deltaY-deltaX)} where deltaX is the difference between the X address values of the end point coordinates and the start point coordinates, and deltaY is the difference between the Y address values of the end point coordinates and the start point coordinates. Is shown. For example, in FIG.
When the transfer destination start point coordinates on the destination map are (STDX, STDY) and the transfer destination end point coordinates are (LIMDX, LIMDY), deltaX = LIMDX-STDX deltaY = LIMDY-STDY. Becomes

【0044】ブレゼンハムエラータ−ムEは、現在の転
送先座標値(X,Y)の次の転送先座標値を(X+1,
Y)と(X+1,Y+1)のどちらにするかを決定する
ために使用される。ブレゼンハムエラータ−ムE≧0な
らば、(X+1,Y+1)が選択される。一方、ブレゼ
ンハムエラータ−ムE<0ならば、(X+1,Y)が選
択される。
The Bresenham error term E sets the transfer destination coordinate value next to the current transfer destination coordinate value (X, Y) to (X + 1,
Y) or (X + 1, Y + 1). If the Bresenham error term E ≧ 0, (X + 1, Y + 1) is selected. On the other hand, if the Bresenham error term E <0, (X + 1, Y) is selected.

【0045】ブレゼンハムのアルゴリズムを用いたライ
ン描画の手順は、図5の通りである。すなわち、まず、
始点と終点それぞれのX−Y座標が与えられ、その座標
値に従ってパラメタE,K1,K2が求められてコプロ
レジスタ131にセットされる(ステップS101)。
次いで、始点座標のXアドレスの値が+1カウントアッ
プされた後、ブレゼンハムエラータ−ムEがE≧0であ
るか否かが調べられる(ステップS104)。
The procedure of line drawing using the Bresenham algorithm is as shown in FIG. That is, first,
XY coordinates of the start point and the end point are given, and the parameters E, K1, and K2 are obtained according to the coordinate values and set in the copro register 131 (step S101).
Next, after the value of the X address of the starting point coordinate is incremented by 1, the Bresenham error term E is checked whether E ≧ 0 (step S104).

【0046】E≧0ならば、Eの値がE+K2に更新さ
れ、始点座標のYアドレスの値が+1カウントアップさ
れる(ステップS104、S105)。これにより、始
点座標(X,Y)の次のピクセルの座標値が(X+1,
Y+1)に決定される。
If E ≧ 0, the value of E is updated to E + K2, and the value of the Y address of the starting point coordinate is incremented by +1 (steps S104 and S105). As a result, the coordinate value of the pixel next to the starting point coordinates (X, Y) is (X + 1,
Y + 1) is determined.

【0047】一方、E<0ならば、Eの値だけがE+K
1に更新され、始点座標のYアドレスの値は更新されな
い(ステップS106)。これにより、始点座標(X,
Y)の次のピクセルの座標値が(X+1,Y)に決定さ
れる。
On the other hand, if E <0, only the value of E is E + K
It is updated to 1, and the value of the Y address of the starting point coordinates is not updated (step S106). As a result, the starting point coordinates (X,
The coordinate value of the pixel next to Y) is determined to be (X + 1, Y).

【0048】次ピクセルの座標値が決定されると、線分
長L(L=終点座標のXアドレス−始点座標のXアドレ
ス)が−1される(ステップS107)。ステップS1
02〜S107の処理は線分長Lが0になるまで、繰り
返し実行される(ステップS108)。これにより、始
点から終点を結ぶ線分が描画される。
When the coordinate value of the next pixel is determined, the line segment length L (L = X address of end point coordinate−X address of start point coordinate) is decremented by 1 (step S107). Step S1
The processing from 02 to S107 is repeatedly executed until the line segment length L becomes 0 (step S108). As a result, a line segment connecting the start point and the end point is drawn.

【0049】図3の転送先X−Yアドレス演算回路20
1は、制御回路202からの制御信号によって制御さ
れ、直線を描画するための転送先X−Yアドレス(D
X,DY)および転送ピクセル数(NOPEL)を算出
する。転送先X−Yアドレス(DX,DY)は、上述し
たブレゼンハムのアルゴミズムに従って直線を構成する
ピクセル毎に求められ、リニアアドレス変換ユニット1
33に送られる。転送ピクセル数(NOPEL)は、水
平ラインを描画する場合には、その水平ライン長−1、
つまり水平ラインを構成するピクセル数−1を示し、あ
る傾きを持った直線を描画する場合にはその直線を構成
する複数の水平ライン線分の内で、転送対象となる水平
ライン線分のピクセル数−1を示す。
Transfer destination XY address operation circuit 20 of FIG.
1 is controlled by a control signal from the control circuit 202, and a transfer destination XY address (D
X, DY) and the number of transferred pixels (NOPEL) are calculated. The transfer destination XY address (DX, DY) is obtained for each pixel forming a straight line according to the above-mentioned Bresenham's argomizism, and the linear address conversion unit 1
Sent to 33. The number of transfer pixels (NOPEL) is the horizontal line length −1 when drawing a horizontal line,
That is, the number of pixels forming a horizontal line is -1. When drawing a straight line having a certain inclination, the pixel of the horizontal line segment to be transferred among the plurality of horizontal line segments forming the straight line Indicates the number -1.

【0050】この転送先X−Yアドレス演算回路201
には、DXカウンタ301、ネクストDX(NDX)カ
ウンタ302、DYカウンタ303、減算器304、コ
ンパレータ305,306、およびORゲート307が
設けられている。
This transfer destination XY address operation circuit 201
Is provided with a DX counter 301, a next DX (NDX) counter 302, a DY counter 303, a subtractor 304, comparators 305 and 306, and an OR gate 307.

【0051】DXカウンタ301には、転送開始デスト
ネーションXアドレス(STDX)がロードされる。S
TDXは始点座標のXアドレスの値を示す。DXカウン
タ301の出力DXの初期値はSTDXであり、制御回
路202からDX更新要求信号(DXUDRQ)が発生
された時、その時に減算器304から出力されているN
OPELの値だけインクリメントされる。DXカウンタ
301の出力DXは、減算器304の第1入力に供給さ
れる。
The DX counter 301 is loaded with the transfer start destination X address (STDX). S
TDX indicates the value of the X address of the starting point coordinates. The initial value of the output DX of the DX counter 301 is STDX, and when the DX update request signal (DXUDRQ) is generated from the control circuit 202, the N output from the subtractor 304 at that time is output.
It is incremented by the value of OPEL. The output DX of the DX counter 301 is supplied to the first input of the subtractor 304.

【0052】NDXカウンタ302には、水平ラインの
描画の時には、デスティネ−ションXアドレス限界値
(LINDX)が初期値としてロードされる。LIND
Xは、終点座標がデスティネーションまたはマスクマッ
プバウンダリを横切らない場合にはラインの終点座標の
Xアドレス値となり、横切る場合にはそのマップ内の最
終Xアドレスとなる。
When drawing a horizontal line, the NDX counter 302 is loaded with the destination X address limit value (LINDX) as an initial value. LIND
X becomes the X address value of the end point coordinate of the line when the end point coordinates do not cross the destination or mask map boundary, and becomes the final X address in the map when it crosses.

【0053】また、ある傾きを持ったラインを描画する
時には、STDXがNDXカウンタ302に初期値とし
てロードされる。この場合、NDXカウンタ302のS
TDXの値は、制御回路202からのブレゼンハムエラ
ーターム更新要求パルス(BETUD;Bresenh
am error term update requ
est pulse)に応じて、+1単位でピクセル毎
にカウントアップされる。ブレゼンハムエラーターム更
新要求パルス(BETUD)は、前述したブレゼンハム
エラータームEの値をE+K2またはE+K1に更新す
るために使用される信号であり、ピクセルの座標値が決
定される度に発生される。
When drawing a line having a certain inclination, STDX is loaded as an initial value in the NDX counter 302. In this case, S of the NDX counter 302
The value of TDX is the Bresenham error term update request pulse (BETUD; Bresenh) from the control circuit 202.
am error term update request
The count is incremented for each pixel in units of +1 according to the (est pulse). The Bresenham error term update request pulse (BETUD) is a signal used to update the value of the Bresenham error term E to E + K2 or E + K1, and is generated every time the coordinate value of a pixel is determined.

【0054】NDXカウンタ302にLINDXとST
DXのどちらをロードするかは、制御回路302によっ
て制御される。NDXカウンタ302の出力NDXは、
減算器304の第2入力、およびコンパレータ305の
第1入力に供給される。コンパレータ305の第2入力
には、LIMDXが入力されている。
The NDX counter 302 receives LINDX and ST.
Which of the DX is loaded is controlled by the control circuit 302. The output NDX of the NDX counter 302 is
It is supplied to the second input of the subtractor 304 and the first input of the comparator 305. LIMDX is input to the second input of the comparator 305.

【0055】DYカウンタ303には、転送開始デステ
ィネーションYアドレス(STDY)がロードされる。
STDYは始点座標のYアドレスの値を示す。DYカウ
ンタ303のDYの値は、制御回路202からのDY更
新要求信号(DYUDRQ)に応じて+1単位でカウン
トアップされる。DY更新要求信号(DYUDRQ)
は、ブレゼンハムエラータームEがE≧0になる時、つ
まり(X+1,Y+1)の座標を選択する時に発生され
る。
The DY counter 303 is loaded with the transfer start destination Y address (STDY).
STDY indicates the value of the Y address of the starting point coordinates. The DY value of the DY counter 303 is counted up in units of +1 according to the DY update request signal (DYUDRQ) from the control circuit 202. DY update request signal (DYUDRQ)
Is generated when the Bresenham error term E is E ≧ 0, that is, when the coordinates (X + 1, Y + 1) are selected.

【0056】DYカウンタ303の出力DYは、コンパ
レータ306の第1入力に供給される。コンパレータ3
06の第2入力には、LIMDYが入力されている。L
IMDYは、終点座標がデスティネーションまたはマス
クマップバウンダリを横切らない場合にはラインの終点
座標のYアドレス値を示し、横切る場合にはそのマップ
内の最終Yアドレスを示す。
The output DY of the DY counter 303 is supplied to the first input of the comparator 306. Comparator 3
LIMDY is input to the second input of 06. L
IMDY indicates the Y address value of the end point coordinate of the line when the end point coordinate does not cross the destination or mask map boundary, and indicates the final Y address in the map when it crosses.

【0057】減算器304は、NDXカウンタ302か
らの出力NDXの値からDXカウンタ301からの出力
DXの値を減算することにより、|NDX−DX|を転
送ピクセル数(NOPEL)として算出する。
The subtractor 304 subtracts the value of the output DX from the DX counter 301 from the value of the output NDX from the NDX counter 302 to calculate | NDX-DX | as the transfer pixel number (NOPEL).

【0058】水平ラインの描画の場合には、NDXカウ
ンタ302の出力NDXの値はLIMDXと等しいの
で、|NDX−DX|(=NOPEL)は水平ラインを
構成するピクセル数−1に相当する。
In the case of drawing a horizontal line, the value of the output NDX of the NDX counter 302 is equal to LIMDX, so | NDX-DX | (= NOPEL) corresponds to the number of pixels constituting a horizontal line-1.

【0059】ある傾きを持つラインの描画の場合には、
NDXカウンタ302の出力NDXの値は+1単位でピ
クセル毎にカウントアップされ、またDXカウンタ30
1の出力DXはDY更新要求信号(DYUDRQ)が発
生される度にその時の|NDX−DX|(=NOPE
L)の値だけインクリメントされる。
In the case of drawing a line having a certain inclination,
The value of the output NDX of the NDX counter 302 is counted up in units of +1 for each pixel, and the DX counter 30
The output DX of 1 is | NDX-DX | (= NOPE) at each time when the DY update request signal (DYUDRQ) is generated.
L) is incremented.

【0060】このため、ある傾きを持つラインの描画の
場合においては、DY更新要求信号(DYUDRQ)が
発生された時、|NDX−DX|(=NOPEL)は、
描画対象ラインを構成する水平ライン線分の中で、転送
対象の水平ライン線分のピクセル数−1を示す。
Therefore, in the case of drawing a line having a certain inclination, when the DY update request signal (DYUDRQ) is generated, | NDX-DX | (= NOPEL) becomes
Among the horizontal line segments forming the drawing target line, the number of pixels of the horizontal line segment to be transferred is -1.

【0061】コンパレータ305は、NDXカウンタ3
01の出力NDXとLIMDXとを比較し、それらが一
致した時に論理“1”レベルの一致信号をORゲート3
07に出力する。コンパレータ306は、DYカウンタ
301の出力DYとLIMDYとを比較し、それらが一
致した時に論理“1”レベルの一致信号をORゲート3
07に出力する。
The comparator 305 has an NDX counter 3
The output NDX of 01 is compared with LIMDX, and when they match, the OR gate 3 outputs a match signal of logic "1" level.
It outputs to 07. The comparator 306 compares the output DY of the DY counter 301 with LIMDY, and when they match, outputs a match signal of logic “1” level to the OR gate 3.
It outputs to 07.

【0062】コンパレータ305または306から一致
信号が出力されると、ORゲート307から制御回路2
02に最終転送信号(LASTTR;Last tra
nsfer)が出力される。LASTTRは、転送終了
条件が成立し、次の転送サイクルで描画のための転送が
完了することを示す。
When the coincidence signal is output from the comparator 305 or 306, the OR gate 307 causes the control circuit 2 to
02 the final transfer signal (LASTTR; Last tra)
nsfer) is output. LASTTR indicates that the transfer end condition is satisfied and the transfer for drawing is completed in the next transfer cycle.

【0063】制御回路202は、ライン描画回路132
a全体の動作制御、およびデータ転送制御回路134と
のインターフェース制御を実行する。制御回路202と
データ転送制御回路134との間では、転送開始パルス
(TRSP;Transfer start puls
e)、転送要求信号(TRRQ;Transfer r
equest)、転送レディー信号(TRRDY;Tr
ansfer ready)、転送完了信号(TREN
D;Transferend)が授受される。
The control circuit 202 is a line drawing circuit 132.
The operation control of the whole a and the interface control with the data transfer control circuit 134 are executed. A transfer start pulse (TRSP) is provided between the control circuit 202 and the data transfer control circuit 134.
e), transfer request signal (TRRQ; Transfer r)
request), transfer ready signal (TRRDY; Tr
transfer ready, transfer completion signal (TREN)
D; Transferend) is given and received.

【0064】転送開始パルス(TRSP)はライン描画
のためのデータ転送開始を示すものであり、例えば、コ
プロレジスタ131にライン描画コマンドがセットされ
た時にデータ転送制御回路134から制御回路202に
送られる。
The transfer start pulse (TRSP) indicates the start of data transfer for line drawing. For example, when a line drawing command is set in the copro register 131, it is sent from the data transfer control circuit 134 to the control circuit 202. .

【0065】転送要求信号(TRRQ)は、前述したよ
うにデータ転送制御ユニット134に対してデータ転送
を要求する信号であり、その時の転送ピクセル数は前述
のNOPELによってデータ転送制御ユニット134に
指示される。転送要求信号(TRRQ)は、ブレゼンハ
ムエラータームEが負からE≦0に変化した時、または
最終転送信号(LASTTR)に応答して、発生され
る。
The transfer request signal (TRRQ) is a signal for requesting data transfer to the data transfer control unit 134 as described above, and the number of transfer pixels at that time is instructed to the data transfer control unit 134 by the NOPEL. It The transfer request signal (TRRQ) is generated when the Bresenham error term E changes from negative to E≤0 or in response to the final transfer signal (LASTTR).

【0066】転送レディー信号(TRRDY)は、デー
タ転送制御ユニット134から制御回路202に送られ
る信号であり、転送要求信号(TRRQ)を受け付けた
ことを示す。
The transfer ready signal (TRRDY) is a signal sent from the data transfer control unit 134 to the control circuit 202 and indicates that the transfer request signal (TRRQ) has been accepted.

【0067】転送完了信号(TREND)は、制御回路
202からデータ転送制御ユニット134に送られる信
号であり、描画のための全てのデータ転送要求の発行が
完了したことを示す。
The transfer completion signal (TREND) is a signal sent from the control circuit 202 to the data transfer control unit 134 and indicates that the issuance of all data transfer requests for drawing has been completed.

【0068】制御回路202とアドレス演算回路201
との間では、前述した最終転送信号(LASTTR)、
ブレゼンハムエラーターム更新要求パルス(BETU
D)、DX更新要求信号(DXUDRQ)およびDY更
新要求信号(DYUDRQ)の他、更新要求信号DXU
DRQ,DYUDRQに対するレディー信号DXUDR
Y,DYUDRYなどが授受される。
Control circuit 202 and address operation circuit 201
Between the last transfer signal (LASTTR),
Bresenham error term update request pulse (BETU
D), DX update request signal (DXUDRQ) and DY update request signal (DYUDRQ), as well as update request signal DXU
Ready signal DXUDR for DRQ and DYUDRQ
Y, DYUDRY, etc. are given and received.

【0069】ピクセルカウント(PCNT)回路203
は、描画対象ラインの中で座標値が算出されてない残り
ピクセル数をカウントし、ピクセルカウント信号(PE
Lcount)を発生する。ピクセルカウント信号(P
CNT;PEL count)の値は、ブレゼンハムエ
ラーターム更新要求パルス(BETUD)に応じて1ピ
クセル当たり1づつデクリメントされ、残りピクセル数
が零、つまり転送完了時には零になる。尚、水平ライン
を描画する場合には、水平ラインを構成する全てのピク
セルが1度に転送されるので、ピクセルカウント信号
(PEL count)の値は、NOPELの値だけ一
度にデクリメントされる。
Pixel count (PCNT) circuit 203
Counts the number of remaining pixels whose coordinate values have not been calculated in the drawing target line, and uses the pixel count signal (PE
Lcount). Pixel count signal (P
The value of CNT; PEL count) is decremented by 1 per pixel in response to the Bresenham error term update request pulse (BETUD), and the number of remaining pixels becomes zero, that is, when the transfer is completed. When drawing a horizontal line, all the pixels forming the horizontal line are transferred at one time, so the value of the pixel count signal (PEL count) is decremented by the value of NOPEL at a time.

【0070】ブレゼンハムエラーターム演算回路204
は、図5で説明したブレゼンハムアルコリズムに従って
ブレゼンハムエラータームEを順次更新し、そのブレゼ
ンハムエラータームEの符号ビットを出力する。ここで
は、ブレゼンハムエラータームEが−8192≦E≦8
191の値を取る場合を想定しており、符号ビットはエ
ラータームのデータ列(BET<13−0>)のビット
13(BET<13>)となる。
Bresenham error term calculation circuit 204
5 sequentially updates the Bresenham error term E in accordance with the Bresenham error term described in FIG. 5, and outputs the sign bit of the Bresenham error term E. Here, the Bresenham error term E is −8192 ≦ E ≦ 8.
It is assumed that the value of 191 is taken, and the sign bit is bit 13 (BET <13>) of the error term data string (BET <13-0>).

【0071】次に、図6乃至図9を参照して、図3のラ
イン描画回路132aの動作を説明する。まず、図7の
タイミングチャートを参照して、図6のような水平ライ
ンを転送する場合の動作について説明する。図6におい
ては、始点座標と終点座標がデスティネーションマップ
バウンダリを跨がって指定された場合が例示されてい
る。
Next, the operation of the line drawing circuit 132a shown in FIG. 3 will be described with reference to FIGS. First, with reference to the timing chart of FIG. 7, an operation when transferring a horizontal line as shown in FIG. 6 will be described. FIG. 6 exemplifies a case where the start point coordinates and the end point coordinates are designated across the destination map boundary.

【0072】この場合、deltaYは零であるので、
ブレゼンハムアルコリズムで使用される3つのパラメタ
の値は、それぞれ次のように求められる。 K1 = 0 K2 = −2 × deltaX E = −deltaX これらパラメタ値はコプロレジスタ131に設定され、
ブレゼンハムエラーターム演算回路204および制御回
路202によって参照される。
In this case, since deltaY is zero,
The values of the three parameters used in Bresenham algorithm are obtained as follows. K1 = 0 K2 = −2 × deltaX E = −deltaX These parameter values are set in the copro register 131,
It is referred to by the Bresenham error term arithmetic circuit 204 and the control circuit 202.

【0073】制御回路202は、K1=0であることか
ら、描画対象のラインが水平ラインであることを認識す
る。転送開始パルス(TRSP)がデータ転送制御回路
134から制御回路202に送られた時、制御回路20
2は、DXカウンタ301およびDYカウンタ303に
それぞれSTDXおよびSTDYをロードすると共に、
NDXカウンタ302にLIMDXをロードする。この
場合、LIMDXは、デスティネーションマップの最終
Xアドレスの値を示す。また、この時、NDXカウンタ
302の出力NDXがLIMDXに等しいため、最終転
送信号(LASTTR)が制御回路202に送られる。
Since K1 = 0, the control circuit 202 recognizes that the drawing target line is a horizontal line. When a transfer start pulse (TRSP) is sent from the data transfer control circuit 134 to the control circuit 202, the control circuit 20
2 loads STDX and STDY into the DX counter 301 and the DY counter 303, respectively, and
LIMDX is loaded into the NDX counter 302. In this case, LIMDX indicates the value of the final X address of the destination map. At this time, since the output NDX of the NDX counter 302 is equal to LIMDX, the final transfer signal (LASTTR) is sent to the control circuit 202.

【0074】制御回路202は、最終転送信号(LAS
TTR)に応答して転送要求信号(TRRQ)を発行
し、データ転送制御ユニット134にデータ転送を要求
する。この時、減算回路によって求められたNOPEL
(=|NDX−DX|)が転送ピクセル数としてデータ
転送制御ユニット134に送られる。また、DXカウン
タ301の出力DXおよびDYカウンタ303の出力D
Yは、転送開始X−Yアドレスとしてリニアアドレス変
換ユニット133に送られ、そこでビデオメモリ30に
データ転送するためのスタートアドレスに変換される。
The control circuit 202 controls the final transfer signal (LAS
In response to the TTR, a transfer request signal (TRRQ) is issued to request the data transfer control unit 134 to transfer the data. At this time, NOPEL obtained by the subtraction circuit
(= | NDX-DX |) is sent to the data transfer control unit 134 as the number of transfer pixels. Further, the output DX of the DX counter 301 and the output D of the DY counter 303
Y is sent to the linear address conversion unit 133 as a transfer start XY address, and is converted into a start address for data transfer to the video memory 30 there.

【0075】転送要求信号(TRRQ)を受け取ると、
データ転送制御ユニット134は、メモリ制御回路14
を用いて、|NDX−DX|+1個分のピクセルデータ
をビデオメモリ30に連続して転送するブロック転送を
開始し、それらピクセルデータをビデオメモリ30上の
連続する番地に書き込む。
When the transfer request signal (TRRQ) is received,
The data transfer control unit 134 includes the memory control circuit 14
Is used to start the block transfer for continuously transferring | NDX-DX | +1 pixel data to the video memory 30 and writing the pixel data to successive addresses on the video memory 30.

【0076】このデータ転送が完了して転送レディー信
号(TRRDY)がアクティブステートからインアクテ
ィブステートに変化すると、制御回路202は、ブレゼ
ンハムエラーターム更新要求パルス(BETUD)を発
行する。このブレゼンハムエラーターム更新要求パルス
(BETUD)に応じて、ピクセルカウント信号(PC
NT)の値は、NOPELの値だけ一度にデクリメント
されて零となる。この後、制御回路202は、転送完了
信号(TREND)を発行して、描画のための全てのデ
ータ転送要求の発行が完了したことをデータ転送制御ユ
ニット134に通知する。
When this data transfer is completed and the transfer ready signal (TRRDY) changes from the active state to the inactive state, the control circuit 202 issues a Bresenham error term update request pulse (BETUD). In response to the Bresenham error term update request pulse (BETUD), a pixel count signal (PC
The value of (NT) is decremented at once by the value of NOPEL to become zero. After that, the control circuit 202 issues a transfer completion signal (TREND) to notify the data transfer control unit 134 that the issuance of all data transfer requests for drawing has been completed.

【0077】このように、水平ラインを描画する場合に
おいては、その水平ラインを構成するピクセル数が求め
られ、そのピクセル数分のデータが一度にビデオメモリ
30に転送される。したがって、ピクセル単位でビデオ
メモリにデータを転送する従来のグラフィックスコント
ローラよりも水平ラインの描画の性能を大幅に向上する
ことができる。
As described above, when drawing a horizontal line, the number of pixels forming the horizontal line is obtained, and data for the number of pixels is transferred to the video memory 30 at one time. Therefore, the performance of drawing horizontal lines can be significantly improved over the conventional graphics controller that transfers data to the video memory on a pixel-by-pixel basis.

【0078】次に、図9のタイミングチャートを参照し
て、図8のような水平線分を含むラインを描画する場合
の動作について説明する。図8においては、始点座標と
終点座標がデスティネーションマップバウンダリ内に収
まっている場合が例示されている。
Next, with reference to the timing chart of FIG. 9, the operation for drawing a line including horizontal line segments as shown in FIG. 8 will be described. FIG. 8 exemplifies a case where the start point coordinates and the end point coordinates are within the destination map boundary.

【0079】この場合、deltaYは零ではないの
で、ブレゼンハムアルコリズムで使用される3つのパラ
メタの値は、それぞれ次のように求められる。 K1 = 2 × deltaY K2 = 2 × (deltaY − delta
X) E = 2 × deltaY − deltaX これらパラメタ値はコプロレジスタ131に設定され、
ブレゼンハムエラーターム演算回路204および制御回
路202によって参照される。
In this case, since deltaY is not zero, the values of the three parameters used in Bresenham algorithm are obtained as follows. K1 = 2 × deltaY K2 = 2 × (deltaY−delta)
X) E = 2 x deltaY-deltaX These parameter values are set in the copro register 131,
It is referred to by the Bresenham error term arithmetic circuit 204 and the control circuit 202.

【0080】制御回路202は、K1,K2が0でない
ことから、描画対象のラインがある傾きをもったライン
であることを認識する。転送開始パルス(TRSP)が
データ転送制御回路134から制御回路202に送られ
た時、制御回路202は、DXカウンタ301およびD
Yカウンタ303にそれぞれSTDXおよびSTDYを
ロードすると共に、NDXカウンタ302にSTDXを
ロードする。
Since K1 and K2 are not 0, the control circuit 202 recognizes that the line to be drawn has a certain inclination. When the transfer start pulse (TRSP) is sent from the data transfer control circuit 134 to the control circuit 202, the control circuit 202 causes the DX counter 301 and D
The Y counter 303 is loaded with STDX and STDY, respectively, and the NDX counter 302 is loaded with STDX.

【0081】制御回路202は、STDXおよびSTD
Yに後続するピクセルの座標値を求めるためにピクセル
毎にブレゼンハムエラーターム更新要求パルス(BET
UD)を発行し、これに応答するブレゼンハムエラータ
ーム演算回路204からの出力BET<13>が零であ
るか否かを調べる。
The control circuit 202 controls STDX and STD.
The Bresenham error term update request pulse (BET) is calculated for each pixel in order to obtain the coordinate value of the pixel following Y.
UD) is issued, and it is checked whether or not the output BET <13> from the Bresenham error term calculation circuit 204 in response to this is zero.

【0082】BET<13>が1、つまりブレゼンハム
エラータームE<0の期間においては、DXカウンタ3
01およびDYカウンタ303に対する更新要求DXU
DRQ,DYUDRQは共に発生されず、NDXカウン
タ302の出力NDXだけがブレゼンハムエラーターム
更新要求パルス(BETUD)に応答して+1ずつイン
クリメントされる。
During the period when BET <13> is 1, that is, the Bresenham error term E <0, the DX counter 3
01 and DY counter 303 update request DXU
Neither DRQ nor DYUDRQ is generated, and only the output NDX of the NDX counter 302 is incremented by +1 in response to the Bresenham error term update request pulse (BETUD).

【0083】BET<13>が0、つまりブレゼンハム
エラータームE≧0になると、制御回路202は、転送
要求信号(TRRQ)を発行し、データ転送制御ユニッ
ト134にデータ転送を要求する。
When BET <13> is 0, that is, when the Bresenham error term E ≧ 0, the control circuit 202 issues a transfer request signal (TRRQ) and requests the data transfer control unit 134 to transfer data.

【0084】この時、減算回路によって求められたNO
PEL(=|NDX−DX|)が転送ピクセル数として
データ転送制御ユニット134に送られる。図7のタイ
ミングチャートでは、BET<13>が最初に0になっ
た時のNDX=STDX+1、DX=STDXであるの
で、NOPELの値は1となる。
At this time, NO obtained by the subtraction circuit
PEL (= | NDX-DX |) is sent to the data transfer control unit 134 as the number of transfer pixels. In the timing chart of FIG. 7, since NDX = STDX + 1 and DX = STDX when BET <13> first becomes 0, the value of NOPEL becomes 1.

【0085】DXカウンタ301の出力DX(=STD
X)およびDYカウンタ303の出力DY(=STD
Y)は、転送開始X−Yアドレスとしてリニアアドレス
変換ユニット133に送られ、そこでビデオメモリ30
にデータ転送するためのスタートアドレスに変換され
る。
Output DX of DX counter 301 (= STD
X) and DY counter 303 output DY (= STD
Y) is sent to the linear address conversion unit 133 as the transfer start XY address, and the video memory 30
Is converted to a start address for data transfer to.

【0086】転送要求信号(TRRQ)を受け取ると、
データ転送制御ユニット134は、メモリ制御回路14
を用いて、NOPEL+1個(ここでは、2個)分のピ
クセルデータをビデオメモリ30に連続して転送するブ
ロック転送を開始し、それらピクセルデータをビデオメ
モリ30上の連続する番地に書き込む。
When the transfer request signal (TRRQ) is received,
The data transfer control unit 134 includes the memory control circuit 14
Is used to start a block transfer in which NOPEL + 1 (here, two) pixel data are continuously transferred to the video memory 30, and the pixel data are written to continuous addresses on the video memory 30.

【0087】このデータ転送が完了して転送レディー信
号(TRRDY)がアクティブステートからインアクテ
ィブステートに変化すると、制御回路202は、Xカウ
ンタ301およびDYカウンタ303に対する更新要求
DXUDRQ,DYUDRQを発生し、次のピクセルの
Yアドレスを示すDYカウンタ303の出力DYをDY
+1に更新すると共に、DXカウンタ301の出力DX
を、転送したピクセル数(NOPEL+1)だけインク
リメントする。
When this data transfer is completed and the transfer ready signal (TRRDY) changes from the active state to the inactive state, the control circuit 202 generates update requests DXUDRQ and DYUDRQ for the X counter 301 and DY counter 303, and The output DY of the DY counter 303 indicating the Y address of each pixel
Output to DX counter 301 while updating to +1
Is incremented by the number of transferred pixels (NOPEL + 1).

【0088】この後、BET<13>が0、つまりブレ
ゼンハムエラータームE≧0になるまで、DXカウンタ
301およびDYカウンタ303に対する更新要求DX
UDRQ,DYUDRQは共に発生されず、NDXカウ
ンタ302の出力NDXだけがブレゼンハムエラーター
ム更新要求パルス(BETUD)に応答して+1ずつイ
ンクリメントされる。
Thereafter, the update request DX to the DX counter 301 and the DY counter 303 until BET <13> becomes 0, that is, the Bresenham error term E ≧ 0.
Neither UDRQ nor DYUDRQ is generated, and only the output NDX of the NDX counter 302 is incremented by +1 in response to the Bresenham error term update request pulse (BETUD).

【0089】そして、BET<13>が0になると、制
御回路202は、転送要求信号(TRRQ)を発行し、
データ転送制御ユニット134にデータ転送を要求す
る。この時、減算回路によって求められたNOPEL
(ここでは、NOPEL=2)が転送ピクセル数として
データ転送制御ユニット134に送られる。
When BET <13> becomes 0, the control circuit 202 issues a transfer request signal (TRRQ),
The data transfer control unit 134 is requested to transfer data. At this time, NOPEL obtained by the subtraction circuit
(Here, NOPEL = 2) is sent to the data transfer control unit 134 as the number of transfer pixels.

【0090】また、この時のDXカウンタ301の出力
DXおよびDYカウンタ303の出力DYは、転送開始
X−Yアドレスとしてリニアアドレス変換ユニット13
3に送られ、そこでビデオメモリ30にデータ転送する
ためのスタートアドレスに変換される。
The output DX of the DX counter 301 and the output DY of the DY counter 303 at this time are used as the transfer start XY address in the linear address conversion unit 13.
3 is converted into a start address for data transfer to the video memory 30.

【0091】転送要求信号(TRRQ)を受け取ると、
データ転送制御ユニット134は、メモリ制御回路14
を用いて、NOPEL+1個(ここでは、3個)分のピ
クセルデータをビデオメモリ30に連続して転送するブ
ロック転送を開始し、それらピクセルデータをビデオメ
モリ30上の連続する番地に書き込む。
When the transfer request signal (TRRQ) is received,
The data transfer control unit 134 includes the memory control circuit 14
Is used to start a block transfer in which NOPEL + 1 (here, three) pixel data are continuously transferred to the video memory 30, and the pixel data are written to continuous addresses on the video memory 30.

【0092】このデータ転送が完了して転送レディー信
号(TRRDY)がアクティブステートからインアクテ
ィブステートに変化すると、制御回路202は、Xカウ
ンタ301およびDYカウンタ303に対する更新要求
DXUDRQ,DYUDRQを発生し、次のピクセルの
Yアドレスを示すDYカウンタ303の出力DYをDY
+1に更新すると共に、DXカウンタ301の出力DX
を、転送したピクセル数(NOPEL+1)だけインク
リメントする。
When this data transfer is completed and the transfer ready signal (TRRDY) changes from the active state to the inactive state, the control circuit 202 issues update requests DXUDRQ and DYUDRQ to the X counter 301 and DY counter 303, and The output DY of the DY counter 303 indicating the Y address of each pixel
Output to DX counter 301 while updating to +1
Is incremented by the number of transferred pixels (NOPEL + 1).

【0093】そして、NDX=LINDX、またはDY
=LIMDYになると、最終転送信号(LASTTR)
が制御回路202に送られる。制御回路202は、最終
転送信号(LASTTR)に応答して転送要求信号(T
RRQ)を発行し、データ転送制御ユニット134にデ
ータ転送を要求する。この時、減算回路によって求めら
れたNOPEL(ここでは、0)が転送ピクセル数とし
てデータ転送制御ユニット134に送られる。また、D
Xカウンタ301の出力DXおよびDYカウンタ303
の出力DYは、転送開始X−Yアドレスとしてリニアア
ドレス変換ユニット133に送られ、そこでビデオメモ
リ30にデータ転送するためのスタートアドレスに変換
される。
Then, NDX = LINDX, or DY
= LIMDY, the final transfer signal (LASTTR)
Are sent to the control circuit 202. The control circuit 202 responds to the final transfer signal (LASTTR) with the transfer request signal (T
RRQ) is issued and the data transfer is requested to the data transfer control unit 134. At this time, NOPEL (here, 0) obtained by the subtraction circuit is sent to the data transfer control unit 134 as the number of transfer pixels. Also, D
Output DX of X counter 301 and DY counter 303
Output DY is sent to the linear address conversion unit 133 as a transfer start XY address, and is converted into a start address for data transfer to the video memory 30 there.

【0094】転送要求信号(TRRQ)を受け取ると、
データ転送制御ユニット134は、メモリ制御回路14
を用いて、NOPEL+1個分のピクセルデータをビデ
オメモリ30に転送し、そのピクセルデータをビデオメ
モリ30上に書き込む。
When the transfer request signal (TRRQ) is received,
The data transfer control unit 134 includes the memory control circuit 14
Is used to transfer NOPEL + 1 pixel data to the video memory 30, and the pixel data is written on the video memory 30.

【0095】このデータ転送が完了して転送レディー信
号(TRRDY)がアクティブステートからインアクテ
ィブステートに変化すると、制御回路202は、ブレゼ
ンハムエラーターム更新要求パルス(BETUD)を発
行する。このブレゼンハムエラーターム更新要求パルス
(BETUD)に応じて、ピクセルカウント信号(PC
NT)の値は零となる。この後、制御回路202は、転
送完了信号(TREND)を発行して、描画のための全
てのデータ転送要求の発行が完了したことをデータ転送
制御ユニット134に通知する。
When this data transfer is completed and the transfer ready signal (TRRDY) changes from the active state to the inactive state, the control circuit 202 issues a Bresenham error term update request pulse (BETUD). In response to the Bresenham error term update request pulse (BETUD), a pixel count signal (PC
The value of (NT) becomes zero. After that, the control circuit 202 issues a transfer completion signal (TREND) to notify the data transfer control unit 134 that the issuance of all data transfer requests for drawing has been completed.

【0096】このように、水平部分を含むラインを描画
する場合においても、その水平ライン部毎にそれを構成
するピクセル数が求められ、そのピクセル数分のデータ
がビデオメモリ30にブロック転送される。したがっ
て、ある傾きを持つ直線の場合についても、従来のグラ
フィックスコントローラよりも描画性能を大幅に向上す
ることができる。
As described above, even when a line including a horizontal portion is drawn, the number of pixels forming the horizontal line portion is obtained, and data corresponding to the number of pixels is block-transferred to the video memory 30. . Therefore, even in the case of a straight line having a certain inclination, the drawing performance can be significantly improved as compared with the conventional graphics controller.

【0097】また、水平ライン線分を構成するピクセル
のブロック転送については、X−Yアドレス発生回路1
32およびピクセルデータ制御回路134cによってサ
ポートされるBitBlt機能を利用することが好まし
い。
Regarding the block transfer of the pixels forming the horizontal line segment, the XY address generation circuit 1
It is preferable to utilize the BitBlt function supported by 32 and the pixel data control circuit 134c.

【0098】これは、水平ライン線分を指定するライン
パラメタ(転送開始座標DX,DY、転送ピクセル数N
OPEL、線幅)の値を、BitBlt機能に対応する
パラメタ値(矩形領域の始点座標、幅、および高さ)に
変換するハードウェアロジックをアクセラレータ13内
に設け、矩形領域の高さを示す値をラインの線幅(例え
ば、1)に置き換えることによって実現することができ
る。
This is a line parameter for designating a horizontal line segment (transfer start coordinates DX, DY, transfer pixel number N).
A value indicating the height of the rectangular area by providing the hardware logic for converting the value of OPEL, the line width) into the parameter values (start point coordinates, width, and height of the rectangular area) corresponding to the BitBlt function in the accelerator 13. Can be realized by substituting for the line width of the line (for example, 1).

【0099】具体的には、図10に示されているよう
に、アクセラレータ13内にパラメタ変換回路501お
よびマルチプレクサ502を設ければよい。パラメタ変
換回路501は、水平ライン線分を指定するラインパラ
メタ(転送開始座標DX,DY、転送ピクセル数NOP
EL、線幅)の値を、BitBlt機能に対応するパラ
メタ値(矩形領域の始点座標、幅、および高さ)に変換
してマルチプクサ502に出力する。マルチプクサ50
2は、通常はコプロレジスタ131からBitBlt転
送のためのパラメタ値を選択してBitBlt転送ロジ
ックに送るが、ライン描画コマンドがコプロレジスタ1
31に設定された時は、BitBlt転送のためのパラ
メタ値の代わりに、パラメタ変換回路501の出力を選
択してBitBlt転送ロジックに送る。
Specifically, as shown in FIG. 10, the parameter conversion circuit 501 and the multiplexer 502 may be provided in the accelerator 13. The parameter conversion circuit 501 uses line parameters (transfer start coordinates DX, DY, transfer pixel number NOP) that specify horizontal line segments.
The values of EL and line width) are converted into parameter values (start point coordinates, width, and height of the rectangular area) corresponding to the BitBlt function and output to the multiplexer 502. Multipuku 50
2 normally selects a parameter value for BitBlt transfer from the copro register 131 and sends it to the BitBlt transfer logic.
When set to 31, the output of the parameter conversion circuit 501 is selected and sent to the BitBlt transfer logic instead of the parameter value for BitBlt transfer.

【0100】BitBlt転送ロジックは、ライン描画
コマンドとBitBlt転送コマンドのどちらがコプロ
レジスタ131に設定された時でも動作する。BitB
ltはグラフィクスコントローラがサポートする基本機
能であるので、このBitBlt機能を利用することに
より、ライン転送のための専用ハードウェアを設ける事
なく、水平ライン線分を構成するピクセルをブロック転
送することができる。
The BitBlt transfer logic operates when either the line drawing command or the BitBlt transfer command is set in the copro register 131. BitB
Since lt is a basic function supported by the graphics controller, by using this BitBlt function, it is possible to block-transfer pixels forming a horizontal line segment without providing dedicated hardware for line transfer. .

【0101】[0101]

【発明の効果】以上説明したように、この発明によれ
ば、ホストシステムから描画要求された直線の中に水平
ライン線分が含まれていると、その水平ライン線分のピ
クセル数が計数され、水平ライン線分毎にそれを構成す
るピクセル数のデータがビデオメモリにまとめて転送さ
れる。従って、ピクセル単位でビデオメモリに転送する
従来のグラフィックスコントローラよりも直線描画の性
能を大幅に向上することができる。
As described above, according to the present invention, when a horizontal line segment is included in the straight lines requested by the host system for drawing, the number of pixels of the horizontal line segment is counted. , The data of the number of pixels forming each horizontal line segment is collectively transferred to the video memory. Therefore, it is possible to greatly improve the performance of drawing a straight line as compared with the conventional graphics controller which transfers data to the video memory pixel by pixel.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の一実施例に係るグラフィックスコン
トローラを利用した表示制御サブシステムの構成を示す
ブロック図。
FIG. 1 is a block diagram showing the configuration of a display control subsystem using a graphics controller according to an embodiment of the present invention.

【図2】図1のグラフィックスコントローラに設けられ
たグラフィックスアクセラレータの構成を示すブロック
図。
FIG. 2 is a block diagram showing the configuration of a graphics accelerator provided in the graphics controller of FIG.

【図3】図2のグラフィックスアクセラレータに設けら
れたライン描画回路の構成を示すブロック図。
3 is a block diagram showing a configuration of a line drawing circuit provided in the graphics accelerator shown in FIG.

【図4】図3のライン描画回路によって使用されるブレ
ゼンハムアルゴリズムのパラメタを説明するための図。
FIG. 4 is a diagram for explaining parameters of the Bresenham algorithm used by the line drawing circuit of FIG. 3;

【図5】図3のライン描画回路によって実行されるブレ
ゼンハムアルゴリズムを用いた座標値決定動作を説明す
るためのフローチャート。
5 is a flowchart for explaining a coordinate value determination operation using the Bresenham algorithm executed by the line drawing circuit in FIG.

【図6】図3のライン描画回路によって描画される水平
ラインの一例を示す図。
6 is a diagram showing an example of horizontal lines drawn by the line drawing circuit of FIG.

【図7】図6の水平ラインを描画する場合における図3
のライン描画回路の動作を説明するタイミングチャー
ト。
FIG. 7 is a diagram when drawing the horizontal line shown in FIG. 6;
6 is a timing chart for explaining the operation of the line drawing circuit of FIG.

【図8】図3のライン描画回路によって描画される水平
ライン部を含む直線の一例を示す図。
8 is a diagram showing an example of a straight line including a horizontal line portion drawn by the line drawing circuit of FIG.

【図9】図8のラインを描画する場合における図3のラ
イン描画回路の動作を説明するタイミングチャート。
9 is a timing chart illustrating the operation of the line drawing circuit of FIG. 3 when drawing the line of FIG.

【図10】図2のグラフィックスアクセラレータに設け
られるパラメタ変換回路の構成を示す図。
10 is a diagram showing the configuration of a parameter conversion circuit provided in the graphics accelerator of FIG.

【符号の説明】[Explanation of symbols]

10…グラフィクスコントローラ、13…アクセラレー
タ、14…メモリ制御回路、30…ビデオメモリ、13
1…コプロレジスタ、132…X−Yアドレス発生ユニ
ット、133…リニアアドレス変換ユニット、134…
データ転送制御ユニット、132a…ライン描画回路、
201…転送先X−Yアドレス演算回路、202…制御
回路、203…ピクセルカウント回路、204…ブレゼ
ンハムエラーターム演算回路、301…DXカウンタ、
302…NDXカウンタ、303…DYカウンタ、30
4…減算器、305,306…コンパレータ、501…
パラメタ変換回路。
10 ... Graphics controller, 13 ... Accelerator, 14 ... Memory control circuit, 30 ... Video memory, 13
1 ... Copro register, 132 ... XY address generation unit, 133 ... Linear address conversion unit, 134 ...
Data transfer control unit 132a ... Line drawing circuit,
201 ... Transfer destination XY address arithmetic circuit, 202 ... Control circuit, 203 ... Pixel count circuit, 204 ... Bresenham error term arithmetic circuit, 301 ... DX counter,
302 ... NDX counter, 303 ... DY counter, 30
4 ... Subtractor, 305, 306 ... Comparator, 501 ...
Parameter conversion circuit.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ビットマップ形式のビデオメモリを有
し、ディスプレイモニタを制御するグラフィックスコン
トローラにおいて、 直線の描画が指定された時、その直線の中に含まれる水
平ライン線分を検出する手段と、 検出された水平ライン線分毎にそれを構成するピクセル
数を計数する手段と、 前記水平ライン線分毎にそれを構成するピクセル数に相
当する複数の描画データを前記ビデオメモリにブロック
転送し、それら描画データを前記ビデオメモリ上の連続
する番地に書き込むデータ転送手段とを具備することを
特徴とするグラフィックスコントローラ。
1. A graphics controller having a bit map format video memory and controlling a display monitor, when drawing a straight line is specified, means for detecting a horizontal line segment included in the straight line. A means for counting the number of pixels forming each horizontal line segment detected, and a plurality of drawing data corresponding to the number of pixels forming each horizontal line segment being block transferred to the video memory And a data transfer means for writing the drawing data to consecutive addresses on the video memory.
【請求項2】 前記水平ライン線分を検出する手段は、 ブレゼンハムのアルゴミズムを用いて垂直座標値が変化
するピクセル位置を検出する手段を含み、 この検出されたピクセル位置に従って前記水平ライン線
分を検出することを特徴とする請求項1記載のグラフィ
ックスコントローラ。
2. The means for detecting the horizontal line segment includes means for detecting a pixel position where a vertical coordinate value changes by using Bresenham's argomizm, and the horizontal line segment is detected according to the detected pixel position. The graphics controller according to claim 1, wherein the graphics controller is detected.
【請求項3】 ビットマップ形式のビデオメモリを有
し、ディスプレイモニタを制御するグラフィックスコン
トローラにおいて、 始点座標、幅、および高さを示すパラメタ値によって指
定される矩形領域に画像データを転送するBITブロッ
ク転送手段と、 直線の描画が指定された時、その直線の中に含まれる水
平ライン線分を検出する手段と、 検出された水平ライン線分毎にそれを構成するピクセル
数を計数する手段と、 前記各水平ライン線分を指定するラインパラメタの値を
前記BITブロック転送のためのパラメタ値に変換し
て、前記BITブロック転送手段に前記水平ライン線分
毎にそれを構成するピクセル数に相当する複数の描画デ
ータを前記ビデオメモリに転送させるパラメタ変換手段
とを具備することを特徴とするグラフィックスコントロ
ーラ。
3. A BIT for transferring image data to a rectangular area designated by parameter values indicating start point coordinates, width, and height in a graphics controller having a bit map format video memory and controlling a display monitor. Block transfer means, means for detecting a horizontal line segment included in the straight line when drawing of a straight line is specified, and means for counting the number of pixels constituting the horizontal line segment detected And converting the value of the line parameter designating each horizontal line segment into a parameter value for the BIT block transfer, and setting the number of pixels constituting each horizontal line segment in the BIT block transfer means. And a parameter conversion unit for transferring a plurality of corresponding drawing data to the video memory. Box controller.
【請求項4】 前記パラメタ変換手段は、前記水平ライ
ン線分の始点座標、長さ、線幅を指定するラインパラメ
タの値を、前記矩形領域の始点座標、幅、および高さを
指定するBITブロック転送のためのパラメタ値にそれ
ぞれ変換することを特徴とする請求項3記載のグラフィ
ックスコントローラ。
4. The parameter converting means sets a value of a line parameter for designating a starting point coordinate, a length and a line width of the horizontal line segment, and a BIT for designating a starting point coordinate, a width and a height of the rectangular area. 4. The graphics controller according to claim 3, wherein the graphics controller converts each into a parameter value for block transfer.
JP00634495A 1995-01-19 1995-01-19 Graphics controller and pixel data transfer system Expired - Fee Related JP3313527B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP00634495A JP3313527B2 (en) 1995-01-19 1995-01-19 Graphics controller and pixel data transfer system
US08/558,781 US5721885A (en) 1995-01-19 1995-11-16 Pixel data transfer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00634495A JP3313527B2 (en) 1995-01-19 1995-01-19 Graphics controller and pixel data transfer system

Publications (2)

Publication Number Publication Date
JPH08194826A true JPH08194826A (en) 1996-07-30
JP3313527B2 JP3313527B2 (en) 2002-08-12

Family

ID=11635762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00634495A Expired - Fee Related JP3313527B2 (en) 1995-01-19 1995-01-19 Graphics controller and pixel data transfer system

Country Status (2)

Country Link
US (1) US5721885A (en)
JP (1) JP3313527B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5990912A (en) * 1997-06-27 1999-11-23 S3 Incorporated Virtual address access to tiled surfaces
US6088046A (en) * 1997-10-02 2000-07-11 Cirrus Logic, Inc. Host DMA through subsystem XY processing
GB0100965D0 (en) * 2001-01-13 2001-02-28 Lsi Logic Corp Burst signal generation for pipelined access to AMBA bus
AU2002353125A1 (en) * 2001-12-13 2003-06-30 Fraunhofer Crcg Using line structure information to enhance line drawing in digital systems
US7006094B2 (en) 2002-04-24 2006-02-28 Seiko Epson Corporation Method and apparatus for filling an image on a display screen
US20040021649A1 (en) * 2002-08-02 2004-02-05 Keith Kejser Method and apparatus for translating X, Y coordinates for a linear memory system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02160290A (en) * 1987-12-25 1990-06-20 Tatsumi Denshi Kogyo Kk Image rotating method
US5167015A (en) * 1988-06-13 1992-11-24 Industrial Technology Research Institute Line drawing method and apparatus
JPH03296097A (en) * 1990-04-16 1991-12-26 Mitsubishi Electric Corp Graphic display device
JPH04128890A (en) * 1990-09-20 1992-04-30 Fuji Electric Co Ltd Frame memory control method for bit map display device
JPH0683969A (en) * 1990-11-15 1994-03-25 Internatl Business Mach Corp <Ibm> Graphics processor and method of graphics and data processing
US5499328A (en) * 1991-02-22 1996-03-12 Network Computing Devices, Inc. Line draw method for generating, storing and displaying lines in a display system
US5335295A (en) * 1991-05-08 1994-08-02 International Business Machines Corporation System and method for scaling a digital image
EP0528524A2 (en) * 1991-08-16 1993-02-24 International Business Machines Corporation Method and apparatus for scaling line patterns
JPH05113928A (en) * 1991-10-23 1993-05-07 Fuji Electric Co Ltd Image memory device

Also Published As

Publication number Publication date
US5721885A (en) 1998-02-24
JP3313527B2 (en) 2002-08-12

Similar Documents

Publication Publication Date Title
US5507026A (en) Address-translatable graphic processor, data processor and drawing method with employment of the same
US5559952A (en) Display controller incorporating cache memory dedicated for VRAM
US7262776B1 (en) Incremental updating of animated displays using copy-on-write semantics
JP3038781B2 (en) Memory access control circuit
US5500654A (en) VGA hardware window control system
US4491836A (en) Graphics display system and method including two-dimensional cache
US4496944A (en) Graphics display system and method including associative addressing
KR100221028B1 (en) Graphic accelerator and memory-prefetching method of it
EP0278526B1 (en) Graphics diplay controller having clipping function
US4492956A (en) Graphics display system and method including preclipping circuit
KR19980025110A (en) Data processor and graphics processor
US5454076A (en) Method and apparatus for simultaneously minimizing storage and maximizing total memory bandwidth for a repeating pattern
JP3313527B2 (en) Graphics controller and pixel data transfer system
US6639603B1 (en) Hardware portrait mode support
JPH07234773A (en) Display controller
JP3017882B2 (en) Display control system
JP3683657B2 (en) Graphics display device and graphics processor
JPH08180012A (en) Computer system
JPH06274410A (en) Display control system
JPH07234821A (en) Paging device and display controller
JP3454113B2 (en) Graphics display
JP2576015B2 (en) Display control device
JPH0659652A (en) Display control device
JPH06231233A (en) Image processing system
JPH07199907A (en) Display controller

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees