JPS60108973A - Method for finding the minimum value of array elements and element number of the minimum element - Google Patents

Method for finding the minimum value of array elements and element number of the minimum element

Info

Publication number
JPS60108973A
JPS60108973A JP58216636A JP21663683A JPS60108973A JP S60108973 A JPS60108973 A JP S60108973A JP 58216636 A JP58216636 A JP 58216636A JP 21663683 A JP21663683 A JP 21663683A JP S60108973 A JPS60108973 A JP S60108973A
Authority
JP
Japan
Prior art keywords
register
contents
instruction
minimum
elements
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
JP58216636A
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 JP58216636A priority Critical patent/JPS60108973A/en
Publication of JPS60108973A publication Critical patent/JPS60108973A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE:To reduce the number of steps of a program by finding out the minimum value of array elements and the element No. of the minimum element only by one instruction. CONSTITUTION:Data read out from a main storage device 1 are set in registers 4, 5. A comparator 6 compares the contents of the registers 4, 5, and if a data value inputted to the register 5 is smaller than a data value inputted to the register 4, a signal line 108 is turned to ''1''. A selector is controlled so as to select the contents of a signal line 104. Consequently, the contents of the register 5 are transferred to the register 4 and the contents of a register 8 are transferred to a register 9. Hereafter, similar operation is repeated. The contents of the register 4 are transferred to a register 11 and the contents of the register 9 are transferred to a register 12. Thus, the contents of the register 11 is the minimum value of n elements and the contents of the register 12 are equal to the element number.

Description

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

従来技術 従来、科学技術計算においては配列データを扱う場合が
非常に多い。配列データに対する演算はしばしばそれぞ
れの要素に対する同一の演算のくり返えしとなる。従来
の情報処理システムにおいてはこのくシ返えしを分岐命
令を用いて特定の命令シニケンスをループさせることに
よシ実現しているりしかしこの方法による演算ではイン
デックスレジスタの確定待ち等による遅れがsb、分岐
命令などの余分な命令が必要であるだめ、実行時間が速
くならないという欠点がある。この欠点を無くすための
一方法として配列データを専門に扱う命令、いわゆるベ
クトル命令が使用されることがある。このベクトル命令
は1つの配列に対する演算を1命令で行い、しかもルー
プ制御用の分岐命令やインデックスレジスタの確定待ち
もkいため、高速に演算を行うことが可能である。配列
データに対する演算のうちで配列データの要素の最小値
または最小要素の要素番号をめるような演算もよく使用
される。たとえば[2つの同じ要素数を持った配列Aと
Bにおいて、配列Aの最小値を持った要素を対応する配
列Bの要素と入れかえる」という問題を実行する場合に
は最小要素の要素番号をめることが必要である。また配
列要素の最小値そのものが必要な場合もある。しかし従
来のベクトル命令では配列要素の最小値と最小要素の要
素番号を同時にめることができなかったため下記のよう
な欠点がある。すなわち、最小値のみをめる命令ては前
述の「要素の入れかえ」という動作を行うことができな
い。まだ最大要素の要素番号のみをめる命令では最小値
そのものはまらないため、最小値そのものか必要な場合
にはめられた要素番号をもとにして主記憶装置から対応
する要素を読み出す必要がある。
Prior Art Conventionally, array data is often handled in scientific and technical calculations. Operations on array data often involve repeating the same operation on each element. In conventional information processing systems, this reversal is achieved by looping a specific sequence of instructions using a branch instruction. , the disadvantage is that the execution time is not faster because extra instructions such as branch instructions are required. One way to eliminate this drawback is to use instructions that specialize in array data, so-called vector instructions. This vector instruction performs an operation on one array in one instruction, and there is also no need to wait for a branch instruction for loop control or confirmation of an index register, so the operation can be performed at high speed. Among operations on array data, operations that calculate the minimum value of the elements of array data or the element number of the minimum 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 minimum value of array A with the corresponding element of array B'', use the element number of the minimum element. It is necessary to There are also cases where the minimum value of the array elements itself is required. However, conventional vector instructions cannot simultaneously set the minimum value of an array element and the element number of the minimum element, resulting in the following drawbacks. In other words, the above-mentioned "element replacement" operation cannot be performed with an instruction that only calculates the minimum value. Since the minimum value itself is not fitted with the instruction to only read the element number of the largest element, it is necessary to read the corresponding element from the main memory based on the minimum value itself or, if necessary, the fitted element number.

発明の目的 本発明の目的は上記欠点を解決するため、1命令で配列
要素の最小値および最小要素の要素番号をめる方法を提
供することにある。
OBJECTS OF THE INVENTION An object of the present invention is to provide a method for calculating the minimum value of array elements and the element number of the minimum element using one instruction in order to solve the above-mentioned drawbacks.

発明の構成 本発明による配列要素の最小値および最小要素の要素番
号をめる方法は、演算のPji類を指定するオペレージ
百ンコードフイールドと配列の先頭要素のアドレスを指
定するアドレス指定フィールドと要素間の距離を指定す
る要素間距離指定フィールドと演算を行う要素数nを指
定する要素数指定フィールドとを有する命令語に従って
主記憶装置から配列要素を読み出し、読み出された配列
要素の1番目(i二112+n)までの要素のうちの最
小値を第1の保持手段に格納し、最小値を有する要素の
要素番号を第2の保持手段に格納しておき、前記第1の
保持手段の内容と(i+1 )番目の要素を比較しくi
+1)番目の要素の方が小さい値を持つ場合にはその値
を前記第1の保持手段に格納するとともに(i+1)番
目の要素の要素番号を前記第2の保持手段に格納し、n
番目の要素までの比較が終了した時点で前記第1の保持
手段の内容を第1のレジスタに格納し、さらに前記第2
の保持手段の内容を第2のレジスタに格納する手順から
成る。
Structure of the Invention The method of calculating the minimum value of an array element and the element number of the minimum element according to the present invention uses an operation code field that specifies the Pji class of the operation, an address specification field and element that specifies the address of the first element of the array. An array element is read from the main memory according to the instruction word having an inter-element distance specification field that specifies the distance between the elements, and an element count specification field that specifies the number n of elements to be operated on, and the first of the read array elements ( The minimum value of the elements up to i2112+n) is stored in the first holding means, the element number of the element having the minimum value is stored in the second holding means, and the contents of the first holding means are stored. Compare the (i+1)th element with i
+1)th element has a smaller value, stores that value in the first holding means, stores the element number of the (i+1)th element in the second holding means, and stores the element number of the (i+1)th element in the second holding means;
When the comparison up to the th element is completed, the contents of the first holding means are stored in the first register, and the contents of the second holding means are stored in the first register.
This consists of a procedure for storing the contents of the holding means in the second register.

次に本発明の一実施例について図面を参照して説明する
。第1図を参照すると・本発明の方法を具体化して実施
した情報処理装置は、主記憶装置1、メモリバッファユ
ニット2.セレクタ3.レジスタ4および5.比較回路
6.制御ユニット7゜レジスタ8および9.アンドゲー
ト10.レジスタ11および12.およびセレクタ13
から構成されている。前記主記憶装置1にはプログラム
およびデータが格納されている。前記主記憶装置1には
信号#101を介してデータが省き込まれるとと本に信
号線102を介してその内容が読み出される。前記メモ
リバッファユニット2は前記主記憶装置lに対す読み出
しアクセスおよび書き込みアクセスを行うユニットであ
る。前記主記憶装置1から読み出されたデータは前記メ
モリバッフ丁−ユニット2.信号線103.および前記
セレクタ3を介してレジスタ4に転送される#1か、信
号8103を介してレジスタ5に直接転送される〇前記
比較回路6I/i、前記レジスタ4の内容と、前記レジ
スタ5の内容とを比較し、その結果を信号線108に出
力する。すなわち前記レジスタ4に格納されている値よ
シも前記レジスタ5に格納されている値の方が小さい場
合に信号線108は「1」となる。前記制御ユニット7
は本発、明による方法によシ第1図の回路を制御するだ
めのユニットである。第4図を参照すると、前記制御ユ
ニット7は命令先取シ制御回路701.命令先取シバッ
7丁702.第1命令レジスタ7031第2命令レジス
タ704.インデックスレジスタファイル705 、セ
レクタ706および707.実効アドレスアダー708
.実効アドレスレジスタ709゜ベースアドレスレジス
タ710.ベースアドレスアダー711.仮想アドレス
レジスタ712.マイクロアドレス制御回路713.制
御記憶714゜マイクロ命令レジスタ715.要素数レ
ジスタ716 、およびゼロ検出回路717を有してい
る。
Next, an embodiment of the present invention will be described with reference to the drawings. Referring to FIG. 1, an information processing apparatus embodying the method of the present invention includes a main storage device 1, a memory buffer unit 2. Selector 3. Registers 4 and 5. Comparison circuit 6. Control unit 7° registers 8 and 9. ANDGATE 10. Registers 11 and 12. and selector 13
It consists of The main storage device 1 stores programs and data. When data is written into the main memory 1 via signal #101, the contents are read out via signal line 102. The memory buffer unit 2 is a unit that performs read access and write access to the main memory device 1. The data read from the main memory device 1 is stored in the memory buffer unit 2. Signal line 103. #1 is transferred to the register 4 via the selector 3, or directly transferred to the register 5 via the signal 8103. and outputs the result to the signal line 108. That is, when the value stored in the register 5 is smaller than the value stored in the register 4, the signal line 108 becomes "1". The control unit 7
is a unit for controlling the circuit of FIG. 1 according to the method according to the present invention. Referring to FIG. 4, the control unit 7 includes an instruction preemption control circuit 701. Order preemption Shibat 7 702. First instruction register 7031 second instruction register 704. Index register file 705, selectors 706 and 707. Effective address adder 708
.. Effective address register 709°Base address register 710. Base address adder 711. Virtual address register 712. Microaddress control circuit 713. Control memory 714° microinstruction register 715. It has an element number register 716 and a zero detection circuit 717.

この制御ユニット7は次のような動作を行なう・命令先
取シ制御回路701から思号線116を介してメモリバ
ッファユニット2に送られる命令断取シ出し要求に応答
して、ユニット2から信号線117を介して命令語が読
み出され、命令先取シバッ7ア702に格納される。命
令先取シバッ7丁702からは、処理すべき命令語が順
次読み出される。読み出された命令が本発明の命令であ
る場合、第1命令レジスタ703に命令の1番目の語・
第2命令レジスタ704に命令の2番目の語がセットさ
れる。配列データの先頭の要素の実効アドレスは、命令
語のソフィールドの(f[(ト、MPフィールドで指定
されるインデックスレジスタの値を加算することによシ
得られる。インデックスレジスタは合計8個あり、イン
デックスレジスタファイル705に格納さrしている。
This control unit 7 performs the following operations. In response to an instruction preemption request sent from the instruction preemption control circuit 701 to the memory buffer unit 2 via the signal line 116, the control unit 7 The instruction word is read out via the instruction buffer 702 and stored in the instruction prefetch buffer 702. Instruction words to be processed are sequentially read from the instruction pre-fetcher 702. If the read instruction is an instruction of the present invention, the first word of the instruction is stored in the first instruction register 703.
Second instruction register 704 is set with the second word of the instruction. The effective address of the first element of the array data can be obtained by adding the values of the index registers specified by the (f[(t) and MP fields of the instruction word Sofield.There are a total of 8 index registers. , are stored in the index register file 705.

また実効アドレスの生成は実効アドレスアダー708に
よシ行われる。生成された実効アドレスは実効アドレス
レジスタ709に格納さ、れる。実効アドレスレジスタ
709の内容はベースアドレスアダー711によってベ
ースアドレスレジスタ710の内容ト加算され仮想アド
レスレジスタ712に格納される。仮想アドレスレジス
タ712の内容は信号線118によりメモリバッファユ
ニット2へ送られる。メモリバッファユニット2ではア
ドレス変換を行った後、配列要素の読み出しアドレスと
して使用される。2番目以降の要素の読み出しアドレス
の生成は、1つ前の要素のアドレスに命令語のVlフィ
ールドの値を加算することにょ夛求返られる。この加算
は実効アドレスアダー708により行われ、その入力の
切シがえはセレクタ706およびセレクタ707によシ
行われる。
Further, generation of an effective address is performed by an effective address adder 708. The generated effective address is stored in the effective address register 709. 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. The contents of virtual address register 712 are sent to memory buffer unit 2 by signal line 118. After address conversion is performed in the memory buffer unit 2, the address is used as a read address of an array element. Generation of read addresses for the second and subsequent elements is accomplished by adding the value of the Vl field of the instruction word to the address of the previous element. This addition is performed by effective address adder 708, and switching of its input is performed by selector 706 and selector 707.

一方、第1命令レジスタ703のOFフィールドはマイ
クロアドレス制御回路713に送られる。
On the other hand, the OF field of the first instruction register 703 is sent to the microaddress control circuit 713.

マイクロアドレス制御回路713ではオペレーションコ
ードに対応してマイクロ命令の先頭アドレスが生成され
、制御記憶714からマイクロ命令が読み出され、マイ
クロ命令レジスタ715にセットされる。以降のマイク
ロ命令の読み出しはマイクロ令の分岐制御フィールドの
情報をもとにして行われる。第2命令レジスタ7040
RNフイールドで指定されるインデックスレジスタには
配列データの要素数が格納されておシ、その値は要素数
レジスタ716にセットされる。要素数レジスタ716
の値は1要素の処理が終了する毎に・1ずつカウントダ
ウンされ、全要素の処理が終了した時にゼロとなる。こ
れはゼロ検出回路717で極用され、マイクロアドレス
制御回路713へ送られ、マイクロ命令の分岐条件とな
る。
The micro-address control circuit 713 generates the start address of the micro-instruction in accordance with 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 7040
The number of elements of the array data is stored in the index register specified by the RN field, and the value is set in the number of elements register 716. Element number register 716
The value is counted down by 1 each time the processing of one element is completed, and becomes zero when the processing of all elements is completed. This is used by the zero detection circuit 717, sent to the microaddress control circuit 713, and becomes a branch condition for the microinstruction.

前記レジスタ8は前記制御ユニット7の指示に従ってそ
の内容が「1」 つつ増加される。前記レジスタ9は前
記制御ユニット7の指示に従って前記レジスタ8の出力
がセットされる。前記レジスタ11へは前記レジスタ4
の内容がセットされ、前記レジスタ12には前記レジス
タ9の内容がセットされる。前記レジスタ11およびレ
ジスタ12の内容は前記セレクタ13にょシ切シがえら
れ、前記メモリバッファユニット2を介して主記憶装置
1に書き込まれる。
The contents of the register 8 are incremented by "1" according to instructions from the control unit 7. The output of the register 8 is set in the register 9 according to instructions from the control unit 7. The register 4 is connected to the register 11.
The contents of the register 9 are set in the register 12. The contents of the registers 11 and 12 are obtained by the selector 13 and written to the main memory 1 via the memory buffer unit 2.

′本発明の方法によシ主記憶装置1に格納−されている
配列データの要素の最小値および最小要素をめるための
処理動作は第2図のフローチャートに示され、以下の順
序で行われる。
'The processing operations for determining the minimum value and minimum element of the array data stored in the main storage device 1 according to the method of the present invention are shown in the flowchart of FIG. 2, and are performed in the following order. be exposed.

制御ユニット7から信号線116を介して命令断取シ出
し要求がメモリバッファユニット2に出力されると主記
憶装置1から実行すべき命令の命令語が読み出されてメ
モリバッファユニット2および信号線117を介して制
御ユニット7に送られる。制御ユニット7では取り出さ
れた命令語の解読が行われる。今、取シ出された命令語
が本発明の方法を使用して配列要素の最小′値および最
小要素をめるような命令を示している場合を考える。こ
の命令語は2ワード(=72ビット)の長さを持ち、第
3図に示すような形式を持っている。
When a request for discarding an instruction is output from the control unit 7 to the memory buffer unit 2 via the signal line 116, the command word of the instruction to be executed is read from the main memory 1 and sent to the memory buffer unit 2 and the signal line. 117 to the control unit 7. The control unit 7 decodes the extracted command word. Now, consider the case where the extracted instruction word indicates an instruction to find the minimum value and minimum 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.

第3図においてUPはオペレーションコードフィールド
で、演算の種類を指定している。Yは配列要素の先頭ア
ドレスを指定するだめのアドレスフィールドであシ、ア
ドレス修飾フィールドMPによシ指定されたアドレス修
飾がアドレスフィールドYの値に対して#1とこされ、
その結果の値が要素の先頭アドレスを表わしている。〜
■!はとなシ合う要素同志のアドレスの差すなわち要素
間距離を指定し、RNは要素数が格納されているレジス
タを指定している。制御ユニット7によシ本命令が解読
されると、まず先頭要素のアドレス計算が行われ、その
計算結果のアドレスから先頭要素が読み出される。先頭
要素の読み出しは命令語の読み出しと同様に主記憶装置
1からメモリバッファユニット2を介して行われる。読
み出されたデータは信号憩103を介してレジスタ4お
よびレジスタ5にセットされる。この時にはセレクタ3
は信号#105の内容によシ制御され、信号線103の
内容を選択するようになっている。要素番号は「0」 
から始まっているため、先頭要素がレジスタ4およびレ
ジスタ5にセットされた時にレジスタ8は「0」にクリ
アされ、以後要素が読み出される毎に「1」づつカウン
トアツプされる。2番目の要素(要素番号「1」 )の
アドレスは先頭要素Gアドレスに要素間距離を加算して
得られる。
In FIG. 3, UP is an operation code field that specifies the type of operation. Y is an address field for specifying the first address of the array element, and the address modification specified by the address modification field MP is passed to the value of address field Y as #1,
The resulting value represents the start address of the element. ~
■! It specifies the difference in addresses between elements that match each other, 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 address of the first element is first calculated, and the first element is read from the address resulting from the calculation. Reading of the leading element is performed from the main memory device 1 via the memory buffer unit 2 in the same manner as reading of the command word. The read data is set in register 4 and register 5 via signal interrupter 103. At this time selector 3
is controlled by the content of signal #105, and selects the content of signal line 103. Element number is "0"
Since the first element is set in registers 4 and 5, register 8 is cleared to "0", and thereafter is counted up by "1" each time an element is read out. The address of the second element (element number "1") is obtained by adding the inter-element distance to the first element G address.

こうして得られた主記憶装置1のアドレスから2番目の
要素が読み出され、レジスタ5ヘセツトされる。このと
きレジスタ4の制御は次のように行われる。すなわち比
較回路6にょシレジスタ4とレジスタ5との内容が比較
され、レジスタ5に入っているデータの値の方が小さい
場合には信号線108がrlJ となる・またセレクタ
3は信号線104すなわちレジスタ5の内容を選択する
ように制御される。レジスタ5に2番目の要素がセット
−aれるときに目、信号線to6(、レジスタ5のセッ
ト信号)が「1」となるが、このとき信号線107も「
1」となる。アンドゲート10によシ信号線107の内
容と信号線10Bの内容との論理積がとられ、その出力
である信号線109が11」 となった場合にはレジス
タ4にはレジスタ5の内容が移されるとともにレジスタ
9にはレジスタ8の内容が移される。同様にして3番目
からn番目までの要素が順番に読み出され、前記のよう
な処理がくシ返えされる。こうして最終的にレジスタ4
に格納されている値はn個の要素の値のうちの最lJS
値であJルジスタ9に格納されている値は、最小値を持
つ要素の「0」から始まる要素番号に等しい。レジスタ
4の内容はさらにレジスタ11に転送され、レジスタ9
の内容はレジスタ12に転送されて本命令に終了する。
The second element is read from the address of main memory 1 thus obtained and set in register 5. At this time, register 4 is controlled as follows. In other words, the contents of register 4 and register 5 are compared in comparison circuit 6, and if the value of data in register 5 is smaller, signal line 108 becomes rlJ. Also, selector 3 selects signal line 104, that is, register 5. It is controlled to select the contents of 5. When the second element is set to register 5, the signal line to6 (the set signal of register 5) becomes "1", but at this time, the signal line 107 also becomes "1".
1”. The contents of the signal line 107 and the contents of the signal line 10B are ANDed by the AND gate 10, and when the output signal line 109 becomes 11'', the contents of the register 5 are stored in the register 4. At the same time, the contents of register 8 are transferred to register 9. Similarly, the third to nth elements are read out in order, and the above-described processing is repeated. In this way, finally register 4
The value stored in is the most lJS of n element values.
The value stored in the J register 9 is equal to the element number starting from "0" of the element having the minimum value. The contents of register 4 are further transferred to register 11, and register 9
The contents of are transferred to the register 12, and this instruction ends.

レジスタ11およびレジスタ12の内容は信号線115
を通してメモリバッファユニット2に転送され、主記憶
装置1へ書き込むことができるt念か、他の命令によシ
使用することができる。
The contents of register 11 and register 12 are transferred to signal line 115.
The data is transferred to the memory buffer unit 2 through the memory buffer unit 2 and can be written to the main memory 1 or used by other instructions.

発明の効果 本発明に祉配列要素の最小値および最小要素の要素番号
を1命令でめることができるためプログラムのステップ
数を減らすことが可能と16、従って処理が高速に行え
るという効果がある。
Effects of the Invention The present invention has the effect that the minimum value of an array element and the element number of the minimum element can be determined with one instruction, thereby reducing the number of steps in a program.16 Therefore, processing can be performed at high speed. .

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

第1図は本発明の一実施例を示す図、第2図は第1図の
回路の動作を示すフローチャート、第3図は第2図に示
された動作を指示するための命令語の形式を表わす図お
よび第4図は第4図の制御ユニット7の詳細な構成を示
す図である。 第1図から第4図において、1・・・・主記憶装置、2
・・・・・・メモリハッファユニッ)、3.13・・・
・・セレクタ、4,5,8,9.11.12・・・・・
・レジスタ、6・・・・比較回路、7・・・・・・制御
ユニット、10・・・・・アンドゲート、701・・・
・・・命令先取シ制御回路、702・・・・・・命令先
取シバラフ了、703・・・・・第1命令レジスタ、7
04・・・・・・第2命令レジスタ、7o5・・・・・
・インデックスレジスタ7了イル、706.707・・
・・・セレクタ、708 ・・・・実効アドレスアダー
、709 ・・・実効アドレスレジスタ、710 ・・
ベースアドレスレジスタ、711ベースアドレスアダー
、712・・・・仮想アドレスレジスタ、713・・・
・・マイクロアドレス制御回路、714・・・・・・制
御記憶、715・・・・・マイクロ命令レジスタ、71
6・・・・・要素数レジスタ、717・・・・・・ゼロ
検出回路。 午1 図 早2 図 第3 図
FIG. 1 is a diagram showing an embodiment of the present invention, FIG. 2 is a flowchart showing the operation of the circuit shown in FIG. 1, and FIG. 3 is a format of a command word for instructing the operation shown in FIG. 2. and FIG. 4 are diagrams showing a detailed configuration of the control unit 7 in FIG. 4. In FIGS. 1 to 4, 1...main storage device, 2
...Memory Huffer Unit), 3.13...
...Selector, 4, 5, 8, 9.11.12...
・Register, 6... Comparison circuit, 7... Control unit, 10... AND gate, 701...
...Instruction prefetch control circuit, 702...Instruction prefetch completion, 703...First instruction register, 7
04...Second instruction register, 7o5...
・Index register 7 completed, 706.707...
... Selector, 708 ... Effective address adder, 709 ... Effective address register, 710 ...
Base address register, 711 Base address adder, 712...Virtual address register, 713...
... Micro address control circuit, 714 ... Control memory, 715 ... Micro instruction register, 71
6...Element number register, 717...Zero detection circuit. Noon 1 Figure early 2 Figure 3

Claims (1)

【特許請求の範囲】 それぞれの要素に対して要素番号が付与された配列要素
の最小値および最小要素の要素番号をめる方法であって
、 演算の種類を指定するオペレージ目ンコードフィールド
と配列の先頭要素のアドレスを指定するアドレス指定フ
ィールドと要素間の距離を指定する要素間距離指定フィ
ールドと演算を行なう要素数nを指定する要素数指定フ
ィールドとを有する命令語に従って主記憶装置から配列
要素を読み出す第1のステップと、読み出された配列要
素のi番目(i=1.2.・・・+n)までの要素のう
ちの最小値を第1の保持手段に格納し、最小値を有する
要素の要素番号を第2の保持手段に格納する第2のステ
ップと、前記第1の保持手段の内容と(j+1)番目の
要素を比較するM3のステップと、(j+1 )番目の
要素の方が小さい値を持つ場合にはその値を前記第1の
保持手段に格納するとともに(i+1)番目の要素の要
素番号を前記第2の保持手段に格納する第4のステップ
と、n番目の要素までの比較が終了した時点で前記第1
の保持手段の内容を第1のレジスタに格納する第5のス
テップと、さらに前記第2の保持手段の内容を第2のレ
ジスタに格納する第6のステップとを含むことを特徴と
する配列要素の最小値および最小要素の要素番号をめる
方法。
[Claims] A method for calculating the minimum value of array elements in which each element is given an element number, and the element number of the minimum element, comprising an operation code field that specifies the type of operation and an array. An array element is extracted from the main memory according to an instruction word that has an address specification field that specifies the address of the first element of , an inter-element distance specification field that specifies the distance between elements, and a number-of-elements specification field that specifies the number n of elements to be operated on. The first step is to read out the minimum value of the elements up to the i-th (i=1.2...+n) of the read array elements, and store the minimum value in the first holding means. a second step of storing the element number of the element having in the second holding means; a step M3 of comparing the contents of the first holding means with the (j+1)th element; a fourth step of storing the smaller value in the first holding means and storing the element number of the (i+1)th element in the second holding means; When the comparison up to the element is completed, the first
an array element characterized by comprising: a fifth step of storing the contents of the holding means in the first register; and a sixth step of storing the contents of the second holding means in the second register. How to calculate the minimum value of and the element number of the minimum element.
JP58216636A 1983-11-17 1983-11-17 Method for finding the minimum value of array elements and element number of the minimum element Pending JPS60108973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58216636A JPS60108973A (en) 1983-11-17 1983-11-17 Method for finding the minimum value of array elements and element number of the minimum element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58216636A JPS60108973A (en) 1983-11-17 1983-11-17 Method for finding the minimum value of array elements and element number of the minimum element

Publications (1)

Publication Number Publication Date
JPS60108973A true JPS60108973A (en) 1985-06-14

Family

ID=16691538

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58216636A Pending JPS60108973A (en) 1983-11-17 1983-11-17 Method for finding the minimum value of array elements and element number of the minimum element

Country Status (1)

Country Link
JP (1) JPS60108973A (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
JPH0374434B2 (en)
EP0378415A2 (en) Multiple instruction dispatch mechanism
JPH0348536B2 (en)
US4812970A (en) Microprogram control system
JPS60108973A (en) Method for finding the minimum value of array elements and element number of the minimum element
JPH0363092B2 (en)
JP2553200B2 (en) Information processing device
JPS6055864B2 (en) vector processor
JPS6217773B2 (en)
JPS60110036A (en) Method for obtaining maximum value of array element and number of maximum element
JP2772100B2 (en) Parallel instruction fetch mechanism
JPH07110769A (en) Vliw type computer
JP2812610B2 (en) Pipeline control method
JPS60105043A (en) Information processing system
JP2583614B2 (en) Vector arithmetic unit
JPS5925264B2 (en) Vector instruction processing method
JPS6116111B2 (en)
JPS62226336A (en) Microprogram control system
JPS6031646A (en) Data processor
JPH0552533B2 (en)
JPH08297583A (en) Processor and method for interruption processing
JPS59223846A (en) Arithmetic processor
JPS5896346A (en) Hierarchical arithmetic system
JPH01223565A (en) Information processor
JPH03164945A (en) Data processor