JPS60110036A - Method for obtaining maximum value of array element and number of maximum element - Google Patents

Method for obtaining maximum value of array element and number of maximum element

Info

Publication number
JPS60110036A
JPS60110036A JP19643983A JP19643983A JPS60110036A JP S60110036 A JPS60110036 A JP S60110036A JP 19643983 A JP19643983 A JP 19643983A JP 19643983 A JP19643983 A JP 19643983A JP S60110036 A JPS60110036 A JP S60110036A
Authority
JP
Japan
Prior art keywords
register
holding means
elements
stored
contents
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
JP19643983A
Other languages
Japanese (ja)
Inventor
Hideshi Ishii
石井 英志
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.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric Co 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP19643983A priority Critical patent/JPS60110036A/en
Publication of JPS60110036A publication Critical patent/JPS60110036A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To decrease the number of steps of a program and to attain high-speed processing by obtaining the maximum value of the array element and the maximum element number with a single instruction. CONSTITUTION:This method contains three steps. In the 1st step, the array elements are read out of a main memory according to an instruction word containing an operation code field, an inter-element distance designation field and an element number designation field. In the 2nd step, the maximum value among the elements counted up to the i-th place of the read-out array elements is stored in the 1st holding means and the corresponding element number is stored in the 2nd holding means respectively. The contentes of the 1st holding means are compared with the (i+1)th element. When the latter is larger than the former, the latter value is stored in the 1st holding means together with the corresponding element number stored in the 2nd holding means. In the 3rd step, the contents of the 1st holding means are stored in the 1st register with the contents of the 2nd holding means stored in the 2nd register respectively when the procedure is through with the n-th element.

Description

【発明の詳細な説明】 本発明は情報処理システムの主記憶装置に記憶された配
列データに対する配列要素の最大値および最大要素の要
素番号をめる方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for calculating the maximum value of array elements and the element number of the maximum element for array data stored in the main memory of an information processing system.

従来技術 従来、科学技術計算においては配列データを扱う場合が
非常に多(・。配列データに対する演算はしはしは各々
の要素に対する同一演算のくり返えしと麦る1、従来の
情報処理システムにおいてはとのくり返えし全分岐命令
を用いて特定の命令シーケンスをループさせることによ
り実現している。
Conventional technology In the past, array data was very often handled in scientific and technological calculations. In the system, this is achieved by looping a specific instruction sequence using repeated all branch instructions.

しかしこの方法による演3′F、ではインデックスレジ
スタの確定待ち等による遅れがある他、分岐命令などの
余分な命令が必要であるため、実行時IElffiが速
くならん(・という欠点がある。この欠点を除去するた
めの一方法として配列データを専門に扱う命令、いわゆ
るベクトル命令が使用されることがある。このベクトル
命令は1つの配列に対する演算を1命令で行い、しかも
ループ制御用の分岐命令やインデックスレジスタの確定
待ちも力いため高速に浜Wを行うことが可能である1、
配列データに対する演算のうちで配列データの要素の最
大値または最大要素の要素番号をめるような演算もよく
使用される。たとえば「2つの同じ要素数を持った配列
AとBにおいて、配列人の最大値を持った要素を対応す
る配列Bの遷素と入れかえる」という問題を実行する場
合には最大要素の要素番号をめることが必要である。ま
た配列要素の最大値そのものが必要な場合もあるしかし
従来のベクトル命令では配列要素の最大値と最大要素の
要素番号とを同時にめることができなかったため次のよ
うな欠点がある。すなわち最大値のみをめる命令では前
述の「要素の入れかえ」という動作を行うことができな
い。また最大要素の要素番号のみをめる命令では最大値
そのものはまらないため、最大値そのものが必要な場合
にはめられた要素番号をもとにして主記憶装置から対応
する要素を読み出す必要がある。
However, in this method, IElffi is not fast at execution because there is a delay due to waiting for the index register to be finalized, etc., and extra instructions such as branch instructions are required. One way to eliminate this is by using instructions that specialize in array data, so-called vector instructions.These vector instructions perform operations on one array in one instruction, and also include branch instructions for loop control, It is possible to perform Hama W at high speed because it takes a long time to wait for the index register to be confirmed1.
Among operations on array data, operations that calculate the maximum value of the elements of array data or the element number of the largest element are also often used. For example, when executing the problem "In two arrays A and B with the same number of elements, replace the element with the maximum value of the array user with the corresponding transene of array B", the element number of the maximum element is It is necessary to There are also cases where the maximum value of an array element itself is required. However, in conventional vector instructions, the maximum value of an array element and the element number of the maximum element cannot be determined at the same time, resulting in the following drawbacks. In other words, the above-mentioned "element replacement" operation cannot be performed with an instruction that only calculates the maximum value. Furthermore, since the maximum value itself is not fitted in an instruction to only read the element number of the largest element, if the maximum value itself is required, it is necessary to read the corresponding element from the main memory based on the fitted element number.

発明の目的 本発明の目的は上記欠点を解決するため、1命令で配列
要素の最大値および最大要素の要素番号をめることによ
り、融通性のある配列データの演算方法を提供すること
にある。
OBJECTS OF THE INVENTION In order to solve the above-mentioned drawbacks, an object of the present invention is to provide a flexible array data calculation method by calculating the maximum value of array elements and the element number of the maximum element in one instruction. .

発明の構成 本発明による配列要素の最大値および最大要素の要素番
号をめる方法は、 演話の種類を指定するオペレーションコードフィールド
と配列の先頭要素のアトVスを指定するアドレス指定フ
ィールドと要素間の距離を指定する要素間距離指定フィ
ールドと演算を行う要素数nを指定する要素数指定フィ
ールドとを有する命令語に従い主記憶装置から配列要素
を読み出す第1のステップと、 この第1のステップで読み出された配列要素の1番目(
+”1,2e・・・、n)までの要素のうちの最大値を
第1の保持手段に格納し、最大値を有する要素の要素番
号を第2の保持手段に格納しておき、前記第1の保持手
段の内容と(i+1 )番目の要素を比較しく i十i
 )番目の要素の方が大きい値を持つ場合にはその値を
前記第1の保持手段に格納するとともに(i+1 )番
目の要素の要素番号を前記第2の保持手段に格納する第
2のステップと、 n番目の要素までの比較が終了した時点で前記第1の保
持手段の内容を第1のレジスタに格納し、さらに前記第
2の保持手段の内容を第2のレジスタに格納する第3の
ステップから万る。
Structure of the Invention The method of calculating the maximum value of an array element and the element number of the maximum element according to the present invention is as follows: An operation code field that specifies the type of speech, and an address specification field and element that specifies the address of the first element of the array. a first step of reading array elements from the main memory according to a command word having an inter-element distance specification field that specifies the distance between the elements and an element number specification field that specifies the number n of elements to be operated on; The first array element read in (
+"1, 2e..., n) is stored in the first holding means, the element number of the element having the maximum value is stored in the second holding means, and the Compare the contents of the first holding means and the (i+1)th element.
)th element has a larger value, a second step of storing that value in the first holding means and storing the element number of the (i+1)th element in the second holding means; and a third storing the contents of the first holding means in the first register when the comparison up to the n-th element is completed, and further storing the contents of the second holding means in the second register. From the step of 10,000.

発明の実施例 次に本発明の一実施例について図面を参照して説明する
Embodiment of the Invention Next, an embodiment of the present invention will be described with reference to the drawings.

第1図を参照すると、本発明の方法を具体化して実施し
た情報処理装置は、主記憶装置1、メモリバッファユニ
ット2、セレクタ3および13、レジスタ4 * 5 
* 8 、9 * 11および13、比較回路6、制御
ユニット7、およびアンド ゲート10から構成されて
いる。
Referring to FIG. 1, an information processing apparatus embodying the method of the present invention includes a main memory 1, a memory buffer unit 2, selectors 3 and 13, and registers 4*5.
It consists of *8, 9*11 and 13, a comparison circuit 6, a control unit 7, and an AND gate 10.

前記主記憶装置1にはプログラムおよびデータが格納さ
れている。前記主記憶装置】には信号線101を介して
データが書き込まれるとともに信号線102を介してそ
の内容が読み出される。前記メモリバッファユニット2
は前記主記憶装置lに対する読み出しアクセスおよび書
き込みアクセスを行うユニ、トである。前記主記憶装置
1から読み出されたデータはメモリバッファユニット2
を介して信号線103に出力されセレクタ3を介しズレ
ジスタ4に転送されるほか、伯号線103を介してレジ
スタ5に直接転送される。前記比較回路6は前記レジス
タ4の内容と前記レジスタ5の内容とを比較し、その結
果を信号線108に出力する。すなわち前記レジスタ4
に格納されている値よりも前記レジスタ5に格納されて
いる値の方が太き(・場合に信号線108は「1」とな
る。
The main storage device 1 stores programs and data. Data is written into the main memory device through a signal line 101, and its contents are read out through a signal line 102. The memory buffer unit 2
is a unit that performs read access and write access to the main memory device l. The data read from the main storage device 1 is stored in a memory buffer unit 2.
In addition to being outputted to the signal line 103 via the selector 3 and transferred to the register 4, it is also transferred directly to the register 5 via the bar code line 103. The comparison circuit 6 compares the contents of the register 4 and the contents of the register 5, and outputs the result to the signal line 108. That is, the register 4
If the value stored in the register 5 is thicker than the value stored in the register 5, the signal line 108 becomes "1".

前記制御ユニット7は本発明の方法により第1図の各回
路を制御するためのユニットである。
The control unit 7 is a unit for controlling each circuit shown in FIG. 1 by the method of the present invention.

−7゜ 第4図を参照すると、前記制御ユニットは、命令先取り
制御回路701.命令先取り バッファ702、第1命
令レジスタ703 t m 2命令レジスタ704.イ
ンデックスレジスタファイル705゜セレクタ706お
よび707.実効アドレスアダー7osJJ+アドレス
レジスタ709.ベースアドレスレジスタ710.ベー
スアドレスアダー711、仮想アドレスレジスタ712
.マイクロアドレス制御回路713.制御記憶714.
マイクロ命令レジスタ715y’B素数レジスタ716
゜およびゼロ検出回路717から格成されている。
-7° Referring to FIG. 4, the control unit includes an instruction prefetch control circuit 701. Instruction prefetch buffer 702, first instruction register 703, tm2 instruction register 704. Index register file 705° selectors 706 and 707. Effective address adder 7osJJ+address register 709. Base address register 710. Base address adder 711, virtual address register 712
.. Microaddress control circuit 713. Control memory 714.
Microinstruction register 715y'B prime number register 716
and a zero detection circuit 717.

次にこの制御回路7の動作を詳細に説明する。Next, the operation of this control circuit 7 will be explained in detail.

命令先取り制御回路701がらメモリバッファユニット
2に対して信号線116を介して命令語数り出し要求が
出力されると、それに応答して信号線117を介して命
令語が読み出され、命令先取りバッファ702に格納さ
れる。命令先取りパッンア702からは、処理すべき命
令語が順次読み出される。読み出された命令が本発明の
命令である場合、第1命令レジスタ703に命令の1番
目の飴、第2QJ令レジスタ704に命令の2査目の飴
がセットされる。配列データの先頭の袈累の乙 実効アドレスは、命令語のクツイールドの値と、スレジ
スタは合計8個あり、インデックスレジスタファイル7
05に格納されている。また実効アドレスの佑或は失効
アドレスアダー708により行われる、生成された実効
アドレスは実効アドレスフジスタフ09に格納される。
When the instruction prefetch control circuit 701 outputs a request to read out the number of instruction words to the memory buffer unit 2 via the signal line 116, the instruction words are read out via the signal line 117 in response, and the instruction prefetch buffer 702. Instruction words to be processed are sequentially read from the instruction prefetch paner 702. If the read instruction is an instruction of the present invention, the first candy of the instruction is set in the first instruction register 703 and the second candy of the instruction is set in the second QJ instruction register 704. The effective address at the beginning of the array data is the value of the instruction word Kutsuild, there are a total of 8 registers, and the index register file 7
It is stored in 05. Further, the effective address generated by the effective address request or revocation address adder 708 is stored in the effective address staff 09.

実効アドレスレジスタ709の内容はベースアドレスア
ダー711によりベースアドレスレジスタ710の内容
と加算され仮想アドレスレジスタ712に格納される。
The contents of the effective address register 709 are added to the contents of the base address register 710 by a base address adder 711 and stored in the virtual address register 712.

仮想アドレスレジスタ712の内容は信号線118によ
りメモリバッファユニット2へ送られる。メモリバッフ
ァユニット2ではアドレス変換を行った稜、配列要素の
読み出しアドレスとして使用される。2番目以降の要素
の読み出しアドレスの生成は、1つ前の要素のアドレス
に命令語の■□クツイールド値を加算することによりめ
られる。この加算は実効アドレスアダー708により行
われその入力の切りかえはセレクタ706およびセレク
タ707により行われる。
The contents of virtual address register 712 are sent to memory buffer unit 2 by signal line 118. In the memory buffer unit 2, the edges that have undergone address conversion are used as read addresses for array elements. Generation of read addresses for the second and subsequent elements is achieved by adding the ■□xtwield value of the instruction word to the address of the previous element. This addition is performed by an effective address adder 708, and switching of its input is performed by selectors 706 and 707.

一方IN命令レジスタ703のOPクツイールドマイク
ロアドレス制御回路713へ送られる。
On the other hand, it is sent to the OP command yield microaddress control circuit 713 of the IN command register 703.

マイクロアドレス制御回路713ではオペレージ目ンコ
ードに対応してマイクロ命令の先頭アドレスが生成され
、制御記憶714がらマイクロ命令が読み出され、マイ
クロ命令レジスタ715にセットされる。以降のマイク
ロ命令の読み出しはマイクロ命令の分岐制御フィールド
の情報をもとにして行われる。第2命令レジスタ704
のRNンイールドで指定されるインデックスレジスタに
は配列データの要素数が格納されており、その値に要素
数レジスタ716にセットされる。要素数レジスタ71
6の値はト要素の処理が終了する毎にlずつカウントダ
ウンされ、全要素の処理が終了した時にゼロと々る。こ
れはゼロ検出回路717で検出され、マイクロアドレス
制御回路713へ送られ、マイクロ命令の分岐条件と力
る。前記レジスタ8は制御ユニット7の指示に従いその
内容が「lJづつ増加される。前記レジスタ9は制御ユ
ニット7の指示に従いレジスタ8の出力がセットされる
。前記レジスタ11へはレジスタ4の内容がセットされ
、前記レジスタ12には前記レジスタ9の内容がセット
される。前記レジスタ11およびレジスタ12の内容は
前記セレクタ13により切りかえられ、前記メモリバッ
ファユニット2を介して前記主記憶装置1に書き込むこ
とができる。
The micro-address control circuit 713 generates the start address of the micro-instruction corresponding to the operation code, reads out the micro-instruction from the control memory 714, and sets it in the micro-instruction register 715. Subsequent reading of the microinstruction is performed based on the information in the branch control field of the microinstruction. Second instruction register 704
The number of elements of the array data is stored in the index register specified by the RN yield, and the number of elements register 716 is set to this value. Element number register 71
The value of 6 is counted down by 1 each time the processing of the first element is completed, and reaches zero when the processing of all the elements is completed. This is detected by the zero detection circuit 717, sent to the microaddress control circuit 713, and used as the microinstruction branch condition. The contents of the register 8 are incremented by lJ according to instructions from the control unit 7. The output of the register 8 is set to the register 9 according to instructions from the control unit 7. The contents of the register 4 are set to the register 11. The contents of the register 9 are set in the register 12.The contents of the registers 11 and 12 can be switched by the selector 13 and written to the main storage device 1 via the memory buffer unit 2. can.

本発明の方法により主記憶装置lに格納されている配列
データの要素の最大値および最大要素をめるための処理
動作は第2図のフローチャートに示され、以下の順序で
行われる。前記制御ユニット7から信号線116を介し
て命令語取り出し要求がメモリバッファユニット2に出
方されると主記憶装置1から実行すべき命令の命令語が
読み出される。読み出された命令語は、前記メモリバッ
ファユニット2および信号線117を介して制御ユニッ
ト7に送られる。前記制御ユニット7では取り出された
命令語の解読が行われる。今、取り出された命令語が本
発明の方法を使用して配列要素の最大値および最大要素
をめるような命令を示している場合を考える。この命令
語は2ワード(=72ビット)の長さを持ち、第3図に
示すような形式を持っている。第3図においてOFはオ
ペレーションコードフィールドで、演算の種類を指定し
ている。yは配列要素の先頭アドレスを指定するための
アドレスフィールドであり、 MPによって指定された
アドレス修飾がyの値に対してほどこされ、その結果の
値が要素の先頭アドレスを表わしている。V工はとなり
合う要素同志のアドレスの差すなわち要素間距離を指定
し、RNは要素数が格納されているレジスタを指定して
いる、前記制御ユニット7によりこの命令が解読される
と、まず先頭要素のアドレス計算が行われ、その計算結
果のアドレスから先@要素が読み出される。先頭要素の
読み出しは命令語の読み出しと同様に前記主記憶装置1
から前記メモリバッファユニ、ト2を介して行われるが
、読み出されたデータは信号線1o3r介してレジスタ
4およびレジスタ5にセットされる。この時にはセレク
タ3は信号線105を介して制御され、信号線103の
信号を選択するようになっている。要素番号は「0」か
ら始まっているため、先頭要素がレジスタ4およびレジ
スタ5にセットされた時にレジスタ8は「0」にクリア
され、以後要素が読み出される毎に「1」づつカウント
アツプされる。2番目の要素(要素番号「1」)のアド
レスは先頭要素のアドレスに要素間距離を加算して得ら
れる。
The processing operations for determining the maximum value and maximum element of the array data stored in the main memory 1 according to the method of the present invention are shown in the flowchart of FIG. 2, and are performed in the following order. When a command word retrieval request is sent from the control unit 7 to the memory buffer unit 2 via the signal line 116, the command word of the command to be executed is read from the main memory device 1. The read command word is sent to the control unit 7 via the memory buffer unit 2 and the signal line 117. The control unit 7 decodes the instruction word taken out. Now, consider a case where the retrieved instruction word indicates an instruction to find the maximum value and maximum element of an array element using the method of the present invention. This instruction word has a length of 2 words (=72 bits) and has a format as shown in FIG. In FIG. 3, OF is an operation code field that specifies the type of operation. y is an address field for specifying the start address of an array element, the address modification specified by MP is applied to the value of y, and the resulting value represents the start address of the element. V specifies the difference in addresses between adjacent elements, that is, the distance between elements, and RN specifies the register in which the number of elements is stored. When this instruction is decoded by the control unit 7, the first The address of the element is calculated, and the first @element is read from the address of the calculation result. Reading of the leading element is performed in the main memory 1 in the same way as reading of the instruction word.
The read data is set in the registers 4 and 5 via the signal line 1o3r. At this time, the selector 3 is controlled via the signal line 105 to select the signal on the signal line 103. Since the element number starts from "0", register 8 is cleared to "0" when the first element is set in registers 4 and 5, and is incremented by "1" every time an element is read from then on. . The address of the second element (element number "1") is obtained by adding the inter-element distance to the address of the first element.

こうして得られた主記憶装置1のアドレスから2番目の
要素が読み出され、レジスタ5にセットされる。このと
ぎレジスタ4の制御は次のように行われる。すなわち比
較回路6によりレジスタ4とレジスタ5の内容が比較さ
れ、レジスタ5に入っているデータの値の方か大きい場
合には信号線108の値が「1」となる。またセレクタ
3は信号線104の状態すなわちレジスタ5の内容を選
択するように制御される。レジスタ5に2番目の要素が
セットされるとぎには信号線106の内容(レジスタ5
のセット信号)が「1」となるが、このとき信号線10
7の内容も「1」となる。アンドゲート10により信号
線107の内容と信号線108の内容との論理積がとら
れる。論理積結果である信号線109の内容が「1」と
ガった場合にはレジスタ4にはレジスタ5の内容が移さ
れるとともにレジスタ9にはレジスタ8の内容が移され
る。同様にして3番目からn番目までの要素が順番に読
み出され、前記のよう万処理がくり返えされる。こうし
て最終的にレジスタ4に格納されている値はn個の要素
の値のうちの最大値であり、レジスタ9に格納さ扛て〜
・る値は、最大値を持つ要素の「0」から始まる要素番
号に尋L−ti・。
The second element is read from the address of the main memory 1 obtained in this way and set in the register 5. Control of this register 4 is performed as follows. That is, the comparison circuit 6 compares the contents of the register 4 and the register 5, and if the value of the data stored in the register 5 is greater, the value of the signal line 108 becomes "1". Further, the selector 3 is controlled to select the state of the signal line 104, that is, the contents of the register 5. When the second element is set in register 5, the contents of signal line 106 (register 5
set signal) becomes "1", but at this time, the signal line 10
The content of 7 is also "1". The contents of the signal line 107 and the contents of the signal line 108 are ANDed by the AND gate 10. If the content of the signal line 109, which is the AND result, is "1", the content of the register 5 is transferred to the register 4, and the content of the register 8 is transferred to the register 9. Similarly, the third to nth elements are read out in order, and the above-described process is repeated. In this way, the value finally stored in register 4 is the maximum value among the values of n elements, and is stored in register 9.
・The value is determined by the element number starting from "0" of the element with the maximum value.

レジスタ4の内容はさらにレジスタ11に転送され、レ
ジスタ9の内容はレジスタ12に転送されてこの命令は
終了する。レジスタ11およびレジスタ12の内容は信
号線115を介してメモリバッファユニット2に転送さ
れ、主記憶装置1へ書き込むことができるほか、他の命
令により使用することができる。
The contents of register 4 are further transferred to register 11, the contents of register 9 are transferred to register 12, and the instruction ends. The contents of registers 11 and 12 are transferred to memory buffer unit 2 via signal line 115 and can be written to main memory 1 as well as used by other instructions.

本発明には配列要素の最大値および最大要素の要素番号
を1命令でめることができるためプログラムのステップ
数を減らすことが可能となり、従って処理が高速に行え
るという効果がある。
The present invention has the advantage that since the maximum value of array elements and the element number of the maximum element can be determined with one instruction, the number of program steps can be reduced, and therefore processing can be performed at high speed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示す、第2図は第1図の回
路の動作を示すフローチャート、第3図は第2図に示さ
れた動作を指示するための命令語の形式を表わす図、お
よび第4図は制御ユニット7の詳細な構成を示す図であ
る1、 第1図から第4図において、■・・・・・・主記憶装置
、2・・・・・・メモノフヘツファユニット、3,13
・・・・・・セレクタ、4 t 5 t 8 = 9 
* 11 t 12・・・・・・レジスタ、 6・・・
・・・比較回路、7・・・・・・制御ユニット、10・
・・・・・アンドゲート、701・・・・・・命令先取
り制御回路、702・・・・・・命令先取りバッファ、
703・・・・・・第1命令レジスタ、704・・・・
・・第2命令レジスタ、705・・・・・・インデック
スレジスタファイル、706゜707・・・・・・セV
クタ、708・・・・・・実効アドレスアダー、709
・・・・・・実効アドレスレジスタ、71゜・・・・・
・ベースアドレスレジスタ、711・・・・・・ペース
アドレスアダー、712・・・・・・仮想アドレスレジ
スタ、713・・・・・・マイクロアドレス制御回路、
714・・・・・・制御記憶、715・・・・・・マイ
クロ命令レジスタ、716・・・・・・要素数レジスタ
、717・・・・・・ゼロ検出回路。 ノl? 第 J 図 第2 口 第3図 手続補正書輸発) 59.12.2G 昭和 年 月 日 1、事件の表示 昭和58年 特 許 願第19643
9壮2、発明の名称 配列要素の最大値および最大要素
の事件との関係 出 願 人 東京都港区芝五丁目33番1号 (423) 日本電気株式会社 代表者 関本忠弘 4、代理人 〒108 東京都港区芝?iT[137番8シシ−住友
三[nビル電話 東iir (03) 456−311
1 (大代表)5 補正の対象 明細書の発明の詳細な説明の欄 6、補正の内容 明細書第6頁第8行目の記載「13」を「12」と訂正
します。
FIG. 1 shows an embodiment of the present invention, FIG. 2 is a flowchart showing the operation of the circuit shown in FIG. 1, and FIG. 3 shows the format of a command word for instructing the operation shown in FIG. and FIG. 4 are diagrams showing the detailed configuration of the control unit 7. 1. In FIGS. 1 to 4, 1. Main storage device, 2. Nofuhetufa unit, 3,13
...Selector, 4 t 5 t 8 = 9
* 11 t 12...Register, 6...
... Comparison circuit, 7 ... Control unit, 10.
......AND gate, 701...Instruction prefetch control circuit, 702...Instruction prefetch buffer,
703...First instruction register, 704...
...Second instruction register, 705...Index register file, 706゜707...SeV
effective address adder, 709
・・・・・・Effective address register, 71°・・・・・・
・Base address register, 711...Pace address adder, 712...Virtual address register, 713...Micro address control circuit,
714... Control memory, 715... Micro instruction register, 716... Element number register, 717... Zero detection circuit. Nol? 59.12.2G Showa year, month, day 1, case description 1982 Patent Application No. 19643
9 So 2, Title of the invention Maximum value of array elements and relationship of the maximum element to the incident Applicant: 5-33-1 Shiba, Minato-ku, Tokyo (423) NEC Corporation Representative: Tadahiro Sekimoto 4, Agent: 108 Shiba, Minato-ku, Tokyo? iT [No. 137 8-Sumitomo San [N Building Telephone East IIR (03) 456-311
1 (Major representative) 5 The entry "13" in column 6 of the detailed explanation of the invention in the specification subject to amendment, page 6, line 8 of the specification of the contents of the amendment, is corrected to "12".

Claims (1)

【特許請求の範囲】 各々の要素に対して要素番号が付与された配列要素の最
大値および最大要素の要素番号をめる方法であって、 演算の種類を指定するオペレーションコードフィールド
と配列の先頭要素のアドレスを指定するアドレス指定フ
ィールドと要素間の距離を指定する要素間距離指定フィ
ールドと演算を行なう要素数nを指定する要素数指定フ
ィールドとを有する命令語に従い主記憶装置から11列
要素を読み出す第1のステップと、 この第1のステップにより読み出された配列要素の1番
目(i=1,2*・・・、n)までの要素のうちの最大
値を第1の保持手段に格納し、最大値を有する要素の要
素番号を第2の保持手段に格納しておき、前記第1の保
持手段の内容と(i+1 )番目の要素とを比較しく 
i+1 )番目の要素の方が大きい値を持つ場合にはそ
の値を前記第1の保持手段に格納するとともに(i+1
 )番目の要素の要素番号を前記第2の保持手段に格納
する第2のステップと、 n番目の要素までの比較が終了した時点で前記第1の保
持手段の内容を第1のレジスタに格納し、さらに前記第
2の保持手段の内容を第2のレジスタに格納する笛3の
ステップとを含むことを特徴とする配列要素の最大値お
よび最大要素番号をめる方法。
[Claims] A method of calculating the maximum value of an array element and the element number of the maximum element in which each element is assigned an element number, the method comprising: an operation code field specifying the type of operation; and the beginning of the array. Eleven column elements are retrieved from the main memory according to an instruction word that has an address designation field that designates the address of an element, an inter-element distance designation field that designates the distance between elements, and a number-of-elements designation field that designates the number n of elements to be operated on. A first step of reading, and storing the maximum value of the elements up to the first (i=1, 2*..., n) of the array elements read in this first step in the first holding means. store the element number of the element having the maximum value in the second holding means, and compare the contents of the first holding means with the (i+1)th element.
If the (i+1)-th element has a larger value, that value is stored in the first storage means and the (i+1)-th element has a larger value.
) A second step of storing the element number of the element number in the second holding means, and storing the contents of the first holding means in the first register when the comparison up to the nth element is completed. and further comprising the step of storing the contents of the second holding means in a second register.
JP19643983A 1983-10-20 1983-10-20 Method for obtaining maximum value of array element and number of maximum element Pending JPS60110036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19643983A JPS60110036A (en) 1983-10-20 1983-10-20 Method for obtaining maximum value of array element and number of maximum element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19643983A JPS60110036A (en) 1983-10-20 1983-10-20 Method for obtaining maximum value of array element and number of maximum element

Publications (1)

Publication Number Publication Date
JPS60110036A true JPS60110036A (en) 1985-06-15

Family

ID=16357838

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19643983A Pending JPS60110036A (en) 1983-10-20 1983-10-20 Method for obtaining maximum value of array element and number of maximum element

Country Status (1)

Country Link
JP (1) JPS60110036A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63136168A (en) * 1986-11-28 1988-06-08 Hitachi Ltd Vector computer
JPS63157269A (en) * 1986-12-22 1988-06-30 Nec Corp Arithmetic circuit
JPH0398163A (en) * 1989-09-11 1991-04-23 Koufu Nippon Denki Kk Vector data processor
WO1995009391A1 (en) * 1993-09-27 1995-04-06 Ntt Mobile Communications Network Inc. Minimum value/maximum value retrieving apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63136168A (en) * 1986-11-28 1988-06-08 Hitachi Ltd Vector computer
JPS63157269A (en) * 1986-12-22 1988-06-30 Nec Corp Arithmetic circuit
JPH0398163A (en) * 1989-09-11 1991-04-23 Koufu Nippon Denki Kk Vector data processor
WO1995009391A1 (en) * 1993-09-27 1995-04-06 Ntt Mobile Communications Network Inc. Minimum value/maximum value retrieving apparatus
US5726923A (en) * 1993-09-27 1998-03-10 Ntt Mobile Communications Network Inc. Minimum/maximum data detector

Similar Documents

Publication Publication Date Title
EP0044562B1 (en) Vector data processor
US4616313A (en) High speed address calculation circuit for a pipeline-control-system data-processor
JPS59117666A (en) Vector processor
JPH0248931B2 (en)
US4467415A (en) High-speed microprogram control apparatus with decreased control storage requirements
JP2818529B2 (en) Information storage device
JPS60110036A (en) Method for obtaining maximum value of array element and number of maximum element
US5363491A (en) Data flow processor with data processing and next address determination being made in parallel
US4849926A (en) Data processing circuit for calculating either a total sum or a total product of a series of data at a high speed
US5566338A (en) Interrupt control method and interrupt control circuit in a processor
JPS60108973A (en) Method for finding the minimum value of array elements and element number of the minimum element
WO1985002277A1 (en) Microprogram control method
US5050076A (en) Prefetching queue control system
JPS6148735B2 (en)
JPH07110769A (en) Vliw type computer
JPS60181859A (en) Control system of collected channel
JPS6346855B2 (en)
JPS63141131A (en) Pipeline control system
JPS59223846A (en) Arithmetic processor
JPS5899842A (en) Microprogram controller
JP2583614B2 (en) Vector arithmetic unit
JP3271713B2 (en) Micro instruction controller
JPS6031646A (en) Data processor
JPS59128644A (en) Sequence control circuit
JPH03255530A (en) Parallel instruction fetching mechanism