JPH0750448B2 - Array subscript converter - Google Patents
Array subscript converterInfo
- Publication number
- JPH0750448B2 JPH0750448B2 JP8028687A JP8028687A JPH0750448B2 JP H0750448 B2 JPH0750448 B2 JP H0750448B2 JP 8028687 A JP8028687 A JP 8028687A JP 8028687 A JP8028687 A JP 8028687A JP H0750448 B2 JPH0750448 B2 JP H0750448B2
- Authority
- JP
- Japan
- Prior art keywords
- register
- value
- output
- multiplication
- maximum value
- 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 - Lifetime
Links
- 238000006243 chemical reaction Methods 0.000 claims description 16
- 238000006073 displacement reaction Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 1
Landscapes
- Devices For Executing Special Programs (AREA)
Description
【発明の詳細な説明】 技術分野 本発明は配列添字変換装置に関し、特に情報処理システ
ムにおいて1次元アドレス構造を持つ記憶空間への多次
元配列の割付けに用いられる配列添字変換装置に関す
る。TECHNICAL FIELD The present invention relates to an array subscript conversion device, and more particularly to an array subscript conversion device used for allocating a multidimensional array to a storage space having a one-dimensional address structure in an information processing system.
従来技術 主記憶を始めとして情報処理システムの多くの記憶領域
は、連続した整数値によってアドレス付けされる1次元
のアドレス構造を持っている。このような1次元アドレ
ス構造を有する記憶空間上には、複数の添字によって要
素が特定される多次元配列はそのままでは割付けること
ができない。2. Description of the Related Art Many storage areas of an information processing system including a main memory have a one-dimensional address structure which is addressed by a continuous integer value. In the storage space having such a one-dimensional address structure, a multidimensional array whose elements are specified by a plurality of subscripts cannot be allocated as it is.
そこで、従来においては、記憶空間上には1次元配列A
(t)を割付けておき、多次元配列M(i1,i2,……,i
n)の添字i1,i2,……,inを入力としてtを出力するよう
な配列添字変換装置を用いて擬似的に多次元配列を実現
することが行われている。この様な配列添字変換装置は
専用のハードウェアとして実現される場合と、ハードウ
ェアとソフトウェアとによって実現される場合とがある
が、ハードウェアとして実現される従来の構成は、第5
図のようなものがある。図において、n個の乗算器81〜
8nと、これ等の乗算出力の加算値を得る加算器9とから
なり、多次元配列の個々の添字i1,i2,……,inに係数k1,
k2,……,knをおのおの乗じ、これらの積をすべて加えた
ものを出力tとするものである。Therefore, conventionally, the one-dimensional array A is stored in the storage space.
(T) is allocated and the multidimensional array M (i1, i2, ..., i
A pseudo multidimensional array is realized by using an array subscript conversion device that inputs the subscripts i1, i2, ..., In of n) and outputs t. Such an array subscript conversion device may be realized as dedicated hardware or may be realized by hardware and software. The conventional configuration realized as hardware is the fifth one.
There is something like the figure. In the figure, n multipliers 81 to
8n and an adder 9 that obtains the added value of these multiplication outputs. The coefficient k1, is added to each subscript i1, i2, ..., In of the multidimensional array.
The output t is obtained by multiplying each of k2, ..., Kn and adding all these products.
ここで、k1,k2,……,knはおのおの添字のとり得る値の
範囲に依存する定数であって、一般にia(a=1,2,…
…,n)が0以上Na以下の整数値をとる場合には、kn=1,
kn-1=Nn+1,kn-2=(Nn-1+1)・(Nn+1),……, である。Here, k1, k2, ..., Kn are constants depending on the range of possible values of the subscripts, and in general, ia (a = 1,2, ...
, N) takes an integer value of 0 or more and Na or less, k n = 1,
k n-1 = N n + 1, k n-2 = (N n-1 +1) ・ (N n +1), ..., Is.
上述した従来の配列添字変換装置では、変換に当って添
字のとり得る値の範囲に依存する定数を係数として使用
しているために、n個の添字によって要素が特定される
多次元配列(以下、n次元配列と記す)から1次元配列
への添字変換の際には、少なくともn−1個の添字のと
り得る値の最大値が確立していなければならないという
欠点がある。In the above-mentioned conventional array subscript conversion apparatus, since a constant that depends on the range of values that the subscript can take is used as a coefficient in the conversion, a multidimensional array whose elements are specified by n subscripts (hereinafter , N-dimensional array) to a one-dimensional array, there is a drawback in that the maximum value of at least n-1 subscripts must be established.
また、添字のとり得る値の範囲を拡大すると、それにと
もなって配列添字変換装置の出力が変化するために、配
列の個々の要素の記憶空間上での割付け位置を移動しな
ければならないという欠点がある。Further, when the range of values that can be taken by the subscript is expanded, the output of the array subscript conversion device changes accordingly, so that there is a drawback that the allocation position in the storage space of each element of the array must be moved. is there.
発明の目的 本発明の目的は、添字のとり得る値が確立していなくて
も、また添字のとり得る値の範囲がいかに拡大されても
容易に1次元配列への割付けが可能な配列添字変換装置
を提供することである。Object of the Invention An object of the present invention is to perform array subscript conversion that can be easily assigned to a one-dimensional array, regardless of whether the values that subscripts can take are established or how the range of values that subscripts can take is expanded. It is to provide a device.
発明の構成 本発明によれば、記憶空間上に割付けられた1次元配列
状領域を、0を含む整数を値として有する複数の添字に
よって要素が特定される多次元配列として使用する際に
おける多次元配列から1次元配列への配列添字変換装置
であって、前記多次元配列の要素を特定する全ての添字
の値のうち最大値を出力する最大値選択手段と、前記添
字の各々を直列に出力する直列化手段と、前記最大値を
初期値とする第1レジスタと、前記最大値と前記直列化
手段の出力とが等しくないときのみ前記第1レジスタの
内容と前記最大値との乗算値を得てこれをこの第1レジ
スタの新しい内容とする第1乗算手段と、0を初期値と
する第2レジスタと、前記第2レジスタの内容と前記最
大値との乗算値を得る第2乗算手段と、前記最大値と前
記直列化手段の出力とが等しいときには前記第1レジス
タの内容と前記第2乗算手段の乗算値と更には前記第2
レジスタの内容とを加算し、また前記最大値と前記直列
化手段の出力とが等しくないときには前記第2乗算手段
の乗算値と前記第2レジスタの内容とを加算してこれを
前記第2レジスタの新しい内容とする第1加算手段と、
0を初期値とする第3レジスタと、前記第3レジスタの
内容と前記最大値との乗算値を得る第3乗算手段と、前
記最大値と前記直列化手段の出力とが等しくないときの
み前記第3乗算手段の乗算値と前記直列化手段の出力と
の加算値を得てこれを前記第3レジスタの新しい内容と
する第2加算手段と、前記直列化手段から全ての添字の
値が出力された後に前記第2及び第3レジスタの保持内
容を加算して装置出力とする手段とを含むことを特徴と
する配列添字変換装置が得られる。According to the present invention, a one-dimensional array area allocated in a storage space is used as a multidimensional array in which elements are specified by a plurality of subscripts each having an integer including 0 as a value. An array subscript conversion device for converting an array into a one-dimensional array, wherein maximum value selection means for outputting the maximum value of all subscript values that specify elements of the multidimensional array, and each of the subscripts are output in series. Serializing means, a first register having the maximum value as an initial value, and a multiplication value of the content of the first register and the maximum value only when the maximum value and the output of the serializing means are not equal. A first multiplication means for obtaining the new contents of the first register, a second register having an initial value of 0, and a second multiplication means for obtaining a multiplication value of the contents of the second register and the maximum value. And the maximum value and the series When the output of the converting means is equal, the contents of the first register, the multiplication value of the second multiplying means, and further the second value.
The contents of the register are added, and when the maximum value and the output of the serialization means are not equal, the multiplication value of the second multiplication means and the contents of the second register are added and the result is added to the second register. A first addition means that is a new content of
The third register having 0 as an initial value, the third multiplication means for obtaining a multiplication value of the content of the third register and the maximum value, and the third value only when the maximum value and the output of the serialization means are not equal to each other. The second addition means for obtaining the addition value of the multiplication value of the third multiplication means and the output of the serialization means and making it the new content of the third register, and the values of all the subscripts are output from the serialization means. And a means for adding the contents held in the second and third registers to produce an output of the device.
実施例 以下、図面を用いて本発明の実施例を説明する。Embodiments Embodiments of the present invention will be described below with reference to the drawings.
第1図は本発明の実施例のブロック図である。図におい
て、最大値選択器1はn個の添字i1〜inのうち最大値を
選択する回路であり、直列化器2はこれ等n個の添字i1
〜inを時系列的に直列に出力する回路である。FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, the maximum value selector 1 is a circuit that selects the maximum value from the n subscripts i1 to in, and the serializer 2 has these n subscripts i1 to i1.
It is a circuit that outputs ~ in serially in time series.
3は累乗保持部であり、乗算器31と、累乗レジスタ32
と、スイッチ33とからなる。累乗レジスタ32は初期値と
して最大値選択器1の出力である添字i1〜inのうちの最
大値を予め保持する。乗算器31は最大値選択器1の出力
と累乗レジスタ32の内容とを乗算するものであり、この
乗算値をスイッチ33を介して累乗レジスタ32へ供給す
る。3 is a power holding unit, which is a multiplier 31 and a power register 32.
And a switch 33. The exponentiation register 32 holds in advance the maximum value of the subscripts i1 to in which is the output of the maximum value selector 1 as an initial value. The multiplier 31 multiplies the output of the maximum value selector 1 and the contents of the exponentiation register 32, and supplies this multiplication value to the exponentiation register 32 via the switch 33.
このスイッチ33は最大値選択器1の出力と直列化器2の
出力とが等しいときにはオフとなり、等しくない場合に
はオンとなる様動作する。従って、当該最大値と直列化
器2の出力とが等しいときには累乗レジスタ32の内容は
前の値を保持し続け、逆に等しくないときには乗算器31
の出力である累乗値を新内容として保持することにな
る。The switch 33 operates so that it is turned off when the output of the maximum value selector 1 and the output of the serializer 2 are equal, and is turned on when they are not equal. Therefore, when the maximum value and the output of the serializer 2 are equal, the contents of the exponentiation register 32 keeps the previous value, and when they are not equal to each other, the multiplier 31
The power value that is the output of will be retained as new content.
4はオフセット保持部であり、乗算器41と、加算器42
と、オフセットレジスタ43と、スイッチ44とからなる。
オフセットレジスタ43は「0」を初期値として予め保持
する。乗算器41は最大値選択器1の出力とオフセットレ
ジスタ43との乗算をなし、また加算器42は、この乗算器
41の出力とオフセットレジスタ43の出力との加算を行う
他に、スイッチ44がオンのときに累乗レジスタ32の現在
の保持内容をも加算入力とする。Reference numeral 4 denotes an offset holding unit, which has a multiplier 41 and an adder 42.
And an offset register 43 and a switch 44.
The offset register 43 holds “0” as an initial value in advance. The multiplier 41 multiplies the output of the maximum value selector 1 and the offset register 43, and the adder 42 is the multiplier.
In addition to the addition of the output of 41 and the output of the offset register 43, when the switch 44 is on, the contents currently held in the exponentiation register 32 are also input for addition.
このスイッチ44は最大値選択器1の出力と直列化器2の
出力とが等しいときにオンとなり、逆に等しくないとき
にはオフとなる様動作する。従って、オフセットレジス
タ43は、当該最大値と直列化器2の出力とが等しいとき
には累乗レジスタ44の内容と、乗算器41の乗算出力と、
オフセットレジスタ43の現在内容との3入力加算結果に
よって内容が更新され、逆に等しくないときには乗算器
41の乗算出力とオフセットレジスタ43の現在内容との2
入力加算結果によって内容が更新される。The switch 44 operates so that it is turned on when the output of the maximum value selector 1 and the output of the serializer 2 are equal, and is turned off when they are not equal. Therefore, the offset register 43, when the maximum value and the output of the serializer 2 are equal, the contents of the exponentiation register 44, the multiplication output of the multiplier 41,
The contents are updated by the result of the 3-input addition with the current contents of the offset register 43. Conversely, when they are not equal, the multiplier
2 of the multiplication output of 41 and the current contents of the offset register 43
The contents are updated according to the input addition result.
5はディスプレースメント保持部であり、乗算器51と、
加算器52と、ディスプレースメントレジスタ53と、スイ
ッチ54とからなる。レジスタ53は「0」を初期値として
予め保持する。乗算器51はこのレジスタ53の内容と最大
値選択器1の出力との乗算をなし、加算器52はこの乗算
結果と直列化器2の出力との加算を行う。この加算結果
はスイッチ54を介してレジスタ53の入力となる。5 is a displacement holding unit, which is a multiplier 51,
It includes an adder 52, a displacement register 53, and a switch 54. The register 53 holds “0” as an initial value in advance. The multiplier 51 multiplies the contents of the register 53 and the output of the maximum value selector 1, and the adder 52 adds the multiplication result and the output of the serializer 2. The addition result is input to the register 53 via the switch 54.
このスイッチ54は当該最大値と直列化器2の出力とが等
しくないときにはオフとなり、逆に等しいときにはオン
となる様動作する。従って、ディスプレースメントレジ
スタ53は、当該最大値と直列化器2の出力とが等しくな
いときには加算器52の出力により内容が更新され、逆に
等しいときには前の内容を保持し続けることになる。The switch 54 is turned off when the maximum value and the output of the serializer 2 are not equal, and is turned on when they are equal. Therefore, the contents of the displacement register 53 are updated by the output of the adder 52 when the maximum value and the output of the serializer 2 are not equal, and conversely, the displacement register 53 keeps the previous contents.
加算器6はオフセットレジスタ43とディスプレースメン
トレジスタ53との両内容を加算して装置出力tとするも
のであり、その加算タイミングは全添字i1〜inが直列化
器2により出力されてしまった直後のタイミングとな
る。The adder 6 adds the contents of both the offset register 43 and the displacement register 53 to obtain the device output t, and the addition timing is immediately after all the subscripts i1 to in have been output by the serializer 2. Timing.
スイッチ制御器7は各スイッチ33,44,及び54の上述した
各動作を制御するものであり、最大値選択器1により出
力される最大値と直列化器2から逐次出力される添字i1
〜inの各値とを夫々比較して、その大小関係に応じて上
記の各スイッチ制御を行う。The switch controller 7 controls each of the above-described operations of the switches 33, 44 and 54, and the maximum value output by the maximum value selector 1 and the subscript i1 sequentially output from the serializer 2
Each value of ~ in is compared with each other, and the above switch control is performed according to the magnitude relation.
次に、本実施例の動作についての具体的な説明として、
3次元配列を1次元配列に変換する場合を想定し、3次
元配列の第1,第2及び第3の添字i1,i2,i3(以下、(i
1,i2,i3)と略記する)に対して例えば(5,2,1),(4,
5,5)及び(5,5,5)を夫々与えた場合を例にとって説明
する。Next, as a specific description of the operation of this embodiment,
Assuming the case of converting a three-dimensional array into a one-dimensional array, the first, second and third subscripts i1, i2, i3 (hereinafter, (i
Abbreviated as (1, i2, i3)), for example, (5,2,1), (4,
5, 5) and (5, 5, 5) will be given as examples.
まず第1の例として、(i1,i2,i3)=(5,2,1)とした
場合、最大値選択器1の出力は「5」となる。この値は
変換の開始に当って累乗レジスタ32に初期値として格納
される。また、オフセットレジスタ43及びディスプレー
スメントレジスタ53は共に0クリアされる。First, as a first example, when (i1, i2, i3) = (5,2,1), the output of the maximum value selector 1 is "5". This value is stored in the exponentiation register 32 as an initial value at the start of conversion. Further, both the offset register 43 and the displacement register 53 are cleared to 0.
次に、直列化器2によってi1すなわち「5」が出力され
る。この場合i1の値は最大値選択器1の値と等しいの
で、スイッチ44はオンとなるが、スイッチ33及び54は共
にオフになる。このとき、乗算器41の出力は、オフセッ
トレジスタ43に格納されている値「0」と最大値選択器
1の出力「5」との積が出力され「0」となる。加算器
42の出力は、乗算器41の出力「0」と、オフセットレジ
スタ43に保持されている値「0」と、更には累乗レジス
タ32に保持されている値「5」との3者の和、すなわち
「5」となり、この値が新たにオフセットレジスタ43に
格納される。また、累乗レジスタ32及びディスプレース
メントレジスタ53に保持されている値は変化しない。な
ぜなら、スイッチ33及び54が共にオフとなっているから
である。Then, the serializer 2 outputs i1, that is, "5". In this case, the value of i1 is equal to the value of the maximum value selector 1, so the switch 44 is turned on, but both the switches 33 and 54 are turned off. At this time, the output of the multiplier 41 is "0", which is the product of the value "0" stored in the offset register 43 and the output "5" of the maximum value selector 1. Adder
The output of 42 is the sum of the output “0” of the multiplier 41, the value “0” held in the offset register 43, and the value “5” held in the exponentiation register 32. That is, it becomes “5”, and this value is newly stored in the offset register 43. Also, the values held in the exponentiation register 32 and the displacement register 53 do not change. This is because both the switches 33 and 54 are off.
次に、直列化器2からi2すなわち「2」が出力される。
この場合i2の値は最大値選択器1の出力「5」とは等し
くないので、スイッチ33及び54はオンとなるが、スイッ
チ44はオフとなる。このとき、乗算器31は累乗レジスタ
32に保持されている値「5」と最大値選択器1の出力
「5」との積すなわち「25」を出力する。よって、この
値が累乗レジスタ32に格納される。Next, the serializer 2 outputs i2, that is, "2".
In this case, the value of i2 is not equal to the output "5" of the maximum value selector 1, so that the switches 33 and 54 are turned on, but the switch 44 is turned off. At this time, the multiplier 31 is a power register.
The product of the value "5" held in 32 and the output "5" of the maximum value selector 1, that is, "25" is output. Therefore, this value is stored in the exponentiation register 32.
一方、乗算器41はi1が出力された時と同様に動作し、そ
の出力は「5×5」すなわち「25」となる。また加算器
42の入力は、乗算器41の出力「25」とオフセットレジス
タ43に保持されている値「5」とだけになるので、その
出力は「30」となる。この値が新たにオフセットレジス
タ43に格納される。On the other hand, the multiplier 41 operates in the same manner as when i1 is output, and its output becomes “5 × 5”, that is, “25”. Also adder
Since the input of 42 is only the output "25" of the multiplier 41 and the value "5" held in the offset register 43, the output thereof is "30". This value is newly stored in the offset register 43.
さらに、乗算器51はディスプレースメントレジスタ53に
保持されている値「0」と最大値選択器1の出力「5」
との積すなわち「0」を出力し、加算器52は乗算器51の
出力「0」と直列化器2の出力i2すなわち「2」との和
「2」を出力する。この加算器52の出力である「2」が
ディスプレースメントレジスタ53に格納される。Further, the multiplier 51 outputs the value “0” held in the displacement register 53 and the output “5” of the maximum value selector 1.
And the adder 52 outputs the sum "2" of the output "0" of the multiplier 51 and the output i2 of the serializer 2, ie, "2". The output “2” of the adder 52 is stored in the displacement register 53.
最後にi3すなわち「1」が直列化器2から出力される
と、スイッチ33,44及び54のオンオフの状態はi2が出力
された時と同様になるので、累乗レジスタ32には「25×
5」すなわち「125」が、オフセットレジスタ43には「3
0×5+30」すなわち「180」が、また、ディスプレース
メントレジスタ53には「2×5+1」すなわち「11」が
夫々格納される。その後、加算器6がオフセットレジス
タ43に保持されている値「180」と、ディスプレースメ
ントレジスタ53に保持されている値「11」との和すなわ
ち「191」を本配列添字変換装置の出力tとする。Finally, when i3, that is, "1" is output from the serializer 2, the on / off states of the switches 33, 44 and 54 are the same as when i2 is output, so that the exponentiation register 32 stores "25 ×
5 ”or“ 125 ”is stored in the offset register 43 as“ 3 ”.
“0 × 5 + 30”, that is, “180”, and “2 × 5 + 1”, that is, “11” are stored in the displacement register 53, respectively. Thereafter, the adder 6 adds the value "180" held in the offset register 43 and the value "11" held in the displacement register 53, that is, "191" to the output t of the array subscript conversion apparatus. To do.
以下、第2,第3の入力例においても、各構成要素の動作
は第1の入力例と同様であるので、各レジスタの内容の
変化だけを第2図を参照しつつ示す。Hereinafter, in the second and third input examples, the operation of each component is the same as that in the first input example, and therefore only the change of the contents of each register will be shown with reference to FIG.
第2の入力例(i1,i2,i3)=(4,5,5)では、直列化器
2から個々の添字が出力される毎に、累乗レジスタ32の
内容は「5」を初期値として、「25」,「25」,「25」
となり、オフセットレジスタ43の内容は「0」を初期値
として「0」,「25」,「175」と変化する。また、デ
ィスプレースメントレジスタ53の内容は「0」を初期値
として「4」,「4」,「4」となる。従って、加算器
6の出力tは「179」となる。In the second input example (i1, i2, i3) = (4,5,5), the content of the exponentiation register 32 is set to “5” as an initial value each time each subscript is output from the serializer 2. , "25", "25", "25"
Therefore, the content of the offset register 43 changes to "0", "25", "175" with "0" as an initial value. The contents of the displacement register 53 are "4", "4", and "4" with "0" as the initial value. Therefore, the output t of the adder 6 becomes "179".
第3の入力例(i1,i2,i3)=(5,5,5)では、直列化器
2から個々の添字が出力される毎に、累乗レジスタ32の
内容は初期値「5」のまま最後まで変化せず、オフセッ
トレジスタ43の内容は「0」を初期値として、「5」,
「35」,「215」と変化し、ディスプレースメントレジ
スタ53の内容は初期値「0」のまま最後まで変化しな
い。従って、加算器6の出力tは「215」となる。In the third input example (i1, i2, i3) = (5,5,5), the content of the exponentiation register 32 remains the initial value “5” each time the subscript is output from the serializer 2. The contents of the offset register 43 do not change until the end, and the contents of the offset register 43 are "0" as an initial value,
It changes to "35" and "215", and the content of the displacement register 53 remains the initial value "0" and does not change to the end. Therefore, the output t of the adder 6 becomes "215".
このようにして、本実施例における配列添字変換装置
は、0以上の整数i1,i2,i3の組に対して必ず1つの、か
つ異なったi1,i2,i3の組に対しては異なった出力値tを
生成することができる。In this way, the array subscript conversion apparatus in this embodiment always outputs one for each set of integers i1, i2, i3 of 0 or more and different output for each set of different i1, i2, i3. The value t can be generated.
本実施例によって1次元配列A(t)上に実現された2
次元配列M(i1,i2)及び3次元配列Q(i1,i2,i3)の
個々の要素の割付け位置を第3図及び第4図に示してい
る。2 realized on the one-dimensional array A (t) by this embodiment.
The allocation positions of the individual elements of the dimensional array M (i1, i2) and the three-dimensional array Q (i1, i2, i3) are shown in FIGS. 3 and 4.
なお、本実施例においては、説明の便宜上3次元配列の
場合のみを示したが、最大値選択器1及び直列化器2へ
の入力の個数を変化させるだけで、2次元以上の任意の
多次元配列について同様の効果が得られることは明らか
である。In the present embodiment, for convenience of explanation, only the case of a three-dimensional array is shown, but by changing the number of inputs to the maximum value selector 1 and the serializer 2, an arbitrary number of two or more dimensions can be obtained. It is clear that the same effect can be obtained with the dimensional array.
発明の効果 以上説明したように、本発明によれば、多次元配列から
1次元配列への添字変換を、添字のとり得る値の範囲に
依存しないように行うことによって、添字のとり得る値
の範囲が確定していない多次元配列を1次元配列状領域
に割付けることを可能とし、また多次元配列の各々の添
字のとり得る値の範囲をいかに大きく拡大しても、それ
までの割付けた要素の記憶空間上での位置を移動する必
要がないという効果がある。EFFECTS OF THE INVENTION As described above, according to the present invention, by performing subscript conversion from a multidimensional array to a one-dimensional array without depending on the range of values that the subscript can take, the values that the subscript can take It is possible to allocate a multidimensional array whose range is not fixed to a one-dimensional array-like area, and no matter how large the range of values that each subscript of the multidimensional array can take is expanded, The effect is that it is not necessary to move the position of the element in the storage space.
第1図は本発明の実施例のブロック図、第2図は第1図
のブロックにおいて各レジスタの内容の変化状態及び装
置出力状態を3次元添字配列との関係において示す図、
第3図は第1図のブロックによって1次元配列上に割付
けられた2次元配列の個々の要素の割付け位置を示す
図、第4図は第1図のブロックによって1次元配列上に
割付けられた3次元配列の個々の要素の割付け位置を示
す図、第5図は従来の配列添字変換装置の構成を示すブ
ロック図である。 主要部分の符号の説明 1……最大値選択器 2……直列化器 6,42,52……加算器 31,41,51……乗算器 32,43,53……レジスタ 33,44,54……スイッチFIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a diagram showing a change state of contents of each register and a device output state in the block of FIG. 1 in relation to a three-dimensional subscript array,
FIG. 3 is a diagram showing allocation positions of individual elements of a two-dimensional array allocated on the one-dimensional array by the block of FIG. 1, and FIG. 4 is allocated on the one-dimensional array by the block of FIG. FIG. 5 is a block diagram showing the arrangement of individual elements of a three-dimensional array, and FIG. 5 is a block diagram showing the configuration of a conventional array subscript conversion device. Description of main part code 1 …… Maximum value selector 2 …… Serializer 6,42,52 …… Adder 31,41,51 …… Multiplier 32,43,53 …… Register 33,44,54 ……switch
Claims (1)
域を、0を含む整数を値として有する複数の添字によっ
て要素が特定される多次元配列として使用する際におけ
る多次元配列から1次元配列への配列添字変換装置であ
って、前記多次元配列の要素を特定する全ての添字の値
のうち最大値を出力する最大値選択手段と、前記添字の
各々を直列に出力する直列化手段と、前記最大値を初期
値とする第1レジスタと、前記最大値と前記直列化手段
の出力とが等しくないときのみ前記第1レジスタの内容
と前記最大値との乗算値を得てこれをこの第1レジスタ
の新しい内容とする第1乗算手段と、0を初期値とする
第2レジスタと、前記第2レジスタの内容と前記最大値
との乗算値を得る第2乗算手段と、前記最大値と前記直
列化手段の出力とが等しいときには前記第1レジスタの
内容と前記第2乗算手段の乗算値と更には前記第2レジ
スタの内容とを加算し、また前記最大値と前記直列化手
段の出力とが等しくないときには前記第2乗算手段の乗
算値と前記第2レジスタの内容とを加算してこれを前記
第2レジスタの新しい内容とする第1加算手段と、0を
初期値とする第3レジスタと、前記第3レジスタの内容
と前記最大値との乗算値を得る第3乗算手段と、前記最
大値と前記直列化手段の出力とが等しくないときのみ前
記第3乗算手段の乗算値と前記直列化手段の出力との加
算値を得てこれを前記第3レジスタの新しい内容とする
第2加算手段と、前記直列化手段から全ての添字の値が
出力された後に前記第2及び第3レジスタの保持内容を
加算して装置出力とする手段とを含むことを特徴とする
配列添字変換装置。1. A one-dimensional array when a one-dimensional array area allocated in a storage space is used as a multi-dimensional array in which elements are specified by a plurality of subscripts each having an integer including 0 as a value. An array subscript conversion device to an array, wherein maximum value selecting means for outputting a maximum value among values of all subscripts for specifying elements of the multidimensional array, and serializing means for serially outputting each of the subscripts A first register having the maximum value as an initial value, and a multiplication value of the contents of the first register and the maximum value is obtained only when the maximum value and the output of the serialization means are not equal to each other. A first multiplication means having new contents of the first register; a second register having an initial value of 0; second multiplication means for obtaining a multiplication value of the contents of the second register and the maximum value; The value and the output of the serialization means When they are equal, the contents of the first register, the multiplication value of the second multiplication means, and the contents of the second register are added, and when the maximum value and the output of the serialization means are not equal, the second value is added. The first addition means for adding the multiplication value of the multiplication means and the contents of the second register to obtain the new contents of the second register, the third register having 0 as an initial value, and the third register A third multiplication means for obtaining a multiplication value of the content and the maximum value; and a multiplication value of the third multiplication means and an output of the serialization means only when the maximum value and the output of the serialization means are not equal. Second addition means for obtaining an addition value and making it the new contents of the third register, and adding the contents held in the second and third registers after the values of all the subscripts are output from the serialization means Means to output the device Array subscript conversion device, characterized in that.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8028687A JPH0750448B2 (en) | 1987-04-01 | 1987-04-01 | Array subscript converter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8028687A JPH0750448B2 (en) | 1987-04-01 | 1987-04-01 | Array subscript converter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63245726A JPS63245726A (en) | 1988-10-12 |
| JPH0750448B2 true JPH0750448B2 (en) | 1995-05-31 |
Family
ID=13714028
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8028687A Expired - Lifetime JPH0750448B2 (en) | 1987-04-01 | 1987-04-01 | Array subscript converter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0750448B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100868451B1 (en) * | 2007-02-22 | 2008-11-11 | 삼성전자주식회사 | Memory access method using 3-D address mapping |
-
1987
- 1987-04-01 JP JP8028687A patent/JPH0750448B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63245726A (en) | 1988-10-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4754421A (en) | Multiple precision multiplication device | |
| EP0113275B1 (en) | Spectrum display device for audio signals | |
| US6021420A (en) | Matrix transposition device | |
| EP0003182A2 (en) | Method of and apparatus for enabling different parts of an input television signal to be made available simultaneously,and television standards converter incorporating said apparatus | |
| US5944814A (en) | Parallel processing digital audio processing apparatus | |
| EP0403729B1 (en) | Digital-signal processing apparatus | |
| JPH0750448B2 (en) | Array subscript converter | |
| JP3593439B2 (en) | Image processing device | |
| US6433716B2 (en) | Data conversion device having mediator for determining data conversion order | |
| JP2851804B2 (en) | 2D orthogonal transform device | |
| EP0511606A2 (en) | Parallel interpolator for high speed digital image enlargement | |
| JP2737933B2 (en) | Division device | |
| US6329995B1 (en) | Image creation apparatus and image creation method | |
| JPH08330914A (en) | Waveform generator | |
| JPS63245725A (en) | Arrayed subscript converter | |
| SU705657A1 (en) | Pulse recurrence rate multiplier | |
| JP2619137B2 (en) | A / D converter | |
| JP2989193B2 (en) | Image memory interleaved input / output circuit | |
| JPH05216988A (en) | Template arithmetic processing method and apparatus | |
| JPH05120321A (en) | Method for operating matrix calculation | |
| JPS6238938A (en) | Rom type multiplier | |
| JPS6211381B2 (en) | ||
| JPH10135742A (en) | Signal waveform generator | |
| JPH0644228B2 (en) | Squaring device | |
| JPH0695854A (en) | Division arithmetic unit |