JPS5999552A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPS5999552A
JPS5999552A JP57209777A JP20977782A JPS5999552A JP S5999552 A JPS5999552 A JP S5999552A JP 57209777 A JP57209777 A JP 57209777A JP 20977782 A JP20977782 A JP 20977782A JP S5999552 A JPS5999552 A JP S5999552A
Authority
JP
Japan
Prior art keywords
instruction
stored
storage device
register
instructions
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
JP57209777A
Other languages
Japanese (ja)
Inventor
Sumio Ozawa
小澤 純雄
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP57209777A priority Critical patent/JPS5999552A/en
Publication of JPS5999552A publication Critical patent/JPS5999552A/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/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3808Instruction prefetching for instruction reuse, e.g. trace cache, branch target cache
    • G06F9/381Loop buffering

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To perform fast instruction execution without requiring fetch of any instruction by providing a storage device which is stored successively with instructions stored in an instruction register. CONSTITUTION:The storage device 6 which is stored with execution instruction from an instruction queue register 1 is provided. A negative-directional relative jump instruction is stored in the instruction register 4. A code signal 30 indicating this relative jump instruction is applied to a PLA8 and a load signal is sent out of the PL8 to an address counter 7. At this time, the sum of the address of the storage device 6 stored with the current relative jump instruction and the discounted value of the relative value field of the instruction register 4 is applied to another input terminal of the address counter 7. Therefore, when the load signal 22 is applied to the address counter 7, instructions stored in the storage device 6 are read out successively and executed to perform high speed operation without requiring fetch of any instruction.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は平均的命令実行時間を少なくして高速処理を可
能としたマイクロコンピュータに関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a microcomputer that enables high-speed processing by reducing the average instruction execution time.

従来例の構成とその問題点 近年マイクロコンピュータは産業の諸分野で広く使用さ
れているが応用分野の広がりと共にマイクロコンピュー
タの高速化への要求が強くなって来ている。
Conventional configurations and their problems In recent years, microcomputers have been widely used in various industrial fields, but as the fields of application have expanded, the demand for faster microcomputers has become stronger.

計算機の命令実行速度を高める方法として、命令のフェ
ッチ動作と命令の解釈実行動作を並行させ、命令のフェ
ンチ時間を実効的に零とし高速化をはかる命令先読み方
式は非常に有効な方法として広く使用されている。
As a method to increase the instruction execution speed of a computer, the instruction prefetch method is widely used as a very effective method that parallelizes the instruction fetch operation and the instruction interpretation/execution operation, effectively reducing the instruction fetch time to zero and increasing the speed. has been done.

第1図において、1は命令キューレジスフ、2はプリフ
ェッチカウンク、3はプリフェッチ制御回路、4は命令
レジスタ、5はプログラマブルロジソクアレイ(以下P
LAと記す)である。
In FIG. 1, 1 is an instruction queue register, 2 is a prefetch counter, 3 is a prefetch control circuit, 4 is an instruction register, and 5 is a programmable logic array (hereinafter referred to as P
(written as LA).

命令キューレジスタ1は、ファーストイン・ファースト
アウト(以下、FIFOと記す)構造となっており、ブ
リフェッチカウンタ2で示された主記憶の記憶位置から
読み出された命令が順次格納される。一方命令の解釈実
行は命令キューレジスタ1から一命令取り出し、命令レ
ジスタ4に格納してPLA5で解釈しつつ行なわれる。
The instruction queue register 1 has a first-in, first-out (hereinafter referred to as FIFO) structure, and instructions read from the storage location of the main memory indicated by the briefetch counter 2 are sequentially stored. On the other hand, an instruction is interpreted and executed by taking out one instruction from the instruction queue register 1, storing it in the instruction register 4, and interpreting it in the PLA 5.

主記憶からの命令の読み出しと命令の解釈実行は同時並
行して行なわれるため、命令キューレジスタ1に命令が
存在する間は命令実行は絶え間なく行なわれ、命令読み
出し時間は実質的に零となって高速動作が実現できる。
Since the reading of instructions from main memory and the interpretation and execution of instructions are carried out simultaneously, as long as there are instructions in instruction queue register 1, instructions are executed continuously, and the instruction reading time becomes essentially zero. High-speed operation can be achieved.

しかし、命令キューレジスタ1への命令読み出しは1づ
つカウントアツプするブリフェッチカウンタ2によって
なされるため、以上説明した効果は、命令実行が主記憶
上に格納された順序で遂次性なわれている場合に限られ
る。すなわち命令の中にジャンプ命令があり、命令実行
の順序が変化すると、それ迄に読み出され命令キューレ
ジスタ1に格納された命令は無駄なものとなり、以前に
格納された命令は無駄なものとなり、以前に格納されて
いた命令キューをキャンセルして新たに命令の読み出し
を行なわなければならない。このことにより、ジャンプ
命令の次の命令実行は命令か主記憶から読み出される迄
待たされる。
However, since instructions are read out to the instruction queue register 1 by the briffetch counter 2 which counts up by 1, the effect described above is achieved sequentially in the order in which the instructions are stored in the main memory. limited to cases. In other words, if there is a jump instruction among the instructions and the instruction execution order changes, the instructions that have been read and stored in instruction queue register 1 up to that point will become useless, and the previously stored instructions will become useless. , the previously stored instruction queue must be canceled and a new instruction must be read. As a result, execution of the next instruction after the jump instruction is delayed until the instruction is read from main memory.

具体的に各種プログラムでの命令の出現頻度を調査して
みるとロード命令に次いで多い命令がジャンプ命令であ
ることから、従来の命令キューレジスタ1によるグログ
ラム一時格納は効率の低いものとなっていた。特に第2
図に示す様な数命令を−まとめとして、これらを繰返し
実行する場合は非常に多い。従来の装置においては、命
令への実行時間にフェッチ時間も含まれることによる実
行速度の低下と共に、無駄な命令のフェッチを何回とな
く繰返えすことによるバスの混雑による命令の実行速度
の低下も兇生し、プログラムの実行効率を下げていた。
Specifically, when we investigated the frequency of instructions appearing in various programs, we found that jump instructions were the second most common instruction after load instructions, so the conventional temporary storage of programs using instruction queue register 1 was inefficient. . Especially the second
There are many cases where several instructions as shown in the figure are grouped together and executed repeatedly. In conventional devices, the execution speed decreases due to the fact that the fetch time is included in the instruction execution time, and the instruction execution speed decreases due to bus congestion caused by repeating useless instruction fetches many times. This also increased the efficiency of program execution.

発明の目的 本発明は数命令を−かた1りとしてこれらを繰返し実行
するループ動作に対し、同一命令プロツクを繰返しプリ
フェッチすることを必要としないマイクロコンピュータ
を提供することを目的とする。。
OBJECTS OF THE INVENTION An object of the present invention is to provide a microcomputer that does not require repeated prefetching of the same instruction block for a loop operation in which several instructions are repeatedly executed as a unit. .

発明の構成 本発明は上記目的を達するために、命令レジスタに格納
される命令を、新たに設けた記憶装置に順次記憶格納し
ておき、ジャンプ命令、特に負方向への相対ジャンプ命
令が実行される時、上記記憶装置から該当する命令を以
下順次読み出し実行するよう構成することによって、新
たに命令をプリフェッチする必要をなくし、高速な命令
実行を可能としたものである。
Structure of the Invention In order to achieve the above object, the present invention sequentially stores instructions stored in an instruction register in a newly provided storage device, and executes a jump instruction, especially a relative jump instruction in the negative direction. By configuring the system to sequentially read and execute the corresponding instructions from the storage device when executing the instruction, it is possible to eliminate the need to prefetch new instructions and enable high-speed instruction execution.

実施例の説明 以下、図面を参照しながら本発明の一実施例について説
明する。
DESCRIPTION OF EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

第3図は本発明の一実施例におけるマイクロコンピュー
タの要部ブロック図である。
FIG. 3 is a block diagram of essential parts of a microcomputer in an embodiment of the present invention.

第3図において、1は命令キューレジスタ、4は実行命
令を一時起記する命令レジスタ、6は記憶装置、7は記
憶装置6に命令の書き込み位置及び読み出し位置を指示
するアドレスカウンタ、8は命令レジスタ4に格納され
た命令をデコードするPLA、9は加算回路、10は記
憶装置6から命令を命令レジスタ4に供給するゲート回
路、11は命令キューレジスタ1から命令を命令レジス
タ4に供給するゲルトである。
In FIG. 3, 1 is an instruction queue register, 4 is an instruction register that temporarily stores execution instructions, 6 is a storage device, 7 is an address counter that instructs the storage device 6 to write and read instructions, and 8 is an instruction register. PLA decodes the instructions stored in register 4; 9 is an adder circuit; 10 is a gate circuit that supplies instructions from storage device 6 to instruction register 4; 11 is a gate circuit that supplies instructions from instruction queue register 1 to instruction register 4; It is.

上記のような構成において、以下その動作について詳細
に説明する。なお命令キューレジスタ1に命令を主記憶
より読み出し格納する動作は従来例の場合と全く同一で
ある。
The operation of the above configuration will be described in detail below. The operation of reading and storing instructions from the main memory into the instruction queue register 1 is exactly the same as in the conventional example.

まず実行される命令は命令キューレジスタ1からゲート
11を通って命令レジスタに格納され、同時に記憶装置
6にも格納される。記憶装置6への格納動作は、PLA
sより出力される書き込み信号21(WRT)によって
行なわれ、同時にアドレスカウンタ7の内容も(+1)
され、次の1き込みに備える。以下順次命令が1つづつ
命令キューレジスタ1から読み出される毎に記憶装置6
へはアドレスカウンタ7によりアドレスが(+1)増加
された位置に書き込まれる。
First, an instruction to be executed is stored in the instruction register from the instruction queue register 1 through the gate 11, and is also stored in the storage device 6 at the same time. The storage operation in the storage device 6 is performed by PLA.
This is done by the write signal 21 (WRT) output from s, and at the same time the contents of the address counter 7 are also changed (+1).
and prepare for the next loading. Thereafter, each time an instruction is sequentially read out from the instruction queue register 1, the storage device 6
The data is written to the location where the address is incremented by (+1) by the address counter 7.

ここで命令レジスタ4に負の方向の相対ジャンプ命令、
すなわち現在の命令の位置よりn命令以前の命令にジャ
ンプする命令が格納されたとする。
Here, a relative jump instruction in the negative direction is stored in instruction register 4,
That is, assume that an instruction to jump to an instruction n instructions earlier than the current instruction position is stored.

命令レジスタ4から相対ジャンプ命令であることを示ず
コード信号30がPLAsに印加されo −ド信号22
 (LOAD)がPLAsより出力され、アドレスカウ
ンタ7に送出される。この時アドレスカウンタ7の入力
端には現在の相対ジャンプ命令を格納した記憶装置6の
アドレスと、命令レジスタ4の相対値フィールドの値3
1とが加算された値が印加されているため、上記ロード
信号22が入力されると、アドレスカウンタ7は上記加
算された値がセットされる。この時のアドレスカウンタ
7と記憶装置6の内容との関係を第4図を用いて説明す
る。第4図(a)はロード信号22がアドレスカウンタ
了に印加される直前の状態を示し、同図(b)はロード
信号22が印加された後の状態を示している。
A code signal 30 from the instruction register 4 indicating that it is a relative jump instruction is applied to the PLAs, and an o-code signal 22 is applied to the PLAs.
(LOAD) is output from the PLAs and sent to the address counter 7. At this time, the input terminal of the address counter 7 contains the address of the storage device 6 storing the current relative jump instruction and the value 3 of the relative value field of the instruction register 4.
Since the value added with 1 is applied, when the load signal 22 is input, the address counter 7 is set to the added value. The relationship between the address counter 7 and the contents of the storage device 6 at this time will be explained using FIG. 4. FIG. 4(a) shows the state immediately before the load signal 22 is applied to the address counter terminal, and FIG. 4(b) shows the state after the load signal 22 is applied.

ジャンプ命令を実行する迄は第4図(a)に示す様に命
令は順次格納され、その時のアドレスカウンタ7の値は
pJとなっていた。この時”JMP−3”という負方向
に3だけ相対ジャンプさせる命令が実行されると次に実
行される命令は命令Aとなる。
Until the jump instruction is executed, the instructions are stored sequentially as shown in FIG. 4(a), and the value of the address counter 7 at that time is pJ. At this time, when an instruction called "JMP-3" that causes a relative jump by 3 in the negative direction is executed, the next instruction to be executed becomes instruction A.

しかし従来の場合、改めて命令A、命令B、命令C2・
・・と命令フェッチをしなければならなかった。
However, in the conventional case, instruction A, instruction B, instruction C2,
...and I had to fetch the instruction.

本実施例ではブリフェッチを行なう代りに、記憶装置6
に格納された命令を利用し、第4図(b>に示す様に記
憶装置6の内容をアドレスカウンタ7の内容に応じてN
からN−3とすることによって命令へを取り出すように
している。一般に負方向の相対ジャンプ命令の相対ジャ
ンプ値は補数表現で与えられるため、アドレスカウンタ
7の新しい値を計算するためには加算回路9の利用でよ
く数値の制限はない。
In this embodiment, instead of performing a brief fetch, the storage device 6
As shown in FIG.
By setting N-3 from N-3, the command is extracted. Generally, the relative jump value of a negative direction relative jump instruction is given in complement representation, so the addition circuit 9 can be used to calculate the new value of the address counter 7, and there are no numerical limitations.

そして負方向のジャンプ命令を実行した後の実行命令は
命令キューレジスタ1より供給されずに信号線23によ
りゲート10を介し記憶装置6より供給され、読み出し
信号(RD倍信号20によってアドレスカウンタ7を(
+1)Lながら順次命令を命令レジスタ4に読み出し実
行する。
Then, the execution instruction after executing the negative direction jump instruction is not supplied from the instruction queue register 1, but is supplied from the storage device 6 via the gate 10 via the signal line 23, and is sent to the address counter 7 by the read signal (RD double signal 20). (
+1) Sequentially reads instructions into the instruction register 4 and executes them.

なお第4図においては相対ジャンプ値を−3とし7て説
明したが、これは一般的に−nでよくその時のアドレス
カウンタ7の値はN −nとなる。
In FIG. 4, the relative jump value is -3 and 7, but this may generally be -n and the value of the address counter 7 at that time will be N-n.

以」二の様に本実施例によれば、命令キューレジスタ1
から命令レジスタ4に命令を読み出す命令を順次記憶す
る記憶装置6を設け、負方向のオ目対ジャンプ命令を実
行した後は記憶装置6から順次命令を読み出し実行する
ことにより、複数命令を−かたまりとしたループ処理に
対し無駄なブリフェッチを行なうことなく高速に命令を
処理することができる。
According to this embodiment, as described in "2" below, the instruction queue register 1
A storage device 6 is provided to sequentially store instructions for reading instructions from the instruction register 4, and after executing a negative direction pair jump instruction, the instructions are sequentially read from the storage device 6 and executed. It is possible to process instructions at high speed without performing unnecessary brief fetches for loop processing.

なお本実施例において命令は命令キューレジスターから
読み出すとしたが、命令キ、−(/ジスタのキューの深
さが零、すなわち命令キューレ・ジスタが存在しない場
合にも本実施例と全く同一の動作が行なわれ、同様の効
果があることは明ら力・である。
In this embodiment, the instructions are read from the instruction queue register, but the operation is exactly the same as in this embodiment even when the queue depth of the instruction key, -(/ register is zero, that is, there is no instruction queue register. It is clear that the same effect can be obtained by doing this.

発明の効果 本発明は以」二のように、命令レジスタに格納される命
令を記憶装置に順次記憶格納し、ジャ/)。
Effects of the Invention As described below, the present invention sequentially stores and stores instructions stored in an instruction register in a storage device.

命令、特に負対向への相対ジャンプ命令が実行される際
、上記記憶装置から該轟する命令を以下順次読み出し実
行するよう構成することにより、同一命令ブロックを繰
返しプリフエ・ノチする必要がなくなるため、命令実行
を高速に行なうことができ、その効果は犬なるものかあ
る。
When an instruction, especially a relative jump instruction to the negative opposite direction, is executed, the instructions are sequentially read from the storage device and executed, thereby eliminating the need to repeatedly prefetch the same instruction block. It can execute commands at high speed, and its effects are comparable to those of a dog.

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

第1図は従来のマイクロコンピュータの要部ブロック図
、第2図はプログラムの一例を示した図、第3図は本発
明の一実施例におけるマイクロコンピュータの要部ブロ
ック図、第4図は同マイクロコンピュータの動作を示す
図である。 4・・・・・命令レジスタ、6・・・・・・記憶装置、
7・・・・・アドレスカウンタ、8・・・・・・P’L
A、9・・・・・・加算回路。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図 第2図 第3図
Fig. 1 is a block diagram of the main parts of a conventional microcomputer, Fig. 2 is a diagram showing an example of a program, Fig. 3 is a block diagram of main parts of a microcomputer according to an embodiment of the present invention, and Fig. 4 is the same. FIG. 3 is a diagram showing the operation of a microcomputer. 4...Instruction register, 6...Storage device,
7...Address counter, 8...P'L
A, 9...Addition circuit. Name of agent: Patent attorney Toshio Nakao and 1 other person No. 1
Figure 2 Figure 3

Claims (1)

【特許請求の範囲】 計算機が実行した命令を順次格納する記憶装置と、上記
記憶装置に書き込み位置および読み出し位置を示すアド
レスカウンタと、計算機が実行する命令を一時格納する
命令レジスタと、上記命令レジスタに格納された命令を
デコードするプログラマブルロジノクアレイと、上記命
令レジスタに4& 格納された相対ジャンプ命令の相対ジャンプ書と上記ア
ドレスカウンタに格納された値とを加算する加算回路と
、上記記憶装置から上記命令レジスタに命令を供給する
手段とを具備し、上記プログラマブルロジノクアレイが
負の方向への相対ジャンプ命令をデコードした時、上記
加算回路の出力を上記アドレスカラ/りに格納し、以後
上記記憶装置から命令を上記命令レジスタに供給するこ
とを特徴とするマイクロコンピュータ。
[Scope of Claims] A storage device that sequentially stores instructions executed by a computer, an address counter that indicates write and read positions in the storage device, an instruction register that temporarily stores instructions that the computer executes, and the instruction register. a programmable logic array for decoding the instructions stored in the memory device; an adder circuit for adding the relative jump code of the relative jump instruction stored in the instruction register and the value stored in the address counter; means for supplying an instruction to the instruction register, and when the programmable logic array decodes a relative jump instruction in a negative direction, the output of the adder circuit is stored in the address color, and from then on the A microcomputer characterized in that instructions are supplied from a storage device to the instruction register.
JP57209777A 1982-11-30 1982-11-30 Microcomputer Pending JPS5999552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57209777A JPS5999552A (en) 1982-11-30 1982-11-30 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57209777A JPS5999552A (en) 1982-11-30 1982-11-30 Microcomputer

Publications (1)

Publication Number Publication Date
JPS5999552A true JPS5999552A (en) 1984-06-08

Family

ID=16578431

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57209777A Pending JPS5999552A (en) 1982-11-30 1982-11-30 Microcomputer

Country Status (1)

Country Link
JP (1) JPS5999552A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6225334A (en) * 1985-07-25 1987-02-03 Nec Corp Instruction processing system
JPS6395538A (en) * 1986-10-09 1988-04-26 Nec Corp Control system for instruction processing order
JPS63106046A (en) * 1986-10-22 1988-05-11 Mitsubishi Electric Corp Data processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6225334A (en) * 1985-07-25 1987-02-03 Nec Corp Instruction processing system
JPS6395538A (en) * 1986-10-09 1988-04-26 Nec Corp Control system for instruction processing order
JPH0668722B2 (en) * 1986-10-09 1994-08-31 日本電気株式会社 Instruction processing order controller
JPS63106046A (en) * 1986-10-22 1988-05-11 Mitsubishi Electric Corp Data processor

Similar Documents

Publication Publication Date Title
JPS5852265B2 (en) data processing equipment
JPH0760388B2 (en) Pipeline control circuit
JPS5999552A (en) Microcomputer
JPH01214902A (en) Programmable controller
US20040123073A1 (en) Data processing system having a cartesian controller
JPH06124207A (en) Sub-routine branching instruction execution method
JPS62156738A (en) Program controller
JPS6242301B2 (en)
JPH03288906A (en) Instruction executing system for pc
JPH02214938A (en) Data processor
JPS59189407A (en) Sequence control device
JPH02230326A (en) Pipe line information processor
JPH01284926A (en) Instruction reading system for arithmetic unit
JPS60220468A (en) Vector arithmetic control system
JPH06119169A (en) Microcomputer
JPH0553804A (en) Parallel processor
JPH10320380A (en) Vector processor
JPH03160547A (en) Input/output buffer control method for data processor
JPS58225440A (en) Memory controller
JPH0561669A (en) Semiconductor calculating device and electronic apparatus
JPH03164945A (en) Data processor
JPH01255037A (en) Electronic computer
JPH04276827A (en) Pipe line processor
JPH02181859A (en) Slave processor interface circuit
JPS6074023A (en) Variable check system