JP2765893B2 - Loop control device - Google Patents

Loop control device

Info

Publication number
JP2765893B2
JP2765893B2 JP63313348A JP31334888A JP2765893B2 JP 2765893 B2 JP2765893 B2 JP 2765893B2 JP 63313348 A JP63313348 A JP 63313348A JP 31334888 A JP31334888 A JP 31334888A JP 2765893 B2 JP2765893 B2 JP 2765893B2
Authority
JP
Japan
Prior art keywords
instruction
condition
execution
holding
executing
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
Application number
JP63313348A
Other languages
Japanese (ja)
Other versions
JPH02158834A (en
Inventor
尚立 服部
義宏 小沢
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.)
NIPPON DENKI ENJINIARINGU KK
NEC Corp
Original Assignee
NIPPON DENKI ENJINIARINGU KK
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 NIPPON DENKI ENJINIARINGU KK, Nippon Electric Co Ltd filed Critical NIPPON DENKI ENJINIARINGU KK
Priority to JP63313348A priority Critical patent/JP2765893B2/en
Priority to AU46134/89A priority patent/AU617904B2/en
Publication of JPH02158834A publication Critical patent/JPH02158834A/en
Application granted granted Critical
Publication of JP2765893B2 publication Critical patent/JP2765893B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置に利用する。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention is used for an information processing apparatus.

本発明は、指定された条件を検出するまで同一の命令
を繰返し実行するループ命令を行う情報処理装置の制御
手段に関する。
The present invention relates to a control unit of an information processing apparatus that executes a loop instruction for repeatedly executing the same instruction until a specified condition is detected.

〔概要〕〔Overview〕

本発明は、ループする命令を実行する処理装置の制御
手段において、 ループからの脱出条件が検出されるまでこのループを
繰返し実行される命令を連続して実行し、条件が検出さ
れると次の命令の実行を開始させることにより、 命令の実行サイクル間に穴の発生を防止して性能低下
を抑止することができるようにしたものである。
According to the present invention, in a control means of a processing device for executing a looping instruction, instructions repeatedly executed in this loop are continuously executed until a condition for escape from the loop is detected. By starting the execution of the instruction, it is possible to prevent a hole from being generated during the execution cycle of the instruction and to suppress the performance degradation.

〔従来の技術〕[Conventional technology]

従来例装置は、検出する条件、実行内容および条件を
検出した後に行われる命令のアドレスの指示を含む命令
を条件が検出されるまで繰返し取出して実行し、その条
件を検出したときにその命令実行を打切って次の命令の
取出しを行い実行していた。第3図は従来例でのパイプ
ライン動作の一例であり、命令の取出し、デコードおよ
び命令実行の3段のパイプライン構造になっており、サ
イクルe1ないしe3はサイクルf1ないしf3によって同じ命
令が繰返し取出された実行サイクルであり、サイクルe3
で条件の一致が検出された場合にサイクルf5、d4を打切
ってサイクルfNで次の命令の取出しを行い、ひきつづき
デコードおよび命令実行が行われる。
The conventional apparatus repeatedly fetches and executes an instruction including a condition to be detected, an execution content, and an address of an instruction to be executed after detecting the condition until the condition is detected, and executes the instruction when the condition is detected. And the next instruction is fetched and executed. Figure 3 is an example of a pipeline operation of the conventional example, taken out of the instruction, it has become a pipeline structure of three stages of decoding and instruction execution, by to no cycle e 1 e 3 Cycle f 1 to f 3 The execution cycle in which the same instruction is repeatedly fetched, and the cycle e 3
In perform extraction of the next instruction cycle f N are discontinued cycles f 5, d 4 if a match condition is detected, subsequently decoding and instruction execution are performed.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

このような従来例では、ループから抜け出す条件を検
出するまで同じ命令を繰返し取出して命令実行を行い、
条件を検出したときに次の命令を取出して実行するの
で、制御を行う情報処理装置が複数段のパイプラインの
構成になっていて条件の検出および命令実行を行うサイ
クルが複数段のパイプラインのうちの下段(後の段)に
ある場合に条件を検出した実行サイクルと次の命令の実
行サイクルとの間に穴ができて性能低下を招く欠点があ
る。この欠点は、実行サイクルが下段のパイプラインに
ある程顕著になる。第3図の例では2実行サイクルが空
いた穴が生じている。
In such a conventional example, the same instruction is repeatedly fetched and executed until a condition that exits the loop is detected.
When the condition is detected, the next instruction is fetched and executed, so that the information processing device that performs control has a multi-stage pipeline configuration, and the cycle for detecting the condition and executing the instruction is performed in a multi-stage pipeline. In the lower stage (later stage), there is a disadvantage that a hole is formed between the execution cycle in which the condition is detected and the execution cycle of the next instruction, and the performance is reduced. This disadvantage becomes more pronounced as the execution cycle is in the lower pipeline. In the example of FIG. 3, there is a hole with two execution cycles.

本発明はこのような欠点を除去するもので、実行サイ
クルに穴が生じないループ制御装置を提供することを目
的とする。
An object of the present invention is to eliminate such a drawback and to provide a loop control device in which a hole is not generated in an execution cycle.

〔問題点を解決するための手段〕[Means for solving the problem]

本発明は、クロックに応じて命令を実行する命令実行
手段と、この命令実行手段が繰返し実行するデコード済
の第一の命令を保持する第一保持手段と、この第一の命
令の繰返し実行を阻止する阻止条件を保持する第二保持
手段と、この第二保持手段に保持された阻止条件の成立
を検出する検出手段と、この検出手段が阻止条件の成立
の検出後に上記命令実行手段で実行されるデコード済の
第二の命令を保持する第三保持手段とを備えたループ制
御装置において、上記第二の命令の実行が開始されるク
ロックの直前のクロックまで上記第一の命令の実行を継
続させるタイミング制御手段を備えたことを特徴とす
る。
The present invention provides an instruction executing means for executing an instruction in response to a clock, a first holding means for holding a decoded first instruction repeatedly executed by the instruction executing means, and a means for repeatedly executing the first instruction. Second holding means for holding a blocking condition to be blocked, detection means for detecting establishment of the blocking condition held by the second holding means, and execution by the instruction execution means after the detection means detects that the blocking condition is satisfied. And a third holding means for holding a decoded second instruction to be executed, wherein the execution of the first instruction is performed until the clock immediately before the clock at which the execution of the second instruction is started. It is characterized by having timing control means for continuing.

〔作用〕[Action]

指定された条件が検出されるまで同一命令を繰返し実
行し、この条件が検出されるとループから脱出して次の
命令に移る。ところで、本発明は、次の命令の実行が開
始される直前まで同一命令を連続的に実行し、二つの命
令サイクル間の穴の発生を防止し、性能低下を招かない
ようにする。
The same instruction is repeatedly executed until a specified condition is detected, and when this condition is detected, the process exits the loop and moves to the next instruction. By the way, the present invention continuously executes the same instruction until immediately before the execution of the next instruction is started, prevents a hole between two instruction cycles from occurring, and prevents performance degradation.

〔実施例〕 以下、本発明の一実施例について図面を参照して説明
する。第1図はこの実施例の構成を示すブロック構成図
である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of this embodiment.

この実施例は、第1図に示すように、条件が検出され
るまで繰返し行われるデコード済の命令および検出する
条件を保持する第一レジスタ1と、条件が検出された後
行う次のデコード済の命令を保持する第二レジスタ2
と、保持されている条件を検出する条件検出手段3と、
保持されている命令を実行する命令実行手段4と、ルー
プ回数を計数するループカウンタ5と、第二レジスタ2
に保持されている命令の実行開始を延ばすタイミング制
御回路6とを備える。すなわち、この実施例は、クロッ
クに応じて命令を実行する命令実行手段4と、この命令
実行手段4が繰返し実行するデコード済の第一の命令を
保持する第一保持手段およびこの第一の命令の繰返し実
行を阻止する阻止条件を保持する第二保持手段を有する
第一レジスタ1と、この第二保持手段に保持された阻止
条件の成立を検出する検出手段である条件検出手段3
と、この検出手段が阻止条件の成立の検出後に上記命令
実行手段で実行されるデコード済の第二の命令を保持す
る第三保持手段である第二レジスタ2と、上記第二の命
令の実行が開始されるクロックの直前のクロックまで上
記第一の命令の実行を継続させるタイミング制御回路6
とを備える。
As shown in FIG. 1, this embodiment includes a first register 1 for holding a decoded instruction repeatedly executed until a condition is detected and a condition to be detected, and a next decoded instruction to be executed after the condition is detected. Second register 2 holding the instruction of
Condition detecting means 3 for detecting a held condition;
Instruction execution means 4 for executing the held instruction; a loop counter 5 for counting the number of loops;
And a timing control circuit 6 for extending the start of execution of the instruction stored in the memory. That is, in this embodiment, an instruction executing means 4 for executing an instruction in accordance with a clock, a first holding means for holding a decoded first instruction repeatedly executed by the instruction executing means 4, and a first instruction A first register 1 having a second holding means for holding a blocking condition for preventing the repetitive execution of the above, and a condition detecting means 3 as a detecting means for detecting establishment of the blocking condition held by the second holding means.
A second register 2 serving as a third holding unit for holding a decoded second instruction executed by the instruction execution unit after the detection unit detects the establishment of a blocking condition; and executing the second instruction. Control circuit 6 for continuing the execution of the first instruction until the clock immediately before the clock at which
And

次に、この実施例の動作を説明する。ループカウンタ
5が計数値「0」になるまで同じ命令を繰返し実行する
場合に、第一レジスタ1からループカウンタ5の計数値
「0」という条件およびループカウンタ5の現行の計数
値とが条件検出手段3に入力され、条件が一致したか否
かを確認しその結果を命令実行手段4へ出力する。ま
た、命令実行手段4は第一レジスタ1から与えられたデ
コードされた命令を条件検出手段3から入力した一致結
果が不一致の場合に実行し、同時にループカウンタ5の
更新を行う。ここで、この更新内容は第一レジスタ1に
ある命令により与えられる。このように命令実行手段4
は条件検出手段3から条件が一致したことを検出される
まで第一レジスタ1にある命令を実行し続ける。そし
て、ループカウンタ5の計数値が「0」になったときに
条件検出手段3は条件が一致したことを検出して命令実
行をマスクして無演算化する。また、同時にタイミング
制御回路6は条件検出手段3から条件の一致を検出して
第二レジスタ2ある次のデコードされた命令を第一レジ
スタ1にロードする。そして、第二レジスタ2の命令が
第一レジスタ1にロードされると、第二レジスタ2に保
持されていた次の命令が実行される。
Next, the operation of this embodiment will be described. When the same instruction is repeatedly executed until the loop counter 5 reaches the count value “0”, the condition that the condition of the count value “0” of the loop counter 5 from the first register 1 and the current count value of the loop counter 5 are detected. It is input to the means 3 and checks whether or not the conditions are matched, and outputs the result to the instruction execution means 4. Further, the instruction executing means 4 executes the decoded instruction given from the first register 1 when the matching result inputted from the condition detecting means 3 is not matched, and updates the loop counter 5 at the same time. Here, this update content is given by an instruction in the first register 1. Thus, the instruction execution means 4
Keeps executing the instruction in the first register 1 until the condition detecting means 3 detects that the condition is matched. Then, when the count value of the loop counter 5 becomes "0", the condition detecting means 3 detects that the condition has been matched, masks the execution of the instruction, and eliminates the operation. At the same time, the timing control circuit 6 detects a condition match from the condition detecting means 3 and loads the next decoded instruction in the second register 2 into the first register 1. When the instruction in the second register 2 is loaded into the first register 1, the next instruction held in the second register 2 is executed.

第2図は本発明におけるパイプライン動作の一例であ
り、命令の取出し、デコードおよび命令実行の3段のパ
イプライン構造になっており、サイクルe11およびe12
条件が不一致のためにループしている実行サイクルであ
り、サイクルe13は条件の一致を検出して無演算化して
いるサイクルである。そして、次のタイミングで次の命
令の実行サイクルeNが行われる。従来例とこの実施例と
のパイプライン動作には2クロックの性能差がある。
Figure 2 is an example of a pipeline operation in the present invention, instruction fetching, it has become a pipeline structure of three stages of decoding and instruction execution, the cycle e 11 and e 12 loops because the condition is mismatched and a run cycle is the cycle e 13 is a cycle that NOP of detecting a match condition. Then, at the next timing, the execution cycle e N of the next instruction is performed. The pipeline operation between the conventional example and this embodiment has a performance difference of two clocks.

〔発明の効果〕〔The invention's effect〕

本発明は、以上説明したように、指定された条件が検
出されるまで同じ命令を繰返し実行して次の命令の実行
開始を延ばすことにより、条件を検出した実行サイクル
と次の命令の実行サイクルとを連続して実行できる効果
がある。
As described above, the present invention repeatedly executes the same instruction until a designated condition is detected to extend the start of execution of the next instruction, thereby executing the execution cycle in which the condition is detected and the execution cycle of the next instruction. Has the effect of being able to execute continuously.

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

第1図は本発明実施例の構成を示すブロック構成図。 第2図は本発明実施例の動作を示すタイムチャート。 第3図は従来例の動作を示すタイムチャート。 1……第一レジスタ、2……第二レジスタ、3……条件
検出手段、4……命令実行手段、5……ループカウン
タ、6……タイミング制御回路。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a time chart showing the operation of the embodiment of the present invention. FIG. 3 is a time chart showing the operation of the conventional example. 1 ... first register, 2 ... second register, 3 ... condition detecting means, 4 ... instruction executing means, 5 ... loop counter, 6 ... timing control circuit.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 9/38 G06F 9/32──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 9/38 G06F 9/32

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】クロックに応じて命令を実行する命令実行
手段と、 この命令実行手段が繰返し実行するデコード済の第一の
命令を保持する第一保持手段と、 この第一の命令の繰返し実行を阻止する阻止条件を保持
する第二保持手段と、 この第二保持手段に保持された阻止条件の成立を検出す
る検出手段と、 この検出手段が阻止条件の成立の検出後に上記命令実行
手段で実行されるデコード済の第二の命令を保持する第
三保持手段と を備えたループ制御装置において、 上記第二の命令の実行が開始されるクロックの直前のク
ロックまで上記第一の命令の実行を継続させるタイミン
グ制御手段 を備えたことを特徴とするループ制御装置。
1. An instruction executing means for executing an instruction according to a clock, a first holding means for holding a decoded first instruction repeatedly executed by the instruction executing means, and a repetitive execution of the first instruction Second holding means for holding a blocking condition for blocking, detecting means for detecting establishment of the blocking condition held by the second holding means, and detecting the satisfaction of the blocking condition by the detecting means. And a third holding means for holding a decoded second instruction to be executed, wherein the execution of the first instruction is executed until a clock immediately before a clock at which the execution of the second instruction is started. A loop control device comprising timing control means for continuing the control.
JP63313348A 1988-12-12 1988-12-12 Loop control device Expired - Lifetime JP2765893B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63313348A JP2765893B2 (en) 1988-12-12 1988-12-12 Loop control device
AU46134/89A AU617904B2 (en) 1988-12-12 1989-12-12 Information processing system operable without useless time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63313348A JP2765893B2 (en) 1988-12-12 1988-12-12 Loop control device

Publications (2)

Publication Number Publication Date
JPH02158834A JPH02158834A (en) 1990-06-19
JP2765893B2 true JP2765893B2 (en) 1998-06-18

Family

ID=18040169

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63313348A Expired - Lifetime JP2765893B2 (en) 1988-12-12 1988-12-12 Loop control device

Country Status (2)

Country Link
JP (1) JP2765893B2 (en)
AU (1) AU617904B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0485627A (en) * 1990-07-30 1992-03-18 Matsushita Electric Ind Co Ltd Conditional branching instruction control method

Also Published As

Publication number Publication date
JPH02158834A (en) 1990-06-19
AU617904B2 (en) 1991-12-05
AU4613489A (en) 1990-06-14

Similar Documents

Publication Publication Date Title
JP2943464B2 (en) Program control method and program control device
US5790843A (en) System for modifying microprocessor operations independently of the execution unit upon detection of preselected opcodes
JP2765893B2 (en) Loop control device
JPH0654476B2 (en) Control memory error correction control method
JPH04288625A (en) Microcomputer
JPH0212429A (en) Information processor with function coping with delayed jump
JPH0573296A (en) Microcomputer
JPS60124746A (en) Data processing unit
JPH0328928A (en) Loop control system
JP2833259B2 (en) Program repeat control method and program repeat control device
JP3057732B2 (en) Information processing device
JPH04275635A (en) Constant cycle processing system
JPH02259845A (en) Processor
JPS5952349A (en) Instruction pre-fetch controller
JPH04245332A (en) Data processor
JPH05108384A (en) Microprocessor
JPS60178524A (en) One-chip microcomputer
JPH0581041A (en) Information processor
JPH05216701A (en) Recovery time adjusting circuit for input/output instruction
JPH0561671A (en) Microprogram control circuit
JP2005135089A (en) Processor
JPH01286034A (en) Information processor
JPH05143321A (en) Performance adjusting circuit
JPH0378832A (en) Data processor
JPH06110687A (en) Information processing device and information processing method

Legal Events

Date Code Title Description
S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080403

Year of fee payment: 10

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090403

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090403

Year of fee payment: 11