Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2833259B2 - Program repeat control method and program repeat control device - Google Patents
[go: Go Back, main page]

JP2833259B2 - Program repeat control method and program repeat control device - Google Patents

Program repeat control method and program repeat control device

Info

Publication number
JP2833259B2
JP2833259B2 JP11826791A JP11826791A JP2833259B2 JP 2833259 B2 JP2833259 B2 JP 2833259B2 JP 11826791 A JP11826791 A JP 11826791A JP 11826791 A JP11826791 A JP 11826791A JP 2833259 B2 JP2833259 B2 JP 2833259B2
Authority
JP
Japan
Prior art keywords
instruction
register
counter
memory
decoder
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 - Fee Related
Application number
JP11826791A
Other languages
Japanese (ja)
Other versions
JPH04346129A (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.)
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 JP11826791A priority Critical patent/JP2833259B2/en
Publication of JPH04346129A publication Critical patent/JPH04346129A/en
Application granted granted Critical
Publication of JP2833259B2 publication Critical patent/JP2833259B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマイクロプロセッサにお
いて1つの命令の繰り返し実行を制御するプログラムリ
ピート制御方法及び装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program repeat control method and apparatus for controlling the repetitive execution of one instruction in a microprocessor.

【0002】[0002]

【従来の技術】近年、プログラムの高速実行、あるいは
命令メモリのワード数削減を目指し、例えば特公昭62
−42301号公報に示されているような、一旦フェッ
チした命令を繰り返し実行するプログラムリピート処理
装置が考案されている。
2. Description of the Related Art In recent years, high-speed execution of a program or reduction of the number of words in an instruction memory has been attempted.
A program repeat processing device that repeatedly executes an instruction once fetched, as disclosed in Japanese Patent No. 42301, has been devised.

【0003】以下図面を参照しながら、上記した従来の
プログラムリピート制御装置の一例について説明する。
An example of the above-described conventional program repeat control device will be described below with reference to the drawings.

【0004】図7は従来のプログラムリピート制御装置
のブロック図を示すものである。図7において、71は
プログラム繰り返し実行回数(リピート回数と同義)を
カウントするリピートカウンタ、72は命令を格納する
メモリ、73はメモリ72へアドレスを与えるプログラ
ムカウンタ、74はプログラムメモリ72の出力を一時
保持する命令レジスタ、75は命令レジスタの出力をデ
コードし各種制御信号を出力する制御部である。
FIG. 7 is a block diagram showing a conventional program repeat control device. 7, reference numeral 71 denotes a repeat counter for counting the number of program repetitions (same as the number of repeats); 72, a memory for storing instructions; 73, a program counter for giving an address to the memory 72; The held instruction register 75 is a control unit that decodes the output of the instruction register and outputs various control signals.

【0005】以上のように構成された従来のプログラム
リピート制御装置について、以下その動作について説明
する。まず図8に示すように、メモリ72のn番地にリ
ピートカウンタセット命令81、n+1番地に命令A8
2、n+2番地に命令B83をそれぞれ格納しておく。
この状態でプログラムカウンタ73がnとなるとリピー
トカウンタセット命令81が命令レジスタ74に格納さ
れると共に、命令コードに含まれるリピート回数(今の
場合7とする)がリピートカウンタ71に格納される。
制御部75は命令レジスタ74の出力を受け、次に命令
レジスタ74に格納される命令をリピートカウンタ71
が零になるまで繰り返す制御を行なう。そこでプログラ
ムカウンタ73がn+1になり命令A82が命令レジス
タ74に格納されると、図9に示すように命令A82が
7回実行されることになる。(特公昭62−42301
号公報)
The operation of the conventional program repeat control device configured as described above will be described below. First, as shown in FIG. 8, a repeat counter set instruction 81 at address n of the memory 72 and an instruction A8 at address n + 1.
Instruction B83 is stored at addresses 2, n + 2, respectively.
When the program counter 73 reaches n in this state, the repeat counter set instruction 81 is stored in the instruction register 74, and the number of repeats (seven in this case) included in the instruction code is stored in the repeat counter 71.
The control unit 75 receives the output of the instruction register 74, and stores the next instruction stored in the instruction register 74 into the repeat counter 71.
Control is repeated until becomes zero. Then, when the program counter 73 becomes n + 1 and the instruction A82 is stored in the instruction register 74, the instruction A82 is executed seven times as shown in FIG. (Japanese Patent Publication 62-42301
No.)

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記のよ
うな構成では図9に示すように、リピートカウンタセッ
ト命令の実行サイクルが陽に現われてくる。一方ディジ
タル信号処理プロセッサ(Digital Signa
l Processor、以下DSPと記す)では、1
つの命令あるいは命令群を数千回繰り返し実行すること
が多いが、従来のプログラムリピート制御装置を用いる
と上述のようにリピートカウンタセット命令のような非
演算命令の実行にも数千マシンサイクル消費してしま
い、これがDSPの目的である高速演算への大きな妨げ
になるという問題点を有していた。
However, in the above configuration, the execution cycle of the repeat counter set instruction appears explicitly as shown in FIG. On the other hand, a digital signal processor (Digital Signal)
l Processor (hereinafter referred to as DSP)
One instruction or group of instructions is often executed thousands of times, but using a conventional program repeat controller consumes thousands of machine cycles to execute non-operational instructions such as the repeat counter set instruction as described above. As a result, there is a problem that this greatly hinders the high-speed operation which is the purpose of the DSP.

【0007】本発明は上記問題点に鑑み、リピートカウ
ンタセット命令実行サイクルを実質上0サイクルとする
プログラムリピート処理装置を提供する事を目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made in consideration of the above problems, and has as its object to provide a program repeat processing apparatus in which a repeat counter set instruction execution cycle is substantially zero.

【0008】[0008]

【課題を解決するための手段】本発明は、繰り返し実行
対象となる第1の命令と前記第1の命令の次番地に格納
され前記第1の命令の繰り返し実行を指示する第2の命
令を少なくとも記憶するメモリと、前記メモリにアドレ
ス信号を与えるプログラムカウンタと、前記プログラム
カウンタが示す前記メモリの内容を一時記憶する命令レ
ジスタと前記命令レジスタの出力をデコードし各種の
制御信号を出力するデコーダと、前記デコーダの出力を
一時保持するレジスタと、前記第2の命令によりプリセ
ットされ前記第1の命令の実行終了毎にその値を1ずつ
減じるカウンタと、前記デコーダで前記第2の命令以外
がデコードされた時は、前記プログラムカウンタへは内
容のインクリメントを、前記命令レジスタには前記メモ
リ出力の取り込みを、前記レジスタには前記デコード出
力の取り込みを指示し、前記デコーダで前記命令第2の
命令がデコードされた時は、これ以降の前記プログラム
カウンタへは内容のインクリメント禁止を、前記命令レ
ジスタには前記メモリ出力の取り込み禁止を、前記レジ
スタにはこれ以降の前記デコード出力の取り込み禁止を
指示し、さらに前記第2の命令の実行サイクルでは前記
カウンタへ前記第1の命令で指示される繰り返し回数の
書き込みを指示し、前記カウンタが前記第1の命令の実
行終了毎にその値を1ずつ減じた結果規定回数の繰り返
しを行なったことを示した場合、前記プログラムカウン
タへは内容のインクリメント動作の再開を、前記命令レ
ジスタには前記メモリ出力の取り込み動作の再開を、前
記レジスタには前記デコード出力の取り込み動作再開を
指示する制御手段とを備えたプログラムリピート制御装
置である。
According to the present invention, a first instruction to be repeatedly executed and a second instruction stored at an address next to the first instruction and instructing the first instruction to be repeatedly executed are stored. a memory for storing at least a program counter to provide an address signal to said memory, and an instruction register for temporarily storing the contents of said memory to said program counter indicates decodes the output of the instruction register decoder for outputting various control signals A register for temporarily holding the output of the decoder, a counter preset by the second instruction and decrementing the value by one each time the execution of the first instruction is completed, and a register other than the second instruction in the decoder. When decoded, the contents of the program counter are incremented, and the instruction register is fetched of the memory output. Instructing the register to take in the decode output, and when the second instruction of the instruction is decoded by the decoder, incrementing the contents of the program counter is prohibited from the subsequent instruction. Inhibiting the capture of the memory output, instructing the register to inhibit the capture of the decode output thereafter, and writing the number of repetitions indicated by the first instruction to the counter in the execution cycle of the second instruction. When the counter indicates that the value has been decremented by one each time the execution of the first instruction has been completed and the specified number of times has been repeated as a result, the program counter restarts the content increment operation. The instruction register is provided for resuming the operation of taking in the memory output, and the register is provided for receiving the decode output. A program repeat control and control means for instructing the interrupt operation resumes.

【0009】[0009]

【作用】本発明は上記した構成によって、前記メモリに
繰り返し処理対象となる第1の命令実行開始した後に、
これと並行して前記第1の命令の繰り返し実行を指示す
る前記第2の命令と前記制御手段による前記第1の命令
の繰り返し実行制御を行う。
According to the present invention, after the execution of the first instruction to be repeatedly processed in the memory is started,
In parallel with this, the second instruction for instructing repetitive execution of the first instruction and the repetitive execution control of the first instruction by the control means are performed.

【0010】[0010]

【実施例】 以下本発明の一実施例のプログラムリピー
ト制御装置について、図面を参照しながら説明する。
Hereinafter, a program repeat control apparatus according to an embodiment of the present invention will be described with reference to the drawings.

【0011】図1は本発明の実施例におけるプログラム
リピート制御装置のブロック図を示すものであるが、こ
の装置は図2に示したように、φ1、φ2の2相クロッ
クで動作する。図1において、1は命令を記憶するメモ
リ、2はメモリ1にアドレス信号を与え、φ1クロック
の立ち上がりで内容がインクリメントされるプログラム
カウンタ、3はメモリ1の出力をクロックφ1の立ち上
がりで取り込む命令レジスタ、4は命令レジスタ3の出
力をデコードするデコーダ、5はデコーダ4の出力をク
ロックφ1の立ち上がりで取り込むデコーダレジスタ、
6はデコーダレジスタ5の出力である各種制御信号、7
は命令レジスタ3の一部の出力をクロックφ2の立ち上
がりで取り込むラッチ、8はラッチ7の出力を初期値と
し、クロックφ1の立ち上がりでカウントダウンするリ
ピートカウンタ、9はリピートカウンタ8の内容が零に
なった時”1”となる零検出信号、10はデコーダ4が
後述のリピートカウンタセット命令32をデコードした
時”1”となる命令検出信号、11は零検出信号9、命
令検出信号10を入力としクロックφ2の立ち上がりで
内部状態を変化させ、カウンタ8へは後述のプリセット
信号12、カウント許可信号13を、後述のゲート16
へは後述の更新禁止信号14を、後述のゲート17へは
後述のデコーダレジスタ更新禁止信号15を出力するリ
ピート制御部、12はリピートカウンタ8に、ラッチ7
の出力をクロックφ1の立ち上がりで取り込むことを指
示するプリセット信号、13はリピートカウンタ8に、
クロックφ1の立ち上がりでカウントダウンを行なうこ
とを指示するカウント許可信号、14はプログラムカウ
ンタ2及び命令レジスタ3が内容を更新することを禁止
する更新禁止信号、15はデコーダレジスタ5が内容を
更新することを禁止するデコーダレジスタ更新禁止信
号、16は更新禁止信号14とクロックφ1の論理積を
とりその結果をプログラムカウンタ2、命令レジスタ3
に出力するゲート、17はデコーダレジスタ更新禁止信
号15とクロックφ1の論理積をとりその結果をデコー
ダレジスタ5に出力するゲートである。
FIG. 1 is a block diagram of a program repeat control device according to an embodiment of the present invention. As shown in FIG. 2, this device operates with a two-phase clock of φ1 and φ2. In FIG. 1, 1 is a memory for storing an instruction, 2 is a program counter for giving an address signal to the memory 1, and the contents are incremented at the rising of the φ1 clock; 3 is an instruction register for taking in the output of the memory 1 at the rising of the clock φ1 4, a decoder for decoding the output of the instruction register 3; 5, a decoder register for capturing the output of the decoder 4 at the rising edge of the clock φ1;
Reference numeral 6 denotes various control signals output from the decoder register 5, 7
Is a latch that captures a part of the output of the instruction register 3 at the rising edge of the clock φ2, 8 is a repeat counter that uses the output of the latch 7 as an initial value and counts down at the rising edge of the clock φ1, and 9 is that the content of the repeat counter 8 becomes zero. A zero detection signal which becomes "1" when the decoder 4 decodes a later-described repeat counter set instruction 32, an instruction detection signal which becomes "1", and a zero detection signal 9 and an instruction detection signal 10 are input. The internal state is changed at the rise of the clock φ2, and a preset signal 12 and a count permission signal 13 described later are supplied to the counter 8 and a gate 16 described later.
A repeat control unit for outputting a later-described update prohibition signal 14 to a later-described gate 17 and a later-described decoder register update prohibition signal 15 to a later-described gate 17.
Is a preset signal for instructing to take in the output at the rising edge of the clock φ1.
A count enable signal instructing that countdown is performed at the rising edge of the clock φ1, an update inhibit signal 14 for inhibiting the program counter 2 and the instruction register 3 from updating the contents, and a 15 for the decoder register 5 updating the contents. A decoder register update inhibition signal 16 to be inhibited is logically ANDed with the update inhibition signal 14 and the clock φ1, and the result is written to the program counter 2 and the instruction register 3.
Is a gate which takes the logical product of the decoder register update inhibit signal 15 and the clock φ1 and outputs the result to the decoder register 5.

【0012】また図3はメモリ1の内容を示すものであ
って、n番地には繰り返し実行対象となる命令A31
が、n+1番地にはn番地の命令の繰り返し実行を指示
するリピートカウンタセット命令32が、n+2、n+
3番地にはそれぞれ1回づつ実行される命令B33、命
令C34が格納されている。
FIG. 3 shows the contents of the memory 1. An instruction A31 to be repeatedly executed is stored at address n.
However, at the address n + 1, a repeat counter set instruction 32 for instructing the execution of the instruction at the address n repeatedly is given by n + 2, n +
At address 3, an instruction B33 and an instruction C34, which are executed once each, are stored.

【0013】さらに図4はリピート制御部11の内部状
態変化を示している。リピート制御部11は、待ち状態
41、リピートカウンタセット状態42、リピートカウ
ンタカウントダウン状態43の、3つの内部状態を持
つ。待ち状態41からリピートカウンタセット状態42
への遷移は、デコーダ4がリピートカウンタセット命令
32を検出したことを示す命令検出信号10が”1”の
時のクロックφ2で行なわれる。リピートカウンタセッ
ト状態42からリピートカウンタカウントダウンセット
状態43への遷移はクロックφ2で無条件に行なわれ
る。リピートカウンタカウントダウンセット状態43か
ら待ち状態41への遷移は、リピートカウンタ8の内容
が零である事を示す零検出信号9が”1”の時のクロッ
クφ2で行われる。またそれぞれの状態で、リピート制
御部11の出力信号は図5に示すようになる。
FIG. 4 shows a change in the internal state of the repeat control unit 11. The repeat control unit 11 has three internal states: a wait state 41, a repeat counter set state 42 , and a repeat counter countdown state 43. Waiting state 41 to repeat counter setting state 42
Is performed at the clock φ2 when the instruction detection signal 10 indicating that the decoder 4 has detected the repeat counter set instruction 32 is “1”. The transition from the repeat counter set state 42 to the repeat counter countdown set state 43 is performed unconditionally by the clock φ2. The transition from the repeat counter countdown set state 43 to the wait state 41 is performed by the clock φ2 when the zero detection signal 9 indicating that the content of the repeat counter 8 is zero is “1”. In each state, the output signal of the repeat control unit 11 is as shown in FIG.

【0014】さらに図6には図1に示したプログラムリ
ピート装置を構成する各要素の状態及び各信号の動きを
示す。図6には以降の説明で使用するサイクル番号を示
しているが、各サイクルは図2に示したようにφ1、φ
2の2つのクロックで構成される。
FIG. 6 shows the state of each element constituting the program repeat apparatus shown in FIG. 1 and the operation of each signal. FIG. 6 shows cycle numbers used in the following description, and each cycle is represented by φ1, φ2 as shown in FIG.
2 clocks.

【0015】以上のように構成されたプログラムリピー
ト制御装置について、以下図1及び図3、図4、図5、
図6を用い、図6に示したサイクル番号を基準にしてそ
の動作を説明する。 (1)サイクル番号=1 ・プログラムカウンタ2:クロックφ1でインクリメン
トされ内容はnとなる。 ・メモリ1:n番地のアクセスを行なう。 (2)サイクル番号=2 ・プログラムカウンタ2:クロックφ1でインクリメン
トされ内容はn+1となる。 ・メモリ1:n+1番地のアクセスを行なう。 ・命令レジスタ3:クロックφ1で、前サイクルでアク
セスしたn番地の内容である命令A31を取り込む。 ・デコーダ4:命令A31のデコード処理を行なう。 (3)サイクル番号=3 ・プログラムカウンタ2:クロックφ1でインクリメン
トされ内容はn+2となる。 ・メモリ1:n+2番地のアクセスを行なう。 ・命令レジスタ3:クロックφ1で、前サイクルでアク
セスしたn+1番地の内容であるリピートカウンタセッ
ト命令32を取り込む。 ・デコーダ4:リピートカウンタセット命令32のデコ
ード処理を行なった結果、命令検出信号10を”1”と
する。 ・デコーダレジスタ5:前サイクルでデコーダ4でデコ
ードした命令A31のデコード結果をクロックφ1で取
り込む。その結果、各種制御信号6の中のいくつかが能
動となり、命令A31が実行される。 ・リピート制御部11:命令検出信号10が”1”とな
るので、クロックφ2で内部状態を待ち状態41からリ
ピートカウンタセット状態42に変化。その結果リピー
ト制御部の出力は図5中のリピートカウンタセット状態
に示したものとなる。 ・ラッチ7:命令レジスタ3に格納されているリピート
カウンタセット命令32の中からリピート回数を示す部
分をクロックφ2で取り込む。 (4)サイクル番号=4 ・プログラムカウンタ2:クロックφ1でインクリメン
トされ内容はn+3となる。 ・メモリ1:n+3番地のアクセスを行なう。 ・命令レジスタ3:クロックφ1で、前サイクルでアク
セスしたn+2番地の内容である命令B33を取り込
む。 ・デコーダ4:命令B33のデコード処理を行なう。 ・デコーダレジスタ5:デコーダレジスタ更新禁止信号
15が”1”であるのでゲート17でクロックφ1がブ
ロックされる。そこでデコーダレジスタ5の内容は前サ
イクルの状態、すなわち命令A31のデコード結果を保
つ。従って前サイクルに引き続いて命令A31が実行さ
れる。 ・リピートカウンタ8:プリセット信号12が”1”で
あるのでクロックφ1でラッチ7が保持している値3を
取り込む。 ・リピート制御部11:クロックφ2で内部状態がリピ
ートカウンタセット状態41からリピートカウンタカウ
ントダウン状態43に変化。その結果リピート制御部の
出力は図5中のリピートカウンタカウントダウン状態に
示したものとなる。 (4)サイクル番号=5〜6 ・プログラムカウンタ2:更新禁止信号14が”1”で
あるのでゲート16でクロックφ1はブロックされる。
そこでプログラムカウンタ2の内容は変化せずn+3を
保つ。 ・メモリ1:n+3番地のアクセスを行なう。 ・命令レジスタ3:更新禁止信号14が”1”であるの
でゲート16でクロックφ1はブロックされる。そこで
命令レジスタ3の内容は変化せず命令B33を保つ。 ・デコーダ4:命令B33のデコード処理を行なう。 ・デコーダレジスタ5:デコーダレジスタ更新禁止信号
15が”1”であるのでゲート17でクロックφ1がブ
ロックされる。そこでデコーダレジスタ5の内容は前サ
イクルの状態、すなわち命令A31のデコード結果を保
つ。従って前サイクルに引き続いて命令A31が実行さ
れる。 ・リピートカウンタ8:カウント許可信号13が”1”
であるのでクロックφ1でカウントダウンを行なう。 ・リピート制御部11:リピートカウンタ8の内容が零
になったことを示す零検出信号9が”0”であるので内
部状態変化はない。そこでその出力も前サイクルの状態
と同じになる。 (5)サイクル番号=7 ・プログラムカウンタ2:更新禁止信号14が”1”で
あるのでゲート16でクロックφ1はブロックされる。
そこでプログラムカウンタ2の内容は変化せずn+3を
保つ。 ・メモリ1:n+3番地のアクセスを行なう。 ・命令レジスタ3:更新禁止信号14が”1”であるの
でゲート16でクロックφ1はブロックされる。そこで
命令レジスタ3の内容は変化せず命令B33を保つ。 ・デコーダ4:命令B33のデコード処理を行なう。 ・デコーダレジスタ5:デコーダレジスタ更新禁止信号
15が”1”であるのでゲート17でクロックφ1がブ
ロックされる。そこでデコーダレジスタ5の内容は前サ
イクルの状態、すなわち命令A31のデコード結果を保
つ。従って前サイクルに引き続いて命令A31が実行さ
れる。 ・リピートカウンタ8:カウント許可信号13が”1”
であるのでクロックφ1でカウントダウンを行なうが、
今回はその結果内容が零となるので零検出信号9を”
1”とする。 ・リピート制御部11:零検出信号9が”1”であるの
でクロックφ2で内部状態は待ち状態41に変化する。
そこでその出力は図5の待ち状態に示したものとなる。 (6)サイクル番号=8 ・プログラムカウンタ2:更新禁止信号14が”0”と
なったのでカウントアップを再開する。そこでプログラ
ムカウンタ2の内容はn+4となる。 ・メモリ1:n+4番地のアクセスを行なう。 ・命令レジスタ3:更新禁止信号14が”0となったの
で、メモリ1出力のクロックφ1での命令レジスタ3出
力の取り込みを再開する。その結果内容は命令C34と
なる。 ・デコーダ4:命令C34のデコード処理を行なう。 ・デコーダレジスタ5:デコーダレジスタ更新禁止信号
15が”0”となったのでデコーダ4出力のデコーダレ
ジスタ5への取り込みを再開する。その結果、内容は命
令B33のデコード結果となり、命令B33が実行され
ることになる。 ・リピートカウンタ8:リピートカウンタ8への制御信
号が全て”0”であるので、一切の動作はしない。 ・リピート制御部11:命令検出信号10が”0”であ
るので図5の待ち状態を保つ。 (7)サイクル番号=9 ・プログラムカウンタ2:クロックφ1でプログラムカ
ウンタがインクリメントされ、その内容はn+5とな
る。 ・メモリ1:n+5番地のアクセスを行なう。 ・命令レジスタ3:クロックφ1でメモリ1の出力を取
り込む。 ・デコーダ4:命令レジスタ3の出力のデコード処理を
行なう。 ・デコーダレジスタ5:クロックφ1でデコーダ4の出
力である命令C34のデコード結果を取り込む。従って
命令C34が実行されることになる。
The program repeat control device configured as described above will be described below with reference to FIGS. 1 and 3, FIGS.
The operation will be described with reference to FIG. 6 based on the cycle numbers shown in FIG. (1) Cycle number = 1 Program counter 2: incremented by clock φ1 and the content becomes n. Memory 1: Access at address n. (2) Cycle number = 2 Program counter 2: incremented by clock φ1 and the content becomes n + 1. • Memory 1: Access address n + 1. Instruction register 3: At clock φ1, fetches instruction A31, which is the content of address n accessed in the previous cycle. Decoder 4: Decodes instruction A31. (3) Cycle number = 3 Program counter 2: incremented by clock φ1 and the content becomes n + 2. • Memory 1: Access to address n + 2. Instruction register 3: At clock φ1, fetches a repeat counter set instruction 32, which is the content of address n + 1 accessed in the previous cycle. Decoder 4: As a result of decoding the repeat counter set instruction 32, the instruction detection signal 10 is set to "1". Decoder register 5: The decoding result of instruction A31 decoded by decoder 4 in the previous cycle is taken in by clock φ1. As a result, some of the various control signals 6 become active, and the instruction A31 is executed. -Repeat control unit 11: Since the instruction detection signal 10 becomes "1", the internal state changes from the waiting state 41 to the repeat counter set state 42 at the clock φ2. As a result, the output of the repeat control unit is as shown in the repeat counter set state in FIG. Latch 7: A portion indicating the number of repeats from the repeat counter set instruction 32 stored in the instruction register 3 is fetched by the clock φ2. (4) Cycle number = 4 Program counter 2: incremented by clock φ1 and the content becomes n + 3. • Memory 1: Access to address n + 3. Instruction register 3: At clock φ1, fetches instruction B33, which is the content of address n + 2 accessed in the previous cycle. Decoder 4: Decodes instruction B33. Decoder register 5: The clock φ1 is blocked by the gate 17 because the decoder register update inhibit signal 15 is "1". Therefore, the contents of the decoder register 5 maintain the state of the previous cycle, that is, the result of decoding the instruction A31. Therefore, the instruction A31 is executed following the previous cycle. -Repeat counter 8: Since the preset signal 12 is "1", the value 3 held by the latch 7 is taken in at the clock φ1. Repeat controller 11: The internal state changes from repeat counter set state 41 to repeat counter countdown state 43 at clock φ2. As a result, the output of the repeat control unit is as shown in the repeat counter countdown state in FIG. (4) Cycle number = 5-6 Program counter 2: The clock φ1 is blocked by the gate 16 because the update inhibit signal 14 is “1”.
Therefore, the content of the program counter 2 does not change and keeps n + 3. • Memory 1: Access to address n + 3. Instruction register 3: The clock φ1 is blocked by the gate 16 because the update inhibit signal 14 is "1". Therefore, the contents of the instruction register 3 do not change and the instruction B33 is maintained. Decoder 4: Decodes instruction B33. Decoder register 5: The clock φ1 is blocked by the gate 17 because the decoder register update inhibit signal 15 is "1". Therefore, the contents of the decoder register 5 maintain the state of the previous cycle, that is, the result of decoding the instruction A31. Therefore, the instruction A31 is executed following the previous cycle. -Repeat counter 8: Count enable signal 13 is "1"
Therefore, the countdown is performed by the clock φ1. -Repeat control unit 11: Since the zero detection signal 9 indicating that the content of the repeat counter 8 has become zero is "0", there is no change in the internal state. Therefore, the output becomes the same as the state of the previous cycle. (5) Cycle number = 7 Program counter 2: Since the update inhibit signal 14 is "1", the gate 16 blocks the clock φ1.
Therefore, the content of the program counter 2 does not change and keeps n + 3. • Memory 1: Access to address n + 3. Instruction register 3: The clock φ1 is blocked by the gate 16 because the update inhibit signal 14 is "1". Therefore, the contents of the instruction register 3 do not change and the instruction B33 is maintained. Decoder 4: Decodes instruction B33. Decoder register 5: The clock φ1 is blocked by the gate 17 because the decoder register update inhibit signal 15 is "1". Therefore, the contents of the decoder register 5 maintain the state of the previous cycle, that is, the result of decoding the instruction A31. Therefore, the instruction A31 is executed following the previous cycle. -Repeat counter 8: Count enable signal 13 is "1"
Therefore, the countdown is performed by the clock φ1,
This time, the result is zero, so the zero detection signal 9
The repeat control unit 11: Since the zero detection signal 9 is "1", the internal state changes to the waiting state 41 at the clock φ2.
Therefore, the output is as shown in the wait state of FIG. (6) Cycle number = 8 Program counter 2: Count-up is restarted because update inhibit signal 14 has become "0". Therefore, the content of the program counter 2 becomes n + 4. • Memory 1: Access to address n + 4. -Instruction register 3: Since the update prohibition signal 14 has become "0", the capture of the output of the instruction register 3 at the clock φ1 of the memory 1 is resumed. The result is an instruction C34. Decoder register 5: Since the decoder register update inhibit signal 15 has become "0", the capture of the output of the decoder 4 into the decoder register 5 is resumed, and as a result, the content becomes the decoding result of the instruction B33. , The instruction B33 is executed ・ Repeat counter 8: No operation is performed because all control signals to the repeat counter 8 are “0” ・ Repeat control section 11: The instruction detection signal 10 is “1” 5, the wait state shown in FIG. 5 is maintained. (7) Cycle number = 9 Program counter 2: Program counter at clock φ1 The counter is incremented and the content becomes n + 5 Memory 1: Access address n + 5 Instruction register 3: Capture output of memory 1 at clock φ1 Decoder 4: Decode output of instruction register 3 Decoder register 5: Captures the decoding result of instruction C34, which is the output of decoder 4, at clock φ1, so that instruction C34 is executed.

【0016】以上のように本実施例のよれば、メモリ1
には、リピート処理対象となる命令A31の後にリピー
ト処理制御命令であるリピートカウンタセット命令32
を置き、デコーダレジスタ5、リピートカウンタ8、命
令検出信号10、リピート制御部11、ゲート16、1
7を設けることにより、命令A31の実行とリピートカ
ウンタセット命令32の実行を並行して行なうことで、
リピートカウンタセット命令32の実行を実質上0サイ
クルとすることができる。
As described above, according to the present embodiment, the memory 1
Is a repeat counter set instruction 32 which is a repeat processing control instruction after an instruction A31 to be a repeat processing target.
And the decoder register 5, the repeat counter 8, the instruction detection signal 10, the repeat control unit 11, the gates 16 and 1,
7, the execution of the instruction A31 and the execution of the repeat counter set instruction 32 are performed in parallel.
The execution of the repeat counter set instruction 32 can be made substantially 0 cycles.

【0017】なお、本実施例において、リピート回数は
リピートカウンタセット命令32に含まれているものと
したが、ここには図示していないレジスタから与えても
よい。
In this embodiment, the number of repeats is included in the repeat counter set instruction 32, but may be given from a register (not shown).

【0018】[0018]

【発明の効果】以上のように本発明は、メモリにリピー
ト処理対象となる命令の後にリピート処理制御命令であ
るリピートカウンタセット命令を置き、デコーダレジス
タ、リピートカウンタ、リピート制御部を設けることに
より、命令の実行とリピートカウンタセット命令の実行
を並行して行ない、リピートカウンタセット命令の実行
を実質上0サイクルとすることができる。
As described above, according to the present invention, a repeat counter set instruction, which is a repeat processing control instruction, is placed after a repeat processing instruction in a memory, and a decoder register, a repeat counter, and a repeat control unit are provided. The execution of the instruction and the execution of the repeat counter set instruction are performed in parallel, and the execution of the repeat counter set instruction can be performed substantially in zero cycles.

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

【図1】本発明の実施例におけるプログラムリピート処
理装置のブロック図である。
FIG. 1 is a block diagram of a program repeat processing device according to an embodiment of the present invention.

【図2】同実施例において使用するクロックを示す図で
ある。
FIG. 2 is a diagram showing a clock used in the embodiment.

【図3】同実施例におけるメモリ1の内容を示す図であ
る。
FIG. 3 is a diagram showing contents of a memory 1 in the embodiment.

【図4】同実施例におけるリピート制御部11の内部状
態遷移を示す図である。
FIG. 4 is a diagram showing an internal state transition of a repeat control unit 11 in the embodiment.

【図5】同実施例におけるリピート制御部11の出力を
示す図である。
FIG. 5 is a diagram showing an output of a repeat control unit 11 in the embodiment.

【図6】同実施例における動作説明のための命令実行過
程を示す図である。
FIG. 6 is a diagram showing an instruction execution process for explaining the operation in the embodiment.

【図7】従来のプログラムリピート処理装置のブロック
図である。
FIG. 7 is a block diagram of a conventional program repeat processing device.

【図8】同従来例におけるメモリ72の内容を示す図で
ある。
FIG. 8 is a diagram showing contents of a memory 72 in the conventional example.

【図9】同従来例における動作説明のための命令実行過
程を示す図である。
FIG. 9 is a view showing an instruction execution process for explaining the operation in the conventional example.

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

1 メモリ 2 プログラムカウンタ 3 命令レジスタ 4 デコーダ 5 デコーダレジスタ 8 リピートカウンタ 11 リピート制御部 16 ゲート 17 ゲート 1 Memory 2 Program Counter 3 Instruction Register 4 Decoder 5 Decoder Register 8 Repeat Counter 11 Repeat Control Unit 16 Gate 17 Gate

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 命令フェッチステージ、デコードステー
ジ、実行ステージをパイプライン処理し、サイクルnの
デコードステージでの命令デコードの結果、その命令が
現在実行ステージにある命令のm回繰り返し実行を指示
している場合、サイクルn+1以降の実行ステージでは
サイクルnの実行ステージで行なっていた処理をm回繰
り返し実行するプログラムリピート制御方法。
An instruction fetch stage, a decode stage, and an execution stage are pipelined, and as a result of instruction decoding in a decode stage in a cycle n, the instruction instructs m-time repetition execution of an instruction currently in an execution stage. In the execution stage after the cycle n + 1, a program repeat control method in which the processing executed in the execution stage of the cycle n is repeated m times.
【請求項2】 繰り返し実行対象となる第1の命令と前
記第1の命令の次番地に格納され前記第1の命令の繰り
返し実行を指示する第2の命令とを少なくとも記憶する
メモリと、前記メモリにアドレス信号を与えるプログラ
ムカウンタと、前記プログラムカウンタが示す前記メモ
リの内容を一時記憶する命令レジスタと、前記命令レジ
スタの出力をデコードし各種の制御信号を出力するデコ
ーダと、前記デコーダの出力を一時保持するレジスタ
と、前記第2の命令によりプリセットされ前記第1の命
令の実行終了毎にその値を1ずつ減じるカウンタと、前
記デコーダで前記第2の命令以外がデコードされた時
は、前記プログラムカウンタへは内容のインクリメント
を、前記命令レジスタには前記メモリ出力の取り込み
を、前記レジスタには前記デコード出力の取り込みを指
示し、前記デコーダで前記第2の命令がデコードされた
時は、これ以降の前記プログラムカウンタへは内容のイ
ンクリメント禁止を、前記命令レジスタには前記メモリ
出力の取り込み禁止を、前記レジスタにはこれ以降の前
記デコード出力の取り込み禁止を指示し、さらに前記第
2の命令の実行サイクルでは前記カウンタへ前記第1の
命令で指示される繰り返し回数の書き込みを指示し、前
記カウンタが前記第1の命令の実行終了毎にその値を1
ずつ減じた結果規定回数の繰り返しを行なったことを示
した場合、前記プログラムカウンタへは内容のインクリ
メント動作の再開を、前記命令レジスタには前記メモリ
出力の取り込み動作の再開を、前記レジスタには前記デ
コード出力の取り込み動作再開を指示する制御手段とを
備えたことを特徴とするプログラムリピート制御装置。
2. A memory for storing at least a first instruction to be repeatedly executed and a second instruction stored at an address next to the first instruction and instructing the first instruction to be repeatedly executed, A program counter for providing an address signal to a memory, an instruction register for temporarily storing the contents of the memory indicated by the program counter, a decoder for decoding the output of the instruction register and outputting various control signals, and an output of the decoder A temporary holding register, a counter preset by the second instruction and decrementing its value by one each time the first instruction is executed, and a counter for decoding other than the second instruction by the decoder. The program counter is incremented, the instruction register is fetched the memory output, and the register is When the second instruction is decoded by the decoder, the content counter is prohibited from incrementing the program counter and the instruction register is prohibited from capturing the memory output. The register is instructed to prohibit the subsequent capture of the decoded output, and in the execution cycle of the second instruction, the counter is instructed to write the number of repetitions indicated by the first instruction to the counter. Each time the execution of the first instruction is completed, its value is set to 1
When the result indicates that repetition of the specified number of times has been performed, the program counter restarts the content increment operation, the instruction register restarts the memory output capture operation, and the register stores the memory output capture operation. Control means for instructing restart of the operation of taking in the decoded output.
JP11826791A 1991-05-23 1991-05-23 Program repeat control method and program repeat control device Expired - Fee Related JP2833259B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11826791A JP2833259B2 (en) 1991-05-23 1991-05-23 Program repeat control method and program repeat control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11826791A JP2833259B2 (en) 1991-05-23 1991-05-23 Program repeat control method and program repeat control device

Publications (2)

Publication Number Publication Date
JPH04346129A JPH04346129A (en) 1992-12-02
JP2833259B2 true JP2833259B2 (en) 1998-12-09

Family

ID=14732409

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11826791A Expired - Fee Related JP2833259B2 (en) 1991-05-23 1991-05-23 Program repeat control method and program repeat control device

Country Status (1)

Country Link
JP (1) JP2833259B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6242301B2 (en) 2009-06-30 2017-12-06 株式会社三洋物産 Game machine

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6242301B2 (en) 2009-06-30 2017-12-06 株式会社三洋物産 Game machine

Also Published As

Publication number Publication date
JPH04346129A (en) 1992-12-02

Similar Documents

Publication Publication Date Title
JP2943464B2 (en) Program control method and program control device
JP2748822B2 (en) Information processing device
JPH0740225B2 (en) Program skip operation control method
US20030093652A1 (en) Operand file using pointers and reference counters and a method of use
JPH0760388B2 (en) Pipeline control circuit
JPH10260944A (en) Interrupt system
JP2833259B2 (en) Program repeat control method and program repeat control device
JP2752076B2 (en) Programmable controller
JPS6242301B2 (en)
JP2758624B2 (en) Speed control method of micro program
JP2783285B2 (en) Information processing device
JP3755168B2 (en) Programmable controller
EP0211487A1 (en) Conditional operations in computers
JPH0212429A (en) Information processor with function coping with delayed jump
JPH07182165A (en) Method and apparatus for processing instruction with commit condition
JP3531856B2 (en) Program control method and program control device
JPS60124746A (en) data processing equipment
JPH09101889A (en) Pipeline arithmetic unit
JP2721610B2 (en) Programmable controller
JPH04370832A (en) Processor circuit
JP2721611B2 (en) Programmable controller
JP2636074B2 (en) Microprocessor
JPH03154929A (en) Central processing unit
JPH0916399A (en) calculator
JP2710558B2 (en) Information processing device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20081002

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

Free format text: PAYMENT UNTIL: 20091002

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees