[go: up one dir, main page]

JPH05210573A - Address generating method - Google Patents

Address generating method

Info

Publication number
JPH05210573A
JPH05210573A JP1706992A JP1706992A JPH05210573A JP H05210573 A JPH05210573 A JP H05210573A JP 1706992 A JP1706992 A JP 1706992A JP 1706992 A JP1706992 A JP 1706992A JP H05210573 A JPH05210573 A JP H05210573A
Authority
JP
Japan
Prior art keywords
address
data
output
value
bits
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
JP1706992A
Other languages
Japanese (ja)
Inventor
Noriko Kakumaru
典子 角丸
Hideyuki Iino
秀之 飯野
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1706992A priority Critical patent/JPH05210573A/en
Publication of JPH05210573A publication Critical patent/JPH05210573A/en
Priority to US08/705,562 priority patent/US5809552A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

(57)【要約】 【目的】 本発明は、データバスのビット幅より小なる
ビットのデータを連続して転送するためのアドレス生成
方法に関し、バス転送効率の向上及びアドレス生成の自
由度向上を目的とする。 【構成】 ストライド値が“1”のときはベースアドレ
スが上位側のデータアドレスであるか否か判定し(ステ
ップ102,103)、出力アドレスをベースアドレス
とし(ステップ104,113)、ストライド値に転送
データ幅を乗じた値を上記ベースアドレス(前回の出力
アドレス)に加算して新たな出力アドレスを生成する
(ステップ106,115)。これにより、64ビット
幅のデータバスで32ビットのデータを2個ずつ転送す
る。ストライド値が“−1”のときも上記と略同様の処
理を実行する(ステップ116〜125)。
(57) [Abstract] [Object] The present invention relates to an address generation method for continuously transferring data of a bit smaller than the bit width of a data bus, and improves bus transfer efficiency and address generation flexibility. To aim. [Structure] When the stride value is "1", it is determined whether or not the base address is the upper data address (steps 102 and 103), the output address is used as the base address (steps 104 and 113), and the stride value is set. A value obtained by multiplying the transfer data width is added to the base address (previous output address) to generate a new output address (steps 106 and 115). As a result, two pieces of 32-bit data are transferred by the 64-bit width data bus. When the stride value is "-1", substantially the same processing as above is executed (steps 116 to 125).

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 more particularly to an address generating method for continuously transferring data having a bit smaller than a bit width of a data bus.

【0002】例えば、図7に示す如くマイクロプロセッ
サ11と、このマイクロプロセッサ11にデータバス1
2、アドレスバス13を介して接続される外部メモリ1
4や周辺マイクロプロセッサ15等で構成されるシステ
ムにおいて、データバス12のビット幅の1/2倍より
小なるビットのデータが連続して存在している場合は、
それらのデータを同時に転送する方がデータバス12の
効率が良く、システムの性能の向上に寄与する。そこ
で、データバス12のビット幅より小なるビットのデー
タを同時に転送できるようなアドレスの生成方法が必要
とされる。
For example, as shown in FIG. 7, a microprocessor 11 and a data bus 1 for the microprocessor 11 are provided.
2. External memory 1 connected via address bus 13
4 and the peripheral microprocessor 15 and the like, in the case where the data of the bit smaller than 1/2 times the bit width of the data bus 12 is continuously present,
Transferring those data at the same time improves the efficiency of the data bus 12 and contributes to improving the system performance. Therefore, there is a need for an address generation method capable of simultaneously transferring data of bits smaller than the bit width of the data bus 12.

【0003】[0003]

【従来の技術】マイクロプロセッサ11によるアドレス
生成方法としては、従来は例えば図8(A)に模式的に
示す如く、基準となるアドレス(以下、「ベースアドレ
ス」という)Asと、1つ前に出力されたアドレスから
の距離(これはデータ数の整数倍でその単位を表わし、
以下、「ストライド」という)とに基づいて、(ストラ
イド)×(データ単位)でアドレスをインクリメントし
て生成する方法が知られている。
2. Description of the Related Art Conventionally, as a method of generating an address by a microprocessor 11, as shown schematically in FIG. 8A, a reference address (hereinafter referred to as "base address") As and one before Distance from the output address (This is an integer multiple of the number of data, and its unit is
Hereinafter, a method for generating an address by incrementing it by (stride) × (data unit) based on “(stride)” is known.

【0004】従って、この方法によれば、例えば、デー
タが64ビットでストライドが“1”のときには、出力
するアドレスは前に出力したアドレスに8バイト分のア
ドレスを加算した値となる。
Therefore, according to this method, for example, when the data is 64 bits and the stride is "1", the address to be output is the value obtained by adding the address of 8 bytes to the address previously output.

【0005】[0005]

【発明が解決しようとする課題】しかし、データが図8
(B)に模式的に示す如く、ストライドが“1”又は
“−1”でデータが連続して存在している場合であっ
て、データ長が64ビット幅のデータバスの1/2倍の
32ビットの場合には、データを転送する時は2つのデ
ータを同時に(即ち64ビットにして)転送した方がデ
ータバス転送効率が良いにも拘らず、従来方法のように
1つ前に出力したアドレスに(ストライド値)×(1つ
前に出力したデータアドレス)を単に加算したものをア
ドレスとして生成したのでは2つのデータの同時転送が
できず、バス転送効率を向上できないという問題があ
る。また、アドレス生成の自由度が低いという問題もあ
る。
However, the data is shown in FIG.
As schematically shown in (B), in the case where the stride is "1" or "-1" and data is continuously present, the data length is 1/2 times that of the 64-bit data bus. In the case of 32 bits, when transferring data, it is better to transfer two data at the same time (that is, to make 64 bits), but the data bus transfer efficiency is better, but the previous one is output as in the conventional method. There is a problem that two addresses cannot be transferred simultaneously and the bus transfer efficiency cannot be improved if an address is created by simply adding (stride value) x (data address output one before) to the address. .. There is also a problem that the degree of freedom in address generation is low.

【0006】本発明は上記の点に鑑みなされたもので、
複数のデータの同時転送が可能なアドレス生成方法を提
供することを目的とする。
The present invention has been made in view of the above points,
An object of the present invention is to provide an address generation method capable of simultaneously transferring a plurality of data.

【0007】[0007]

【課題を解決するための手段】本発明のアドレス生成方
法は、ビット幅Nのデータバスにビット数がN/m(た
だし、mは2以上の整数)で、ストライド値が1又は−
1の連続するデータをm個ずつ同時に転送するためのア
ドレス生成方法であって、ベースアドレスがm個のデー
タの下位側アドレスと上位側アドレスのどちらから始ま
っているかを判定すると共に、前記ストライド値の値を
判定し、ベースアドレス及びストライド値の判定結果に
基づき、m個又はm−1個のデータを転送する出力アド
レスをまず生成し、以後前回の転送データの個数に応じ
てストライド値とN又はN/mを乗じた値を前回の出力
アドレスに加算した値を新たな出力アドレスとして生成
する。
According to the address generating method of the present invention, the number of bits is N / m (where m is an integer of 2 or more) in the data bus having the bit width N, and the stride value is 1 or-.
An address generation method for simultaneously transferring m consecutive 1's of data, determining whether the base address starts from a lower address or an upper address of m's of data and determining the stride value. Value is determined, and an output address for transferring m or m-1 data is first generated based on the determination result of the base address and the stride value, and thereafter the stride value and N are transferred according to the number of the previous transfer data. Alternatively, a value obtained by adding a value obtained by multiplying N / m to the previous output address is generated as a new output address.

【0008】[0008]

【作用】本発明方法では、ベースアドレスが転送するm
個のデータの上位側アドレスか下位側アドレスのどちら
かから始まるかに応じて、かつ、ストライド値に応じて
最適なアドレスを生成できる。しかも、本発明方法はス
トライド値が“1”の場合だけでなく、“−1”の場合
のアドレスを生成することができる。
In the method of the present invention, the base address transfers m
An optimum address can be generated depending on whether the upper side address or the lower side address of each piece of data starts and the stride value. Moreover, the method of the present invention can generate an address not only when the stride value is "1" but also when the stride value is "-1".

【0009】[0009]

【実施例】図1は本発明方法の一実施例の動作説明用フ
ローチャートを示す。本実施例は図7において示したシ
ステムにおいてマイクロプロセッサ11により生成され
るアドレスの生成方法に関し、図2に示す如く、ビット
幅64ビットのデータバス(図7の12)に、ビット数
が64ビットのデータを1個、又はビット数が32ビッ
トのデータを2個同時に又は1個転送するためのアドレ
ス生成方法である。図1において、まずマイクロプロセ
ッサは32ビットデータのアクセスか否か判定し(ステ
ップ101)、32ビットデータのアクセスのときには
ストライド値を判定する(ステップ102)。ストライ
ド値には“1”と“−1”とそれ以外の値がある。
1 is a flow chart for explaining the operation of an embodiment of the method of the present invention. The present embodiment relates to a method of generating an address generated by the microprocessor 11 in the system shown in FIG. 7, and as shown in FIG. 2, a data bus having a bit width of 64 bits (12 in FIG. 7) has 64 bits. Is an address generation method for transferring one piece of data or two pieces of data having a bit number of 32 bits at the same time or one piece. In FIG. 1, first, the microprocessor determines whether or not 32-bit data is accessed (step 101), and when the 32-bit data is accessed, the stride value is determined (step 102). The stride value includes "1", "-1" and other values.

【0010】そこで、まず、ステップ102でストライ
ド値が“1”と判定された場合のアドレス生成方法につ
いて図1及び図3と共に説明する。この場合はベースア
ドレスが上位側から始まっているか否か判定され(ステ
ップ103)。上位側から始まっているときには、図3
(A)にAB1で模式的に示す如く第1番目の出力アドレ
スをベースアドレスとして64ビットのデータ転送(す
なわち、四角数字の1と2で示す最初の2個の32ビッ
トデータの同時転送)を行なう(ステップ104)。
Therefore, first, an address generating method when the stride value is determined to be "1" in step 102 will be described with reference to FIGS. In this case, it is judged whether or not the base address starts from the upper side (step 103). When starting from the upper side,
64-bit data transfer using the first output address as the base address, as schematically shown by A B1 in (A) (that is, simultaneous transfer of the first two 32-bit data indicated by square numbers 1 and 2). Is performed (step 104).

【0011】続いて、データ個数のカウンタを“2”デ
クリメントする(ステップ105)。このデータ個数の
カウンタは予め転送すべき総データ数がセットされてお
り、ステップ104で2個のデータ転送が行なわれたの
で、ステップ105で“2”デクリメントするのであ
る。
Then, the data number counter is decremented by "2" (step 105). The total number of data to be transferred is set in advance in the counter for the number of data, and since two data have been transferred in step 104, they are decremented by "2" in step 105.

【0012】次に、ストライド値“1”に転送データ幅
である64ビット(データ長×カウンタのデクリメント
値)を乗じた値を上記のベースアドレスに加算して出力
アドレスを生成する(ステップ106)。続いて、デー
タ個数のカウンタが示す残りの転送データ数が“2”よ
り小であるか否か判定し(ステップ107)、“2”以
上のときにはステップ106で生成したアドレスに基づ
いて64ビット分のデータ転送が行なわれた後(ステッ
プ108)、データ個数カウンタの値を“2”デクリメ
ントすると共に、ベースアドレスを現在の出力アドレス
に更新する(ステップ109)。
Next, a value obtained by multiplying the stride value "1" by the transfer data width of 64 bits (data length x counter decrement value) is added to the above base address to generate an output address (step 106). .. Subsequently, it is determined whether or not the remaining transfer data number indicated by the data number counter is smaller than "2" (step 107). When it is "2" or more, 64 bits worth is obtained based on the address generated in step 106. After the data is transferred (step 108), the value of the data number counter is decremented by "2" and the base address is updated to the current output address (step 109).

【0013】続いて、データ個数のカウンタの値が
“0”か否か判定し(ステップ110)、“0”でない
ときには再びステップ106に戻り、ベースアドレス
に、ストライド値“1”と64ビットとを乗じた値を加
算して出力アドレスを生成する。以下、上記と同様にし
てステップ106〜110により前回の出力アドレス
(ここでは更新されたベースアドレス)に64ビットを
加算した値が新たな出力アドレスとして生成され、図3
(A)に丸数字に示す順番で、32ビットのデータは2
個ずつ転送されていく。
Then, it is judged whether or not the value of the data number counter is "0" (step 110), and when it is not "0", the process returns to step 106 again, and the stride value "1" and 64 bits are set to the base address. A value multiplied by is added to generate an output address. Thereafter, in the same manner as above, in steps 106 to 110, a value obtained by adding 64 bits to the previous output address (here, the updated base address) is generated as a new output address.
In the order shown by circled numbers in (A), 32-bit data is 2
It is transferred one by one.

【0014】そして、残りのデータ数が1個になった場
合は、ステップ107から111へ進んでステップ10
6で生成した出力アドレスで11番目の32ビットのデ
ータ転送を行なう。ステップ110でデータ個数が
“0”と判定されたとき、又はステップ111で32ビ
ットのデータ転送が行なわれると、アドレス生成処理が
終了となる(ステップ112)。
When the number of remaining data becomes one, the process proceeds from step 107 to step 111 and step 10
The 11th 32-bit data transfer is performed with the output address generated in 6. When it is determined in step 110 that the number of data is "0", or when 32-bit data is transferred in step 111, the address generation process ends (step 112).

【0015】次にストライド値が“1”であるが、ステ
ップ103でベースアドレスが下位側から始まっている
と判定された場合のアドレス生成方法について図1及び
図3(B)と共に説明する。この場合は図3(B)に模
式的に示す如く第1番目の出力アドレスをベースアドレ
スAB2としてまず1番目の32ビットのデータ転送を行
なう(ステップ113)。
Next, a method for generating an address when the stride value is "1" but it is determined in step 103 that the base address starts from the lower side will be described with reference to FIGS. 1 and 3B. In this case, as shown schematically in FIG. 3B, the first output address is used as the base address A B2 , and the first 32-bit data transfer is performed (step 113).

【0016】続いて、データ個数カウンタを“1”デク
リメントした後(ステップ114)、データ長(ここで
は32ビット)と上記デクリメント値“1”との乗算値
である転送データ幅32ビットとストライド値“1”と
を乗算し、その乗算結果32ビットを上記ベースアドレ
スAB2に加算して第2番目の出力アドレスとして生成す
る(ステップ115)。
Then, after decrementing the data number counter by "1" (step 114), a transfer data width of 32 bits and a stride value which are multiplication values of the data length (here 32 bits) and the decrement value "1". Multiply "1" and add 32 bits of the multiplication result to the base address A B2 to generate a second output address (step 115).

【0017】しかる後に、前記したステップ107〜1
11,106の処理が実行され、残りのデータ個数が2
個以上のときには32ビットのデータは2個ずつ転送さ
れ、また出力アドレスは前回の出力アドレスに64ビッ
トを加算した値を新たな出力アドレスとして生成され
る。これにより、図3(B)に示したデータは丸数字で
示す順番で転送されていく。
After that, the above-mentioned steps 107 to 1 are carried out.
The processing of 11 and 106 is executed, and the remaining number of data is 2
When the number is 32 or more, two pieces of 32-bit data are transferred two by two, and the output address is generated by adding a value of 64 bits to the previous output address as a new output address. As a result, the data shown in FIG. 3B is transferred in the order shown by the circled numbers.

【0018】次にステップ102でストライド値が“−
1”と判定され、ステップ116でベースアドレスが下
位側から始まっていると判定された場合のアドレス生成
方法について、図1及び図4(A)と共に説明する。こ
の場合は第1番目の出力アドレスはベースアドレスでは
なく、ベースアドレスから32ビットの上位側アドレス
を示す、図4(A)のAB3のアドレスとされ、このアド
レスAB3に基づき1番目と2番目の32ビットデータ2
個の転送が行なわれる(ステップ117)。
Next, at step 102, the stride value is "-
1 ", and the address generation method when it is determined in step 116 that the base address starts from the lower side will be described with reference to FIGS. 1 and 4A. In this case, the first output address Is not the base address but an address of A B3 in FIG. 4 (A) indicating a higher-order address of 32 bits from the base address. Based on this address A B3 , the first and second 32-bit data 2
Transfer is performed (step 117).

【0019】続いて、データ個数カウンタを“2”デク
リメントした後(ステップ118)、上記の第1の出力
アドレスAB3をベースアドレスとして更新し(ステップ
119)、データ個数カウンタの値が“2”未満である
か否か判定する(ステップ120)。データ個数カウン
タの値が“2”以上のときにはストライド値“−1”と
転送データ幅(64ビット)との乗算値を、更新したベ
ースアドレスに加算して出力アドレスを生成する(ステ
ップ121)。
Subsequently, after decrementing the data number counter by "2" (step 118), the first output address A B3 is updated as a base address (step 119), and the value of the data number counter is "2". It is determined whether or not it is less than (step 120). When the value of the data number counter is "2" or more, the product value of the stride value "-1" and the transfer data width (64 bits) is added to the updated base address to generate the output address (step 121).

【0020】すなわち、ステップ121では前回の出力
アドレスから64ビットを減算した値を新たな出力アド
レスとして生成する。この新たな出力アドレスに基づい
て32ビットデータ2個が転送されると共に、データ個
数カウンタが“2”デクリメントされた後(ステップ1
22)、データ個数カウンタが“0”であるか否か判定
される(ステップ123)。
That is, in step 121, a value obtained by subtracting 64 bits from the previous output address is generated as a new output address. Two pieces of 32-bit data are transferred based on this new output address, and the data number counter is decremented by "2" (step 1
22), it is determined whether or not the data number counter is "0" (step 123).

【0021】まだ、残りの転送データがあるときは、上
記のステップ119〜123により上位側のデータの先
頭バイトアドレスが出力アドレスとして生成されて32
ビットのデータが2個ずつ転送されていく。また残りの
転送データが1個となったときには、ステップ120か
らステップ124へ進み、ストライド値“−1”に1つ
のデータ長32ビットを乗じた値を前回の出力アドレス
(ベースアドレス)に加算した値を新たな出力アドレス
として生成する。そして、この出力アドレスに基づいて
図4(A)に示す如く7番目の32ビットの下位側デー
タの転送が行なわれる(ステップ125)。ステップ1
23又は125の処理後アドレス生成処理が終了となる
(ステップ126)。
When there is still the remaining transfer data, the first byte address of the higher-order data is generated as the output address by the above steps 119 to 123 and 32
Bit data is transferred two by two. When the remaining transfer data is one, the process proceeds from step 120 to step 124, and the value obtained by multiplying the stride value "-1" by one data length 32 bits is added to the previous output address (base address). Generate a value as a new output address. Then, based on this output address, the seventh 32-bit lower data is transferred as shown in FIG. 4A (step 125). Step 1
After the processing of 23 or 125, the address generation processing ends (step 126).

【0022】次に、ステップ102でストライド値が
“−1”と判定され、ステップ116でベースアドレス
が上位側から始まっていると判定された場合のアドレス
生成方法について、図1及び図4(B)と共に説明す
る。この場合は、第1番目の出力アドレスは図4(B)
にAB4で模式的に示すベースアドレスとして生成され、
1番目の32ビットのデータの転送を行なわせる(ステ
ップ127)。続いて、データ個数カウンタを“1”デ
クリメントした後(ステップ128)、ステップ119
以後の処理を行なう。
Next, the address generation method in the case where the stride value is determined to be "-1" in step 102 and the base address is determined to start from the upper side in step 116 will be described with reference to FIGS. ) Together. In this case, the first output address is shown in FIG.
Is generated as a base address schematically shown by A B4 in
The first 32-bit data is transferred (step 127). Then, after decrementing the data number counter by "1" (step 128), step 119
The subsequent processing is performed.

【0023】従って、前記したように以後は図4(B)
に模式的に示すように上位側のデータの先頭バイトアド
レスが出力アドレスとして生成されて丸数字に示す順番
で32ビットのデータが2個ずつ転送されていく。
Therefore, as described above, FIG.
As shown schematically, the leading byte address of the data on the upper side is generated as an output address, and two pieces of 32-bit data are transferred in the order shown by the circled numbers.

【0024】なお、ステップ101で32ビットアクセ
スでないと判定されたとき、又はステップ102でスト
ライド値が“1”及び“−1”のいずれでもないと判定
されたときには、出力アドレスは従来と同様に、前回の
出力アドレスに、(ストライド値)×(転送データ幅)
の乗算値を加算した値が今回の出力アドレスとして生成
される(ステップ129)。
If it is determined in step 101 that the access is not a 32-bit access, or if it is determined in step 102 that the stride value is neither "1" nor "-1", the output address is the same as the conventional one. , (Stride value) × (transfer data width) at the previous output address
A value obtained by adding the multiplication value of is generated as the current output address (step 129).

【0025】このようにして、本実施例によれば、32
ビットデータを2個ずつ同時に64ビット幅のデータバ
スにより転送することができるため、バス転送効率を従
来に比し向上でき、また、データ転送順はアドレスが大
なる方から小なる方へも行なうことができるため、メモ
リなどの使用の自由度を大幅に増すことができる。
Thus, according to this embodiment, 32
Since two bit data can be simultaneously transferred by the 64-bit width data bus, the bus transfer efficiency can be improved as compared with the conventional one, and the data transfer order is from the largest address to the smallest address. Therefore, it is possible to significantly increase the degree of freedom in using the memory and the like.

【0026】なお、ステップ103〜128の32ビッ
ト転送処理を、図5に示す回路によって行なうこともで
きる。同図中、比較器41はストライド値が“1”か否
か比較し、“1”のときのみ論理「1」の信号を出力す
る。比較器42はストライド値が“−1”か否か比較
し、“−1”のときのみ論理「1」の信号を出力する。
OR回路43は比較器41及び42のうち、どちらか一
方から論理“1”の信号が出力されたときのみ、連続す
るデータであると判断して論理「1」を出力する。
The 32-bit transfer process of steps 103 to 128 can be performed by the circuit shown in FIG. In the figure, the comparator 41 compares the stride value with "1" and outputs a signal of logic "1" only when the stride value is "1". The comparator 42 compares whether or not the stride value is "-1", and outputs a signal of logic "1" only when the stride value is "-1".
The OR circuit 43 determines that the data is continuous and outputs a logic "1" only when one of the comparators 41 and 42 outputs a signal of logic "1".

【0027】比較器44はデータ長が32ビットか否か
比較し、32ビットのときのみ論理「1」を出力する。
AND回路45はOR回路43及び比較器44の出力が
共に「1」であるときのみ、すなわち32ビットのデー
タがストライド値“1”又は“−1”で連続して存在し
ているときのみ論理「1」をデクリメント制御回路46
へ出力する。
The comparator 44 compares whether the data length is 32 bits or not, and outputs a logic "1" only when the data length is 32 bits.
The AND circuit 45 is logical only when the outputs of the OR circuit 43 and the comparator 44 are both "1", that is, when the 32-bit data continuously exists with the stride value "1" or "-1". Decrement control circuit 46
Output to.

【0028】一方、比較器47はベースアドレスの下位
3ビットが“000”であるか否かを比較して、ベース
アドレスが上位側データのアドレスであるか否かの判定
結果をデクリメント制御回路46へ出力する。また、加
算回路48はベースアドレス49とデクリメント制御回
路46により制御されるアドレスストライド50とを加
算して出力アドレス51を生成し、それをベースアドレ
ス49として更新させる。
On the other hand, the comparator 47 compares whether or not the lower 3 bits of the base address are "000" and determines whether or not the base address is the address of the upper data by the decrement control circuit 46. Output to. Further, the adder circuit 48 adds the base address 49 and the address stride 50 controlled by the decrement control circuit 46 to generate an output address 51, which is updated as the base address 49.

【0029】また、デクリメント制御回路46はデータ
転送が行なわれる毎に、残りのデータ個数を比較器52
へ出力し、ここでデータ個数が“1”であるか否か比較
させる。比較器52は残りデータ個数が“1”のときに
所定論理値をデクリメント制御回路46へ出力する。デ
クリメント制御回路46は残りデータ個数が“1”のと
きはアドレスストライド50を32ビットとする。
Also, the decrement control circuit 46 compares the remaining number of data with the comparator 52 every time data is transferred.
And the data count is compared here. The comparator 52 outputs a predetermined logical value to the decrement control circuit 46 when the number of remaining data is "1". The decrement control circuit 46 sets the address stride 50 to 32 bits when the number of remaining data is "1".

【0030】また、図1のステップ129によるアドレ
ス生成は、図6の回路によっても実現できる。図6にお
いて、加算回路61はベースアドレス62に、ストライ
ド値とデータ長との乗算結果63を加算し、その加算結
果を出力アドレス64として生成する。この出力アドレ
ス64はベースアドレス62に更新され、以後上記と同
様の動作が繰り返される。第1番目の出力アドレス64
はベースアドレス62が出力アドレスとされる。
The address generation in step 129 of FIG. 1 can also be realized by the circuit of FIG. In FIG. 6, the adder circuit 61 adds the multiplication result 63 of the stride value and the data length to the base address 62 and generates the addition result as the output address 64. The output address 64 is updated to the base address 62, and the same operation as described above is repeated thereafter. First output address 64
The base address 62 is used as the output address.

【0031】[0031]

【発明の効果】上述の如く、本発明によれば、ベースア
ドレスが上位側か否かの判定結果とストライド値に応じ
て最適なアドレスを生成できるため、データバスのビッ
ト幅Nの1/m倍のビット数の連続するデータを、m個
ずつデータ転送させることができ、よってバス転送効率
を向上させることができ、またストライド値が“−1”
の場合にもアドレスを生成することができるため、メモ
リの領域の使用の自由度を従来に比し大幅に増すことが
できる等の特長を有するものである。
As described above, according to the present invention, an optimum address can be generated according to the result of determination whether the base address is on the upper side and the stride value. Therefore, the bit width N of the data bus is 1 / m. It is possible to transfer continuous data of double the number of bits by m, thus improving bus transfer efficiency, and stride value of "-1".
In this case, the address can be generated, so that the degree of freedom in using the memory area can be greatly increased as compared with the conventional one.

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

【図1】本発明の一実施例の動作説明用タイムチャート
である。
FIG. 1 is a time chart for explaining the operation of an embodiment of the present invention.

【図2】本発明方法の一実施例におけるデータサイズと
転送データ個数を示す図である。
FIG. 2 is a diagram showing the data size and the number of transfer data in one embodiment of the method of the present invention.

【図3】本発明の一実施例の要部の動作説明図である。FIG. 3 is an operation explanatory diagram of a main part of the embodiment of the present invention.

【図4】本発明の一実施例の他の要部の動作説明図であ
る。
FIG. 4 is an operation explanatory diagram of another main part of the embodiment of the present invention.

【図5】本発明の一実施例の要部を実現する回路図であ
る。
FIG. 5 is a circuit diagram that realizes a main part of one embodiment of the present invention.

【図6】ストライド付アドレス生成回路の一例のブロッ
ク図である。
FIG. 6 is a block diagram of an example of an address generation circuit with stride.

【図7】本発明が適用されるシステムの構成図である。FIG. 7 is a configuration diagram of a system to which the present invention is applied.

【図8】従来方法の一例の説明図である。FIG. 8 is an explanatory diagram of an example of a conventional method.

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

11 マイクロプロセッサ 12 データバス 102 ストライド値判定ステップ 103,116 ベースアドレスの位置判定ステップ 106,115,121,124 出力アドレス生成ス
テップ
11 Microprocessor 12 Data Bus 102 Stride Value Determination Step 103,116 Base Address Position Determination Step 106,115,121,124 Output Address Generation Step

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ビット幅Nのデータバス(12)にビッ
ト数がN/m(ただし、mは2以上の整数)で、ストラ
イド値が1又は−1の連続するデータをm個ずつ同時に
転送するためのアドレス生成方法であって、 ベースアドレスがm個のデータの下位側アドレスと上位
側アドレスのどちらから始まっているかを判定すると共
に、前記ストライド値の値を判定し、 該ベースアドレス及びストライド値の判定結果に基づ
き、m個又はm−1個のデータを転送する出力アドレス
をまず生成し、以後前回の転送データの個数に応じてス
トライド値とN又はN/mを乗じた値を前回の出力アド
レスに加算した値を新たな出力アドレスとして生成する
ことを特徴とするアドレス生成方法。
1. Continuous data having a bit number of N / m (where m is an integer of 2 or more) and a stride value of 1 or -1 are simultaneously transferred to the data bus (12) having a bit width N by m. An address generating method for determining whether the base address starts from a lower address or an upper address of m pieces of data, determines a value of the stride value, and determines the base address and the stride. An output address for transferring m or m-1 data is first generated based on the value determination result, and the value obtained by multiplying the stride value by N or N / m according to the number of the previous transfer data is the previous value. An address generation method characterized in that a value added to the output address of is generated as a new output address.
【請求項2】 前記データはビット数がN/2でストラ
イド値が1であり、 前記ベースアドレスが2個のデータの上位側アドレスか
ら始まっているときは、 第1番目の出力アドレスとして該ベースアドレスを出力
して2個のデータを同時に転送させ、以後前回の出力ア
ドレスにNビットを加算した値を新たな出力アドレスと
して生成することを特徴とする請求項1記載のアドレス
生成方法。
2. When the number of bits of the data is N / 2 and the stride value is 1, and when the base address starts from the upper address of the two data, the base is used as the first output address. 2. The address generating method according to claim 1, wherein the address is output and two pieces of data are transferred at the same time, and a value obtained by adding N bits to the previous output address is generated as a new output address.
【請求項3】 前記データはビット数がN/2でストラ
イド値が1であり、 前記ベースアドレスが2個のデータの下位側アドレスか
ら始まっているときは、 第1番目の出力アドレスとして該ベースアドレスを出力
して1個のデータを転送させ、続いて第2番目の出力ア
ドレスとして該第1番目の出力アドレスにN/2ビット
を加算した値を生成し、以後前回の出力アドレスにNビ
ットを加算した値を新たな出力アドレスとして生成する
ことを特徴とする請求項1記載のアドレス生成方法。
3. The data has a bit number of N / 2 and a stride value of 1, and when the base address starts from a lower address of two data, the base is used as a first output address. The address is output to transfer one data, and then a value obtained by adding N / 2 bits to the first output address is generated as the second output address, and thereafter, N bits are added to the previous output address. 2. The address generation method according to claim 1, wherein a value obtained by adding is generated as a new output address.
【請求項4】 前記データはビット数がN/2でストラ
イド値が−1であり、前記ベースアドレスが2個のデー
タの上位側のアドレスから始まっているときは、第1番
目の出力アドレスとして該ベースアドレスを出力して1
個のデータを転送させ、以後前回の出力アドレスにNビ
ットを減算した値を新たな出力アドレスとして生成する
ことを特徴とする請求項1記載のアドレス生成方法。
4. When the number of bits of the data is N / 2 and the stride value is −1, and the base address starts from the upper address of the two data, it is regarded as the first output address. Output the base address and output 1
2. The address generation method according to claim 1, wherein the data is transferred, and thereafter, a value obtained by subtracting N bits from the previous output address is generated as a new output address.
【請求項5】 前記データはビット数がN/2でストラ
イド値が−1であり、前記ベースアドレスが2個のデー
タの下位側のアドレスから始まっているときは、第1番
目の出力アドレスとして該ベースアドレスからN/2ビ
ット減算した値を生成して2個のデータ転送を行なわ
せ、以後は前回の出力アドレスにNビットを減算した値
を新たな出力アドレスとして生成することを特徴とする
請求項1記載のアドレス生成方法。
5. When the number of bits of the data is N / 2 and the stride value is −1, and the base address starts from the lower address of the two data, it is regarded as the first output address. It is characterized in that a value obtained by subtracting N / 2 bits from the base address is generated to transfer two pieces of data, and thereafter, a value obtained by subtracting N bits from the previous output address is generated as a new output address. The address generation method according to claim 1.
JP1706992A 1992-01-29 1992-01-31 Address generating method Pending JPH05210573A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP1706992A JPH05210573A (en) 1992-01-31 1992-01-31 Address generating method
US08/705,562 US5809552A (en) 1992-01-29 1996-08-29 Data processing system, memory access device and method including selecting the number of pipeline stages based on pipeline conditions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1706992A JPH05210573A (en) 1992-01-31 1992-01-31 Address generating method

Publications (1)

Publication Number Publication Date
JPH05210573A true JPH05210573A (en) 1993-08-20

Family

ID=11933701

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1706992A Pending JPH05210573A (en) 1992-01-29 1992-01-31 Address generating method

Country Status (1)

Country Link
JP (1) JPH05210573A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56166551A (en) * 1980-05-26 1981-12-21 Toshiba Corp Operation control
JPS5856164A (en) * 1981-09-30 1983-04-02 Toshiba Corp Data processor
JPS61214028A (en) * 1985-03-20 1986-09-22 Hitachi Ltd Microprogram controlled computer
JPS63225837A (en) * 1987-03-13 1988-09-20 Fujitsu Ltd Vector access method with distance
JPS6482236A (en) * 1987-09-25 1989-03-28 Casio Computer Co Ltd Variable length data transfer device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56166551A (en) * 1980-05-26 1981-12-21 Toshiba Corp Operation control
JPS5856164A (en) * 1981-09-30 1983-04-02 Toshiba Corp Data processor
JPS61214028A (en) * 1985-03-20 1986-09-22 Hitachi Ltd Microprogram controlled computer
JPS63225837A (en) * 1987-03-13 1988-09-20 Fujitsu Ltd Vector access method with distance
JPS6482236A (en) * 1987-09-25 1989-03-28 Casio Computer Co Ltd Variable length data transfer device

Similar Documents

Publication Publication Date Title
US6369725B1 (en) Method for binary to decimal conversion
JP2000056946A (en) Digital accumulator and method for high speed digital accumulation
US6049858A (en) Modulo address generator with precomputed comparison and correction terms
JPS6132437Y2 (en)
US20020156990A1 (en) Modulus address generator and method for determining a modulus address
US5144577A (en) Two-sum comparator
US4754422A (en) Dividing apparatus
JPH05210573A (en) Address generating method
JPH04233629A (en) Prefetching adder
US6415311B1 (en) Sign extension circuit and method for unsigned multiplication and accumulation
JPH0981541A (en) Accumulator
US20030126177A1 (en) Arithmetic unit and method thereof
JP2907276B2 (en) Arithmetic processing unit
JP3107930B2 (en) Data memory device
WO1996027839A1 (en) Computational array circuit for providing parallel multiplication
JP3206863B2 (en) Code conversion method and code converter
JPH0580978A (en) Arithmetic processing circuit
JP3261742B2 (en) Redundant binary / binary conversion circuit including rounding processing
JP3210356B2 (en) Data zero judgment device
JP3265856B2 (en) DMA transfer device
JPS59197920A (en) Address controlling device
JP3078696B2 (en) Reciprocal arithmetic unit
JPS62196918A (en) Waveform generator
JP2599984B2 (en) Input data peak value detection circuit
JPH10307710A (en) Remainder arithmetic method and apparatus therefor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980331