JPH0795288B2 - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0795288B2
JPH0795288B2 JP63211163A JP21116388A JPH0795288B2 JP H0795288 B2 JPH0795288 B2 JP H0795288B2 JP 63211163 A JP63211163 A JP 63211163A JP 21116388 A JP21116388 A JP 21116388A JP H0795288 B2 JPH0795288 B2 JP H0795288B2
Authority
JP
Japan
Prior art keywords
instruction code
execution
circuit
address
microcomputer
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
JP63211163A
Other languages
Japanese (ja)
Other versions
JPH0259829A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63211163A priority Critical patent/JPH0795288B2/en
Publication of JPH0259829A publication Critical patent/JPH0259829A/en
Publication of JPH0795288B2 publication Critical patent/JPH0795288B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、外部メモリと命令実行回路との間に高速緩衡
記憶回路(キャッシュメモリ)を設けたマイクロコンピ
ュータに関し、特に命令実行を中断させる手段を設けた
マイクロコンピュータに関する。
The present invention relates to a microcomputer provided with a high-speed buffer memory circuit (cache memory) between an external memory and an instruction execution circuit, and particularly interrupts instruction execution. The present invention relates to a microcomputer provided with means.

[従来の技術] 従来よりメモリアクセス速度の向上を図るため、マイク
ロコンピュータの内部に高速のキャッシュメモリを設け
ることが行なわれている。この種のマイクロコンピュー
タでは、外部メモリの現在実行中のアドレス付近の命令
コード群が一旦キャッシュメモリに格納され、命令コー
ドのフェッチ及び実行はこのキャッシュメモリに対して
行なわれる。即ち、キャッシュメモリを内蔵した従来の
マイクロコンピュータでは、マイクロコンピュータの内
部において、実行回路が直接キャッシュメモリ内の命令
コードをフェッチ及び実行し、かつ現在どの命令コード
が実行されようとしているかという情報はマイクロコン
ピュータの外部に出力されなかった。
[Prior Art] Conventionally, in order to improve the memory access speed, a high-speed cache memory has been provided inside a microcomputer. In this type of microcomputer, an instruction code group in the vicinity of an address of the external memory currently being executed is temporarily stored in the cache memory, and the instruction code is fetched and executed in this cache memory. That is, in a conventional microcomputer having a cache memory, an execution circuit in the microcomputer directly fetches and executes an instruction code in the cache memory, and information about which instruction code is about to be executed at present is provided by the microcomputer. It was not output to the outside of the computer.

[発明が解決しようとする課題] このように、キャッシュメモリを内蔵した従来のマイク
ロコンピュータでは、命令コードの実行がマイクロコン
ピュータ内部のキャッシュメモリと実行回路との間で行
なわれるため、外部からは、キャッシュメモリ内のどの
命令コードが現在実行されているかを知ることができな
かった。従って、例えば、プログラム開発時やデバッグ
時において、マイクロコンピュータに対し、特定の命令
コードの実行時点で以降の実行を中断させることができ
ず、マイクロコンピュータ開発支援装置を用いた効率的
なプログラム開発ができないという欠点があった。
[Problems to be Solved by the Invention] As described above, in the conventional microcomputer including the cache memory, the instruction code is executed between the cache memory and the execution circuit inside the microcomputer, and therefore, from the outside, It was not possible to know which opcode in the cache memory is currently being executed. Therefore, for example, at the time of program development or debugging, it is not possible to interrupt the execution of the specific instruction code to the microcomputer thereafter, and efficient program development using the microcomputer development support device is possible. There was a drawback that I could not.

本発明はかかる問題点に鑑みてなされたものであって、
キャッシュメモリを内蔵したマイクロコンピュータにお
いて、任意の命令コードの実行時点で以降の実行を中断
させることを可能とし、もってその開発を効率良く行な
うことを可能にするマイクロコンピュータを提供するこ
とを目的とする。
The present invention has been made in view of such problems,
It is an object of the present invention to provide a microcomputer having a cache memory, in which the subsequent execution can be interrupted at the time of execution of an arbitrary instruction code and the development thereof can be efficiently performed. .

[課題を解決するための手段] 本発明に係るマイクロコンピュータは、命令コードと共
に、この命令コードと対応させてその命令コードの実行
時点以降の実行を中断させるか否かの中断情報を、外部
からの設定によって記憶するキャッシュメモリと、この
キャッシュメモリ又は外部メモリのアドレスを指定する
アドレス管理回路と、このアドレス管理回路で指定され
たアドレスから命令コードと中断情報とをフェッチする
命令コードフェッチ回路と、この命令コードフェッチ回
路でフェッチされた命令コードを実行しフェッチされた
中断情報に基づいて命令の実行を中断する命令実行回路
とを具備している。
[Means for Solving the Problem] The microcomputer according to the present invention provides, together with an instruction code, interruption information corresponding to the instruction code and indicating whether or not the execution after the execution time point of the instruction code is interrupted. A cache memory to be stored according to the setting, an address management circuit for designating an address of the cache memory or an external memory, and an instruction code fetch circuit for fetching an instruction code and interruption information from an address designated by the address management circuit, An instruction execution circuit that executes the instruction code fetched by the instruction code fetch circuit and interrupts the execution of the instruction based on the interrupt information fetched.

[作用] 本発明によれば、キャッシュメモリには命令コードだけ
でなく、この命令コードの実行後、命令の実行を中断さ
せるかどうかの中断情報も、上記命令コードと対応づけ
て記憶される。そして、上記中断情報に基づいて命令実
行回路が命令を実行・中断する。従って、本発明によれ
ば、外部からキャッシュメモリに対して特定の命令コー
ドと対応づけて命令実行の中断を指定する中断情報を書
込むことにより、上記命令コードの実行時点で命令の実
行を中断させることができる。
[Operation] According to the present invention, not only the instruction code but also interruption information indicating whether or not to interrupt the execution of the instruction after execution of the instruction code is stored in the cache memory in association with the instruction code. Then, the instruction execution circuit executes / suspends the instruction based on the interruption information. Therefore, according to the present invention, the execution of an instruction is interrupted at the point in time when the instruction code is executed by externally writing interruption information designating interruption of instruction execution in association with a specific instruction code to the cache memory. Can be made.

[実施例] 以下、添付の図面を参照して本発明の実施例について説
明する。
Embodiments Embodiments of the present invention will be described below with reference to the accompanying drawings.

第1図は本発明の実施例に係るマイクロコンピュータの
構成を示すブロック図である。図示しない外部メモリか
ら読出された命令コードは外部データバス101を介して
マイクロコンピュータの内部に取り込まれ、上記命令コ
ードの実行終了後に実行を中断させるかどうかを示す1
ビットの中断情報は外部中断情報線102を介して内部に
取込まれる。取込まれた命令コードと中断情報は外部バ
ス制御回路103の制御の下に内部データバス104及び内部
中断情報線105を介してキャッシュメモリ106及び命令コ
ードフェッチ回路107に与えられる。キャッシュメモリ1
06は、通常の命令コード108の他に、この命令コード108
に対応した中断情報109を記憶する高速メモリで、アド
レス管理回路110から内部アドレスバス111を介して与え
られるアドレスに従って命令コード108と中断情報109と
を読出す。
FIG. 1 is a block diagram showing the configuration of a microcomputer according to an embodiment of the present invention. An instruction code read from an external memory (not shown) is taken into the microcomputer via the external data bus 101, and indicates whether or not the execution is suspended after the execution of the instruction code is completed.
The bit break information is captured internally via the external break information line 102. The fetched instruction code and interruption information are given to the cache memory 106 and the instruction code fetch circuit 107 via the internal data bus 104 and the internal interruption information line 105 under the control of the external bus control circuit 103. Cache memory 1
06 is this instruction code 108 in addition to the normal instruction code 108
The instruction code 108 and the interruption information 109 are read out in accordance with the address given from the address management circuit 110 via the internal address bus 111 in the high-speed memory which stores the interruption information 109 corresponding to.

命令コードフェッチ回路107は、読出された命令コード
と中断情報とをプリフェッチし、所定のパイプライン動
作に従って上記命令コードと中断情報とを内部データバ
ス114及び内部中断情報線115を介して実行回路116に出
力する。実行回路116は、入力された命令コードを解釈
し実行する。また、この実行回路116には、命令コード
中断回路117が備えられている。この命令コード中断回
路117は命令コードに伴って内部中断情報線115を介して
入力された中断情報を解釈し、該情報が中断を指示して
いるとき(「1」のとき)には当該命令コードの実行終
了後に実行回路116の実行を中断させる。一方、中断情
報が中断を指示していないとき(「0」のとき)には何
も制御を行なわない。
The instruction code fetch circuit 107 prefetches the read instruction code and the interruption information, and executes the instruction code and the interruption information according to a predetermined pipeline operation via the internal data bus 114 and the internal interruption information line 115. Output to. The execution circuit 116 interprets and executes the input instruction code. The execution circuit 116 also includes an instruction code interruption circuit 117. The instruction code interruption circuit 117 interprets the interruption information input via the internal interruption information line 115 along with the instruction code, and when the information indicates interruption (when it is "1"), the instruction concerned is interrupted. After execution of the code is completed, the execution of the execution circuit 116 is suspended. On the other hand, when the interruption information does not instruct the interruption (when it is "0"), no control is performed.

実行回路116から出力される実行後のアドレスは、内部
アドレスバス118を介してアドレス管理回路110に与えら
れてる。アドレス管理回路110は、実行回路116から与え
られたアドレスがキャッシュメモリ106に登録されてい
る場合には内部アドレスバス111を介してキャッシュメ
モリ106をアクセスし、登録されていない場合には外部
アドレスバス119を介して図示しない外部メモリをアク
セスする。
The post-execution address output from the execution circuit 116 is given to the address management circuit 110 via the internal address bus 118. The address management circuit 110 accesses the cache memory 106 via the internal address bus 111 when the address given by the execution circuit 116 is registered in the cache memory 106, and the external address bus when it is not registered. An external memory (not shown) is accessed via 119.

このように構成された本実施例のマイクロコンピュータ
によれば、キャッシュメモリ106に格納された命令コー
ド108のうち、対応する中断情報109が「1」である命令
コード108が実行回路116で実行された後にマイクロコン
ピュータの実行は中断される。
According to the microcomputer of this embodiment configured as described above, among the instruction codes 108 stored in the cache memory 106, the instruction code 108 for which the corresponding interruption information 109 is “1” is executed by the execution circuit 116. After that, the execution of the microcomputer is suspended.

第2図は以上のように構成されたマイクロコンピュータ
を用いて構成されたシステムの一例を示す図である。マ
イクロコンピュータ201からアドレスバス202を介して出
力されるアドレスはメモリ203とアドレス比較回路204の
一方の入力とに与えられる。アドレス比較回路204の他
方の入力には中断アドレス設定回路205に設定された中
断アドレスが中断アドレスバス206を介して与えられ
る。この中断アドレスは、以後の動作を中断させる命令
コードが格納されているメモリ203のアドレスであり、
予めユーザによって指定可能な情報である。
FIG. 2 is a diagram showing an example of a system configured by using the microcomputer configured as described above. The address output from the microcomputer 201 via the address bus 202 is given to the memory 203 and one input of the address comparison circuit 204. The interruption address set in the interruption address setting circuit 205 is given to the other input of the address comparison circuit 204 via the interruption address bus 206. This interruption address is an address of the memory 203 in which an instruction code for interrupting the subsequent operation is stored,
This is information that can be designated by the user in advance.

アドレス比較回路204は、マイクロコンピュータ201によ
り指定されたアドレスと予め設定しておいた上記中断ア
ドレスとを逐次比較し、両者が一致したときに中断情報
として「1」を出力し、それ以外は「0」を出力する。
マイクロコンピュータ201は、メモリ203へのアドレス指
定によって読出される命令コードと上記アドレス比較回
路204からの中断情報とを、データバス207及び中断情報
線208を夫々介して内部に取込む。
The address comparison circuit 204 sequentially compares the address designated by the microcomputer 201 with the preset interruption address, outputs "1" as the interruption information when the two coincide with each other, and otherwise ""0" is output.
The microcomputer 201 internally takes in the instruction code read by addressing the memory 203 and the interruption information from the address comparison circuit 204 through the data bus 207 and the interruption information line 208, respectively.

このように構成することにより、中断アドレス設定回路
205に中断しようとするアドレスを設定しておくだけ
で、マイクロコンピュータ201内のキャッシュメモリに
中断情報が自動的に書込まれるので、希望する任意のア
ドレスにおいてマイクロコンピュータ201の実行を中断
させることができる。
With this configuration, the interrupt address setting circuit
Since the interruption information is automatically written to the cache memory in the microcomputer 201 only by setting the address to be interrupted in 205, the execution of the microcomputer 201 can be interrupted at any desired address. it can.

なお、以上の中断情報の書込み方法は一例であり、本発
明はこれに限定されるものではない。例えばアドレスの
比較ではなく、メモリから読出された命令コードの比較
により中断情報を書込むようにすれば、所望の命令コー
ドが実行された後にマイクロコンピュータを中断させる
ようにすることも可能である。
Note that the above-described method of writing the interruption information is an example, and the present invention is not limited to this. For example, if the interruption information is written by comparing the instruction code read from the memory instead of comparing the address, it is possible to suspend the microcomputer after the desired instruction code is executed.

[発明の効果] 以上説明したように本発明は、マイクロコンピュータの
外部から判断が不可能なマイクロコンピュータの内部の
キャッシュメモリに対して中断情報を書込むことによ
り、リアルタイムで任意の命令コード実行時点でその実
行を中断でき、プログラムの開発を効率良く行なえると
いう効果がある。
[Effects of the Invention] As described above, according to the present invention, by writing interruption information in a cache memory inside a microcomputer that cannot be judged from outside the microcomputer, an arbitrary instruction code execution time point in real time is written. It has the effect that the execution can be interrupted and the program can be developed efficiently.

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

第1図は本発明の実施例に係るマイクロコンピュータ内
部ブロック図、第2図は同マイクロコンピュータを用い
たシステムのブロック図である。 103;外部バス制御回路、106;キャッシュメモリ、107;命
令コードフェッチ回路、110;アドレス管理回路、116;実
行回路、117;命令コード中断回路、201;マイクロコンピ
ュータ、203;メモリ、204;アドレス比較回路、205;中断
アドレス設定回路
FIG. 1 is an internal block diagram of a microcomputer according to an embodiment of the present invention, and FIG. 2 is a block diagram of a system using the microcomputer. 103; external bus control circuit, 106; cache memory, 107; instruction code fetch circuit, 110; address management circuit, 116; execution circuit, 117; instruction code interruption circuit, 201; microcomputer, 203; memory, 204; address comparison Circuit, 205; interrupt address setting circuit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭56−99550(JP,A) 特開 昭56−127247(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-56-99550 (JP, A) JP-A-56-127247 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】外部メモリから読出された命令コードを記
憶すると共に前記命令コードの実行時点で以後の実行を
中断させるか否かを示す中断情報を前記命令コードと対
応させて記憶するキャッシュメモリと、命令コードの実
行結果に従って前記キャッシュメモリ若しくは外部メモ
リのアドレスを指定するアドレス管理回路と、このアド
レス管理回路で指定されたアドレスから前記命令コード
と前記中断情報とをフェッチする命令コードフェッチ回
路と、この命令コードフェッチ回路でフェッチされた命
令コードを実行しフェッチされた中断情報が実行の中断
を示している場合に実行を中断する実行回路とを具備し
たことを特徴とするマイクロコンピュータ。
1. A cache memory for storing an instruction code read from an external memory and storing interruption information indicating whether or not to suspend the subsequent execution at the time of execution of the instruction code in association with the instruction code. An address management circuit for designating an address of the cache memory or an external memory according to an execution result of the instruction code, and an instruction code fetch circuit for fetching the instruction code and the interruption information from an address designated by the address management circuit, A microcomputer comprising: an execution circuit that executes the instruction code fetched by the instruction code fetch circuit, and interrupts the execution when the interrupt information fetched indicates an interruption of the execution.
JP63211163A 1988-08-25 1988-08-25 Microcomputer Expired - Fee Related JPH0795288B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63211163A JPH0795288B2 (en) 1988-08-25 1988-08-25 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63211163A JPH0795288B2 (en) 1988-08-25 1988-08-25 Microcomputer

Publications (2)

Publication Number Publication Date
JPH0259829A JPH0259829A (en) 1990-02-28
JPH0795288B2 true JPH0795288B2 (en) 1995-10-11

Family

ID=16601443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63211163A Expired - Fee Related JPH0795288B2 (en) 1988-08-25 1988-08-25 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0795288B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04130930A (en) * 1990-09-21 1992-05-01 Nec Ic Microcomput Syst Ltd Emulation cpu
JPH04350735A (en) * 1991-05-29 1992-12-04 Nec Corp Microprocessor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5699550A (en) * 1980-01-11 1981-08-10 Nec Corp Information processing unit

Also Published As

Publication number Publication date
JPH0259829A (en) 1990-02-28

Similar Documents

Publication Publication Date Title
US7047401B2 (en) Handling interrupts during multiple access program instructions
JPS6125169B2 (en)
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JP2583525B2 (en) Data processing device
US5930470A (en) Debugging system and debugging method
JPH0795288B2 (en) Microcomputer
JPH01124049A (en) Microprocessor
JPH1063574A (en) Processor with cache memory
JPH06324861A (en) System and method for controlling cpu
JP3328867B2 (en) Multiprocessor arithmetic device and programmable controller having the device
JP2711159B2 (en) Processor operation state adjustment method
JP2674873B2 (en) Step execution operation method of program development support device
JP2902847B2 (en) Self-modifying code execution method
JPH04340145A (en) Cache memory device
JP3130421B2 (en) Program analysis method and apparatus
JPH04167146A (en) Address tracing system for information processor
JPH07191879A (en) Microprocessor provided with executing function of instruction for debugging and debugging method
JPH0535499A (en) Data processing device and method
JPH01240941A (en) Information processor
JPS60193046A (en) Detecting system for instruction exception
JPH0223425A (en) Rewriting detecting circuit for instruction
JPH03168845A (en) Instruction execution control system
JPS6286442A (en) Data processor
JPH0793180A (en) Microprocessor
JPH024011B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees