JPH06231034A - Method and device for generating address - Google Patents

Method and device for generating address

Info

Publication number
JPH06231034A
JPH06231034A JP1490493A JP1490493A JPH06231034A JP H06231034 A JPH06231034 A JP H06231034A JP 1490493 A JP1490493 A JP 1490493A JP 1490493 A JP1490493 A JP 1490493A JP H06231034 A JPH06231034 A JP H06231034A
Authority
JP
Japan
Prior art keywords
data
address
order
stored
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1490493A
Other languages
Japanese (ja)
Inventor
Eiji Iwata
英次 岩田
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.)
Sony Corp
Original Assignee
Sony 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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=11873982&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JPH06231034(A) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP1490493A priority Critical patent/JPH06231034A/en
Publication of JPH06231034A publication Critical patent/JPH06231034A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide method and device for generating an address capable of performing memory access with arbitrary sequence and preventing the reduction of software quantity and the lowering of processing efficiency from occurring with simple constitution. CONSTITUTION:A counter 4 generates a numeric value in accordance with a sequence ID set by the MPU 5 of a computer, and furthermore, increments the numeric value at every clock cycle. Table memory 12 is constituted of (m) fields in accordance with the ports of the computer, and is comprised so as to store (n) words, respectively. An adder circuit 13 generates the address of data by adding (m) start addresses stored in a start address register 15 on the addresses inputted from the fields of corresponding table memory 12. A flag check circuit 14 reads out an address sequence control flag at every count of the counter 4, and outputs the value of the counter.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は計算機システムにおいて
メモリ等のアクセスのためのアドレス発生方法およびそ
の装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an address generating method and apparatus for accessing a memory or the like in a computer system.

【0002】[0002]

【従来の技術】数値計算、あるいは画像処理等に用いら
れる計算機システムにおいて、使用されるプロセッサ
(MPU)が行列演算を行う場合、あるいは画像処理演
算を行う場合には、実際には1次元的に配列され、アド
レスに対応付けられたメモリについて2次元的なアクセ
スを行う必要が生じる。つまり、図5(A)に示すよう
に、計算処理上データ上の矩形領域8として把握される
部分に記憶された1組のデータについてアクセスを行う
必要が生じる。
2. Description of the Related Art In a computer system used for numerical calculation, image processing, etc., when a processor (MPU) used performs matrix calculation or image processing calculation, it is actually one-dimensional. It becomes necessary to perform a two-dimensional access to the memory arranged and associated with the address. That is, as shown in FIG. 5A, it becomes necessary to access a set of data stored in a portion of the data that is grasped as a rectangular area 8 in the calculation process.

【0003】このようなメモリ上の領域にアクセスを行
う場合、アクセスされるアドレスのメモリに記憶された
データについて行う処理が各データについて同一である
場合、1命令の実行によりこれら複数のメモリに記憶さ
れたデータについて処理を行うことが可能となる。この
ような処理を通常ベクトル処理と呼ぶ。
When accessing an area on such a memory, if the processing performed on the data stored in the memory at the accessed address is the same for each data, one instruction is executed to store the data in these plural memories. It becomes possible to perform processing on the obtained data. Such processing is called normal vector processing.

【0004】ところが通常、計算機システムのメモリの
配列は行列演算、あるいは画像処理演算に適した2次元
的な配列とはなっておらず、図5(B)に示すように1
次元的な配列になっている。1次元的に配列されたメモ
リの矩形領域8のような範囲にアクセスを行う際には何
らかのアドレス変換が必要となる。しかし例えば、この
アドレス変換の処理をソフトウェア的に行った場合、ベ
クトル処理の効率は大幅に低下することになる。
However, in general, the memory array of a computer system is not a two-dimensional array suitable for matrix operation or image processing operation, and as shown in FIG.
It is a dimensional array. When accessing a range such as the rectangular area 8 of the memory arranged one-dimensionally, some kind of address conversion is required. However, for example, if this address conversion processing is performed by software, the efficiency of vector processing will be greatly reduced.

【0005】そこで、矩形領域8に記憶されたデータに
対するベクトル処理を効率的に行うために、このメモリ
の矩形領域8に対するアドレスを効率的に発生するハー
ドウェアが用いられる。このようなハードウェアは2次
元アドレス制御回路と呼ばれる。図6は、2次元アドレ
ス発生回路2の構成を示す図である。2次元アドレス発
生回路2は、計算処理上図5(A)に示すようなメモリ
上の矩形領域8としてとらえられる領域についてラスタ
スキャンを行うためのアドレスを1クロックサイクルご
とに発生する。ここで、図5は、画像処理等の際に矩形
領域としてとらえられる領域を説明する図である。
Therefore, in order to efficiently perform vector processing on the data stored in the rectangular area 8, hardware that efficiently generates an address for the rectangular area 8 of this memory is used. Such hardware is called a two-dimensional address control circuit. FIG. 6 is a diagram showing the configuration of the two-dimensional address generation circuit 2. The two-dimensional address generation circuit 2 generates an address for performing a raster scan for an area that is regarded as a rectangular area 8 on the memory as shown in FIG. Here, FIG. 5 is a diagram illustrating an area that can be regarded as a rectangular area during image processing or the like.

【0006】図6において、行カウンタ31は、アドレ
スシーケンスの開始からクロックサイクルごとにカウン
トを行う。ただし、行カウンタ31は、カウント中に2
次元アドレス発生回路2の1つの列成分全てに対するア
ドレスの発生が完了した場合クリアされる。
In FIG. 6, the row counter 31 counts every clock cycle from the start of the address sequence. However, the row counter 31 is set to 2 during counting.
It is cleared when the address generation for all the one column components of the dimensional address generation circuit 2 is completed.

【0007】NXレジスタ32は、矩形領域8のx方向
の範囲を記憶する。なお、特に断らない限り、2次元ア
ドレス発生回路2の各レジスタへの設定は計算機のMP
Uによって行われる。コンパレータ33は、行カウンタ
31のカウント値とNXレジスタ32に記憶される数値
を比較し、行カウンタ31の数値がNXレジスタ32に
記憶された値よりも小さくない場合に行END信号を生
成する。
The NX register 32 stores the range of the rectangular area 8 in the x direction. Unless otherwise specified, the setting of each register of the two-dimensional address generation circuit 2 is performed by the computer MP.
Performed by U. The comparator 33 compares the count value of the row counter 31 with the numerical value stored in the NX register 32, and generates a row END signal when the numerical value of the row counter 31 is not smaller than the value stored in the NX register 32.

【0008】列カウンタ34は、アドレスシーケンスの
開始から行END信号の発生をカウントする。NYレジ
スタ35は、矩形領域8のy軸方向の範囲を記憶する。
コンパレータ36は、列カウンタ34のカウント値がコ
ンパレータ36に記憶された数値よりも小さくない場合
にEND信号を生成する。SAG3は、以上の各部分か
ら構成されている。
The column counter 34 counts the generation of the row END signal from the start of the address sequence. The NY register 35 stores the range of the rectangular area 8 in the y-axis direction.
The comparator 36 generates the END signal when the count value of the column counter 34 is not smaller than the numerical value stored in the comparator 36. The SAG 3 is composed of the above parts.

【0009】DYレジスタ41は、矩形領域8における
y軸方向のアドレスステップを記憶する。例えば、DY
41スタ42に数値1が書き込まれた場合、2次元アド
レス発生回路2は矩形領域8の列成分について一つ置き
にアドレスを順次生成する。DXレジスタ42は、矩形
領域8におけるx軸方向のアドレスステップを記憶す
る。例えば、DXレジスタ42に数値2が書き込まれた
場合、2次元アドレス発生回路2は2バイトおいたアド
レスを順次生成する。
The DY register 41 stores the address step in the y-axis direction in the rectangular area 8. For example, DY
When the numerical value 1 is written in the 41-star 42, the two-dimensional address generation circuit 2 sequentially generates an address for every other column component of the rectangular area 8. The DX register 42 stores the address step in the x-axis direction in the rectangular area 8. For example, when the numerical value 2 is written in the DX register 42, the two-dimensional address generation circuit 2 sequentially generates an address with 2 bytes.

【0010】SAレジスタ43は、各ポート対応に矩形
領域8の開始アドレスを記憶する。加算器44は、DY
レジスタ41およびDXレジスタ42に記憶される数値
とアドレスレジスタ45、46に記憶される数値を加算
する。加算器44とSAレジスタ43に記憶される数値
が設定により加算されて矩形領域8に対するアドレスと
なる。アドレスレジスタ45、46は、2次元アドレス
発生回路2の出力を保持する。アドレス計算器4は、以
上の各部分から構成される。
The SA register 43 stores the start address of the rectangular area 8 for each port. The adder 44 is DY
The numerical values stored in the register 41 and the DX register 42 and the numerical values stored in the address registers 45 and 46 are added. The numerical values stored in the adder 44 and the SA register 43 are added according to the setting to form an address for the rectangular area 8. The address registers 45 and 46 hold the output of the two-dimensional address generation circuit 2. The address calculator 4 is composed of the above parts.

【0011】2次元アドレス発生回路2を使用して図5
(A)に示すようなメモリ上の矩形領域8のアドレスに
アクセスする場合、アクセスに先立って図5(A)に示
す5つのパラメータを2次元アドレス発生回路2に設定
する。
Using the two-dimensional address generation circuit 2, FIG.
When accessing the address of the rectangular area 8 on the memory as shown in (A), the five parameters shown in FIG. 5 (A) are set in the two-dimensional address generation circuit 2 prior to the access.

【0012】すなわち、矩形領域8の先頭アドレスをS
AG3のレジスタSAレジスタ43に設定し、矩形領域
8のx軸方向の範囲をNXレジスタ32に設定し、矩形
領域8のy軸方向の範囲をNYレジスタ35に設定し、
アクセスのx軸方向のアドレスステップをDXレジスタ
42に設定し、アクセスのy軸方向のアドレスステップ
をDYレジスタ41に設定する。
That is, the start address of the rectangular area 8 is S
The register SA register 43 of AG3 is set, the range of the rectangular area 8 in the x-axis direction is set in the NX register 32, the range of the rectangular area 8 in the y-axis direction is set in the NY register 35,
The address step in the x-axis direction of access is set in the DX register 42, and the address step in the y-axis direction of access is set in the DY register 41.

【0013】以上の設定をした後、MPUがソフトウェ
ア的に2次元アドレス発生回路2に起動をかけることに
より、2次元アドレス発生回路2は計算機のメモリ上の
矩形領域8に1クロックサイクルごとに図5(A)の矢
印で示す順番にアドレスを発生する。2次元アドレス発
生回路2は矩形領域8へのアクセスが終了した時点で信
号ENDを発生し、矩形領域8へのアクセスの終了をM
PUに通知する。
After the above setting, the MPU activates the two-dimensional address generating circuit 2 by software, so that the two-dimensional address generating circuit 2 can be displayed in the rectangular area 8 on the memory of the computer every one clock cycle. Addresses are generated in the order shown by the arrow 5 (A). The two-dimensional address generation circuit 2 generates a signal END at the time when the access to the rectangular area 8 is completed, and the end of the access to the rectangular area 8 is generated by M.
Notify PU.

【0014】2次元アドレス発生回路2は、通常メモリ
のポートごとに設けられており、計算機システムがマル
チポート構成のデータメモリを有する場合、あるいはマ
ルチポート構成の外部メモリとのインターフェース回路
を有する場合には、これらのポート全てに対応した数の
2次元アドレス発生回路2が必要となる。
The two-dimensional address generation circuit 2 is usually provided for each port of the memory, and is used when the computer system has a data memory having a multiport structure or when it has an interface circuit with an external memory having a multiport structure. Requires the number of two-dimensional address generation circuits 2 corresponding to all of these ports.

【0015】[0015]

【発明が解決しようとする課題】上記の2次元アドレス
発生回路の構成では、図5(A)の矢印に示すような方
向のメモリアクセス(ラスタスキャン)しか実現できな
い。従って、例えばMPEG等の画像圧縮符号化方式の
画像ブロックに対する要素処理において、ランレングス
符号化(ラン・コーディング)を行う場合に必要となる
図4に矢印で示すような方向へのメモリアクセス(ジグ
ザグスキャン)、あるいはDCT演算を行う場合に必要
となるデータメモリ領域への不連続なアドレスに対する
一連のアクセスには使用できないという問題点がある。
With the above-mentioned configuration of the two-dimensional address generation circuit, only memory access (raster scan) in the direction shown by the arrow in FIG. 5A can be realized. Therefore, for example, in the element processing for the image block of the image compression encoding method such as MPEG, the memory access (zigzag) in the direction shown by the arrow in FIG. 4 which is necessary when performing the run length encoding (run coding) is performed. There is a problem that it cannot be used for a series of access to discontinuous addresses to the data memory area, which is necessary when performing a scan) or a DCT operation.

【0016】上記のジグザグスキャン、あるいは不連続
なアドレスに対するアクセスを行う必要がある場合は、
このアドレス生成のためだけにベクトル処理を複数の命
令の繰り返しで実現しなくてはならない。従って、プロ
グラムサイズが増大するという問題点があった。
When it is necessary to perform the above zigzag scan or access to discontinuous addresses,
Vector processing must be realized by repeating a plurality of instructions only for this address generation. Therefore, there is a problem that the program size increases.

【0017】また、2次元アドレス発生回路において命
令の1クロックサイクル実行ができない場合はベクトル
処理を複数の命令の繰り返しで実現する必要があるため
に、ベクトル処理の効率が低下し、性能の低下を招くと
いう問題点があった。また、計算機のポート数が多い場
合は2次元アドレス発生回路の数も対応した分が必要と
なるため、命令数およびプログラムサイズが増大し、さ
らにハードウェア量が増大するという問題点があった。
Further, when the two-dimensional address generation circuit cannot execute one clock cycle of the instruction, it is necessary to realize the vector processing by repeating a plurality of instructions, so that the efficiency of the vector processing is lowered and the performance is lowered. There was a problem of inviting. Further, when the number of ports of the computer is large, a corresponding number of two-dimensional address generation circuits are required, which increases the number of instructions and the program size, and further increases the amount of hardware.

【0018】本発明は上述した従来技術の問題点に鑑み
てなされたものであり、任意の順序のメモリアクセスが
可能であり、よってこのラスタスキャン以外の不連続的
なメモリアクセスを行う場合にも演算処理のソフトウェ
アのサイズの増大を防ぐことが可能であり、また、演算
処理の効率を低下させることがなく、また、ポート数の
多い計算機に適用する場合においてもハードウェア量の
増大を抑えることの可能なアドレス発生方法およびその
装置を提供することを目的とする。
The present invention has been made in view of the above-mentioned problems of the prior art, and memory access in an arbitrary order is possible. Therefore, even when performing discontinuous memory access other than the raster scan. It is possible to prevent an increase in the size of software for arithmetic processing, and not reduce the efficiency of arithmetic processing, and to suppress an increase in the amount of hardware even when applied to a computer with a large number of ports. It is an object of the present invention to provide a possible address generation method and device thereof.

【0019】[0019]

【課題を解決するための手段】上記目的を達成するため
に本発明のアドレス発生方法およびその装置は、記憶装
置に記憶されるデータの順序と異なる順序で前記データ
をアクセスするためのアドレスを発生する装置であっ
て、データ参照開始から1クロックサイクルごとにカウ
ントを行うカウンタと、データの記憶順序とアクセス順
序を対応させた一群の参照順序データが記憶されてお
り、前記カウンタのカウント値をアクセスデータとして
入力された場合、それに対応する前記参照順序データを
生成する参照順序データ生成手段と、前記参照順序デー
タに参照するデータの開始アドレスを加算して前記記憶
装置に記憶されるデータの記憶アドレスを生成する加算
手段とを有する。
In order to achieve the above object, an address generating method and apparatus of the present invention generate addresses for accessing the data in a different order from the order of data stored in a storage device. Which stores a counter for counting every clock cycle from the start of data reference, and a group of reference order data in which a data storage order and an access order are associated with each other, and the count value of the counter is accessed. When input as data, reference order data generating means for generating the reference order data corresponding thereto, and a storage address of data stored in the storage device by adding a start address of data to be referred to the reference order data And adding means for generating.

【0020】また、前記参照データ生成手段は複数の出
力端子を有し、前記参照順序データは1回のアクセスに
対して関連する複数の参照順序データが同時に出力され
るように記憶されており、前記カウント値に対応した複
数の参照データを前記ポート対応に同時に生成し、前記
加算手段は前記各出力端子ごとに複数設けられ、前記同
時に出力される複数の参照順序データにそれぞれ前記記
憶装置に記憶されるデータの開始アドレスを加算して前
記データの記憶アドレスを生成することを特徴とする。
Further, the reference data generation means has a plurality of output terminals, and the reference order data is stored so that a plurality of reference order data related to one access are simultaneously output. A plurality of reference data corresponding to the count value are simultaneously generated corresponding to the ports, a plurality of adding means are provided for each output terminal, and the plurality of reference order data output at the same time are respectively stored in the storage device. The start address of the data to be stored is added to generate the storage address of the data.

【0021】また、前記参照データ生成手段は前記参照
順序データの各要素データがそれぞれ最終のデータであ
るか否かを示す終了識別子をさらに記憶し、前記終了識
別子が最終のデータであることを示す前記参照順序デー
タの要素データが読みだされた場合に前記参照順序デー
タの終了を識別する終了識別手段をさらに有することを
特徴とする。
The reference data generation means further stores an end identifier indicating whether each element data of the reference order data is the final data, and indicates that the end identifier is the final data. It is characterized by further comprising end identification means for identifying the end of the reference order data when the element data of the reference order data is read.

【0022】また、前記データは2次元的に配列された
画像データであることを特徴とする。
Further, the data is image data arranged two-dimensionally.

【0023】また、前記参照順序データは前記記憶装置
に記憶されたデータについてジグザグスキャンを行うデ
ータであることを特徴とする。
The reference order data is data for performing zigzag scanning on the data stored in the storage device.

【0024】また、記憶装置と、前記記憶装置に記憶さ
れるデータの順序と異なる順序で前記データをアクセス
するためのアドレスを発生する装置であって、データ参
照開始から1クロックサイクルごとにカウントを行うカ
ウンタと、データの記憶順序とアクセス順序を対応させ
た一群の参照順序データが記憶されており、前記カウン
タのカウント値をアクセスデータとして入力された場
合、それに対応する前記参照順序データを生成する参照
順序データ生成手段と、前記参照順序データに参照する
データの開始アドレスを加算して前記記憶装置に記憶さ
れるデータの記憶アドレスを生成する加算手段とを有す
るアドレス発生装置と、前記記憶装置に記憶されたデー
タについて前記アクセス順序に処理を行う演算制御装置
を有する。
Further, the storage device and a device for generating an address for accessing the data in a different order from the order of the data stored in the storage device, and counting every clock cycle from the start of the data reference. A group of reference order data in which a counter to be performed and a data storage order and an access order are associated with each other are stored, and when the count value of the counter is input as access data, the reference order data corresponding thereto is generated. An address generator having reference order data generation means and addition means for adding a start address of data to be referred to the reference order data to generate a storage address of data stored in the storage device; It has an arithmetic and control unit that processes the stored data in the access order.

【0025】また、記憶装置に記憶されるデータの順序
と異なる順序で前記データをアクセスするメモリアクセ
ス方法であって、前記記録装置に記録されたデータの記
憶順序とアクセス順序とを対応させた参照順序データを
記憶し、この参照順序データを用いて与えられたアクセ
スデータから対応するデータの記憶アドレスを発生させ
る。
A memory access method for accessing the data in an order different from the order of the data stored in the storage device, wherein a reference in which the storage order of the data recorded in the recording device corresponds to the access order. Sequential data is stored, and the reference data is used to generate the storage address of the corresponding data from the given access data.

【0026】また、前記記録装置に記録されたデータの
記憶アドレスの発生は1クロックサイクルごとに行われ
ることを特徴とする。
The storage address of the data recorded in the recording device is generated every clock cycle.

【0027】また、前記記録装置に記録されたデータは
2次元的に配列された画像データであることを特徴とす
る。
The data recorded in the recording device is image data arranged two-dimensionally.

【0028】また、前記参照順序データは前記記録装置
に記録されたデータについてジグザグスキャンを行う順
序のデータであることを特徴とする。
Further, the reference order data is data of an order of performing zigzag scanning on the data recorded in the recording device.

【0029】[0029]

【作用】本発明のアドレス発生方法およびその装置はメ
モリアクセスの順序のデータを記憶したテーブルを有す
る。このテーブルに記憶されたメモリアクセス順序のデ
ータをポートそれぞれに1クロックサイクルごとに読み
出し、さらにポート対応に設定された開始アドレスを加
算することにより任意のメモリアクセス順序でアドレス
を生成する。
The address generating method and apparatus according to the present invention has a table storing data of memory access order. The data in the memory access order stored in this table is read out for each clock cycle for each port, and the start address set for each port is added to generate the address in an arbitrary memory access order.

【0030】[0030]

【実施例】以下、本発明のアドレス発生方法およびその
装置の第一の実施例について説明する。図1は、本発明
のアドレス発生装置1の構成を示す図である。アドレス
発生装置1は、計算機が有するメモリ6のm個の各ポー
トに対応してメモリアクセスに使用されるアドレスを1
クロックサイクルごとに自動的に発生する装置である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the address generating method and apparatus of the present invention will be described below. FIG. 1 is a diagram showing a configuration of an address generator 1 of the present invention. The address generator 1 sets the address used for memory access to 1 corresponding to each of m ports of the memory 6 of the computer.
It is a device that is automatically generated every clock cycle.

【0031】ここで、図中に示すようにテーブルメモリ
12の各ポートには加算回路13a〜13mが接続され
ており、各ポートに対応するアドレスを同時に発生する
ことが可能となっている。また、アドレス発生装置1に
よる一連のメモリアクセス(アドレスシーケンス)でア
クセス可能なメモリ数は最大p個である。つまり、アド
レス発生装置1は、1つのアドレスシーケンスにおいて
高々p個のアドレスを発生可能である。
Here, as shown in the figure, the adders 13a to 13m are connected to the respective ports of the table memory 12 so that the addresses corresponding to the respective ports can be simultaneously generated. The maximum number of memories that can be accessed by a series of memory accesses (address sequence) by the address generator 1 is p. That is, the address generator 1 can generate at most p addresses in one address sequence.

【0032】図1において、カウンタ4は、計算機のM
PU5により設定されるシーケンスIDに対応した数値
を発生し、さらに1クロックサイクルごとにこの数値を
インクリメントしてゆく。テーブルメモリ12は、計算
機のポート0〜m−1に対応して設けられたm個のフィ
ールド0〜m−1から構成され、それぞれがn個のワー
ドを記憶できるように構成されている。
In FIG. 1, the counter 4 is a computer M
A numerical value corresponding to the sequence ID set by PU5 is generated, and this numerical value is further incremented every clock cycle. The table memory 12 is composed of m fields 0 to m-1 provided corresponding to the ports 0 to m-1 of the computer, and each is capable of storing n words.

【0033】よって、テーブルメモリ12の各フィール
ドが記憶可能なアドレスシーケンスは〔n/p〕個とな
る。ここで、各ワードは1つのアドレスシーケンスの最
大アクセスメモリ数pより、それぞれ〔log2 p〕+
1(ただし〔x〕はxを超えない最大の整数を示す。)
ビット構成になっている。
Therefore, the number of address sequences that can be stored in each field of the table memory 12 is [n / p]. Here, each word is [log 2 p] + from the maximum access memory number p of one address sequence.
1 (however, [x] represents the maximum integer not exceeding x.)
It has a bit structure.

【0034】また、テーブルメモリ12のワードにはそ
れぞれ図中に示すように、例えば1ビットのアドレスシ
ーケンス制御フラグE1 〜En-1 が設けられており、こ
のアドレスシーケンス制御フラグE1 〜En-1 が1であ
る場合は各アドレスシーケンスの終了を示している。
As shown in the drawing, each word of the table memory 12 is provided with, for example, 1-bit address sequence control flags E 1 to E n-1, which address sequence control flags E 1 to E. When n-1 is 1, it indicates the end of each address sequence.

【0035】加算回路13a〜13mは、MPU5によ
り設定され、開始アドレスレジスタ150 〜15m-1
記憶されるm個の開始アドレスと、対応するテーブルメ
モリ12のフィールドから入力されるアドレスを加算し
て出力する。なお、この開始アドレスは開始アドレスレ
ジスタ15以外の任意のレジスタ、例えばMPU5の周
辺回路に使用されるレジスタ等に記憶するように構成し
てもよい。
The adder circuits 13a to 13m add the m number of start addresses set by the MPU 5 and stored in the start address registers 15 0 to 15 m-1 and the address input from the corresponding field of the table memory 12. And output. The start address may be stored in any register other than the start address register 15, for example, a register used in the peripheral circuit of the MPU 5.

【0036】フラグチェック回路14は、カウンタ4の
カウントのたびにアドレスシーケンス制御フラグを読み
出してその値を出力する。開始アドレスレジスタ15
は、各アドレスシーケンスに対応したメモリ6上の開始
アドレスを記憶する。
The flag check circuit 14 reads the address sequence control flag and outputs the value every time the counter 4 counts. Start address register 15
Stores the start address on the memory 6 corresponding to each address sequence.

【0037】MPU5は、アドレス発生装置1が使用さ
れる計算機のMPUである。メモリ6は、m個のポート
を有し、アドレス発生装置1が使用される計算機の各種
データを記憶する。DSP7は、アドレス発生装置1が
使用される計算機において、画像演算等の演算を行う。
The MPU 5 is the MPU of the computer in which the address generator 1 is used. The memory 6 has m ports and stores various data of a computer in which the address generator 1 is used. The DSP 7 performs calculations such as image calculations in the computer in which the address generator 1 is used.

【0038】以下、アドレス発生装置1の動作について
説明する。MPU5は発生装置1起動用の命令を実行す
ると、まずカウンタ4にアドレスシーケンスIDを設定
する。ここで、アドレスシーケンスIDはテーブルメモ
リ12に記憶されたアドレスシーケンスを識別する識別
子である。なお、図1中に点線で示すようにこのアドレ
スシーケンスIDは、DSP7より直接カウンタ4に設
定するように構成してもよい。
The operation of the address generator 1 will be described below. When the MPU 5 executes the instruction to activate the generator 1, first, the address sequence ID is set in the counter 4. Here, the address sequence ID is an identifier for identifying the address sequence stored in the table memory 12. The address sequence ID may be set in the counter 4 directly by the DSP 7 as shown by the dotted line in FIG.

【0039】カウンタ4は、このアドレスシーケンスI
Dに対応するテーブルメモリ12のアドレスの数値(オ
フセット)からカウントを開始し、テーブルメモリ12
に入力する。テーブルメモリ12は、カウンタ4のカウ
ント値対応する各フィールドのワードを加算回路13a
〜13m−1に入力する。
The counter 4 receives the address sequence I
Counting is started from the numerical value (offset) of the address of the table memory 12 corresponding to D, and the table memory 12
To enter. The table memory 12 adds the word of each field corresponding to the count value of the counter 4 to the adder circuit 13a.
Input to ~ 13m-1.

【0040】つまり、例えばカウンタ4のカウント値が
k(kは整数、0≦k≦n−1)である場合、加算回路
13aにはテーブルメモリ12のアドレスA0,k のデー
タ、加算回路13bにはテーブルメモリ12のアドレス
1,k のデータ、・・・加算回路13n−1にはテーブ
ルメモリ12のドレスAn-1,k のデータが入力されるこ
とになる。
That is, for example, when the count value of the counter 4 is k (k is an integer, 0≤k≤n-1), the adder circuit 13a includes the data at the address A 0, k of the table memory 12 and the adder circuit 13b. The data of the address A 1, k of the table memory 12 is input to the adder circuit 13n-1, and the data of the address A n-1, k of the table memory 12 is input to the adder circuit 13n-1.

【0041】加算回路13a〜13m−1は、入力され
るテーブルメモリ12の各アドレスのデータに2次元ア
ドレス発生回路2の開始アドレスレジスタ150 〜15
m-1に記憶される各ポート対応の開始アドレスを加算し
て、各ポート対応のメモリ6へのアクセスに使用するア
ドレスを得る。このアドレスが入力されたメモリ6は、
MPU5、あるいはポートに対応するDSP6にデータ
を出力する。MPU5およびDSP7は、このデータに
基づいて、例えば画像処理等を行う。
The adder circuits 13a to 13m-1 add the start address registers 15 0 to 15 of the two-dimensional address generating circuit 2 to the input data of each address of the table memory 12.
The start address corresponding to each port stored in m-1 is added to obtain the address used for accessing the memory 6 corresponding to each port. The memory 6 to which this address is input is
The data is output to the MPU 5 or the DSP 6 corresponding to the port. The MPU 5 and DSP 7 perform, for example, image processing based on this data.

【0042】この加算回路13a〜13m−1での加算
により、テーブルメモリ12に記憶された相対アドレス
によりデータメモリへのアクセスアドレスの発生が可能
となっている。このようにアドレス発生装置1を構成す
ることにより、テーブルメモリ12に記憶する数値を変
更するだけで、各ポートは任意の順序のメモリアクセス
を行うことが可能となる。
By the addition in the adder circuits 13a to 13m-1, it is possible to generate the access address to the data memory by the relative address stored in the table memory 12. By configuring the address generator 1 in this way, each port can perform memory access in an arbitrary order simply by changing the numerical value stored in the table memory 12.

【0043】アドレス発生装置1は、上記のようにカウ
ンタ4のカウントの度に順次アドレスを発生してゆく。
ここで、1つのアドレスシーケンスの途中ではアドレス
シーケンス制御フラグの値は0、最後には1になってい
る。
The address generator 1 sequentially generates addresses each time the counter 4 counts as described above.
Here, the value of the address sequence control flag is 0 in the middle of one address sequence and 1 at the end.

【0044】カウンタ4のカウントが、カウンタ4に設
定されたアドレスシーケンスIDに対応するアドレスシ
ーケンスの最後のアドレスを示す数値になった場合、フ
ラグチェック回路14の出力が論理値1となり(アサー
トされ)、MPU5等にそのアドレスシーケンスが終了
したことを通知する。なお、アドレス発生装置1で発生
されるアドレスシーケンスと2次元アドレス発生回路2
で発生するアドレスシーケンスを併用するように計算機
を構成してもよい。
When the count of the counter 4 reaches a numerical value indicating the last address of the address sequence corresponding to the address sequence ID set in the counter 4, the output of the flag check circuit 14 becomes a logical value 1 (asserted). , MPU5, etc. are notified that the address sequence has ended. The address sequence generated by the address generator 1 and the two-dimensional address generator 2
The computer may be configured so that the address sequence generated in step 1 is also used.

【0045】以下、アドレス発生装置1の動作を具体的
な数値を用いて例示する。図2は、ジグザグスキャンを
行う場合のアドレスシーケンスを発生するアドレス発生
装置5である。アドレス発生装置5は図3に示す矩形領
域について、図4に示すようなジグザグスキャンを行う
アドレスシーケンスをポート0〜3に対してそれぞれに
対応する発生する装置である。
The operation of the address generator 1 will be illustrated below by using specific numerical values. FIG. 2 shows an address generator 5 that generates an address sequence when performing zigzag scanning. The address generator 5 is a device that generates an address sequence for performing the zigzag scan as shown in FIG. 4 for the rectangular area shown in FIG.

【0046】アドレス発生装置5においては、発生する
アドレスシーケンスは1つのみであり、従ってカウンタ
4にはアドレスーケンスIDの設定は行われない。よっ
てアドレス発生装置5が起動された場合、カウンタ4は
常に0からカウントを始める。
In the address generator 5, only one address sequence is generated, and therefore the address sequence ID is not set in the counter 4. Therefore, when the address generator 5 is activated, the counter 4 always starts counting from 0.

【0047】テーブルメモリ12は、4フィールド×1
6ワード構成となっている。つまり、アドレス発生装置
5の発生するアドレスシーケンスにより、各ポートに接
続された4つの演算装置が並列して1クロックサイクル
に4個のデータの処理を行う。また、テーブルメモリ1
2に記入してある数値はジグザグスキャンを行うアドレ
スシーケンスの発生する相対アドレスの値である。ま
た、アドレスシーケンス制御フラグ、メモリ6、DSP
7等は図2において省略してある。アドレス発生装置5
の各部分はアドレス発生装置1の同一符号で示す部分に
相当する。
The table memory 12 has 4 fields × 1.
It consists of 6 words. That is, according to the address sequence generated by the address generator 5, the four arithmetic units connected to the respective ports process the four data in parallel in one clock cycle. Also, the table memory 1
The numerical value written in 2 is the value of the relative address generated by the address sequence for performing the zigzag scan. Also, address sequence control flag, memory 6, DSP
7 and the like are omitted in FIG. Address generator 5
The respective parts of 1 correspond to the parts of the address generator 1 indicated by the same reference numerals.

【0048】以下、図2、図3、および図4を参照して
アドレス発生装置5の動作を説明する。図3は、8×8
の矩形領域(データブロック)を示す図であり、記入さ
れている数値は各メモリアドレスである。図4は、図3
に示すデータブロックにおいてアドレス発生装置5が発
生するアドレスシーケンスの順番を示す図である。
The operation of the address generator 5 will be described below with reference to FIGS. 2, 3 and 4. Figure 3 shows 8x8
FIG. 4 is a diagram showing a rectangular area (data block) of, and the entered numerical values are memory addresses. FIG. 4 shows FIG.
FIG. 7 is a diagram showing the order of address sequences generated by the address generator 5 in the data block shown in FIG.

【0049】図3および図4を参照して判るように、加
算回路13a〜13dには、最初のクロックサイクルに
おいて図3のアドレスに対応する数値(0、1、8、1
6)が出力されることになる。つぎのクロックサイクル
では、加算回路13a〜13dには、図3のアドレスに
対応する数値(9、2、3、10)が出力されることに
なる。加算回路13a〜13dにはこのように順次相対
アドレスが出力される。
As can be seen with reference to FIGS. 3 and 4, the adder circuits 13a to 13d have numerical values (0, 1, 8, 1) corresponding to the address of FIG. 3 in the first clock cycle.
6) will be output. In the next clock cycle, the numerical values (9, 2, 3, 10) corresponding to the addresses of FIG. 3 are output to the adder circuits 13a to 13d. In this way, the relative addresses are sequentially output to the adder circuits 13a to 13d.

【0050】アドレス発生装置5が起動されるとカウン
タ4は、クロックサイクルごとに0から順次カウントを
開始する。カウンタ4のカウント値が0の場合、加算回
路13a〜13dにはそれぞれ、テーブルメモリ12の
0ワードの数値(0、1、8、16)が出力される。
When the address generator 5 is activated, the counter 4 sequentially starts counting from 0 every clock cycle. When the count value of the counter 4 is 0, the numerical value (0, 1, 8, 16) of 0 word of the table memory 12 is output to each of the adding circuits 13a to 13d.

【0051】この値には開始アドレスレジスタ151
154 に記憶された開始アドレスの値が加算されてアド
レス出力となる。ただし、アドレス発生装置5において
は、開始アドレスレジスタ151 〜15 4 に記憶される
データは同一の値となるため、単一の開始アドレスレジ
スタ15を設けるように構成してもよい。
This value contains the start address register 151~
15FourThe start address value stored in
Output. However, in the address generator 5
Is the start address register 151~ 15 FourRemembered in
Since the data has the same value, a single start address register
The star 15 may be provided.

【0052】これ以降、クロックサイクルごとに、加算
回路13a〜13dにはそれぞれ、2番目のクロックサ
イクルには(9、2、3、10)、・・・・、16番目
のクロックサイクルには(47、55、62、63)が
出力され、開始アドレスレジスタ151 〜154 に記憶
された開始アドレスが加算されてアドレス出力となる。
After that, in each clock cycle, the adder circuits 13a to 13d have (9, 2, 3, 10) in the second clock cycle, ... 47, 55, 62, 63) are output, and the start addresses stored in the start address registers 15 1 to 15 4 are added to produce an address output.

【0053】最後のワードの数値がテーブルメモリ12
から出力された後、フラグチェック回路14(図2にお
いては図示せず)の出力値がアサートされ、このアドレ
スシーケンスは終了する。図3に示すデータブロックが
記憶されているデータメモリ上の他の8×8のデータブ
ロックにアクセスを行うアドレスシーケンスを実現する
場合は開始アドレスレジスタ151 〜154 に設定する
開始アドレスを変更すればよい。
The numerical value of the last word is the table memory 12
, The output value of the flag check circuit 14 (not shown in FIG. 2) is asserted, and this address sequence ends. To realize an address sequence for accessing another 8 × 8 data block on the data memory in which the data block shown in FIG. 3 is stored, the start addresses set in the start address registers 15 1 to 15 4 can be changed. Good.

【0054】テーブルメモリ12は、ROMに固定的に
記憶させる、あるいは、計算機の立ち上げ時に計算機の
RAM上に設定する等の方法により作成可能である。以
上述べた実施例の他本発明のアドレス発生方法およびそ
の装置は、例えば変形例として述べたような種々の構成
をとることが可能である。以上述べた実施例は例示であ
る。
The table memory 12 can be created by a method of fixedly storing it in the ROM or setting it in the RAM of the computer when the computer is started up. In addition to the above-described embodiments, the address generating method and the apparatus therefor of the present invention can have various configurations such as those described as modifications. The embodiments described above are merely examples.

【0055】[0055]

【発明の効果】以上述べたように本発明によれば、簡単
な構成の装置でジグザグスキャン等の任意のアドレスシ
ーケンスを発生可能である。また、1クロックごとにソ
フトウェア的な演算なしに任意のアドレスシーケンスが
発生可能であり、ソフトウェア量の増大を招かず、ま
た、演算速度を低下させない。また、単一の装置で多く
のポートに対応可能なので計算機のハードウェア量の増
加を抑えることが可能である。
As described above, according to the present invention, it is possible to generate an arbitrary address sequence such as a zigzag scan with a device having a simple structure. Further, an arbitrary address sequence can be generated for each clock without software-like calculation, which does not increase the amount of software and does not reduce the calculation speed. Also, since a single device can handle many ports, it is possible to suppress an increase in the hardware amount of the computer.

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

【図1】本発明のアドレス発生装置の構成を示す図であ
る。
FIG. 1 is a diagram showing a configuration of an address generator of the present invention.

【図2】ジグザグスキャンを行う場合のアドレスシーケ
ンスを発生するアドレス発生装置である。
FIG. 2 is an address generator that generates an address sequence when performing zigzag scanning.

【図3】8×8のデータブロックを示す図である。FIG. 3 is a diagram showing an 8 × 8 data block.

【図4】図3に示すデータブロックにおいてアドレス発
生装置が発生するアドレスシーケンスの順番を示す図で
ある。
4 is a diagram showing an order of an address sequence generated by an address generator in the data block shown in FIG.

【図5】画像処理等の際に矩形領域としてとらえられる
領域を説明する図である。
FIG. 5 is a diagram illustrating a region that can be regarded as a rectangular region during image processing or the like.

【図6】2次元アドレス発生回路の構成を示す図であ
る。
FIG. 6 is a diagram showing a configuration of a two-dimensional address generation circuit.

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

1、5・・・アドレス発生装置 4・・・カウンタ 5・・・MPU 6・・・メモリ 7・・・DSP 12・・・テーブルメモリ 13・・・加算回路 14・・・フラグチェック回路 1, 5 ... Address generator 4 ... Counter 5 ... MPU 6 ... Memory 7 ... DSP 12 ... Table memory 13 ... Addition circuit 14 ... Flag check circuit

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】記憶装置に記憶されるデータの順序と異な
る順序で前記データをアクセスするためのアドレスを発
生する装置であって、 データ参照開始から1クロックサイクルごとにカウント
を行うカウンタと、 データの記憶順序とアクセス順序を対応させた一群の参
照順序データが記憶されており、前記カウンタのカウン
ト値をアクセスデータとして入力された場合、それに対
応する前記参照順序データを生成する参照順序データ生
成手段と、 前記参照順序データに参照するデータの開始アドレスを
加算して前記記憶装置に記憶されるデータの記憶アドレ
スを生成する加算手段とを有するアドレス発生装置。
1. A device for generating addresses for accessing the data in an order different from the order of the data stored in the storage device, the counter performing counting every clock cycle from the start of data reference, and the data. A group of reference order data in which the storage order and the access order are associated with each other, and when the count value of the counter is input as the access data, the reference order data generation means for generating the corresponding reference order data. And an adding unit that adds a start address of data to be referred to the reference order data to generate a storage address of data stored in the storage device.
【請求項2】前記参照データ生成手段は複数の出力端子
を有し、前記参照順序データは1回のアクセスに対して
関連する複数の参照順序データが同時に出力されるよう
に記憶されており、前記カウント値に対応した複数の参
照データを前記ポート対応に同時に生成し、 前記加算手段は前記各出力端子ごとに複数設けられ、前
記同時に出力される複数の参照順序データにそれぞれ前
記記憶装置に記憶されるデータの開始アドレスを加算し
て前記データの記憶アドレスを生成することを特徴とす
る請求項1に記載のアドレス発生装置。
2. The reference data generating means has a plurality of output terminals, and the reference order data is stored such that a plurality of reference order data related to one access are simultaneously output. A plurality of reference data corresponding to the count value are simultaneously generated corresponding to the ports, a plurality of the adding means are provided for each output terminal, and the plurality of reference order data output at the same time are respectively stored in the storage device. The address generating device according to claim 1, wherein a storage address of the data is generated by adding a start address of the data to be stored.
【請求項3】前記参照データ生成手段は前記参照順序デ
ータの各要素データがそれぞれ最終のデータであるか否
かを示す終了識別子をさらに記憶し、 前記終了識別子が最終のデータであることを示す前記参
照順序データの要素データが読みだされた場合に前記参
照順序データの終了を識別する終了識別手段をさらに有
することを特徴とする請求項1または請求項2に記載の
アドレス発生装置。
3. The reference data generation means further stores an end identifier indicating whether each element data of the reference order data is the final data, and the end identifier indicates the final data. 3. The address generating device according to claim 1, further comprising an end identifying means for identifying the end of the reference order data when the element data of the reference order data is read.
【請求項4】前記データは2次元的に配列された画像デ
ータであることを特徴とする請求項1〜3のいずれかに
記載のアドレス発生装置。
4. The address generating device according to claim 1, wherein the data is image data arranged two-dimensionally.
【請求項5】前記参照順序データは前記記憶装置に記憶
されたデータについてジグザグスキャンを行うデータで
あることを特徴とする請求項1〜4のいずれかに記載の
アドレス発生装置。
5. The address generating device according to claim 1, wherein the reference order data is data for performing zigzag scanning on the data stored in the storage device.
【請求項6】記憶装置と、 前記記憶装置に記憶されるデータの順序と異なる順序で
前記データをアクセスするためのアドレスを発生する装
置であって、 データ参照開始から1クロックサイクルごとにカウント
を行うカウンタと、 データの記憶順序とアクセス順序を対応させた一群の参
照順序データが記憶されており、前記カウンタのカウン
ト値をアクセスデータとして入力された場合、それに対
応する前記参照順序データを生成する参照順序データ生
成手段と、 前記参照順序データに参照するデータの開始アドレスを
加算して前記記憶装置に記憶されるデータの記憶アドレ
スを生成する加算手段とを有するアドレス発生装置と、 前記記憶装置に記憶されたデータについて前記アクセス
順序に処理を行う演算制御装置を有する信号処理装置。
6. A storage device, and a device for generating addresses for accessing the data in an order different from the order of data stored in the storage device, wherein a count is made every clock cycle from the start of data reference. A counter to be performed and a group of reference order data in which the storage order of data and the access order of data are stored, and when the count value of the counter is input as access data, the reference order data corresponding thereto is generated. An address generation device having a reference order data generation unit and an addition unit configured to add a start address of data to be referred to the reference order data to generate a storage address of data stored in the storage device; Signal processing device having arithmetic and control unit for processing stored data in the access order
【請求項7】記憶装置に記憶されるデータの順序と異な
る順序で前記データをアクセスするメモリアクセス方法
であって、 前記記憶装置に記憶されたデータの記憶順序とアクセス
順序とを対応させた参照順序データを記憶し、 この参照順序データを用いて与えられたアクセスデータ
から対応するデータの記憶アドレスを発生させるアドレ
ス発生方法。
7. A memory access method for accessing the data in an order different from the order of the data stored in the storage device, wherein a reference in which the storage order of the data stored in the storage device corresponds to the access order. An address generation method of storing sequence data and generating a storage address of corresponding data from access data given by using this reference sequence data.
【請求項8】前記記憶装置に記憶されたデータの記憶ア
ドレスの発生は1クロックサイクルごとに行われること
を特徴とする請求項7に記載のアドレス発生方法。
8. The address generating method according to claim 7, wherein the storage address of the data stored in the storage device is generated every clock cycle.
【請求項9】前記記憶装置に記憶されたデータは2次元
的に配列された画像データであることを特徴とする請求
項7または請求項8に記載のアドレス発生方法。
9. The address generating method according to claim 7, wherein the data stored in the storage device is image data arranged two-dimensionally.
【請求項10】前記参照順序データは前記記憶装置に記
憶されたデータについてジグザグスキャンを行う順序の
データであることを特徴とする請求項7〜9のいずれか
に記載のアドレス発生方法。
10. The address generating method according to claim 7, wherein the reference order data is data in an order of performing zigzag scanning on the data stored in the storage device.
JP1490493A 1993-02-01 1993-02-01 Method and device for generating address Pending JPH06231034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1490493A JPH06231034A (en) 1993-02-01 1993-02-01 Method and device for generating address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1490493A JPH06231034A (en) 1993-02-01 1993-02-01 Method and device for generating address

Publications (1)

Publication Number Publication Date
JPH06231034A true JPH06231034A (en) 1994-08-19

Family

ID=11873982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1490493A Pending JPH06231034A (en) 1993-02-01 1993-02-01 Method and device for generating address

Country Status (1)

Country Link
JP (1) JPH06231034A (en)

Similar Documents

Publication Publication Date Title
KR100503094B1 (en) DSP having wide memory bandwidth and DSP memory mapping method
US5012441A (en) Apparatus for addressing memory with data word and data block reversal capability
US8069334B2 (en) Parallel histogram generation in SIMD processor by indexing LUTs with vector data element values
US8412725B2 (en) Method for processing an object on a platform having one or more processors and memories, and platform using same
US20050262276A1 (en) Design method for implementing high memory algorithm on low internal memory processor using a direct memory access (DMA) engine
Lee Subword permutation instructions for two-dimensional multimedia processing in MicroSIMD architectures
JPS6049332B2 (en) Microprogram control method
WO2019206161A1 (en) Pooling operation device
CN114327244A (en) Data migration method and device, processor and computing equipment
JPH06231034A (en) Method and device for generating address
CN112765540A (en) Data processing method and device and related products
JP3413344B2 (en) Image processing apparatus and operation method thereof
US7308553B2 (en) Processor device capable of cross-boundary alignment of plural register data and the method thereof
JPH07152730A (en) Discrete cosine transformation device
US6990571B2 (en) Method for memory optimization in a digital signal processor
Shahbahrami et al. Performance comparison of SIMD implementations of the discrete wavelet transform
JPH09322168A (en) Two-dimensional inverse discrete cosine transformation device
JP3242788B2 (en) Signal processing device and signal processing method
JP2851804B2 (en) 2D orthogonal transform device
JPH05143633A (en) Isogeometric fast fourier transform realizing system
JP2941192B2 (en) Parallel storage for image processing using linear transformation
CN100342327C (en) Security of hardware loops
US6081869A (en) Bit-field peripheral
CN116910432A (en) Sparse matrix vector multiplication method and device based on heterogeneous many-core processor
Ramesh et al. Comprehensive address generator for digital signal processing