JP3153294B2 - Address counter - Google Patents
Address counterInfo
- Publication number
- JP3153294B2 JP3153294B2 JP30276791A JP30276791A JP3153294B2 JP 3153294 B2 JP3153294 B2 JP 3153294B2 JP 30276791 A JP30276791 A JP 30276791A JP 30276791 A JP30276791 A JP 30276791A JP 3153294 B2 JP3153294 B2 JP 3153294B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- counter
- output
- data
- mode
- 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.)
- Expired - Fee Related
Links
Landscapes
- Image Input (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、バッファメモリ等のア
ドレスを制御するためのアドレスカウンタに関するもの
である。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an address counter for controlling an address of a buffer memory or the like.
【0002】[0002]
【従来の技術】コンピュータシステムあるいはその周辺
機器相互間を接続する通信路において、従来機器間のデ
ータ転送速度差,通信線路毎の伝送形態の相違によるデ
ータ転送速度差を吸収するために、一般的にインタフェ
ース回路においてバッファメモリが使用される。このバ
ッファメモリは、情報を透過的に伝送すれば良く、一般
的にはシリアルリードライト機能があれば良い。すなわ
ち、入力データはそのままの形態,データ順で一次保持
し、再び同じ形態で読出す。データ加工が必要である場
合、バッファメモリの送出先に接続される機器において
その加工を行う。2. Description of the Related Art In a communication path connecting computer systems or peripheral devices thereof, in order to absorb a data transfer speed difference between conventional devices and a data transfer speed difference due to a difference in transmission mode for each communication line, a general method is used. The buffer memory is used in the interface circuit. The buffer memory only needs to transmit information transparently, and generally has only to have a serial read / write function. That is, the input data is temporarily held in the same form and data order, and read again in the same form. If data processing is necessary, the processing is performed in a device connected to the transmission destination of the buffer memory.
【0003】[0003]
【発明が解決しようとする課題】従来の機器において、
データ構造を変換しようとする時、インタフェース回路
の入力データバッファの後にそのためのハードウエアを
付加する必要があった。例えばラスタデータの2次画像
を空間的にブロック分割して直交変換を行う場合、ラス
タデータをブロックデータに変換するためのラインメモ
リ,アドレス変換機構が必要となる。SUMMARY OF THE INVENTION In a conventional device,
When trying to convert the data structure, it was necessary to add hardware for this after the input data buffer of the interface circuit. For example, when orthogonally transforming a secondary image of raster data by spatially dividing the image into blocks, a line memory and an address conversion mechanism for converting the raster data into block data are required.
【0004】図10は2次画像を空間的にブロック分割
して直交変換する処理を示す模式図である。なお、各ブ
ロックは主走査方向にY画素,副走査方向にX画素から
なる。画像データ全体は主走査方向Nブロック,副走査
方向Mブロックからなる。FIG. 10 is a schematic diagram showing a process of spatially dividing a secondary image into blocks and performing orthogonal transformation. Each block is composed of Y pixels in the main scanning direction and X pixels in the sub scanning direction. The entire image data is composed of N blocks in the main scanning direction and M blocks in the sub-scanning direction.
【0005】図において、(a)は通常のラスタデータ
のスキャン方向を示し、鎖線の矢印がスキャン方向を示
す。副走査方向は図中の上から下への向きとなる。
(b),,(c)はブロック化時のスキャン順を示す。
(b),(c)に示すいずれのスキャン順になるかはブ
ロック化後のデータ処理に依存する。(b),(c)に
示す何れの場合においても、Xライン分を一度メモリし
た後、ブロック化を行う。従って、このためのラインメ
モリ,アドレッシング機構がインタフェース回路のバッ
ファ機構のほかに必要となり、回路が複雑化してコスト
アップとなる等の問題点があった。[0005] In the figure, (a) shows the scan direction of normal raster data, and the dashed arrow shows the scan direction. The sub-scanning direction is from top to bottom in the figure.
(B), (c) show the scanning order at the time of blocking.
Which of the scan orders shown in (b) and (c) will depend on the data processing after blocking. In any of the cases shown in (b) and (c), the memory is once stored for X lines and then divided into blocks. Therefore, a line memory and an addressing mechanism for this purpose are required in addition to the buffer mechanism of the interface circuit, and there has been a problem that the circuit becomes complicated and the cost increases.
【0006】本発明は、上記の問題点を解決するために
なされたもので、本発明の目的は、各カウンタから出力
されるカウント出力を演算処理して1次元アドレスに変
換することにより、記憶手段に対するデータ格納処理か
らデータ構造変換処理までを同一のハードウエアで容易
に共有処理できるアドレスカウンタを提供することであ
る。また、モード信号切換え後にアドレス変換出力され
るアドレスと保持されるアドレスとを加算したアドレス
をアドレスバスに出力することにより、モード切り換え
に伴うデータ改変等を未然に防止でき、常に正しいアク
セスアドレスを出力することができるアドレスカウンタ
を提供することである。SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to calculate the count output output from each counter and convert the count output into a one-dimensional address to store the count output. An object of the present invention is to provide an address counter which can easily perform common processing from data storage processing to data structure conversion processing for the means with the same hardware. In addition, by outputting the address obtained by adding the address converted and output after the mode signal switching and the retained address to the address bus, data modification and the like accompanying the mode switching can be prevented beforehand, and the correct access address is always output. Is to provide an address counter that can do this.
【0007】[0007]
【課題を解決するための手段】本発明に係る第1の発明
は、記憶手段に設定された複数のアドレスをそれぞれカ
ウントする複数のカウンタがカスケード接続されたカウ
ンタ手段と、前記複数のカウンタの接続順序を外部入力
されるモード信号に基づいて変更する変更手段と、前記
カウンタ手段の各カウンタの出力の組み合わせを1次元
アドレスに変換するアドレス変換手段とを有するもので
ある。According to a first aspect of the present invention, there is provided a counter means in which a plurality of counters respectively counting a plurality of addresses set in a storage means are cascaded, and a connection between the plurality of counters. It has a changing means for changing the order based on a mode signal inputted from the outside, and an address converting means for converting a combination of outputs of the respective counters of the counter means into a one-dimensional address.
【0008】本発明に係る第2の発明は、モード信号切
換え直前に前記アドレス変換手段から出力されるアドレ
スを保持する保持手段と、モード信号切換え後に前記ア
ドレス変換手段から出力されるアドレスと前記保持手段
に保持されるアドレスとを加算したアドレスをアドレス
バスに出力する加算手段とを有するものである。According to a second aspect of the present invention, there is provided a holding means for holding an address output from the address conversion means immediately before switching of a mode signal, an address output from the address conversion means after the mode signal is switched, and the holding. Means for outputting an address obtained by adding the address held by the means to the address bus.
【0009】[0009]
【0010】[0010]
【0011】[0011]
【0012】[0012]
【0013】[0013]
【実施例】図1は本発明の一実施例を示すアドレスカウ
ンタの構成を説明するブロック図である。FIG. 1 is a block diagram for explaining a configuration of an address counter according to an embodiment of the present invention.
【0014】図において、301はデータラッチ/セレ
クタで、データバス306から入力し、次に述べるカウ
ンタ群の進数のラッチおよびデータの直接ロード時のバ
スセレクトを行う。307はライト信号である。302
a〜302dは後述する図2に示すカウンタ101a〜
101dに対応するM,X,N,Y進のカウンタであ
る。303はカウンタ(カウンタモジュール)302a
〜302dの出力をスカラー化する変換回路(エンコー
ダ)であり、この出力323がバッファ(図示しない)
のアドレスバスとなる。304はアドレスデコーダで、
チップセレクト309,アドレスバス308をデコード
し、各カウンタ群,データラッチへのアクセス時にセレ
クト信号線群310a〜310d,313a〜313d
のうちの対応するものをアサートする。305はトグル
フリップフロップで、モードチェンジ信号(MODE
CHG)315のパルスに対応してトグル動作し、カウ
ンタモード信号(CNT MODE)316を出力す
る。本カウンタ機構は、カウンタモード信号(CNT
MODE)316に応じてラスタスキャンモードとブロ
ックスキャンモードを切り換える。In FIG. 1, reference numeral 301 denotes a data latch / selector, which is input from a data bus 306, and performs a latch of a base number of a counter group described below and a bus select at the time of directly loading data. 307 is a write signal. 302
a to 302d are counters 101a to 101d shown in FIG.
This is a counter in M, X, N, and Y corresponding to 101d. 303 is a counter (counter module) 302a
A conversion circuit (encoder) for scalarizing the output of 〜302d, and this output 323 is a buffer (not shown)
Address bus. 304 is an address decoder,
The chip select 309 and the address bus 308 are decoded, and the select signal line groups 310a to 310d and 313a to 313d are used when accessing each counter group and data latch.
Assert the corresponding one of A toggle flip-flop 305 is a mode change signal (MODE)
CHG) 315 in response to the pulse, and outputs a counter mode signal (CNT MODE) 316. This counter mechanism operates a counter mode signal (CNT).
MODE) 316, the mode is switched between the raster scan mode and the block scan mode.
【0015】311はバッファエンドにカウンタが達し
た時、クリア動作を行うためのバッファエンド信号(B
UF END)である。312a〜312dは各カウン
タ302a〜302dへの入力データバスである。31
4はカウントを行うクロック信号、315はモードチェ
ンジ信号で、1パルス毎にラスタスキャンモードとブロ
ックスキャンモードとを切り換える。317〜320は
各カウンタへのキャリ出力であり、これがアクティブで
ある時、カウントおよび自分のキャリ出力を行う。ま
た、319はブロックエンド信号(BLK END)と
して出力しているが、これはアドレスがXライン毎の終
点となっていることを示すものである。ブロック化を行
う場合、ラスタデータはXライン単位でバッファしなけ
ればならないためこの検出を行う。各カウンタ302a
〜302dは2本のキャリ入力,カウンタイネーブル入
力を有し、カウントモードに応じて図2の(a),
(b)に示すようにカウンタ接続状態を切り換える。Reference numeral 311 denotes a buffer end signal (B) for performing a clear operation when the counter reaches the buffer end.
UF END). 312a to 312d are input data buses to the respective counters 302a to 302d. 31
4 is a clock signal for counting, and 315 is a mode change signal, which switches between a raster scan mode and a block scan mode for each pulse. Reference numerals 317 to 320 denote carry outputs to the respective counters. When they are active, they carry out counting and carry outputs of their own. 319 is output as a block end signal (BLK END), which indicates that the address is the end point for each X line. When performing blocking, this detection is performed because raster data must be buffered in units of X lines. Each counter 302a
To 302d have two carry inputs and a counter enable input, and correspond to the count mode in FIG.
The connection state of the counter is switched as shown in FIG.
【0016】321a〜321dは各カウンタの出力、
322b〜322dはカウンタ302b〜302dの進
数情報である。変換回路(エンコーダ)303はこの値
に対して各カウンタ出力のバッファアドレス空間へのマ
ッピングを行う。321a to 321d are the outputs of the respective counters,
Reference numerals 322b to 322d indicate base number information of the counters 302b to 302d. The conversion circuit (encoder) 303 maps this value to the buffer address space of each counter output.
【0017】このように構成されたアドレスカウンタに
おいて、入力されるクロックに応じて各カウンタ(30
2a〜302d)に設定される所望進数のアドレスカウ
ントを開始すると、アドレス変換手段(変換回路(エン
コーダ))303がカウンタ手段の各カウンタの出力を
外部入力されるモード信号に基づいて所望の1次元アド
レスに変換し、アクセスアドレスをアドレスバスに出力
する。In the address counter configured as described above, each counter (30) is controlled in accordance with an input clock.
2a to 302d), the address conversion means (conversion circuit (encoder)) 303 starts the address counting of the desired radix, and outputs the output of each counter of the counter means to a desired one-dimensional signal based on a mode signal externally input. The address is converted to an address and the access address is output to the address bus.
【0018】また、各カウンタの進数は、独立して設定
可能に構成し、種々のデータ加工に対応するアクセスア
ドレスを発生する。The base of each counter is configured to be independently settable, and generates access addresses corresponding to various data processing.
【0019】さらに、モード信号切換え時直前に各カウ
ンタから出力されるアドレスが保持手段(後述するアド
レスレジスタ703)に保持され、加算手段(後述する
加算器705)がモード信号切換え時直後に各カウンタ
から出力されるアドレスと保持手段に保持されるアドレ
スとを加算してアクセスアドレスをアドレスバスに出力
させ、正しいアクセスアドレスを発生する。Further, the address output from each counter immediately before the mode signal switching is held in the holding means (address register 703 described later), and the adding means (adder 705 described later) is operated by each counter immediately after the mode signal switching. And the address held in the holding means is added to output the access address to the address bus, thereby generating a correct access address.
【0020】図2は、図1に示したカウンタ302a〜
302dによるアドレス変換処理を示す状態推移図であ
る。なお、画像全体は、主走査方向(横)N,副走査方
向(縦)Mの各ブロックからなり、各ブロックは横Y画
素,縦X画素からなる。各画素がバッファメモリの1ロ
ケーション(1ワード)に対応するものとすると、全体
はM×N×X×Yワードのバッファ容量が必要となる。
この各画素をアドレス空間に展開することは(M,X,
N,Y)の4次元ベクトルをスカラー値に展開するもの
と考えることができる。これはM進,X進,N進,Y進
の4個所のカウンタを縦列接続し、以下の構成により各
カウンタ出力をエンコードして連続したメモリアドレス
にマッピングすることにより実現する。FIG. 2 shows the counters 302a to 302a shown in FIG.
It is a state transition diagram which shows the address translation processing by 302d. The entire image is composed of blocks in the main scanning direction (horizontal) N and sub-scanning direction (vertical) M, and each block is composed of horizontal Y pixels and vertical X pixels. Assuming that each pixel corresponds to one location (one word) in the buffer memory, a buffer capacity of M × N × X × Y words is required as a whole.
Expanding each pixel into the address space is (M, X,
It can be considered that a four-dimensional vector (N, Y) is expanded into a scalar value. This is realized by cascade-connecting four counters of M, X, N, and Y bases, encoding each counter output by the following configuration, and mapping it to a continuous memory address.
【0021】図において、101a〜101dは各々
M,X,N,Y進のカウンタで、クロック102により
動作する。各カウンタ101a〜101dは上段のカウ
ンタに対しキャリを発生し、上段カウンタは下段からの
キャリがイネーブルときのみカウント動作を可能とし、
かつ自分のキャリを発生する。(L1)は図10に示し
た(a)に示すスキャン(ラスタスキャン)に対応した
カウンタ接続である。すなわち、Y画素1カウント毎に
ブロック数をカウントし、Nブロックカウント毎にライ
ン数(X)をカウントする。そして、Xラインカウント
毎に縦方向ブロック(M)をカウントする。図2に示す
(L2)は図10に示した(b)に、図2に示す(L
3)は図10に示した(c)のスキャンに対応したカウ
ンタ接続である。(L2)は横方向にY画素カウント毎
にライン方向(X)をインクリメントし、縦方向ブロッ
ク境界(ブロック00とブロック01の境界)に達した
時点で、横方向ブロック数(N)をインクリメントし、
横方向隣接ブロックに移る。ブロック00,01,0
2,…,0(n−1)のスキャンを終了した時点で縦方
向ブロック数をインクリメントし、ブロック01に移
る。In the drawing, reference numerals 101a to 101d denote M, X, N, and Y-based counters, respectively, which operate in response to a clock 102. Each of the counters 101a to 101d generates a carry for the upper counter, and the upper counter enables the count operation only when the carry from the lower stage is enabled.
And generate your own carry. (L1) is a counter connection corresponding to the scan (raster scan) shown in (a) shown in FIG. That is, the number of blocks is counted for each Y pixel count, and the number of lines (X) is counted for each N block count. Then, the vertical blocks (M) are counted every X line count. (L2) shown in FIG. 2 corresponds to (B) shown in FIG. 10 and (L2) shown in FIG.
3) is a counter connection corresponding to the scan of (c) shown in FIG. (L2) increments the line direction (X) in the horizontal direction for every Y pixel count, and increments the number of horizontal blocks (N) when reaching the vertical block boundary (the boundary between block 00 and block 01). ,
Move to the adjacent block in the horizontal direction. Blocks 00,01,0
When the scanning of 2,..., 0 (n-1) is completed, the number of blocks in the vertical direction is incremented, and the process proceeds to block 01.
【0022】ラインL3はラインL2と各ブロック内の
スキャン方向を逆にした場合であり、カウンタ101b
(X)とカウンタ101d(Y)の接続を逆にした場合
である。このように、バッファのアドレスマップ上でラ
スタ−からブロックスキャン変換を行うことは、4か所
のカウンタのキャリ接続パターンを変更することにより
実現できる。この各カウンタ出力のメモリアドレス上へ
のマッピングは各カウンタ出力を変換してスカラー化し
て行えばよい。The line L3 is a case where the scanning direction in each block is reversed with respect to the line L2, and the counter 101b
This is the case where the connection between (X) and the counter 101d (Y) is reversed. As described above, the raster-to-block scan conversion on the buffer address map can be realized by changing the carry connection pattern of the four counters. The mapping of each counter output onto the memory address may be performed by converting each counter output and converting it into a scalar.
【0023】図3は、図1に示したカウンタ302a〜
302dの構成を説明する詳細ブロック図である。FIG. 3 shows the counters 302a to 302a shown in FIG.
It is a detailed block diagram explaining the structure of 302d.
【0024】図において、401はカウンタ本体で、ク
ロック信号314に応じてカウントを行う。このカウン
タは同期ロード端子SYNC LD,非同期ロード端子
ASYNC LDを備え、同期ロード端子SYNC L
Dはゲート402が接続されており、キャリーが発生し
た時あるいはデータバッファエンドに達した時(バッフ
ァエンド信号(BUF END)311がアサート)あ
るいはデータセット時(セレクト信号線群313a〜3
13dがアサート)にアサートされる。同期ロード端子
SYNC LDは、アサート時にクロック信号314の
入力がある場合には、データバス312a〜312dか
らデータをロードする。In the figure, reference numeral 401 denotes a counter main body, which performs counting in accordance with a clock signal 314. This counter has a synchronous load terminal SYNC LD, an asynchronous load terminal ASYNC LD, and a synchronous load terminal SYNC L.
D is connected to the gate 402, and when a carry occurs, when the data buffer end is reached (buffer end signal (BUF END) 311 is asserted), or when data is set (select signal line groups 313a to 313a).
13d is asserted). The synchronous load terminal SYNC LD loads data from the data buses 312a to 312d when the clock signal 314 is input at the time of assertion.
【0025】一方、非同期ロード端子ASYNC LD
は、ゲート403が接続されており、クロック信号31
4とは無関係にデータを入力データバス312a〜31
2dよりロードする。ゲート403は、カウンタモード
信号(CNT MODE)316がLレベル、すなわち
ラスタスキャンモード時、モードチェンジ信号(MOD
E CHG)315を加えてブロックスキャンモードに
変化する時に、パルスを非同期ロード端子ASYNC
LDに加え、強制的にカウンタにデータラッチ/セレク
タ301の中のラッチの中の値をロードさせてカウンタ
全体をクリアする動作を行う。ゲート404〜406は
2種のキャリ入力の選択を行うもので、カウンタモード
信号(CNT MODE)316に応じていずれかの選
択を行う。この出力は、カウンタ本体401のカウント
イネーブル端子に入力し、これがアサートされた時のみ
キャリー出力を行う。On the other hand, the asynchronous load terminal ASYNC LD
Is connected to the gate 403 and the clock signal 31
4 regardless of the input data buses 312a-31.
Load from 2d. The gate 403 outputs the mode change signal (MOD) when the counter mode signal (CNT MODE) 316 is at L level, that is, in the raster scan mode.
E CHG) 315 is applied to change to the block scan mode, a pulse is output to the asynchronous load terminal ASYNC.
In addition to the LD, the counter is forcibly loaded with the value in the latch in the data latch / selector 301 to clear the entire counter. The gates 404 to 406 select two types of carry inputs, and select one of them according to a counter mode signal (CNT MODE) 316. This output is input to the count enable terminal of the counter body 401, and carries out only when this is asserted.
【0026】図4は、図1に示したデータラッチ/セレ
クタ301の構成を示す詳細ブロック図である。FIG. 4 is a detailed block diagram showing the configuration of data latch / selector 301 shown in FIG.
【0027】図において、501a〜501dはデータ
ラッチで、データバス306から各カウンタ302a〜
302dの進数データをラッチする。この動作は、アド
レスデコーダ304から出力するセレクト信号310a
〜310dで、ライト信号線307をゲートして行う。
502a〜502dはカウンタ302a〜302dと対
応したデータバスセレクタで、データバス306の値を
直接カウンタ302a〜302dにロードする時、アド
レスデコーダ304の対応するセレクト信号線群313
a〜313dに応じてデータバス312a〜312dを
データバス306に接続する。それ以外の場合は、入力
データバス312a〜312dはデータラッチ501a
〜501d側に接続される。322b〜322dはデー
タラッチ501b〜501dの出力で、カウンタ302
b〜302dの進数データを後述する変換回路303に
接続する。In the figure, reference numerals 501a to 501d denote data latches.
Latch 302d base data. This operation is performed by selecting the select signal 310a output from the address decoder 304.
In steps 310 to 310, the write signal line 307 is gated.
Reference numerals 502a to 502d denote data bus selectors corresponding to the counters 302a to 302d. When the value of the data bus 306 is directly loaded to the counters 302a to 302d, the corresponding select signal line group 313 of the address decoder 304 is used.
The data buses 312a to 312d are connected to the data bus 306 according to a to 313d. Otherwise, input data buses 312a-312d are connected to data latches 501a.
To the 501d side. Reference numerals 322b to 322d denote outputs of the data latches 501b to 501d.
The base numbers b to 302d are connected to a conversion circuit 303 described later.
【0028】図5は、図1に示した変換回路303の構
成を説明する詳細ブロック図である。なお、変換回路3
03はカウンタ302a〜302dの値をスカラー化し
アドレスマッピングするものであるが、これには種々の
方法がある。この図に示したものは、カウンタ302a
〜302dの出力をm,x,n,yとした時、mXNY
+xNY+nY+yを計算するものである。これによ
り、図10の(a)に示したラスタデータは、アドレス
上連続してロードされる。FIG. 5 is a detailed block diagram illustrating the configuration of conversion circuit 303 shown in FIG. The conversion circuit 3
Reference numeral 03 denotes scalarizing the values of the counters 302a to 302d for address mapping, and there are various methods. The counter shown in FIG.
When the output of to 302d is m, x, n, y, mXNY
+ XNY + nY + y. As a result, the raster data shown in FIG. 10A is continuously loaded on the address.
【0029】図において、601は乗算器で、XNY値
608,NY値609,Y値610をを出力する。60
2〜604は乗算器、605〜607は加算器で、上述
の値の加算を行う。ただし、以上説明した構成ではラス
タスキャンモードとブロックスキャンモードを切り換え
る場合、ラスタデータのブロックエンド、すなわち図1
0に示すブロック0(n−1)において行わないと、切
り換え時に中途からブロックスキャンあるいはラスタス
キャンを開始してしまう。例えば汎用データバッファの
アドレッシングを考えた場合、画像データのほかにデー
タ,コードが入る場合が一般的であり、ある任意のアド
レスから画像データをブロックスキャンして読み出した
い場合もある。このような場合、ラスタスキャンモード
とブロックスキャンモードとを切り換えた時、カウンタ
をブロックエンドと見なすように操作する必要がある。
このため、本実施例では図6に示すような回路によりバ
ッファエンドを検出している。In the figure, a multiplier 601 outputs an XNY value 608, an NY value 609, and a Y value 610. 60
2 to 604 are multipliers, and 605 to 607 are adders, which add the above values. However, in the configuration described above, when switching between the raster scan mode and the block scan mode, the block end of the raster data, that is, FIG.
If it is not performed in the block 0 (n-1) shown in FIG. 0, the block scan or the raster scan will be started halfway when switching. For example, in consideration of addressing of a general-purpose data buffer, data and a code are generally input in addition to image data, and there is a case where image data is block-scanned and read from an arbitrary address. In such a case, when switching between the raster scan mode and the block scan mode, it is necessary to operate the counter so as to regard it as a block end.
For this reason, in this embodiment, the buffer end is detected by a circuit as shown in FIG.
【0030】図6は本発明の実施例に適用するバッファ
エンド検出機構の一例を示す回路ブロック図であり、図
1と同一のものには同じ符号を付してある。FIG. 6 is a circuit block diagram showing an example of a buffer end detecting mechanism applied to the embodiment of the present invention. The same components as those in FIG. 1 are denoted by the same reference numerals.
【0031】図において、701はカウンタ本体(カウ
ンタ)で、図1に示したカウンタと同様の構成である。
702はバッファエンド検出器で、アドレスバス706
を監視しバッファエンドを検出する。703はアドレス
値をホールドするアドレスレジスタ、704はゲート、
705は加算器である。In the figure, reference numeral 701 denotes a counter body (counter) having the same configuration as the counter shown in FIG.
Reference numeral 702 denotes a buffer end detector.
To detect the buffer end. 703 is an address register for holding an address value, 704 is a gate,
705 is an adder.
【0032】先ず、カウンタ701は、ラスタモードか
らスタートするものとする。また、アドレスレジスタ7
03はクリアされており、アドレスバス出力707は
「0」であるとする。この状態ではアドレスバス706
はカウンタ701の出力323と一致している。ラスタ
スキャンモード時、カウンタモード信号(CNT MO
DE)316を「L」とする。この時、アドレスレジス
タ703の入力ゲートはアクティブである。モードチェ
ンジ信号(MODE CHG)315が入力すると、ア
ドレスレジスタ703はアドレス値をホールドするとと
もに、カウンタモード信号(CNT MODE)316
を「H」とし、アドレスレジスタ703の入力はインア
クティブとなる。また、これにより、カウンタ302a
〜302dの内部のカウンタ本体401の非同期ロード
が動作し、初期値がロードされカウンタ出力323は
「0」、すなわちブロックエンドとなる。707はアド
レスレジスタ703にホールドされた、ブロックスキャ
ンモードに変化する直前のアドレスバス出力で、これと
カウンタ701の出力322との加算値がブロックモー
ド時のアドレスバス706となる。この状態でカウンタ
701はブロックスキャンモードでカウントする。ブロ
ックスキャンモードからラスタスキャンモードへの変更
時は、モードチェンジ信号(MODE CHG)315
にパルスを加えて行う。この時、カウンタモード信号
(CNT MODE)316は「H」から「L」レベル
状態に変化する。しかし、モードチェンジ信号(MOD
ECHG)315にパルスを加えた時点では、アドレス
レジスタ703はインアクティブであるため、前の値を
ホールドしたままである。また、カウンタ302a〜3
02dの出力はこの時のモードチェンジ信号(MODE
CHG)315では変化しない。よって、アドレス値
は、モードチェンジ信号(MODE CHG)315を
加えた時点から、そのままラスタスキャンを開始する。
しかし、一般的にブロックスキャンモードはデータのブ
ロック化を行うことが目的であるから、ブロックエンド
信号(BLK END)319を監視し、ブロックエン
ドの点において、ブロックスキャンモードからラスタス
キャンモードへの変更を行うべきである。First, it is assumed that the counter 701 starts from the raster mode. The address register 7
03 is cleared and the address bus output 707 is “0”. In this state, the address bus 706
Is equal to the output 323 of the counter 701. In the raster scan mode, the counter mode signal (CNT MO)
DE) 316 is set to “L”. At this time, the input gate of the address register 703 is active. When the mode change signal (MODE CHG) 315 is input, the address register 703 holds the address value and the counter mode signal (CNT MODE) 316
Is set to “H”, and the input of the address register 703 becomes inactive. This also allows the counter 302a
Asynchronous loading of the counter body 401 inside to 302d operates, the initial value is loaded, and the counter output 323 becomes "0", that is, the block end. Reference numeral 707 denotes an address bus output held immediately before the change to the block scan mode, which is held in the address register 703. The sum of the output and the output 322 of the counter 701 becomes the address bus 706 in the block mode. In this state, the counter 701 counts in the block scan mode. When changing from the block scan mode to the raster scan mode, the mode change signal (MODE CHG) 315
Is performed by applying a pulse. At this time, the counter mode signal (CNT MODE) 316 changes from “H” to “L” level. However, the mode change signal (MOD
When a pulse is applied to the (ECHG) 315, the address register 703 is inactive, and thus retains the previous value. Also, the counters 302a to 302a-3
02d output is the mode change signal (MODE
CHG) 315 does not change. Therefore, the raster scan is started as it is from the time when the mode change signal (MODE CHG) 315 is added.
However, since the purpose of the block scan mode is generally to block data, the block end signal (BLK END) 319 is monitored, and the block scan mode is changed from the block scan mode to the raster scan mode at the block end point. Should be done.
【0033】ゲート704は、アドレスレジスタ703
をクロック信号314に同期してクリアするものであ
る。バッファエンド検出器702はアドレスバス706
がバッファエンドに達したことを検出するもので、この
バッファエンド信号(BUFEND)311がアサート
された時にゲート704はアクティブとなり、その直後
のクロックパルスでアドレスレジスタ703はクリアさ
れる。また、バッファエンド信号(BUF END)3
11は、図3に示したカウンタ本体401の同期ロード
端子SYNC LDをアサートし、同じクロックパルス
が初期値をカウンタ本体401にロードさせ、カウンタ
全体をスタート時点に戻す。The gate 704 is connected to the address register 703
Is cleared in synchronization with the clock signal 314. The buffer end detector 702 is connected to the address bus 706
Detects that the buffer end has been reached. When the buffer end signal (BUFEND) 311 is asserted, the gate 704 becomes active, and the address register 703 is cleared by the clock pulse immediately after that. Also, a buffer end signal (BUF END) 3
Numeral 11 asserts the synchronous load terminal SYNC LD of the counter body 401 shown in FIG. 3, the same clock pulse loads the initial value to the counter body 401, and returns the entire counter to the starting point.
【0034】なお、上記実施例で示したカウンタ302
a〜302dの進数、すなわちブロック数,ブロックサ
イズについては任意である。ところが、一般的な用途に
おいて、ブロックサイズX,Yは固定である。よって、
カウンタ302b,302dの入力データバス312
b,312dはデータバス306からの入力時以外固定
値となるように構成しても良い。この場合、図4に示し
たデータラッチ501b,501dおよびセレクト信号
線群310b,310dさらには出力322b,322
dは不要となる。The counter 302 shown in the above embodiment
The base numbers a to 302d, that is, the number of blocks and the block size are arbitrary. However, in general use, the block sizes X and Y are fixed. Therefore,
Input data bus 312 for counters 302b and 302d
b and 312d may be configured to have fixed values except when input from the data bus 306. In this case, the data latches 501b and 501d and the select signal line groups 310b and 310d and the outputs 322b and 322 shown in FIG.
d becomes unnecessary.
【0035】なお、上記実施例ではカウンタ302aの
進数Mを、画像全体の縦方向ブロック数として説明して
きたが、画像全体がバッファに納まりきらない場合、M
の値はバッファ内に収まる値にしてもよい。この場合、
画像全体をバッファに収まる単位に分割して扱うことに
なる。この分割はブロックエンド、すなわちNXY画素
単位で行わなければならない。In the above embodiment, the base M of the counter 302a has been described as the number of vertical blocks of the entire image. However, if the entire image cannot be stored in the buffer, M is used.
May be a value that fits in the buffer. in this case,
The whole image is divided and handled in units that fit in the buffer. This division must be performed at the block end, that is, in units of NXY pixels.
【0036】また、上記実施例では変換回路303とし
て乗算器を使用する場合について説明したが、このため
ハードウエア演算時間は、カウンタを高速で動作させよ
うとする場合に問題となる。もし、M=2a ,N=2
c ,X=2b ,Y=2d ならばカウンタ302a〜30
2dの各出力ビット幅は各々a,b,c,dであり、バ
ッファアドレスバス323はそのままa+b+c+dビ
ット幅のバスとなる。一般的には、X=Y=4,8,1
6,…=2s であり、Mはバッファの大きさに合せて2
t とし、Nは最大2u −1とすると、変換回路303は
図7に示すように構成することができる。In the above embodiment, the case where a multiplier is used as the conversion circuit 303 has been described. However, the hardware operation time becomes a problem when the counter is operated at high speed. If M = 2 a , N = 2
If c , X = 2 b , Y = 2 d , the counters 302 a to 30 a
The output bit widths of 2d are a, b, c, and d, respectively, and the buffer address bus 323 becomes a bus of a + b + c + d bit width as it is. In general, X = Y = 4,8,1
6,... = 2 s , and M is 2 according to the size of the buffer.
Assuming that t and N are 2 u -1 at the maximum, the conversion circuit 303 can be configured as shown in FIG.
【0037】図7は、図1に示した変換回路303の他
の構成を説明する詳細ブロック図である。なお、アドレ
ス値は先に示したように、mXNY+xNY+nY+y
により計算するが、実際に乗算を行っているのは、x×
N,m×Nの2つである。FIG. 7 is a detailed block diagram for explaining another configuration of the conversion circuit 303 shown in FIG. Note that the address value is mXNY + xNY + nY + y as described above.
The actual multiplication is performed by xx
N, m × N.
【0038】この図において、801,802は乗算
器、803はsビットシフタ、804,805は加算器
であり、加算器805の出力たる加算結果806は単に
入力データバス312dのsビットと合さり、バッファ
アドレスバス323は(2s+t+uビット)となる。
この計算のビットを示したものを図8に示す。In this figure, 801 and 802 are multipliers, 803 is an s-bit shifter, and 804 and 805 are adders. The buffer address bus 323 is (2s + t + u bits).
FIG. 8 shows the bits of this calculation.
【0039】図8は、図7に示した変換回路の演算値の
アサインを示す模式図である。FIG. 8 is a schematic diagram showing the assignment of the operation value of the conversion circuit shown in FIG.
【0040】図において、901はsビットのカウンタ
出力(y)、902は最大でuビットのカウンタ出力
(n)、903は最大で(s+u)ビットとなる乗算出
力(xN)、904は最大で(t+u)ビットとなる乗
算出力(mN)である。ビットシフタ803はsビット
のシフトを行う。加算器804,805はカウンタ出力
902と乗算出力903および乗算出力904のsビッ
トシフトした値とを加算し、加算結果806をsビット
のカウンタ出力901と合せた変換アドレス905をバ
ッファアドレスバス323に出力する。In the figure, 901 is an s-bit counter output (y), 902 is a u-bit counter output (n) at a maximum, 903 is a multiplication output (xN) with a maximum of (s + u) bits, and 904 is a maximum. This is a multiplication output (mN) of (t + u) bits. The bit shifter 803 shifts s bits. The adders 804 and 805 add the counter output 902 to the multiplication output 903 and the value obtained by shifting the multiplication output 904 by s bits, and add the conversion address 905 obtained by adding the addition result 806 to the s-bit counter output 901 to the buffer address bus 323. Output.
【0041】なお、上記実施例では乗算出力(xN),
乗算出力(mN)を共に乗算により求める場合について
説明したが、これはNを最大Uビット=2U とする時、
乗算出力(xN)は、図9に示すようにカウンタ出力3
21b(x)のuビットシフトにより、また、乗算出力
(mN)はカウンタ出力321c(m)のuビットシフ
トにより求める構成であっても良い。In the above embodiment, the multiplication output (xN),
The case where the multiplication output (mN) is obtained by multiplication has been described. This is because when N is a maximum U bit = 2 U ,
The multiplication output (xN) is, as shown in FIG.
The multiplication output (mN) may be obtained by the u-bit shift of the counter output 321c (m) and the u-bit shift of the output 21b (x).
【0042】この場合、変換回路303は、単にカウン
タ出力1001〜1004の各値のビットシフト加算を
行えば良く、また、各ビットは重ならないため、単純に
カウンタ302a〜302dの出力線を並べて最終出力
とすれば良い。ただし、Nが任意数である場合、メモリ
空間(22s+t+u)の中は不連続に使用される部分が発生
する。In this case, the conversion circuit 303 simply performs bit shift addition of each value of the counter outputs 1001 to 1004, and since the bits do not overlap, the output lines of the counters 302a to 302d are simply arranged and the final Output can be used. However, when N is an arbitrary number, a portion used discontinuously occurs in the memory space (2 2s + t + u ).
【0043】[0043]
【発明の効果】以上説明したように、本発明は記憶手段
に設定された複数のアドレスをそれぞれカウントする複
数のカウンタがカスケード接続されたカウンタ手段と、
複数のカウンタの接続順序を外部入力されるモード信号
に基づいて変更する変更手段と、カウンタ手段の各カウ
ンタの出力を1次元アドレスに変換するアドレス変換手
段とを有するので、データ転送路上に配設されるバッフ
ァメモリおよびこのバッファメモリ用のアドレッシング
回路とデータスキャン変換用メモリおよびこのデータス
キャン変換用メモリ用のアドレッシング回路とを共有化
することができ、従来のアドレス機構を大幅に簡素化で
きる。As described above, according to the present invention, there is provided a counter means in which a plurality of counters respectively counting a plurality of addresses set in a storage means are cascaded,
Since there are changing means for changing the connection order of the plurality of counters based on a mode signal input externally, and address conversion means for converting the output of each counter of the counter means into a one-dimensional address, they are arranged on the data transfer path. The buffer memory and the addressing circuit for the buffer memory and the data scan conversion memory and the addressing circuit for the data scan conversion memory can be shared, and the conventional address mechanism can be greatly simplified.
【0044】[0044]
【0045】さらに、モード信号切換え時直前に各カウ
ンタから出力されるアドレスを保持する保持手段と、モ
ード信号切換え時直後に各カウンタから出力されるアド
レスと前記保持手段に保持されるアドレスとを加算して
アクセスアドレスをアドレスバスに出力する加算手段と
を有するので、モード切り換えに伴うデータ改変等を未
然に防止でき、常に正しいアクセスアドレスを出力する
ことができる。Further, holding means for holding the address output from each counter immediately before the mode signal switching, and adding the address output from each counter immediately after the mode signal switching and the address held in the holding means. And an adder for outputting the access address to the address bus, thereby preventing data modification or the like accompanying the mode switching beforehand and always outputting the correct access address.
【0046】従って、同一メモリ空間上に一般のデー
タ,コードおよびブロック化させる画像データとを混在
させてロードされている場合であっても、画像データの
みを選択してブロック化することができる等の効果を奏
する。Therefore, even when general data, codes, and image data to be blocked are mixedly loaded on the same memory space, only image data can be selected and blocked. Has the effect of
【図1】本発明の一実施例を示すアドレスカウンタの構
成を説明するブロック図である。FIG. 1 is a block diagram illustrating a configuration of an address counter according to an embodiment of the present invention.
【図2】図1に示したカウンタによるアドレス変換処理
を示す状態推移図である。FIG. 2 is a state transition diagram showing an address conversion process by the counter shown in FIG.
【図3】図1に示したカウンタの構成を説明する詳細ブ
ロック図である。FIG. 3 is a detailed block diagram illustrating a configuration of a counter shown in FIG.
【図4】図1に示したデータラッチ/セレクタの構成を
示す詳細ブロック図である。FIG. 4 is a detailed block diagram showing a configuration of a data latch / selector shown in FIG.
【図5】図1に示した変換回路の構成を説明する詳細ブ
ロック図である。FIG. 5 is a detailed block diagram illustrating a configuration of a conversion circuit illustrated in FIG. 1;
【図6】本発明の実施例に適用するバッファエンド検出
機構の一例を示す回路ブロック図である。FIG. 6 is a circuit block diagram illustrating an example of a buffer end detection mechanism applied to the embodiment of the present invention.
【図7】図1に示した変換回路の他の構成を説明する詳
細ブロック図である。FIG. 7 is a detailed block diagram illustrating another configuration of the conversion circuit shown in FIG.
【図8】図7に示した変換回路の演算値のアサインを示
す模式図である。FIG. 8 is a schematic diagram showing assignment of operation values of the conversion circuit shown in FIG. 7;
【図9】図7に示した変換回路の演算値の他のアサイン
を示す模式図である。FIG. 9 is a schematic diagram showing another assignment of the operation value of the conversion circuit shown in FIG. 7;
【図10】2次画像を空間的にブロック分割して直交変
換する処理を示す模式図である。FIG. 10 is a schematic diagram showing processing for spatially dividing a secondary image into blocks and performing orthogonal transformation.
301 データラッチ/セレクタ 302a カウンタモジュール 302b カウンタモジュール 302c カウンタモジュール 302d カウンタモジュール 303 エンコーダ 301 Data latch / selector 302a Counter module 302b Counter module 302c Counter module 302d Counter module 303 Encoder
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−223974(JP,A) 特開 平1−293479(JP,A) 特開 昭63−234361(JP,A) 特開 昭61−208173(JP,A) 特開 昭60−196857(JP,A) 特開 平1−194081(JP,A) 特開 平5−108464(JP,A) 特開 平2−136978(JP,A) 特開 昭59−123925(JP,A) 特開 平3−137743(JP,A) 実開 平2−123639(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 - 12/06 G06T 1/60 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-3-223974 (JP, A) JP-A-1-293479 (JP, A) JP-A-63-234361 (JP, A) JP-A-61- 208173 (JP, A) JP-A-60-196857 (JP, A) JP-A 1-194081 (JP, A) JP-A 5-108464 (JP, A) JP-A 2-136978 (JP, A) JP-A-59-123925 (JP, A) JP-A-3-137743 (JP, A) JP-A-2-13639 (JP, U) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 12/00-12/06 G06T 1/60
Claims (2)
それぞれカウントする複数のカウンタがカスケード接続
されたカウンタ手段と、 前記複数のカウンタの接続順序を外部入力されるモード
信号に基づいて変更する変更手段と、前記カウンタ手段
の各カウンタの出力の組み合わせを1次元アドレスに変
換するアドレス変換手段と、 を有することを特徴とするアドレスカウンタ。1. A counter means in which a plurality of counters respectively counting a plurality of addresses set in a storage means are cascaded, and a change in which a connection order of the plurality of counters is changed based on a mode signal input externally. And an address conversion means for converting a combination of outputs from the respective counters of the counter means into a one-dimensional address.
換手段から出力されるアドレスを保持する保持手段と、 モード信号切換え後に前記アドレス変換手段から出力さ
れるアドレスと前記保持手段に保持されるアドレスとを
加算したアドレスをアドレスバスに出力する加算手段
と、 を有する ことを特徴とする請求項1記載のアドレスカウ
ンタ。(2)The address change immediately before the mode signal is switched.
Holding means for holding an address output from the conversion means, After the mode signal is switched, the
Address and the address held by the holding means
Adding means for outputting the added address to the address bus
When, Having 2. The address cow according to claim 1, wherein:
Nta.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30276791A JP3153294B2 (en) | 1991-10-23 | 1991-10-23 | Address counter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30276791A JP3153294B2 (en) | 1991-10-23 | 1991-10-23 | Address counter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05113925A JPH05113925A (en) | 1993-05-07 |
| JP3153294B2 true JP3153294B2 (en) | 2001-04-03 |
Family
ID=17912894
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30276791A Expired - Fee Related JP3153294B2 (en) | 1991-10-23 | 1991-10-23 | Address counter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3153294B2 (en) |
-
1991
- 1991-10-23 JP JP30276791A patent/JP3153294B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH05113925A (en) | 1993-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5012441A (en) | Apparatus for addressing memory with data word and data block reversal capability | |
| US8166278B2 (en) | Hashing and serial decoding techniques | |
| US5406518A (en) | Variable length delay circuit utilizing an integrated memory device with multiple-input and multiple-output configuration | |
| JPH03231383A (en) | Image reduction/expansion method and apparatus | |
| US4747154A (en) | Image data expanding and/or contracting method and apparatus | |
| US5794065A (en) | Data driven information processor | |
| CN118277328B (en) | Data processing method, processor, chip and electronic device | |
| US5973707A (en) | Scan converting method and apparatus for raster to block and block to raster using a shared block buffer and two input/output buffers, one being raster, the other scan | |
| KR940007161B1 (en) | Electronic Zooming System Using Image Buffer | |
| EP1481319B1 (en) | Method and apparatus for parallel access to multiple memory modules | |
| US5805476A (en) | Very large scale integrated circuit for performing bit-serial matrix transposition operation | |
| JP3153294B2 (en) | Address counter | |
| US6789097B2 (en) | Real-time method for bit-reversal of large size arrays | |
| US5621337A (en) | Iterative logic circuit | |
| WO1993024888A1 (en) | Response resolver for associative memories and parallel processors | |
| US5937430A (en) | Buffer circuit with control device to directly output input data or to output input data written in storage device | |
| EP1459291B1 (en) | Digital line delay using a single port memory | |
| US5210713A (en) | Data storage method and first-in first-out memory device | |
| US5245562A (en) | Accumulating arithmetic memory integrated circuit | |
| CA2352683C (en) | Real-time method for bit-reversal of large size arrays | |
| RU2212715C2 (en) | Associative memory device | |
| JP3340449B2 (en) | Line memory circuit and data storage method | |
| KR100284011B1 (en) | Memory Management Method for Non-Square Interleaver / Deinterleaver | |
| SU1043747A1 (en) | Storage with multi-format access to data | |
| KR920008266B1 (en) | Memory system for effective analyzation of image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090126 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090126 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100126 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110126 Year of fee payment: 10 |
|
| LAPS | Cancellation because of no payment of annual fees |