JPS59146342A - Loop control system - Google Patents
Loop control systemInfo
- Publication number
- JPS59146342A JPS59146342A JP2013583A JP2013583A JPS59146342A JP S59146342 A JPS59146342 A JP S59146342A JP 2013583 A JP2013583 A JP 2013583A JP 2013583 A JP2013583 A JP 2013583A JP S59146342 A JPS59146342 A JP S59146342A
- Authority
- JP
- Japan
- Prior art keywords
- loop
- address
- counter
- match
- operand
- 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
Links
- 238000001514 detection method Methods 0.000 claims description 9
- 238000000034 method Methods 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/32—Address formation of the next instruction, e.g. by incrementing the instruction counter
- G06F9/322—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
- G06F9/325—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for loops, e.g. loop detection or loop counter
Abstract
Description
【発明の詳細な説明】
(従来技術)
ティジタル計算機の進歩に伴い、信号処理や眞像処理の
分野にも計算機が使用されるようになってきている。こ
のような分野における応用は、概して単純な繰り返し演
算を大容量のデータに対して施す処理が多い。従って、
このような処理の処理時間は次式の如く表現される。DETAILED DESCRIPTION OF THE INVENTION (Prior Art) With the advancement of digital computers, computers have come to be used in the fields of signal processing and true image processing. Applications in such fields generally involve performing simple repetitive operations on large amounts of data. Therefore,
The processing time for such processing is expressed as in the following equation.
処理時間=1データに対する演算時間×データ量一つの
応用においては、データ量はあらかじめ定まっているこ
とが多いため、このような応用の処即時間を減少させる
ためには、1データに対する演算速度を速めることが必
須となってくる。Processing time = calculation time for 1 data × amount of data In applications where the amount of data is often determined in advance, in order to reduce the processing time for such applications, it is necessary to increase the calculation speed for 1 data. It becomes necessary to speed up.
第1図に従来の割算機を用いた場合のこのような応用に
おける繰り返し演9のプログラム例を示す。■はCレジ
スタにループ回数10を設定している。(k゛)は演算
部であり1テータに対する処理に和尚する。■はCレジ
スタの値を1引いている。FIG. 1 shows an example of a program for repeat operation 9 in such an application using a conventional divider. In (2), the number of loops is set to 10 in the C register. (k゛) is an arithmetic unit that handles processing for one data. (2) subtracts 1 from the value of the C register.
■は■の1jt算の結果がOでなければLOOPへ分岐
することを示している。このようなプログラ力において
は1テータの処理の中に■だけでなく■。(2) indicates that if the result of the 1jt calculation in (2) is not O, the process branches to LOOP. In this kind of programming power, there is not only ■ but also ■ in the processing of one data.
■も含壕れている。■It also includes a trench.
すなわち、1データ処理の中には真の演算時間たけでな
くループ制御のための時間が必袈であり、特に演算部が
単純な処理の場合に、ループ制御のための無駄な時間比
率か大きくなるという欠点を有している。In other words, in one data processing, not only the true calculation time but also the time for loop control is necessary, and especially when the processing part is simple, the proportion of wasted time for loop control is large. It has the disadvantage of being
(発明の目的)
本発明の目的は、かXる従来技術の欠点を除去すること
により、演算速度の向上を図ったループ制御方式を提供
することにある。(Object of the Invention) An object of the present invention is to provide a loop control method that improves calculation speed by eliminating the drawbacks of the prior art.
本発明の方式は、プログラムカウンタによりプログラム
を制御するディジタル計p−機において、ループ回数2
公岐アドレス及びループ最終アドレスを指定するループ
セット命令の内容をそれぞれ格納するループ回数格納手
段2公岐アドレス格納手段及びループ最終アドレス格納
手段と、前記プログラムカウンタの内容が前記ループ最
終アドレスと一致することを検出するアドレス一致検出
手段と、前記プログラムカウンタの内容が前記ループ回
数と一致することを検出するループ終了検出手段→とを
備え、前記ループセット命令の実行により前記ループ回
数1公岐先アドレス及びループ最終アドレスをそれぞれ
の格納手段に指定した後、前記アドレス一致検出手段に
よる一致信号により前記ループ終了検出手段を作動させ
該ループ終了検出手段の検出内容により前記分岐先アド
レスを前記プログラムカウンタにセットするか否かを決
定することによシルーグ制御を行うことからなっている
。The method of the present invention is a digital meter that controls the program by a program counter, with a loop count of 2.
Loop count storage means 2 for storing the contents of a loop set instruction specifying a public address and a loop final address, respectively; 2 public address storage means and a loop final address storage means; and the contents of the program counter match the loop final address. and loop end detection means for detecting that the contents of the program counter match the number of loops. and after specifying the final address of the loop to each storage means, the loop end detection means is actuated by a match signal from the address match detection means, and the branch destination address is set in the program counter according to the detection content of the loop end detection means. It consists of performing sirug control by determining whether or not to do so.
(実施例) 以下、本発明について図面を参照して詳細に説明する。(Example) Hereinafter, the present invention will be explained in detail with reference to the drawings.
第2図は本発明の一実施例による繰シ返し演算のプログ
ラム例、第3図は本発明の一実施例による構成を示すブ
ロック図である。第2図において、■はループセット命
令を示し、第1オペランドがループ最終アドレス、第2
オペランドがル−プ回数、第3オペランドが分岐先アド
レスを示す。■は演算部を示す。第3図において、1は
プログラムカウンタ、2は分岐先アドレス格納レジスタ
、3はループカウンタ、斗はアドレス−紙検出器、5は
ループ最終アドレス格納レジスタ、6は演算処理部を示
す。FIG. 2 is an example of a program for repeated calculations according to an embodiment of the present invention, and FIG. 3 is a block diagram showing a configuration according to an embodiment of the present invention. In Figure 2, ■ indicates a loop set instruction, where the first operand is the loop final address and the second operand is the loop set instruction.
The operand indicates the number of loops, and the third operand indicates the branch destination address. ■ indicates a calculation section. In FIG. 3, 1 is a program counter, 2 is a branch destination address storage register, 3 is a loop counter, D is an address-paper detector, 5 is a loop final address storage register, and 6 is an arithmetic processing section.
次にこの実施例の動作を説明する。第2図■の命令の実
行により、第1オペランドの値はル−プ最終アドレス格
納レジスタSに格納され、第2オペランドの内容はルー
プカウンタ3に格納され、第3オペランドの内容は分岐
先アドレス格納レジスタ2に格納され、かつアドレス−
紙検出器4が稼動状態となる。アドレス−紙検出器4ば
、プログラムカウンタ]とループ最終アドレス格納レジ
スタ5の内容の一致を常にチェ・ンクし、もし一致すれ
ばループカウンタ3の値を1つディクリメントする。そ
の演算の結果が0でない場合、分岐先アドレス格納レジ
スタ2の出力をプログラムカウンタ1にセットすること
により、ループが行なわれる。なおこの実施例では、ル
ープカウンタ3がループ回数格納手段とループ終了検出
手段としての動作を行なう。Next, the operation of this embodiment will be explained. By executing the instruction shown in Figure 2, the value of the first operand is stored in the loop final address storage register S, the content of the second operand is stored in the loop counter 3, and the content of the third operand is the branch destination address. Stored in storage register 2 and at address -
The paper detector 4 becomes operational. It is constantly checked whether the contents of the address/paper detector 4, program counter] and the loop final address storage register 5 match, and if they match, the value of the loop counter 3 is decremented by one. If the result of the operation is not 0, the output of the branch destination address storage register 2 is set in the program counter 1, thereby performing a loop. In this embodiment, the loop counter 3 functions as loop count storage means and loop end detection means.
この動作中、演算処理部6では、ループ最終アドレスの
命令を実行可能なので、ル−プ制御と演模処理は並列に
実行されることになる。ル−プカウンタ3の値をディク
リメントし0になった場合は、通常のプログラムカウン
タの動作に従い、プログラムはループより脱出する。こ
の時アドレス一致検出器4は停止する。During this operation, the arithmetic processing section 6 can execute the instruction at the final address of the loop, so that the loop control and the simulation processing are executed in parallel. When the value of the loop counter 3 is decremented and becomes 0, the program exits from the loop according to the normal program counter operation. At this time, the address match detector 4 stops.
(発明の効果)
以上詳細に述べたように、本発明によると、演算制御と
ループ制御が独立に実行できるため、1データ処理時間
が純粋に演算時間だけになり、判に演算が単純な場合に
著しく処理速度が向上すると召う効果が得られる。(Effects of the Invention) As described in detail above, according to the present invention, since calculation control and loop control can be executed independently, one data processing time becomes purely calculation time, and when calculation is relatively simple, The effect of significantly improving processing speed can be obtained.
第1図は従来の繰り返し演pのプログラム例を示す図、
第2図は本発明の一実施例による繰り返し演算のプログ
ラム例を示す図、第3図は本発明の一実施例による構成
を示すブロック図である。
図において、■・・・・・・ルーフ゛回数設定命令、■
・・・・・・演算部、■・・・・・・レジスタディクリ
メント命令、■・・・・・・条件付分岐命令、■・・・
・・・ルーズセット命令、■・・・・・・演算部、1・
・・・・・プログラム・カウンター、2・・・・・・分
岐先アドレス格納レジスター、3・・・・・・ループ・
カウンター、4・・・・・・アドレス検出器、5・・・
・・・ループ最終アドレス格納レジスタ、6・・・・・
・演算処理部。
//′一
層−・。
代理人 弁理士 内 原 晋2− ・;ζへエン
′
MOV C、10−”−−−−−−■DE C
C−−−−−−−−−一■
JNZ LOOp −一−〜−−−−一
−■躬/閉
LODPSET LODP END / C、L
OOP −一−■第2閃FIG. 1 is a diagram showing an example of a program for a conventional iterative operation p.
FIG. 2 is a diagram showing an example of a program for repeated calculations according to an embodiment of the present invention, and FIG. 3 is a block diagram showing a configuration according to an embodiment of the present invention. In the figure, ■... Roof count setting command, ■
...Arithmetic unit, ■...Register decrement instruction, ■...Conditional branch instruction, ■...
... Loose set instruction, ■ ... Arithmetic section, 1.
...Program counter, 2...Branch destination address storage register, 3...Loop...
Counter, 4...Address detector, 5...
...Loop final address storage register, 6...
- Arithmetic processing unit. //' Even more. Agent Patent Attorney Susumu Uchihara 2- ・;
C------------1■ JNZ LOOp -1------1-■Fall/Closed LODPSET LODP END/C,L
OOP -1-■Second flash
Claims (1)
タル期算機において、ループ回数1方岐アドレス及びル
ープ最終アドレスを指定するルーグセソ)命令の内’!
4’cそれぞれ格納するループ回数格納手段2公岐アド
レス格納手段及びループ最終アドレス格納手段と、前記
プログラムカウンタの内容が前記ループ最終アドレスと
一致することを検出するアドレス一致検出手段と、前記
プログラムカウンタの内容が前記ループ回数と一致する
ことを検出するループ終了検出手段→とを備え、前記ル
ープセット命令の実行によジ前記ループ回数2分岐先ア
ドレス及びループ最終アドレスをそれぞれの格納手段に
脂分てした後、前記アドレス一致検出手段による一致信
号により前記ループ終了検出手段を作動させ該ループ終
了検出手段の検出内容により前記分岐先アト、レスを前
記プログラムカウンタにセットするか否かを決定するこ
とによりループ制御を行うことを特徴とするループ制御
方式。In a digital calculator that controls a program using program color/reference, the loop count 1 branch address and loop final address are specified among the instructions.
4'c Loop count storage means for storing 2 common address storage means and loop final address storage means, address coincidence detection means for detecting that the contents of the program counter match the loop final address, and the program counter loop end detection means → for detecting that the contents of the loop match the number of loops; and then actuating the loop end detecting means in response to a match signal from the address match detecting means, and determining whether or not to set the branch destination AT and RES in the program counter based on the detection contents of the loop end detecting means. A loop control method characterized by performing loop control.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013583A JPS59146342A (en) | 1983-02-09 | 1983-02-09 | Loop control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013583A JPS59146342A (en) | 1983-02-09 | 1983-02-09 | Loop control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS59146342A true JPS59146342A (en) | 1984-08-22 |
Family
ID=12018688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013583A Pending JPS59146342A (en) | 1983-02-09 | 1983-02-09 | Loop control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS59146342A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2586490A1 (en) * | 1985-08-22 | 1987-02-27 | Nec Corp | CONNECTION INSTRUCTION PROCESSING UNIT |
EP0374419A2 (en) * | 1988-12-21 | 1990-06-27 | International Business Machines Corporation | Method and apparatus for efficient loop constructs in hardware and microcode |
US5634047A (en) * | 1993-05-03 | 1997-05-27 | International Business Machines Corporation | Method for executing branch instructions by processing loop end conditions in a second processor |
JP2019530074A (en) * | 2016-09-13 | 2019-10-17 | エイアールエム リミテッド | Apparatus and method for generating and processing a trace stream indicating instruction execution by a processing circuit |
-
1983
- 1983-02-09 JP JP2013583A patent/JPS59146342A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2586490A1 (en) * | 1985-08-22 | 1987-02-27 | Nec Corp | CONNECTION INSTRUCTION PROCESSING UNIT |
EP0374419A2 (en) * | 1988-12-21 | 1990-06-27 | International Business Machines Corporation | Method and apparatus for efficient loop constructs in hardware and microcode |
US5634047A (en) * | 1993-05-03 | 1997-05-27 | International Business Machines Corporation | Method for executing branch instructions by processing loop end conditions in a second processor |
JP2019530074A (en) * | 2016-09-13 | 2019-10-17 | エイアールエム リミテッド | Apparatus and method for generating and processing a trace stream indicating instruction execution by a processing circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS59146345A (en) | Control flow parallel computer system | |
JPH0213333B2 (en) | ||
JPH0786826B2 (en) | Integer division circuit | |
JPS59146342A (en) | Loop control system | |
JP2663287B2 (en) | Method and apparatus for unambiguously evaluating data processor conditions | |
JP2557629B2 (en) | Interrupt method | |
JPS63111535A (en) | Data processor | |
JPS62156738A (en) | Program controller | |
KR100246465B1 (en) | Apparatus and method for reducing cycle of microprocessor stack order | |
JPS5999552A (en) | Microcomputer | |
JPS5971542A (en) | Arithmetic processor | |
JPS6257028A (en) | Branch control system in information processor of pipeline control | |
JPH0679271B2 (en) | Loop control circuit | |
JPS61255422A (en) | Timer controlling circuit | |
JPS6373335A (en) | Information processor | |
JPS61283930A (en) | Information processor | |
JPS63279321A (en) | Microprogram controller | |
JPS5845683A (en) | Program loading system | |
JPH01287742A (en) | Immediate instruction processing system | |
JPH04177532A (en) | Microprocessor | |
JPS625448A (en) | Information history memory system | |
JPS6222155A (en) | Debugging system for information processing unit | |
JPH02226354A (en) | Information processing system | |
JPS6022787B2 (en) | Command control method | |
JP2000305782A (en) | Arithmetic unit |