JPS6081647A - Program control system - Google Patents

Program control system

Info

Publication number
JPS6081647A
JPS6081647A JP18918583A JP18918583A JPS6081647A JP S6081647 A JPS6081647 A JP S6081647A JP 18918583 A JP18918583 A JP 18918583A JP 18918583 A JP18918583 A JP 18918583A JP S6081647 A JPS6081647 A JP S6081647A
Authority
JP
Japan
Prior art keywords
instruction
program
branch destination
destination address
counter
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
JP18918583A
Other languages
Japanese (ja)
Inventor
Takashi Minagawa
皆川 孝
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP18918583A priority Critical patent/JPS6081647A/en
Publication of JPS6081647A publication Critical patent/JPS6081647A/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/30054Unconditional branch instructions

Abstract

PURPOSE:To execute branching instruction on the basis of branched address specifying information reducing the number of instruction words and to reduce the storage capacity of a program by forming a branches address storage part to store the branched address information. CONSTITUTION:An instruction word is read out from a program counter 1, set up in an instruction register 3 and analyzed by an instruction analyzing part 4 to execute the instruction. When the instruction is successively executed and an branching instruction is read out, branched address selecting data are outputted to a branched address storing part 5 by an instruction register 3. When the branching instruction is discriminated by the analyzing part 4, an output permission signal 11 is outputted to the storage part 5 so as to allow the storage part to output branched address information 10b. Simultaneously, the analyzing part 4 outputs a load signal 8 to the counter 1 so as to allow the counter 1 to load the information 10b and the branched address information from the storage part 5 is set up in the counter 1 to branch data. Thus, the provision of the storage part 5 reduces the number of instruction words and reduces the storage capacity of the program.

Description

【発明の詳細な説明】 [技術分野] 本発明はプログラムの分岐命令の実行に係るプログラム
制御方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field] The present invention relates to a program control system related to execution of a branch instruction of a program.

[従来技術] 従来、分岐命令の実行は命令語に含まれる分岐先アドレ
スをプログラムカウンタべ格納することにより行ってい
た。この従来のプログラム読み出し制御部のブロック図
を第1図に示す。
[Prior Art] Conventionally, branch instructions have been executed by storing the branch destination address included in the instruction word in a program counter. A block diagram of this conventional program reading control section is shown in FIG.

図中1はプログラムカウンタ、2はプログラム記憶部、
3は命令レジスタ、4は命令解析部である。
In the figure, 1 is a program counter, 2 is a program storage unit,
3 is an instruction register, and 4 is an instruction analysis section.

通常のプログラム命令の実行時には、プログラムカウン
タ1よりのアドレス情報6に対応したプログラム記憶部
2内の命令語が読み出され、命令レジスタ3に格納され
る。この命令レジスタ3へセットされた命令語は命令解
析部4で解析され、分岐命令でなければプログラムカウ
ンタIを1っカウントアツプするためカウントアツプ信
、1.; 9か出力されると共に命令の実行を指示する
When a normal program instruction is executed, the instruction word in the program storage section 2 corresponding to the address information 6 from the program counter 1 is read out and stored in the instruction register 3. The instruction word set in the instruction register 3 is analyzed by the instruction analysis unit 4, and if it is not a branch instruction, the program counter I is incremented by 1. ; Outputs 9 and instructs execution of the command.

ここで分岐命令が命令レジスタに格納されると、命令解
析部にて分岐命令と解読され、プログラムカウンタ1に
分岐先アドレスを格納する様にカウンタロート信号8を
出力する。この時にプログラムカウンタ1には命令レジ
スタ等より分岐先アドレス情報10aが入力されており
、プログラムカウンタ1は分岐先アドレス情報に渇き替
えられ、次のプログラム記憶部2よりの命令1ilIi
の読み出しは新たに書き替えられた分岐先アドレスより
行なわれ、分岐命令か実行されたことになる。
When the branch instruction is stored in the instruction register, the instruction analyzer decodes it as a branch instruction and outputs a counter load signal 8 so as to store the branch destination address in the program counter 1. At this time, the branch destination address information 10a is input to the program counter 1 from the instruction register etc., and the program counter 1 is replaced with the branch destination address information, and the next instruction 1ilIi from the program storage unit 2 is input.
is read from the newly rewritten branch destination address, which means that the branch instruction has been executed.

このためプログラム記憶部2内の命令+i/口こ分岐先
アドレス情報を全て備えておかなければならず、命令語
のビット数も多くが必要であり、ひいてはプログラムの
記憶容量も大きくなってしまっていた。
For this reason, all instruction +i/branch destination address information in the program storage unit 2 must be provided, and a large number of bits is required for the instruction word, which in turn increases the storage capacity of the program. Ta.

[目−的] 本発明は上述従来例の欠点を除去し、命令語の少ない分
岐先アドレス指定情報により、分岐命令の実行できるプ
ログラム制御方式を提供することを1」的とする。
[Objective] It is an object of the present invention to eliminate the drawbacks of the above-mentioned conventional example and to provide a program control system that can execute a branch instruction using branch destination addressing information with a small number of instruction words.

[実施例コ 以下図面を参照して本発明の一実施例について説明する
[Embodiment] An embodiment of the present invention will be described below with reference to the drawings.

S2図は本発明に係る一実施例プログラムアドレス制御
装置のブロック図である。
FIG. S2 is a block diagram of a program address control device according to an embodiment of the present invention.

図中第1図と同様構成には同一番号を付している。In the figure, the same components as in FIG. 1 are given the same numbers.

本実施例装置では従来例に分岐先アドレスを記憶する分
岐先アドレス記tQ部5を備えており、この分岐先アド
レス記憶部5にはプログラム記憶部2内の分岐先アドレ
ス情報が格納されている。
The device of this embodiment is equipped with a branch destination address register tQ section 5 for storing branch destination addresses in the conventional example, and branch destination address information in the program storage section 2 is stored in this branch destination address storage section 5. .

第3図はプロゲラ1、の流れを模式的に表わした図であ
り、プログラムはAJ地よりスタートし、C番地及びD
番地に条件分岐命令かあり、いずれも分岐先はB番地で
ある。そしてE番地に無条件分岐命令があり分岐先はA
番地となっており、このプログラムを繰り返して実行す
る様プログラミングされている例である。
Figure 3 is a diagram schematically showing the flow of Progera 1, in which the program starts from address AJ, addresses C and D.
There is a conditional branch instruction at the address, and the branch destination is address B in both cases. Then, there is an unconditional branch instruction at address E, and the branch destination is A.
In this example, the program is programmed to be executed repeatedly.

第3図に示すプログラムを実行する場合を例に本実施例
装置の動作を説1!IIする。
The operation of the device of this embodiment will be explained using the case of executing the program shown in FIG. 3 as an example. II.

l渣初、プログラムカウンタlにはアドレスとして(A
)がセットされており、まず(A)番地の命令語が読み
出され、命令レジスタ3にセットされ、命令解析部4に
よって解析され、命令の実イ]指示がなされると共に、
この命令が分岐命令ではないためプログラムカウンタ1
はプログラム歩進信号9により1つカウントアツプSれ
、次に(A+1)番地の命令が実行される。
At the beginning of the program, the program counter contains (A) as an address.
) is set, the instruction word at address (A) is first read out, set in the instruction register 3, analyzed by the instruction analysis section 4, and an instruction to execute the instruction is given.
Since this instruction is not a branch instruction, the program counter is 1.
is incremented by one by the program increment signal 9, and then the instruction at address (A+1) is executed.

1賄次プログラムカウンクがカウントアツプされ分岐命
令が読み出されると命令レジスタより分岐先アドレス記
ta部5に分岐先アドレス選択データか出力される。ま
た命令解析部4により分岐命令と判別されると命令解析
部4より分岐先アドレス記憶部5に対し分岐先アドレス
選択データに対応した分岐先アドレス情報LObを出力
する様出力許可信号11か出力される。それと同時にプ
ログラムカウンタ1に対し、分岐先アドレス情報10b
をロートする様にロード信号8を出力し、プログラムカ
ウンタ1には分岐先アドレス記憶部5よりの分岐先アド
レス情報かセットされ、プログラムの分岐が行われる。
When the first program count is counted up and a branch instruction is read out, branch destination address selection data is output from the instruction register to the branch destination address register ta section 5. Further, when the instruction analysis unit 4 determines that it is a branch instruction, the instruction analysis unit 4 outputs an output permission signal 11 to the branch destination address storage unit 5 to output branch destination address information LOb corresponding to the branch destination address selection data. Ru. At the same time, branch destination address information 10b is sent to program counter 1.
A load signal 8 is outputted to load the program counter 1, and the branch destination address information from the branch destination address storage section 5 is set in the program counter 1, and the program is branched.

その後は分岐先アドレスよりプログラムが実行される。After that, the program is executed from the branch destination address.

第3図に示すプログラムの場合には分岐先アドレス記憶
部5には第4図にンバず如く分岐先アドレスとして(A
)と(B)が格納されている。
In the case of the program shown in FIG. 3, the branch destination address storage unit 5 stores the branch destination address (A) as shown in FIG.
) and (B) are stored.

この様に分岐先か2箇所の場合には分岐先アドレス記憶
部5より(A)と(B)を読み出すためには命令語中の
分岐先指定ビット数は1ビツトで可能でありビット“0
゛で(A)、°°l”′で(B)を読み出せばよい。
In this way, in the case of two branch destinations, in order to read (A) and (B) from the branch destination address storage unit 5, the number of branch destination designation bits in the instruction word can be 1 bit, and the bit “0” is required.
It is sufficient to read out (A) at ゛ and (B) at °°l'''.

また」一連の説明で分岐先アI・レス記憶部5は命令解
析部4よりの出力許可信号11によって分岐先アドレス
情報10bを出力する様制御したが常時出力していても
よい。
Furthermore, in the series of explanations, the branch destination address storage section 5 is controlled to output the branch destination address information 10b by the output permission signal 11 from the instruction analysis section 4, but it may be outputted all the time.

以上説明した様にシーケンス制御用のプログラムなど分
岐命令による分岐先が少ない場合には特に命令語中のア
ドレス容量を少なくすることによりプログラム記憶部の
容量及び命令語のビット数を少なくすることができる。
As explained above, when there are few branch destinations due to branch instructions such as sequence control programs, the capacity of the program storage unit and the number of bits of the instruction word can be reduced by reducing the address capacity in the instruction word. .

このプログラム記憶部2及び分岐先アドレス記ta部5
はROMとしてもRAMとしてもよいことはもちろんで
ある。
This program storage section 2 and branch destination address record ta section 5
Of course, it may be used as ROM or RAM.

[効果] 以上説明した様に本発明によれば命令語の分岐先アドレ
ス情報の容量を少なくすることができ、また同一の分岐
先アドレスへ複数箇所より分岐する場合などには特にア
ドレス情報の記憶領域を少なくでき、プログラムの記憶
容址を減少させることができると共に、命令語のビット
数の減少をも可能としたプログラム制御方武を提供でき
る。
[Effects] As explained above, according to the present invention, the capacity of the branch destination address information of the instruction word can be reduced, and the storage of address information is particularly important when branching to the same branch destination address from multiple locations. It is possible to provide a program control method that can reduce the area, reduce the storage capacity of a program, and also reduce the number of bits of an instruction word.

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

第1図は従来のプログラム読み出し制御部のブ第2図 9 谷″;3図 Figure 1 shows the conventional program reading control section. 9 Valley''; Figure 3

Claims (1)

【特許請求の範囲】[Claims] プログラム命令の読み出しアドレスを記憶するプログラ
ムアドレス記憶手段と、プログラムの分岐先アドレスを
記憶する分岐先アドレス記憶手段よりの分岐先アドレス
を前記プログラムアドレス記憶手段に格納する分岐先ア
ドレス格納手段とを備え、分岐命令の実行を前記分岐先
アドレス記憶手段に記憶のアドレス情報により行なうこ
とを特徴とするプログラム制御方式。
comprising a program address storage means for storing a read address of a program instruction, and a branch destination address storage means for storing a branch destination address from the branch destination address storage means for storing a branch destination address of a program in the program address storage means, A program control method characterized in that a branch instruction is executed based on address information stored in the branch destination address storage means.
JP18918583A 1983-10-12 1983-10-12 Program control system Pending JPS6081647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18918583A JPS6081647A (en) 1983-10-12 1983-10-12 Program control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18918583A JPS6081647A (en) 1983-10-12 1983-10-12 Program control system

Publications (1)

Publication Number Publication Date
JPS6081647A true JPS6081647A (en) 1985-05-09

Family

ID=16236925

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18918583A Pending JPS6081647A (en) 1983-10-12 1983-10-12 Program control system

Country Status (1)

Country Link
JP (1) JPS6081647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0376255A2 (en) * 1988-12-27 1990-07-04 Kabushiki Kaisha Toshiba Method and apparatus for controlling branching
EP0383268A2 (en) * 1989-02-13 1990-08-22 Hitachi, Ltd. Data processor in which branching during program execution is controlled by the contents of a branch address table

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0376255A2 (en) * 1988-12-27 1990-07-04 Kabushiki Kaisha Toshiba Method and apparatus for controlling branching
EP0383268A2 (en) * 1989-02-13 1990-08-22 Hitachi, Ltd. Data processor in which branching during program execution is controlled by the contents of a branch address table
EP0383268A3 (en) * 1989-02-13 1992-08-26 Hitachi, Ltd. Data processor in which branching during program execution is controlled by the contents of a branch address table

Similar Documents

Publication Publication Date Title
EP0118781A2 (en) Control flow parallel computer system
US5943493A (en) Retargetable VLIW computer architecture and method of executing a program corresponding to the architecture
US5363491A (en) Data flow processor with data processing and next address determination being made in parallel
JPS6081647A (en) Program control system
JP2918019B2 (en) Test circuit for single-chip microprocessor
JPS6116334A (en) Data processor
JP2731047B2 (en) Program operand check method
JPH0218729B2 (en)
JPS586970B2 (en) ROM address sequence control method
JPH06230977A (en) Language processor
JPH01274252A (en) Activity history memory
JPS5998253A (en) Microprogram controller
JPS58159149A (en) Instruction code converting system
JPH01251233A (en) Processor
JPS59189407A (en) Sequence control device
JPH0323938B2 (en)
JPS62226336A (en) Microprogram control system
JPH01267731A (en) System for preparing segment overlay program
JPH0319570B2 (en)
JPS6158042A (en) Microprogram control system
JPH01274251A (en) Activity history memory
JPH0196733A (en) Control memory
JPS59186048A (en) Microprogram control system
JPS59188758A (en) System for tracing program route
JPH0363821A (en) Microprogram controller