JPH0224721A - Program controller - Google Patents
Program controllerInfo
- Publication number
- JPH0224721A JPH0224721A JP17381188A JP17381188A JPH0224721A JP H0224721 A JPH0224721 A JP H0224721A JP 17381188 A JP17381188 A JP 17381188A JP 17381188 A JP17381188 A JP 17381188A JP H0224721 A JPH0224721 A JP H0224721A
- Authority
- JP
- Japan
- Prior art keywords
- program
- instruction
- program counter
- program memory
- 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
Links
- 230000015654 memory Effects 0.000 claims abstract description 67
- 238000012546 transfer Methods 0.000 claims abstract description 14
- 238000012545 processing Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000009977 dual effect Effects 0.000 description 2
- 210000003127 knee Anatomy 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- GVBNSPFBYXGREE-UHFFFAOYSA-N Visnadine Natural products C1=CC(=O)OC2=C1C=CC1=C2C(OC(C)=O)C(OC(=O)C(C)CC)C(C)(C)O1 GVBNSPFBYXGREE-UHFFFAOYSA-N 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004898 kneading Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Advance Control (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、ディジタル信号処理プロセッサ(DSP)の
内部に備えられたプログラム制御装置に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a program control device provided inside a digital signal processor (DSP).
(従来の技術)
音声合成装置やディジタルフィルタ等には、その処理デ
ータを高速で演算するためにディジタル信号処理プロセ
ッサが使用されている。(Prior Art) Digital signal processing processors are used in speech synthesis devices, digital filters, and the like in order to calculate processing data at high speed.
このディジタル信号処理プロセッサの動作プログラムは
、プロセッサ内部に組み込み、あるいは外付けされたプ
ログラムメモリに格納される。−般に、プログラムメモ
リには、プログラムを構成する命令が実行順にシーケン
シャルに格納される。しかし、ディジタル信号処理プロ
セッサのプログラムは、同一命令が繰り返されることが
多いことから、プログラムメモリの容量を減少させる目
的で、ダイナミックに命令の読み出しを行なうプログラ
ム制御装置が設けられている。The operating program of this digital signal processing processor is either built into the processor or stored in an external program memory. - In general, instructions constituting a program are sequentially stored in a program memory in the order of execution. However, since programs for digital signal processors often repeat the same instructions, a program control device that dynamically reads instructions is provided in order to reduce the capacity of the program memory.
第2図に、そのような従来のプログラム制御装置のブロ
ック図を示す。FIG. 2 shows a block diagram of such a conventional program control device.
この装置は、プログラムメモリ1に格納されたプログラ
ムを構成する命令を、所定の順に読み出してデコード命
令2を得て、これを外部回路に向けて出力するものであ
る。This device reads instructions constituting a program stored in a program memory 1 in a predetermined order to obtain a decode instruction 2, which is output to an external circuit.
この装置には、プログラムメモリ1からの命令の読み出
しを制御するプログラムカウンタ3と、プログラムメモ
リ1から読み出された命令を一時格納する命令レジスタ
4と、この命令レジスタ4に格納された命令を解読しデ
コード命令2を出力する復号器5と、この装置各部の動
作を制御するコントローラ6から構成されている。This device includes a program counter 3 that controls reading of instructions from the program memory 1, an instruction register 4 that temporarily stores instructions read from the program memory 1, and an instruction register 4 that decodes instructions stored in the instruction register 4. The device is comprised of a decoder 5 which outputs a decode instruction 2, and a controller 6 which controls the operation of each part of this device.
プログラムカウンタ3は、プログラムメモリ1の読み出
しアドレスを決定するカウンタで、例えば、通常、1マ
シンサイクル毎に1ずつカウントアツプするよう制御さ
れている。プログラムメモリ1からは、プログラムカウ
ンタ3の制御に従って、該当するアドレスから命令が読
み出され、命令レジスタ4に格納される。The program counter 3 is a counter that determines the read address of the program memory 1, and is normally controlled to count up by 1 every machine cycle, for example. Instructions are read from the program memory 1 from the corresponding address under the control of the program counter 3 and stored in the instruction register 4.
命令レジスタ4に格納された命令は、復号器5において
解読される。命令には、通常、演算命令、ジャンプ命令
、I10命令等がある。ジャンプ命令以外の命令の場合
、復号器5で解読を終えると、そのままデコード命令2
として外部回路に向けて出力される。The instructions stored in the instruction register 4 are decoded by the decoder 5. The instructions typically include arithmetic instructions, jump instructions, I10 instructions, and the like. In the case of an instruction other than a jump instruction, once decoding is completed by the decoder 5, the decoding instruction 2 is sent as is.
is output to the external circuit as .
コントローラ6は、ジャンプ命令以外の命令の場合、プ
ログラムカウンタ3に対しカウントアツプを指示し、命
令レジスタ4に対し、プログラムメモリ1から出力され
る次の命令の格納の指示を行なう。In the case of an instruction other than a jump instruction, the controller 6 instructs the program counter 3 to count up, and instructs the instruction register 4 to store the next instruction output from the program memory 1.
、一方、ジャンプ命令の場合には、復号器5からその命
令中に含まれるジャンプ先アドレスをプログラムカウン
タ3に向けて転送し、プログラムカウンタ3に対しその
ジャンプ先アドレスの格納を指示する。これによって、
プログラムカウンタ3は、ジャンプ先アドレスを開始点
として再び1ずつカウントアツプを開始し、プログラム
メモリlからはそれに応じた命令が出力される。On the other hand, in the case of a jump instruction, the decoder 5 transfers the jump destination address included in the instruction to the program counter 3, and instructs the program counter 3 to store the jump destination address. by this,
The program counter 3 starts counting up by 1 again with the jump destination address as the starting point, and the program memory 1 outputs a corresponding instruction.
ところで、通常、プログラムメモリ1からの命令の読み
出しのためには、一定のアクセスタイムが要求される。Incidentally, reading instructions from the program memory 1 usually requires a certain access time.
又、命令レジスタ4に格納された命令な復号器5が解読
する場合、やはり一定の解読時間が要求される。Furthermore, when the decoder 5 decodes the instructions stored in the instruction register 4, a certain decoding time is still required.
従って、プログラムカウンタ3がプログラムメモリ1に
対し所定のアドレス信号を出力し、こねに応じてプログ
ラムメモリ1から命令が読み出され、その命令が命令レ
ジスタ4に格納され、更に復号器5がその命令を解読す
るまでには一定の動作時間が必要になる。Therefore, the program counter 3 outputs a predetermined address signal to the program memory 1, an instruction is read from the program memory 1 in response to the kneading, the instruction is stored in the instruction register 4, and the decoder 5 A certain amount of operating time is required to decipher the code.
このプログラム制御装置により出力されるデコード命令
2を受は入れる外部回路の演算速度が上記動作時間に比
べて遅い場合には問題はないが、逆に演算速度が高速化
された場合、デコード命令2の出力が遅いことは演算の
高速化を妨げる要因となる。There is no problem if the calculation speed of the external circuit that receives the decode instruction 2 output by this program control device is slower than the above operation time, but conversely, if the calculation speed is increased, the decode instruction 2 The slow output of is a factor that prevents speeding up of calculations.
そこで、従来、プログラムメモリ1からの命令の読み出
しと復号器5の命令の解読とを、いわゆるバイブライン
制御によって並行して実行するようにしている。即ち、
プログラムカウンタ3がプログラムメモリ1にアドレス
信号を供給し命令が読み出される間、復号器5は、その
1マシンサイクル前に読み出された命令を命令レジスタ
4から受は入れ解読作業を実行する。Therefore, conventionally, the reading of instructions from the program memory 1 and the decoding of instructions by the decoder 5 are executed in parallel by so-called vibe line control. That is,
While the program counter 3 supplies an address signal to the program memory 1 and an instruction is read out, the decoder 5 receives the instruction read out one machine cycle before from the instruction register 4 and executes the decoding operation.
従来のプログラム制御装置においては、このようにして
その処理の高速化を図っていた。In conventional program control devices, the processing speed has been increased in this way.
(発明が解決しようとする課題)
ところで、以上のような従来のプログラム制御装置のジ
ャンプ命令に関する動作について説明する。(Problems to be Solved by the Invention) Now, the operation of the conventional program control device as described above regarding a jump instruction will be explained.
第3図は、その従来の装置の動作タイムチャートである
。FIG. 3 is an operation time chart of the conventional device.
図(a)に示すように、プログラムカウンタは、1マシ
ンサイクル毎に、m−1,m、m+1というように1ず
つカウントアツプされる。そして、そのアドレス信号に
対応して読み出された命令を、それぞれCニー2 、
Ct−+・・・というように表示すると、その命令は第
3図(b)に示すように命令レジスタに格納され、これ
が同図(C)に示すように復号器によって解読される。As shown in Figure (a), the program counter is incremented by 1 in the order of m-1, m, m+1 every machine cycle. Then, the instructions read out corresponding to the address signals are sent to C knee 2 and C knee 2, respectively.
When displayed as Ct-+..., the instruction is stored in the instruction register as shown in FIG. 3(b), and is decoded by the decoder as shown in FIG. 3(C).
そして、先ず、第3図に示すように、プログラムカウン
タ3がm−1を示しているとき、命令レジスタ4には、
既にその1マシンサイクル前に読み出された命令Cm−
2が格納されており、それが復号器5によって解読され
ている。First, as shown in FIG. 3, when the program counter 3 indicates m-1, the instruction register 4 contains the following information:
Instruction Cm- which was already read out one machine cycle ago
2 is stored and decoded by the decoder 5.
プログラムカウンタ3が1だけカウントアツプされてア
ドレス信号がmになったとき、命令レジスタ4には命令
cm−tが格納され、これが復号器5によって解読され
る。尚、命令C1は、ジャンプ命令であるものとし、そ
のジャンプ命令にはジャンプ先アドレスが含まれている
ものとする。When the program counter 3 is counted up by 1 and the address signal becomes m, the instruction cm-t is stored in the instruction register 4 and decoded by the decoder 5. It is assumed that the instruction C1 is a jump instruction, and that the jump instruction includes a jump destination address.
ジャンプ命令であるか否かは、復号器5が命令の解読を
終えてから初めて分かるため、命令C,nに含まれるジ
ャンプ先アドレスβがプログラムカウンタ3に格納され
るときには、既にプログラムカウンタはm+1を示して
おり、図示しない命令C+a+1が読み出されている。Whether it is a jump instruction or not is known only after the decoder 5 finishes decoding the instruction. Therefore, by the time the jump destination address β included in the instructions C and n is stored in the program counter 3, the program counter has already reached m+1. , and an instruction C+a+1 (not shown) is read out.
この命令Cm * 1は不要な命令であるため、1マシ
ンサイクル分装置の動作が見過られる。Since this instruction Cm*1 is an unnecessary instruction, the operation of the device is overlooked for one machine cycle.
そして、次にプログラムカウンタがアドレス信号で+1
を出力したとき、命令C4が命令レジスタに格納され、
復号器5によってこれが解読される。その後、プログラ
ムカウンタがg+2に功つントアップされ、以下、既に
説明したと同様の動作が続行される。Then, the program counter increases by +1 with the address signal.
When outputting, instruction C4 is stored in the instruction register,
This is decoded by the decoder 5. Thereafter, the program counter is incremented to g+2, and the same operations as already described are continued.
即ち、従来、このようにプログラム中にジャンプ命令が
存在した場合、必ず1マシンサイクル分の無駄時間が発
生してしまう、従って、例えば分類や検索等の処理の多
い、即ちジャンプ命令の非常に多いプログラムにおいて
は、この無駄時間が実行時間中で大きな割り合いを占め
、処理能率を低下させるという問題があった。In other words, conventionally, when a jump instruction exists in a program, one machine cycle worth of wasted time always occurs.Therefore, for example, there is a lot of processing such as classification and search, that is, there are a large number of jump instructions. In programs, there is a problem in that this dead time occupies a large proportion of the execution time, reducing processing efficiency.
本発明は以上の点に着目してなされたもので、ジャンプ
動作における無駄時間を無くし、効率の良い制御を行な
うことができるプログラム制御装置を提供することを目
的とするものである。The present invention has been made with attention to the above points, and an object of the present invention is to provide a program control device that can eliminate wasted time in jump operations and perform efficient control.
(課題を解決するための手段)
本発明のプログラム制御装置は、プログラムを格納した
デュアルポート型のプログラムメモリから、前記プログ
ラムを構成する命令を所定の順に読み出して解読し、外
部回路に向けて出力するプログラム制御装置において、
前記プログラムメモリからの前記命令の読み出しを制御
する第1のプログラムカウンタ及び第2のプログラムカ
ウンタと、前記プログラムメモリの第1の出力ポートに
接続され、前記第1のプログラムカウンタの制御により
前記プログラムメモリから読み出された命令を一時格納
する第1の命令レジスタと、前記プログラムメモリの第
2の出力ポートに接続され、前記第2のプログラムカウ
ンタの制御により前記プログラムメモリから読み出され
た命令を一時格納する第2の命令レジスタと、前記いず
れかの命令レジスタに格納された命令を解読する復号器
と、前記プログラムメモリの第1の出力ポートと前記第
2のプログラムカウンタとを接続し、前記第2の出力ポ
ートと前記第1のプログラムカウンタとを接続するジャ
ンプ先アドレス転送線と、前記命令レジスタの何れか一
方に格納された命令を前記復号器が解読するよう、前記
命令レジスタを選択制御し、かつ、選択中の命令レジス
タにジャンプ命令が格納されたとき、次のタイミングで
命令レジスタの選択を切り換える選択制御回路とを設け
たことを特徴とするものである。(Means for Solving the Problems) A program control device of the present invention reads out and decodes instructions constituting a program from a dual-port program memory storing a program in a predetermined order, and outputs the instructions to an external circuit. In a program control device that
a first program counter and a second program counter that control reading of the instructions from the program memory; A first instruction register is connected to a second output port of the program memory and temporarily stores instructions read from the program memory under the control of the second program counter. a second instruction register for storing instructions; a decoder for decoding instructions stored in any of the instruction registers; a first output port of the program memory and the second program counter; selectively controlling the instruction register so that the decoder decodes an instruction stored in either one of the jump destination address transfer line connecting the second output port and the first program counter and the instruction register; , and a selection control circuit that switches the selection of the instruction register at the next timing when a jump instruction is stored in the selected instruction register.
又、2つの同一のプログラムを格納した2つのプログラ
ムメモリを用いても、同様のことを行なうことができる
。Further, the same thing can be done by using two program memories storing two identical programs.
(作用)
以上の装置は、例えば、通常、第1のプログラムカウン
タの制御によりプログラムメモリから命令を読み出して
、これを第1の命令レジスタに格納し、復号器はそこに
格納された命令の解読を行なうよう動作する。ジャンプ
命令が無く、プログラムカウンタが、1ずつ順にカウン
トアツプされて命令を読み出す場合、この動作が繰り返
される。(Operation) The above device usually reads an instruction from a program memory under the control of a first program counter, stores it in a first instruction register, and a decoder decodes the instruction stored there. It operates to do the following. If there is no jump instruction and the program counter is counted up one by one to read instructions, this operation is repeated.
一方、第1の命令レジスタにジャンプ命令が格納された
場合、復号器がそのジャンプ命令の解読を開始すると同
時に、そのジャンプ命令中のジャンプ先アドレスが、ジ
ャンプ先アドレス転送線を通じて第2のプログラムカウ
ンタに格納される。On the other hand, when a jump instruction is stored in the first instruction register, at the same time that the decoder starts decoding the jump instruction, the jump destination address in the jump instruction is transferred to the second program counter via the jump destination address transfer line. is stored in
そして、復号器が第1の命令レジスタに格納された命令
の解読を終え、それがジャンプ命令と認識されると、選
択制御回路は、直ちに第2の命令レジスタの出力を復号
器に出力するようその選択を切り換える。Then, when the decoder finishes decoding the instruction stored in the first instruction register and recognizes it as a jump instruction, the selection control circuit immediately outputs the output of the second instruction register to the decoder. Switch that selection.
第2の命令レジスタには、既に、第2のプログラムカウ
ンタのジャンプ先アドレスに基づいて読み出された命令
が格納されており、復号器は直ちにその命令の解読に移
る。その結果、ジャンプ命令によって従来のような無駄
時間が生じることがない。The second instruction register has already stored the instruction read based on the jump destination address of the second program counter, and the decoder immediately starts decoding that instruction. As a result, jump instructions do not cause wasted time as in the conventional case.
(実施例) 以下、本発明を図の実施例を用いて詳細に説明する。(Example) Hereinafter, the present invention will be explained in detail using embodiments shown in the drawings.
第1図は、本発明のプログラム制御装置の実施例を示す
ブロック図である。FIG. 1 is a block diagram showing an embodiment of a program control device of the present invention.
この装置は、プログラムメモリ10と、そのプログラム
メモリ10からの命令の読み出しを制御する第1のプロ
グラムカウンタllaと第2のプログラムカウンタll
bと、プログラムメモリ10から読み出された命令を格
納する第1の命令レジスタ13a、第2の命令レジスタ
13b、及びこれらの出力を選択するセレクタ14と、
復号器15と、各部の動作を制御するコントローラ16
とを有している。This device includes a program memory 10, a first program counter lla and a second program counter lla for controlling reading of instructions from the program memory 10.
b, a first instruction register 13a that stores instructions read from the program memory 10, a second instruction register 13b, and a selector 14 that selects the outputs thereof;
A decoder 15 and a controller 16 that controls the operation of each part.
It has
上記、第1のプログラムカウンタllaと第2のプログ
ラムカウンタllbとは、いずれも選択制御回路16の
制御によって1ずつカウントアツプし、あるいはジャン
プ先アドレスを格納するカウンタから成る。The first program counter lla and the second program counter llb are both configured to count up by one under the control of the selection control circuit 16, or to store a jump destination address.
又、第1の命令レジスタ13aは、プログラムメモリ1
oの第1の出力ポートに接続されている。又、第2の命
令レジスタ13bは、プログラムメモリ10の第2の出
力ポート12bに接続されている。Further, the first instruction register 13a is connected to the program memory 1.
o's first output port. Further, the second instruction register 13b is connected to the second output port 12b of the program memory 10.
プログラムメモリ10は、いわゆるデュアルポート型メ
モリであって、第1のプログラムカウンタllaの制御
により読み出された命令は、第1の出力ポート12aに
出力され、第2のプログラムカウンタllbの制御によ
り読み出された命令は第2の出力ポート12bに出力さ
れる。このデュアルポートメモリは、良く知られている
ように、2つのプログラムカウンタlla、llbから
入力されるアドレス信号が一致しない場合には、その中
に格納された命令が、それぞれ別個に並行して読み出さ
れるランダム・アクセス・メモリから成る。The program memory 10 is a so-called dual-port memory, in which instructions read under the control of the first program counter lla are output to the first output port 12a, and instructions read under the control of the second program counter llb. The issued command is output to the second output port 12b. As is well known, in this dual port memory, if the address signals input from the two program counters lla and llb do not match, the instructions stored therein are read out separately and in parallel. consists of random access memory.
セレクタ14は、第1の命令レジスタ13aあるいは第
2の命令レジスタ13bの出力する命令のいずれか一方
を選択して、復号器15に向けて出力する回路である。The selector 14 is a circuit that selects either one of the instructions output from the first instruction register 13a or the second instruction register 13b and outputs the selected instruction to the decoder 15.
このセレクタ14の選択動作は、選択制御回路16によ
って制御される。復号器15は、セレクタ14から出力
された命令を解読し、図示しない外部回路に向けて解読
後の命令を出力する回路である。選択制御回路18は、
復号器15によって解読された命令の内容に従い、プロ
グラムカウンタlla及びllbの動作を制御し、セレ
クタ14の選択動作を制御するゲート回路から成る。The selection operation of the selector 14 is controlled by a selection control circuit 16. The decoder 15 is a circuit that decodes the command output from the selector 14 and outputs the decoded command to an external circuit (not shown). The selection control circuit 18 is
It consists of a gate circuit that controls the operations of program counters lla and llb and the selection operation of the selector 14 according to the contents of the instructions decoded by the decoder 15.
更に、この回路には、プログラムメモリ10の第1の出
力ポート12aと、第2のプログラムカウンタllbと
を接続するジャンプ先アドレス転送線17a、及び、プ
ログラムメモリ10の第2の出力ポート12bと、第1
のプログラムカウンタllaとを接続するジャンプ先ア
ドレス転送線17bとが設けられている。このジャンプ
先アドレス転送線17a、17bは、いずれもプログラ
ムメモリ10から読み出された命令の内のジャンプ先ア
ドレスに相当する部分を、無条件で第1のプログラムカ
ウンタllaあるいは第2のプログラムカウンタllb
に転送するパラレル転送線である。そして、例えば第1
のプログラムカウンタ11aの制御によりプログラムメ
モリ10から命令が読み出され、第1の出力ポート12
aから出力される命令に基づいて処理が実行されている
場合には、ぞの命令のジャンプ先アドレスに相当する部
分が、常に第2のプログラムカウンタに格納される。選
択制御回路16はそのように各部の動作制御を行なう。Furthermore, this circuit includes a jump destination address transfer line 17a connecting the first output port 12a of the program memory 10 and the second program counter llb, and a second output port 12b of the program memory 10. 1st
A jump destination address transfer line 17b is provided which connects the program counter lla of the jump destination address transfer line 17b. These jump destination address transfer lines 17a and 17b unconditionally transfer a portion of the instruction read from the program memory 10 corresponding to the jump destination address to the first program counter lla or the second program counter llb.
It is a parallel transfer line that transfers data to For example, the first
An instruction is read from the program memory 10 under the control of the program counter 11a of the first output port 12.
When a process is executed based on an instruction output from a, a portion corresponding to the jump destination address of that instruction is always stored in the second program counter. The selection control circuit 16 thus controls the operation of each section.
以上の構成の本発明のプログラム制御装置は次のように
動作する。The program control device of the present invention having the above configuration operates as follows.
第4図は、本発明の詳細な説明するタイムチャートであ
る。FIG. 4 is a time chart illustrating the present invention in detail.
この実施例では、第1図に示した第1のプログラムカウ
ンタllaの制御によって読み出された命令に基づいて
処理が実行されているものとする。In this embodiment, it is assumed that processing is executed based on instructions read out under the control of the first program counter lla shown in FIG.
即ち、第4図(a)に示すように、先ず、第1のプログ
ラムカウンタllaが、1マシンサイクル毎にm−1,
m、m+1というようにカウントアツプされていく。そ
して、第4図(b)に示すように、第1の命令レジスタ
13aに対し命令C−−2、C−リ、Cmというように
、プログラムカウンタ3のカウントタイミングより1マ
シンサイクル遅れて該当する命令が格納され、それが復
号器15によって解読されていく[第4図(f)]。That is, as shown in FIG. 4(a), first, the first program counter lla is set to m-1,
The count continues as m, m+1, and so on. Then, as shown in FIG. 4(b), instructions C--2, C-re, Cm are applied to the first instruction register 13a, one machine cycle later than the count timing of the program counter 3. Instructions are stored and decoded by the decoder 15 [FIG. 4(f)].
このとき、第2のプログラムカウンタllbには、先に
説明したように、プログラムメモリ10から読み出され
た命令の内、ジャンプ先アドレスに相当する部分が格納
されるが、ジャンプ命令以外の命令が読み出された場合
、そのデータは無意味であって、第4図(c)、(d)
に示すように全く無視される。即ち、第4図(e)に示
すように、セレクタは専らa側、即ち第1の命令レジス
タ13aの出力を復号器15に向けて出力するよう選択
をしている。At this time, the second program counter llb stores the portion of the instruction read from the program memory 10 that corresponds to the jump destination address, but instructions other than the jump instruction are stored in the second program counter llb. When read, the data is meaningless and as shown in FIGS. 4(c) and (d)
It is completely ignored as shown in . That is, as shown in FIG. 4(e), the selector selects to output only the a side, that is, the output of the first instruction register 13a, to the decoder 15.
ここで、第1のプログラムカウンタllaがカウントを
mとし、その1マシンサイクル後に、第1の命令レジス
タにジャンプ命令C1が格納されたとする。Here, it is assumed that the first program counter lla has a count of m, and one machine cycle later, a jump instruction C1 is stored in the first instruction register.
この場合、第2のプログラムカウンタllbには、ジャ
ンプ先アドレス℃が格納される。尚、このタイミングで
は、まだセレクタ14はa側、即ち第1の命令レジスタ
13aを選択しており、復号器15は命令C1の解読を
行なっている。そして、この命令C1が解読されると、
これはジャンプ命令であるから、選択制御回路16はセ
レクタ14を制御しその選択をb側に切り換える[第4
図(e)]。In this case, the jump destination address °C is stored in the second program counter llb. At this timing, the selector 14 is still selecting the a side, that is, the first instruction register 13a, and the decoder 15 is decoding the instruction C1. Then, when this instruction C1 is decoded,
Since this is a jump command, the selection control circuit 16 controls the selector 14 and switches the selection to the b side [4th
Figure (e)].
一方、既に第2のプログラムカウンタllbは、その1
マシンサイクル前にジャンプ先アドレス2を示しており
、プログラムメモリ10からは、それに該当する命令が
第2の命令レジスタ13bに読み出される[第4図(d
)]。この読み出されるタイミングは、先のジャンプ命
令C,。On the other hand, the second program counter llb has already
Jump destination address 2 is indicated before the machine cycle, and the corresponding instruction is read out from the program memory 10 to the second instruction register 13b [Fig. 4(d)
)]. The timing at which this is read is the previous jump instruction C.
が解読された直後となる。そして、その段階では、セレ
クタがb側に切り換わっており、ジャンプ先アドレス℃
に格納された命令CQが復号器15によって解読される
。その後は、今度は第2のプログラムカウンタllbの
制御によって、プログラムメモリ10から順に命令が読
み出され、それが処理に使用されることになる。Immediately after it is decoded. At that stage, the selector has been switched to the b side, and the jump destination address is ℃
The instruction CQ stored in the decoder 15 is decoded by the decoder 15. Thereafter, instructions are sequentially read from the program memory 10 under the control of the second program counter llb and used for processing.
その後の動作は、先に説明したと同様である。The subsequent operations are similar to those described above.
この第4図の動作を見て分かるように、ジャンプ命令C
,,が実行された場合においても、従来のような1マシ
ンサイクル分の無駄時間が生じない。従って、ジャンプ
命令を多く含むプログラムの実行にあたっては、無駄時
間がなく高い効率で処理を実行することができる。As you can see from the operation in Figure 4, jump command C
, , is executed, there is no wasted time equivalent to one machine cycle as in the conventional case. Therefore, when executing a program that includes many jump instructions, processing can be executed with high efficiency without wasting time.
尚、第1図の実施例においては、デュアルポートメモリ
を使用してプログラムの読み出しを行なっている。この
プログラムメモリは、ランダム・アクセス・メモリであ
るから、例えば、第1のプログラムカウンタllaによ
って命令を読み出し、所定の処理を実行している間、第
2のプログラムカウンタllbを用いて、任意のアドレ
スに新たな命令の書き込みを行なうことができる。この
結果、必要な都度、必要なタイミングでプログラムの書
き換えを行ない、より高度な複雑な処理を実行すること
が可能となる。In the embodiment shown in FIG. 1, a dual port memory is used to read the program. Since this program memory is a random access memory, for example, while the first program counter lla reads an instruction and executes a predetermined process, the second program counter llb is used to read an instruction from an arbitrary address. New instructions can be written to. As a result, it becomes possible to rewrite the program as and when necessary and execute more sophisticated and complex processing.
第5図に、本発明の装置の他の実施例を示す要部のブロ
ック図を示した。FIG. 5 shows a block diagram of the main parts of another embodiment of the device of the present invention.
この装置は、第1図の装置において、そのプログラムメ
モリ10を2つのプログラムメモリとしたものである。In this device, the program memory 10 in the device shown in FIG. 1 is replaced by two program memories.
即ち、図のように、第1のプログラムメモリ10′ a
と第2のプログラムメモリ10’bとから構成されてい
る。この両メモリは、いずれも全く同一のプログラムが
格納された、例えばリード・オンリ・メモリから構成さ
れるものとする。That is, as shown in the figure, the first program memory 10'a
and a second program memory 10'b. It is assumed that both of these memories are, for example, read-only memories in which exactly the same program is stored.
このようにすれば、第1図に示した装置と全く同一の動
作を実行させることができる。しかも、2つの同一内容
のリード・オンリ・メモリを使用するようにしても、リ
ード・オンリ・メモリの構成上、ハードウェア的には、
第1図の実施例よりもむしろ小型化を図ることが可能で
ある。In this way, it is possible to perform exactly the same operation as the device shown in FIG. Moreover, even if two read-only memories with the same contents are used, due to the structure of the read-only memory, the hardware
It is possible to achieve a smaller size than the embodiment of FIG.
尚、この実施例において、その他の結線等については、
第1図と全く同様であり、その図示及び説明は省略する
。In addition, in this example, regarding other connections etc.
It is completely the same as FIG. 1, and its illustration and explanation will be omitted.
本発明は以上の実施例に限定されない。The present invention is not limited to the above embodiments.
第1図の実施例においては、選択制御回路16は、命令
レジスタ13a、13bと復号器15の間に挿入された
セレクタ14を制御するよう説明したが、命令レジスタ
13aや命令レジスタ13bのデータの出力を直接制御
したり、復号器15の入力ポートを2つ設け、いずれの
ポートから入力する命令を処理するかの選択を制御した
り、種々の変形が可能である。又、プログラムカウンタ
の動作制御についても、既知の同等の制御手段に置き換
えることが可能である。In the embodiment shown in FIG. 1, it has been explained that the selection control circuit 16 controls the selector 14 inserted between the instruction registers 13a and 13b and the decoder 15. Various modifications are possible, such as directly controlling the output, providing two input ports for the decoder 15, and controlling the selection of which port inputs an instruction to be processed. Furthermore, the operation control of the program counter can also be replaced with known equivalent control means.
(発明の効果)
以上説明した本発明のプログラム制御装置によれば、2
つのプログラムカウンタと2つの命令レジスタとを設け
、一方の命令レジスタに格納された命令を解読している
間、他方のプログラムカウンタによってジャンプ先アド
レスを指定し、ジャンプ命令の解読と同時にジャンプ先
アドレスにおける命令の出力を可能としたので、ジャン
プ命令実行時、従来のような無駄時間を生じ難く、高能
率、高速なプログラム制御が可能となる。(Effects of the Invention) According to the program control device of the present invention described above, two
One program counter and two instruction registers are provided, and while an instruction stored in one instruction register is being decoded, a jump destination address is specified by the other program counter, and the jump destination address is specified at the same time as the jump instruction is decoded. Since it is possible to output instructions, it is difficult to waste time when executing jump instructions, as is the case with conventional methods, and highly efficient and high-speed program control is possible.
第1図は本発明のプログラム制御装置の実施例を示すブ
ロック図、第2図は従来のプログラム制御装置の一例を
示すブロック図、第3図は従来の装置の動作を示すタイ
ムチャート、第4図は本発明の動作を示すタイムチャー
ト、第5図は本発明の装置の他の実施例を示す要部ブロ
ック図である。
10・・・プログラムメモリ、
10’a・・・第1のプログラムメモリ、10′ b・
・・第2のプログラムメモリ、11a・・・第1のプロ
グラムカウンタ、11b・・・第2のプログラムカウン
タ、12a・・・第1の出力ポート、
12b・・・第2の出力ポート、
13a・・・第1の命令レジスタ、
13b・・・第2の命令レジスタ、14・・・セレクタ
、15・・・復号器、16・・・選択制御回路。
特許出願人 沖電気工業株式会社
手続補正書帽側
平成元年 2月6
日FIG. 1 is a block diagram showing an embodiment of the program control device of the present invention, FIG. 2 is a block diagram showing an example of a conventional program control device, FIG. 3 is a time chart showing the operation of the conventional device, and FIG. The figure is a time chart showing the operation of the present invention, and FIG. 5 is a main part block diagram showing another embodiment of the apparatus of the present invention. 10...Program memory, 10'a...First program memory, 10'b.
...Second program memory, 11a...First program counter, 11b...Second program counter, 12a...First output port, 12b...Second output port, 13a. ...First instruction register, 13b...Second instruction register, 14...Selector, 15...Decoder, 16...Selection control circuit. Patent Applicant: Oki Electric Industry Co., Ltd. Procedural Amendment Document Date: February 6, 1989
Claims (1)
ムメモリから、前記プログラムを構成する命令を所定の
順に読み出して解読し、外部回路に向けて出力するプロ
グラム制御装置において、前記プログラムメモリからの
前記命令の読み出しを制御する第1のプログラムカウン
タ及び第2のプログラムカウンタと、 前記プログラムメモリの第1の出力ポートに接続され、
前記第1のプログラムカウンタの制御により前記プログ
ラムメモリから読み出された命令を一時格納する第1の
命令レジスタと、 前記プログラムメモリの第2の出力ポートに接続され、
前記第2のプログラムカウンタの制御により前記プログ
ラムメモリから読み出された命令を一時格納する第2の
命令レジスタと、 前記いずれかの命令レジスタに格納された命令を解読す
る復号器と、 前記プログラムメモリの第1の出力ポートと前記第2の
プログラムカウンタとを接続し、前記第2の出力ポート
と前記第1のプログラムカウンタとを接続するジャンプ
先アドレス転送線と、前記命令レジスタの何れか一方に
格納された命令を前記復号器が解読するよう、前記命令
レジスタを選択制御し、かつ、選択中の命令レジスタに
ジャンプ命令が格納されたとき、次のタイミングで命令
レジスタの選択を切り換える選択制御回路とを設けたこ
とを特徴とするプログラム制御回路。 2、それぞれ同一のプログラムを格納した第1のプログ
ラムメモリ及び第2のプログラムメモリから、前記プロ
グラムを構成する命令を所定の順に読み出して、外部回
路に向けて出力するプログラム制御装置において、 前記第1のプログラムメモリからの前記命令の読み出し
を制御する第1のプログラムカウンタと、 前記第2のプログラムメモリからの前記命令の読み出し
を制御する第2のプログラムカウンタと、 前記第1のプログラムカウンタの制御により前記第1の
プログラムメモリから読み出された命令を一時格納する
第1の命令レジスタと、 前記第2のプログラムカウンタの制御により前記第2の
プログラムメモリから読み出された命令を一時格納する
第2の命令レジスタと、 前記いずれかの命令レジスタに格納された命令を解読す
る復号器と、 前記第1のプログラムメモリの出力ポートと前記第2の
プログラムカウンタとを接続し、前記第2のプログラム
メモリの出力ポートと前記第1のプログラムカウンタと
を接続するジャンプ先アドレス転送線と、 前記命令レジスタの何れか一方に格納された命令を前記
復号器が解読するよう、前記命令レジスタを選択制御し
、かつ、選択中の命令レジスタにジャンプ命令が格納さ
れたとき、次のタイミングで命令レジスタの選択を切り
換える選択制御回路とを設けたことを特徴とするプログ
ラム制御回路。[Scope of Claims] 1. A program control device that reads and decodes instructions constituting a program from a dual-port program memory storing a program in a predetermined order and outputs the commands to an external circuit, wherein the program memory a first program counter and a second program counter for controlling reading of the instructions from the program memory; and a first program counter connected to a first output port of the program memory;
a first instruction register that temporarily stores instructions read from the program memory under control of the first program counter; and a second instruction register connected to a second output port of the program memory;
a second instruction register that temporarily stores instructions read out from the program memory under control of the second program counter; a decoder that decodes the instructions stored in either of the instruction registers; and the program memory. a jump destination address transfer line connecting the first output port of the controller and the second program counter, and connecting the jump destination address transfer line connecting the second output port and the first program counter, and one of the instruction register. a selection control circuit that selectively controls the instruction register so that the decoder decodes the stored instruction, and switches the selection of the instruction register at the next timing when a jump instruction is stored in the currently selected instruction register; A program control circuit characterized by comprising: 2. A program control device that reads instructions constituting the program from a first program memory and a second program memory each storing the same program in a predetermined order and outputs the commands to an external circuit, a first program counter that controls reading of the instructions from the program memory; a second program counter that controls reading of the instructions from the second program memory; and by control of the first program counter. a first instruction register that temporarily stores instructions read from the first program memory; and a second instruction register that temporarily stores instructions read from the second program memory under control of the second program counter. a decoder for decoding the instructions stored in any of the instruction registers; a decoder connecting the output port of the first program memory and the second program counter, and connecting the output port of the first program memory to the second program counter; a jump destination address transfer line connecting the output port of the first program counter with the first program counter; and selectively controlling the instruction register so that the decoder decodes the instruction stored in either one of the instruction registers; A program control circuit further comprising: a selection control circuit that switches the selection of the instruction register at the next timing when a jump instruction is stored in the selected instruction register.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17381188A JPH0224721A (en) | 1988-07-14 | 1988-07-14 | Program controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17381188A JPH0224721A (en) | 1988-07-14 | 1988-07-14 | Program controller |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0224721A true JPH0224721A (en) | 1990-01-26 |
Family
ID=15967597
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17381188A Pending JPH0224721A (en) | 1988-07-14 | 1988-07-14 | Program controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0224721A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02103535U (en) * | 1989-02-07 | 1990-08-17 | ||
| JPH0397405U (en) * | 1990-01-24 | 1991-10-07 | ||
| JPH03104201U (en) * | 1990-02-09 | 1991-10-29 | ||
| US6266764B1 (en) | 1998-03-17 | 2001-07-24 | Matsushita Electric Industrial Co., Ltd. | Program controller for switching between first program and second program |
-
1988
- 1988-07-14 JP JP17381188A patent/JPH0224721A/en active Pending
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02103535U (en) * | 1989-02-07 | 1990-08-17 | ||
| JPH0397405U (en) * | 1990-01-24 | 1991-10-07 | ||
| JPH03104201U (en) * | 1990-02-09 | 1991-10-29 | ||
| US6266764B1 (en) | 1998-03-17 | 2001-07-24 | Matsushita Electric Industrial Co., Ltd. | Program controller for switching between first program and second program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3237858B2 (en) | Arithmetic unit | |
| JP2577023B2 (en) | Address extension control method for information processing equipment | |
| JPH0218729B2 (en) | ||
| JPH0224719A (en) | Program controller | |
| JPH05197543A (en) | Instruction decoding system of information processor | |
| JPS622363A (en) | Arithmetic unit | |
| JPH02287624A (en) | Data processor | |
| JP2982129B2 (en) | Micro program controller | |
| JP2985244B2 (en) | Information processing device | |
| JPS62157944A (en) | Microprogram control device | |
| JP3088956B2 (en) | Arithmetic unit | |
| JPH0319570B2 (en) | ||
| JPH0683624A (en) | Processor and its control method | |
| JP2000250869A (en) | Multiprocessor control method and device | |
| JPH0354632A (en) | Arithmetic instruction processor | |
| JPS5899869A (en) | Parallel processing system | |
| JPH04276827A (en) | pipeline processing equipment | |
| JPH06259391A (en) | Pipeline processing system configuration method | |
| JPS59189407A (en) | Sequence control device | |
| JPH0218732B2 (en) | ||
| JPH0855033A (en) | Information processor | |
| JPH1040168A (en) | Data processing device | |
| JPH08297583A (en) | Interrupt handling apparatus and method thereof | |
| JPH07210384A (en) | Floating point arithmetic unit | |
| JPH01224870A (en) | Main memory access instruction execution control system for information processor |