JP3807616B2 - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP3807616B2
JP3807616B2 JP2003062995A JP2003062995A JP3807616B2 JP 3807616 B2 JP3807616 B2 JP 3807616B2 JP 2003062995 A JP2003062995 A JP 2003062995A JP 2003062995 A JP2003062995 A JP 2003062995A JP 3807616 B2 JP3807616 B2 JP 3807616B2
Authority
JP
Japan
Prior art keywords
interrupt
register
microcomputer
external device
condition
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
Application number
JP2003062995A
Other languages
Japanese (ja)
Other versions
JP2003296130A (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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2003062995A priority Critical patent/JP3807616B2/en
Publication of JP2003296130A publication Critical patent/JP2003296130A/en
Application granted granted Critical
Publication of JP3807616B2 publication Critical patent/JP3807616B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Microcomputers (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、マイクロコンピュータに関し、例えばマイクロコンピュータならびにその周辺コントローラにおける割り込み機能に利用して有効な技術に関するものである。
【0002】
【従来の技術】
従来のマイクロコンピュータでは、内蔵した周辺機能並びに外部装置からの割り込み受け付けの機能を備えており、その受け付け優先度や周辺機能からの割り込みにつていも詳しく規定されいる(一般公開)。このような割り込み機能を持つマイクロコンピュータの例として、日立製作所発行『日立シングルチップコンピュータ H8/500シリーズ プログラミングマニュアル:ADJ−602−022』がある。複数のマイクロコンピュータを使用してシステムを設計する場合、シングルチップマイクロコンピュータに内蔵されているシリアル通信機能を用いるか、汎用ポートを独自仕様によりパラレルハンドシェークポートに構成することにより、マイクロプロセッサ間の通信や命令単位の同期合わせを行うものである。
【0003】
【発明が解決しようとする課題】
本願発明者にあっては、複数のマイクロコンピュータ(CPU)を駆使して一連のデータ処理を行うシステムを構成して、システム全体の制御を受け持つマスタCPUと一部の制御機能を専業とし、あるいは特殊機能を高性能化とするために設けられたスレーブCPUとの間の命令単位の同期を採る際、割り込み信号を用いて応答性の良い通信制御方式を検討した。
【0004】
この場合、スレーブCPUは、マスタCPUから制御命令もしくは動作開始のトリガを受け取ると、自身に割り振られた制御処理を開始し、その処理が終了した時点で速やかにその旨をマスタCPUに知らせて動作を完結する。その際、マスタCPUは、複数のスレーブCPUを管理している場合には、どのスレーブCPUがどのタスクをどういった状態で完結したかを知っておく必要がある。
【0005】
従来の割り込み方式は、複数のマイクロコンピュータを駆使した高性能のシステムを予定しておらず、割り込みの受け付けに重点が置かれた設計になっており、より高次のCPUに対して割り込み信号を発生させるといった発想がなされていない。したがって、複数からなるマイクロコンピュータを用いた分散制御型のシステムを構築する場合には、上記のようにシリアル通信や汎用パラレルポートを用いるものである。しかし、前者のシリアル通信にあっては、比較的遠いCPU間の通信には配線数が少なくノイズに対して耐性があるが、多くの情報を短時間で送信/受信したり応答性を要求するシステムには向かない。後者の汎用パラレルポートにあっては、使用するCPUの機能やユーザー仕様に合わせて構成することから規格化することが難しく、外付け部品も必要なことから低価格化や小型化には向かない。
【0006】
高性能化を図ったデータ処理システムでは、8/16ビットシングルチップマイクロコンピュータが多用され、分散制御においてもリアルタイムOSが一般的になってきた現状において、マスタCPUとスレーブCPU間の割り込み応答時間に関しても、システムの高性能化とともにその要求は厳しさを増している。そこで、マスタCPUとスレーブCPUとの間を割り込み信号を用いて応答性をよくしつつ命令単位での同期を採ることを考えた。
【0007】
この発明の目的は、汎用性と応答性を改善した割り込み機能を持つマイクロコンピュータを提供することにある。
この発明の前記ならびにそのほかの目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。
【0008】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば、下記の通りである。すなわち、所定の命令を外部装置から入力されることにより一連のタスク処理を行うことが可能なマイクロコンピュータあって、命令を解釈し実行する制御演算部と、上記制御演算部に対応して割り込み情報を記憶する割り込みレジスタと、上記外部装置へ割り込み信号を出力するためのり込み発生条件を設定する割り込み条件論理部が自身のマイクロコンピュータ及び上記外部装置の両方によりアクセス可能とされる割り込み発生制御部とを有する。
【0009】
上記した手段によれば、分散制御型システムを採用した場合に、上記のマイクロコンピュータを採用することにより汎用性・応答性のよいシステムを容易に構築することが出来る。
【0010】
【発明の実施の形態】
図1には、この発明に係るデータ処理装置のうち、制御演算処理部に対応して設けられる割り込み信号発生部の一実施例のブロック図が示されている。この実施例のデータ処理装置は、特に制限されないが、スレーブCPU(マイクロコンピュータ)に向けられている。
【0011】
割り込み信号発生部は、スレーブCPUの制御演算部に対応して設けられており、従来の一般に公開されている割り込み回路とは区別されて設けられる。
割り込み発生部は、スレーブCPUの内部バスを介して制御演算部等と接続され、外部のマスタCPUを含む外部装置からは外部バスを介して内部にアクセス可能な構成にされる。また、外部のマスクCPUを含む外部装置に対して割り込み信号(IRQ)を出力させる。
【0012】
割り込み発生制御部は、大まかに言って割り込み情報を書くための任意ビット長(nビット)からなる割り込みレジスタと、割り込み信号の発生の条件を設定(決定)する割り込み条件論理回路部(Gate 等)と、割り込み信号の出力を条件の成立に関係なく、許可/禁止するマスクレジスタから構成される。
【0013】
スレーブCPUは、マスタCPUを含む外部装置に対して一連のタスクの終了とその終了時の状況を報告又は一連のタスク中に発生する状況の報告を行うために、割り込み発生制御部を用いて、割り込み信号(IRQ)を出力するが、この割り込み信号を出力するまでの手順は次の通りである。
【0014】
▲1▼ スレーブCPUの初期状態では、電源投入時のなどのリセット信号により、割り込みレジスタとマスクレジスタの内容は、割り込み信号(IRQ)が出力されない状態になっている。
【0015】
▲2▼ スレーブCPUは、何らかの手段により、マスタCPUを含む外部装置から一連のタスクを処理するような命令を受けて動作を開始する。
【0016】
▲3▼ スレーブCPUは、一連のタスクの処理を終えた時点で内部バスを介して割り込みレジスタに対してタスクの終了状況などを書き込む。
【0017】
▲4▼ 割り込みレジスタに書き込まれた内容は、割り込み条件論理部に入力され、割り込み発生の条件を満たしたビットの並び(データ・コード)になっている場合に限り、マスクレジスタへ割り込み条件が成立したことを示す信号を出力する。この割り込み発生の条件を満たした並び(データ・コード)というのは、例えば▲1▼で説明されている初期状態で書き込まれるデータ・コード以外のデータ・コードであるとか、任意のデータ・コードやまたそれらの集合体であるといったことをさす。
【0018】
割り込み発生の条件を決める割り込み条件論理回路部では、それらの条件式を論理ゲート(Gate)などのハードウェアにより固定的に構成したり、論理ゲートに内部バスなどに接続されたレジスタやラッチ回路といったプログラマブルな回路や素子を組み合わせることで静的にも動的にも条件式をユーザーの希望により変更できるように構成される。マスクレジスタに入力される割り込み条件論理回路部から出力される割り込み条件が成立したことを示す信号は、マスクレジスタの状態により、マスタCPUを含む外部装置に対して割り込み信号(IRQ)を出力させられたり、マスク(出力禁止)させられる。
【0019】
▲5▼ スレーブCPUから割り込み信号(IRQ)が出力されると、マスタCPUを含む外部装置では、割り込み信号(IRQ)を受け取るとすぐに、もしくは割り込み信号に対する処理に移行できる時点で割り込み処理タスク(ルーチン)に移行する。
【0020】
マスタCPUを含む外部装置で行われる割り込み処理タスク(ルーチン)において、マスタCPUを含む外部装置は、スレーブCPUからの割り込み信号(IRQ)がどのような理由で出力されたかを外部バスを介して割り込みレジスタの内容を読み取ることにより知り、その情報に基づいて的確な割り込み処理タスク(ルーチン)を実行する。その際、割り込みレジスタには、例えば実行が完了したタスクを示すデータ・コードやタスク完了時のスレーブCPUの状態やタスク結果(データなど)や完了時もくしは中途終了時のエラーコード等が書かれている。
【0021】
▲6▼ マスタCPUを含む外部装置が、割り込み処理タスク中で割り込みレジスタの内容を読み出した後は、マスタCPUを含む外部装置への割り込み信号(IRQ)の出力停止と、できればスレーブCPUに対してマスタCPUを含む外部装置が割り込み処理タスクを実行していることを知らせる割り込み応答信号の出力を行うことが望ましい。これにより、上記のようなマルチCPU構成のシステムにおける制御の信頼性を向上させることができる。
【0022】
割り込み信号(IRQ)の出力停止方法については、マスタCPUを含む外部装置が割り込みレジスタの内容を読み出した後に、割り込みレジスタに対して外部バスを介して割り込み信号(IRQ)を発生しないデータ・コードを書き込む。この構成に代えて、図示しないが、スレーブCPUにおいてマスタCPUを含む外部装置が割り込みレジスタの内容を読み出したことを検出し、この検出信号により自動的に割り込みレジスタに対して割り込み信号(IRQ)を発生しないデータ・コードを書き込むとか初期状態にリセットさせるものであってもよい。また、簡易的にマスクレジスタに対しても同様の考え方の処理を行って割り込み信号(IRQ)の出力を停止させることも可能である。
【0023】
割り込み応答信号の出力の方法については、マスCPUを含む外部装置が割り込みレジスタに対して外部バスを介して応答としてデータ・コードを書き込むことで、割り込み信号(IRQ)を発生させる場合と同様な信号処理を割り込み条件論理回路部で行うようにする。あるいは、図示されていないが、割り込み条件論理回路部内にマスタCPUを含む外部装置が外部バスを介してアクセス(書き込み/読み出し)できる割り込み応答信号の出力の可否を決める、例えばレジスタやラッチ回路といった記憶手段を設ける構成としてもよい。
【0024】
▲7▼ 割り込み条件論理回路部について、▲4▼ではスレーブCPUが割り込み信号(IRQ)の出力条件をプログラムで決定・変更できることについて述べているが、割り込み信号(IRQ)の出力条件は必ずしも全てがマスタCPUを含む外部装置が割り込み受け付けを必要とする条件になっていない場合がある。この場合、マスタCPUを含む外部装置が、割り込み条件論理回路部にアクセス(書き込み・読み出し・変更)できることが必要である。
【0025】
マスクレジスタの状態についても、マスタCPUを含む外部装置が常に割り込み信号(IRQ)を受け付けることができる状況にあるとは限らないから、同様にマスクレジスタに対してもアクセス(書き込み・読み出し・変更)できるようにされる。
【0026】
図2には、この発明に係るデータ処理装置のうち、制御演算処理部に対応して設けられる割り込み信号発生部の他の一実施例のブロック図が示されている。
図1の実施例では、スレーブCPUからマスタCPUを含む外部装置に対する割り込み信号(IRQ)の出力において、割り込みレジスタが1つの要因データ・コードを伝えるものとして例示的に説明されている。
【0027】
この実施例では、割り込みレジスタと割り込み条件論理回路部との間にマスクレジスタが設けられる。このマスクレジスタにより、割り込みレジスタにおいて複数の要因データ・コードを同時に書き込だり、言い換えるなれば、複数の要因データ・コードを設定したり、要因とは直接的に関係のないコメント的なデータ・コードを書き込む(割り込みレジスタの全てが割り込み条件論理回路部に入力もしくは影響されない構成であれば同様の機能が実現できる)ことが可能とするものである。
【0028】
マスクレジスタの構成に関しても、同図では明示されていないが、割り込みレジスタの全てのビットに対応してマスクレジスタがビットを持つ必要はなく、システム仕様に合わせて任意に構成することができる。
【0029】
図3には、割り込み条件論理回路部の一実施例の論理回路図が示されている。この実施例では、割り込みレジスタのデータ・コードを受けるナンド(NAND)ゲート回路を用いることにより、固定的な回路により構成している。すなわち、同図の実施例では、割り込みレジスタのnビットが全て論理1になると、ナンドゲート回路によりロウレベルの割り込み信号が発生される。
【0030】
図4には、割り込み条件論理回路部の他の一実施例の論理回路図が示されている。この実施例では、フリップフロップ(F/F)により制御されるゲート回路を介して割り込み信号を発生させるナンドゲート回路に割り込みレジスタのデータ・コードを入力する構成とされる。上記フリップフロップ(F/F)への書き込みにより、割り込みレジスタのデータ・コードの選択的な出力を制御することができるから、割り込み条件論理をプログラマブルにすることができる。
【0031】
なお、実際のシステムへの応用においては、図3や図4の実施例に限定されるものではなく、システムの実体に合わせて多種多様な割り込み条件論理回路の実現方法を採ることができるものである。
【0032】
図5には、この発明に係るデータ処理装置を用いたデータ処理システムの一実施例の概略ブロック図が示されている。
この実施例では、複数のマイクロコンピュータ(CPU)を駆使して一連のデータ処理を行うシステムであり、システム全体の制御を受け持つマスタCPUと一部の制御機能を専業とし、あるいは特殊機能を高性能化とするために設けられた複数からなるスレーブCPU0,CPU1とから構成される。他の周辺コントローラは上記スレーブCPU0又はCPU1等と等価であるので省略されている。また、メモリ装置等はこの発明には直接関係がないので省略されている。
【0033】
スレーブCPU0とCPU1は、それぞれが前記図1又は図2の実施例のような割り込み発生制御部を持つ。同図には、この割り込み発生制御部を代表して、割り込みレジスタとゲート回路Gate が例示的に示されている。
【0034】
マスタCPUは、レーブCPU0とCPU1に対応した割り込み入力端子IRQ-in0とIRQ-in1を持つ。マスタCPUは、アドレス指定によりスレーブCPU0とCPU1の選択を指示する。すなわち、デコーダは、マスタCPUからのアドレス情報を解読し、スレーブCPU0又はCPU1へのアクセスを解読すると、選択信号CSを発生させてスレーブCPU0又はCPU1の選択し、データバスを介してコマンド等を送出する。このような選択動作は、マスタCPU側からみれば、メモリ装置等の周辺機器に対する選択動作と同様に行うことができる。
【0035】
マスタCPUからスレーブCPU0又はCPU1等に対する起動の方法は、前記のようなアドレス指定とデータバスを介したコマンドの送出により行うもの他、専用の制御信号線等により行う構成としてもよい。
【0036】
スレーブCPU0,CPU1側からマスタCPUに対する割り込み発生とそれに対応したマスタCPUの応答動作に関しては、前記図1の説明と同様であるので、省略する。
【0037】
上記の実施例から得られる作用効果は、下記の通りである。すなわち、
(1) マイクロコンピュータを構成する命令を解釈し実行する制御演算処理部に対応して任意ビット長の割り込みレジスタと割り込み条件論理部からなる割り込み発生制御部を設けて、他の装置に対する割り込み信号の発生と割り込みレジスタの内容の読み出しを可能にすることにより、割り込みを受け付けた他の装置ではバス等のデータ通信手段を用いて割り込みレジスタの内容を読み取ることができる。したがって、割り込みを受け付けた装置において割り込みの発生の意味や通信情報を素早く知ることができるという効果が得られる。
【0038】
(2) 上記(1)により、既に開発されているマイクロコンピュータに割り込み発生制御部を追加することにより、複数のマイクロコンピュータ(CPU)を駆使して、一連の制御を行うデータ処理システムを構成するとき、システム全体の制御を受け持つマスタCPUと、一部の制御機能を専業とし、又は特殊機能の高性能化のために設けられたスレーブCPU等の間の命令単位の同期を採る際、割り込み信号を用いて応答性の良い通信方式を容易に実現できるので、分散制御においてもリアルタイムOS制御下のマスタCPUとスレーブCPU間の高速割り込み応答性を実現できるという効果が得られる。
【0039】
以上本発明者よりなされた発明を実施例に基づき具体的に説明したが、本願発明は前記実施例に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。例えば、割り込み発生制御部が設けられるスレーブCPUは、マイクロコントロール機能を持つものであれば何であってもよい。割り込み条件論理部は、割り込みレジスタをn系統持たせて付加情報を多く受け渡せるようにしたり、タスクごとに独立して管理するようにしてもよい。電気的に書き込みが可能なプログラマブル記憶素子を用いて、ユーザー自身が割り込み条件論理を設定できるようにするものであってもよい。
この発明は、データ処理装置に広く利用できる。
【0040】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば、下記の通りである。分散制御型システムを採用した場合に、上記のマイクロコンピュータを採用することにより汎用性・応答性のよいシステムを容易に構築することができる。
【図面の簡単な説明】
【図1】この発明に係るデータ処理装置の制御演算処理部に対応して設けられる割り込み信号発生部の一実施例を示すブロック図である。
【図2】この発明に係るデータ処理装置の制御演算処理部に対応して設けられる割り込み信号発生部の他の一実施例を示すブロック図である。
【図3】上記割り込み信号発生部に設けられる割り込み条件論理回路部の一実施例を示す論理回路図である。
【図4】上記割り込み信号発生部に設けられる割り込み条件論理回路部の他の一実施例を示す論理回路図である。
【図5】この発明に係るデータ処理装置を用いたデータ処理システムの一実施例を示す概略ブロック図である。
【符号の説明】
IRQ…割り込み信号、F/F…フリップフロップ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcomputer, for example, a technique effective for use in an interrupt function in a microcomputer and its peripheral controller.
[0002]
[Prior art]
A conventional microcomputer has a built-in peripheral function and a function of accepting an interrupt from an external device, and the acceptance priority and the interrupt from the peripheral function are defined in detail (publicly available). An example of a microcomputer having such an interrupt function is “Hitachi Single Chip Computer H8 / 500 Series Programming Manual: ADJ-602-022” issued by Hitachi, Ltd. When designing a system using multiple microcomputers, use the serial communication function built into the single-chip microcomputer, or configure the general-purpose port as a parallel handshake port according to the original specification, and communicate between the microprocessors. And synchronize instruction units.
[0003]
[Problems to be solved by the invention]
The inventor of the present application configures a system that performs a series of data processing by making full use of a plurality of microcomputers (CPUs), and specializes in a master CPU that controls the entire system and some control functions, or In order to synchronize instruction units with a slave CPU provided to improve the performance of special functions, a communication control system with good responsiveness using an interrupt signal was examined.
[0004]
In this case, when the slave CPU receives a control command or an operation start trigger from the master CPU, the slave CPU starts a control process assigned to itself, and immediately notifies the master CPU when the process ends and operates. To complete. At that time, if the master CPU manages a plurality of slave CPUs, it is necessary to know which slave CPU has completed which task and in what state.
[0005]
The conventional interrupt method is not designed for a high-performance system that makes full use of multiple microcomputers, and is designed to focus on accepting interrupts. The idea of generating is not made. Therefore, when constructing a distributed control type system using a plurality of microcomputers, serial communication or a general-purpose parallel port is used as described above. However, in the former serial communication, communication between relatively remote CPUs has a small number of wires and is resistant to noise, but a large amount of information can be transmitted / received in a short time and responsiveness is required. Not suitable for the system. The latter general-purpose parallel port is difficult to standardize because it is configured according to the function of the CPU used and the user specifications, and it is not suitable for cost reduction and miniaturization because it requires external parts. .
[0006]
In a data processing system with high performance, an 8 / 16-bit single-chip microcomputer is frequently used, and a real-time OS is generally used in distributed control. However, as the performance of the system becomes higher, the demands are increasing. Therefore, it has been considered to synchronize the master CPU and the slave CPU in units of instructions while improving the responsiveness using an interrupt signal.
[0007]
An object of the present invention is to provide a microcomputer having an interrupt function with improved versatility and responsiveness.
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
[0008]
[Means for Solving the Problems]
The outline of a typical invention among the inventions disclosed in the present application will be briefly described as follows. That is, there is a microcomputer capable of performing a series of task processing by inputting a predetermined instruction from an external device, a control arithmetic unit that interprets and executes the instruction, and interrupt information corresponding to the control arithmetic unit interrupt register for storing a interrupt generation control interrupt condition logic that sets an interrupt generation condition for outputting an interrupt signal to the external device is accessible by both the microcomputer and the external device itself Part.
[0009]
According to the above-described means, when a distributed control type system is adopted, a system having good versatility and responsiveness can be easily constructed by adopting the microcomputer.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows a block diagram of an embodiment of an interrupt signal generation unit provided corresponding to a control arithmetic processing unit in the data processing apparatus according to the present invention. The data processing device of this embodiment is not particularly limited, but is directed to a slave CPU (microcomputer).
[0011]
The interrupt signal generator is provided corresponding to the control arithmetic unit of the slave CPU, and is provided separately from the conventional publicly available interrupt circuit.
The interrupt generation unit is connected to the control arithmetic unit and the like via an internal bus of the slave CPU, and is configured to be accessible to the inside via an external bus from an external device including an external master CPU. An interrupt signal (IRQ) is output to an external device including an external mask CPU.
[0012]
The interrupt generation control section is roughly an interrupt register having an arbitrary bit length (n bits) for writing interrupt information, and an interrupt condition logic circuit section (Gate etc.) for setting (determining) the conditions for generating an interrupt signal. And a mask register that permits / prohibits the output of the interrupt signal regardless of the establishment of the condition.
[0013]
The slave CPU uses the interrupt generation control unit to report the end of a series of tasks and the situation at the end of the series to the external device including the master CPU, or the situation that occurs during the series of tasks. An interrupt signal (IRQ) is output. The procedure until the interrupt signal is output is as follows.
[0014]
(1) In the initial state of the slave CPU, an interrupt signal (IRQ) is not output from the contents of the interrupt register and the mask register due to a reset signal when the power is turned on.
[0015]
{Circle around (2)} The slave CPU starts operation upon receiving a command for processing a series of tasks from an external device including the master CPU by some means.
[0016]
(3) The slave CPU writes the task completion status and the like to the interrupt register via the internal bus when the series of task processing is completed.
[0017]
(4) The contents written in the interrupt register are input to the interrupt condition logic unit, and the interrupt condition is satisfied in the mask register only when the bit sequence (data code) satisfies the interrupt generation condition. A signal indicating that this has occurred is output. The sequence (data code) that satisfies the interrupt generation condition is, for example, a data code other than the data code written in the initial state described in (1), an arbitrary data code, It is also a collection of them.
[0018]
In the interrupt condition logic circuit section that determines the conditions for generating an interrupt, these conditional expressions are fixedly configured by hardware such as a logic gate (Gate), or registers and latch circuits connected to the internal bus etc. in the logic gate By combining programmable circuits and elements, the conditional expressions can be changed statically and dynamically according to the user's wishes. A signal indicating that the interrupt condition output from the interrupt condition logic circuit unit input to the mask register is satisfied can cause an external device including the master CPU to output an interrupt signal (IRQ) depending on the state of the mask register. Or masked (output prohibited).
[0019]
(5) When an interrupt signal (IRQ) is output from the slave CPU, the external device including the master CPU receives the interrupt signal (IRQ) immediately or when it can move to processing for the interrupt signal ( Routine).
[0020]
In an interrupt processing task (routine) performed by an external device including the master CPU, the external device including the master CPU interrupts the reason why the interrupt signal (IRQ) from the slave CPU is output via the external bus. It knows by reading the contents of the register and executes an appropriate interrupt processing task (routine) based on the information. At that time, for example, the data code indicating the task that has been executed, the status of the slave CPU at the time of task completion, the task result (data, etc.), the completion code or the error code at the time of completion are written in the interrupt register. It has been.
[0021]
(6) After the external device including the master CPU reads the contents of the interrupt register during the interrupt processing task, the output of the interrupt signal (IRQ) to the external device including the master CPU is stopped, and preferably to the slave CPU. It is desirable to output an interrupt response signal notifying that an external device including the master CPU is executing an interrupt processing task. Thereby, it is possible to improve the reliability of control in the system having the multi-CPU configuration as described above.
[0022]
Regarding the method of stopping the output of the interrupt signal (IRQ), after an external device including the master CPU reads the contents of the interrupt register, a data code that does not generate an interrupt signal (IRQ) via the external bus is provided to the interrupt register. Write. In place of this configuration, although not shown in the figure, the slave CPU detects that the external device including the master CPU has read the contents of the interrupt register, and this detection signal automatically sends an interrupt signal (IRQ) to the interrupt register. A data code that does not occur may be written or reset to an initial state. It is also possible to simply stop the output of the interrupt signal (IRQ) by performing the same concept process for the mask register.
[0023]
The method for the output of the interrupt response signal, by writing a data code as a response via the external bus external device to the interrupt register including a master CPU, similar to the case of generating an interrupt signal (IRQ) The signal processing is performed in the interrupt condition logic circuit unit. Alternatively, although not shown, a memory such as a register or a latch circuit determines whether or not to output an interrupt response signal that can be accessed (written / read) by an external device including the master CPU in the interrupt condition logic circuit unit via the external bus. It is good also as a structure which provides a means.
[0024]
(7) Regarding the interrupt condition logic circuit section, (4) describes that the slave CPU can determine and change the output condition of the interrupt signal (IRQ) by the program, but the interrupt signal (IRQ) output condition is not necessarily all There are cases where the external device including the master CPU is not in a condition that requires interrupt acceptance. In this case, an external device including the master CPU needs to be able to access (write / read / change) the interrupt condition logic circuit unit.
[0025]
As for the state of the mask register, the external device including the master CPU is not always in a state where it can always accept the interrupt signal (IRQ), and thus the mask register is also accessed (write / read / change). Be made possible.
[0026]
FIG. 2 is a block diagram showing another embodiment of the interrupt signal generator provided corresponding to the control arithmetic processor in the data processor according to the present invention.
In the embodiment of FIG. 1, the interrupt register is illustratively described as transmitting one factor data code in the output of the interrupt signal (IRQ) from the slave CPU to the external device including the master CPU.
[0027]
In this embodiment, a mask register is provided between the interrupt register and the interrupt condition logic circuit unit. With this mask register, multiple cause data codes can be written at the same time in the interrupt register, in other words, multiple cause data codes can be set, or commentary data codes that are not directly related to the cause (A similar function can be realized if all the interrupt registers are not input to or influenced by the interrupt condition logic circuit section).
[0028]
The configuration of the mask register is not explicitly shown in the figure, but the mask register does not have to have bits corresponding to all bits of the interrupt register, and can be arbitrarily configured according to the system specifications.
[0029]
FIG. 3 shows a logic circuit diagram of an embodiment of the interrupt condition logic circuit unit. In this embodiment, a NAND (NAND) gate circuit that receives the data code of the interrupt register is used to constitute a fixed circuit. That is, in the embodiment shown in the figure, when all the n bits of the interrupt register become logic 1, a low level interrupt signal is generated by the NAND gate circuit.
[0030]
FIG. 4 shows a logic circuit diagram of another embodiment of the interrupt condition logic circuit section. In this embodiment, the data code of the interrupt register is input to a NAND gate circuit that generates an interrupt signal through a gate circuit controlled by a flip-flop (F / F). Since the selective output of the data code of the interrupt register can be controlled by writing to the flip-flop (F / F), the interrupt condition logic can be made programmable.
[0031]
The actual system application is not limited to the embodiment shown in FIG. 3 and FIG. 4, and various methods for implementing an interrupt condition logic circuit can be adopted in accordance with the system entity. is there.
[0032]
FIG. 5 is a schematic block diagram showing an embodiment of a data processing system using the data processing apparatus according to the present invention.
In this embodiment, a system that performs a series of data processing using a plurality of microcomputers (CPUs), specializes in a master CPU and a part of control functions for controlling the entire system, or special functions with high performance. It is composed of a plurality of slave CPUs 0 and CPU 1 provided for the purpose. The other peripheral controllers are omitted because they are equivalent to the slave CPU0 or CPU1. Memory devices and the like are omitted because they are not directly related to the present invention.
[0033]
Each of the slave CPU0 and CPU1 has an interrupt generation control unit as in the embodiment of FIG. 1 or FIG. In the figure, an interrupt register and a gate circuit Gate are exemplarily shown on behalf of the interrupt generation control unit.
[0034]
The master CPU has a slave CPU0 and interrupt input terminal IRQ-in0 corresponding to CPU1 and IRQ-in1. The master CPU instructs selection of the slave CPU0 and CPU1 by addressing. In other words, the decoder decodes the address information from the master CPU, decodes the access to the slave CPU0 or CPU1, generates a selection signal CS, selects the slave CPU0 or CPU1, and sends a command or the like via the data bus. To do. Such a selection operation can be performed in the same manner as the selection operation for a peripheral device such as a memory device when viewed from the master CPU side.
[0035]
The starting method from the master CPU to the slave CPU 0 or CPU 1 or the like may be performed by a dedicated control signal line or the like in addition to the above address designation and command transmission via the data bus.
[0036]
The generation of an interrupt from the slave CPU0, CPU1 side to the master CPU and the corresponding response operation of the master CPU are the same as in the description of FIG.
[0037]
The effects obtained from the above embodiment are as follows. That is,
(1) An interrupt generation control unit comprising an interrupt register having an arbitrary bit length and an interrupt condition logic unit is provided in correspondence with a control arithmetic processing unit that interprets and executes instructions constituting the microcomputer, and transmits interrupt signals to other devices. By enabling the generation and reading of the contents of the interrupt register, other devices that accept the interrupt can read the contents of the interrupt register using data communication means such as a bus. Therefore, it is possible to quickly know the meaning of the occurrence of the interrupt and the communication information in the device that has accepted the interrupt.
[0038]
(2) According to (1) above, by adding an interrupt generation control unit to a microcomputer that has already been developed, a data processing system that performs a series of controls by using a plurality of microcomputers (CPUs) is configured. When synchronizing instruction units between a master CPU that is in charge of overall system control and a part of the control functions or a slave CPU that is provided to improve the performance of special functions. Since a communication system with good responsiveness can be easily realized using the above, an effect of realizing high-speed interrupt responsiveness between the master CPU and slave CPU under real-time OS control can be obtained even in distributed control.
[0039]
The invention made by the inventor has been specifically described based on the embodiments. However, the invention of the present application is not limited to the embodiments, and various modifications can be made without departing from the scope of the invention. Nor. For example, the slave CPU provided with the interrupt generation control unit may be anything as long as it has a micro control function. The interrupt condition logic unit may have n systems of interrupt registers so that a large amount of additional information can be delivered, or may be managed independently for each task. It is also possible to use an electrically writable programmable memory element to allow the user himself to set the interrupt condition logic.
The present invention can be widely used in data processing apparatuses.
[0040]
【The invention's effect】
The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows. When a distributed control system is employed, a system with good versatility and responsiveness can be easily constructed by employing the above-described microcomputer.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of an interrupt signal generating unit provided corresponding to a control arithmetic processing unit of a data processing apparatus according to the present invention;
FIG. 2 is a block diagram showing another embodiment of the interrupt signal generating unit provided corresponding to the control arithmetic processing unit of the data processing apparatus according to the present invention;
FIG. 3 is a logic circuit diagram showing an embodiment of an interrupt condition logic circuit provided in the interrupt signal generator.
FIG. 4 is a logic circuit diagram showing another embodiment of the interrupt condition logic circuit provided in the interrupt signal generator.
FIG. 5 is a schematic block diagram showing an embodiment of a data processing system using the data processing apparatus according to the present invention.
[Explanation of symbols]
IRQ: Interrupt signal, F / F: Flip-flop.

Claims (4)

所定の命令を外部装置から入力されることにより一連のタスク処理を行うことが可能なマイクロコンピュータにおいて、
上記マイクロコンピュータは、
上記所定の命令を解釈し実行する制御演算部と、
上記制御演算部に対応して設けられた割り込みレジスタと上記外部装置へ割り込み信号を出力するための割り込み発生条件を設定する割り込み条件論理部とを含む割り込み発生制御部を有し、
上記割り込みレジスタは、複数のビットで構成され、上記外部装置に伝えるべき情報を含んだ複数の割り込み要因を格納可能に構成され、
上記割り込み条件論理部は、上記割り込みレジスタに格納された割り込み条件を示すビット数に対応するビット数を有するマスクレジスタを有し、更に、上記マイクロコンピュータ及び上記外部装置の両方によりアクセス可能とされ、
上記マスクレジスタは、上記複数の割り込み要因のそれぞれに対して上記割り込み信号の出力を許可もしくは禁止することを設定可能で、
上記割り込み発生制御部は、上記マスクレジスタの状態に応じて、上記割り込みレジスタに格納された割り込み条件を示すビットの並びが割り込み条件を満たすときに割り込み信号を上記外部装置へ出力することが可能であることを特徴とするマイクロコンピュータ。
In a microcomputer capable of performing a series of task processing by inputting a predetermined instruction from an external device,
The microcomputer is
A control operation unit for interpreting and executing the predetermined instruction;
An interrupt generation control unit including an interrupt register provided corresponding to the control operation unit and an interrupt condition logic unit for setting an interrupt generation condition for outputting an interrupt signal to the external device;
The interrupt register is composed of a plurality of bits, and is configured to store a plurality of interrupt factors including information to be transmitted to the external device.
Said interrupt condition logic unit is to have a mask register having a number of bits corresponding to the number of bits representing the interrupt condition stored in said interrupt register further configured to be accessed by both the microcomputer and the external device,
The mask register can be set to permit or prohibit the output of the interrupt signal for each of the plurality of interrupt factors.
The interrupt generation control unit can output an interrupt signal to the external device when the bit sequence indicating the interrupt condition stored in the interrupt register satisfies the interrupt condition according to the state of the mask register. microcomputer, characterized in that.
請求項1において、
上記アクセスは、上記割り込み条件論理部に含まれる割り込みレジスタおよびマスクレジスタへの書込み・読出し・変更を含むことを特徴とするマイクロコンピュータ。
In claim 1,
2. The microcomputer according to claim 1, wherein the access includes writing / reading / modifying an interrupt register and a mask register included in the interrupt condition logic unit.
請求項1又は2において、
上記割込み条件論理部は、割り込み条件論理回路部を有することを特徴とするマイクロコンピュータ。
In claim 1 or 2,
The microcomputer, wherein the interrupt condition logic unit includes an interrupt condition logic circuit unit.
請求項1から3の何れか一つにおいて、
上記マイクロコンピュータは、上記外部装置が上記割り込みレジスタの内容を読み出したことを検出し、上記割り込みレジスタを初期状態に設定する又は割込みを発生させないデータコードを上記割り込みレジスタに対し書き込むことを特徴とするマイクロコンピュータ。
In any one of Claim 1 to 3,
The microcomputer detects that the external device has read the contents of the interrupt register, and sets the interrupt register to an initial state or writes a data code that does not generate an interrupt to the interrupt register. Microcomputer.
JP2003062995A 2003-03-10 2003-03-10 Microcomputer Expired - Lifetime JP3807616B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003062995A JP3807616B2 (en) 2003-03-10 2003-03-10 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003062995A JP3807616B2 (en) 2003-03-10 2003-03-10 Microcomputer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP07841892A Division JP3547012B2 (en) 1992-02-28 1992-02-28 Microcomputer

Publications (2)

Publication Number Publication Date
JP2003296130A JP2003296130A (en) 2003-10-17
JP3807616B2 true JP3807616B2 (en) 2006-08-09

Family

ID=29398142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003062995A Expired - Lifetime JP3807616B2 (en) 2003-03-10 2003-03-10 Microcomputer

Country Status (1)

Country Link
JP (1) JP3807616B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007275209A (en) * 2006-04-05 2007-10-25 Daiman:Kk Game machine
JP4820692B2 (en) * 2006-05-30 2011-11-24 Okiセミコンダクタ株式会社 Sensor control circuit
JP5087884B2 (en) * 2006-08-11 2012-12-05 富士通セミコンダクター株式会社 Data processing unit and data processing apparatus using the same

Also Published As

Publication number Publication date
JP2003296130A (en) 2003-10-17

Similar Documents

Publication Publication Date Title
US5117498A (en) Processer with flexible return from subroutine
US4112490A (en) Data transfer control apparatus and method
KR900004006B1 (en) Micro processor system
JP4855451B2 (en) Storage device access method and apparatus
US4926319A (en) Integrated circuit timer with multiple channels and dedicated service processor
EP0354998B1 (en) Timer channel for use in a multiple channel timer system
EP0355463B1 (en) Timer channel with multiple timer reference features
JP4226085B2 (en) Microprocessor and multiprocessor system
EP0355462B1 (en) Dedicated service processor with inter-channel communication features
EP0355465B1 (en) Timer channel with match recognition features
US20050097398A1 (en) Program debug method and apparatus
US4947478A (en) Switching control system for multipersonality computer system
US5664198A (en) High speed access to PC card memory using interrupts
JP3807616B2 (en) Microcomputer
US5204957A (en) Integrated circuit timer with multiple channels and dedicated service processor
JP3547012B2 (en) Microcomputer
CN114780248A (en) Resource access method, device, computer equipment and storage medium
JP3795978B2 (en) Microprocessor and multiprocessor system
JP3323341B2 (en) Emulation processor and emulator equipped with it
JP3006487B2 (en) Emulation device
JPH09167117A (en) Microcomputer and real time system using the microcomputer
JP2002541582A (en) Method and system for updating user memory in an emulator system
JPS5840619A (en) Sequence controller and its control method
JPH10247187A (en) One-chip microcomputer
JPH07302255A (en) Semiconductor integrated circuit device, processor for emulating the same and emulator

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051117

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060418

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060511

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060511

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100526

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110526

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110526

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20110526

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120526

Year of fee payment: 6

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120526

Year of fee payment: 6