JPH11306016A - Register indirect branching instruction and branching instruction execution method with condition - Google Patents

Register indirect branching instruction and branching instruction execution method with condition

Info

Publication number
JPH11306016A
JPH11306016A JP10106132A JP10613298A JPH11306016A JP H11306016 A JPH11306016 A JP H11306016A JP 10106132 A JP10106132 A JP 10106132A JP 10613298 A JP10613298 A JP 10613298A JP H11306016 A JPH11306016 A JP H11306016A
Authority
JP
Japan
Prior art keywords
instruction
decode
program memory
latch circuit
circuit
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
JP10106132A
Other languages
Japanese (ja)
Inventor
Yuji Kinoshita
裕司 木下
Daisaku Yamane
大作 山根
Toshiyuki Okamura
俊幸 岡村
Hideaki Yoshida
秀明 吉田
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.)
Japan Radio Co Ltd
Original Assignee
Japan Radio 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 Japan Radio Co Ltd filed Critical Japan Radio Co Ltd
Priority to JP10106132A priority Critical patent/JPH11306016A/en
Publication of JPH11306016A publication Critical patent/JPH11306016A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30061Multi-way branch instructions, e.g. CASE

Abstract

PROBLEM TO BE SOLVED: To reduce a power consumption of a processor in a delay term which occurs until a register indirect branching instruction and a branching instruction with a condition are read and executed and to reduce a consumption on the memory caused by having a no operation(NOP) instruction written on the program memory. SOLUTION: When an instruction read out of a program memory 102 and latched by an instruction latch circuit 103 is a register indirect instruction or a branching instruction with a condition, the instruction latch circuit 103, an instruction decode latch circuit 105 or operation of these peripheral circuits are partially and selectively stopped by an instruction fetch stop signal or an instruction decode stop signal outputted from an NOP control circuit 109 during the following delay period, so a power consumption is suppressed. Moreover, since decode data regarding the NOP instruction are designed to be automatically inserted after the register indirect branching instruction or the branching instruction with a condition so as to fill in this delay term, it becomes unnecessary to write the NOP instruction on the program memory 102 and the consumption of a storage space on the memory is reduced.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、汎用機器用のプロ
セッサ等におけるレジスタ間接分岐命令及び条件付き分
岐命令実行方法に関する。
The present invention relates to a method for executing a register indirect branch instruction and a conditional branch instruction in a processor or the like for general-purpose equipment.

【0002】[0002]

【従来の技術及びその問題点】図2に、一従来技術に係
るプロセッサ、特にレジタス間接分岐命令や条件付き分
岐命令の実行に関する部分の機能構成を示す。この図に
示すプロセッサは、プログラムメモリ102からの命令
の読出を制御するプログラムメモリ制御回路101を備
えている。プログラムメモリ制御回路101は、命令ラ
ッチ回路103に対しラッチ制御信号を与え、プログラ
ムメモリ102から読み出された命令をこの命令ラッチ
回路103によりラッチさせる。命令デコード回路10
4は、命令ラッチ回路103によりラッチされている命
令をデコードすることによって、命令デコードデータを
生成する。命令デコードラッチ回路105は、命令デコ
ード回路104により得られた命令デコードデータを、
プログラムメモリ制御回路101からのラッチ制御信号
に応じてラッチする。この従来技術においては、プログ
ラムメモリ制御回路101から命令ラッチ回路103に
供給されるラッチ制御信号と命令デコードラッチ回路1
05に供給されるラッチ制御信号が共通であり、従っ
て、プログラムメモリ102から読み出されたデータを
命令ラッチ回路103によりラッチする命令フェッチ動
作と、命令デコード回路104から得られる命令デコー
ドデータを命令デコードラッチ回路105によりラッチ
する命令デコード動作とがパイプライン的に同時並列実
行される。また、これらの処理は、所定のサイクル毎に
繰り返し実行される。
2. Description of the Related Art FIG. 2 shows a functional configuration of a processor according to one prior art, particularly a portion relating to execution of a register indirect branch instruction and a conditional branch instruction. The processor shown in this figure includes a program memory control circuit 101 that controls reading of an instruction from a program memory 102. The program memory control circuit 101 supplies a latch control signal to the instruction latch circuit 103, and causes the instruction read from the program memory 102 to be latched by the instruction latch circuit 103. Instruction decode circuit 10
Reference numeral 4 generates instruction decode data by decoding the instruction latched by the instruction latch circuit 103. The instruction decode latch circuit 105 stores the instruction decode data obtained by the instruction decode circuit 104,
Latch is performed according to a latch control signal from the program memory control circuit 101. In this prior art, a latch control signal supplied from a program memory control circuit 101 to an instruction latch circuit 103 and an instruction decode latch circuit 1
05, the instruction fetch operation of latching the data read from the program memory 102 by the instruction latch circuit 103, and the instruction decode data obtained from the instruction decode circuit 104. The instruction decoding operation latched by the latch circuit 105 is simultaneously executed in parallel in a pipeline manner. Further, these processes are repeatedly executed at predetermined cycles.

【0003】また、命令ラッチ回路103上の命令がレ
ジスタ間接分岐命令である場合、その命令がレジスタ間
接分岐命令であることを示す命令デコードデータが命令
デコードラッチ回路105によりラッチされる。これに
応じ、汎用レジスタ106上にデータとして格納されて
いる分岐先アドレスが、プログラムメモリ制御回路10
1に読み込まれる。プログラムメモリ制御回路101
は、読み込んだ分岐先アドレスを読出アドレスとして、
プログラムメモリ102からのデータを読み出し、命令
ラッチ回路103によりラッチさせる。これによって、
汎用レジスタ106上に格納されている分岐先アドレス
を参照してプログラムメモリ102にアクセスするとい
うレジスタ間接分岐命令が実行される。
When an instruction on the instruction latch circuit 103 is a register indirect branch instruction, instruction decode data indicating that the instruction is a register indirect branch instruction is latched by the instruction decode latch circuit 105. In response to this, the branch destination address stored as data on the general-purpose register 106 is stored in the program memory control circuit 10.
Read to 1. Program memory control circuit 101
Uses the read branch destination address as the read address,
Data is read from the program memory 102 and latched by the instruction latch circuit 103. by this,
A register indirect branch instruction for accessing the program memory 102 with reference to a branch destination address stored in the general-purpose register 106 is executed.

【0004】また、命令ラッチ回路103によりラッチ
されている命令が条件付き分岐命令である場合、そのこ
とを示す命令デコードデータが命令デコードラッチ回路
105によりラッチされ、条件フラグ107の内容がプ
ログラムメモリ制御回路101により参照される。プロ
グラムメモリ制御回路101は、この条件フラグ107
によって与えられる分岐条件が条件付き分岐命令に係る
条件と整合している場合、プログラムメモリ102から
分岐先の命令を読み出すべく、アドレスを出力する。こ
れによって、ある条件が成立した場合にプログラムメモ
リ102に係るアドレスをあるアドレスに設定しプログ
ラムの実行を分岐させるという条件付き分岐命令が実行
されることとなる。
When the instruction latched by the instruction latch circuit 103 is a conditional branch instruction, instruction decode data indicating this is latched by the instruction decode latch circuit 105, and the contents of the condition flag 107 are controlled by the program memory control. Referenced by the circuit 101. The program memory control circuit 101 sets the condition flag 107
If the branch condition given by (1) matches the condition related to the conditional branch instruction, the address is output to read the instruction at the branch destination from the program memory 102. As a result, when a certain condition is satisfied, a conditional branch instruction that sets an address related to the program memory 102 to a certain address and branches execution of the program is executed.

【0005】これらレジスタ間接分岐命令や条件付き分
岐命令を実行する際、上述の従来技術においては、プロ
グラムメモリ102上の記憶空間がノーオペレーション
(NOP)命令により余分に使用されてしまうという問
題点や、このNOP命令を実行するためにプロセッサに
より電力が消費されてしまうという問題点があった。す
なわち、レジスタ間接分岐命令や条件付き分岐命令を実
行するには、命令ラッチ回路103によりプログラムメ
モリ102からの命令をラッチする命令フェッチ動作、
命令デコード回路104からにより命令をデコードしそ
の結果得られた命令デコードデータを命令デコードラッ
チ回路105によりラッチする命令デコード動作、そし
て汎用レジスタ106又は条件フラグ107を参照して
分岐先を決定しあるいは分岐すべきか否かを判別すると
いうレジスタ乃至フラグ参照動作、という3種類の動作
を、段階を追って実行しなければならない。従って、プ
ログラムメモリ102からレジスタ間接分岐命令又は条
件付き分岐命令が読み出されてからその命令が実行され
るまでの間に、少なくとも2サイクルの遅延が発生す
る。この遅延に係る2サイクルの間、命令フェッチ動作
や命令デコード動作を支障なく実行し続けるため、従来
は、レジスタ間接分岐命令や条件付き分岐命令の後にN
OP命令を2個挿入していた。このように、命令の読出
から実行までに生ずる2サイクルの遅延を埋めるためN
OP命令を挿入することとすると、当該2個のNOP命
令を実行するための電力消費が発生し、また、当該NO
P命令を記憶しておくためプログラムメモリ102上の
記憶空間が使用されてしまう。
In executing these register indirect branch instructions and conditional branch instructions, in the above-described prior art, there is a problem that a storage space in the program memory 102 is used extra by a no operation (NOP) instruction. However, there is a problem that power is consumed by the processor to execute the NOP instruction. That is, in order to execute a register indirect branch instruction or a conditional branch instruction, an instruction fetch operation of latching an instruction from the program memory 102 by the instruction latch circuit 103,
An instruction decoding operation of decoding an instruction from the instruction decode circuit 104 and latching the obtained instruction decode data by an instruction decode latch circuit 105; and determining a branch destination or branching by referring to the general-purpose register 106 or the condition flag 107 Three types of operations, that is, a register or flag reference operation of determining whether or not to perform the operation, must be performed step by step. Therefore, a delay of at least two cycles occurs between the reading of the register indirect branch instruction or the conditional branch instruction from the program memory 102 and the execution of the instruction. Conventionally, the instruction fetch operation and the instruction decode operation are continuously executed without any trouble during the two cycles related to the delay.
Two OP instructions were inserted. Thus, to compensate for the two-cycle delay that occurs from the reading of an instruction to its execution, N
If the OP instruction is inserted, power consumption for executing the two NOP instructions occurs, and the NO
A storage space on the program memory 102 is used to store the P instruction.

【0006】[0006]

【発明の概要】本発明の目的の1つは、レジスタ間接分
岐命令や条件付き分岐命令を読み出してから実行するま
での遅延に係る2サイクルにおいて、プロセッサにより
生じされる電力を低減することにある。本発明の目的の
1つは、プログラムメモリ上でレジスタ間接分岐命令や
条件付き分岐命令の後に2個のNOP命令を挿入するこ
とによってプログラムメモリ上の記憶空間が多く使用さ
れることを防ぎ、使用するメモリ量を低減することにあ
る。
SUMMARY OF THE INVENTION One object of the present invention is to reduce the power generated by a processor in two cycles related to the delay between reading and executing a register indirect branch instruction or a conditional branch instruction. . One of the objects of the present invention is to prevent the storage space on the program memory from being used a lot by inserting two NOP instructions after a register indirect branch instruction or a conditional branch instruction on the program memory. The purpose is to reduce the amount of memory used.

【0007】このような目的を達成すべく、本発明に係
るレジスタ間接分岐命令は、プログラムメモリ制御回路
による制御の下にプログラムメモリ上の命令を読み出し
命令ラッチ回路によりラッチさせる命令フェッチ動作
と、命令ラッチ回路上の命令をデコードしそれにより得
られる命令デコードデータを命令デコードラッチ回路に
よりラッチさせる命令デコード動作と、命令デコードラ
ッチ回路上の命令デコードデータがレジスタ間接分岐命
令を示すデータであるときにプログラムメモリからの読
出アドレスとすべくレジスタ上にある分岐先アドレスを
プログラムメモリ制御回路に与えるレジスタ参照動作と
を、所定のサイクル毎にかつパイプライン的に同時並列
実行するレジスタ間接分岐命令実行方法において、命令
デコード動作により命令ラッチ回路上の命令がレジスタ
間接分岐命令であることが判明したときに、現サイクル
及び次サイクルにおいて命令フェッチ動作を停止させ、
次サイクル及び次々サイクルにおいて命令デコード動作
を停止させ、命令デコード動作を停止させている間はN
OP命令に係る命令デコードデータを命令デコードラッ
チ回路上の命令デコードデータに代えてレジスタ参照動
作に供することを特徴とする。
In order to achieve the above object, a register indirect branch instruction according to the present invention comprises an instruction fetch operation for reading an instruction on a program memory under the control of a program memory control circuit and latching the instruction by an instruction latch circuit; An instruction decoding operation of decoding an instruction on the latch circuit and latching the instruction decode data obtained by the instruction decode latch circuit, and performing a program when the instruction decode data on the instruction decode latch circuit is data indicating a register indirect branch instruction A register indirect branch instruction execution method for simultaneously executing a register reference operation of giving a branch destination address on a register to a program memory control circuit to be a read address from a memory to a program memory control circuit in a predetermined cycle and in a pipeline manner. Instruction decode operation When the instruction on decree latch circuit is a register indirect branch instruction is found, it stops the instruction fetch operation in the current cycle and the next cycle,
The instruction decode operation is stopped in the next cycle and the next cycle, and while the instruction decode operation is stopped, N
The present invention is characterized in that instruction decode data relating to an OP instruction is used for register reference operation instead of instruction decode data on an instruction decode latch circuit.

【0008】また、本発明に係る条件付き分岐命令実行
方法は、プログラムメモリ制御回路による制御の下にプ
ログラムメモリ上の命令を読み出し命令ラッチ回路によ
りラッチさせる命令フェッチ動作と、命令ラッチ回路上
の命令をデコードしそれにより得られる命令デコードデ
ータを命令デコードラッチ回路にラッチさせる命令デコ
ード動作と、命令デコードラッチ回路上の命令デコード
データが条件付き分岐命令を示すデータである時に分岐
条件を与えるべく条件フラグをプログラムメモリ制御回
路に与えるフラグ参照動作とを、所定のサイクル毎にか
つパイプライン的に同時並列実行する条件付き分岐命令
実行方法において、命令デコード動作により命令ラッチ
回路上の命令が条件付き分岐命令であることが判明した
ときに、現サイクル及び次サイクルにおいて命令フェッ
チ動作を停止させ、次サイクル及び次々サイクルにおい
て命令デコード動作を停止させ、命令デコード動作を停
止させている間はNOP命令に係る命令デコードデータ
を命令デコードラッチ回路上の命令デコードデータに代
えてフラグ参照動作に供することを特徴とする。
Further, the conditional branch instruction execution method according to the present invention includes an instruction fetch operation for reading an instruction on a program memory under control of a program memory control circuit and latching the read instruction on an instruction latch circuit, and an instruction on the instruction latch circuit. And a condition flag for giving a branch condition when the instruction decode data on the instruction decode latch circuit is data indicating a conditional branch instruction. And a flag reference operation for giving a flag to the program memory control circuit at the same time in a predetermined cycle and in a pipelined manner in a conditional branch instruction execution method. The current cycle The instruction fetch operation is stopped in the next cycle, the instruction decode operation is stopped in the next cycle and the next cycle, and the instruction decode data relating to the NOP instruction is decoded on the instruction decode latch circuit while the instruction decode operation is stopped. It is characterized in that a flag reference operation is performed instead of data.

【0009】そして、本発明に係るプロセッサは、プロ
グラムメモリからの命令の読出を制御するプログラムメ
モリ制御回路と、プログラムメモリから読み出された命
令をプログラムメモリ制御回路からのラッチ制御信号に
応じラッチする命令ラッチ回路と、命令ラッチ回路上の
命令をデコードする命令デコード回路と、それにより得
られる命令デコードデータをプログラムメモリ制御回路
からのラッチ制御信号に応じラッチする命令デコードラ
ッチ回路と、命令デコードラッチ回路上の命令デコード
データが分岐先又は分岐条件を間接的に決定する命令に
係るデータである時にプログラムメモリ制御回路に対し
当該分岐先又は分岐条件を与える被参照手段と、を備え
るプロセッサにおいて、あるサイクルにおいて命令ラッ
チ回路上の命令が分岐先または分岐条件を間接的に決定
する命令である場合に、現サイクル及び次サイクルでは
プログラムメモリ制御回路に対する命令フェッチ停止信
号をオンさせ、次サイクル及び次々サイクルではプログ
ラムメモリ制御回路に対する命令デコード停止信号をオ
ンさせるNOP制御回路と、命令デコード停止信号がオ
ンしている間、NOP命令に係る命令デコードデータを
命令デコードラッチ回路上の命令デコードデータに代え
て被参照手段に係る処理に供する切り替え回路と、を備
え、上記プログラムメモリ制御回路が、命令フェッチ停
止信号がオンしている間は命令ラッチ回路による命令ラ
ッチ動作を停止させ、命令デコード停止信号がオンして
いる間は命令デコードデータラッチ回路による命令デコ
ードデータラッチ動作を停止させることを特徴とする。
A processor according to the present invention controls a program memory control circuit for reading an instruction from a program memory, and latches the instruction read from the program memory in accordance with a latch control signal from the program memory control circuit. Instruction latch circuit, an instruction decode circuit for decoding an instruction on the instruction latch circuit, an instruction decode latch circuit for latching instruction decode data obtained thereby according to a latch control signal from a program memory control circuit, and an instruction decode latch circuit A reference means for giving the branch destination or the branch condition to the program memory control circuit when the above instruction decode data is data relating to an instruction that indirectly determines a branch destination or a branch condition. In the instruction latch circuit If the instruction determines the branch or branch condition indirectly, the instruction fetch stop signal for the program memory control circuit is turned on in the current cycle and the next cycle, and the instruction decode for the program memory control circuit is stopped in the next cycle and the next cycle. A NOP control circuit for turning on a signal, and a switching circuit for providing instruction decode data relating to a NOP instruction to a process relating to a referenced means instead of instruction decode data on an instruction decode latch circuit while an instruction decode stop signal is on The program memory control circuit stops the instruction latch operation by the instruction latch circuit while the instruction fetch stop signal is on, and the instruction decode data latch circuit while the instruction decode stop signal is on. To stop instruction decode data latch operation by And wherein the door.

【0010】このように、本発明においては、レジスタ
間接分岐命令や条件付き分岐命令等、分岐先又は分岐条
件をレジスタ或いはフラグを用いて間接的に決定する命
令がプログラムメモリから読み出されたときに、この命
令が読み出されてから実行されるまでの間は命令のフェ
ッチやデコードに係る動作の一部が停止されるため、プ
ロセッサによる電力の消費を抑えることができる。さら
に、その種の命令がプログラムメモリから読み出された
後実行されるまでの遅延に係るサイクルにおいては、N
OP命令が自動的に挿入されるため、プログラムメモリ
上でレジスタ間接命令や条件付き分岐命令の後に2サイ
クル分のNOP命令を予め挿入しておく必要がなくな
り、従ってプログラムメモリ上で制御する記憶空間を低
減することができる。
As described above, according to the present invention, when an instruction such as a register indirect branch instruction or a conditional branch instruction that indirectly determines a branch destination or a branch condition using a register or a flag is read from the program memory. In addition, since a part of the operation related to the instruction fetch and the decoding is stopped from the time the instruction is read until the instruction is executed, power consumption by the processor can be suppressed. Further, in a cycle related to a delay from the time when such an instruction is read from the program memory to the time when the instruction is executed, N
Since the OP instruction is automatically inserted, it is not necessary to insert a two-cycle NOP instruction after the register indirect instruction or the conditional branch instruction on the program memory, and therefore, the storage space controlled on the program memory Can be reduced.

【0011】[0011]

【発明の実施の形態】以下、本発明の好適な実施形態に
関し図面に基づき説明する。なお、図2に示した従来技
術と同様のまたは対応する構成には同一の符号を付し、
その説明を一部省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. Note that the same reference numerals are given to the same or corresponding components as those of the conventional technology shown in FIG.
The description is partially omitted.

【0012】図1に、本発明の一実施形態に係るプロセ
ッサ、特にレジスタ間接分岐命令や条件付き分岐命令の
実行に関連する部分の機能構成を示す。この実施形態に
おいては、命令デコードラッチ回路の後段に切り替え回
路108が設けられており、また命令デコード回路10
4Aが発生させる停止制御信号に応じ命令フェッチ停止
信号や命令デコード停止信号を発生させるNOP制御回
路109が設けられている。
FIG. 1 shows a functional configuration of a processor according to an embodiment of the present invention, particularly a portion related to execution of a register indirect branch instruction and a conditional branch instruction. In this embodiment, a switching circuit 108 is provided at a stage subsequent to the instruction decode latch circuit.
There is provided a NOP control circuit 109 for generating an instruction fetch stop signal and an instruction decode stop signal in response to the stop control signal generated by 4A.

【0013】この実施形態においては、命令ラッチ回路
103上の命令がレジスタ間接分岐命令や条件付き分岐
命令であった場合、命令デコード回路104AはNOP
制御回路109に対し停止制御信号を与え、NOP制御
回路109はこれに応じ命令フェッチ停止信号をオンす
る。プログラムメモリ制御回路101Aは、命令フェッ
チ停止信号がオンしている間は、命令ラッチ回路103
に対するラッチ制御信号をオフさせ、プログラムメモリ
102からの命令のラッチを停止させる。
In this embodiment, if the instruction on the instruction latch circuit 103 is a register indirect branch instruction or a conditional branch instruction, the instruction decode circuit 104A
A stop control signal is supplied to the control circuit 109, and the NOP control circuit 109 turns on the instruction fetch stop signal in response thereto. The program memory control circuit 101A keeps the instruction latch circuit 103 while the instruction fetch stop signal is on.
Is turned off, and the latch of the instruction from the program memory 102 is stopped.

【0014】また、次のサイクルにおいては、NOP制
御回路109は命令フェッチ停止信号をオンさせたまま
命令デコード停止信号を新たにオンさせる。プログラム
メモリ制御回路101Aは、命令デコード停止信号がオ
ンするのに応じて、命令デコードラッチ回路105に対
するラッチ制御信号をオフさせる。従って、このサイク
ルにおいては、命令ラッチ回路103及び命令デコード
ラッチ回路100双方のラッチ動作が停止している。
In the next cycle, the NOP control circuit 109 newly turns on the instruction decode stop signal while keeping the instruction fetch stop signal on. The program memory control circuit 101A turns off the latch control signal for the instruction decode latch circuit 105 in response to the instruction decode stop signal turning on. Therefore, in this cycle, the latch operations of both the instruction latch circuit 103 and the instruction decode latch circuit 100 are stopped.

【0015】さらにその次のサイクルにおいては、NO
P制御回路109は、命令デコード停止信号をオンさせ
たまま命令フェッチ停止信号をオフさせる。従って、こ
のサイクルでは、命令ラッチ回路103によるプログラ
ムメモリ102からの命令ラッチ動作が再開されるが、
命令デコードラッチ回路105による命令デコードデー
タのラッチ動作は引き続き停止したままである。
In the next cycle, NO
The P control circuit 109 turns off the instruction fetch stop signal while keeping the instruction decode stop signal on. Therefore, in this cycle, the instruction latch operation from the program memory 102 by the instruction latch circuit 103 is restarted.
The latch operation of the instruction decode data by the instruction decode latch circuit 105 continues to be stopped.

【0016】さらにその次のサイクルにおいては、NO
P制御回路109は、命令フェッチ停止信号及び命令デ
コード信号双方をオフさせる。これによって、命令デコ
ードラッチ回路105による命令デコードデータのラッ
チ動作も再開される。
In the next cycle, NO
The P control circuit 109 turns off both the instruction fetch stop signal and the instruction decode signal. Thus, the instruction decode latch circuit 105 also restarts the instruction decode data latch operation.

【0017】切り替え回路108は、命令デコードラッ
チ回路105による命令デコードデータのラッチ動作が
停止している間、すなわち命令デコードラッチ回路10
5に対するラッチ制御信号がオフしている間は、命令デ
コードラッチ回路105によりラッチされている命令デ
コードデータに代えて、NOP命令に係る命令デコード
データを入力する。従って、命令デコードラッチ回路1
05に対するラッチ制御信号がオフしている間は、汎用
レジスタ106や条件フラグ107の内容がプログラム
メモリ制御回路101Aにより参照されることはない。
The switching circuit 108 operates while the instruction decode latch circuit 105 stops latching the instruction decode data, that is, the instruction decode latch circuit 10
While the latch control signal for No. 5 is off, the instruction decode data relating to the NOP instruction is input instead of the instruction decode data latched by the instruction decode latch circuit 105. Therefore, the instruction decode latch circuit 1
While the latch control signal 05 is off, the contents of the general-purpose register 106 and the condition flag 107 are not referred to by the program memory control circuit 101A.

【0018】従って、プログラムメモリ102からレジ
スタ間接分岐命令や条件付き分岐命令が読み出され命令
ラッチ回路103によりラッチされた後、これらの命令
がプログラムメモリ制御回路101Aにおいて実行され
るまでの間に生じる2サイクルの遅延が、プロセッサに
よる電力消費の増大をもたらすことがない。すなわち、
命令ラッチ回路103や命令デコードラッチ回路105
及びその周辺の動作が部分的に停止することとなるた
め、電力消費が抑制される。さらに、この2サイクルの
遅延期間において挿入すべきNOP命令は、NOP命令
デコードデータの形で切り替え回路108において自動
挿入されるため、プログラムメモリ102上にNOP命
令を記憶させておく必要がなくなり、従ってプログラム
メモリ102上の記憶空間の占有量が少なくなる。
Therefore, after a register indirect branch instruction or a conditional branch instruction is read from the program memory 102 and latched by the instruction latch circuit 103, the instruction is generated before the instruction is executed in the program memory control circuit 101A. The two-cycle delay does not result in increased power consumption by the processor. That is,
Instruction latch circuit 103 and instruction decode latch circuit 105
And the peripheral operation is partially stopped, so that power consumption is suppressed. Further, since the NOP instruction to be inserted during the two-cycle delay period is automatically inserted in the switching circuit 108 in the form of NOP instruction decode data, there is no need to store the NOP instruction on the program memory 102. The occupation amount of the storage space on the program memory 102 is reduced.

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

【図1】 本発明の一実施形態に係るプロセッサの要部
構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a main configuration of a processor according to an embodiment of the present invention.

【図2】 一従来技術に係るプロセッサの要部構成を示
すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a main part of a processor according to one related art.

【符号の説明】[Explanation of symbols]

101A プログラムメモリ制御回路、102 プログ
ラムメモリ、103命令ラッチ回路、104A 命令デ
コード回路、105 命令デコードラッチ回路、106
汎用レジスタ、107 条件フラグ、108 切り替
え回路、109 NOP制御回路。
101A program memory control circuit, 102 program memory, 103 instruction latch circuit, 104A instruction decode circuit, 105 instruction decode latch circuit, 106
General-purpose register, 107 condition flag, 108 switching circuit, 109 NOP control circuit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 吉田 秀明 東京都三鷹市下連雀五丁目1番1号 日本 無線株式会社内 ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Hideaki Yoshida 5-1-1 Shimorenjaku, Mitaka City, Tokyo Japan Radio Co., Ltd.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プログラムメモリ制御回路による制御の
下にプログラムメモリ上の命令を読み出し命令ラッチ回
路によりラッチさせる命令フェッチ動作と、命令ラッチ
回路上の命令をデコードしそれにより得られる命令デコ
ードデータを命令デコードラッチ回路によりラッチさせ
る命令デコード動作と、命令デコードラッチ回路上の命
令デコードデータがレジスタ間接分岐命令を示すデータ
であるときにプログラムメモリからの読出アドレスとす
べくレジスタ上にある分岐先アドレスをプログラムメモ
リ制御回路に与えるレジスタ参照動作とを、所定のサイ
クル毎にかつパイプライン的に同時並列実行するレジス
タ間接分岐命令実行方法において、 命令デコード動作により命令ラッチ回路上の命令がレジ
スタ間接分岐命令であることが判明したときに、現サイ
クル及び次サイクルにおいて命令フェッチ動作を停止さ
せ、次サイクル及び次々サイクルにおいて命令デコード
動作を停止させ、命令デコード動作を停止させている間
はノーオペレーション命令に係る命令デコードデータを
命令デコードラッチ回路上の命令デコードデータに代え
てレジスタ参照動作に供することを特徴とするレジスタ
間接分岐命令実行方法。
An instruction fetch operation in which an instruction on a program memory is read under the control of a program memory control circuit and latched by an instruction latch circuit, and instruction decoded data obtained by decoding the instruction on the instruction latch circuit is transmitted to the instruction latch. An instruction decoding operation to be latched by the decode latch circuit, and when the instruction decode data on the instruction decode latch circuit is data indicating a register indirect branch instruction, the branch destination address on the register is set as a read address from the program memory. In a register indirect branch instruction execution method for simultaneously executing a register reference operation to be given to a memory control circuit every predetermined cycle and in a pipeline manner, an instruction on an instruction latch circuit is a register indirect branch instruction by an instruction decode operation Turned out to be Sometimes, the instruction fetch operation is stopped in the current cycle and the next cycle, the instruction decode operation is stopped in the next cycle and the next cycle, and the instruction decode data of the no-operation instruction is decoded while the instruction decode operation is stopped. A register indirect branch instruction execution method, wherein a register reference operation is performed instead of instruction decode data on a latch circuit.
【請求項2】 プログラムメモリ制御回路による制御の
下にプログラムメモリ上の命令を読み出し命令ラッチ回
路によりラッチさせる命令フェッチ動作と、命令ラッチ
回路上の命令をデコードしそれにより得られる命令デコ
ードデータを命令デコードラッチ回路によりラッチさせ
る命令デコード動作と、命令デコードラッチ回路上の命
令デコードデータが条件付き分岐命令を示すデータであ
るときに分岐条件を与えるべく条件フラグをプログラム
メモリ制御回路に与えるフラグ参照動作とを、所定のサ
イクル毎にかつパイプライン的に同時並列実行する条件
付き分岐命令実行方法において、 命令デコード動作により命令ラッチ回路上の命令が条件
付き分岐命令であることが判明したときに、現サイクル
及び次サイクルにおいて命令フェッチ動作を停止させ、
次サイクル及び次々サイクルにおいて命令デコード動作
を停止させ、命令デコード動作を停止させている間はノ
ーオペレーション命令に係る命令デコードデータを命令
デコードラッチ回路上の命令デコードデータに代えてフ
ラグ参照動作に供することを特徴とする条件付き分岐命
令実行方法。
2. An instruction fetch operation in which an instruction on a program memory is read out and latched by an instruction latch circuit under the control of a program memory control circuit, and an instruction on the instruction latch circuit is decoded and instruction decode data obtained by the instruction is read. An instruction decoding operation for latching by the decode latch circuit, and a flag reference operation for giving a condition flag to the program memory control circuit to give a branch condition when the instruction decode data on the instruction decode latch circuit is data indicating a conditional branch instruction. In a conditional branch instruction execution method in which the instruction in the instruction latch circuit is determined to be a conditional branch instruction by an instruction decode operation, Instruction fetch operation in the next cycle Was stopped,
In the next cycle and the next cycle, the instruction decode operation is stopped, and during the stop of the instruction decode operation, the instruction decode data relating to the no-operation instruction is used for the flag reference operation instead of the instruction decode data on the instruction decode latch circuit. And a conditional branch instruction execution method.
【請求項3】 プログラムメモリからの命令の読出を制
御するプログラムメモリ制御回路と、プログラムメモリ
から読み出された命令をプログラムメモリ制御回路から
のラッチ制御信号に応じラッチする命令ラッチ回路と、
命令ラッチ回路上の命令をデコードする命令デコード回
路と、それにより得られる命令デコードデータをプログ
ラムメモリ制御回路からのラッチ制御信号に応じラッチ
する命令デコードラッチ回路と、命令デコードラッチ回
路上の命令デコードデータが分岐先又は分岐条件を間接
的に決定する命令に係るデータであるときにプログラム
メモリ制御回路に対し当該分岐先又は分岐条件を与える
被参照手段と、を備えるプロセッサにおいて、 あるサイクルにおいて命令ラッチ回路上の命令が分岐先
又は分岐条件を間接的に決定する命令である場合に、現
サイクル及び次サイクルではプログラムメモリ制御回路
に対する命令フェッチ停止信号をオンさせ、次サイクル
及び次々サイクルではプログラムメモリ制御回路に対す
る命令デコード停止信号をオンさせるNOP制御回路
と、 命令デコード停止信号がオンしている間、ノーオペレー
ション命令に係る命令デコードデータを命令デコードラ
ッチ回路上の命令デコードデータに代えて被参照手段に
係る処理に供する切り替え回路と、 を備え、上記プログラムメモリ制御回路が、命令フェッ
チ停止信号がオンしている間は命令ラッチ回路による命
令ラッチ動作を停止させ、命令デコード停止信号がオン
している間は命令デコードデータラッチ回路による命令
デコードデータラッチ動作を停止させることを特徴とす
るプロセッサ。
3. A program memory control circuit for controlling reading of an instruction from a program memory, an instruction latch circuit for latching an instruction read from the program memory according to a latch control signal from the program memory control circuit,
An instruction decode circuit for decoding an instruction on an instruction latch circuit, an instruction decode latch circuit for latching instruction decode data obtained by the instruction control signal from a program memory control circuit, and an instruction decode data on the instruction decode latch circuit Reference means for giving the branch destination or the branch condition to the program memory control circuit when the data is data relating to an instruction that indirectly determines the branch destination or the branch condition. When the above instruction is an instruction for indirectly determining a branch destination or a branch condition, an instruction fetch stop signal for the program memory control circuit is turned on in the current cycle and the next cycle, and the program memory control circuit is turned on in the next cycle and the next cycle. Instruction decode stop signal for A NOP control circuit for turning on, and a switching circuit for performing a process related to the referred means instead of the instruction decode data on the instruction decode latch circuit for the instruction decode data related to the no operation instruction while the instruction decode stop signal is on. The program memory control circuit stops the instruction latch operation by the instruction latch circuit while the instruction fetch stop signal is on, and operates by the instruction decode data latch circuit while the instruction decode stop signal is on. A processor for stopping an instruction decode data latch operation.
JP10106132A 1998-04-16 1998-04-16 Register indirect branching instruction and branching instruction execution method with condition Pending JPH11306016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10106132A JPH11306016A (en) 1998-04-16 1998-04-16 Register indirect branching instruction and branching instruction execution method with condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10106132A JPH11306016A (en) 1998-04-16 1998-04-16 Register indirect branching instruction and branching instruction execution method with condition

Publications (1)

Publication Number Publication Date
JPH11306016A true JPH11306016A (en) 1999-11-05

Family

ID=14425882

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10106132A Pending JPH11306016A (en) 1998-04-16 1998-04-16 Register indirect branching instruction and branching instruction execution method with condition

Country Status (1)

Country Link
JP (1) JPH11306016A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6779122B2 (en) * 2000-12-26 2004-08-17 Intel Corporation Method and apparatus for executing a long latency instruction to delay the restarting of an instruction fetch unit
JP2005149297A (en) * 2003-11-18 2005-06-09 Renesas Technology Corp Processor and assembler thereof
JP2009116458A (en) * 2007-11-02 2009-05-28 Mitsubishi Electric Corp Signal processor
WO2013121516A1 (en) * 2012-02-14 2013-08-22 ルネサスエレクトロニクス株式会社 Data processing device
JP2015135538A (en) * 2014-01-16 2015-07-27 三菱電機株式会社 processor

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6779122B2 (en) * 2000-12-26 2004-08-17 Intel Corporation Method and apparatus for executing a long latency instruction to delay the restarting of an instruction fetch unit
JP2005149297A (en) * 2003-11-18 2005-06-09 Renesas Technology Corp Processor and assembler thereof
JP2009116458A (en) * 2007-11-02 2009-05-28 Mitsubishi Electric Corp Signal processor
WO2013121516A1 (en) * 2012-02-14 2013-08-22 ルネサスエレクトロニクス株式会社 Data processing device
CN104106046A (en) * 2012-02-14 2014-10-15 瑞萨电子株式会社 Data processing device
JPWO2013121516A1 (en) * 2012-02-14 2015-05-11 ルネサスエレクトロニクス株式会社 Data processing device
US9542190B2 (en) 2012-02-14 2017-01-10 Renesas Electronics Corporation Processor with fetch control for stoppage
JP2015135538A (en) * 2014-01-16 2015-07-27 三菱電機株式会社 processor

Similar Documents

Publication Publication Date Title
KR100423910B1 (en) Method and apparatus for executing coprocessor instructions
US7430678B2 (en) Low power operation control unit and program optimizing method
KR100591769B1 (en) Branch target buffer storing branch prediction data
KR20040016829A (en) Exception handling in a pipelined processor
JP2008503827A (en) Instruction processing circuit
US20070260857A1 (en) Electronic Circuit
US20060095746A1 (en) Branch predictor, processor and branch prediction method
JPH11306016A (en) Register indirect branching instruction and branching instruction execution method with condition
US6182211B1 (en) Conditional branch control method
JP4889235B2 (en) Program control processor
US6427205B1 (en) Digital signal processor and processor reducing the number of instructions upon processing condition execution instructions
JP2694948B2 (en) Micro program processor
JP3691435B2 (en) Programmable controller
KR19980058221A (en) Processor with pipeline stop circuit
KR20010101498A (en) Processor and method of executing instructions from several instruction sources
JPH08241296A (en) Semiconductor integrated circuit
US5109516A (en) Sequence controller for controlling next operating state with a short sequence
JPH1020959A (en) Low power consumption micro processor
JPH05334081A (en) Pipeline processing system
KR950014161B1 (en) Two stage instructin pipe-line processing method of array processor
JP2002229776A (en) Data processor for executing multiple sets of instructions
JPH11219294A (en) Method for controlling program and its device
JPH07175650A (en) Arithmetic processor
JPH08106383A (en) Arithmetic processor
JP2001282530A (en) Processor and pipeline processing system