JPH01124049A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH01124049A
JPH01124049A JP62282568A JP28256887A JPH01124049A JP H01124049 A JPH01124049 A JP H01124049A JP 62282568 A JP62282568 A JP 62282568A JP 28256887 A JP28256887 A JP 28256887A JP H01124049 A JPH01124049 A JP H01124049A
Authority
JP
Japan
Prior art keywords
microprocessor
memory
cache memory
built
mode
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.)
Granted
Application number
JP62282568A
Other languages
Japanese (ja)
Other versions
JPH0690732B2 (en
Inventor
Akira Otsuka
亮 大塚
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP62282568A priority Critical patent/JPH0690732B2/en
Publication of JPH01124049A publication Critical patent/JPH01124049A/en
Publication of JPH0690732B2 publication Critical patent/JPH0690732B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To dispense with the access of an external memory and to rapidly recede information by receding information indicating the internal information o a microprocessor to a rapid buffer memory in the microprocessor only when a preliminarily fixed mode is specified. CONSTITUTION:When the microprocessor 1 is driven by a system debugging mode through a debugging mode specification signal line 11, a built-in cache memory 7 does not act as an ordinary cache memory. At the time of inputting an interruption from the external or generating an exception, a control unit 3 in the microprocessor 1 stores information relating to the internal state of the microprocessor 1 in the entry of a preliminarily determined data cache 14 in the memory 7 to start exception processing. Consequently, the built-in cache memory 7 can be used for receding the internal state of the microprocessor 1 in the debugging mode in addition to the original function of the memory 7.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明はマイクロプロセッサに関し、特に、キャッシ
ュメモリを内蔵したマイクロプロセッサ     ′に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microprocessor, and particularly to a microprocessor' having a built-in cache memory.

[従来の技術] 第5図は従来の内蔵キャッシュメモリを有するマイクロ
プロセッサのブロック図であり、MC6802032b
it  Microprocessor  User’
  s  Mannual”の第1頁および第2頁に掲
載されたものである。第5図において、マイクロプロセ
ッサ21は、シーケンサ22.制御ユニット23.実行
ユニット24゜命令フェッチデコードユニット25.バ
ス制御ユニット26および内蔵キャッシュメモリ27に
より構成され、アドレスバス28.データバス29およ
び制御バス30によりマイクロプロセッサ外部と情報の
授受を行なう。
[Prior Art] FIG. 5 is a block diagram of a conventional microprocessor having a built-in cache memory, MC6802032b.
It Microprocessor User'
s Manual", pages 1 and 2. In FIG. 5, the microprocessor 21 includes a sequencer 22, a control unit 23, an execution unit 24, an instruction fetch and decode unit 25, and a bus control unit 26. and a built-in cache memory 27, and exchanges information with the outside of the microprocessor via an address bus 28, a data bus 29, and a control bus 30.

第6図は、”VLSI  DESIGN”誌、1984
、November  26頁に掲載された内蔵キャッ
シュメモリの動作を表わすブロック図であり、第4図は
そのフロー図である。
Figure 6 is from “VLSI DESIGN” magazine, 1984.
, November, page 26, and FIG. 4 is a flow diagram thereof.

次に、第4図ないし第6図を参照して、従来のマイクロ
プロセッサの動作について説明する。第5図の内蔵キャ
ッシュメモリ27は、命令コードとその拡張部を格納す
るセットアソシアティブメモリであり、プログラムとデ
ータとを区別し、データはキャッシングしない。第6図
に示すように、内蔵キャッシュメモリ27はアドレスタ
グ32とデータキャッシュ34の2つのフィールドから
なる。アドレスタグ32は各エントリごとにアドレスの
上位側ビットを保持し、データキャッシュ34はアドレ
スタグ32で示される記憶場所からの固定語長のデータ
を保持している。アドレスデコーダ37でデコードされ
たプログラムカウンタ33の下位側ビットはアドレスタ
グ32の1エントリとそれに対応するデータキャッシュ
34のエントリを示す。指示されたアドレスタグ32の
エントリの内容がプログラムカウンタ33の上位側ビッ
トと一致した場合つまりヒツトした場合には、命令コー
ドは内蔵キャッシュメモリ27より命令フェッチデコー
ドユニット25に転送され、実行ユニット24で実行さ
れる。もし、一致しなかった場合には、バス制御ユニッ
ト26によってマイクロプロセッサ21外部からの命令
フェッチが実行され、命令フェッチデコードユニット2
5と内蔵キャッシュメモリ27のデータキャッシュ34
に命令コードが格納される。つまり、第4図に示すよう
に、次にアクセスするアドレスをプログラムカウンタ3
3にセットすることで、内蔵キャッシュメモリ27の任
意のエントリをアクセスすることができ、キャッシュア
クセスがヒツトしなかった場合には、外部への命令フェ
ッチに応答してアドレスをアドレスタグに入力すること
ができるとともに、内蔵キャッシュメモリ27のデータ
キャッシュ34に命令コードをセットすることができる
。一方、キャッシュアクセスがヒツトした場合には、デ
ータキャッシュ34の内容がデータバス29に出力され
るため、読出しも可能である。
Next, the operation of the conventional microprocessor will be explained with reference to FIGS. 4 to 6. The built-in cache memory 27 in FIG. 5 is a set associative memory that stores instruction codes and their extensions, distinguishes between programs and data, and does not cache data. As shown in FIG. 6, the built-in cache memory 27 consists of two fields: an address tag 32 and a data cache 34. Address tag 32 holds the upper bits of the address for each entry, and data cache 34 holds fixed word length data from the storage location indicated by address tag 32. The lower bits of the program counter 33 decoded by the address decoder 37 indicate one entry of the address tag 32 and the corresponding entry of the data cache 34. If the contents of the entry in the designated address tag 32 match the upper bits of the program counter 33, that is, if there is a hit, the instruction code is transferred from the built-in cache memory 27 to the instruction fetch decode unit 25, and executed by the execution unit 24. executed. If they do not match, the bus control unit 26 executes an instruction fetch from outside the microprocessor 21, and the instruction fetch decode unit 26 executes an instruction fetch from outside the microprocessor 21.
5 and the data cache 34 of the built-in cache memory 27
The instruction code is stored in . In other words, as shown in FIG.
By setting it to 3, any entry in the built-in cache memory 27 can be accessed, and if the cache access is not successful, the address can be input to the address tag in response to an external instruction fetch. At the same time, the instruction code can be set in the data cache 34 of the built-in cache memory 27. On the other hand, if the cache access is successful, the contents of the data cache 34 are output to the data bus 29, so that they can be read.

データの読出しは、マイクロプロセッサチップ外部とア
クセスするための外部データバス(図示せず)およびア
ドレスバスにより行なわれる。
Data is read by an external data bus (not shown) and address bus for accessing the outside of the microprocessor chip.

[発明が解決しようとする問題点] 従来のマイクロプロセッサは、以上のように構成されて
おり、キャッシュメモリを本来の使用方法のみで使用し
、それ以上の機能を持たせたものはなかった。
[Problems to be Solved by the Invention] Conventional microprocessors are configured as described above, and the cache memory is used only in its original usage, and no microprocessor has any further functionality.

それゆえに、この発明は上述のような問題点を解消する
ためになされたもので、キャッシュメモリを備えたマイ
クロプロセッサにおいて、本来のキャッシュメモリの機
能に加え、デバッグモード時にはマイクロプロセッサの
内部状態を退避させるのにも使用できるキャッシュメモ
リを備えたマイクロプロセッサを得ることを目的とする
Therefore, this invention was made to solve the above-mentioned problems, and in addition to the original cache memory function in a microprocessor equipped with a cache memory, it is possible to save the internal state of the microprocessor during debug mode. The object of the present invention is to obtain a microprocessor equipped with a cache memory that can also be used to store data.

[問題点を解決するための手段] この発明に係るマイクロプロセッサは、モード指定手段
によって予め定めるモードが指定されているとき、マイ
クロプロセッサの内部状態に関する情報を退避させる場
合には、制御手段によって当該情報を内蔵の高速バッフ
ァメモリに格納するように制御するとともに、高速バッ
ファメモリに格納されているマイクロプロセッサの内部
状態に関する情報を参照することができるようにしたも
のである。
[Means for Solving the Problems] In the microprocessor according to the present invention, when a predetermined mode is specified by the mode specifying means, when saving information regarding the internal state of the microprocessor, the control means saves the information regarding the internal state of the microprocessor. It controls the storage of information in a built-in high-speed buffer memory, and also allows reference to information regarding the internal state of the microprocessor stored in the high-speed buffer memory.

[作用] この発明における高速バッファメモリは、予め定めるモ
ードが指定されているとき、マイクロブー 6 = ロセッサの内部状態に関する情報を退避格納することが
できるとともに、必要に応じて参照することができる。
[Operation] When a predetermined mode is specified, the high-speed buffer memory of the present invention can save and store information regarding the internal state of the microprocessor, and can refer to it as necessary.

[発明の実施例コ 以下、この発明の一実施例を図について説明する。[Embodiments of the invention] An embodiment of the present invention will be described below with reference to the drawings.

第1図はこの発明の一実施例のマイクロプロセッサの構
成を示す図である。第1図において、マイクロプロセッ
サ1は、シーケンサ2.制御ユニット3.実行ユニット
4.命令フェッチデコードユニット5.バス制御ユニッ
ト6および内蔵キャッシュメモリ7により構成され、ア
ドレスバス8゜データバス9および制御バス10により
マイクロプロセッサ外部と情報の授受を行ない、デバッ
グモード指定信号線11でマイクロプロセッサ1の動作
モードを切換える。なお、この実施例では、デバッグモ
ードにおいて、内蔵キャッシュメモリ7はアドレスバス
8およびデータバス9によりマイクロプロセッサ外部か
らアクセスすることができる。
FIG. 1 is a diagram showing the configuration of a microprocessor according to an embodiment of the present invention. In FIG. 1, a microprocessor 1 includes a sequencer 2. Control unit 3. Execution unit 4. Instruction fetch decode unit 5. It is composed of a bus control unit 6 and a built-in cache memory 7, and exchanges information with the outside of the microprocessor through an address bus 8, a data bus 9, and a control bus 10, and switches the operating mode of the microprocessor 1 through a debug mode designation signal line 11. . In this embodiment, the built-in cache memory 7 can be accessed from outside the microprocessor via the address bus 8 and data bus 9 in the debug mode.

第2図は第1図に示すマイクロプロセッサ1の内蔵キャ
ッシュメモリ7の動作を表わすブロック図であり、第3
図はそのフロー図である。
FIG. 2 is a block diagram showing the operation of the built-in cache memory 7 of the microprocessor 1 shown in FIG.
The figure is a flow diagram.

次に、第1図ないし第3図を参照して、この発明の一実
施例の動作について説明する。通常動作モードでは、内
蔵キャッシュメモリ7は従来例と同じく命令コードおよ
びその拡張部を格納するセットアソシアティブメモリで
あり、プログラムとデータとを区別し、データはキャッ
シングしない。
Next, the operation of one embodiment of the present invention will be described with reference to FIGS. 1 to 3. In the normal operation mode, the built-in cache memory 7 is a set associative memory that stores instruction codes and their extensions as in the conventional example, and distinguishes between programs and data, and does not cache data.

通常モードでは、第4図に示す従来例と同様の動作を行
なうので説明を省略する。
In the normal mode, the same operation as in the conventional example shown in FIG. 4 is performed, so the explanation will be omitted.

マイクロプロセッサ1がデバッグモード指定信号線11
によって、システムデバッグモードで動作しているとき
、内蔵キャッシュメモリ7は本来のキャッシュメモリと
しての動作は行なわない。
Microprocessor 1 uses debug mode designation signal line 11
Therefore, when operating in the system debug mode, the built-in cache memory 7 does not operate as an original cache memory.

マイクロプロセッサ1の制御ユニット3は外部から割込
が入力されたり、例外が発生したりすると、マイクロプ
ロセッサ1の内部状態に関する情報を内蔵キャッシュメ
モリ7の予め決められたデータキャッシュ14のエント
リに格納して、例外処理を開始する。ここで、マイクロ
プロセッサ1の内部状態に関する情報とは、ステータス
情報、プログラムカウンタのカウント値、レジスタの値
などである。
When an interrupt is input from the outside or an exception occurs, the control unit 3 of the microprocessor 1 stores information regarding the internal state of the microprocessor 1 in a predetermined entry in the data cache 14 of the built-in cache memory 7. and start exception handling. Here, the information regarding the internal state of the microprocessor 1 includes status information, a count value of a program counter, a value of a register, and the like.

制御ユニット3は内蔵キャッシュメモリ7に格納された
内部状態に関する情報を、例外処理ルーチンにおいて特
殊命令により図示されていない汎用レジスタへ転送した
り、マイクロプロセッサ1の外部からの指令によってマ
イクロプロセッサ1を停止させて、内蔵キャッシュメモ
リ7を外部からアクセスできるようにする。つまり、外
部からアドレスバス8によりキャッシュメモリ7のいず
れかのエントリが指定されると、データキャッシュ14
の指定内容はデータバス9を介して読出されて、参照さ
れる。
The control unit 3 transfers information regarding the internal state stored in the built-in cache memory 7 to a general-purpose register (not shown) using a special instruction in an exception handling routine, or stops the microprocessor 1 based on a command from outside the microprocessor 1. This allows the built-in cache memory 7 to be accessed from the outside. In other words, when any entry in the cache memory 7 is specified by the address bus 8 from the outside, the data cache 14
The specified contents are read out via the data bus 9 and referred to.

なお、」二連の実施例では、内蔵キャッシュメモリがセ
ットアソシアティブ命令キャツメモリであるものについ
て、デバッグモード動作を行なうものを示したが、内蔵
キャッシュメモリはフルアソシアティブ方式でも、ダイ
レクトマツビングツj式であってもよい。また、命令コ
ードをキャッシングするものに限らず、データもキャッ
シングするキャッシュメモリにおいても上述と同様の効
果を奏する。
In addition, in the two series of embodiments, an example in which the built-in cache memory is a set-associative instruction cat memory is shown that performs debug mode operation, but the built-in cache memory can be used either in a fully associative method or in a direct mapping method. There may be. Further, the same effect as described above is achieved not only in a cache memory that caches instruction codes but also in a cache memory that also caches data.

[発明の効果] 以上のように、この発明によれば、予め定めるモードが
指定されているとき、マイクロプロセッサの内部情報を
示す情報をマイクロプロセッサ内に設けられた高速バッ
ファメモリに退避するようにしたので、外部メモリをア
クセスする必要がなく、高速に情報を退避することがで
きる。また、当該情報を必要とするときマイクロプロセ
ッサまたは外部の装置によって参照することができる。
[Effects of the Invention] As described above, according to the present invention, when a predetermined mode is specified, information indicating internal information of the microprocessor is saved to a high-speed buffer memory provided within the microprocessor. Therefore, there is no need to access external memory, and information can be saved at high speed. Also, the information can be referenced by the microprocessor or an external device when needed.

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

第1図はこの発明の一実施例のマイクロプロッサの構成
を示すブロック図である。第2図は第1図に示すマイク
ロプロセッサの内蔵キャッシュメモリの動作を表わすブ
ロック図である。第3図はこの発明の一実施例の動作を
説明するためのフロー図である。第4図は従来のマイク
ロプロセッサおよびこの発明の一実施例の動作を説明す
るだめのフロー図である。第5図は従来のマイクロプロ
セッサの構成を示すブロック図である。第6図は第5図
に示す従来のマイクロプロセッサに内蔵されたキャッシ
ュメモリの動作を表わすブロック図である。 図において、1はマイクロプロセッサ、2はシーケンサ
、3は制御ユニット、4は実行ユニット、5は命令フェ
ッチデコードユニット、6はバス制御ユニット、7は内
蔵キャッシュメモリ、8はアドレスバス、9はデータバ
ス、10は制御バス、11はデバッグモード指定信号線
、12はアドレスタグ、13はプログラムカウンタ、1
4はデータキャッシュ、17はアドレスデコーダを示す
FIG. 1 is a block diagram showing the configuration of a microprocessor according to an embodiment of the present invention. FIG. 2 is a block diagram showing the operation of the built-in cache memory of the microprocessor shown in FIG. 1. FIG. 3 is a flow diagram for explaining the operation of one embodiment of the present invention. FIG. 4 is a flow diagram illustrating the operation of a conventional microprocessor and an embodiment of the present invention. FIG. 5 is a block diagram showing the configuration of a conventional microprocessor. FIG. 6 is a block diagram showing the operation of a cache memory built into the conventional microprocessor shown in FIG. In the figure, 1 is a microprocessor, 2 is a sequencer, 3 is a control unit, 4 is an execution unit, 5 is an instruction fetch decode unit, 6 is a bus control unit, 7 is a built-in cache memory, 8 is an address bus, and 9 is a data bus. , 10 is a control bus, 11 is a debug mode designation signal line, 12 is an address tag, 13 is a program counter, 1
4 is a data cache, and 17 is an address decoder.

Claims (5)

【特許請求の範囲】[Claims] (1)高速バッファメモリを内蔵したマイクロプロセッ
サにおいて、 予め定めるモードを指定するモード指定手段と、前記モ
ード指定手段によって前記予め定めるモードが指定され
ているとき、前記マイクロプロセッサの内部状態に関す
る情報を退避させる場合には、当該情報を前記高速バッ
ファメモリに格納するように制御するとともに、前記高
速バッファメモリに格納された前記マイクロプロセッサ
の内部状態に関する情報を参照できるように制御する制
御手段とを備えた、マイクロプロセッサ。
(1) In a microprocessor with a built-in high-speed buffer memory, mode specifying means for specifying a predetermined mode; and when the predetermined mode is specified by the mode specifying means, information regarding the internal state of the microprocessor is saved. control means for controlling the information to be stored in the high-speed buffer memory, and for controlling the information stored in the high-speed buffer memory regarding the internal state of the microprocessor to be referenced. , microprocessor.
(2)前記高速バッファメモリがキャッシュメモリであ
る、特許請求の範囲第1項記載のマイクロプロセッサ。
(2) The microprocessor according to claim 1, wherein the high-speed buffer memory is a cache memory.
(3)前記予め定めるモードがデバッグモードである、
特許請求の範囲第1項または第2項記載のマイクロプロ
セッサ。
(3) the predetermined mode is a debug mode;
A microprocessor according to claim 1 or 2.
(4)前記高速バッファメモリは、前記モード指定手段
によって前記予め定めるモードが指定されているとき、
予め定める命令が与えられたことに応じて、アクセスで
きるようにした、特許請求の範囲第1項記載のマイクロ
プロセッサ。
(4) When the predetermined mode is specified by the mode specifying means, the high-speed buffer memory
2. The microprocessor according to claim 1, wherein the microprocessor can be accessed in response to being given a predetermined instruction.
(5)前記高速バッファメモリは、複数のエントリを含
み、前記モード指定手段によって前記予め定めるモード
が指定されているとき、外部から前記複数のエントリの
いずれかが指定されたことに応じて、当該指定されたエ
ントリがアクセスできるようにした、特許請求の範囲第
1項記載のマイクロプロセッサ。
(5) The high-speed buffer memory includes a plurality of entries, and when the predetermined mode is specified by the mode specifying means, the high-speed buffer memory stores the corresponding 2. A microprocessor as claimed in claim 1, wherein a designated entry is accessible.
JP62282568A 1987-11-09 1987-11-09 Microprocessor Expired - Lifetime JPH0690732B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62282568A JPH0690732B2 (en) 1987-11-09 1987-11-09 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62282568A JPH0690732B2 (en) 1987-11-09 1987-11-09 Microprocessor

Publications (2)

Publication Number Publication Date
JPH01124049A true JPH01124049A (en) 1989-05-16
JPH0690732B2 JPH0690732B2 (en) 1994-11-14

Family

ID=17654179

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62282568A Expired - Lifetime JPH0690732B2 (en) 1987-11-09 1987-11-09 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0690732B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03175537A (en) * 1989-12-04 1991-07-30 Nec Corp Error controller for debugging microprocessor
JPH03185530A (en) * 1989-12-14 1991-08-13 Mitsubishi Electric Corp Data processor
JPH03186935A (en) * 1989-12-16 1991-08-14 Mitsubishi Electric Corp Data processor
JPH0773065A (en) * 1993-09-01 1995-03-17 Nec Corp Emulator

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4843372B2 (en) * 2006-05-09 2011-12-21 株式会社リコー Image processing device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03175537A (en) * 1989-12-04 1991-07-30 Nec Corp Error controller for debugging microprocessor
JPH03185530A (en) * 1989-12-14 1991-08-13 Mitsubishi Electric Corp Data processor
JPH03186935A (en) * 1989-12-16 1991-08-14 Mitsubishi Electric Corp Data processor
JPH0773065A (en) * 1993-09-01 1995-03-17 Nec Corp Emulator

Also Published As

Publication number Publication date
JPH0690732B2 (en) 1994-11-14

Similar Documents

Publication Publication Date Title
US4648034A (en) Busy signal interface between master and slave processors in a computer system
US5247639A (en) Microprocessor having cache bypass signal terminal
KR100403405B1 (en) Integrated circuit with multiple functions sharing multiple internal signal buses according to distributed bus access and control arbitration
US5375216A (en) Apparatus and method for optimizing performance of a cache memory in a data processing system
US5386563A (en) Register substitution during exception processing
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
KR100309615B1 (en) High Speed Programmable Logic Controllers (PLC)
JP4205506B2 (en) Data processing apparatus and data processing method
US20080270707A1 (en) Data processor
US5493664A (en) Microcomputer that transfers address and control to a debugging routine when an input address is a breakpoint address and a user accessible register for signalling if the breakpoint address is from the cache memory or a main memory
EP2215544B1 (en) Enhanced microprocessor or microcontroller
JPH0748190B2 (en) Microprocessor with cache memory
KR19990036893A (en) Processor Architecture for Execution of Multiple Addressing Modes and Its Design Method
US5274776A (en) Information processing system having mode signal holding means and selecting operand access mode based on mode signal indicating type of currently executed instruction
JPH01124049A (en) Microprocessor
EP0101718B1 (en) Computer with automatic mapping of memory contents into machine registers
US5201052A (en) System for transferring first and second ring information from program status word register and store buffer
JP2619425B2 (en) Sequence controller
US5924124A (en) Software programmable bus disable system
KR930004433B1 (en) Direct controllable cache memory
JPH0795288B2 (en) Microcomputer
JPH0683986A (en) Single chip microcomputer
JPS62151936A (en) Cache circuit built in microprocessor
JPH06103063A (en) Microprocessor
JPS62264332A (en) Preread control circuit for instruction