JP3459495B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP3459495B2
JP3459495B2 JP13227695A JP13227695A JP3459495B2 JP 3459495 B2 JP3459495 B2 JP 3459495B2 JP 13227695 A JP13227695 A JP 13227695A JP 13227695 A JP13227695 A JP 13227695A JP 3459495 B2 JP3459495 B2 JP 3459495B2
Authority
JP
Japan
Prior art keywords
data
clock
wait
address
memory
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
JP13227695A
Other languages
Japanese (ja)
Other versions
JPH08328942A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP13227695A priority Critical patent/JP3459495B2/en
Publication of JPH08328942A publication Critical patent/JPH08328942A/en
Application granted granted Critical
Publication of JP3459495B2 publication Critical patent/JP3459495B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はマイクロプロセッサに関
し、特にそのメモリとの間のデータの入出力の際に必要
なウェイト制御回路を備えたマイクロプロセッサに関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor, and more particularly to a microprocessor equipped with a wait control circuit necessary for inputting / outputting data from / to its memory.

【0002】[0002]

【従来の技術】図6は多相クロック(但しここでは2相
クロック)で動作する従来の一般的なマイクロプロセッ
サの構成例を示すブロック図である。図6において、参
照符号1はプログラムメモリを示しており、このマイク
ロプロセッサを動作させるプログラムを構成する複数の
命令が格納されている。このプログラムメモリ1は、プ
ログラムアドレスバスPAB を介してプログラムカウンタ
2と、プログラムバスPBを介して命令レジスタ3とそれ
ぞれ接続されている。
2. Description of the Related Art FIG. 6 is a block diagram showing a configuration example of a conventional general microprocessor operating with a multi-phase clock (here, two-phase clock). In FIG. 6, reference numeral 1 indicates a program memory, which stores a plurality of instructions constituting a program for operating this microprocessor. The program memory 1 is connected to a program counter 2 via a program address bus PAB and an instruction register 3 via a program bus PB.

【0003】プログラムカウンタ(PC)2は、このマイク
ロプロセッサが次に実行すべき命令のプログラムメモリ
1におけるアドレス (PC値) を指示する。このマイクロ
プロセッサの命令がたとえばワード単位であり、プログ
ラムメモリ1におけるアドレスがワードアドレスである
とすると、通常はこのプログラムカウンタ2はPC値を”
1”ずつインクリメントし、ジャンプ, ブランチ, サブ
ルーチンコール等が発生した場合にはそれぞれ指定され
るアドレスがプログラムカウンタ2に設定される。
The program counter (PC) 2 indicates the address (PC value) in the program memory 1 of the next instruction to be executed by this microprocessor. If the instruction of the microprocessor is, for example, a word unit, and the address in the program memory 1 is a word address, then normally the program counter 2 sets the PC value to "
Increment by 1 ", and when a jump, branch, subroutine call, etc. occur, designated addresses are set in the program counter 2.

【0004】命令レジスタ3はプログラムメモリ1から
出力された命令のコード (命令コード) を一時的に保持
すると共に、命令デコーダ4へ出力する。命令デコーダ
4は、命令レジスタ3から出力されている命令コードを
デコードすることにより、実際に実行されるべき演算を
指定するオペレーションコード,その演算に使用される
データそのもの、あるいはデータのデータメモリ7にお
けるアドレス(データメモリアドレス)を指定するデー
タアドレス等を生成し、ウェイト制御部5へ出力する。
The instruction register 3 temporarily holds the instruction code (instruction code) output from the program memory 1 and outputs it to the instruction decoder 4. The instruction decoder 4 decodes the instruction code output from the instruction register 3 to specify an operation code to be actually executed, the data itself used for the operation, or the data in the data memory 7 of the data. A data address or the like designating an address (data memory address) is generated and output to the wait control unit 5.

【0005】ウェイト制御部5は、主として制御回路51
とウェイト回路52とで構成されている。制御回路51は、
命令デコーダ4から与えられるオペレーションコードの
内容に基づいてその命令を実行するに際して後述するデ
ータメモリ7との間でデータを入出力する必要がある場
合には、その処理が完了するまでマイクロプロセッサを
一時停止状態(ウェイト状態)に制御する。なお、その
詳細については後述する。制御回路51からは、nビット
のアドレスADD がデータアドレスレジスタ6へ、メモリ
リード信号MRがデータメモリ7へそれぞれ出力されると
共に、nビットのアドレスADD の内の最上位側のmビッ
ト及びレジスタライト信号RWがウェイト回路52へ出力さ
れる。ウェイト回路52からは、詳細は後述するが、制御
信号CSがデータレジスタ8へ出力される。
The weight control section 5 mainly comprises a control circuit 51.
And a weight circuit 52. The control circuit 51 is
When it is necessary to input / output data to / from a data memory 7 described later when executing the instruction based on the content of the operation code given from the instruction decoder 4, the microprocessor is temporarily stopped until the processing is completed. Control to stop state (wait state). The details will be described later. The control circuit 51 outputs the n-bit address ADD to the data address register 6 and the memory read signal MR to the data memory 7, and at the same time, outputs the most significant m-bits of the n-bit address ADD and the register write. Signal RW is output to wait circuit 52. The wait circuit 52 outputs a control signal CS to the data register 8, which will be described in detail later.

【0006】ウェイト制御部5からデータアドレスレジ
スタ6へ出力されるデータアドレスADD はデータアドレ
スバスDAB を経由してデータメモリ7に与えられる他、
ウェイト制御部5にも与えられる。
The data address ADD output from the wait controller 5 to the data address register 6 is given to the data memory 7 via the data address bus DAB.
It is also given to the weight controller 5.

【0007】ウェイト制御部5からデータメモリ7へメ
モリリード信号MRが与えられることにより、データアド
レスレジスタ6から出力されているデータアドレスADD
がデータメモリ7のアドレス、即ちデータメモリアドレ
スであれば、それに対応するデータがデータメモリ7か
らリード (読み出し) されてデータバスDBへ出力され
る。
When the wait controller 5 supplies the memory read signal MR to the data memory 7, the data address ADD output from the data address register 6 is output.
Is the address of the data memory 7, that is, the data memory address, the corresponding data is read from the data memory 7 and output to the data bus DB.

【0008】ウェイト制御部5からデータレジスタ8へ
制御信号CSが与えられることにより、データメモリ7か
らデータバスDBへ出力されているデータがデータレジス
タ8にライト (書き込み) される。
When the control signal CS is applied from the wait controller 5 to the data register 8, the data output from the data memory 7 to the data bus DB is written (written) in the data register 8.

【0009】データメモリ7は、このマイクロプロセッ
サが命令を実行する際に必要とする種々のデータを格納
しており、また命令が実行された結果得られるデータを
格納する。ところで、一般的にマイクロプロセッサのア
ドレスをnビットとすると、アドレスの割付けはアドレ
スの最上位側のいくつかのビットにより決定される。従
って、このマイクロプロセッサでは、nビットのアドレ
スの内の最上位側のmビットがオール”1”である場合
にそのアドレスがデータメモリ7に割り付けられている
とする。換言すれば、nビットのアドレスがデータメモ
リアドレスである場合はその最上位側のmビットがオー
ル”1”である。
The data memory 7 stores various data required when the microprocessor executes an instruction, and also stores data obtained as a result of executing the instruction. By the way, generally, when the address of the microprocessor is n bits, the address allocation is determined by some bits on the most significant side of the address. Therefore, in this microprocessor, it is assumed that the address is assigned to the data memory 7 when the most significant m bits of the n-bit address are all "1". In other words, when the n-bit address is the data memory address, the most significant m bits are all "1".

【0010】なお、参照符号9は演算器を示しており、
データレジスタ8との間でデータを入出力しつつ命令コ
ードのオペレーションコードで指定されている演算を実
行する。その際に必要なデータは、データアドレスレジ
スタ6から入力され、また演算結果のデータはデータア
ドレスレジスタ6へ出力されて一旦保持される。
Reference numeral 9 indicates an arithmetic unit,
While inputting / outputting data to / from the data register 8, the operation specified by the operation code of the instruction code is executed. The data required at that time is input from the data address register 6, and the data of the operation result is output to the data address register 6 and temporarily held.

【0011】図7は従来のマイクロプロセッサのウェイ
ト制御部5内に備えられていて、ウェイト制御が行なわ
れる際に機能するウェイト回路52の一構成例及びデータ
レジスタ8の1ビット分の構成例を示す論理回路図であ
る。図7において、参照符号521 は3入力の ANDゲート
を、522 はm入力のNANDゲートを、参照符号81, 82は共
にラッチをそれぞれ示している。なお、ラッチ81, 82に
よりデータレジスタ8の1ビット相当部分が構成され
る。
FIG. 7 shows an example of the configuration of the weight circuit 52 and the one-bit configuration of the data register 8 which are provided in the weight control section 5 of the conventional microprocessor and function when weight control is performed. It is a logic circuit diagram shown. In FIG. 7, reference numeral 521 is a 3-input AND gate, 522 is an m-input NAND gate, and reference numerals 81 and 82 are both latches. It should be noted that the latches 81 and 82 form a portion corresponding to 1 bit of the data register 8.

【0012】ANDゲート521 への3入力は、このマイク
ロプロセッサの基本クロックである2相のノンオーバラ
ップクロックの内の一方であるCK1 と、制御回路51内で
生成されるレジスタライト信号RWと、NANDゲート522 の
出力信号 (ウェイト信号WT)とである。NANDゲート522
へのm入力は、nビットのアドレスADD の内の最上位側
のmビットである。
The three inputs to the AND gate 521 are CK1 which is one of the two-phase non-overlap clocks, which is the basic clock of this microprocessor, and the register write signal RW generated in the control circuit 51. And the output signal (wait signal WT) of the NAND gate 522. NAND gate 522
The m input to is the most significant m bits of the n-bit address ADD.

【0013】ラッチ81のクロック端子には ANDゲート52
1 の出力信号、即ち制御信号CSが、同じくD-入力端子に
はデータメモリ7からデータバスDBへ出力されているデ
ータD(IN) の1ビットがそれぞれ入力されている。ラッ
チ82のクロック端子にはこのマイクロプロセッサの2相
の基本クロックの内の他方であるCK0 が、同じくD-入力
端子にはラッチ81のQ-出力端子からの出力信号がそれぞ
れ入力されている。そして、ラッチ82のQ-出力端子から
の出力信号がデータレジスタ8の出力信号D(OUT)の1ビ
ット分として演算器9へ出力される。
The AND gate 52 is connected to the clock terminal of the latch 81.
The 1 output signal, that is, the control signal CS, is also input to the D-input terminal of 1 bit of the data D (IN) output from the data memory 7 to the data bus DB. CK0, which is the other of the two-phase basic clocks of the microprocessor, is input to the clock terminal of the latch 82, and the output signal from the Q-output terminal of the latch 81 is input to the D-input terminal. Then, the output signal from the Q-output terminal of the latch 82 is output to the arithmetic unit 9 as one bit of the output signal D (OUT) of the data register 8.

【0014】この図7に示されているような従来のマイ
クロプロセッサのウェイト回路52の一構成例の動作、特
にウェイト制御部5によるウェイト制御時の動作につい
て、図8に示されているタイミングチャートを参照して
説明する。なお、このマイクロプロセッサの2相の基本
クロックCK0, CK1は双方のハイレベル区間がオーバラッ
プしないノンオーバラップクロックである。また、図8
のタイミングチャートでは、クロックCK0 の一発目のハ
イレベルのパルスから順に参照符号としてP01,P02, P03
…を、クロックCK1 の一発目のハイレベルのパルスか
ら順に参照符号としてP11, P12, P13 …をそれぞれ付し
てある。
FIG. 8 is a timing chart showing the operation of one configuration example of the wait circuit 52 of the conventional microprocessor as shown in FIG. 7, particularly the operation at the time of wait control by the wait controller 5. Will be described with reference to. The two-phase basic clocks CK0 and CK1 of this microprocessor are non-overlap clocks in which the high level sections of both do not overlap. Also, FIG.
In the timing chart of, the reference symbols P01, P02, P03 are assigned in order from the first high-level pulse of the clock CK0.
, Are added as reference symbols in order from the first high-level pulse of the clock CK1, P11, P12, P13, ...

【0015】ウェイト信号WT, メモリリード信号MRはこ
の例ではいずれもローアクティブであり、レジスタライ
ト信号RWはこの例ではハイアクティブである。メモリリ
ード信号MRはクロックCK1 と逆位相であり、ウェイト制
御期間のクロックCK1 の1サイクルに同期して有意(ロ
ーレベル)になる。また、レジスタライト信号RWはクロ
ックCK1 と同位相であり、ウェイト制御期間のクロック
CK1 の1サイクルに同期して有意(ハイレベル)にな
る。なお、この例では、メモリリード信号MRとレジスタ
ライト信号RWとはクロックCK1 の同一サイクルに発生す
る。
The wait signal WT and the memory read signal MR are both low active in this example, and the register write signal RW is high active in this example. The memory read signal MR has a phase opposite to that of the clock CK1 and becomes significant (low level) in synchronization with one cycle of the clock CK1 in the wait control period. In addition, the register write signal RW has the same phase as the clock CK1, and the clock for the wait control period
It becomes significant (high level) in synchronization with one cycle of CK1. In this example, the memory read signal MR and the register write signal RW are generated in the same cycle of the clock CK1.

【0016】更に、ウェイト信号WTはNANDゲート522 の
出力信号であるが、ウェイト制御部5がウェイト制御を
行なう場合には、ウェイト制御開始時のクロックCK0 の
サイクルからウェイト制御が終了するサイクルの一つ前
のサイクルまで、NANDゲート522 にアドレスADD の最上
位側mビットが与えられる。但し、命令のデコード結果
に基づいてウェイト制御部5がウェイト制御期間を決定
する間の若干の時間だけクロックCK0 の立ち上がりから
遅延する。この例では、ウェイト制御期間はクロックCK
0 の2サイクルであるので、最初のCK0 の1サイクルの
みにNANDゲート522 にデータアドレスADD の最上位側m
ビットが与えられる。従って、ウェイト信号WTは、ウェ
イト制御が開始された場合に、クロックCK0 の立ち上が
りから若干遅延して有意(ローレベル)になり、次のク
ロックCK0 の立ち上がりに同期して無意(ハイレベル)
になる。
Further, the wait signal WT is an output signal of the NAND gate 522, but when the wait controller 5 performs the wait control, it is one of the cycles from the cycle of the clock CK0 at the start of the wait control to the end of the wait control. Until the immediately preceding cycle, NAND gate 522 is provided with the most significant m bits of address ADD. However, the wait control unit 5 delays from the rising edge of the clock CK0 for a slight time while the wait control unit 5 determines the wait control period based on the instruction decoding result. In this example, the wait control period is clock CK
Since it is 2 cycles of 0, the most significant side m of the data address ADD is stored in the NAND gate 522 only in one cycle of the first CK0.
Bits are given. Therefore, when the wait control is started, the wait signal WT becomes significant (low level) with a slight delay from the rising edge of the clock CK0 and becomes insignificant (high level) in synchronization with the next rising edge of the clock CK0.
become.

【0017】まず、クロックCK0 の一発目のパルスP01
の立ち上がりに同期してプログラムアドレス(N) がPC値
としてプログラムカウンタ2にセットされ、プログラム
アドレスバスPAB を経由してプログラムメモリ1に与え
られる。これにより、プログラムメモリ1からはプログ
ラムバスPBへアドレス(N) に対応する命令(N) の命令コ
ードが出力される。このプログラムバスPBへ出力されて
いる命令(N) の命令コードはクロックCK0 の二発目のパ
ルスP02 の立ち上がりに同期して命令レジスタ3に取り
込まれて保持され、更に命令デコーダ4に取り込まれて
デコードされる。なお、以下の説明では、この命令デコ
ーダ4が命令(N) をデコードした結果、データメモリ7
からデータメモリアドレス(N) のデータをリードする必
要が生じたとする。
First, the first pulse P01 of the clock CK0
The program address (N) is set as the PC value in the program counter 2 in synchronization with the rising edge of the, and is given to the program memory 1 via the program address bus PAB. As a result, the instruction code of the instruction (N) corresponding to the address (N) is output from the program memory 1 to the program bus PB. The instruction code of the instruction (N) output to the program bus PB is fetched and held in the instruction register 3 in synchronization with the rising edge of the second pulse P02 of the clock CK0, and further fetched by the instruction decoder 4. Is decoded. In the following description, as a result of the instruction (N) being decoded by the instruction decoder 4, the data memory 7
Suppose that it is necessary to read the data of the data memory address (N) from.

【0018】命令デコーダ4で命令(N) の命令コードを
デコードした結果、データアドレスADD としてデータメ
モリアドレス(N) がクロックCK0 の三発目のパルスP03
の立ち上がりに同期して命令デコーダ4から出力され、
ウェイト制御部5に与えられると共に更にデータアドレ
スレジスタ6に与えられて保持される。このデータアド
レスレジスタ6に保持されたデータメモリアドレス(N)
はデータアドレスバスDAB を経由してデータメモリ7に
与えられると共に、再度ウェイト制御部5にも与えられ
る。
As a result of decoding the instruction code of the instruction (N) by the instruction decoder 4, the data memory address (N) is the third pulse P03 of the clock CK0 as the data address ADD.
Is output from the instruction decoder 4 in synchronization with the rising edge of
It is given to the weight controller 5 and further given to the data address register 6 and held therein. Data memory address (N) held in this data address register 6
Is given to the data memory 7 via the data address bus DAB and is also given to the wait controller 5 again.

【0019】このようなデータメモリ7からデータをリ
ードする命令が実行される場合、データメモリ7に対す
るデータの入出力 (リード/ライト) にはクロックCK0
の2サイクル、あるいはそれ以上のサイクル数の時間が
必要であるので、ウェイト制御部5がそのための制御、
即ちウェイト制御を行なう。換言すれば、クロックCK0
の3発目のパルスP03 の立ち上がり時点から命令デコー
ダ4がデータメモリアドレス(N) を出力しても、データ
メモリ7がデータメモリアドレス(N) に対応するデータ
を実際にデータバスDBへ出力可能になるまでには若干の
遅延時間を要する。従って、ウェイト制御部5がこれか
ら実行すべき命令に応じて、即ち命令デコーダ4による
デコード結果に応じてウェイト制御のサイクル数を決定
し、適宜のタイミングにおいてメモリリード信号MRを与
えてデータをデータメモリ7からデータバスDBへ出力さ
せるように制御する。なお、以下の説明ではウェイト制
御に要するサイクル数は2サイクルであるとする。
When an instruction for reading data from the data memory 7 is executed, the clock CK0 is used for inputting / outputting (reading / writing) data to / from the data memory 7.
2 cycles or more times are required, and the wait control unit 5 performs control for that.
That is, weight control is performed. In other words, clock CK0
Even if the instruction decoder 4 outputs the data memory address (N) from the rising edge of the third pulse P03, the data memory 7 can actually output the data corresponding to the data memory address (N) to the data bus DB. It takes some delay time to reach. Therefore, the wait control unit 5 determines the number of wait control cycles according to the instruction to be executed, that is, according to the decoding result by the instruction decoder 4, and gives the memory read signal MR at an appropriate timing to store the data in the data memory. It is controlled to output from 7 to the data bus DB. In the following description, the number of cycles required for weight control is two.

【0020】ウェイト制御部5の制御回路51は、アドレ
スADD としてデータメモリアドレス(N) をクロックCK0
の3発目のパルスP03 の立ち上がりから4発目のパルス
P04の立ち上がりまでの2サイクルの期間にわたって出
力する。このデータメモリアドレス(N) はデータアドレ
スレジスタ6に保持され、データアドレスバスDAB を経
由してデータメモリ7に与えられる。更に、制御回路51
は、その後のクロックCK1 の4発目のパルスP14 の期間
に同期してメモリリード信号MRを有意 (ローレベル)
に、レジスタライト信号RWを有意 (ハイレベル) にす
る。
The control circuit 51 of the wait controller 5 uses the data memory address (N) as the address ADD in the clock CK0.
4th pulse from the rising edge of P03
Output for 2 cycles until P04 rises. This data memory address (N) is held in the data address register 6 and given to the data memory 7 via the data address bus DAB. Further, the control circuit 51
Is a significant (low level) level for the memory read signal MR in synchronization with the period of the fourth pulse P14 of the clock CK1.
Then, the register write signal RW is made significant (high level).

【0021】ウェイト制御部5の制御回路51が以上のよ
うな制御を行なうことにより、図7に示されているウェ
イト回路52は以下のように動作する。ウェイト回路52の
NANDゲート522 にはnビットのデータアドレスADD 、こ
の場合はデータメモリアドレスの最上位側のmビットが
入力されているが、前述の如く、これらはオール”1”
であるので、NANDゲート522 の出力信号は”0”にな
る。換言すれば、ウェイト信号WTはローレベル(有意)
になる。
When the control circuit 51 of the weight controller 5 performs the above control, the wait circuit 52 shown in FIG. 7 operates as follows. Weight circuit 52
The n-bit data address ADD, in this case the uppermost m bits of the data memory address, is input to the NAND gate 522, but as described above, these are all "1".
Therefore, the output signal of the NAND gate 522 becomes "0". In other words, the weight signal WT is low level (significant)
become.

【0022】このウェイト信号WTは ANDゲート521 に与
えられている。 ANDゲート521 の他の2入力は、クロッ
クCK1 及びレジスタライト信号RWであるが、有意な(ロ
ーレベルの)ウェイト信号WTがNANDゲート522 から出力
されることにより、他の2入力には拘わらずに ANDゲー
ト521 の出力信号である制御信号CSはローレベルとな
る。この後、クロックCK1 の3発目のパルスP13 が立ち
上がるが、ウェイト信号WTがハイレベルになる直前の時
点でローレベルに立ち下がる。その直後のクロックCK0
の4発目のパルスP04 の立ち上がりに同期してウェイト
信号WTは無意(ハイレベル)に転じる。
The wait signal WT is given to the AND gate 521. The other two inputs of the AND gate 521 are the clock CK1 and the register write signal RW, but the significant (low level) wait signal WT is output from the NAND gate 522, regardless of the other two inputs. In addition, the control signal CS, which is the output signal of the AND gate 521, becomes low level. After that, the third pulse P13 of the clock CK1 rises, but falls to the low level immediately before the wait signal WT goes to the high level. Immediately after that, clock CK0
The wait signal WT changes to insignificant (high level) in synchronization with the rising edge of the fourth pulse P04 of.

【0023】この後、クロックCK1 の4発目のパルスP1
4 の立ち上がりから立下がりまでに同期して、メモリリ
ード信号MRが有意(ローレベル)に、レジスタライト信
号RWが有意(ハイレベル)にそれぞれなるため、データ
アドレスレジスタ6に保持されているデータメモリアド
レス(N) に対応してデータメモリ7からデータ(data)が
データバスDBへ出力される。また同時に、この時点では
前述の如くウェイト信号WTは既に無意(ハイレベル)に
なっており、またレジスタライト信号RWも有意(ハイレ
ベル)になる。従って、この時点において、 ANDゲート
521 の出力信号である制御信号CSはハイレベルに転じ、
これがラッチ81のクロック端子に与えられるので、ラッ
チ81のD-入力端子にはデータバスDBからデータ(data)の
1ビットが取り込まれてラッチされると共に、ラッチ81
のQ-出力端子から出力される。
After this, the fourth pulse P1 of the clock CK1
Since the memory read signal MR becomes significant (low level) and the register write signal RW becomes significant (high level) in synchronization from the rising edge to the falling edge of 4, the data memory held in the data address register 6 Data (data) is output from the data memory 7 to the data bus DB corresponding to the address (N). At the same time, as described above, the wait signal WT is already insignificant (high level) and the register write signal RW is also significant (high level) at this point. Therefore, at this point, the AND gate
The control signal CS, which is the output signal of the 521, turns to high level,
Since this is given to the clock terminal of the latch 81, one bit of data (data) is fetched and latched from the data bus DB to the D-input terminal of the latch 81 and the latch 81
It is output from the Q-output terminal of.

【0024】そして、クロックCK0 の5発目のパルスP0
5 の立ち上がり時点において、このパルスP05 がクロッ
ク端子に与えられているラッチ82がそのD-入力端子にラ
ッチ81のQ-出力端子からの出力信号であるデータ(data)
の1ビットを取り込んでラッチする。このラッチ82にラ
ッチされた信号はラッチ82のQ-出力端子からデータレジ
スタ8の出力信号D(OUT)の1ビット分として出力され
る。
Then, the fifth pulse P0 of the clock CK0
This pulse P05 is applied to the clock terminal at the rising edge of 5, and the latch 82 outputs the data (data) which is the output signal from the Q-output terminal of the latch 81 to its D-input terminal.
Take in 1 bit of and latch. The signal latched by the latch 82 is output from the Q-output terminal of the latch 82 as one bit of the output signal D (OUT) of the data register 8.

【0025】[0025]

【発明が解決しようとする課題】以上のように、従来の
マイクロプロセッサのウェイト回路は、ウェイト制御部
により制御が行なわれているクロックCK0 の2サイクル
の期間の内のクロックCK1 の最初のハイレベルへの立ち
上がりまでにウェイト信号WTを有意にしておく必要あっ
た。このため、ウェイト制御部において時間的な余裕が
なく、より複雑な制御を行なうことが不可能であり、更
にクロック周波数に対するマージンが小さく、より正確
な動作を保証することができなかった。
As described above, the conventional wait circuit of the microprocessor has the first high level of the clock CK1 within the period of two cycles of the clock CK0 controlled by the wait controller. It was necessary to keep the weight signal WT significant by the time of rising. Therefore, the wait control unit has no time margin, and it is impossible to perform more complicated control. Further, the margin with respect to the clock frequency is small, and more accurate operation cannot be guaranteed.

【0026】本発明はこのような事情に鑑みてなされた
ものであり、ウェイト制御部において時間的な余裕が生
じるように、また従来と同一の処理でよいのであればよ
り単純な回路構成を採用することを可能とし、一方、回
路規模を小型化せずにより複雑な制御を行なうことを可
能とし、更にクロック周波数に対するマージンを大きく
したマイクロプロセッサの提供を目的とする。
The present invention has been made in view of the above circumstances, and employs a simpler circuit configuration so that there is a time margin in the weight control unit and if the same processing as the conventional one is sufficient. On the other hand, an object of the present invention is to provide a microprocessor capable of performing complicated control without downsizing the circuit scale and further increasing the margin with respect to the clock frequency.

【0027】[0027]

【課題を解決するための手段】本発明に係るマイクロプ
ロセッサは、n相(nは2以上の自然数)のノンオーバ
ラップクロックで動作し、メモリから読み出されたデー
タを一時保持するレジスタと、メモリのアクセスに際し
て、2クロックサイクル以上のウェイト期間を設定し、
メモリから出力されたデータをウェイト期間の最後のサ
イクルにおいてレジスタに取り込むべく制御するウェイ
ト制御部とを備え、更にレジスタは、メモリから出力さ
れたデータをラッチする前段のラッチ手段と、前段のラ
ッチ手段がラッチしたデータをラッチする後段のラッチ
手段とを備え、ウェイト制御部は、前段のラッチ手段の
ラッチ動作をn相クロックの第n相に同期して行なわせ
る第1のタイミング手段と、後段のラッチ手段のラッチ
動作をn相クロックの第1相に同期して行なわせる第2
のタイミング手段と、第2のタイミング手段の動作を、
ウェイト期間の最後のサイクル以外の各サイクルにおい
て禁じる禁止手段とを備えたことを特徴とする。
A microprocessor according to the present invention operates with an n-phase (n is a natural number of 2 or more) non-overlap clock and temporarily holds data read from a memory. When accessing the memory, set a wait period of 2 clock cycles or more,
A wait control unit for controlling the data output from the memory to be stored in the register in the last cycle of the wait period, and the register further includes a latch unit at a previous stage for latching the data output from the memory, and a latch unit at the previous stage. And a latch unit at a subsequent stage for latching the data latched by the wait controller. A second means for performing the latch operation of the latch means in synchronization with the first phase of the n-phase clock
And the operation of the second timing means,
It is characterized in that it has a prohibition means for prohibiting in each cycle other than the last cycle of the wait period.

【0028】[0028]

【作用】本発明に係るマイクロプロセッサでは、ウェイ
ト制御部において、第1のタイミング手段により前段の
ラッチ手段のラッチ動作がn相クロックの第n相に同期
して行なわれ、第2のタイミング手段により後段のラッ
チ手段のラッチ動作がn相クロックの第1相に同期して
行なわれ、更に禁止手段により第2のタイミング手段の
動作がウェイト期間の最後のサイクル以外の各サイクル
において禁じられる。
In the microprocessor according to the present invention, in the wait control section, the first timing means causes the latch operation of the preceding latch means to be performed in synchronization with the n-th phase of the n-phase clock, and the second timing means. The latching operation of the latter latching means is performed in synchronization with the first phase of the n-phase clock, and the inhibiting means further inhibits the operation of the second timing means in each cycle other than the last cycle of the wait period.

【0029】[0029]

【実施例】以下、本発明をその実施例を示す図面に基づ
いて詳述する。図2は多相クロックで動作する本発明に
係るマイクロプロセッサの全体の構成例を示すブロック
図であり、この実施例では2相クロックで動作する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the drawings showing the embodiments thereof. FIG. 2 is a block diagram showing an example of the overall configuration of a microprocessor according to the present invention which operates with a multi-phase clock. In this embodiment, it operates with a two-phase clock.

【0030】図2において、参照符号1はプログラムメ
モリを示しており、このマイクロプロセッサを動作させ
るプログラムを構成する複数の命令が格納されている。
なお、このプログラムメモリ1は、プログラムアドレス
バスPAB を介してプログラムカウンタ2と、プログラム
バスPBを介して命令レジスタ3とそれぞれ接続されてい
る。
In FIG. 2, reference numeral 1 designates a program memory, which stores a plurality of instructions constituting a program for operating this microprocessor.
The program memory 1 is connected to a program counter 2 via a program address bus PAB and to an instruction register 3 via a program bus PB.

【0031】プログラムカウンタ(PC)2は、このマイク
ロプロセッサが次に実行すべき命令のプログラムメモリ
1におけるアドレス (PC値) を指示する。このマイクロ
プロセッサの命令がたとえばワード単位であり、プログ
ラムメモリ1におけるアドレスがワードアドレスである
とすると、通常はこのプログラムカウンタ2はPC値を”
1”ずつインクリメントし、ジャンプ, ブランチ, サブ
ルーチンコール等が発生した場合にはそれぞれ指定され
るアドレスがプログラムカウンタ2に設定される。
The program counter (PC) 2 indicates the address (PC value) in the program memory 1 of the instruction to be executed next by this microprocessor. If the instruction of the microprocessor is, for example, a word unit, and the address in the program memory 1 is a word address, then normally the program counter 2 sets the PC value to "
Increment by 1 ", and when a jump, branch, subroutine call, etc. occur, designated addresses are set in the program counter 2.

【0032】命令レジスタ3はプログラムメモリ1から
出力された命令のコード (命令コード) を一時的に保持
すると共に、命令デコーダ4へ出力する。命令デコーダ
4は、命令レジスタ3から出力されている命令コードを
デコードすることにより、実際に実行されるべき演算を
指定するオペレーションコード,その演算に使用される
データそのもの、あるいはデータのデータメモリ7にお
けるアドレス(データメモリアドレス)を指定するデー
タアドレス等を生成し、ウェイト制御部50へ出力する。
The instruction register 3 temporarily holds the instruction code (instruction code) output from the program memory 1 and outputs it to the instruction decoder 4. The instruction decoder 4 decodes the instruction code output from the instruction register 3 to specify an operation code to be actually executed, the data itself used for the operation, or the data in the data memory 7 of the data. A data address or the like designating an address (data memory address) is generated and output to the wait control unit 50.

【0033】ウェイト制御部50は、主として制御回路50
1 とウェイト回路502 とで構成されている。制御回路50
1 は、命令デコーダ4から与えられるオペレーションコ
ードの内容に基づいてその命令を実行するに際して後述
するデータメモリ7との間でデータを入出力する必要が
ある場合には、その処理が完了するまでマイクロプロセ
ッサを一時停止状態(ウェイト状態)に制御する。な
お、その詳細については後述する。制御回路501 から
は、nビットのデータアドレスADD がデータアドレスレ
ジスタ6へ、メモリリード信号MRがデータメモリ7へそ
れぞれ出力されると共に、nビットのデータアドレスAD
D の内の最上位側のmビット及びレジスタライト信号RW
がウェイト回路502 へ出力される。ウェイト回路502 か
らは、詳細は後述するが、制御信号CS1, CS2がデータレ
ジスタ8へ出力される。
The weight controller 50 is mainly composed of the control circuit 50.
It is composed of 1 and a weight circuit 502. Control circuit 50
1 is used for executing the instruction based on the content of the operation code given from the instruction decoder 4, when data needs to be input / output to / from a data memory 7 which will be described later, until the processing is completed. Controls the processor to the suspend state (wait state). The details will be described later. The control circuit 501 outputs the n-bit data address ADD to the data address register 6 and the memory read signal MR to the data memory 7, and also outputs the n-bit data address AD.
The most significant bit of D and register write signal RW
Is output to the wait circuit 502. The wait circuit 502 outputs control signals CS1 and CS2 to the data register 8, which will be described in detail later.

【0034】ウェイト制御部50からデータアドレスレジ
スタ6へ出力されるデータアドレスADD はデータアドレ
スバスDAB を経由してデータメモリ7に与えられる他、
ウェイト制御部50にも与えられる。
The data address ADD output from the wait controller 50 to the data address register 6 is given to the data memory 7 via the data address bus DAB.
It is also given to the weight controller 50.

【0035】ウェイト制御部50からデータメモリ7へメ
モリリード信号MRが与えられることにより、データアド
レスレジスタ6から出力されているデータアドレスADD
がデータメモリ7のアドレス、即ちデータメモリアドレ
スであれば、それに対応するデータがデータメモリ7か
らリード (読み出し) されてデータバスDBへ出力され
る。
When the memory control signal MR is given from the wait controller 50 to the data memory 7, the data address ADD output from the data address register 6 is output.
Is the address of the data memory 7, that is, the data memory address, the corresponding data is read from the data memory 7 and output to the data bus DB.

【0036】ウェイト制御部50からデータレジスタ8へ
制御信号CS1, CS2が与えられることにより、データメモ
リ7からデータバスDBへ出力されているデータがデータ
レジスタ8にライト (書き込み) される。
When the control signals CS1 and CS2 are applied from the wait controller 50 to the data register 8, the data output from the data memory 7 to the data bus DB is written (written) in the data register 8.

【0037】データメモリ7は、このマイクロプロセッ
サが命令を実行する際に必要とする種々のデータを格納
しており、また命令が実行された結果得られるデータを
格納する。ところで、一般的にマイクロプロセッサのア
ドレスをnビットとすると、アドレスの割付けはアドレ
スの最上位側のいくつかのビットにより決定される。従
って、このマイクロプロセッサでは、nビットのアドレ
スの内の最上位側のmビットがオール”1”である場合
にそのアドレスがデータメモリ7に割り付けられている
とする。換言すれば、nビットのアドレスがデータメモ
リアドレスである場合はその最上位側のmビットがオー
ル”1”である。
The data memory 7 stores various data required when the microprocessor executes an instruction, and also stores data obtained as a result of executing the instruction. By the way, generally, when the address of the microprocessor is n bits, the address allocation is determined by some bits on the most significant side of the address. Therefore, in this microprocessor, it is assumed that the address is assigned to the data memory 7 when the most significant m bits of the n-bit address are all "1". In other words, when the n-bit address is the data memory address, the most significant m bits are all "1".

【0038】なお、参照符号9は演算器を示しており、
データレジスタ8との間でデータを入出力しつつ命令コ
ードのオペレーションコードで指定されている演算を実
行する。その際に必要なデータは、データアドレスレジ
スタ6から入力され、また演算結果のデータはデータア
ドレスレジスタ6へ出力されて一旦保持される。
Reference numeral 9 indicates an arithmetic unit,
While inputting / outputting data to / from the data register 8, the operation specified by the operation code of the instruction code is executed. The data required at that time is input from the data address register 6, and the data of the operation result is output to the data address register 6 and temporarily held.

【0039】図1は本発明のマイクロプロセッサのウェ
イト制御部50内に備えられていて、ウェイト制御が行な
われる際に機能するウェイト回路502 の一構成例及びデ
ータレジスタ8の1ビット分の構成例を示す論理回路図
である。
FIG. 1 shows an example of the configuration of a wait circuit 502 which is provided in the weight control unit 50 of the microprocessor of the present invention and which functions when weight control is performed, and an example of the configuration of one bit of the data register 8. It is a logic circuit diagram showing.

【0040】図1において、参照符号5021は第1のタイ
ミング手段として機能する2入力のANDゲートを、5022
は禁止手段として機能するm入力のNANDゲートを、5023
は第2のタイミング手段として機能する2入力の ANDゲ
ートを、参照符号81, 82は共にラッチをそれぞれ示して
いる。なお、前段のラッチ手段として機能するラッチ8
1, 後段のラッチ手段として機能する82によりデータレ
ジスタ8の1ビット相当部分が構成される。
In FIG. 1, reference numeral 5021 designates a 2-input AND gate which functions as a first timing means 5022.
5023 is an m-input NAND gate that functions as a prohibition means.
Indicates a 2-input AND gate functioning as a second timing means, and reference numerals 81 and 82 both indicate a latch. It should be noted that the latch 8 functioning as the latch means in the previous stage
1, 82 corresponding to one bit of the data register 8 is constituted by 82 which functions as a latch unit in the subsequent stage.

【0041】ANDゲート5021への2入力は、このマイク
ロプロセッサの基本クロックである2相のノンオーバラ
ップクロックの内の一方であるCK1 と、制御回路501 内
で生成されるレジスタライト信号RWとである。なお、 A
NDゲート5021の出力信号は制御信号CS1 としてデータレ
ジスタ8へ出力されている。NANDゲート5022へのm入力
はnビットのデータアドレスADD の内の最上位側のmビ
ットであり、その出力信号は後述するようにウェイト信
号WTとなっている。 ANDゲート5023への2入力は、上述
のNANDゲート5022の出力信号であるウェイト信号WTと、
マイクロプロセッサの2相の基本クロックの内の他方で
あるCK0 とである。なお、 ANDゲート5023の出力信号は
制御信号CS2 としてデータレジスタ8へ出力されてい
る。
Two inputs to the AND gate 5021 are the CK1 which is one of the two-phase non-overlap clocks which is the basic clock of this microprocessor and the register write signal RW which is generated in the control circuit 501. is there. Note that A
The output signal of the ND gate 5021 is output to the data register 8 as the control signal CS1. The m input to the NAND gate 5022 is the most significant m bits of the n-bit data address ADD, and its output signal is the wait signal WT as described later. The two inputs to the AND gate 5023 are the weight signal WT which is the output signal of the NAND gate 5022 described above,
CK0, which is the other of the two-phase basic clocks of the microprocessor. The output signal of the AND gate 5023 is output to the data register 8 as the control signal CS2.

【0042】ラッチ81のクロック端子には ANDゲート50
21の出力信号である制御信号CS1 が、同じくD-入力端子
にはデータバスDBからデータD(IN) の1ビットがそれぞ
れ入力されている。ラッチ82のクロック端子には ANDゲ
ート5023の出力信号である制御信号CS2 が、同じくD-入
力端子にはラッチ81のQ-出力端子からの出力信号がそれ
ぞれ入力されている。そして、ラッチ82のQ-出力端子か
らの出力信号がデータレジスタ8の出力信号D(OUT)とし
て演算器9へ出力される。
The AND gate 50 is connected to the clock terminal of the latch 81.
The control signal CS1, which is the output signal of 21, is also input to the D-input terminal of 1 bit of the data D (IN) from the data bus DB. The control signal CS2, which is the output signal of the AND gate 5023, is input to the clock terminal of the latch 82, and the output signal from the Q-output terminal of the latch 81 is input to the D-input terminal. Then, the output signal from the Q-output terminal of the latch 82 is output to the arithmetic unit 9 as the output signal D (OUT) of the data register 8.

【0043】この図1に示されているような本発明のマ
イクロプロセッサのウェイト回路502 の構成例の動作、
特にウェイト制御部50によるウェイト制御時の動作につ
いて、図3に示されているタイミングチャートを参照し
て説明する。なお、このマイクロプロセッサの2相の基
本クロックCK0, CK1は双方のハイレベル区間がオーバラ
ップしないノンオーバラップクロックである。また、図
3のタイミングチャートでは、クロックCK0 の一発目の
ハイレベルのパルスから順に参照符号としてP01, P02,
P03 …を、クロックCK1 の一発目のハイレベルのパルス
から順に参照符号としてP11, P12, P13 …をそれぞれ付
してある。
The operation of the configuration example of the wait circuit 502 of the microprocessor of the present invention as shown in FIG.
In particular, the operation during weight control by the weight controller 50 will be described with reference to the timing chart shown in FIG. The two-phase basic clocks CK0 and CK1 of this microprocessor are non-overlap clocks in which the high level sections of both do not overlap. Further, in the timing chart of FIG. 3, the reference symbols P01, P02,
.. are denoted by P11, P12, P13, ... As reference symbols in order from the first high-level pulse of the clock CK1.

【0044】ウェイト信号WT, メモリリード信号MRはこ
の例ではいずれもローアクティブであり、レジスタライ
ト信号RWはこの例ではハイアクティブである。メモリリ
ード信号MRはクロックCK1 と逆位相であり、ウェイト制
御期間のクロックCK1 の各サイクルに同期して有意(ロ
ーレベル)になる。また、レジスタライト信号RWはクロ
ックCK1 と同位相であり、ウェイト制御期間のクロック
CK1 の各サイクルに同期して有意(ハイレベル)にな
る。なお、この例では、メモリリード信号MRとレジスタ
ライト信号RWとはクロックCK1 の同一サイクルに発生す
る。
The wait signal WT and the memory read signal MR are both low active in this example, and the register write signal RW is high active in this example. The memory read signal MR has a phase opposite to that of the clock CK1 and becomes significant (low level) in synchronization with each cycle of the clock CK1 in the wait control period. In addition, the register write signal RW has the same phase as the clock CK1, and the clock for the wait control period
It becomes significant (high level) in synchronization with each cycle of CK1. In this example, the memory read signal MR and the register write signal RW are generated in the same cycle of the clock CK1.

【0045】更に、ウェイト信号WTはNANDゲート5022の
出力信号であるが、ウェイト制御部50がウェイト制御を
行なう場合には、ウェイト制御開始時のクロックCK0 の
次のサイクルからウェイト制御が終了するサイクルま
で、それぞれのサイクルのクロックCK0 の立ち上がりよ
り以前の時点から最後のサイクルのクロックCK0 が立ち
下がるまでの期間において、NANDゲート5022にアドレス
ADD の最上位側mビットが与えられる。この例では、ウ
ェイト制御期間はクロックCK0 の2サイクルであるの
で、最後のCK0 の1サイクルの立ち上がりより以前の時
点から最後のサイクルのクロックCK0 が立ち下がるまで
の期間においてNANDゲート5022にアドレスADD の最上位
側mビットが与えられる。従って、ウェイト信号WTは、
ウェイト制御が開始された場合に、クロックCK0 の2回
目以降の立ち上がりより以前の時点から最後のサイクル
のクロックCK0 が立ち下がるまでの期間において有意
(ローレベル)になる。
Further, the wait signal WT is an output signal of the NAND gate 5022, but when the wait controller 50 performs the wait control, the cycle in which the wait control ends from the cycle next to the clock CK0 at the start of the wait control. Until the clock CK0 of the last cycle falls until the clock CK0 of the last cycle falls until the clock CK0 of each cycle rises.
The most significant m bits of ADD are provided. In this example, since the wait control period is two cycles of the clock CK0, the NAND gate 5022 is provided with the address ADD in the period from the time before the rising of one cycle of the last CK0 to the falling of the clock CK0 of the last cycle. The most significant m bits are provided. Therefore, the weight signal WT is
When the wait control is started, it becomes significant (low level) in the period from the time before the second and subsequent rises of the clock CK0 to the fall of the clock CK0 in the last cycle.

【0046】まず、クロックCK0 の一発目のパルスP01
の立ち上がりに同期してプログラムアドレス(N) がプロ
グラムカウンタ2にセットされ、プログラムアドレスバ
スPAB を経由してプログラムメモリ1に与えられる。こ
れにより、プログラムメモリ1からはプログラムバスPB
へアドレス(N) に対応する命令(N) が出力される。この
プログラムバスPBへ出力されている命令(N) はクロック
CK0 の二発目のパルスP02 の立ち上がりに同期して命令
レジスタ3に取り込まれ、更に命令デコーダ4に取り込
まれてデコードされる。なお、以下の説明では、この命
令デコーダ4が命令(N) をデコードした結果、データメ
モリ7からデータメモリアドレス(N) のデータをリード
する必要が生じたとする。
First, the first pulse P01 of the clock CK0
The program address (N) is set in the program counter 2 in synchronism with the rising edge of and is given to the program memory 1 via the program address bus PAB. As a result, the program bus PB from the program memory 1
The instruction (N) corresponding to the address (N) is output to. The instruction (N) output to this program bus PB is the clock
It is taken into the instruction register 3 in synchronization with the rising edge of the second pulse P02 of CK0, and further taken into the instruction decoder 4 and decoded. In the following description, it is assumed that, as a result of the instruction decoder 4 decoding the instruction (N), it is necessary to read the data of the data memory address (N) from the data memory 7.

【0047】命令デコーダ4で命令(N) の命令コードを
デコードした結果、データアドレスADD としてデータメ
モリアドレス(N) がクロックCK0 の三発目のパルスP03
の立ち上がりに同期して命令デコーダ4から出力され、
ウェイト制御部50に与えられると共に更にデータアドレ
スレジスタ6に与えられて保持される。このデータアド
レスレジスタ6に保持されたデータメモリアドレス(N)
はデータアドレスバスDAB を経由してデータメモリ7に
与えられると共に、ウェイト制御部50にも与えられる。
As a result of decoding the instruction code of the instruction (N) by the instruction decoder 4, the data memory address (N) is the third pulse P03 of the clock CK0 as the data address ADD.
Is output from the instruction decoder 4 in synchronization with the rising edge of
It is given to the weight control unit 50 and further given to the data address register 6 and held therein. Data memory address (N) held in this data address register 6
Is given to the data memory 7 via the data address bus DAB and is also given to the wait controller 50.

【0048】このようなデータメモリ7からデータをリ
ードする命令が実行される場合、データメモリ7に対す
るデータの入出力 (リード/ライト) にはクロックCK0
の2サイクル、あるいはそれ以上のサイクル数の時間が
必要であるので、ウェイト制御部50がそのための制御、
即ちウェイト制御を行なう。換言すれば、クロックCK0
の3発目のパルスP03 の立ち上がり時点から命令デコー
ダ4がデータメモリアドレス(N) を出力しても、データ
メモリ7がデータメモリアドレス(N) に対応するデータ
を実際にデータバスDBへ出力可能になるまでには若干の
遅延時間を要する。従って、ウェイト制御部50がこれか
ら実行すべき命令に応じて、即ち命令デコーダ4による
デコード結果に応じてウェイト制御のサイクル数を決定
し、適宜のタイミングにおいてメモリリード信号MRを与
えてデータをデータメモリ7からデータバスDBへ出力さ
せるように制御する。なお、以下の説明ではウェイト制
御に要するサイクル数は2サイクルであるとする。
When an instruction to read data from the data memory 7 is executed, the clock CK0 is used for inputting / outputting (reading / writing) data to / from the data memory 7.
2 cycles or more cycles are required, so the wait controller 50 controls for that.
That is, weight control is performed. In other words, clock CK0
Even if the instruction decoder 4 outputs the data memory address (N) from the rising edge of the third pulse P03, the data memory 7 can actually output the data corresponding to the data memory address (N) to the data bus DB. It takes some delay time to reach. Therefore, the wait control unit 50 determines the number of cycles of wait control according to the instruction to be executed, that is, according to the decoding result by the instruction decoder 4, and gives the memory read signal MR at an appropriate timing to store data in the data memory. It is controlled to output from 7 to the data bus DB. In the following description, the number of cycles required for weight control is two.

【0049】ウェイト制御部50の制御回路501 は、デー
タアドレスADD としてデータメモリアドレス(N) をクロ
ックCK0 の3発目のパルスP03 の立ち上がりから4発目
のパルスP04 の立下がりまでの2サイクルの期間にわた
って出力する。このデータメモリアドレス(N) はデータ
アドレスレジスタ6に保持され、データアドレスバスDA
B を経由してデータメモリ7に与えられる。
The control circuit 501 of the wait control unit 50 uses the data memory address (N) as the data address ADD for two cycles from the rising of the third pulse P03 of the clock CK0 to the falling of the fourth pulse P04. Output over a period. This data memory address (N) is held in the data address register 6 and the data address bus DA
It is given to the data memory 7 via B.

【0050】その後のクロックCK1 の3発目のパルスP1
3 の立ち上がり時点から立下がり時点までの期間及びク
ロックCK1 の4発目のパルスP14 の立ち上がり時点から
立下がり時点までの期間に同期して、制御回路501 はメ
モリリード信号MRを有意 (ローレベル) に、レジスタラ
イト信号RWを有意 (ハイレベル) にする。この際、制御
回路501 は、一回目にメモリリード信号MR及びレジスタ
ライト信号RWを有意から無意に転じさせる時点を、換言
すればクロックCK0 の4発目のパルスP04 が立ち上がる
時点より以前の時点からクロックCK0 の4発目のパルス
P04 が立ち下がるまでの期間においてデータアドレスAD
D 、但しこの場合は最上位側のmビットがオール”1”
であるデータメモリアドレス(N) をNANDゲート5022に与
えることにより、ウェイト信号WTを有意 (ローレベル)
にする。
After that, the third pulse P1 of the clock CK1
The control circuit 501 sets the memory read signal MR to the significant level (low level) in synchronization with the period from the rising edge to the falling edge of 3 and the period from the rising edge to the falling edge of the fourth pulse P14 of the clock CK1. Then, the register write signal RW is made significant (high level). At this time, the control circuit 501 shifts the memory read signal MR and the register write signal RW from the significant to the abrupt in the first time, that is, from the time before the fourth pulse P04 of the clock CK0 rises. Fourth pulse of clock CK0
Data address AD during the period until P04 falls
D, but in this case, the most significant m bits are all "1"
The wait signal WT is significant (low level) by supplying the NAND gate 5022 with the data memory address (N)
To

【0051】制御回路501 が以上のような制御を行なう
ことにより、図1に示されているウェイト回路502 は以
下のように動作する。ウェイト回路502 の ANDゲート50
21への2入力はクロックCK1 及びレジスタライト信号RW
であるので、クロックCK1 の3発目のパルスP13 が立ち
上がった時点でその出力信号は”1”になる。従って、
この時点でラッチ81はD-入力端子への入力信号を取り込
んでラッチすると共に、Q-出力端子から出力し始める。
By the control circuit 501 performing the above control, the wait circuit 502 shown in FIG. 1 operates as follows. Wait circuit 502 AND gate 50
2 inputs to 21 are clock CK1 and register write signal RW
Therefore, when the third pulse P13 of the clock CK1 rises, its output signal becomes "1". Therefore,
At this point, the latch 81 takes in and latches the input signal to the D-input terminal and starts outputting from the Q-output terminal.

【0052】ところで、この状態においてラッチ81にラ
ッチされる信号(X) はその時点で要求されているデータ
メモリアドレス(N) に対応するデータ(data)の信号であ
るという保証はない。このため、ラッチ81にラッチされ
た信号がラッチ82にラッチされてデータレジスタ8の出
力信号D(OUT)として出力されることがないようにする必
要がある。そのために、この直後のクロックCK0 の4発
目のパルスP04 の立ち上がり時点より以前の時点からク
ロックCK0 の4発目のパルスP04 の立ち下がり時点まで
の期間においては、制御回路501 はnビットのデータア
ドレスADD の最上位側のmビットをNANDゲート5022へ出
力する。前述の如く、このデータメモリアドレスの最上
位側のmビットはオール”1”である。これにより、NA
NDゲート5022の出力信号は”0”に、換言すればウェイ
ト信号WTがローレベル(有意)になるので、 ANDゲート
5023の出力信号は他方の入力信号であるクロックCK0 に
は拘わらず”0”を維持する。従って、このクロックCK
0 の4発目のパルスP04 が立ち上がる時点前後において
は、ラッチ82がラッチ81のQ-出力端子からの出力信号を
取り込むことはない。
By the way, there is no guarantee that the signal (X) latched by the latch 81 in this state is the signal of data (data) corresponding to the data memory address (N) requested at that time. Therefore, it is necessary to prevent the signal latched by the latch 81 from being latched by the latch 82 and output as the output signal D (OUT) of the data register 8. Therefore, in the period from the time point before the rising edge of the fourth pulse P04 of the clock CK0 immediately after this to the falling time point of the fourth pulse P04 of the clock CK0, the control circuit 501 sets the n-bit data. The most significant m bits of the address ADD are output to the NAND gate 5022. As described above, the most significant m bits of this data memory address are all "1". This allows NA
The output signal of the ND gate 5022 becomes "0", in other words, the wait signal WT becomes low level (significant).
The output signal of 5023 maintains "0" regardless of the clock CK0 which is the other input signal. Therefore, this clock CK
Before and after the fourth pulse P04 of 0 rises, the latch 82 does not capture the output signal from the Q-output terminal of the latch 81.

【0053】次のクロックCK1 の4発目のパルスP14 が
立ち上がった時点で、 ANDゲート5021の出力信号は再
度”1”になる。従って、この時点でラッチ81はD-入力
端子への入力信号を取り込んでラッチすると共に、自身
のQ-出力端子から出力し始める。ところで、この時点に
おいては、データメモリ7から要求されているデータア
ドレス(N) に対応するデータ(data)がデータバスDBへ既
に出力されているので、ラッチ81にラッチされる信号は
そのデータ(data)の1ビットの信号である。
When the fourth pulse P14 of the next clock CK1 rises, the output signal of the AND gate 5021 becomes "1" again. Therefore, at this point, the latch 81 takes in and latches the input signal to the D-input terminal and starts to output it from its own Q-output terminal. By the way, at this time, since the data (data) corresponding to the data address (N) requested from the data memory 7 has already been output to the data bus DB, the signal latched by the latch 81 is data) is a 1-bit signal.

【0054】そして、クロックCK0 の5発目のパルスP0
5 の立ち上がり時点において、ラッチ82がそのD-入力端
子にラッチ81のQ-出力端子からの出力信号であるデータ
(data)の1ビットを取り込んでラッチする。このラッチ
82にラッチされた信号はラッチ82のQ-出力端子からデー
タレジスタ8の出力信号D(OUT)として出力される。
Then, the fifth pulse P0 of the clock CK0
At the rising edge of 5, the latch 82 outputs to its D-input terminal the data that is the output signal from the Q-output terminal of the latch 81.
Take in 1 bit of (data) and latch it. This latch
The signal latched by 82 is output as the output signal D (OUT) of the data register 8 from the Q-output terminal of the latch 82.

【0055】次に、本発明のマイクロプロセッサが4相
クロックで動作する場合について説明する。図4は本発
明のマイクロプロセッサが4相クロックで動作する場合
のウェイト制御部50内に備えられていて、ウェイト制御
が行なわれる際に機能するウェイト回路502 の一構成例
及びデータレジスタ8の1ビット分の構成例を示す論理
回路図である。なお、この図4においては、前述の図1
に示されている2相クロックで動作する場合の構成例と
同一の参照符号は同一又は相当部分を示している。
Next, the case where the microprocessor of the present invention operates with a four-phase clock will be described. FIG. 4 shows an example of the configuration of the wait circuit 502 and the data register 8 which are provided in the wait control unit 50 when the microprocessor of the present invention operates with a four-phase clock and which functions when the wait control is performed. It is a logic circuit diagram which shows the structural example for bit. In addition, in FIG. 4, in FIG.
The same reference numerals as those of the configuration example in the case of operating with the two-phase clock shown in FIG.

【0056】この図4に示されている4相クロックの場
合のウェイト回路の構成と前述の図1に示されている2
相クロックの場合のウェイト回路の構成との間の相違
は、 ANDゲート5021への一方の入力が、図1に示されて
いる2相クロックで動作する例においてはクロックCK1
であったのが、この図4に示されている4相クロックで
動作する例においてはクロックCK3 である点のみであ
る。
The structure of the wait circuit for the four-phase clock shown in FIG. 4 and the two shown in FIG.
The difference from the configuration of the wait circuit in the case of the phase clock is that one input to the AND gate 5021 operates in the two-phase clock shown in FIG.
The only difference is that the clock CK3 is used in the example of operating with the four-phase clock shown in FIG.

【0057】この図4に示されているような4相クロッ
クで動作する本発明のマイクロプロセッサのウェイト回
路502 の構成例の動作、特にウェイト制御部50によるウ
ェイト制御時の動作については図5のタイミングチャー
トに示されている。なお、このマイクロプロセッサの4
相の基本クロックCK0, CK1, CK2, CK3はそれぞれのハイ
レベル区間がオーバラップしないノンオーバラップクロ
ックである。また、図5のタイミングチャートでは、ク
ロックCK0 の一発目のハイレベルのパルスから順に参照
符号としてP01, P02, P03 …を、クロックCK1 の一発目
のハイレベルのパルスから順に参照符号としてP11, P1
2, P13 …を、クロックCK2 の一発目のハイレベルのパ
ルスから順に参照符号としてP21, P22, P23 …を、クロ
ックCK3 の一発目のハイレベルのパルスから順に参照符
号としてP31, P32, P33 …をそれぞれ付してある。
The operation of the configuration example of the wait circuit 502 of the microprocessor of the present invention which operates with a four-phase clock as shown in FIG. 4, particularly the operation at the time of wait control by the weight controller 50, is shown in FIG. It is shown in the timing chart. In addition, 4 of this microprocessor
The basic clocks CK0, CK1, CK2, and CK3 of the phases are non-overlap clocks in which the high-level sections do not overlap. Further, in the timing chart of FIG. 5, P01, P02, P03, ... As reference symbols in order from the first high-level pulse of the clock CK0, and P11 as reference symbols in order from the first high-level pulse of the clock CK1. , P1
P21, P22, P23, ... as reference symbols in order from the first high-level pulse of the clock CK2, and P31, P32, as reference symbols in order from the first high-level pulse of the clock CK3. P33 ... are attached respectively.

【0058】この図5に示されている4相クロックの場
合のウェイト回路のタイミングチャートと前述の図3に
示されている2相クロックの場合のウェイト回路のタイ
ミングチャートとの間の相違は、メモリリード信号MRが
1サイクルのクロックCK1 の立下がりからクロックCK0
の立ち上がりの間に有意(ローレベル)になること、レ
ジスタライト信号RWがクロックCK3 の同相であること、
である。他の動作については前述の2相クロックの場合
と同様である。
The difference between the timing chart of the wait circuit for the four-phase clock shown in FIG. 5 and the timing chart of the wait circuit for the two-phase clock shown in FIG. The clock CK0 from the falling edge of the clock CK1 for one cycle of the memory read signal MR
Is significant (low level) during the rising edge of, the register write signal RW is in phase with the clock CK3,
Is. Other operations are the same as in the case of the two-phase clock described above.

【0059】[0059]

【発明の効果】以上に詳述したように、本発明のマイク
ロプロセッサによれば、従来はウェイト信号を2相クロ
ックの場合であれば第2相が立ち上がるまでに有意にし
ておく必要があったが、本発明では次の第1相が立ち上
がるまでに有意にしておけばよい。このため、ウェイト
制御部において時間的な余裕が生じるため、従来と同一
の処理でよいのであればより単純な回路構成を採用する
ことが可能になり、回路規模の小形化が可能になり、ま
た回路規模を小型化せずにより複雑な制御を行なうこと
も可能になる。更に、クロック周波数に対するマージン
が大きくなるので、より正確な動作が可能になる。
As described in detail above, according to the microprocessor of the present invention, conventionally, in the case of a two-phase clock, it was necessary to make the wait signal significant until the second phase rises. However, in the present invention, it may be significant until the next first phase rises. For this reason, since there is a time margin in the wait control unit, it is possible to adopt a simpler circuit configuration if the same processing as the conventional one is sufficient, and it is possible to reduce the circuit scale. It is also possible to perform complicated control without downsizing the circuit scale. Further, since the margin for the clock frequency becomes large, more accurate operation becomes possible.

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

【図1】2相クロックで動作する本発明のマイクロプロ
セッサのウェイト制御部内に備えられているウェイト回
路の一構成例及びデータレジスタの1ビット分の構成例
を示す論理回路図である。
FIG. 1 is a logic circuit diagram showing a configuration example of a wait circuit and a 1-bit configuration example of a data register provided in a wait control unit of a microprocessor of the present invention operating with a two-phase clock.

【図2】2相クロックで動作する本発明のマイクロプロ
セッサの構成例を示すブロック図である。
FIG. 2 is a block diagram showing a configuration example of a microprocessor of the present invention which operates with a two-phase clock.

【図3】2相クロックで動作する本発明のマイクロプロ
セッサのウェイト制御時の動作を示すタイミングチャー
トである。
FIG. 3 is a timing chart showing an operation during wait control of the microprocessor of the present invention which operates with a two-phase clock.

【図4】4相クロックで動作する本発明のマイクロプロ
セッサのウェイト制御部内に備えられているウェイト回
路の一構成例及びデータレジスタの1ビット分の構成例
を示す論理回路図である。
FIG. 4 is a logic circuit diagram showing a configuration example of a wait circuit and a 1-bit configuration example of a data register provided in a wait control unit of a microprocessor of the present invention which operates with a four-phase clock.

【図5】4相クロックで動作する本発明のマイクロプロ
セッサのウェイト制御時の動作を示すタイミングチャー
トである。
FIG. 5 is a timing chart showing an operation during wait control of the microprocessor of the present invention which operates with a four-phase clock.

【図6】多相クロックで動作する従来の一般的なマイク
ロプロセッサの構成例を示すブロック図である。
FIG. 6 is a block diagram showing a configuration example of a conventional general microprocessor that operates with a multiphase clock.

【図7】多相クロックで動作する従来の一般的なマイク
ロプロセッサのウェイト制御部内に備えられているウェ
イト回路の一構成例及びデータレジスタの1ビット分の
構成例を示す論理回路図である。
FIG. 7 is a logic circuit diagram showing a configuration example of a wait circuit and a 1-bit configuration example of a data register provided in a weight control unit of a conventional general microprocessor that operates with a multiphase clock.

【図8】多相クロックで動作する従来の一般的なマイク
ロプロセッサのウェイト制御時の動作を示すタイミング
チャートである。
FIG. 8 is a timing chart showing an operation during wait control of a conventional general microprocessor that operates with a multi-phase clock.

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

7 データメモリ 8 データレジスタ 50 ウェイト制御部 81 ラッチ 82 ラッチ 502 ウェイト回路 5021 ANDゲート 5022 NANDゲート 5023 ANDゲート CK0, CK1, CK2, CK3 クロック 7 Data memory 8 data registers 50 weight controller 81 latch 82 latch 502 wait circuit 5021 AND gate 5022 NAND gate 5023 AND gate CK0, CK1, CK2, CK3 clock

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/00 G06F 9/30 - 9/36 G06F 12/00 - 12/06 G06F 13/16 - 13/18 G06F 15/78 Front page continuation (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 7/00 G06F 9/30-9/36 G06F 12/00-12/06 G06F 13/16-13/18 G06F 15 / 78

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 n相(nは2以上の自然数)のノンオー
バラップクロックで動作し、メモリから読み出されたデ
ータを一時保持するレジスタと、前記メモリのアクセス
に際して、2クロックサイクル以上のウェイト期間を設
定し、前記メモリから出力されたデータを前記ウェイト
期間の最後のサイクルにおいて前記レジスタに取り込む
べく制御するウェイト制御部とを備えたマイクロプロセ
ッサにおいて、 前記レジスタは、 前記メモリから出力されたデータをラッチする前段のラ
ッチ手段と、 前記前段のラッチ手段がラッチしたデータをラッチする
後段のラッチ手段とを備え、 前記ウェイト制御部は、 前記前段のラッチ手段のラッチ動作を前記n相クロック
の第n相に同期して行なわせる第1のタイミング手段
と、 前記後段のラッチ手段のラッチ動作を前記n相クロック
の第1相に同期して行なわせる第2のタイミング手段
と、 前記第2のタイミング手段の動作を、前記ウェイト期間
の最後のサイクル以外の各サイクルにおいて禁じる禁止
手段とを備えたことを特徴とするマイクロプロセッサ。
1. A register which operates with an n-phase (n is a natural number of 2 or more) non-overlap clock and temporarily holds data read from a memory, and a wait of 2 clock cycles or more when accessing the memory. A microprocessor provided with a wait control unit for setting a period and controlling the data output from the memory to be loaded into the register in the last cycle of the wait period, wherein the register is the data output from the memory. A wait control unit for latching the data latched by the latch unit in the front stage, and the wait control unit controls the latch operation of the latch unit in the front stage for the n-phase clock a first timing means for synchronizing with the n-phase and a latch means for the latter stage. Second timing means for performing a latch operation in synchronization with the first phase of the n-phase clock; and prohibiting means for inhibiting the operation of the second timing means in each cycle other than the last cycle of the wait period. Microprocessor characterized by having.
【請求項2】 前記禁止手段は、前記メモリをアクセス
するためのアドレス信号が出力された場合に前記第2の
タイミング手段の動作を禁じるべくなしてあることを特
徴とする請求項1に記載のマイクロプロセッサ。
2. The prohibiting means is adapted to prohibit the operation of the second timing means when an address signal for accessing the memory is output. Microprocessor.
JP13227695A 1995-05-30 1995-05-30 Microprocessor Expired - Fee Related JP3459495B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13227695A JP3459495B2 (en) 1995-05-30 1995-05-30 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13227695A JP3459495B2 (en) 1995-05-30 1995-05-30 Microprocessor

Publications (2)

Publication Number Publication Date
JPH08328942A JPH08328942A (en) 1996-12-13
JP3459495B2 true JP3459495B2 (en) 2003-10-20

Family

ID=15077503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13227695A Expired - Fee Related JP3459495B2 (en) 1995-05-30 1995-05-30 Microprocessor

Country Status (1)

Country Link
JP (1) JP3459495B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5393626B2 (en) * 2010-09-29 2014-01-22 京セラドキュメントソリューションズ株式会社 Information processing device
JP5926655B2 (en) * 2012-08-30 2016-05-25 ルネサスエレクトロニクス株式会社 Central processing unit and arithmetic unit

Also Published As

Publication number Publication date
JPH08328942A (en) 1996-12-13

Similar Documents

Publication Publication Date Title
US4896259A (en) Apparatus for storing modifying data prior to selectively storing data to be modified into a register
US3972024A (en) Programmable microprocessor
JPS6239780B2 (en)
US4446517A (en) Microprogram memory with page addressing and address decode in memory
JPS6243764A (en) Bus state control circuit
JPH0346850B2 (en)
EP0378415A2 (en) Multiple instruction dispatch mechanism
US5046040A (en) Microprogram control apparatus using don't care bits as part of address bits for common instructions and generating variable control bits
US5835746A (en) Method and apparatus for fetching and issuing dual-word or multiple instructions in a data processing system
KR920007253B1 (en) Controlling apparatus for micro-program
JP3459495B2 (en) Microprocessor
US5526500A (en) System for operand bypassing to allow a one and one-half cycle cache memory access time for sequential load and branch instructions
JPS6232504B2 (en)
KR100321745B1 (en) A micro controller unit for external memory access
US5363490A (en) Apparatus for and method of conditionally aborting an instruction within a pipelined architecture
US5454090A (en) Apparatus for furnishing instructions in a microprocessor with a multi-stage pipeline processing unit for processing instruction phase and having a memory and at least three additional memory units
US20110125984A1 (en) Microprocessor
JPH0512751B2 (en)
EP0177712B1 (en) Masked data fetch and modifying device
JP3490191B2 (en) calculator
JP2721611B2 (en) Programmable controller
JP2721610B2 (en) Programmable controller
JPH0561660B2 (en)
JP4021590B2 (en) Floating point arithmetic unit
JPS63293638A (en) Data processing system

Legal Events

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

Free format text: PAYMENT UNTIL: 20070808

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080808

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120808

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130808

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees