JP2872117B2 - Microprocessor - Google Patents
MicroprocessorInfo
- Publication number
- JP2872117B2 JP2872117B2 JP8167668A JP16766896A JP2872117B2 JP 2872117 B2 JP2872117 B2 JP 2872117B2 JP 8167668 A JP8167668 A JP 8167668A JP 16766896 A JP16766896 A JP 16766896A JP 2872117 B2 JP2872117 B2 JP 2872117B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- instruction
- address
- output
- bus
- 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 - Lifetime
Links
- 230000004044 response Effects 0.000 claims description 15
- 230000003213 activating effect Effects 0.000 claims description 8
- 230000000873 masking effect Effects 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 17
- 238000004364 calculation method Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Landscapes
- Advance Control (AREA)
- Debugging And Monitoring (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、命令格納用メモリ
を内蔵したマイクロプロセッサに係わり、特にパイプラ
イン動作を行うマイクロプロセッサに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor having a memory for storing instructions, and more particularly to a microprocessor that performs a pipeline operation.
【0002】[0002]
【従来の技術】命令格納用メモリとして、キャッシュメ
モリの場合を例にあげて説明する。2. Description of the Related Art A cache memory will be described as an example of an instruction storage memory.
【0003】キャッシュメモリを内蔵しないマイクロプ
ロセッサでは、外部端子のアドレスバスおよびデータバ
スを使用し、制御信号に応答して、外部のメインメモリ
から実行すべき命令を随時読み込んで実行する。従っ
て、外部端子、特にアドレスバスと制御信号の状態を観
測することによって実行中の命令を判別することがで
き、インサーキットエミュレータ等での命令トレースを
実現することが可能であった。A microprocessor without a built-in cache memory reads and executes an instruction to be executed from an external main memory as needed in response to a control signal using an address bus and a data bus of external terminals. Therefore, it is possible to determine the instruction being executed by observing the state of the external terminal, particularly the address bus and the control signal, and it is possible to realize an instruction trace by an in-circuit emulator or the like.
【0004】またLSIテスタ等でのデバイスの電気的
特性試験において、Fail、すなわち外部端子の状態
をシミュレーション等で生成した期待値と随時比較し、
不一致となる信号が発生した場合にも、実行中の命令を
判別することが容易であるため、問題箇所の特定を迅速
に行うことができた。Further, in an electrical characteristic test of a device using an LSI tester or the like, Fail, that is, a state of an external terminal is compared with an expected value generated by a simulation or the like as needed.
Even when a mismatch signal occurs, it is easy to determine the instruction being executed, so that the problem location can be quickly identified.
【0005】しかし、キャッシュメモリを内蔵したマイ
クロプロセッサでは、実行すべき命令が内蔵キャッシュ
メモリにヒットしてしまうと外部メインメモリへのアク
セスが行われないため、外部端子を観測していただけで
は実行中の命令を特定することは不可能であり、命令ト
レースを行うことができなかった。However, in a microprocessor having a built-in cache memory, if an instruction to be executed hits the built-in cache memory, the external main memory is not accessed. It was impossible to specify the instruction, and the instruction trace could not be performed.
【0006】そこで、命令トレースを行う場合にキャッ
シュメモリを使用禁止状態にして常に外部メインメモリ
へのアクセスが発生するようにし、外部端子を観測する
ことで命令トレースを実現する方法がある。Therefore, there is a method of realizing instruction tracing by observing an external terminal so that the cache memory is always disabled and access to the external main memory is always performed when instruction tracing is performed.
【0007】この、キャッシュを使用禁止にする従来例
のシステム構成の一例を示した図16を参照すると、命
令キャッシュメモリ部(以下、命令キャッシュ部と称
す)11、データキャッシュメモリ部(以下、キャッシ
ュ部と称す)12、レジスタファイル部13、演算実行
部14、プログラムカウンタ部15、分岐アドレス生成
部16、バスインタフェース部17および制御部18を
備え、命令キャッシュ部11から出力されるミスヒット
信号501とキャッシュ使用禁止信号565がOR回路
177に入力され、その出力は制御部18とバスインタ
フェース部17にそれぞれ入力される。命令キャッシュ
部11とバスインタフェース部17とにはプログラムカ
ウンタ部15の出力信号503が供給される。Referring to FIG. 16, which shows an example of a conventional system configuration in which the use of a cache is prohibited, an instruction cache memory unit (hereinafter, referred to as an instruction cache unit) 11, a data cache memory unit (hereinafter, cache) 12), a register file section 13, an operation execution section 14, a program counter section 15, a branch address generation section 16, a bus interface section 17, and a control section 18, and a mishit signal 501 output from the instruction cache section 11. And the cache use prohibition signal 565 are input to the OR circuit 177, and the output is input to the control unit 18 and the bus interface unit 17, respectively. The output signal 503 of the program counter unit 15 is supplied to the instruction cache unit 11 and the bus interface unit 17.
【0008】レジスタファイルRF13は出力504が
分岐アドレス生成部16と演算実行部14の選択回路1
01を介してラッチ102とにそれぞれ供給され、レジ
スタファイル13の他方の出力505がラッチ103に
接続される。The register file RF13 outputs the output 504 to the branch address generator 16 and the selector 1 of the operation execution unit 14.
01, and the other output 505 of the register file 13 is connected to the latch 103.
【0009】選択回路101の他方の入力端はバス50
7によって分岐アドレス生成部16と命令キャッシュ部
11と制御部18とバスインタフェース部17とにそれ
ぞれ接続される。The other input terminal of the selection circuit 101 is a bus 50
7 connects to the branch address generator 16, the instruction cache 11, the controller 18, and the bus interface 17.
【0010】分岐アドレス生成部16の分岐アドレス出
力はプログラムカウンタ部15に、プログラムカウンタ
部15のフェッチアドレスが分岐アドレス生成部16に
供給される。The branch address output of the branch address generator 16 is supplied to the program counter 15, and the fetch address of the program counter 15 is supplied to the branch address generator 16.
【0011】ラッチ102および103の出力はALU
105にそれぞれ供給され、ALU105の出力はラッ
チ106とデータキャッシュ部12とバスインタフェー
ス部17とにそれぞれ供給される。ラッチ104の出力
はバス508によってデータキャッシュ部12とバスイ
ンタフェース部17と選択回路107の一方の入力端に
それぞれ供給され、選択回路107の他方の入力端には
ラッチ106の出力が供給される。[0011] The output of the latch 10 2 and 103 ALU
The output of the ALU 105 is supplied to the latch 106, the data cache unit 12, and the bus interface unit 17, respectively. The output of the latch 104 is supplied to the data cache unit 12, the bus interface unit 17, and one input terminal of the selection circuit 107 via a bus 508, and the output of the latch 106 is supplied to the other input terminal of the selection circuit 107.
【0012】選択回路107の出力はラッチ108に供
給され、その出力はレジスタファイルRF13の入力端
に供給される。The output of the selection circuit 107 is supplied to a latch 108, and the output is supplied to an input terminal of a register file RF13.
【0013】データキャッシュ部12のミスヒット信号
510およびキャッシュ使用禁止信号565はそれぞれ
NOR回路176を介してバスインタフェース部17と
制御部18にそれぞれ供給される。The mishit signal 510 and the cache use prohibition signal 565 of the data cache unit 12 are supplied to the bus interface unit 17 and the control unit 18 via the NOR circuit 176, respectively.
【0014】上述した構成からなるマイクロプロセッサ
1cは、外部端子、またはマイクロプロセッサ内のレジ
スタから生成されるキャッシュ使用禁止信号565によ
ってキャッシュメモリを使用禁止にすることを通知す
る。キャッシュメモリからのミスヒット信号501を強
制的にアクティブにすることによって、常にキャッシュ
ミスヒットが発生し、実質的にキャッシュを使用してい
ない状態となる。The microprocessor 1c having the above-described configuration notifies that the use of the cache memory is prohibited by a cache use prohibition signal 565 generated from an external terminal or a register in the microprocessor. By forcibly activating the mishit signal 501 from the cache memory, a cache mishit always occurs, and the cache is not substantially used.
【0015】その動作説明用のキャッシュミス時のパイ
プラインのタイミングチャートを示した図17を参照す
ると、各命令inst1〜inst5で命令フェッチの
ための外部メインメモリへのアクセスが発生する。すな
わち、メモリリードバスサイクルではバスサイクル開始
信号がロウレベルになるタイミングに応答して、外部ア
ドレスバスにアドレス信号が出力され、その後バスサイ
クル開始信号がロウレベルからハイレベルへ変化すると
外部データバスにメモリから読み出されたリードデータ
が入力される。Referring to FIG. 17 showing a timing chart of a pipeline at the time of a cache miss for explaining the operation, an access to the external main memory for instruction fetch occurs at each of the instructions inst1 to inst5. That is, in the memory read bus cycle, an address signal is output to the external address bus in response to the timing at which the bus cycle start signal goes low, and when the bus cycle start signal changes from the low level to the high level, the external data bus sends the signal to the external data bus. The read read data is input.
【0016】一方、キャッシュメモリを使用したまま、
分岐命令で分岐した場合にアドレスを外部に出力する場
合の従来例が特開平4−319741号公報に記載され
ている。同公報記載のデバッグサポート機能を有するマ
イクロプロセッサの構成図を示した図18を参照する
と、マイクロプロセッサはバスインタフェース部18
1、キャッシュメモリ部182、命令プリフェッチ部1
83、命令デコーダ・アドレス計算部184、および演
算実行部185を備えてなる。On the other hand, while using the cache memory,
A conventional example in which an address is output to the outside when a branch is taken by a branch instruction is described in Japanese Patent Laid-Open No. 4-319974. Referring to FIG. 18 which shows a configuration diagram of a microprocessor having a debug support function described in the publication, the microprocessor includes a bus interface unit 18.
1, cache memory unit 182, instruction prefetch unit 1
83, an instruction decoder / address calculation unit 184, and an operation execution unit 185.
【0017】バスインタフェース部181は、外部との
間で信号を授受するための部分であり、特に外部アドレ
スバス571および端子186と、外部データバス57
2および端子187とによって外部のメインメモリとデ
ータのやり取りを行う。The bus interface section 181 is for transmitting and receiving signals to and from the outside. In particular, the bus interface section 181 and the external address bus 571 and the terminal 186 and the external data bus 57
2 and the terminal 187 exchange data with an external main memory.
【0018】キャッシュメモリ部182は、このマイク
ロプロセッサに内蔵されたキャッシュメモリであり、命
令およびデータ混在型である。命令プリフェッチ部18
3によってアクセスされ、そのアクセスがヒットしたか
ミスヒットとなったかを示すヒット/ミスヒット表示信
号573をバスインタフェース部181に出力する。The cache memory unit 182 is a cache memory built in the microprocessor, and is of a mixed instruction and data type. Instruction prefetch unit 18
3 and outputs a hit / miss hit display signal 573 to the bus interface unit 181 indicating whether the access has been hit or missed.
【0019】命令プリフェッチ部183は、命令のフェ
ッチ要求が発生すると、まずフェッチアドレスをアドレ
スバス577を通じてキャッシュメモリ部182へ与
え、そのアクセスがヒットした場合にはキャッシュメモ
リ部182からデータバス578を通じて命令コードお
よびその他のデータを受け取り、一方ミスヒットとなっ
た場合にはバスインタフェース部181を通じて外部の
メインメモリから命令コードおよびその他のデータを受
け取る。When an instruction fetch request is issued, the instruction prefetch unit 183 first supplies a fetch address to the cache memory unit 182 via the address bus 577. If the access is hit, the instruction prefetch unit 183 transmits the instruction from the cache memory unit 182 via the data bus 578. It receives a code and other data, and when a miss occurs, receives an instruction code and other data from an external main memory through the bus interface unit 181.
【0020】また、後述する分岐先のアドレスが分岐ア
ドレスバス576を通じて演算実行部から与えられた場
合には、この新しいアドレスに応答してキャッシュメモ
リ部182を参照し、同時にバスインタフェース部18
1に分岐後の命令フェッチであることを示す信号579
を出力する。When an address of a branch destination, which will be described later, is given from the arithmetic execution unit via the branch address bus 576, the cache memory unit 182 is referred to in response to the new address, and at the same time, the bus interface unit 18
A signal 579 indicating that the instruction is an instruction fetch after branching to 1.
Is output.
【0021】命令デコーダ・アドレス計算部184は、
命令用データバス574を通じて命令プリフェッチ部1
83から命令コードを受け取ると、演算実行部185で
実行可能な命令形式に変換し、演算実行に必要なオペラ
ンドに対するアドレスを計算する。The instruction decoder / address calculator 184
Instruction prefetch unit 1 through instruction data bus 574
When the instruction code is received from 83, it is converted into an instruction format executable by the operation execution unit 185, and an address for an operand required for execution of the operation is calculated.
【0022】演算実行部185は、命令デコーダ・アド
レス計算部184から命令用データバス575を介して
命令コードおよびオペランドのアドレスを受け取り、受
け取ったアドレスに基づいてオペランドがメモリ上のデ
ータか否かを判定し、メモリ上のデータであればアドレ
スバス577およびデータバス578を通じてキャッシ
ュメモリ部182を参照し、ヒットした場合にはキャッ
シュメモリ部182からデータバス578を介してデー
タを受け取る。The operation execution unit 185 receives the instruction code and the address of the operand from the instruction decoder / address calculation unit 184 via the instruction data bus 575, and determines whether or not the operand is data on the memory based on the received address. It is determined that the data is in the memory, the cache memory unit 182 is referred to via the address bus 577 and the data bus 578, and the data is received from the cache memory unit 182 via the data bus 578 when hit.
【0023】一方、ミスヒットした場合にはバスインタ
フェース部181を通じて外部メインメモリよりデータ
を受け取る。また、受け取った命令コードが分岐命令を
表す場合には、必要に応じて分岐条件を調べ、分岐が必
要な場合には分岐先のアドレスを分岐アドレスバス57
6を通じて命令プリフェッチ部183へ送る。On the other hand, when a miss occurs, data is received from the external main memory through the bus interface unit 181. If the received instruction code indicates a branch instruction, the branch condition is checked if necessary, and if a branch is required, the address of the branch destination is set to the branch address bus 57.
6 to the instruction prefetch unit 183.
【0024】バスインタフェース部181は、命令プリ
フェッチ部183から分岐後の命令フェッチであること
を示す信号579を受け取った場合には、分岐後最初に
行われる命令フェッチであることを示す分岐表示信号5
80を端子188を介して外部に出力する。When receiving a signal 579 from the instruction prefetch unit 183 indicating that the instruction is an instruction fetch after branching, the bus interface unit 181 indicates a branch indication signal 5 indicating that the instruction fetch is performed first after the branch.
80 is output to the outside via the terminal 188.
【0025】また、この時キャッシュメモリ部182か
らヒット/ミスヒット表示信号573を受け取り、それ
がヒットしている場合にはヒット表示信号581を端子
189を介して外部に出力し、かつその時のキャッシュ
メモリ部182に与えられているアドレスをアドレスバ
ス577を通じて受け取り、それを外部アドレスバス5
71に出力し、端子186を介して外部へ出力する。At this time, a hit / miss hit display signal 573 is received from the cache memory unit 182, and if the hit / miss hit display signal 573 is hit, a hit display signal 581 is output to the outside via the terminal 189, and the cache memory at that time is output. The address provided to the memory unit 182 is received through the address bus 577, and is received by the external address bus 5
71, and output to the outside via the terminal 186.
【0026】したがって、このマイクロプロセッサで
は、命令シーケンスの過程で分岐が行われたか否か、お
よび分岐後最初の命令フェッチがキャッシュメモリ部で
ヒットしたか否かをそれぞれ分岐表示信号およびヒット
表示信号によって外部でモニタでき、また外部メインメ
モリへアクセスされるアドレスだけでなくキャッシュメ
モリ部でアクセスされるアドレスも外部アドレスバス5
71を通じて知ることができる。Therefore, in this microprocessor, whether or not a branch was taken in the course of the instruction sequence and whether or not the first instruction fetch after the branch hit in the cache memory unit are determined by the branch display signal and the hit display signal, respectively. The external address bus 5 can be monitored externally, and not only addresses accessed to the external main memory but also addresses accessed in the cache memory unit are provided.
71.
【0027】分岐が行われない場合には命令はシーケン
シャルに実行されるため、キャッシュメモリ部182で
ミスヒットが発生し、バスインタフェース部181を通
して外部メインメモリへのアクセスが発生した場合のア
ドレス、および分岐命令実行時のアドレスから、命令シ
ーケンスを予測することができる。If the branch is not taken, the instructions are executed sequentially, so that a miss occurs in the cache memory unit 182 and an address when an access to the external main memory occurs through the bus interface unit 181. The instruction sequence can be predicted from the address at the time of execution of the branch instruction.
【0028】例えば、分岐命令で分岐した場合のタイミ
ングチャートを示したを図19を参照すると、命令in
st1の後に分岐命令1が実行され、命令inst4の
後に分岐命令2がそれぞれ実行されるとすると、バスサ
イクル開始信号がハイレベルの期間において、分岐命令
1がRFを実行するタイミングで分岐表示信号およびヒ
ット表示信号がそれぞれハイレベルとなり、外部アドレ
スバスには分岐アドレスが出力されている。同様に分岐
命令2がRFを実行するタイミングで分岐表示信号およ
びヒット表示信号がそれぞれハイレベルとなり、外部ア
ドレスバスには分岐アドレスが出力されている。For example, FIG. 19 shows a timing chart when a branch is taken by a branch instruction.
Assuming that the branch instruction 1 is executed after the st1 and the branch instruction 2 is executed after the instruction inst4, during the period when the bus cycle start signal is at the high level, the branch instruction signal and the branch indication signal are output at the timing when the branch instruction 1 executes the RF The hit display signals go high, and the branch address is output to the external address bus. Similarly, at the timing when the branch instruction 2 executes the RF, the branch display signal and the hit display signal each become high level, and the branch address is output to the external address bus.
【0029】[0029]
【発明が解決しようとする課題】上述したように、キャ
ッシュメモリを内蔵し、パイプライン制御によって動作
するマイクロプロセッサでは、通常そのキャッシュメモ
リを使用して動作することを前提としている。したがっ
て、キャッシュメモリにヒットして動作している間は、
後述する図11のタイミングチャートに示すように、パ
イプラインがすべて詰まった状態となり、実質的に1命
令1クロックで実行されることになり、パイプライン動
作が高速性をもつことを示している。As described above, a microprocessor having a built-in cache memory and operating by pipeline control is generally assumed to operate using the cache memory. Therefore, while operating by hitting the cache memory,
As shown in a timing chart of FIG. 11, which will be described later, the pipelines are all in a clogged state, and are executed substantially by one instruction and one clock, indicating that the pipeline operation has a high speed.
【0030】しかし、前述の図16に示した、内蔵キャ
ッシュメモリを使用禁止として命令トレースを行う従来
例では、図17のタイミングチャートに示すように、パ
イプラインが4クロックサイクル期間まで延びた状態と
なり、1命令に例えば4クロックを要してしまい、キャ
ッシュメモリを使用した場合のタイミングを作り出すこ
とはできなくなってしまう。However, in the conventional example shown in FIG. 16 in which instruction tracing is performed with the use of the built-in cache memory disabled, as shown in the timing chart of FIG. 17, the pipeline extends up to four clock cycle periods. For example, four clocks are required for one instruction, and it is not possible to create timing when a cache memory is used.
【0031】したがって、デバッグすべきプログラムの
本来の動作タイミングとは異なるタイミングでしか命令
トレースを行うことができないという問題がある。Therefore, there is a problem that the instruction trace can be performed only at a timing different from the original operation timing of the program to be debugged.
【0032】また、図18に示した、分岐先アドレスを
外部に出力する従来例では、図20に示したライトバス
サイクル時のタイミングチャートに示すように、分岐先
アドレスを出力しようとするタイミングにおいて、外部
アドレスバスがデータライトサイクルで使用されている
と、分岐先アドレスを出力できなくなってしまう。In the conventional example shown in FIG. 18 for outputting the branch destination address to the outside, as shown in the timing chart at the time of the write bus cycle shown in FIG. If the external address bus is used in a data write cycle, it is impossible to output the branch destination address.
【0033】同様に、図21に示したバスホールド時の
タイミングチャートに示すように、命令inst4の後
に実行される分岐命令がRFを実行して分岐先アドレス
を出力しようとするタイミング(図中の点線で示したタ
イミング)では、バスホールド要求信号(HLDRQ)
が出力され、ホールド要求が受つけられた、すなわちバ
スホールド応答信号(HLDAK)がアクティブの状態
によって外部バスが使用できない場合には、分岐先アド
レスを出力することができないため、命令トレースがで
きなくなってしまう。Similarly, as shown in the timing chart at the time of the bus hold shown in FIG. 21, the timing at which the branch instruction executed after the instruction inst4 executes the RF to output the branch destination address (in FIG. 21). At the timing indicated by the dotted line), the bus hold request signal (HLDRQ)
Is output and the hold request is accepted , that is,
If the external bus cannot be used due to the active state of the hold response signal (HLDAK), the instruction trace cannot be performed because the branch destination address cannot be output.
【0034】さらに、図22に示す命令列のように、同
一の分岐先アドレス(target)を持つ分岐命令b
eqz、beqz、jumpが近接して存在した場合、
どの分岐命令が実行されたかの判別がつかなくなり、正
確な命令トレースができなくなってしまう。A branch instruction b having the same branch destination address (target) as shown in the instruction sequence shown in FIG.
If eqz, beqz, and jump exist in close proximity,
It becomes impossible to determine which branch instruction has been executed, and accurate instruction tracing cannot be performed.
【0035】本発明の目的は、上述した欠点に鑑みなさ
れたものであり、内蔵メモリを使用したまま、外部バス
の状態や命令シーケンスに影響されずに完全な命令トレ
ースを行うことが出来るようにして、特性・性能向上と
高速化を実現するマイクロプロセッサを提供することに
ある。An object of the present invention has been made in view of the above-mentioned drawbacks, and has been made to enable complete instruction tracing without being affected by the state of an external bus or an instruction sequence while using a built-in memory. Another object of the present invention is to provide a microprocessor capable of improving characteristics and performance and increasing speed.
【0036】[0036]
【課題を解決するための手段】本発明のマイクロプロセ
ッサの特徴は、クロック信号に応答して1クロック毎に
実行命令アドレスを更新して出力するプログラムカウン
タと、前記クロック信号に応答して前記実行命令アドレ
スを受けてキャッシュヒット時は対応する命令コードを
出力しミスヒット時はミスヒット信号を出力する命令格
納用キャッシュメモリと、前記命令コードを受けて前記
クロック信号に応答してその命令を実行する命令実行制
御手段と、前記実行命令アドレスを保持し外部バスに接
続されたバスインターフェースと、前記プログラムカウ
ンタおよび前記命令実行制御手段への前記クロック信号
の供給を許可するパイプライン動作許可信号を発生する
パイプライン停止手段とを有し、前記実行命令アドレス
の更新,前記命令コードの出力並びに前記命令の実行を
それぞれ1クロック単位でパイプライン動作を行うマイ
クロプロセッサにおいて、前記パイプライン停止手段
は、前記ミスヒット信号が発生したときに前記パイプラ
イン動作許可信号を非アクティブとして前記クロック信
号の供給を停止し、前記バスインターフェースは、前記
ミスヒット信号が発生したときまたは前記マイクロプロ
セッサがデバッグモードであるときに前記実行命令アド
レスを前記外部バスに出力することにある。A feature of the microprocessor of the present invention is that a microprocessor responds to a clock signal every clock.
Program counter that updates and outputs the execution instruction address
And the execution instruction address in response to the clock signal.
When a cache hit occurs, the corresponding instruction code is
On output to a mishit and a cache memory for instruction storage for outputting a mishit signal, said receiving said instruction code
An instruction execution system that executes the instruction in response to a clock signal
Control means and the external instruction bus for holding the execution instruction address.
Connected bus interface and the program
And the clock signal to the instruction execution control means.
Generates a pipeline operation enable signal that permits supply of data
Pipeline execution means, and the execution instruction address
Update, output of the instruction code, and execution of the instruction
In a microprocessor which performs a pipeline operation in units of one clock , said pipeline stopping means
Is the pipeline when the mishit signal is generated.
In operation enable signal is deactivated and the clock signal
Signal supply, and the bus interface
When a mishit signal is generated or when the microprocessor
When the processor is in debug mode,
Output to the external bus .
【0037】また、前記パイプライン停止手段は、前記
ミスヒット信号を入力する組み合せ回路と、この組み合
せ回路の出力信号と外部から入力したパイプラインの動
作停止用の第1の制御信号の反転信号とを入力する第1
の論理積回路とを有し、この第1の論理積回路の出力を
前記パイプライン動作許可信号としてパイプライン制御
手段のクロックが供給される論理回路へ供給し、前記第
1の制御信号がアクティブになったときに前記第1の論
理積回路の出力で前記パイプライン動作許可信号を非ア
クティブにして前記論理回路の前記クロック信号の出力
をマスクすることにより強制的に前記パイプライン動作
を停止させ、前記プログラムカウンタおよび前記命令実
行制御手段がこのときの内部状態を保持するように構成
する。[0037] In addition, the pipeline stop means is, before Symbol
A circuit combining inputs the Mi Suhitto signal, first for inputting an inverted signal of the combination the first control signal for the stop of the operation of the pipeline input from the output signal and an external circuit
And an output of the first AND circuit
The pipeline operation permission signal is supplied to a logic circuit to which a clock of pipeline control means is supplied, and when the first control signal becomes active, the pipeline operation is performed by the output of the first AND circuit. The pipeline signal is forcibly stopped by masking the output of the clock signal of the logic circuit by deactivating the enable signal, and the program counter and the instruction execution are forcibly stopped.
The row control means is configured to hold the internal state at this time.
【0038】さらに、前記パイプライン動作許可信号が
供給される前記パイプライン制御手段は、前記命令格納
用キャッシュメモリのアドレスを受けるラッチ手段とデ
ータキャッシュメモリのアドレスを受けるラッチ手段と
前記プログラムカウンタのアドレス更新手段と命令コー
ドおよび命令デコーダのデコード結果から所定の制御信
号および分岐命令を生成する前記命令実行制御手段のラ
ッチ手段とにそれぞれ供給されるクロック信号をマスク
するための論理回路である。Further, the pipeline control means to which the pipeline operation permission signal is supplied includes: a latch means for receiving an address of the instruction storage cache memory; and a latch means for receiving an address of the data cache memory.
Logic circuit for masking the clock signals respectively supplied to the latch means of said instruction execution control means for generating a predetermined control signal and the branch instruction from the decode result of the instruction code and instruction decoder address updating means of said program counter It is.
【0039】さらにまた、前記第1の制御信号は、内部
回路から外部に接続されるメモリコントローラに出力す
るバスホールド信号の受付け通知信号を反転した信号か
らなる。Further, the first control signal is a signal obtained by inverting a reception notification signal of a bus hold signal outputted from an internal circuit to an externally connected memory controller.
【0040】また、前記パイプライン停止手段は、外部
から入力する前記第1の制御信号に代えて内部回路で生
成される第2の制御信号が用いられ、この第2の制御信
号は、前記内部回路で生成されるバスサイクルスタート
信号とデータストローブ信号との論理積を取る第2の論
理積回路と、この第2の論理積回路の反転出力とバスホ
ールド信号の受付け通知信号の反転信号との論理和をと
って前記第2の制御信号を出力する論理和回路とを有
し、バスホールド時に前記第2の制御信号をアクティブ
にすることによって強制的に前記パイプライン動作を停
止させ、かつこのときの内部状態を保持するように構成
する。The pipeline stopping means uses a second control signal generated by an internal circuit in place of the first control signal input from the outside, and the second control signal is A second AND circuit which takes the logical product of the bus cycle start signal and the data strobe signal generated by the circuit, and an inverted output of the second AND circuit and an inverted signal of the reception notification signal of the bus hold signal. An OR circuit for outputting the second control signal by taking a logical sum, forcibly stopping the pipeline operation by activating the second control signal during bus hold, and It is configured to hold the internal state at the time.
【0041】さらに、ライトバスサイクル時に前記第2
の制御信号をアクティブにすることによって強制的に前
記パイプライン動作を停止させるように構成する。Further, during the write bus cycle, the second
Constitute forcibly the pipeline operation by activating the control signal to stop.
【0042】[0042]
【発明の実施の形態】まず、本発明の実施の形態を図面
を参照しながら説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First, an embodiment of the present invention will be described with reference to the drawings.
【0043】本発明の第1の実施の形態のマイクロプロ
セッサを用いたシステム構成を示した図1を参照する
と、マイクロプロセッサ1aと、メインメモリ2と、マ
イクロプロセッサ1aおよびメインメモリ2の間のアド
レスおよびデータをアドレスバス5および外部データバ
ス6を介して授受を行なうための制御をするメモリコン
トローラ3と、マイクロプロセッサ1aからメモリコン
トローラ3へ送出されるバスホールド受付けを通知する
HLDAK信号とこの信号をインバータ4で反転してパ
イプライン動作停止信号pipeSTOPとしてマイク
ロプロセッサ1aへ戻す構成を備える。Referring to FIG. 1 showing a system configuration using a microprocessor according to the first embodiment of the present invention, a microprocessor 1a, a main memory 2, and an address between the microprocessor 1a and the main memory 2 are shown. Memory controller 3 for controlling transmission and reception of data and data via address bus 5 and external data bus 6, HLDAK signal for notifying reception of bus hold transmitted from microprocessor 1a to memory controller 3, and this signal A configuration is provided in which the signal is inverted by the inverter 4 and returned to the microprocessor 1a as a pipeline operation stop signal pipeSTOP.
【0044】本発明の第1の実施の形態のマイクロプロ
セッサ1aの構成を示した図2を参照すると、メモリと
してキャッシュメモリを内蔵している場合を想定してお
り、命令長32ビット固定のRISC型であり、同期式
5段パイプラインで動作する。Referring to FIG. 2 showing the configuration of the microprocessor 1a according to the first embodiment of the present invention, it is assumed that a cache memory is built in as a memory, and a RISC having an instruction length of 32 bits is fixed. And operates in a synchronous 5-stage pipeline.
【0045】このマイクロプロセッサ1aは、命令キャ
ッシュ部11、データキャッシュ部12、レジスタファ
イル部13、演算実行部14、プログラムカウンタ部1
5、分岐アドレス生成部16、バスインタフェース部1
7および制御部18を備え、命令キャッシュ部11から
出力されるミスヒット信号501が制御部18とバスイ
ンタフェース部17にそれぞれ入力される。命令キャッ
シュ部11とバスインタフェース部17とにはプログラ
ムカウンタ部15から実行命令のアドレス出力信号50
3がれぞれ供給される。The microprocessor 1a includes an instruction cache unit 11, a data cache unit 12, a register file unit 13, an operation execution unit 14, and a program counter unit 1.
5, branch address generator 16, bus interface 1
7 and a control unit 18, and a mishit signal 501 output from the instruction cache unit 11 is input to the control unit 18 and the bus interface unit 17, respectively. The instruction cache unit 11 and the bus interface unit 17 provide an address output signal 50 of the execution instruction from the program counter unit 15.
3 are supplied respectively.
【0046】レジスタファイルRF13は出力504が
分岐アドレス生成部16と演算実行部14の選択回路1
01を介してラッチ102とラッチ104にそれぞれ供
給され、レジスタファイル13の他方の出力505がラ
ッチ103に供給される。The output 504 of the register file RF13 is transmitted to the branch address generator 16 and the selector 1 of the operation execution unit 14.
01 to the latch 102 and the latch 104 , respectively, and the other output 505 of the register file 13 is supplied to the latch 103.
【0047】選択回路101の他方の入力端はバス50
7によって命令キャッシュ部11と制御部18とから信
号が供給され、バス506によってバスインタフェース
部17から信号を入力する。The other input terminal of the selection circuit 101 is connected to the bus 50
7, a signal is supplied from the instruction cache unit 11 and the control unit 18, and a signal is input from the bus interface unit 17 via the bus 506.
【0048】分岐アドレス生成部16の他方の入力端に
はバス507から分岐信号が供給される。その出力はプ
ログラムカウンタ部15に、プログラムカウンタ部15
の出力が分岐アドレス生成器16に供給される。A branch signal is supplied from the bus 507 to the other input terminal of the branch address generator 16. The output is sent to the program counter section 15.
Is supplied to the branch address generator 16.
【0049】ラッチ102および103の出力はALU
105にそれぞれ供給され、ALU105の出力508
はラッチ106とデータキャッシュ部12とバスインタ
フェース部17とにそれぞれ供給される。ラッチ104
の出力509はバスを介して選択回路107の一方の入
力端とデータキャッシュ部12とバスインタフェース部
17に供給され、選択回路107の他方の入力端にはラ
ッチ106の出力が供給される。The outputs of latches 102 and 103 are ALU
105, and the output 508 of the ALU 105
Are supplied to the latch 106, the data cache unit 12, and the bus interface unit 17, respectively. Latch 104
The output 509 is supplied to one input terminal and a data cache unit 12 and bus interface unit 17 of the selection circuit 107 via the bus, the output of the latch 106 is supplied to the other input terminal of the selection circuit 107 .
【0050】選択回路107の出力はラッチ108に供
給され、その出力はレジスタファイル13の入力端に供
給される。The output of the selection circuit 107 is supplied to the latch 108, and the output is supplied to the input terminal of the register file 13.
【0051】命令キャッシュ部11のミスヒット信号5
01はバスインタフェース部17と制御部18にそれぞ
れ供給される。The mishit signal 5 of the instruction cache unit 11
01 is supplied to the bus interface unit 17 and the control unit 18, respectively.
【0052】命令キャッシュ部の構成を示した図3を参
照すると、命令キャッシュ部11は、4Kバイトのダイ
レクトマップ、すなわちアドレスの下位ビットによって
一意にエントリーが選択される構成である。プログラム
カウンタ部15で生成される命令キャッシュアドレスI
CAddr503をパイプライン動作許可信号pipe
OKがハイレベルのときにクロック信号CLKを出力す
るAND119の出力信号に応答してラッチ111で受
け、アドレスの下位12ビット(11〜0)をデコーダ
112でデコードしてひとつのエントリーを選択し、保
持しているタグ部113とデータ部114の内容を読み
出す。Referring to FIG. 3 showing the configuration of the instruction cache unit, the instruction cache unit 11 has a 4K byte direct map, that is, a configuration in which an entry is uniquely selected by the lower bits of the address. Instruction cache address I generated by program counter unit 15
The CAddr 503 is set to a pipeline operation enable signal pipe.
In response to the output signal of AND 119 that outputs the clock signal CLK when OK is at the high level, the latch 111 receives it, and the lower 12 bits (11 to 0) of the address are decoded by the decoder 112 to select one entry. The contents of the tag unit 113 and the data unit 114 held are read.
【0053】タグ部113は入力バッファ116を介し
て命令キャッシュ部11の内容を書き換える時のアドレ
スの上位20ビット(31〜12)を保持しており、こ
のタグ部113から出力バッファ117を介して読み出
した上位20ビットとラッチ111の出力であるフェッ
チアドレスの上位20ビットをコンパレータ115で比
較することによって、エントリーの内容が要求したアド
レスにヒットしたかミスヒットしたかを判定することが
できる。The tag unit 113 holds the upper 20 bits (31 to 12) of the address used when rewriting the contents of the instruction cache unit 11 via the input buffer 116, and from the tag unit 113 via the output buffer 117. By comparing the read high-order 20 bits with the high-order 20 bits of the fetch address output from the latch 111 by the comparator 115, it is possible to determine whether the contents of the entry hit or missed the requested address.
【0054】比較結果が不一致だった場合にはコンパレ
ータはハイレベルを出力し、ミスヒット信号ICMis
s501として制御部18へ通知する。ヒットした場合
にはデータ部114から出力バッファ118を介して読
み出したデータを命令コード507として出力する。If the comparison result is a mismatch, the comparator outputs a high level, and the mishit signal ICMis
The control unit 18 is notified as s501. When a hit occurs, data read from the data section 114 via the output buffer 118 is output as an instruction code 507.
【0055】データキャッシュ部12の構成を示した図
4を参照すると、データキャッシュ部12は、図3に示
した命令キャッシュ部11と同じ構成でありラッチ11
1に入力する信号が命令キャッシュアドレスICAdd
rからデータキャシュアドレスDCAaddrに変った
だけであり、4Kバイトのダイレクトマップであること
も同様である。Referring to FIG. 4 showing the configuration of data cache unit 12, data cache unit 12 has the same configuration as instruction cache unit 11 shown in FIG.
1 is the instruction cache address ICAdd
r only changes to a data cache address DCAaddr, and the same applies to a 4K byte direct map.
【0056】演算実行部14で生成したデータアドレス
DCAddrをバス508を介してラッチ111で受
け、下位12ビット(11〜0)をデコーダ112でデ
コードすることによってひとつのエントリーを選択し、
保持しているタグ部113とデータ部114の内容を読
み出す。The data address DCAddr generated by the operation execution unit 14 is received by the latch 111 via the bus 508, and the lower 12 bits (11 to 0) are decoded by the decoder 112 to select one entry.
The contents of the tag unit 113 and the data unit 114 held are read.
【0057】タグ部113から出力バッファ117を介
して出力される下位12ビットと、データアドレスの上
位20ビットをコンパレータ115で比較し、比較結果
が不一致だった場合にはコンパレータ115はハイレベ
ルを出力し、ミスヒット信号DCMiss510として
制御部18およびバスインタフェース部17へ通知す
る。The lower 12 bits output from the tag unit 113 via the output buffer 117 are compared with the upper 20 bits of the data address by the comparator 115. If the comparison results do not match, the comparator 115 outputs a high level. Then, the control unit 18 and the bus interface unit 17 are notified as the mishit signal DCMiss 510.
【0058】レジスタファイル部RF13は、リード2
ポート(信号504および505)、ライト1ポート
(信号511)であり、読み出しは2ポート同時に行う
ことができる。The register file section RF13 reads the
Ports (signals 504 and 505) and one write port (signal 511) can be read simultaneously from two ports.
【0059】演算実行部14は、レジスタファイル部R
F13からデータ504および505を受け取り、算術
論理演算器(ALU)105を使用することによって実
際の計算を行う。The operation execution unit 14 has a register file unit R
The data 504 and 505 are received from F13 and the actual calculation is performed by using the arithmetic and logic unit (ALU) 105.
【0060】プログラムカウンタ部15は、その構成を
示した図5を参照すると、命令フェッチアドレスの生
成、および現在実行中の命令のアドレスを保持してい
る。フェッチアドレスは、通常サイクル毎に信号528
が加算器128によって値を+4され、通常時の選択信
号523に応答して選択回路127で選択されその出力
527を次のフェッチアドレスとする。分岐命令で分岐
する場合には分岐アドレス生成部16で生成されるアド
レス524をフェッチアドレスとして分岐TAKENの
選択信号に応答して選択し、例外で固定的なアドレスへ
分岐する場合には例外アドレス525を選択信号522
に応答して選択しフェッチアドレスとすることによっ
て、プログラムの実行を制御している。Referring to FIG. 5 showing the configuration, the program counter section 15 generates an instruction fetch address and holds the address of the instruction currently being executed. The fetch address is usually signal 528 every cycle.
Is incremented by +4 by the adder 128, is selected by the selection circuit 127 in response to the selection signal 523 in the normal state, and the output 527 is used as the next fetch address. When the branch by the branch instruction is selected in response to the selection signal of the branch TAKEN address 52 4 generated by the branch address generation unit 16 as a fetch address, exception address when branching to fixed addresses exception 525 to select signal 522
The execution of the program is controlled by selecting a fetch address in response to the fetch address.
【0061】これらの選択回路127で選択されたアド
レスはパイプライン動作確認信号pipeOKでクロッ
ク信号の出力を制御するAND回路121〜123の出
力に同期してレジスタ124〜126に順次転送され、
それぞれの出力アドレスが選択回路129で選択されて
アドレス信号503として各パイプラインステージへ転
送される。The addresses selected by the selection circuit 127 are sequentially transferred to the registers 124 to 126 in synchronization with the outputs of the AND circuits 121 to 123 for controlling the output of the clock signal by the pipeline operation confirmation signal pipeOK.
Each output address is selected by the selection circuit 129 and transferred to each pipeline stage as an address signal 503.
【0062】分岐アドレス生成部16は、その構成を示
した図6を参照すると、現在のプログラムカウンタの値
527と命令コード中で指定されるオフセット値541
を加算器131によって加算し、分岐先アドレス542
を生成する。また、汎用レジスタの値がオール“0”で
あるかを比較器133で判別し、その出力546と分岐
命令beqz547とをAND回路134で一致を取
り、また負の数であるかをデータ545の最上位ビット
から判別することによって、分岐命令bltz548の
条件とAND回路135で一致を取り、それぞれ一致し
た場合にはOR回路136を介して分岐することを表す
TAKEN信号521によってプログラムカウンタ部へ
通知する。Referring to FIG. 6 showing the configuration, branch address generating section 16 includes current program counter value 527 and offset value 541 specified in the instruction code.
Is added by the adder 131, and the branch destination address 542 is added.
Generate The comparator 133 determines whether or not the value of the general-purpose register is all “0”. The output 546 and the branch instruction beqz547 are matched by the AND circuit 134, and whether the data 545 is a negative number is determined. By judging from the most significant bit, the condition of the branch instruction bltz 548 is matched with the AND circuit 135, and when they match each other, the result is notified to the program counter unit by the TAKEN signal 521 indicating that the branch is performed via the OR circuit 136. .
【0063】バスインタフェース部17は、その構成を
示す図7を参照すると、外部との間で信号を授受するた
めの部分であり、特に外部アドレスバス、外部データバ
ス、および制御信号によって外部メインメモリとデータ
のやり取りを行う。Referring to FIG. 7 showing the structure, bus interface section 17 is a section for transmitting and receiving signals to and from the outside. In particular, an external address bus, an external data bus, and an external main memory To exchange data with
【0064】命令キャッシュ部11およびデータキャッ
シュ部12でミスヒットが発生した場合には、命令キャ
ッシュミスの場合はプログラムカウンタ15から出力さ
れるフェッチアドレス527、データキャッシュミスの
場合はデータアドレスを受け取り、データキャッシュミ
ス信号510に応答して選択回路147はデータアドレ
スを選択してリードアドレスバッファ148へ出力し、
出力バッファ149を介して外部メモリへ出力する。こ
のとき、リードアドレスバッファ148は、シーケンサ
141から出力されるキャッシュミス時のストローブ信
号553とDEBUGモード信号とをOR回路144で
比較しDEBUGモード信号がロウレベルでキャッシュ
ミス時のストローブ信号553がハイレベルであればA
ND回路145から出力されるクロック信号557に同
期して、外部メインメモリへアクセスしてデータを読み
出した後、各キャッシュメモリへデータを渡す。上述
の、シーケンサ141から出力されるキャッシュミス時
のストローブ信号553は、キャッシュミス時に外部ア
クセスが必要となり、そのためのアドレスをリードアド
レスバッファ148にラッチするための信号であり、D
EBUGモード信号は、キャッシュミス時以外にもリー
ドアドレスバッファ148へアドレスをラッチさせるた
めの目的でOR回路144へ入力されている。 When a mishit occurs in the instruction cache unit 11 and the data cache unit 12, the fetch address 527 output from the program counter 15 is received in the case of an instruction cache miss, and the data address is received in the case of a data cache miss. In response to data cache miss signal 510, selection circuit 147 selects a data address and outputs it to read address buffer 148,
The data is output to the external memory via the output buffer 149. At this time, the read address buffer 148 compares the strobe signal 553 at the time of cache miss output from the sequencer 141 with the DEBUG mode signal by the OR circuit 144, and when the DEBUG mode signal is low level, the strobe at the time of cache miss. If the signal 553 is at a high level, A
In synchronization with the clock signal 557 output from the ND circuit 145, an external main memory is accessed to read data, and then the data is passed to each cache memory. Above
Of a cache miss output from the sequencer 141
The strobe signal 553 of the external
Access is required, and the address for that
Is a signal for latching in the
The EBUG mode signal is not only used for cache misses,
Address buffer 148 to latch the address.
For the purpose of this, it is inputted to the OR circuit 144.
【0065】外部メモリから読み出されたデータは、制
御信号データレディー信号に応答してシーケンサ141
から供給されるReady信号551をハイレベルにし
てAND回路142からクロック信号554をリードデ
ータバッファ155に供給し、外部メモリから読み出し
たデータをリードデータバッファ155にラッチし出力
バッファ157を介してデータキャッシュ部12へ、入
力バッファ156を介して命令キャッシュ部11へそれ
ぞれ供給する。The data read from the external memory is transmitted to the sequencer 141 in response to the control signal data ready signal.
Signal 551 supplied from the external circuit 142 to a high level, the clock signal 554 is supplied from the AND circuit 142 to the read data buffer 155, the data read from the external memory is latched in the read data buffer 155, and the data cache is output via the output buffer 157. To the instruction cache unit 11 via the input buffer 156.
【0066】またライトバッファ150を備え、ストア
命令で外部メインメモリへのライトがある場合にはデー
タアドレスをライトアドレスバッファに出力し、シーケ
ンサ141から出力されるライト信号552およびクロ
ック信号の一致をとるAND回路出力555に同期して
アドレスおよびデータを保持し、出力バッファ153か
ら、パイプライン動作に影響を与えずに独立して外部メ
インメモリへの書き込みを行う。A write buffer 150 is provided, and when there is a write to the external main memory by a store instruction, the data address is output to the write address buffer, and the write signal 552 output from the sequencer 141 matches the clock signal. The address and data are held in synchronization with the AND circuit output 555, and the data is independently written from the output buffer 153 to the external main memory without affecting the pipeline operation.
【0067】さらに本発明の目的であるデバッグを行う
場合には、DEBUGモードをハイレベルにすることに
よってAND回路出力のクロック信号557をリードア
ドレスバッファ148に供給する。データキャッシュミ
スが発生していない場合にはデータキャッシュミス信号
510の反転信号556がハイレベルとなり、選択回路
147がフェッチアドレスを選択する。したがって、毎
サイクルフェッチアドレスをリードアドレスバッファ1
48にラッチさせ、命令フェッチアドレスを常時外部ア
ドレスバスへ出力することができ、外部で命令トレース
を行うことを可能としている。 [0067] When performing the debugging is an object of the present invention further provides a clock signal 557 of the AND circuit output by the DEBUG mode to the high level to the read address buffer 148. Data cache
Data cache miss signal if no error occurs
The inverted signal 556 of 510 becomes high level, and the selection circuit
147 selects a fetch address. Therefore, every
Read cycle fetch address to read address buffer 1
48, and the instruction fetch address is always
Can be output to the dress bus, and instruction tracing externally
It is possible to do.
【0068】制御部18は、その構成を示した図8を参
照すると、命令キャッシュミス信号501及びデータキ
ャッシュミス信号510を入力し、いずれかがアクティ
ブならロウレベルを出力する組み合せ回路161と、そ
の出力561およびpipeSTOP信号101の反転
信号の論理積を取るAND回路163と、その出力でp
ipeOK信号562のクロック信号をマスクするAN
D回路164と、命令コードをデコードするデコーダ1
66と、デコード結果の信号から各種の命令を生成する
ラッチ群165とを有する。キャッシュミスが発生した
場合は、組み合わせ回路161の出力がロウレベルとな
り、AND回路163の出力であるpipeOK信号5
62は一義的にロウレベルとなりパイプラインを停止さ
せる。また、外部からのpipeSTOP信号がアクテ
ィブになりロウレベルになったときも、同様にAND回
路163の出力であるpipeOK信号562は一義的
にロウレベルとなりパイプラインを停止させる。ラッチ
群165は、AND回路164の出力クロック信号56
3に同期して命令コード564を読み込み順次次段へ転
送して転送レジスタNOを出力するラッチ168〜17
0と、デコーダ166の出力をクロック信号563に同
期して読み込み、分岐命令beqz、bltz、JUM
p、ALU制御信号を生成するラッチ171と、ラッチ
171の出力を読み込み信号Store、DCvali
dを生成するラッチ172と、ラッチ172の出力を読
み込み信号WBvalidを生成するラッチ173とか
らなり、命令beqzおよびbltzから条件分岐命令
をNOR167で生成する構成からなる。Referring to FIG. 8 showing the configuration, control unit 18 includes instruction cache miss signal 501 and data key.
Input the cache miss signal 510, and
A combinational circuit 161 that outputs a low level if the signal is low, an AND circuit 163 that takes the logical product of its output 561 and the inverted signal of the pipeSTOP signal 101,
AN that masks the clock signal of the IPOK signal 562
D circuit 164 and decoder 1 for decoding instruction codes
66, to have a latch group 165 to generate the various commands from the signal of the decoding result. A cache miss has occurred
In this case, the output of the combinational circuit 161 becomes low level.
The pipeOK signal 5 which is the output of the AND circuit 163
62 is uniquely low level and the pipeline is stopped.
Let Also, an external pipeSTOP signal is activated.
And when it goes low,
The pipeOK signal 562, which is the output of the path 163, is unique.
To a low level to stop the pipeline. The latch group 165 is connected to the output clock signal 56 of the AND circuit 164.
Latches 168 to 17 for reading instruction code 564 in synchronization with 3 and sequentially transferring the instruction code to the next stage and outputting a transfer register number
0 and the output of the decoder 166 are read in synchronization with the clock signal 563, and the branch instructions beqz, bltz, JUM
p, a latch 171 for generating an ALU control signal, and an output of the latch 171 are read, and a signal Store, DCvali
A latch 172 for generating d and a latch 173 for reading the output of the latch 172 and generating a signal WBvalid are provided, and a NOR 167 generates a conditional branch instruction from the instructions beqz and bltz.
【0069】add(加算)命令の構成を示した図9を
参照すると、命令コード564はデコードが容易なよう
に、各フィールドは命令の種類を表す命令コード1と命
令コード2、加算のソース1の値を読み出す汎用レジス
タを指定するためのソース1レジスタNo、加算のソー
ス2の値を読み出す汎用レジスタを指定するためのソー
ス2レジスタNo、結果を格納する汎用レジスタを指定
するための格納レジスタNoに分類できる。Referring to FIG. 9 showing the structure of the add (addition) instruction, each field has an instruction code 1 and an instruction code 2 representing the type of the instruction, and an addition source 1 so that the instruction code 564 can be easily decoded. Source 1 register No. for specifying the general-purpose register for reading the value of the register, Source 2 register No. for specifying the general-purpose register for reading the value of the addition source 2, and storage register No. for specifying the general-purpose register for storing the result Can be classified.
【0070】まずソースの値を読み出すためにソース1
レジスタNoとソース2レジスタNoをレジスタファイ
ル部RF13へ出力する。また命令デコーダで命令コー
ド1と命令コード2をデコードし、命令の種類を判別す
る。add命令であることを判別すると、ALUを加算
器として使用するためにALU制御信号を演算実行部1
4へ出力する。First, in order to read the value of the source, the source 1
The register number and the source 2 register number are output to the register file section RF13. The instruction decoder decodes the instruction code 1 and the instruction code 2 to determine the type of the instruction. If it is determined that the instruction is an add instruction, the ALU control signal is sent to the arithmetic execution unit 1 to use the ALU as an adder.
Output to 4.
【0071】加算結果を格納する必要があるため、WB
ステージでレジスタファイル13への書き込みがあるこ
とを示すWBvalid信号をWBステージで出力し、
レジスタファイル13への書き込み制御を行う。加算結
果を格納するための転送レジスタNoはWBステージま
で保持し、レジスタファイル部13へ出力する。Since it is necessary to store the addition result, WB
A WBvalid signal is output at the WB stage indicating that there is a write to the register file 13 at the stage,
Write control to the register file 13 is performed. The transfer register number for storing the addition result is held up to the WB stage and output to the register file unit 13.
【0072】またこれらの動作を説明するためのタイミ
ングチャートを示した図10を併せて参照すると、命令
キャッシュ部11およびデータキャッシュ部12のミス
ヒット信号からパイプラインが進んでも良いことを示す
pipeOK信号562を生成する。Referring also to FIG. 10 showing a timing chart for explaining these operations, a pipe OK signal indicating that the pipeline may proceed from the mishit signal of the instruction cache unit 11 and the data cache unit 12 562 is generated.
【0073】各パイプラインはpipeOK信号562
がハイレベルの場合のみ同期して次のステージへ進むこ
とができる。本発明の構成要素であるパイプラインを停
止させるための信号pipeSTOPは外部端子より入
力され、組み合せ回路161の出力するキャシュミス信
号561がハイレベルになるタイミングでロウレベルの
pipeOK信号を出力することによって強制的にパイ
プラインをストップすることができる。Each pipeline has a pipeOK signal 562
Can be synchronized and proceed to the next stage only when is at the high level. A signal pipeSTOP for stopping the pipeline, which is a component of the present invention, is input from an external terminal, and is forced by outputting a low-level pipeOK signal at a timing when the cache miss signal 561 output from the combination circuit 161 becomes high. The pipeline can be stopped effectively.
【0074】パイプラインはIF,RF,EX,DC,
WBの5つのステージがあり、図11に示すキャッシュ
ヒットからキャッシュミス時のパイプライン動作のタイ
ミングチャートのように、通常は1ステージ1サイクル
で実行するため、実質的に1命令1サイクルとなる。そ
れぞれのステージの詳細と各部の動作は次の通りであ
る。The pipelines are IF, RF, EX, DC,
There are five stages of WB, and as shown in the timing chart of the pipeline operation from the cache hit to the cache miss shown in FIG. 11, the execution is normally performed in one stage and one cycle, and therefore, substantially one instruction and one cycle. The details of each stage and the operation of each section are as follows.
【0075】IFステージでは、プログラムカウンタ部
15で生成するフェッチアドレス信号503で命令キャ
ッシュ部11をアクセスし、命令コードを得る。命令キ
ャッシュ部11でミスヒットだった場合には、バスイン
タフェース部17を通して外部メインメモリにアクセス
し、命令コードを入力する。In the IF stage, the instruction cache unit 11 is accessed with the fetch address signal 503 generated by the program counter unit 15 to obtain an instruction code. If there is a mishit in the instruction cache unit 11, the external main memory is accessed through the bus interface unit 17 and an instruction code is input.
【0076】RFステージでは、使用する汎用レジスタ
の値をレジスタファイルRF13から読み出す。また、
分岐命令の場合には分岐アドレス生成部16によって分
岐先アドレスを生成するとともに分岐条件が成立した場
合はフェッチアドレスを分岐先アドレスへ切り替える。At the RF stage, the value of the general-purpose register to be used is read from the register file RF13. Also,
In the case of a branch instruction, a branch destination address is generated by the branch address generation unit 16, and if a branch condition is satisfied, the fetch address is switched to the branch destination address.
【0077】EXステージでは、RFステージで読み出
した汎用レジスタの値や命令コード中で指定されるイミ
ディエート値を入力として演算実行部14で演算を実行
する。ロード/ストア命令の場合、この計算した値がデ
ータアドレスとなる。In the EX stage, the operation execution unit 14 executes an operation with the value of the general-purpose register read in the RF stage or the immediate value specified in the instruction code as an input. In the case of a load / store instruction, the calculated value becomes a data address.
【0078】DCステージでは、ロード命令やストア命
令時のデータキャッシュ部12へのアクセスを行う。ロ
ード/ストア命令以外の命令の場合は、このステージで
は何も実行しない。ロード/ストア命令の場合は、EX
ステージで生成したデータアドレスによってデータキャ
ッシュ部12へアクセスし、ヒットした場合にはデータ
を得る。ミスヒットした場合にはバスインタフェース部
17を介して外部メインメモリへアクセスする。In the DC stage, access is made to the data cache unit 12 at the time of a load instruction or a store instruction. For instructions other than load / store instructions, nothing is executed at this stage. EX for load / store instructions
The data cache unit 12 is accessed by the data address generated in the stage, and if a hit occurs, data is obtained. When a miss occurs, the external main memory is accessed via the bus interface unit 17.
【0079】WBステージでは、レジスタファイル13
への書き込みを行う。In the WB stage, the register file 13
Write to.
【0080】命令キャッシュミスやデータキャッシュミ
スが発生した場合には、制御部18のpipeOK信号
がロウレベルとなり、すべてのパイプラインステージが
停止する。When an instruction cache miss or a data cache miss occurs, the pipeOK signal of the control unit 18 goes low, and all the pipeline stages are stopped.
【0081】次に本発明の第1の実施の形態のマイクロ
プロセッサ1aの動作をタイミングチャートを参照しな
がら説明する。バスホールド要求等で、外部バスへアド
レスを出力できない場合のタイミングチャートを示した
図12を参照すると、バスホールド要求は、外部システ
ムがアドレスバスおよびデータバスを使用してDMA転
送を行う場合等に発生する。したがって、バスホールド
期間中はマイクロプロセッサ1aはアドレスバス、およ
びデータバスを駆動することはできない。Next, the operation of the microprocessor 1a according to the first embodiment of the present invention will be described with reference to a timing chart. Referring to FIG. 12 showing a timing chart when an address cannot be output to an external bus due to a bus hold request or the like, a bus hold request is generated when an external system performs a DMA transfer using an address bus and a data bus. Occur. Therefore, during the bus hold period, the microprocessor 1a cannot drive the address bus and the data bus.
【0082】バスホールド要求の通知は、外部システム
からHLDREQ信号によって行われる。マイクロプロ
セッサ1aのバスホールド要求の受け付けは、HLDA
K信号をアクティブにすることによって行う。したがっ
て、図1に示すシステム構成図のように、このHLDA
K信号をインバータ4で反転させpipeSTOP信号
として入力する。すなわち、HLDAK信号はロウアク
ティブであり、pipeSTOP信号はハイアクティブ
である。したがって、バスホールド時にpipeOK信
号がマスクされることとなり、パイプラインを止めるこ
とが可能となる。The notification of the bus hold request is made by the HLDREQ signal from the external system. The reception of the bus hold request of the microprocessor 1a is performed by HLDA
This is done by activating the K signal. Therefore, as shown in the system configuration diagram of FIG.
The K signal is inverted by the inverter 4 and input as a pipeSTOP signal. That is, the HLDAK signal is low active and the pipeSTOP signal is high active. Therefore, the pipe OK signal is masked during the bus hold, and the pipeline can be stopped.
【0083】すべてのパイプラインステージがストップ
するため、例えば図12では、pipeSTOP信号が
3クロックサイクルハイレベルとなることから4クロッ
クサイクル目でinst4が実行されるので、結局各命
令inst1〜5はそれぞれWB、DC、EX、RF、
IFの各ステージが3クロックサイクルの間内部状態が
保持されることになる。[0083] Since all the pipeline stages are stopped, FIG. 1 2 For example, since inst4 in 4 clock cycle because the pipeSTOP signal is three clock cycles high level is performed, after all the instructions inst1~5 is WB, DC, EX, RF,
The internal state of each stage of the IF is maintained for three clock cycles.
【0084】また、ストア命令で外部メインメモリへの
データライトが発生した場合のタイミングチャートを示
した図13を参照すると、外部メインメモリへのライト
バスサイクルは、バスインタフェース部17から出力さ
れる制御信号によって外部へ通知され、外部でデータを
受け取ることができたならバスサイクルを終了する。Referring to FIG. 13 showing a timing chart when a data write to the external main memory is generated by a store instruction, a write bus cycle to the external main memory is controlled by a control output from the bus interface unit 17. The bus cycle is terminated when a signal is notified to the outside and the data can be received outside.
【0085】したがって、マイクロプロセッサ1aがラ
イトバスサイクルを起動してから、データストローブが
終了するまでのライトバスサイクル期間中のみ、pip
eSTOP信号をアクティブにすることにより、パイプ
ラインを止めることが可能である。このとき、アドレス
バスには命令inst4に代ってライトアドレスが出力
され、データバスにはデータストローブ信号がロウレベ
ルの間ライトデータが出力されている。Therefore, only during the write bus cycle period from the start of the write bus cycle by the microprocessor 1a to the end of the data strobe, pip
The pipeline can be stopped by activating the eSTOP signal. At this time, the write address is output to the address bus instead of the instruction inst4, and the write data is output to the data bus while the data strobe signal is at the low level.
【0086】次に、本発明の第2の実施例のマイクロプ
ロセッサ1b構成図を示した図14を参照すると、第1
の実施の形態で説明したpipeSTOP信号を、バス
インタフェース部内で生成している点以外は、第1の実
施の形態と同様であり、対応する構成要素には同一の符
号を付して構成の説明は省略する。Next, referring to FIG. 14, which shows a configuration diagram of a microprocessor 1b according to a second embodiment of the present invention,
The configuration is the same as that of the first embodiment except that the pipeSTOP signal described in the second embodiment is generated in the bus interface unit. Is omitted.
【0087】バスインタフェース部の構成を示した図1
5を参照すると、第1の実施の形態で用いた図6のバス
インタフェース部とはシーケンスサ175にpipeS
TOP信号生成回路が追加されたことが異なる。それ以
外の構成要素は同一であるので同一の符号を付して構成
の説明は省略する。FIG. 1 showing the configuration of the bus interface unit
Referring to FIG. 5, the bus interface unit of FIG. 6 used in the first embodiment differs from the bus interface unit of FIG.
The difference is that a TOP signal generation circuit is added. Since the other components are the same, the same reference numerals are given and the description of the configuration is omitted.
【0088】このバスインタフェース部17では、シー
ケンサ175の内部にバスホールド要求を受け付けてH
LDAK信号をアクティブにすると同時に、このHLD
AK信号を反転させて生成したpipeSTOP信号を
アクティブにする。さらにライトバスサイクル期間中に
もバスサイクルスタート信号とデータストローブ信号の
論理積を取りその反転信号と上述のpipeSTOP信
号との論理和を取って、pipeSTOP信号をアクテ
ィブにすることにより、パイプラインを停止させること
が可能となる。The bus interface unit 17 receives a bus hold request inside the sequencer 175 and
When the LDAK signal is activated, the HLD
The pipeSTOP signal generated by inverting the AK signal is activated. Further, during the write bus cycle period, the pipeline is stopped by taking the logical product of the bus cycle start signal and the data strobe signal, taking the logical sum of the inverted signal and the pipeSTOP signal, and activating the pipeSTOP signal. It is possible to do.
【0089】上述した第1および第2の実施の形態にお
いては、キャッシュメモリを内蔵した場合のマイクロプ
ロセッサを例として説明したが、命令格納用メモリを内
蔵したシングルチップマイコンに応用することも可能で
あることは明らかである。In the first and second embodiments described above, a microprocessor having a built-in cache memory has been described as an example. However, the present invention can be applied to a single-chip microcomputer having a built-in memory for storing instructions. Clearly there is.
【0090】[0090]
【発明の効果】以上説明したように、本発明のマイクロ
プロセッサは、メモリアクセスまたはバスホールド要求
が無く外部バスを使用していない場合には内部回路情報
を外部バスに出力するバス選択手段と、外部バスを使用
している場合にはパイプライン動作を停止させて内部回
路情報の出力を保留するパイプライン停止手段とを用い
て、内蔵する命令格納用メモリから取り出した命令を実
行する動作状態であっても命令のトレースを外部から行
なうことが出来るように構成したので、従来の技術と比
較して次のような効果がある。 (1)内蔵メモリを使用した状態で完全な命令トレース
を行うことができる。内蔵メモリがキャッシュメモリの
場合では、使用禁止にした場合に比べ、命令キャッシュ
ミスヒット時の外部メインメモリアクセスに5サイクル
かかると仮定すると、1命令で4サイクルの短縮とな
り、命令トレース時間全体では約80%短縮することが
できる。 (2)データライトが発生し外部バスへ内部情報を出力
できない場合には、内部パイプラインを停止させ、内部
情報を保持しておくことができる。 (3)バスホールド要求によって外部バスへ内部情報を
出力できない場合には、内部パイプラインを停止させ、
内部状態を保持しておくことができる。 (4)分岐の場合のみならず、すべての命令において内
部情報を出力することにより、どのような命令シーケン
スでも命令トレースを行うことができる。As described above, the microprocessor of the present invention comprises a bus selection means for outputting internal circuit information to an external bus when there is no memory access or bus hold request and no external bus is used; If an external bus is used, the pipeline operation is stopped and the output of the internal circuit information is suspended. Even if there is, the configuration is such that instruction tracing can be performed from the outside, so that the following effects are obtained as compared with the conventional technology. (1) Complete instruction tracing can be performed while using the built-in memory. If the internal memory is a cache memory, assuming that it takes 5 cycles to access the external main memory at the time of an instruction cache miss, as compared to the case where the use is prohibited, one instruction can be reduced by 4 cycles, and the entire instruction trace time is about It can be reduced by 80%. (2) When data write occurs and internal information cannot be output to the external bus, the internal pipeline can be stopped and the internal information can be held. (3) If the internal information cannot be output to the external bus due to the bus hold request, the internal pipeline is stopped,
The internal state can be kept. (4) By outputting internal information not only in the case of a branch but also in all instructions, instruction tracing can be performed in any instruction sequence.
【0091】また、キャッシュメモリを内蔵した場合だ
けでなく、命令格納用メモリを内蔵したシングルチップ
マイコンに応用することも出来る。The present invention can be applied not only to a case where a cache memory is built-in, but also to a single-chip microcomputer having a built-in instruction storage memory.
【図1】本発明における実施の形態のシステム構成を示
す図である。FIG. 1 is a diagram showing a system configuration according to an embodiment of the present invention.
【図2】本発明のマイクロプロセッサの第1の実施の形
態を示す構成図である。FIG. 2 is a configuration diagram showing a first embodiment of a microprocessor of the present invention.
【図3】命令キャッシュ部の構成図である。FIG. 3 is a configuration diagram of an instruction cache unit.
【図4】データキャッシュ部の構成図である。FIG. 4 is a configuration diagram of a data cache unit.
【図5】プログラムカウンタ部の構成図である。FIG. 5 is a configuration diagram of a program counter unit.
【図6】分岐アドレス生成部の構成図である。FIG. 6 is a configuration diagram of a branch address generation unit.
【図7】バスインタフェース部の構成図である。FIG. 7 is a configuration diagram of a bus interface unit.
【図8】制御部の構成図である。FIG. 8 is a configuration diagram of a control unit.
【図9】add命令の命令コード例を示す図である。FIG. 9 is a diagram illustrating an example of an instruction code of an add instruction.
【図10】pipeOK信号を説明するためのタイミン
グチャートである。FIG. 10 is a timing chart for explaining a pipeOK signal.
【図11】キャッシュヒット→ミス時のパイプラインが
詰まった状態のタイミングチャートである。FIG. 11 is a timing chart showing a state where the pipeline is clogged when a cache hit → miss occurs.
【図12】バスホールド時のタイミングタイミングチャ
ートである。FIG. 12 is a timing chart at the time of bus hold.
【図13】ライトバスサイクル時のタイミングタイミン
グチャートである。FIG. 13 is a timing chart of a write bus cycle.
【図14】本発明のマイクロプロセッサの第2の実施の
形態を示す構成図である。FIG. 14 is a configuration diagram showing a second embodiment of the microprocessor of the present invention.
【図15】バスインタフェース部の構成図である。FIG. 15 is a configuration diagram of a bus interface unit.
【図16】従来のマイクロプロセッサの構成図である。FIG. 16 is a configuration diagram of a conventional microprocessor.
【図17】図16のマイクロプロセッサのタイミングチ
ャートである。FIG. 17 is a timing chart of the microprocessor of FIG. 16;
【図18】従来のマイクロプロセッサの他の構成図であ
る。FIG. 18 is another configuration diagram of a conventional microprocessor.
【図19】図18のマイクロプロセッサのタイミングチ
ャートである。FIG. 19 is a timing chart of the microprocessor of FIG. 18;
【図20】図18のマイクロプロセッサのライトバスサ
イクル時のタイミングチャートである。20 is a timing chart of the microprocessor of FIG. 18 in a write bus cycle.
【図21】図18のマイクロプロセッサのバスホールド
時のタイミングチャートである。21 is a timing chart at the time of bus hold of the microprocessor of FIG. 18;
【図22】図18のマイクロプロセッサの命令列の一例
を示す図である。FIG. 22 is a diagram showing an example of an instruction sequence of the microprocessor of FIG. 18;
1 マイクロプロセッサ 2 メモリコントローラ 3 メインメモリ 4,146 インバータ 5 外部アドレスバス 6 外部データバス 11,182 命令キャッシュ部 12 データキャッシュ部 13 レジスタファイル部 14,185 演算実行部 15 プログラムカウンタ部 16 分岐アドレス生成部 17,181 バスインタフェース部 18 制御部 19〜22,186〜189 端子 101,107,127,129,147 選択回路 102〜104,106,108,111,168〜1
73 ラッチ 111 ALU 112,166 デコーダ 113 タグ部 114 データ部 115 比較器 116,156,157 入力バッファ 117,143,149,153,154 出力バッ
ファ 118 入出力バッファ 119,121〜123,134,135,142,1
43,145,163,164 AND回路 124〜125 レジスタ 128,131,133 加算器 136,144,167,176,177 OR回路 141,175 シーケンサ 148 リードアドレスバッファ 150 ライトバッファ 151 ライトアドレスバッファ 152 ライトデータバッファ 161 組み合せ回路 165 ラッチ群 183 命令プリフェッチ部 184 命令デコーダ・アドレス計算部DESCRIPTION OF SYMBOLS 1 Microprocessor 2 Memory controller 3 Main memory 4,146 Inverter 5 External address bus 6 External data bus 11,182 Instruction cache part 12 Data cache part 13 Register file part 14,185 Operation execution part 15 Program counter part 16 Branch address generation part 17, 181 bus interface unit 18 control unit 19 to 22, 186 to 189 terminal 101, 107, 127, 129, 147 selection circuit 102 to 104, 106, 108, 111, 168 to 1
73 Latch 111 ALU 112,166 Decoder 113 Tag section 114 Data section 115 Comparator 116,156,157 Input buffer 117,143,149,153,154 Output buffer 118 Input / output buffer 119,121-123,134,135,142 , 1
43, 145, 163, 164 AND circuit 124-125 Register 128, 131, 133 Adder 136, 144, 167, 176, 177 OR circuit 141, 175 Sequencer 148 Read address buffer 150 Write buffer 151 Write address buffer 152 Write data buffer 161 Combination circuit 165 Latch group 183 Instruction prefetch unit 184 Instruction decoder / address calculation unit
Claims (6)
実行命令アドレスを更新して出力するプログラムカウン
タと、前記クロック信号に応答して前記実行命令アドレ
スを受けてキャッシュヒット時は対応する命令コードを
出力しミスヒット時はミスヒット信号を出力する命令格
納用キャッシュメモリと、前記命令コードを受けて前記
クロック信号に応答してその命令を実行する命令実行制
御手段と、前記実行命令アドレスを保持し外部バスに接
続されたバスインターフェースと、前記プログラムカウ
ンタおよび前記命令実行制御手段への前記クロック信号
の供給を許可するパイプライン動作許可信号を発生する
パイプライン停止手段とを有し、前記実行命令アドレス
の更新,前記命令コードの出力並びに前記命令の実行を
それぞれ1クロック単位でパイプライン動作を行うマイ
クロプロセッサにおいて、前記パイプライン停止手段は、前記ミスヒット信号が発
生したときに前記パイプライン動作許可信号を非アクテ
ィブとして前記クロック信号の供給を停止し、前記バス
インターフェースは、前記ミスヒット信号が発生したと
きまたは前記マイクロプロセッサがデバッグモードであ
るときに前記実行命令アドレスを前記外部バスに出力す
る ことを特徴とするマイクロプロセッサ。1. In response to a clock signal, every one clock
Program counter that updates and outputs the execution instruction address
And the execution instruction address in response to the clock signal.
When a cache hit occurs, the corresponding instruction code is
On output to a mishit and a cache memory for instruction storage for outputting a mishit signal, said receiving said instruction code
An instruction execution system that executes the instruction in response to a clock signal
Control means and the external instruction bus for holding the execution instruction address.
Connected bus interface and the program
And the clock signal to the instruction execution control means.
Generates a pipeline operation enable signal that permits supply of data
Pipeline execution means, and the execution instruction address
Update, output of the instruction code, and execution of the instruction
In a microprocessor which performs a pipeline operation in units of one clock, the pipeline stop means generates the mishit signal.
Deactivates the pipeline operation enable signal when
The supply of the clock signal is stopped as a
The interface indicates that the mishit signal has occurred.
Or the microprocessor is in debug mode
Output the execution instruction address to the external bus when
Microprocessor, characterized in that that.
ヒット信号を入力する組み合せ回路と、この組み合せ回
路の出力信号と外部から入力したパイプラインの動作停
止用の第1の制御信号の反転信号とを入力する第1の論
理積回路とを有し、この第1の論理積回路の出力を前記
パイプライン動作許可信号としてパイプライン制御手段
のクロックが供給される論理回路へ供給し、前記第1の
制御信号がアクティブになったときに前記第1の論理積
回路の出力で前記パイプライン動作許可信号を非アクテ
ィブにして前記論理回路の前記クロック信号の出力をマ
スクすることにより強制的に前記パイプライン動作を停
止させ、前記プログラムカウンタおよび前記命令実行制
御手段がこのときの内部状態を保持するように構成する
請求項1記載のマイクロプロセッサ。Wherein said pipeline stopping means, before you and circuit combination Suhitto inputting the signal, inverting the first control signal for the stop of the operation of the pipeline input from the output signal and the outside of the combination circuit and a first aND circuit for inputting a signal, to the logic circuit which is clocked pipeline control means the output of the first aND circuit as the <br/> pipeline operation permission signal And masking the output of the clock signal of the logic circuit by deactivating the pipeline operation permission signal at the output of the first AND circuit when the first control signal is activated. The pipeline operation is forcibly stopped by the program counter and the instruction execution control.
2. The microprocessor according to claim 1, wherein the control means is configured to hold the internal state at this time.
れる前記パイプライン制御手段は、前記命令格納用キャ
ッシュメモリのアドレスを受けるラッチ手段とデータキ
ャッシュメモリのアドレスを受けるラッチ手段と前記プ
ログラムカウンタのアドレス更新手段と命令コードおよ
び命令デコーダのデコード結果から所定の制御信号およ
び分岐命令を生成する前記命令実行制御手段のラッチ手
段とにそれぞれ供給されるクロック信号をマスクするた
めの論理回路である請求項2記載のマイクロプロセッ
サ。Wherein said pipeline control means for the pipeline operation permission signal is supplied, calibration for the instruction storage
Generating a predetermined control signal and the branch instruction from the decode result of the latch means for receiving an address latch means and the data cache memory receiving an address of Mesh memory the flop <br/> program counter address updating means and the instruction code and instruction decoder 3. A microprocessor according to claim 2, wherein said microprocessor is a logic circuit for masking a clock signal supplied to each of said latch means of said instruction execution control means .
部に接続されるメモリコントローラに出力するバスホー
ルド信号の受付け通知信号を反転した信号からなる請求
項2記載のマイクロプロセッサ。4. The microprocessor according to claim 2, wherein the first control signal is a signal obtained by inverting a reception notification signal of a bus hold signal output from an internal circuit to an externally connected memory controller.
入力する前記第1の制御信号に代えて内部回路で生成さ
れる第2の制御信号が用いられ、この第2の制御信号
は、前記内部回路で生成されるバスサイクルスタート信
号とデータストローブ信号との論理積を取る第2の論理
積回路と、この第2の論理積回路の反転出力とバスホー
ルド信号の受付け通知信号の反転信号との論理和をとっ
て前記第2の制御信号を出力する論理和回路とを有し、
バスホールド時に前記第2の制御信号をアクティブにす
ることによって強制的に前記パイプライン動作を停止さ
せ、かつこのときの内部状態を保持するように構成する
請求項2記載のマイクロプロセッサ。5. The pipeline stopping means uses a second control signal generated by an internal circuit in place of the first control signal input from the outside, and the second control signal is A second AND circuit which takes the logical product of the bus cycle start signal and the data strobe signal generated by the circuit, and an inverted output of the second AND circuit and an inverted signal of the reception notification signal of the bus hold signal. A logical sum circuit that outputs a logical sum of the second control signal,
3. The microprocessor according to claim 2, wherein the pipeline control is forcibly stopped by activating the second control signal during bus hold, and the internal state at this time is maintained.
信号をアクティブにすることによって強制的に前記パイ
プライン動作を停止させるように構成する請求項5記載
のマイクロプロセッサ。6. The microprocessor of claim 5 wherein the configured halting forcibly said pipeline operation by activating the at write cycle the second control signal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8167668A JP2872117B2 (en) | 1996-06-27 | 1996-06-27 | Microprocessor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8167668A JP2872117B2 (en) | 1996-06-27 | 1996-06-27 | Microprocessor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH1011290A JPH1011290A (en) | 1998-01-16 |
| JP2872117B2 true JP2872117B2 (en) | 1999-03-17 |
Family
ID=15854016
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8167668A Expired - Lifetime JP2872117B2 (en) | 1996-06-27 | 1996-06-27 | Microprocessor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2872117B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3214613B2 (en) | 1998-07-03 | 2001-10-02 | 日本電気株式会社 | Microprocessor and data processing system |
| JP5850732B2 (en) * | 2011-12-14 | 2016-02-03 | ルネサスエレクトロニクス株式会社 | Semiconductor device and control method thereof |
-
1996
- 1996-06-27 JP JP8167668A patent/JP2872117B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH1011290A (en) | 1998-01-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4190114B2 (en) | Microcomputer | |
| US5357626A (en) | Processing system for providing an in circuit emulator with processor internal state | |
| JP3820311B2 (en) | Method for managing an instruction execution pipeline while debugging a data processing system | |
| JP3846939B2 (en) | Data processor | |
| JP5661863B2 (en) | System and method for data transfer in an execution device | |
| US5226149A (en) | Self-testing microprocessor with microinstruction substitution | |
| US20030051122A1 (en) | Trace information generation apparatus for generating branch trace information omitting at least part of branch source information and branch destination information on target processing | |
| JPH09218803A (en) | Data processor | |
| JPH09128265A (en) | Data-processing system | |
| JPH09114697A (en) | Data processor | |
| US5475852A (en) | Microprocessor implementing single-step or sequential microcode execution while in test mode | |
| JPH02201651A (en) | Data processor | |
| US5699506A (en) | Method and apparatus for fault testing a pipelined processor | |
| KR100351527B1 (en) | Code breakpoint decoder | |
| WO1996037838A9 (en) | Pipeline microprocessor test method and apparatus | |
| JP2872117B2 (en) | Microprocessor | |
| US6230263B1 (en) | Data processing system processor delay instruction | |
| US6052700A (en) | Calendar clock caching in a multiprocessor data processing system | |
| US6161171A (en) | Apparatus for pipelining sequential instructions in synchronism with an operation clock | |
| US5421026A (en) | Data processor for processing instruction after conditional branch instruction at high speed | |
| CN100409180C (en) | Method and system for processing instruction loops | |
| US7631166B1 (en) | Processing instruction without operand by inferring related operation and operand address from previous instruction for extended precision computation | |
| US6453410B1 (en) | Computer system having a cache memory and a tracing function | |
| KR100241970B1 (en) | Data processing apparatus for performing pipeline processing | |
| JP3746367B2 (en) | Non-intrusive software breakpoints in the processor instruction execution pipeline |