JP4057769B2 - Interrupt management device and interrupt management method - Google Patents

Interrupt management device and interrupt management method Download PDF

Info

Publication number
JP4057769B2
JP4057769B2 JP2000264199A JP2000264199A JP4057769B2 JP 4057769 B2 JP4057769 B2 JP 4057769B2 JP 2000264199 A JP2000264199 A JP 2000264199A JP 2000264199 A JP2000264199 A JP 2000264199A JP 4057769 B2 JP4057769 B2 JP 4057769B2
Authority
JP
Japan
Prior art keywords
interrupt
task
processing
information
management
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
JP2000264199A
Other languages
Japanese (ja)
Other versions
JP2002073350A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2000264199A priority Critical patent/JP4057769B2/en
Publication of JP2002073350A publication Critical patent/JP2002073350A/en
Application granted granted Critical
Publication of JP4057769B2 publication Critical patent/JP4057769B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、コンピュータ処理のリアルタイム・オペレーションシステム(リアルタイムOS)並びにマルチタスク・オペレーションシステム(マルチタスクOS)と信号処理用プロセッサ(以下、DSPと呼ぶ)における割り込み管理を行うものであり、W−CDMA(Wide band-Code Division Multiple Access)方式を用いた携帯テレビ電話装置等の画像端末装置に用いて好適な割り込み管理装置及び割り込み管理方法に関する。
【0002】
【従来の技術】
従来、マイクロプロセッサ・システムにおいては、マイクロプロセッサ(以下CPUと記す)がプログラムの処理を実行中に、外部デバイスまたは外部装置からの割り込み要求または実行中の応用プログラムからのソフトウェア割り込み要求(以下、割り込み要求と総称する)という種々の要因によって発生する非同期の割り込み要求が発生したときに、実行中のプログラム処理を中断して割り込み要求を処理するようにしている。
【0003】
一方、DSPにおいては、上記CPUに対するものとして内部にメインプロセッサ(以下MPと記す)を有しており、このMPがプログラムの処理を実行中に割り込み要求が発生した際に、実行中のプログラム処理を中断して割り込み要求を処理する。なお、以下の説明において、プログラムの最小単位をタスクと記すこととする。
【0004】
割り込み要求に対して処理する内容は、割り込み要因ごとに異なるので、予め割り込み要因ごとに割り込み処理ルーチン(以下、割り込み処理タスクと記す)を作成しておき(ユーザーが作成する)、割り込み要求があったときに、割り込みの発生を伝える割り込み制御手段(以下、割り込みコントローラと呼ぶ)がCPUもしくはMPに伝え、これによりCPUもしくはMPが割り込み要因を識別し、該当する割り込み処理タスクを呼び出して処理する方法が用いられている。
【0005】
割り込み要求の発生によりCPUもしくはMPが、実行中のタスク処理を中断する際には、再開するタスクのアドレスやそれまで使用していたCPUもしくはMPの内部レジスタの内容(以下、処理中演算リソースと記す)を保存した後、割り込み処理タスクを実行する。そして、割り込み処理タスクが終了した時に、これらのレジスタを元の状態に戻して実行中であったタスク処理を再開する。
【0006】
割り込み処理タスクの中で処理中演算リソースの退避・復帰処理を記述することは割り込み処理タスクの作成を煩雑にするため、CPUを有するマイクロプロセッサ・システムにおいては、これらの処理をリアルタイムOS並びにマルチタスクOS(以下、OS:オペレーティングシステムと総称する)の割り込み管理機構を呼び出すこと(以下、システムコールと記す)によって行うのが普通である。
【0007】
また、MPを有するDSPにおいては、割り込み処理タスクと分離した1つの別タスクのソフトウェア(通常DSPではマイクロコード、ファームウェアと呼ばれるもの)としてのモニタ・プログラムとして構築するのが普通である。以下、システムコールとモニタ・プログラムを割り込みハンドラと総称して記す。
【0008】
さらに、割り込み処理として、単独割り込み(割り込み処理を行っている間は、他の割り込みの受け付けを禁止する割り込み)では、割り込みが発生した時に、割り込みハンドラで処理中演算リソースをそのタスクのスタック領域とタスク制御手段へ退避し、同時に割り込みマスクをマスクして他の割り込みを禁止状態にし、割り込み処理を行う。そして、割り込み処理が完了し、中断したタスクの実行再開の時にタスクのスタック情報、タスクの制御手段、割り込みマスクを回復させる。
【0009】
また、多重割り込み(割り込み処理を行っている間にも、他の割り込みの受け付けを可能とする割り込み)を有する割り込みハンドラにおいては、単独割り込みに対して、割り込みマスクを禁止する際にすべての割り込みを禁止せず、上位の割り込みレベルに対する割り込みマスクを設定せずに割り込み処理を行う。このことは、多重割り込みを有する割り込みハンドラにおいては、割り込み種別毎に割り込みが発生した場合に、どの割り込みを禁止するかを判定する必要がある。
【0010】
また、割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合、ソフトウェア割り込みを用いて違う割り込みレベルを持つ割り込み処理タスクとして割り込みを発生し、処理する方法が用いられている。
【0011】
【発明が解決しようとする課題】
しかしながら、従来の割り込み管理方法においては、次のような問題がある。(1)割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などでは、割り込みハンドラの処理を変更することが必要になる。しかし、割り込みハンドラと割り込み処理タスクが密接に関連しているので、割り込みハンドラや割り込み処理タスクによる割り込み処理内容の変更を単独に行うことが困難である。
【0012】
(2)OSを用いた割り込み管理方法では、全ての割り込み要因に対してOS内にある割り込みハンドラが一括して割り込みの禁止/許可の処理を行っており、ユーザはOS内の割り込みハンドラの割り込み管理状態を意識して割り込み処理タスクを作成する必要がある。
【0013】
(3)OS内の割り込みハンドラの割り込み管理状態に依存しない割り込み処理が構築が困難である。
【0014】
(4)割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合に、ソフトウェア割り込みを用いて違う割り込みレベルを持つ割り込み処理タスクとして割り込みを発生し処理する方法では、ソフトウェア割り込みにより新たな割り込み要求が発生するために、処理中演算リソースの退避・復帰処理が必要となり、処理効率が悪くなる。
【0015】
(5)特開平5−224951号公報には、割り込み要求を受けたCPUより起動されたときに、ソフトウェア割り込みを指定して割り込みハンドラへの処理移行前にOSに処理を移行させる二重割り込指定手段と、この二重割り込指定手段を介して処理が移行されたときに、OS内で割り込み要因の解析とレジスタ類の保存を行って割り込みハンドラを起動する割り込ハンドラ起動手段と、割り込ハンドラより割り込み処理の終了が通知されたときにOS内でレジスタ類の復帰を行い、中断した処理を再開させる割り込ハンドラ終了処理手段と、を備える管理方式が開示されている。
【0016】
しかしながら、この公報に記載された技術の場合、OS内でのレジスタ類の退避・復帰処理と割り込みハンドラでの処理を、二重割り込指定手段を設けることにより分離し、割り込みハンドラの作成効率の向上が図れるようになっているが、
割り込みハンドラと割り込み処理タスクを分離する手段については何ら開示されておらず、依然として割り込みハンドラや割り込み処理タスクによる割り込み処理内容の変更が単独に行えないという問題がある。
【0017】
さらに、ソフトウェア割り込みを指定して割り込みハンドラへの処理移行前にOSに処理を移行させる二重割り込指定手段を用いているため、処理中演算リソースの退避・復帰処理が必要となる。すなわち、処理効率が悪くなるという問題を何ら解決できてない。
【0018】
本発明はかかる点に鑑みてなされたものであり、割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などの割り込みハンドラの処理を変更する必要がある場合に、割り込みハンドラや割り込み処理タスクによる割り込み処理内容の変更が容易に行え、
【0019】
また、OSを用いた割り込み管理方法で、全ての割り込み要因に対してOS内にある割り込みハンドラが一括して割り込みの禁止/許可の処理を行っている場合においても、ユーザがOS内の割り込みハンドラの割り込み管理状態を意識せず割り込み処理タスクを作成でき、
【0020】
さらに、OS内の割り込みハンドラの割り込み管理状態に依存しない割り込み処理を構築することができ、割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合に、処理中演算リソースの退避・復帰処理を必要とするソフトウェア割り込みを指定せずに実現できる、割り込み管理装置及び割り込み管理方法を提供することを目的とする。
【0021】
【課題を解決するための手段】
本発明の割り込み管理装置は、割り込みマスクで割り込みハンドラへの割り込み通知の制御を行う割り込み制御手段と、前記割り込みハンドラとは独立に設けられ、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受付可能状態を保持する割り込み受付可能管理手段及び割り込み処理タスクにおける割り込み要因に対する割り込みマスクの解除を制御する割り込みマスク解除制御手段及び割り込み処理タスクからのタスク切り替え情報を管理する割り込みタスクスイッチ管理手段と、を具備する割り込み管理装置であって、前記割り込みハンドラは、割り込みの発生時に実行中のタスクの情報を退避する退避処理手段と、割り込みの要因に応じて処理すべき割り込み処理タスクを決定する割り込み要因判定処理手段と、前記割り込み受付可能管理手段と前記割り込みマスク解除制御手段の処理に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行う多重割り込み制御手段と、前記割り込み要因判定処理手段で決定された割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行う割り込みタスク制御処理手段と、前記割り込みタスクスイッチ管理手段が管理するタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示があれば割り込み処理タスクに制御を移し、タスク切り替え指示がなければ前記割り込みタスク制御処理手段に制御を移す割り込みタスクスイッチ制御手段と、前記退避処理手段で退避された割り込み発生時に実行中のタスクの情報を復帰し中断していたタスクの処理を再開するタスク復帰処理手段と、を具備する構成を採る。
【0022】
この構成によれば、割り込み発生時に、割り込み制御手段により割り込みハンドラに制御が遷移すると、割り込みハンドラの退避処理手段が、割り込み発生時に実行中であったタスクの種々の情報を退避する。タスクの種々の情報が退避されると、割り込み要因判定処理手段が、割り込み受付可能管理手段を用いて、割り込み制御手段より通知された割り込み要因に対してどの割り込み要因に対する処理を行うかの判定を行い、呼び出す割り込み処理タスクを決定する。
【0023】
割り込み処理タスクが決定されると、多重割り込み制御手段が、その割り込み処理タスクに対する割り込みマスクを、割り込み受付可能管理手段(割り込み要因毎に用意された割り込み受付可能状態を保持する)から取り出し、割り込み制御手段の割り込みマスクに設定する。この際に、割り込み発生時に割り込み制御手段の割り込みマスクにて既に割り込みマスクが設定されているので、割り込み禁止になっている割り込み要因に対する割り込みマスクに対しては変更が行われない。また、割り込み発生時に割り込み制御手段に設定されていた割り込みマスクの状態に対して、割り込み要因判定処理手段で判定された割り込み要因に対するマスクが割り込み禁止状態となり、その割り込みマスクの状態が退避される。さらに、割り込み発生時の割り込み受付可能管理手段の状態も退避される。
【0024】
次に、割り込みタスク制御処理手段が、割り込み要因判定処理手段で決定された割り込み処理タスクを呼び出す。割り込み処理タスクでは、割り込みに対応する処理を行うが、この処理中に新たな割り込み要因が発生して、それに対して割り込み許可を行う場合は、割り込みマスク解除制御手段の、対応する割り込み要因の情報を割り込み解除状態に設定する。また、即座に割り込み許可を行う場合には、同時に割り込みコントローラの割り込みマスクの、対応する割り込みマスクをマスク解除状態に設定する。
【0025】
割り込み処理タスクの処理が終わると、割り込みタスクスイッチ制御手段に処理が移行する。この際、割り込み処理タスクにおいて、割り込み処理タスクの割り込みレベルを、現状と異なる割り込みレベルで処理を行う場合、処理を行う割り込みレベルに対応した割り込みタスクスイッチ管理手段が管理しているタスク切り替え情報が設定されて、割り込みタスクスイッチ制御手段に処理が移行する。
【0026】
割り込みタスクスイッチ制御手段は、割り込みタスクスイッチ管理手段が管理しているタスク切り替え情報を用いて、タスクスイッチ指示に対応する割り込み処理タスクがどの割り込み処理タスクであるかの判定を行い、呼び出す割り込み処理タスクを決定する。そして、割り込みタスクスイッチ管理手段が管理しているタスク切り替え情報を更新して、決定した割り込み処理タスクを呼び出す。割り込みタスクスイッチ管理手段が管理しているタスク切り替え情報が存在しない場合には、割り込みタスク制御処理手段に制御を移す。
【0027】
割り込みタスク制御処理手段は、多重割り込み制御手段により、割り込み処理タスクを呼び出す前に退避された割り込み受付可能管理手段の状態と割り込み処理タスクで設定された割り込みマスク解除制御手段の状態に対して、両方共割り込み許可状態になっている割り込み要因に対して、多重割り込み制御手段により退避された、割り込みマスクの状態の該当ビットを割り込み許可に設定したものを、割り込みコントローラの割り込みマスクに設定する。さらに、この際に割り込み許可状態に変更された割り込み要因に対しては、割り込みマスク解除制御手段の対応する割り込み要因の情報をリセットする。タスク復帰処理手段は、退避処理手段で退避された割り込み発生時に実行中であったタスクの種々の情報を復帰し、中断されていたタスクの処理を再開する。
【0028】
以上のように、割り込み受付可能管理手段と割り込みマスク解除制御手段が、割り込みハンドラとは独立に用意し、多重割り込み制御手段が割り込み受付可能管理手段を用いた制御方法のみを規定するものであるため、割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などの、割り込みハンドラの処理を変更することが必要な際に、割り込み受付可能管理手段と割り込みマスク解除制御手段を変更すればよく、割り込みハンドラの割り込み管理状態を意識せず割り込み処理タスクを作成できる。また、割り込みハンドラの割り込み管理状態に依存しない割り込み処理の構築が可能となる。
【0029】
また、割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合には、処理を行う割り込みレベルに対応した割り込みタスクスイッチ管理手段が管理しているタスク切り替え情報を設定すればよく、処理中演算リソースの退避・復帰処理を必要とするソフトウェア割り込みを指定せずに割り込みレベルの変更が行える割り込み処理の構築が可能となる。
【0030】
また、本発明の割り込み管理装置は、割り込みマスクで割り込みハンドラへの割り込み通知の制御を行う割り込み制御手段と、前記割り込みハンドラとは独立に設けられ、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受付可能状態を保持する割り込み受付可能管理手段及び割り込み処理タスクにおける割り込み要因に対する割り込みマスクの解除を制御する割り込みマスク解除制御手段及び割り込み処理タスクからのタスク切り替え情報を管理する割り込みタスクスイッチ管理手段と、を具備する割り込み管理装置であって、前記割り込みハンドラは、割り込みの発生時に実行中のタスクの情報を退避する退避処理手段と、割り込みの要因に応じて処理すべき割り込み処理タスクを決定する割り込み要因判定処理手段と、前記割り込み受付可能管理手段と前記割り込みマスク解除制御手段の処理に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行う多重割り込み制御手段と、前記割り込み要因判定処理手段で決定された割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行う割り込みタスク制御処理手段と、前記割り込みタスクスイッチ管理手段が管理するタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示があれば割り込み処理タスクに制御を移し、タスク切り替え指示がなければ前記割り込み要因判定処理手段に制御を移す割り込みタスクスイッチ制御手段と、前記退避処理手段で退避された割り込み発生時に実行中のタスクの情報を復帰し中断していたタスクの処理を再開するタスク復帰処理手段と、を具備する構成を採る。
【0031】
この構成によれば、割り込み要因判定処理手段が、割り込み発生時に、割り込み制御手段に設定されていた割り込みマスクの状態に対して、割り込み要因判定処理手段で判定されたマスクの状態、即ち割り込み要因に対するマスクを割り込み禁止状態にした割り込みマスクの状態を用いて、割り込み処理タスクから割り込みハンドラに制御が移る度に同一割り込みレベルに対し再度割り込み要因判定処理を行う。
【0032】
したがって、上記構成の割り込み管理装置の作用に加え、割り込み処理タスクから割り込みハンドラに制御が移る度に同一割り込みレベルの割り込みに対しては処理中演算リソースの復帰処理を行うことなく、再度割り込み要因判定処理が行える割り込み処理の構築が可能となる。
【0033】
また、本発明の割り込み管理装置は、上記割り込み管理装置において、割り込みタスクスイッチ制御手段におけるタスク切り替え指示を制御する際に演算処理を行う要因判定演算処理手段を具備する一方、割り込みハンドラは、前記要因判定演算処理手段が演算を施す際の演算方法を制御する要因判定演算制御手段を具備する構成を採る。
【0034】
この構成によれば、割り込みタスクスイッチ管理手段で管理されている割り込み処理タスクからのタスク切り替え情報として、割り込み制御手段が通知を制御する割り込み要因と同じ情報を管理し、割り込み要因判定処理手段で割り込みの要因に応じて処理すべき割り込み処理タスクを決定する際に、要因判定演算処理手段において、要因判定演算制御手段で指示された演算方法に従って演算を施した後の結果を用いて行われる。
【0035】
したがって、上記構成の割り込み管理装置の作用に加え、割り込み処理タスクから割り込みハンドラに制御が移る際に、割り込み制御手段が管理する割り込み要因の発生を、割り込み処理タスクからのタスクスイッチ管理手段での指示により行うことが可能となり、処理中演算リソースの退避・復帰処理を必要としない割り込み処理の構築が可能となる。
【0036】
また、本発明の割り込み管理装置は、上記割り込み管理装置において、タスクの初期化処理を行うためのタスクの呼び出しアドレスを格納する初期化タスク管理手段と、実行中のタスクの情報を保持する実行タスク制御手段と、処理を中断するタスクの情報を格納する初期化タスク指示手段と、処理対象となる処理タスクの判定を行い処理タスク毎の呼び出しアドレスを格納するタスク制御手段と、前記初期化タスク管理手段の処理に応じて呼び出す処理タスクの切り替えを行うディスパッチ処理手段とを具備する一方、割り込みハンドラは、割り込みタスクスイッチ制御手段からの情報を用いてタスクの中断判定を行い、タスクの中断が必要であれば中断するタスクの情報を前記初期化タスク指示手段に格納する中断タスク判定手段と、割り込み発生時に実行中であったタスクの情報に対して一度そのタスクの情報の復帰を行わず前記ディスパッチ処理手段を呼び出すタスク中断処理手段と、割り込み発生時に実行中であったタスクの種々の情報の復帰を行うタスク復帰処理手段と、前記実行タスク制御手段及び前記中断タスク判定手段の処理に応じて中断しているタスクを復帰させる際に当該タスクの初期化処理の要否判定を行い、初期化処理が必要なタスクに復帰させる場合は前記タスク中断処理手段を呼び出し、初期化処理が不要な場合は前記タスク復帰処理手段を呼び出すタスク管理制御手段と、を具備する構成を採る。
【0037】
この構成によれば、実行タスク制御手段には、処理タスク並びに割り込み処理タスク内における実行中のタスクの情報が格納される。割り込みハンドラにおいては、多重割り込み制御手段により、割り込み発生時に、実行タスク制御手段に格納されていた実行中のタスクの情報が退避されて、割り込み要因判定処理手段で決定された割り込み処理タスクの情報が新たに実行タスク制御手段に格納される。
【0038】
割り込み処理タスクにおいて、タスクの初期化が必要な場合には、割り込みタスクスイッチ管理手段に初期化するタスクの情報を格納する。割り込み処理タスクの処理が終わると、割り込みタスクスイッチ制御手段に処理が移行するが、この際、中断タスク判定手段がタスクの初期化の必要判定を行い、タスクの初期化が指示されている場合は、初期化するタスクの情報を初期化タスク指示手段に格納する。そして、割り込みタスク制御処理手段に制御が移った際に、タスク管理制御手段が、割り込み処理タスクを呼び出す前に退避しておいた実行タスク制御手段の情報と初期化タスク指示手段に格納されている初期化するタスクの情報を比較する。
【0039】
同じタスクを指示している場合には、割り込み発生時に実行中であったタスクにおける種々の情報の復帰を行うタスク復帰処理手段ではなく、単にタスクマネージャのディスパッチ処理手段を呼び出すタスク中断処理手段が呼び出されて、中断状態にあるタスクの処理が再開される。また、初期化処理が不要な場合は、割り込み発生時に実行中であったタスクにおける種々の情報の退避を行うタスク復帰処理手段が呼び出されて、中断状態にあるタスクの処理が再開される。そして、タスクマネージャのディスパッチ処理手段で呼び出す処理タスクの切換え処理を行う際に、初期化タスク指示手段で指示された処理タスクとの比較を行い、呼び出す処理タスクが初期化処理を必要とする場合には、初期化タスク管理手段に格納されている呼び出しアドレスを用いて初期化処理を行うタスクの呼び出しを行う。
【0040】
したがって、上記構成の割り込み管理装置の作用に加え、実行タスク制御手段と割り込みタスクスイッチ管理手段を用いて中断タスクに復帰する際に、中断タスクの初期化処理の要否の判定行う中断タスク判定手段と、初期化初期化処理が必要なタスクに復帰する場合に、初期化タスク管理手段に格納されている呼び出しアドレスを用いて初期化処理を行うタスクの呼び出しを行うタスク管理制御手段とを有しており、割り込み処理タスクにおいて、タスクの処理を初期状態から始めるように制御する事態が発生した場合に、退避処理手段で退避された割り込み発生時に実行中であったタスク(初期化処理においては復帰させる必要のないタスク)の種々の情報を復帰させること無く、さらにタスクマネージャのディスパッチ処理手段で再度そのタスクが指示された場合にのみ初期化処理から処理を開始することが可能となる。
【0041】
また、本発明の割り込み管理装置は、上記割り込み管理装置において、中断タスク判定手段は、要因判定演算処理手段の情報を用いてタスクの中断判定を行う。
【0042】
この構成によれば、中断タスク判定手段が行うタスクの初期化の必要性判定が、割り込みタスクスイッチ管理手段で指示された割り込み処理タスクからのタスクの中断情報として、割り込み制御手段が通知を制御する割り込み要因と同じ情報をも管理し、要因判定演算処理手段において、要因判定演算制御手段で指示された演算方法に従って演算を施した後の結果を用いて行われる。
【0043】
したがって、上記構成の割り込み管理装置の作用に加え、割り込み制御手段が管理する割り込み要因の発生を加味した中断タスクの判定処理が可能な割り込み処理の構築が可能となる。
【0044】
本発明の基地局装置は、上記割り込み管理装置を具備する構成を採る。
【0045】
本発明の移動局装置は、上記割り込み管理装置を具備する構成を採る。
【0046】
上記各装置に上記割り込み管理装置を設けることで、通信における処理効率の向上が図れる。
【0047】
本発明の割り込み管理方法は、割り込みマスクで割り込みハンドラへの割り込み通知を制御し、この制御による割り込み発生時に実行中のタスクの情報を退避し、割り込み要因に応じて処理すべき割り込み処理タスクを決定し、割り込みハンドラとは独立に、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受け付け可能状態を保持し、割り込み処理タスクにおいて割り込み許可を制御するための割り込みマスク解除制御情報及び割り込み受付可能状態の情報に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行い、決定した割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行い、割り込み処理タスクからのタスク切り替え情報を管理し、そのタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示がある場合には割り込み処理タスクに制御を移し、タスク切り替え指示がない場合には退避した割り込み発生時に実行中のタスク情報を復帰して中断していたタスクの処理を再開するようにした
【0048】
この方法によれば、割り込み受付可能管理情報と割り込みマスク解除制御情報とが割り込みハンドラとは独立に用意されており、割り込みマスクの更新制御は、割り込み受付可能管理情報を用いた制御方法のみを規定するものであるため、割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などの、割り込みハンドラの処理を変更することが必要な場合、割り込み受付可能管理情報と割り込みマスク解除制御情報を変更すればよく、割り込みハンドラの割り込み管理状態を意識せず割り込み処理タスクを作成できる。また、割り込みハンドラの割り込み管理状態に依存しない割り込み処理の構築が可能となる。
【0049】
また、割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理したい場合には、処理を行う割り込みレベルに対応したタスク切り替え情報を設定すればよく、処理中演算リソースの退避・復帰処理を必要とするソフトウェア割り込みを指定せずに割り込みレベルの変更が可能となる。
【0050】
また、本発明の割り込み管理方法は、上記割り込み管理方法において、タスク切り替え情報を用いて、割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示がある場合には割り込み処理タスクに制御を移し、タスク切り替え指示がない場合には、割り込みの要因に応じて、処理すべき割り込み処理タスクの決定を行うタスクの呼び出しを行う。
【0051】
この方法によれば、上記方法の割り込み管理方法の作用に加えて、割り込み処理タスクから割り込みハンドラに制御が移る度に、同一割り込みレベルの割り込みに対しては処理中演算リソースの復帰処理を行うことなく、再度割り込み要因判定処理が行える割り込み処理の構築が可能となる。
【0052】
本発明の割り込み管理方法は、上記割り込み管理方法において、割り込み要因判定処理で処理すべき割り込み処理タスクを決定する際に演算処理を行い、要因判定演算処理が演算を施す際の演算方法を制御する。
【0053】
この方法によれば、上記割り込み管理方法の作用に加えて、割り込み処理タスクから割り込みハンドラに制御が移る際に、割り込み制御手段が管理する割り込み要因の発生を、割り込み処理タスクからの指示により行うことが可能となり、処理中演算リソースの退避・復帰処理を必要としない割り込み処理の構築が可能となる。
【0054】
また、本発明の割り込み管理方法は、上記割り込み管理方法において、割り込みハンドラとは独立に、タスクの初期化処理を行うためのタスクの呼び出しアドレスを格納する初期化タスク管理情報と、実行中のタスクの情報を保持し、前記タスク切り替え情報を用いてタスクの中断判定を行い、タスクの中断が必要な場合には、中断するタスクの情報を初期化タスク指示情報に格納し、処理対象となる処理タスクの判定を行い、処理タスク毎の呼び出しアドレスを格納したタスク制御情報と前記初期化タスク管理情報に応じて呼び出す処理タスクの切り替えを行うディスパッチ処理を有するタスクマネージャと、割り込み発生時に実行中のタスクにおける情報の復帰を行わず、前記ディスパッチ処理を呼び出すタスク中断処理タスクと、前記実行中のタスクの情報及び初期化タスク指示情報に応じて中断タスクに復帰する際に中断タスクの初期化処理の要否判定を行い、初期化処理が必要なタスクに復帰する場合は前記タスク中断処理タスクを呼び出し、初期化処理が不要な場合はタスク復帰処理タスクを呼び出す。
【0055】
この方法によれば、上記割り込み管理方法の作用に加え、実行タスク制御情報とタスク切り替え情報を用いて中断タスクに復帰する際に、中断タスクの初期化処理の要否を判定行う中断タスク判定処理タスクにより、初期化処理が必要なタスクに復帰する場合には、初期化タスク管理情報に格納されている呼び出しアドレスを用いて初期化処理を行うタスクの呼び出しを行い、割り込み処理タスクにおいて、タスクの処理を初期状態から始めるように制御する事態が発生した場合に、初期化処理においてはもはや復帰する必要がない退避された割り込み発生時に実行中であったタスクにおける種々の情報の復帰を行うこと無く、さらに初期化処理は、タスクマネージャのディスパッチ処理で再度そのタスクが指示された際にのみ初期化処理から処理を開始することが可能となる。
【0056】
本発明の記録媒体は、上記何れかの割り込み管理方法と同様の割り込み管理方法をコンピュータに実行させるためのプログラムが記録された構成を採る。
【0057】
この構成によれば、記録媒体から上記割り込み管理制御方法を実行するプログラムを読み出して、その割り込み管理制御を実現することができる。
【0058】
本発明のオペレーティングシステムを記録した記録媒体は、上記割り込み管理方法を実現させるための処理機能を具備する構成を採る
【0059】
この構成によれば、上記割り込み管理制御方法を実行するプログラムを読み出して、その割り込み管理制御を実現することができる。
【0060】
本発明の信号処理用プロセッサは、上記割り込み管理方法を実現させるための処理機能を具備する。
【0061】
この構成によれば、上記割り込み管理制御方法を実行するプログラムを読み出して、その割り込み管理制御を実現することができる。
【0062】
【発明の実施の形態】
本発明の骨子は、割り込み要因に対して発生した割り込みの割り込みハンドラへの通知を割り込みマスクを制御することで行うことである。
【0063】
以下、本発明の実施の形態について、図面を参照して詳細に説明する。
【0064】
(実施の形態1)
図1は、本発明の実施の形態1に係る割り込み管理装置の構成を示すブロック図である。この図において、割り込み管理装置100は、割り込みハンドラ101と、割り込みコントローラ102と、割り込み受付可能管理部103と、割り込みマスク解除制御部104と、割り込みタスクスイッチ管理部105と、を備えて構成される。
【0065】
割り込みハンドラ101は、退避処理部106と、割り込み要因判定処理部107と、割り込みタスク制御処理部108と、タスク復帰処理部109と、多重割り込み制御部110と、割り込みタスクスイッチ制御部111とを備えている。割り込みコントローラ102は割り込みマスク部112を備えている。
【0066】
この図において、符号121−1〜121−Nは、第1〜第Nの割り込み要因である。符号123は処理タスクであり、第1〜第Nのタスク124−1〜124−Nを有している。符号127は割り込み処理タスクであり、第1〜第Nの割り込み処理タスク128−1〜128−Nを有している。
【0067】
割り込みコントローラ102は、割り込みマスク部112を使用して割り込みハンドラ101への割り込み通知を制御する。割り込みハンドラ101において、退避処理部106は、割り込み発生時に実行中であったタスクの種々な情報を退避する。割り込み要因判定処理部107は、割り込み要因より処理すべき割り込み処理タスクを決定する。割り込みタスク制御処理部108は、決定された割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行う。多重割り込み制御部110は、割り込み受付可能管理部103と割り込みマスク解除制御部104を用いて割り込みマスクの更新制御を行う。割り込みタスクスイッチ制御部111は、割り込みタスクスイッチ管理部105が管理するタスク切り替え情報を用いて、割り込み処理タスク127からのタスク切り替え指示を制御し、タスク切り替え指示がある場合は割り込み処理タスク127に再び制御を移し、タスク切り替え指示がない場合には割り込みタスク制御処理部108に制御を移す。
【0068】
割り込みハンドラ101とは独立に設けられた割り込み受付可能管理部103、割り込みマスク解除制御部104及び割り込みタスクスイッチ管理部105のうち、割り込み受付可能管理部103は、割り込み要因毎に用意された割り込み受付可能状態を保持し、割り込みマスク解除制御部104は、割り込み処理タスクにおいて割り込み許可を制御する。割り込みタスクスイッチ管理部105は、割り込み処理タスク127からのタスク切り替え情報を管理する。
【0069】
次に、上記構成の割り込み管理装置100の動作について説明する。
図2は、割り込みコントローラ102の動作を説明する図である。ここで、説明を簡単にするために、割り込み要因として8種類の割り込み要因(IRQn:n=0,1〜7とする)を持ち、全てマスク可能な割り込みとし、各々の割り込み要因の発生を示す割り込み要求レジスタ(IR:Interrupt Requestと呼ぶ)と、割り込みマスク部112として各々の割り込み要因に対して割り込みの禁止(0)/許可(1)を制御する割り込みマスクレジスタ(IM:Interrupt Maskと呼ぶ)と、各割り込み要因毎に存在して、割り込み要求レジスタIRをリセットするために使用する割り込み要求リセットレジスタ(IRR:Interrupt Request Resetと呼ぶ)とを持つものとする。
【0070】
ソフトウェアがこのIRRにデータをセット(1)することにより、IRの該当ビットがリセット(0)される。IR、IM、IRRの各レジスタを各々16ビットのレジスタのLSB8ビットを用いて実現し、さらにマスク可能な割り込み要因全てについて同時に割り込みの禁止(0)/許可(1)の制御する割り込み許可フラグ(IE:Interrupt Enableと呼ぶ)を設ける場合の例を示している。
【0071】
図2(a)、(b)、(c)、(d)は、IR、IM、IRR、IEを示しており、各割り込み要因IRQn(n=0、1、…、7)に対するビットを、IRn、IMn、IRRn(n=0、1、…、7)と表す。
また、割り込み要因に対応しないビットには「0」が設定されている場合の例を示している。
【0072】
図3は、割り込み要因が発生した時の割り込みコントローラ102での処理フローを示す図である。この図に示すように、割り込み要因が発生してそれを検出すると(ステップ10)、割り込み要求レジスタの該当ビットをセット(1)する(ステップ12)。割り込み要求レジスタの該当ビットをセットした後、割り込み許可フラグが許可されているか否かを判定し(ステップ14)、許可されていない場合は待機状態に移行し(ステップ16)、許可されている場合は、割り込みマスクレジスタの該当ビットが許可(1)されているか否かを判定する(ステップ18)。この判定において、割り込みマスクレジスタの該当ビットが許可されていない場合は待機状態に移行し、許可されている場合は、割り込み許可フラグを禁止(0)とし(ステップ20)、次いで割り込みハンドラに処理を遷移させる(ステップ22)。
さらに、割り込み許可フラグもしくは割り込みマスクレジスタが禁止(0)状態から許可(1)状態に変更された場合(ステップ24、26)にも、割り込み要因判定処理が行われる。
【0073】
以下、割り込みハンドラ101における処理の説明を簡単にするために、割り込みハンドラ101に処理が遷移した際に、割り込み要因としてIRQ6、IRQ4、IRQ1、IRQ0の4種類の割り込み要因がセット(1)されており、この際の割り込みマスクレジスタIMの設定状態としてIM7、IM6、IM3、IM1、IM0が割り込み許可(1)に設定されており、さらにその際の割り込み受付管理手段の状態として、全ての割り込みが許可されている割り込みマスクが割り込み受付可能管理部103内に保持されている(この保持しているレジスタをIMFGregと呼ぶ)場合について説明をする。
【0074】
また、割り込みタスクスイッチ管理部105が管理している割り込み処理タスクからのタスク切り替え情報を16ビットのレジスタのMSB8ビットを用いて実現する(この情報を保持しているレジスタをTSKSregと呼び、タスク切り替え情報に対応しないビットには「0」が設定されているものとする)場合を例に説明する。TSKSregは、タスク切り替え指示する場合に対応するタスクに対応するビット位置に指示(1)され、指示がない場合に解除(0)が設定される。尚、この際のTSKSregの状態は全て解除されている場合について説明する。
【0075】
また、この時の割り込みマスク解除制御部104には、マスク解除を行うべき割り込み要因がない、即ち割り込みマスク解除制御部104の全てのビットがクリア(0)に設定されているとする。
【0076】
また、割り込み要因の割り込みレベルとして4段階の割り込みレベルが設定されており、
レベル0の割り込み要因:IRQ2、IRQ3
レベル1の割り込み要因:IRQ0、IRQ1
レベル2の割り込み要因:IRQ7、IRQ6、IRQ4
レベル3の割り込み要因:IRQ5
とし、レベル0>レベル1>レベル2>レベル3であるとする。
【0077】
割り込み受付可能管理部103には、各割り込み毎にその割り込み要因のレベルよりレベルの高い割り込み要因のみを割り込み許可(1)とするような割り込みマスクレジスタへの設定状態(IMFGと呼ぶ)が保持される。
【0078】
図4は、前記割り込みレベルに対して設定すべき割り込みマスクレジスタの設定状態を示しており、IMFGnは、各々IRQn(n=0、1、…、7)に対応している。例えば、割り込み要因IRQ6に対するIMFG6は、IRQ6よりレベルの高い、IRQ0、IRQ1、IRQ2、IRQ3の該当ビットが許可(1)に設定される。また、割り込み要因IRQ2に対するIMFG1は、IRQ2よりレベルの高い割り込み要因が存在しないため、全てのビットが禁止(0)に設定される。
【0079】
まず、割り込みハンドラ101に処理が遷移した場合、その際に実行中であった処理タスク(この処理タスクを中断タスク125とする)の種々の情報が退避処理部106により退避される。
【0080】
次に、割り込み要因判定処理部107で割り込みコントローラ102より通知された割り込み要因に対して、割り込み受付可能管理部103を用いてどの割り込み要因に対する処理を行うかの判定を行い、呼び出す割り込み処理タスクを決定する。
【0081】
図5は、割り込み要因判定処理手順の説明図である。
割り込み要因としてIRQ6、IRQ4、IRQ1、IRQ0の4種類の割り込み要因がセット(1)されているため割り込み要求レジスタIRは、IR6、IR4、IR1、IR0の各該当ビットが1となっている(S1)。
割り込みマスクレジスタIMの設定状態として、IM7、IM6、IM3、IM1、IM0が割り込み許可(1)に設定されているため割り込みマスクレジスタIMは、IM7、IM6、IM3、IM1、IM0の各該当ビット1となっている(S2)。
【0082】
次に、S1とS2の各対応するビット毎のAND演算を行う(S3)。
S3の状態において、MSB側から順に評価を行い値が1となっているビットに該当する割り込み要因を選択する。この場合はIRQ6に対する位置のビットがまず1となっているため、割り込み要因としてIRQ6が選択される。
【0083】
次に、割り込み受付可能管理部103に保持されている割り込みマスクレジスタへの設定状態IMFGに対して、選択された割り込み要因IRQ6に対応する割り込みマスクレジスタへの設定状態IMFG6(即ち、図5のIMFG6の値)を獲得する(S4)。
【0084】
次に、S3とS4の各対応するビット毎のAND演算を行う(S5)。
次に、S3の状態に対して行ったと同様の評価を行い割り込み要因としてIRQ1が選択される。次に、S4と同様の処理を行い割り込み受付可能管理部103からIMFG1(即ち、図5のIMFG1の値)を獲得する(S6)。
【0085】
次に、S5と同様の処理を行うと、全てのビットが0となるため(S7)、S3の状態に対して行ったと同様の評価を行うと対応する割り込み要因がなくなる。この時に直前に評価された割り込み要因、即ちIRQ1を割り込み要因として選択し、呼び出す割り込み処理タスクとしてIRQ1に対する割り込み処理タスクを決定し、割り込みタスク制御処理部108に処理が遷移する。
【0086】
なお、この時に割り込み要因としてIRQ1が選択されたため、割り込み要求リセットレジスタIRRのIRQ1に該当するビット、即ちIRR1をセット(1)することにより割り込み要求レジスタIRにセットされているIRQ1の割り込み要因のリセット(0)を行う。
ここで、IRQ1に対する割り込み処理タスクを第Rの割り込み処理タスク129とし、以下説明を行う。
【0087】
図6は、多重割り込み制御部110での処理手順の説明図である。
多重割り込み制御部110では、決定された第Rの割り込み処理タスク129に対する割り込みマスクIMFG1を、割り込み要因毎に用意された割り込み受付可能状態を保持する割り込み受付可能管理部103から取り出し、割り込みコントローラ102の割り込みマスク部112に設定する。
【0088】
この際に、割り込み発生時に割り込みコントローラ102の割り込みマスク部112で既に割り込みマスクが設定されており、割り込み禁止になっている割り込み要因に対する割り込みマスクに対しては変更を行わない。即ち、S6のIMFG1とS2のIMの各対応するビット毎のAND演算を行うことにより割り込みマスク34に設定する割り込みマスク状態を決定し、このマスク状態が割り込みマスク34に設定される(S8)。
【0089】
さらに、割り込み発生時に割り込みコントローラ102に設定されていた割り込みマスクの状態に対して、割り込み要因判定処理部107で判定された割り込み要因IRQ1に対するマスクを割り込み禁止状態にした割り込みマスクの状態を退避する。即ち、S2のIMに対して、割り込み要因IRQ1の該当ビットのみを1にしたもの(S9)とのEOR演算を行うことにより得られる状態(S10)が退避される(退避するレジスタをIM_SHLTregと呼ぶ)。
【0090】
さらに、割り込み発生時の割り込み受付可能管理手段の状態も退避する。即ち、全ての割り込みが許可されている状態であるIMFGregの内容(S11)が退避される(退避するレジスタをIM_SHLTregと呼ぶ)。
【0091】
次に、割り込みタスク制御処理部108が割り込み要因判定処理処理部12で決定された対応する割り込み処理タスクである、第Rの割り込み処理タスク129を呼び出す。第Rの割り込み処理タスク129では、割り込みに対応する処理が行われるが、この処理中に新たな割り込み要因に対して割り込み許可を行う場合は、割り込みマスク解除制御部104の、対応する割り込み要因の情報を割り込み解除状態に設定する。また、即座に割り込み許可を行う場合には、同時に割り込みコントローラ102の割り込みマスク部112の対応する割り込みマスクをマスク解除状態に設定する。
【0092】
即ち、第Rの割り込み処理タスク129の処理内で、新たに割り込み要因IRQ2を受け付け可能とする場合を考えると、割り込みマスク解除制御部104の全てのビットはクリア(0)に設定されている状態であるため、割り込み要因IRQ2を受け付け可能とする場合には、割り込みマスク解除制御部104の該当ビットを設定(1)にする。
【0093】
図7の(a)はこの時の割り込みマスク解除制御部104の状態を示している(S12)。
【0094】
さらに、IRQ2は第Rの割り込み処理タスク129が処理対象としている割り込み要因IRQ1より上位レベルの割り込み要因であるため、即座に割り込み許可を行う場合となり、割り込みコントローラ102の割り込みマスク部112の現時点での設定状態である、S8の状態に対して、IRQ2の該当ビットの割り込みマスクを解除(1)にする。図7の(b)はこの時の割り込みマスク部112の状態を示している(S13)。
【0095】
そして、割り込み処理タスクR129の処理内で、割り込みレベルを変更し割り込み処理タスク127の処理を行う場合について説明する。
この場合、割り込みレベルを変更したい割り込み処理タスク127に対応する割り込みタスクスイッチ管理部105が管理しているタスク切り替え情報TSKSregの対応するビットに指示(1)を設定し、割り込みタスクスイッチ制御部111に制御を移す。
【0096】
割り込みタスクスイッチ制御部111は、TSKSregのいずれかのビットが1の場合は、TSKSregをMSBから順に評価し最初に1となっているタスク切り替え指示に対応する割り込み処理タスク127を選択(ここでは、第Nの割り込み処理タスク130が選択されたとして以下説明を進める)し、対応するTSKSregのビットを解除(0)に設定する。
【0097】
また、割り込み受付可能管理部103には、各割り込みタスクスイッチ指示毎にIMFGも保持されている。
そして、選択した割り込み処理タスクに対応するIMFGとIM_SHLTregとIMの情報を用いて
((IM_SHLTreg and IMFG) eor IM) eor IM_SHLTreg
の演算により算出されるビット情報を新たにIM1に設定する。
割り込み処理タスクN130の処理が終わると、再び割り込みタスクスイッチ制御部111に処理が移行する。
【0098】
そして、割り込みタスクスイッチ管理部105が管理しているTSKSregの全てのビットが0になるまで上記処理を繰り返す。TSKSregの全てのビットが0となると割り込みタスク制御部108に制御が移る。
【0099】
この際、多重割り込み制御部110により、第Rの割り込み処理タスク129を呼び出す前にIMFG_SHLTregに退避しておいた割り込み受付可能管理部103の状態(S11)と、第Rの割り込み処理タスク129で設定された割り込みマスク解除制御部104の状態(S12)に対して、両方共割り込み許可状態になっている割り込み要因、即ちIRQ2に対し、多重割り込み制御部110によりIM_SIM_SHLTregに退避された、割り込みマスクの状態(S10)の該当ビットを割り込み許可に設定したものを、割り込みコントローラ102の割り込みマスク部112に設定する。図7の(c)はこの時のマスク34の状態を示している(S14)。
【0100】
さらに、この際に割り込み許可状態に変更された割り込み要因IRQ2に対しては、割り込みマスク解除制御部104の対応する割り込み要因の情報をリセットする。図7の(d)はこの時の割り込みマスク解除制御部104の状態を示している(S15)。そして、タスク復帰処理部109で、退避処理部106で退避された割り込み発生時に実行中であったタスクの種々の情報を復帰し、中断タスク125の処理を再開する。
【0101】
このように、実施の形態1の割り込み管理装置100によれば、割り込み受付可能管理部103と割り込みマスク解除制御部104は割り込みハンドラ101とは独立に用意されており、多重割り込み制御部110は割り込み受付可能管理手段51を用いた制御方法のみを規定するものであるため、割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などの、割り込みハンドラ101の処理を変更することが必要な際に、割り込み受付可能管理部103と割り込みマスク解除制御部104を変更すればよく、割り込みハンドラ101の割り込み管理状態を意識せず割り込み処理タスク127を作成でき、また、割り込みハンドラ101の割り込み管理状態に依存しない割り込み処理の構築が可能になる。
【0102】
また、割り込み処理タスク127内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合に、処理を行う割り込みレベルに対応した割り込みタスクスイッチ管理部105が管理しているタスク切り替え情報を設定すればよく、処理中演算リソースの退避・復帰処理を必要とするソフトウェア割り込みを指定せずに割り込みレベルの変更が行える割り込み処理の構築が可能になる。
【0103】
なお、実施の形態1では、割り込みタスク切り替え指示を割り込みレベルを変更する場合として説明したが、割り込みレベルの変更ではなく、割り込み処理タスク127内で同一処理を行う場合等のタスク切り替えに対しても同様に実現できる。
【0104】
(実施の形態2)
図8は、本発明の実施の形態2に係る割り込み管理装置の構成を示すブロック図である。なお、この図に示す実施の形態2において図1に示す実施の形態1の各部に対応する部分には同一符号を付してその説明を省略する。
【0105】
この図に示す実施の形態2の割り込み管理装置700は、実施の形態1の割り込み管理装置100の構成要素の他に、割り込みハンドラ101内に割り込みタスクスイッチ制御部701を備えている。この割り込みタスクスイッチ制御部701は、割り込みタスクスイッチ管理部105が管理するタスク切り替え情報を用いて、割り込み処理タスク127からのタスク切り替え指示を制御し、タスク切り替え指示があれば、割り込み処理タスク127に再び制御を移し、タスク切り替え指示がなければ、割り込み要因判定処理部107に制御を移す以外は、実施の形態1の割り込みタスクスイッチ制御部111と同様の処理を行うものである。
【0106】
割り込み要因判定処理部107は、退避処理部106に退避された直前の割り込み時のIRの情報を獲得し、多重割り込み制御部110で退避を行った割り込み発生時に、割り込みコントローラ102に設定されていた割り込みマスクの状態(S2)に対して、割り込み要因判定処理手段107で判定された割り込み要因に対するマスクを割り込み禁止状態にした割り込みマスクの状態(S8)を用いて、割り込み処理タスク127から割り込みハンドラ101に制御が移る度に、同一割り込みレベルに対し再度、図5と同様の割り込み要因判定処理を行う。
【0107】
このように、実施の形態2の割り込み管理装置700によれば、割り込み処理タスク127から割り込みハンドラ101に制御が移る度に、同一割り込みレベルの割り込みに対しては、処理中演算リソースの復帰処理を行うことなく、再度割り込み要因判定処理が行える割り込み処理の構築が可能になる。
【0108】
(実施の形態3)
図9は、本発明の実施の形態3に係る割り込み管理装置の構成を示すブロック図である。なお、この図に示す実施の形態3において図8に示す実施の形態2の各部に対応する部分には同一符号を付してその説明を省略する。
【0109】
この図に示す実施の形態3の割り込み管理装置800は、実施の形態2の割り込み管理装置700の構成要素の他に、割り込みハンドラ101内に要因判定演算処理部801と、要因判定演算制御部802とを備えている。
【0110】
ここで、例として、要因判定演算処理部801が演算を施す際の演算方法を制御する要因判定演算制御部802の演算方法として、OR演算が指定され、割り込み要因判定処理部107において処理すべき割り込み処理タスクを決定する際に、要因判定演算処理部801がOR演算処理を行う場合について示す。
【0111】
また、割り込みタスクスイッチ管理部105が管理している割り込み処理タスクからのタスク切り替え情報TSKSregにおいて、割り込みコントローラが通知を制御する割り込み要因と同じ情報をLSB8bitを用いて管理する場合を考える。
【0112】
この場合、TSKSregのLSB8bitに指示(1)するビット位置により、図2(a)と同じ位置の割り込みを指示する情報として設定可能となる。
要因判定演算処理部801では、その指示された割り込み要因に対応するビット位置を退避処理部106が直前に退避したIRの情報とのOR演算を行い、その結果を退避処理部106に格納し、タスクスイッチ制御部111に制御を戻す。
【0113】
このように、実施の形態3の割り込み管理装置800によれば、割り込み処理タスク127から割り込みハンドラ101に制御が移る際に、割り込みコントローラ102が管理する割り込み要因の発生を割り込み処理タスク127からのタスクスイッチ管理部105での指示により行うことが可能となり、処理中演算リソースの退避・復帰処理を必要としない割り込み処理の構築が可能となる。
【0114】
(実施の形態4)
図10は、本発明の実施の形態4に係る割り込み管理装置の構成を示すブロック図である。なお、この図に示す実施の形態4において図1の実施の形態1の各部に対応する部分には同一符号を付してその説明を省略する。
【0115】
この図に示す実施の形態4の割り込み管理装置900は、実施の形態1の割り込み管理装置100の構成要素の他に、実行タスク制御部901と、初期化タスク指示部902と、初期化タスク管理部903と、タスク管理制御部904と、タスク中断処理部905と、中断タスク判断部906と、タスク制御部907を有するディスパッチ処理部908が設けられたタスクマネージャ909と、を備えている。なお、タスク管理制御部904と、タスク中断処理部905と、中断タスク判断部906は、割り込みハンドラ101内に設けられる。
【0116】
初期化タスク管理部903は、割り込みハンドラ101とは独立に、タスクの初期化処理を行うタスクの呼び出しアドレスを格納するものである。実行タスク制御部901は、実行中のタスクの情報を保持するものである。初期化タスク指示部902は、初期化処理が必要となるタスクの設定を指示(保持)するものである。タスクマネージャ909のディスパッチ処理部908は、処理対象となる処理タスクの判定を行い、処理タスク毎の呼び出しアドレスを格納したタスク制御部901と、タスクの初期化処理を行うタスクの呼び出しアドレスを格納する初期化タスク管理部903とを用いて、呼び出す処理タスクの切換え処理を行うものである。
【0117】
タスク管理制御部904は、実行タスク制御部901と初期化タスク指示部902を用いて中断タスクに復帰する際に中断タスクの初期化処理の要否を判定行い、初期化処理が必要なタスクに復帰する場合には、初期化タスク管理部903に格納されている初期化処理を行うタスクの呼び出しを行うものである。タスク中断処理部905は、退避処理部106で退避された割り込み発生時に実行中であったタスクにおける種々の情報の復帰を行わず、ディスパッチ処理部908を呼び出すものである。中断タスク判断部906は、割り込みタスクスイッチ管理部105に管理されている中断タスク情報から中断すべきタスクを決定し、初期化タスク指示部902にその情報を設定するものである。
【0118】
このように構成された実施の形態4の割り込み管理装置900の動作を説明する。但し、割り込みハンドラ101での処理の説明を簡単にするために、実施の形態1での説明を用いて説明する。
【0119】
図11の(a)は、実行タスク制御部901に格納される実行中のタスクの情報の状態を示したものであり、処理タスク4並びに割り込み処理タスク2の各々のタスクを各ビットに対応させ管理する場合を示している。一方、図11の(b)は、初期化タスク指示部902に初期化処理が必要となるタスクを実行タスク制御部901と同様に各ビットに対応させて設定する場合を示している。
【0120】
実行タスク制御部901には、処理タスクならびに割り込み処理タスクのうち、実行中のタスクの情報(TSKINFと呼ぶ)が格納されている。まず、割り込みハンドラ101に処理が遷移した場合、その際に実行中であった処理タスク(中断タスク125)の該当ビットに1が設定される(T1)。
【0121】
次いで、多重割り込み制御部110により、割り込み発生時に実行タスク制御部901に格納されていた実行中のタスクの情報、即ちT1の状態が退避され(退避するレジスタをTSKINF_SHLTregと呼ぶ)、割り込み要因判定処理部107で決定された第Rの割り込み処理タスク129の情報(T2)が新たに実行タスク制御部901に格納される。
【0122】
そして、第Rの割り込み処理タスク129において、タスクの初期化が必要な場合には、割り込みタスクスイッチ管理部105に初期化するタスクの情報を格納する。第Rの割り込み処理タスク129の処理が終わると、再び割り込みタスクスイッチ制御部111に制御が移行した際に、中断タスク判断部906により、割り込みタスクスイッチ管理部105に格納されている初期化するタスクの情報より、初期化が必要なタスクが解釈され、初期化タスク指示部902に初期化するタスクの情報を格納する。
【0123】
中断タスク125が初期化を必要とするタスクとして設定された場合を考える。この場合、初期化タスク指示部902には中断タスク125の該当ビットに1が設定される(T3)。その後、割り込みタスク制御処理部108に処理が移行するが、この際、多重割り込み制御部110により、割り込み処理タスクを呼び出す前にTSKINF_SHLTregに退避しておいた実行タスク制御部901の情報(T2)と初期化タスク指示部902に格納されている初期化するタスクの情報(T3)を用いて、タスク管理制御部904が比較を行う。
【0124】
タスク管理制御部904では,比較されたタスクが同じタスクを指示している場合には、タスク中断処理部905を呼び出し、処理化処理が不要な場合はタスク復帰処理部109を呼び出す。例えば、TSKINF_SHLTregに退避される実行タスク制御部901の情報は、割り込み発生時に実行中であったタスクの情報であるため、常に該当する1ビットのみが1に設定されているため、タスク管理制御部904において、T2とT3のAND演算を行い、非0の値となった場合には、比較したタスクが同じタスクを指示していると判断すればよく、この場合は同じタスクとなっている。
【0125】
このように、中断タスクに復帰する際に中断タスクの初期化処理の要否を判定を行い、初期化処理が必要なタスクに復帰する場合、退避処理部106で退避された割り込み発生時に実行中であったタスクの種々の情報の退避を行うタスク復帰処理部109ではなく、タスク中断処理部905が呼び出される。
【0126】
初期化処理が不要な場合は、退避処理部106で退避された割り込み発生時に実行中であったタスクにおける種々の情報の復帰を行うタスク復帰処理部109が呼び出され、中断タスクの処理が再開される。
【0127】
そして、タスクマネージャ909のディスパッチ処理部908で呼び出す処理タスクの切換え処理を行う際に初期化タスク指示部902で指示された処理タスクとの比較を、タスク管理制御部904での比較処理と同様の方法で行い、呼び出す処理タスクが初期化処理を必要とするタスクの場合には、初期化タスク管理部903に格納されている呼び出しアドレスを用いて初期化処理を行うタスクの呼び出しを行う。
【0128】
このように、実施の形態4の割り込み管理装置900によれば、タスクの初期化処理を行うタスクの呼び出しアドレスを格納する初期化タスク管理部903と、実行中のタスクの情報を保持する実行タスク制御部901と、割り込みタスクスイッチ管理部105に設定された初期化処理が必要となるタスクの情報を中断タスク判断部906で解釈し、初期化タスク指示部902に設定し、実行タスク制御部901と初期化タスク指示部902を用いて中断タスクに復帰する際に、中断タスクの初期化処理の要否を判定行い、初期化処理が必要なタスクに復帰する場合には、初期化タスク管理部903に格納されている呼び出しアドレスを用いて初期化処理を行うタスクの呼び出しをタスク管理制御部904が行う。
【0129】
このため、割り込み処理タスク127において、タスクの処理を初期状態から始めるように制御する場合が発生した場合に、タスクのスタック領域、タスク制御手段などを割り込み処理タスク127が初期化する必要がない。
【0130】
したがって、割り込み処理タスク127は、初期化するタスクの処理内容を意識する必要がなく、割り込み処理タスク127内において、初期化を行う処理手順を割り込み処理タスク127ならびに初期化を必要とするタスクと独立に制御できる機構の構築が可能となる。
【0131】
また、タスクの初期化が発生した場合に、初期化処理においては、もはや復帰する必要がない退避処理部106で退避された割り込み発生時において、実行中であったタスクにおける種々の情報の復帰を行うこと無く、さらに初期化処理は、タスクマネージャ909のディスパッチ処理部908で再度そのタスクが指示された際にのみ初期化処理から処理を開始することが可能となる。
【0132】
(実施の形態5)
図12は、本発明の実施の形態5に係る割り込み管理装置の構成を示すブロック図である。なお、この図に示す実施の形態5において図10の実施の形態4の各部に対応する部分には同一符号を付しており、割り込みタスクスイッチ制御部111を図8の割り込みタスクスイッチ制御部701とした構成となっている。
【0133】
したがって、この図に示す実施の形態4の割り込み管理装置1000は、実施の形態2および実施の形態4で説明した効果を発揮するものであり、その詳細な説明は省略する。
【0134】
(実施の形態6)
図13は、本発明の実施の形態6に係る割り込み管理装置の構成を示すブロック図である。なお、この図に示す実施の形態6において図9の実施の形態3の各部に対応する部分には同一符号を付してその説明を省略する。
【0135】
また、この図に示す実施の形態6の割り込み管理装置1100は、実施の形態3の割り込み装置800の構成要素の他に、実施の形態4の構成要素である、実行タスク制御部901と、初期化タスク指示部902と、初期化タスク管理部903と、割り込みハンドラ101内にタスク管理制御部904と、タスク中断処理部905と、タスク制御部907を有するディスパッチ処理部908が設けられたタスクマネージャ909とを備え、要因判定演算処理部801の演算結果を用いて中断タスクの判定を行う中断タスク判断部1101により構成されている。
【0136】
そして、実施の形態3に対し、要因判定演算処理部801で、その指示された割り込み要因に対応するビット位置を退避処理部106で直前に退避したIRの情報とのOR演算を行い、退避処理部106に格納し、タスクスイッチ制御部111に制御を戻す際に、実施の形態4での中断タスク判断部906と同一の処理を中断タスク判断部1101が行う。
【0137】
したがって、実施の形態6の割り込み管理装置1100は、実施の形態3および実施の形態4で説明した効果を発揮するものであり、その詳細な説明は省略する。
【0138】
なお、上記各実施の形態に係る割り込み管理装置の機能をプログラム化して記録媒体に書きこむことで、この記録媒体のデータを読み込むことが可能な割り込み管理装置の全てに本発明を適用することが可能である。記録媒体としては、例えば半導体記録媒体、磁気記録媒体、光記録媒体、光・磁気記録媒体が挙げられる。
【0139】
また、上記各実施の形態に係る割り込み管理装置の機能を信号処理用プロセッサ(DSP)における割り込み管理機構として組み込むことも可能であり、DSP内での割り込み処理とは独立に割り込み処理を用いたアプリケーションを実現する場合に有効である。
【0140】
また、上記各実施の形態に係る割り込み管理装置の機能をコンピュータ処理のリアルタイム・オペレーションシステム並びにマルチタスク・オペレーションシステムなどのOS内の割り込み処理に組み込むことも可能であり、パーソナルコンピュータ上で実現されるアプリケーションシステムの構築においては、OS内での割り込み処理とは独立に割り込み処理を用いたアプリケーションを実現する場合に有効である。また、多重割り込みを有する場合には、割り込みレベルをOS内の割り込み機構とは独立した形態で構築することが可能となるため特にその効果を発揮する。
【0141】
また、上記各実施の形態に係る割り込み管理装置を、移動体通信における端末装置や基地局装置に設けることで、通信における処理効率の向上が図れる。
【0142】
【発明の効果】
以上説明したように、本発明によれば、割り込み処理タスク内において、割り込み処理タスクの割り込みレベルと異なる割り込みレベルで処理を行いたい場合に、処理中演算リソースの退避・復帰処理を必要とするソフトウェア割り込みを指定せずに割り込みレベルの変更が行える。
【0143】
また、割り込み処理タスクから割り込みハンドラに制御が移る度に、同一割り込みレベルの割り込みに対しては処理中演算リソースの復帰処理を行うことなく、再度割り込み要因判定処理が行える。
【0144】
また、割り込み処理タスクから割り込みハンドラに制御が移る際に、割り込みコントローラが管理する割り込み要因の発生を割り込み処理タスクから行うことが可能となり、処理中演算リソースの退避・復帰処理を必要としない割り込み処理が可能となる。
【0145】
また、割り込みタスク内で他の割り込みを受け付けられるようにする場合や、以後ある割り込みを禁止する場合などの、割り込みハンドラの処理を変更することが必要な際に、割り込みハンドラや割り込み処理タスクによる割り込み処理内容の変更を容易に行うことができる。
【0146】
また、OSを用いた割り込み管理方法で、すべての割り込み要因に対してOS内にある割り込みハンドラが一括して割り込みの禁止/許可の処理を行っている場合においても、ユーザがOS内の割り込みハンドラの割り込み管理状態を意識せず割り込み処理タスクを作成することができる。
【0147】
また、OS内の割り込みハンドラの割り込み管理状態に依存しない割り込み処理の構築、ならびに、割り込み処理タスクにおいて、タスクの処理を初期状態から始めるように制御する場合が発生した場合に、タスクのスタック領域、タスク制御手段などを割り込み処理タスクが初期化する必要がなくなる。
【0148】
従って、割り込み処理タスクは初期化するタスクの処理内容を意識する必要がなく、割り込み処理タスク内において、初期化を行う処理手順を割り込み処理タスクならびに初期化を必要とするタスクと独立に制御できる機構の構築を行うことができる。
【0149】
ならびに、タスクの初期化が発生した場合に、初期化処理においてはもはや復帰する必要がない退避処理部で退避された割り込み発生時に実行中であったタスクの種々の情報の復帰を行うことが無くなる。
【0150】
さらに初期化処理は、タスクマネージャのディスパッチ処理部で再度そのタスクが指示された際にのみ初期化処理から処理を開始することが可能となり、タスクマネージャでの初期化を含むタスクの管理がアドレスの管理ならびに制御方法のみを規定するものであるため、各処理タスクの呼び出しアドレスに依存しない処理タスクの切換え制御を行うことができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1に係る割り込み管理装置の構成を示すブロック図
【図2】実施の形態1に係る割り込み管理装置の割り込みコントローラの動作を説明するための図
【図3】実施の形態1に係る割り込み管理装置の割り込みコントローラの動作を説明するためのフロー図
【図4】実施の形態1に係る割り込み管理装置の割り込み受付可能管理手段に保持されている各割り込み要因の割り込みマスクレジスタの設定状態を示す図
【図5】実施の形態1に係る割り込み管理装置の割り込み要因判定処理手順を説明するための図
【図6】実施の形態1に係る割り込み管理装置の多重割り込み制御部における処理手順を説明するための図
【図7】実施の形態1に係る割り込み管理装置の割り込み処理タスクにおける処理手順を説明するための図
【図8】本発明の実施の形態2に係る割り込み管理装置の構成を示すブロック図
【図9】本発明の実施の形態3に係る割り込み管理装置の構成を示すブロック図
【図10】本発明の実施の形態4に係る割り込み管理装置の構成を示すブロック図
【図11】実施の形態4に係る割り込み管理装置の実行タスク制御手段に格納される実行中のタスクの情報の状態を示す図
【図12】本発明の実施の形態5に係る割り込み管理装置の構成を示すブロック図
【図13】本発明の実施の形態6に係る割り込み管理装置の構成を示すブロック図
【符号の説明】
100、700、800、900、1000、1100 割り込み管理装置
101 割り込みハンドラ
102 割り込みコントローラ
103 割り込み受付可能管理部
104 割り込みマスク解除制御部
105 割り込みタスクスイッチ管理部
106 退避処理部
107 割り込み要因判定処理部
108 割り込みタスク制御処理部
109 タスク復帰処理部
110 多重割り込み制御部
111 割り込みタスクスイッチ制御部
112 割り込みマスク部
121−1 第1の割り込み要因
121−N 第Nの割り込み要因
123 処理タスク
124−1 第1のタスク
124−2 中断タスク
124−N 第Nのタスク
127 割り込み処理タスク
128−1 第1の割り込み処理タスク
128−R 第Rの割り込み処理タスク
128−N 第Nの割り込み処理タスク
701 割り込みタスクスイッチ制御部
801 要因判定演算処理部
802 要因判定演算制御部
901 実行タスク制御部
902 初期化タスク指示部
903 初期化タスク管理部
904 タスク管理制御部
905 タスク中断処理部
906 中断タスク判断部
907 タスク制御部
908 ディスパッチ処理部
909 タスクマネージャ
[0001]
BACKGROUND OF THE INVENTION
The present invention performs interrupt management in a computer processing real-time operation system (real-time OS), a multitask operation system (multitask OS) and a signal processing processor (hereinafter referred to as a DSP), and includes W-CDMA. The present invention relates to an interrupt management device and an interrupt management method suitable for use in an image terminal device such as a portable videophone device using a (Wide band-Code Division Multiple Access) system.
[0002]
[Prior art]
Conventionally, in a microprocessor system, an interrupt request from an external device or an external device or a software interrupt request from an application program being executed (hereinafter referred to as an interrupt) is executed while the microprocessor (hereinafter referred to as a CPU) is executing program processing. When an asynchronous interrupt request generated due to various factors (generally called a request) occurs, the program processing being executed is interrupted to process the interrupt request.
[0003]
On the other hand, the DSP has a main processor (hereinafter referred to as MP) for the CPU, and when an interrupt request is generated while the MP is executing a program process, the program process being executed is executed. And interrupt request is processed. In the following description, the minimum unit of a program is referred to as a task.
[0004]
Since the contents of processing for an interrupt request differ for each interrupt factor, an interrupt processing routine (hereinafter referred to as an interrupt processing task) is created for each interrupt factor in advance (created by the user), and there is an interrupt request. When an interrupt occurs, an interrupt control means (hereinafter referred to as an interrupt controller) that informs the occurrence of an interrupt informs the CPU or MP, whereby the CPU or MP identifies the cause of the interrupt and calls the corresponding interrupt processing task for processing. Is used.
[0005]
When the CPU or MP interrupts the task processing being executed due to the generation of an interrupt request, the address of the task to be resumed or the contents of the internal register of the CPU or MP used so far (hereinafter referred to as the processing resource being processed) After saving, the interrupt processing task is executed. Then, when the interrupt processing task ends, these registers are returned to the original state, and the task processing being executed is resumed.
[0006]
In the interrupt processing task, it is complicated to create the interrupt processing task because the processing of saving / restoring processing resources during processing is complicated. Therefore, in a microprocessor system having a CPU, these processes are performed in real time OS and multitasking. Usually, this is performed by calling an interrupt management mechanism of an OS (hereinafter, collectively referred to as OS: operating system) (hereinafter referred to as a system call).
[0007]
In a DSP having an MP, it is usually constructed as a monitor program as software of one separate task separated from the interrupt processing task (usually called microcode or firmware in the DSP). Hereinafter, system calls and monitor programs are collectively referred to as interrupt handlers.
[0008]
Furthermore, as an interrupt process, in the case of a single interrupt (an interrupt that prohibits acceptance of other interrupts during interrupt processing), when an interrupt occurs, the processing resource being processed by the interrupt handler and the stack area of that task Save to the task control means, and simultaneously mask the interrupt mask to disable other interrupts and perform interrupt processing. When the interrupt processing is completed and the execution of the interrupted task is resumed, the task stack information, the task control means, and the interrupt mask are restored.
[0009]
Also, in an interrupt handler with multiple interrupts (interrupts that can accept other interrupts even during interrupt processing), all interrupts are disabled when disabling interrupt masking for single interrupts. Interrupt processing is performed without prohibition and without setting an interrupt mask for the higher interrupt level. This means that in an interrupt handler having multiple interrupts, it is necessary to determine which interrupt is prohibited when an interrupt occurs for each interrupt type.
[0010]
Also, if you want to perform processing at an interrupt level that is different from the interrupt level of the interrupt processing task in the interrupt processing task, a method is used in which an interrupt is generated and processed as an interrupt processing task with a different interrupt level using software interrupts. ing.
[0011]
[Problems to be solved by the invention]
However, the conventional interrupt management method has the following problems. (1) When other interrupts can be accepted in the interrupt task, or when a certain interrupt is prohibited thereafter, it is necessary to change the processing of the interrupt handler. However, since the interrupt handler and the interrupt processing task are closely related, it is difficult to independently change the interrupt processing contents by the interrupt handler or the interrupt processing task.
[0012]
(2) In the interrupt management method using the OS, interrupt handlers in the OS collectively perform interrupt disable / permit processing for all interrupt causes, and the user interrupts the interrupt handler in the OS. It is necessary to create an interrupt processing task in consideration of the management status.
[0013]
(3) It is difficult to construct an interrupt process that does not depend on the interrupt management state of the interrupt handler in the OS.
[0014]
(4) In the interrupt processing task, when processing at an interrupt level different from the interrupt level of the interrupt processing task is desired, using a software interrupt to generate and process an interrupt as an interrupt processing task having a different interrupt level, Since a new interrupt request is generated by a software interrupt, a processing resource saving / restoring process is required, and processing efficiency deteriorates.
[0015]
(5) Japanese Patent Application Laid-Open No. 5-224951 discloses a double interrupt that designates a software interrupt and shifts the process to the OS before the process is transferred to the interrupt handler when the CPU is started by the interrupt request. An interrupt handler activation unit that activates an interrupt handler by analyzing an interrupt factor and saving registers in the OS when processing is transferred via the double interrupt designation unit; A management method is disclosed that includes an interrupt handler end processing unit that restores registers in the OS and resumes interrupted processing when the interrupt handler is notified of the end of interrupt processing.
[0016]
However, in the case of the technique described in this publication, the save / restore processing of registers in the OS and the processing in the interrupt handler are separated by providing a double interrupt designating means, and the efficiency of interrupt handler creation is improved. It is designed to improve,
No means are disclosed for separating the interrupt handler and the interrupt processing task, and there is still a problem that the interrupt processing contents cannot be changed independently by the interrupt handler or the interrupt processing task.
[0017]
Furthermore, since a double interrupt designating unit is used that designates a software interrupt and shifts the process to the OS before the process shifts to the interrupt handler, it is necessary to save and restore processing resources during processing. That is, the problem that processing efficiency deteriorates cannot be solved at all.
[0018]
The present invention has been made in view of such a point, and when it is necessary to change the processing of an interrupt handler, such as when other interrupts can be accepted within an interrupt task, or when a certain interrupt is prohibited thereafter. In addition, interrupt processing contents can be easily changed by interrupt handlers and interrupt processing tasks.
[0019]
Further, in the interrupt management method using the OS, even when interrupt handlers in the OS collectively perform interrupt disable / permit processing for all interrupt causes, the user can interrupt interrupt handlers in the OS. Interrupt processing task can be created without being aware of the interrupt management status of
[0020]
In addition, it is possible to construct interrupt processing that does not depend on the interrupt management status of the interrupt handler in the OS, and in the interrupt processing task, when processing at an interrupt level different from the interrupt level of the interrupt processing task, An object of the present invention is to provide an interrupt management device and an interrupt management method that can be realized without specifying a software interrupt that requires resource saving / restoring processing.
[0021]
[Means for Solving the Problems]
The interrupt management device of the present invention notifies the interrupt handler with an interrupt mask. Control The interrupt control means that performs the above and the interrupt handler are provided independently and prepared for each interrupt factor. And a set of interrupt masks An interrupt acceptance management means for holding an interrupt acceptance status, an interrupt mask release control means for controlling release of an interrupt mask for an interrupt factor in an interrupt processing task, and an interrupt task switch management means for managing task switching information from the interrupt processing task; The interrupt handler includes an evacuation processing means for evacuating information on a task being executed when an interrupt occurs, and an interrupt that determines an interrupt processing task to be processed according to the cause of the interrupt. Depending on the processing of the factor determination processing means, the interrupt acceptance management means and the interrupt mask release control means Remove the interrupt mask from the interrupt ready state. Multiple interrupt control means for performing interrupt mask update control, interrupt task control processing means for performing processing transition between the interrupt processing task and the interrupt handler determined by the interrupt factor determination processing means, and the interrupt task switch management The task switching information managed by the means is used to control the task switching instruction from the interrupt processing task. If there is a task switching instruction, the control is transferred to the interrupt processing task, and if there is no task switching instruction, the interrupt task control processing means is controlled. And an interrupt task switch control means for transferring the task, and a task return processing means for returning the information of the task being executed when the interrupt saved by the save processing means is generated and restarting the suspended task processing. take.
[0022]
According to this configuration, when control is transferred from the interrupt control means to the interrupt handler when an interrupt occurs, the interrupt handler save processing means saves various information of the task being executed when the interrupt occurs. When various information of the task is saved, the interrupt factor determination processing means uses the interrupt acceptance management means to determine which interrupt factor is processed for the interrupt factor notified from the interrupt control means. Determine the interrupt handling task to call.
[0023]
When an interrupt processing task is determined, the multiple interrupt control means retrieves the interrupt mask for that interrupt processing task from the interrupt acceptance management means (holding the interrupt acceptance ready state prepared for each interrupt cause), and interrupt control Set to the interrupt mask of the means. At this time, since the interrupt mask has already been set by the interrupt mask of the interrupt control means when an interrupt occurs, no change is made to the interrupt mask for the interrupt factor for which the interrupt is disabled. In contrast to the interrupt mask state set in the interrupt control means when an interrupt occurs, the mask for the interrupt factor determined by the interrupt factor determination processing means is disabled, and the interrupt mask state is saved. Further, the state of the interrupt acceptance management means when an interrupt occurs is saved.
[0024]
Next, the interrupt task control processing means calls the interrupt processing task determined by the interrupt factor determination processing means. In the interrupt processing task, processing corresponding to the interrupt is performed. When a new interrupt factor is generated during this processing and the interrupt is permitted, information on the corresponding interrupt factor of the interrupt mask release control means Is set to the interrupt release state. Further, when the interrupt is permitted immediately, the corresponding interrupt mask of the interrupt mask of the interrupt controller is simultaneously set to the mask release state.
[0025]
When the processing of the interrupt processing task ends, the processing shifts to the interrupt task switch control means. At this time, if the interrupt processing task performs processing at an interrupt level different from the current interrupt level, the task switching information managed by the interrupt task switch management means corresponding to the interrupt level to be processed is set. Then, the processing shifts to the interrupt task switch control means.
[0026]
The interrupt task switch control means uses the task switching information managed by the interrupt task switch management means to determine which interrupt processing task is the interrupt processing task corresponding to the task switch instruction, and to call the interrupt processing task To decide. Then, the task switching information managed by the interrupt task switch management means is updated to call the determined interrupt processing task. If there is no task switching information managed by the interrupt task switch management means, control is transferred to the interrupt task control processing means.
[0027]
The interrupt task control processing means uses the multiple interrupt control means for both the interrupt acceptance management means saved before calling the interrupt processing task and the interrupt mask release control means set by the interrupt processing task. For the interrupt factor that is in the co-interrupt enabled state, the interrupt mask that is saved by the multiple interrupt control means and in which the corresponding bit in the interrupt mask state is set to enable interrupt is set in the interrupt mask of the interrupt controller. Further, for the interrupt factor changed to the interrupt enabled state at this time, the corresponding interrupt factor information of the interrupt mask release control means is reset. The task return processing means restores various information of the task that was being executed when the interrupt saved by the save processing means occurs, and resumes the processing of the suspended task.
[0028]
As described above, the interrupt acceptance management means and the interrupt mask release control means are prepared independently of the interrupt handler, and the multiple interrupt control means defines only the control method using the interrupt acceptance management means. When interrupt handler processing needs to be changed, such as when other interrupts can be accepted within an interrupt task, or when certain interrupts are prohibited thereafter, interrupt acceptance management means and interrupt mask release The control means can be changed, and an interrupt processing task can be created without being aware of the interrupt management status of the interrupt handler. In addition, it is possible to construct an interrupt process independent of the interrupt management state of the interrupt handler.
[0029]
Also, if you want to perform processing at an interrupt level different from the interrupt level of the interrupt processing task within the interrupt processing task, set the task switching information managed by the interrupt task switch management means corresponding to the interrupt level to be processed Thus, it is possible to construct an interrupt process that can change the interrupt level without designating a software interrupt that requires a process for saving / restoring the processing resource being processed.
[0030]
Also, the interrupt management device of the present invention provides an interrupt notification to an interrupt handler with an interrupt mask. Control The interrupt control means that performs the above and the interrupt handler are provided independently and prepared for each interrupt factor. And a set of interrupt masks An interrupt acceptance management means for holding an interrupt acceptance status, an interrupt mask release control means for controlling release of an interrupt mask for an interrupt factor in an interrupt processing task, and an interrupt task switch management means for managing task switching information from the interrupt processing task; The interrupt handler includes an evacuation processing means for evacuating information on a task being executed when an interrupt occurs, and an interrupt that determines an interrupt processing task to be processed according to the cause of the interrupt. Depending on the processing of the factor determination processing means, the interrupt acceptance management means and the interrupt mask release control means Remove the interrupt mask from the interrupt ready state. Multiple interrupt control means for performing interrupt mask update control, interrupt task control processing means for performing processing transition between the interrupt processing task and the interrupt handler determined by the interrupt factor determination processing means, and the interrupt task switch management The task switching information managed by the means is used to control the task switching instruction from the interrupt processing task. If there is a task switching instruction, the control is transferred to the interrupt processing task, and if there is no task switching instruction, the interrupt factor determination processing means is controlled. And an interrupt task switch control means for transferring the task, and a task return processing means for returning the information of the task being executed when the interrupt saved by the save processing means is generated and restarting the suspended task processing. take.
[0031]
According to this configuration, the interrupt factor determination processing unit responds to the mask state determined by the interrupt factor determination processing unit, that is, the interrupt factor with respect to the interrupt mask state set in the interrupt control unit when an interrupt occurs. The interrupt factor determination process is performed again for the same interrupt level each time control is transferred from the interrupt processing task to the interrupt handler using the interrupt mask state in which the mask is set to the interrupt disabled state.
[0032]
Therefore, in addition to the operation of the interrupt management device configured as described above, every time control is transferred from the interrupt processing task to the interrupt handler, the interrupt factor determination is performed again for the interrupt of the same interrupt level without performing the return processing of the processing resource being processed. It is possible to construct an interrupt process that can be processed.
[0033]
The interrupt management device of the present invention comprises factor determination calculation processing means for performing calculation processing when controlling the task switching instruction in the interrupt task switch control means in the interrupt management device, while the interrupt handler A configuration including factor determination calculation control means for controlling a calculation method when the determination calculation processing means performs calculation is employed.
[0034]
According to this configuration, as the task switching information from the interrupt processing task managed by the interrupt task switch management means, the same information as the interrupt factor that controls the notification is managed by the interrupt control means, and the interrupt factor determination processing means When determining the interrupt processing task to be processed according to the factor, the factor determination calculation processing means is performed using the result after the calculation according to the calculation method instructed by the factor determination calculation control means.
[0035]
Therefore, in addition to the operation of the interrupt management device configured as described above, when the control is transferred from the interrupt processing task to the interrupt handler, the generation of the interrupt factor managed by the interrupt control means is instructed by the task switch management means from the interrupt processing task. Therefore, it is possible to construct an interrupt process that does not require a save / restore process for the processing resource being processed.
[0036]
The interrupt management device according to the present invention includes an initialization task management means for storing a task call address for performing task initialization processing and an execution task for holding information on a task being executed in the interrupt management device. A control means, an initialization task instruction means for storing information of a task to interrupt processing, a task control means for determining a processing task to be processed and storing a call address for each processing task, and the initialization task management The interrupt handler uses the information from the interrupt task switch control means to determine whether to interrupt the task, and the task must be interrupted. If there is a suspended task determination means for storing information on the suspended task in the initialization task instruction means, Task suspension processing means for calling the dispatch processing means without restoring the task information once for the information of the task being executed at the time of the occurrence of the interrupt, and various information of the task being executed at the time of the interruption occurrence When returning a task that has been interrupted according to the processing of the task recovery processing means that performs recovery, the execution task control means, and the interrupted task determination means, it is determined whether or not initialization of the task is necessary, and initialization is performed. The system includes a task management control unit that calls the task suspension processing unit when returning to a task that requires processing, and that calls the task return processing unit when initialization processing is unnecessary.
[0037]
According to this configuration, the execution task control means stores information on the task being executed in the processing task and the interrupt processing task. In the interrupt handler, the information on the task being executed stored in the execution task control means is saved by the multiple interrupt control means when the interrupt occurs, and the interrupt processing task information determined by the interrupt factor determination processing means is saved. It is newly stored in the execution task control means.
[0038]
When the task is required to be initialized in the interrupt processing task, the task information to be initialized is stored in the interrupt task switch management means. When the processing of the interrupt processing task ends, the processing shifts to the interrupt task switch control means. At this time, if the interrupt task determination means determines whether the task initialization is necessary and the task initialization is instructed The information of the task to be initialized is stored in the initialization task instruction means. When the control is transferred to the interrupt task control processing means, the task management control means stores the execution task control means information saved before calling the interrupt processing task and the initialization task instruction means. Compare the information of the tasks to be initialized.
[0039]
When the same task is instructed, the task suspension processing means that simply calls the dispatch processing means of the task manager is called, not the task recovery processing means that restores various information in the task that was being executed when the interrupt occurred. As a result, the processing of the suspended task is resumed. If initialization processing is not required, task return processing means for saving various information in the task that was being executed when the interrupt occurred is called, and processing of the suspended task is resumed. Then, when switching the processing task to be called by the dispatch processing means of the task manager, it is compared with the processing task instructed by the initialization task instruction means, and the calling processing task requires initialization processing. Calls the task that performs the initialization process using the call address stored in the initialization task management means.
[0040]
Therefore, in addition to the operation of the interrupt management device configured as described above, the suspended task determination means for determining whether or not the initialization process of the suspended task is necessary when returning to the suspended task using the execution task control means and the interrupt task switch management means And task management control means for calling a task for performing initialization processing using a call address stored in the initialization task management means when returning to a task that requires initialization initialization processing. In the interrupt processing task, when a situation occurs in which the task processing is controlled to start from the initial state, the task that was being executed when the interrupt was saved by the save processing means (returned in the initialization process) Without returning various information of tasks that do not need to be performed), the task manager dispatch processing means again Task it is possible to start processing from the initialization process only when instructed.
[0041]
In the interrupt management device according to the present invention, in the interrupt management device, the interrupt task determination unit determines whether the task is interrupted using the information of the factor determination calculation processing unit.
[0042]
According to this configuration, the interrupt control unit controls the notification as the task suspension information from the interrupt processing task instructed by the interrupt task switch management unit is the task initialization determination performed by the interrupt task determination unit. The same information as the interrupt factor is also managed, and the factor determination calculation processing means performs the calculation using the result after the calculation according to the calculation method instructed by the factor determination calculation control means.
[0043]
Therefore, in addition to the operation of the interrupt management device having the above-described configuration, it is possible to construct an interrupt process capable of determining a suspended task in consideration of the generation of an interrupt factor managed by the interrupt control means.
[0044]
The base station apparatus of the present invention employs a configuration including the interrupt management apparatus.
[0045]
The mobile station apparatus of the present invention employs a configuration including the interrupt management apparatus.
[0046]
By providing the interrupt management device in each device, the processing efficiency in communication can be improved.
[0047]
The interrupt management method of the present invention controls interrupt notification to an interrupt handler with an interrupt mask, saves information on a task being executed when an interrupt is generated by this control, and interrupts to be processed according to the interrupt factor processing The task is determined and prepared for each interrupt source independently of the interrupt handler. And a set of interrupt masks Depending on interrupt mask release control information and interrupt acceptance enable state information to hold interrupt acceptance enable state and control interrupt permission in interrupt processing task Remove the interrupt mask from the interrupt ready state. Performs interrupt mask update control, transitions between the determined interrupt processing task and interrupt handler, manages task switching information from the interrupt processing task, and uses the task switching information to Controls task switching instructions. If there is a task switching instruction, control is transferred to the interrupt processing task. If there is no task switching instruction, the task information that was being executed when the saved interrupt occurred is restored and suspended. Resume processing I did .
[0048]
According to this method, the interrupt acceptance management information and interrupt mask release control information are prepared independently of the interrupt handler, and the interrupt mask update control defines only the control method using the interrupt acceptance management information. If it is necessary to change the interrupt handler processing, such as when other interrupts can be accepted within the interrupt task or when certain interrupts are prohibited thereafter, the interrupt acceptance management information Interrupt mask release control information can be changed, and interrupt processing tasks can be created without being aware of the interrupt management status of the interrupt handler. In addition, it is possible to construct an interrupt process independent of the interrupt management state of the interrupt handler.
[0049]
In addition, if you want to process at an interrupt level that is different from the interrupt level of the interrupt processing task in the interrupt processing task, you can set task switching information corresponding to the interrupt level to be processed, and save and restore the processing resources being processed The interrupt level can be changed without specifying a software interrupt that requires processing.
[0050]
The interrupt management method of the present invention controls task switching instructions from the interrupt processing task using task switching information in the above interrupt management method, and transfers control to the interrupt processing task when there is a task switching instruction. When there is no task switching instruction, the task is called to determine the interrupt processing task to be processed according to the interrupt factor.
[0051]
According to this method, in addition to the operation of the interrupt management method of the above method, every time control is transferred from the interrupt processing task to the interrupt handler, the processing resource return processing is performed for the interrupt of the same interrupt level. Therefore, it is possible to construct an interrupt process that can perform the interrupt factor determination process again.
[0052]
The interrupt management method of the present invention controls the calculation method when the factor determination calculation process performs calculation in the above interrupt management method, when calculating the interrupt processing task to be processed in the interrupt factor determination process. .
[0053]
According to this method, in addition to the operation of the above interrupt management method, when the control is transferred from the interrupt processing task to the interrupt handler, an interrupt factor managed by the interrupt control means is generated by an instruction from the interrupt processing task. Therefore, it is possible to construct an interrupt process that does not need to save / restore processing resources during processing.
[0054]
Also, the interrupt management method of the present invention is the above-described interrupt management method. In the interrupt management method, initialization task management information for storing a call address of a task for performing task initialization processing and a task being executed independently of the interrupt handler. Information is stored, the task switching information is used to determine whether to suspend the task, and if the task needs to be suspended, the information on the task to be suspended is stored in the initialization task instruction information, and the process to be processed A task manager having a dispatch process for determining a task and storing a task control information storing a call address for each processing task and switching a processing task to be called according to the initialization task management information, and a task being executed when an interrupt occurs The task suspension processing task that calls the dispatch processing without performing the return of the information in When returning to the suspended task according to the information of the task in progress and the initialization task instruction information, it is determined whether or not the initialization process of the suspended task is necessary, and the task is suspended when returning to the task that requires initialization processing. Call the processing task, and call the task return processing task if initialization processing is not required.
[0055]
According to this method, in addition to the operation of the interrupt management method described above, the interrupt task determination process for determining whether or not the interrupt task initialization process is necessary when returning to the interrupt task using the execution task control information and the task switching information When a task returns to a task that requires initialization processing, the task that performs initialization processing is called using the call address stored in the initialization task management information. When a situation occurs in which the processing is controlled so as to start from the initial state, it is no longer necessary to return in the initialization processing, without restoring various information in the task that was being executed when the saved interrupt occurred In addition, the initialization process is an initialization process only when the task is dispatched again by the task manager dispatch process. It is possible to start the process.
[0056]
The recording medium of the present invention is any one of the above Interrupt management method Same interrupt management method For running on a computer Take the structure in which the program is recorded.
[0057]
According to this configuration, the recording medium is Discount The interrupt management control can be realized by reading the program that executes the management management method.
[0058]
Operating system of the present invention Recording medium The above interrupt management method To realize Has processing function Take composition .
[0059]
According to this configuration, the interrupt management control can be realized by reading the program that executes the interrupt management control method.
[0060]
The signal processing processor according to the present invention comprises the above interrupt management method. To realize A processing function is provided.
[0061]
According to this configuration, the interrupt management control can be realized by reading the program that executes the interrupt management control method.
[0062]
DETAILED DESCRIPTION OF THE INVENTION
The gist of the present invention is to notify an interrupt handler of an interrupt generated for an interrupt factor by controlling an interrupt mask.
[0063]
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0064]
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 1 of the present invention. In this figure, the interrupt management device 100 includes an interrupt handler 101, an interrupt controller 102, an interrupt acceptance management unit 103, an interrupt mask release control unit 104, and an interrupt task switch management unit 105. .
[0065]
The interrupt handler 101 includes a save processing unit 106, an interrupt factor determination processing unit 107, an interrupt task control processing unit 108, a task return processing unit 109, a multiple interrupt control unit 110, and an interrupt task switch control unit 111. ing. The interrupt controller 102 includes an interrupt mask unit 112.
[0066]
In this figure, reference numerals 121-1 to 121-N are first to Nth interrupt factors. Reference numeral 123 denotes a processing task, which has first to Nth tasks 124-1 to 124-N. Reference numeral 127 denotes an interrupt processing task, which includes first to Nth interrupt processing tasks 128-1 to 128-N.
[0067]
The interrupt controller 102 controls interrupt notification to the interrupt handler 101 using the interrupt mask unit 112. In the interrupt handler 101, the save processing unit 106 saves various information of the task that was being executed when the interrupt occurred. The interrupt factor determination processing unit 107 determines an interrupt processing task to be processed based on the interrupt factor. The interrupt task control processing unit 108 performs processing transition between the determined interrupt processing task and the interrupt handler. The multiple interrupt control unit 110 performs interrupt mask update control using the interrupt acceptance management unit 103 and the interrupt mask release control unit 104. The interrupt task switch control unit 111 controls the task switching instruction from the interrupt processing task 127 using the task switching information managed by the interrupt task switch management unit 105. If there is a task switching instruction, the interrupt task switch control unit 111 returns to the interrupt processing task 127 again. Control is transferred, and if there is no task switching instruction, control is transferred to the interrupt task control processing unit 108.
[0068]
Of the interrupt receivable management unit 103, the interrupt mask release control unit 104, and the interrupt task switch management unit 105 provided independently of the interrupt handler 101, the interrupt receivable management unit 103 includes an interrupt reception prepared for each interrupt factor. The interrupt mask release control unit 104 controls the permission of the interrupt in the interrupt processing task. The interrupt task switch management unit 105 manages task switching information from the interrupt processing task 127.
[0069]
Next, the operation of the interrupt management apparatus 100 configured as described above will be described.
FIG. 2 is a diagram for explaining the operation of the interrupt controller 102. Here, in order to simplify the description, there are eight types of interrupt factors (IRQn: n = 0, 1 to 7) as interrupt factors, all are maskable interrupts, and each interrupt factor is generated. An interrupt request register (referred to as IR: Interrupt Request) and an interrupt mask register (referred to as IM: Interrupt Mask) for controlling interrupt prohibition (0) / permission (1) for each interrupt factor as the interrupt mask unit 112 And an interrupt request reset register (IRR: Interrupt Request Reset) that exists for each interrupt factor and is used to reset the interrupt request register IR.
[0070]
When the software sets (1) data in the IRR, the corresponding bit of the IR is reset (0). Each of the IR, IM, and IRR registers is implemented using the LSB8 bit of a 16-bit register, and an interrupt enable flag (0) / allow (1) interrupt enable flag (for all maskable interrupt factors) is controlled simultaneously. In this example, IE (Interrupt Enable) is provided.
[0071]
2 (a), (b), (c), and (d) show IR, IM, IRR, and IE, and bits for each interrupt factor IRQn (n = 0, 1,..., 7) IRn, IMn, IRRn (n = 0, 1,..., 7).
In addition, an example is shown in which “0” is set to a bit that does not correspond to an interrupt factor.
[0072]
FIG. 3 is a diagram showing a processing flow in the interrupt controller 102 when an interrupt factor occurs. As shown in this figure, when an interrupt factor is generated and detected (step 10), the corresponding bit of the interrupt request register is set (1) (step 12). After setting the corresponding bit in the interrupt request register, it is determined whether or not the interrupt permission flag is permitted (step 14). If not permitted, the process shifts to a standby state (step 16). Determines whether the corresponding bit of the interrupt mask register is enabled (1) (step 18). In this determination, if the corresponding bit of the interrupt mask register is not permitted, the process shifts to a standby state. If permitted, the interrupt permission flag is disabled (0) (step 20), and then the interrupt handler processes. A transition is made (step 22).
Furthermore, the interrupt factor determination process is also performed when the interrupt permission flag or the interrupt mask register is changed from the prohibited (0) state to the permitted (1) state (steps 24 and 26).
[0073]
Hereinafter, in order to simplify the description of the processing in the interrupt handler 101, when the processing transitions to the interrupt handler 101, four types of interrupt factors IRQ6, IRQ4, IRQ1, and IRQ0 are set (1) as interrupt factors. In this case, IM7, IM6, IM3, IM1, and IM0 are set to interrupt permission (1) as the setting state of the interrupt mask register IM, and all the interrupts are set as interrupt acceptance management means at that time. A case where the permitted interrupt mask is retained in the interrupt acceptance management unit 103 (this retained register is referred to as IMFGreg) will be described.
[0074]
Also, task switching information from the interrupt processing task managed by the interrupt task switch management unit 105 is realized by using the MSB 8 bit of the 16-bit register (the register holding this information is called TKSreg, task switching An example will be described in which “0” is set for bits not corresponding to information). The TKSreg is instructed (1) to the bit position corresponding to the task corresponding to the task switching instruction, and the release (0) is set when there is no instruction. The case where all the TKSreg states at this time are released will be described.
[0075]
Further, it is assumed that the interrupt mask release control unit 104 at this time has no interrupt factor to be masked, that is, all the bits of the interrupt mask release control unit 104 are set to clear (0).
[0076]
In addition, four interrupt levels are set as the interrupt level of the interrupt factor.
Level 0 interrupt factor: IRQ2, IRQ3
Level 1 interrupt factor: IRQ0, IRQ1
Level 2 interrupt factors: IRQ7, IRQ6, IRQ4
Level 3 interrupt factor: IRQ5
And level 0> level 1> level 2> level 3.
[0077]
The interrupt acceptance management unit 103 holds an interrupt mask register setting state (referred to as IMFG) in which only an interrupt factor having a higher level than the interrupt factor level is permitted (1) for each interrupt. The
[0078]
FIG. 4 shows the setting state of the interrupt mask register to be set for the interrupt level, and IMFGn corresponds to IRQn (n = 0, 1,..., 7), respectively. For example, in IMFG6 for interrupt factor IRQ6, the corresponding bits of IRQ0, IRQ1, IRQ2, and IRQ3, which are higher in level than IRQ6, are set to enable (1). Further, since IMFG1 corresponding to the interrupt factor IRQ2 does not have an interrupt factor having a higher level than IRQ2, all bits are set to disabled (0).
[0079]
First, when the process transitions to the interrupt handler 101, various information of the processing task being executed at that time (this processing task is referred to as the interrupt task 125) is saved by the save processing unit 106.
[0080]
Next, with respect to the interrupt factor notified from the interrupt controller 102 by the interrupt factor determination processing unit 107, it is determined which interrupt factor is to be processed using the interrupt acceptance management unit 103, and the interrupt processing task to be called is determined. decide.
[0081]
FIG. 5 is an explanatory diagram of the interrupt factor determination processing procedure.
Since four types of interrupt factors IRQ6, IRQ4, IRQ1, and IRQ0 are set (1) as interrupt factors, each corresponding bit of IR6, IR4, IR1, and IR0 is 1 in the interrupt request register IR (S1 ).
As the setting state of the interrupt mask register IM, IM7, IM6, IM3, IM1, and IM0 are set to interrupt permission (1), so the interrupt mask register IM is set to each bit 1 of IM7, IM6, IM3, IM1, and IM0. (S2).
[0082]
Next, an AND operation for each corresponding bit of S1 and S2 is performed (S3).
In the state of S3, evaluation is performed in order from the MSB side, and an interrupt factor corresponding to a bit having a value of 1 is selected. In this case, since the bit at the position with respect to IRQ6 is first 1, IRQ6 is selected as an interrupt factor.
[0083]
Next, with respect to the setting state IMFG in the interrupt mask register held in the interrupt acceptance management unit 103, the setting state IMFG6 in the interrupt mask register corresponding to the selected interrupt factor IRQ6 (that is, IMFG6 in FIG. 5). (S4).
[0084]
Next, an AND operation for each corresponding bit of S3 and S4 is performed (S5).
Next, the same evaluation as that performed for the state of S3 is performed, and IRQ1 is selected as an interrupt factor. Next, processing similar to S4 is performed to obtain IMFG1 (that is, the value of IMFG1 in FIG. 5) from the interrupt acceptance management unit 103 (S6).
[0085]
Next, if the same processing as S5 is performed, all the bits become 0 (S7). Therefore, if the same evaluation as that performed for the state of S3 is performed, there is no corresponding interrupt factor. At this time, the interrupt factor evaluated immediately before, that is, IRQ1 is selected as the interrupt factor, the interrupt processing task for IRQ1 is determined as the interrupt processing task to be called, and the processing transitions to the interrupt task control processing unit 108.
[0086]
Since IRQ1 is selected as the interrupt factor at this time, the bit corresponding to IRQ1 of the interrupt request reset register IRR, that is, by setting (1) IRR1, the interrupt factor of IRQ1 set in the interrupt request register IR is reset. (0) is performed.
Here, the interrupt processing task for IRQ1 is referred to as an R-th interrupt processing task 129, which will be described below.
[0087]
FIG. 6 is an explanatory diagram of a processing procedure in the multiple interrupt control unit 110.
The multiple interrupt control unit 110 extracts the interrupt mask IMFG1 for the determined R-th interrupt processing task 129 from the interrupt acceptance management unit 103 that holds the interrupt acceptance state prepared for each interrupt factor, and Set in the interrupt mask unit 112.
[0088]
At this time, when an interrupt occurs, an interrupt mask is already set in the interrupt mask unit 112 of the interrupt controller 102, and no change is made to the interrupt mask for the interrupt factor for which the interrupt is disabled. That is, by performing an AND operation for each corresponding bit of IMFG1 in S6 and IM in S2, an interrupt mask state to be set in the interrupt mask 34 is determined, and this mask state is set in the interrupt mask 34 (S8).
[0089]
Further, with respect to the interrupt mask state set in the interrupt controller 102 when an interrupt occurs, the interrupt mask state in which the mask for the interrupt factor IRQ1 determined by the interrupt factor determination processing unit 107 is disabled is saved. That is, the state (S10) obtained by performing an EOR operation on the S2 IM with only the corresponding bit of the interrupt factor IRQ1 set to 1 (S9) is saved (the saved register is called IM_SHLTreg). ).
[0090]
Further, the state of the interrupt acceptance management means when an interrupt occurs is saved. That is, the contents (S11) of IMFGreg in a state where all interrupts are permitted are saved (a register to be saved is called IM_SHLTreg).
[0091]
Next, the interrupt task control processing unit 108 calls the R-th interrupt processing task 129 that is the corresponding interrupt processing task determined by the interrupt factor determination processing processing unit 12. In the R-th interrupt processing task 129, processing corresponding to the interrupt is performed. When interrupt is permitted for a new interrupt factor during this processing, the interrupt mask release control unit 104 sets the corresponding interrupt factor. Set the information to interrupt release state. When the interrupt is permitted immediately, the corresponding interrupt mask of the interrupt mask unit 112 of the interrupt controller 102 is simultaneously set to the mask release state.
[0092]
That is, in the process of the R-th interrupt processing task 129, considering that the interrupt factor IRQ2 can be newly accepted, all the bits of the interrupt mask release control unit 104 are set to clear (0). Therefore, when the interrupt factor IRQ2 can be accepted, the corresponding bit of the interrupt mask release control unit 104 is set (1).
[0093]
FIG. 7A shows the state of the interrupt mask release control unit 104 at this time (S12).
[0094]
Further, since IRQ2 is an interrupt factor at a higher level than the interrupt factor IRQ1 to be processed by the R-th interrupt processing task 129, the interrupt is permitted immediately, and the interrupt mask unit 112 of the interrupt controller 102 at the present time The interrupt mask of the corresponding bit of IRQ2 is canceled (1) with respect to the set state S8. FIG. 7B shows the state of the interrupt mask unit 112 at this time (S13).
[0095]
A case will be described in which the interrupt level is changed and the interrupt processing task 127 is processed in the processing of the interrupt processing task R129.
In this case, an instruction (1) is set in the corresponding bit of the task switching information TKSreg managed by the interrupt task switch management unit 105 corresponding to the interrupt processing task 127 whose interrupt level is to be changed, and the interrupt task switch control unit 111 is set. Transfer control.
[0096]
When any bit of TKSreg is 1, the interrupt task switch control unit 111 evaluates TKSreg in order from the MSB and selects the interrupt processing task 127 corresponding to the task switching instruction that is first set to 1 (here, The following description will proceed assuming that the Nth interrupt processing task 130 has been selected, and the bit of the corresponding TKSreg is set to release (0).
[0097]
Also, the interrupt acceptance management unit 103 holds an IMFG for each interrupt task switch instruction.
Then, using the information of IMFG, IM_SHLTreg, and IM corresponding to the selected interrupt processing task
((IM_SHLTreg and IMFG) eor IM) eor IM_SHLTreg
The bit information calculated by the above operation is newly set in IM1.
When the processing of the interrupt processing task N130 is completed, the processing shifts to the interrupt task switch control unit 111 again.
[0098]
Then, the above process is repeated until all bits of TKSreg managed by the interrupt task switch management unit 105 become 0. When all bits of TKSreg become 0, control is transferred to the interrupt task control unit 108.
[0099]
At this time, the state of the interrupt acceptance management unit 103 saved in IMFG_SHLTreg before calling the R-th interrupt processing task 129 by the multiple interrupt control unit 110 and the R-th interrupt processing task 129 are set. The interrupt mask state saved to IM_SIM_SHLTreg by the multiple interrupt control unit 110 for the interrupt factor in which both interrupts are enabled, that is, IRQ2 with respect to the state (S12) of the interrupt mask release control unit 104 that has been made The corresponding bit of (S10) set to enable interrupt is set in the interrupt mask unit 112 of the interrupt controller 102. FIG. 7C shows the state of the mask 34 at this time (S14).
[0100]
Furthermore, the interrupt factor information corresponding to the interrupt mask cancellation control unit 104 is reset for the interrupt factor IRQ2 changed to the interrupt enabled state at this time. FIG. 7D shows the state of the interrupt mask release control unit 104 at this time (S15). Then, the task return processing unit 109 restores various information of the task that was being executed when the interrupt saved by the save processing unit 106 occurred, and resumes the processing of the suspended task 125.
[0101]
As described above, according to the interrupt management device 100 of the first embodiment, the interrupt receivable management unit 103 and the interrupt mask release control unit 104 are prepared independently of the interrupt handler 101, and the multiple interrupt control unit 110 Since only the control method using the receivable management means 51 is defined, the processing of the interrupt handler 101 such as when other interrupts can be accepted within the interrupt task or when certain interrupts are prohibited thereafter. When it is necessary to change the interrupt handler management unit 103 and the interrupt mask release control unit 104, the interrupt handler task 127 can be created without being aware of the interrupt management state of the interrupt handler 101. Construction of interrupt processing that does not depend on the interrupt management state of the interrupt handler 101 Possible to become.
[0102]
Also, in the interrupt processing task 127, when it is desired to perform processing at an interrupt level different from the interrupt level of the interrupt processing task, the task switching information managed by the interrupt task switch management unit 105 corresponding to the interrupt level to be processed is displayed. It is possible to construct an interrupt process that can change the interrupt level without specifying a software interrupt that needs to save / restore the processing resource during processing.
[0103]
In the first embodiment, the interrupt task switching instruction is described as the case where the interrupt level is changed. However, the task switching is not performed when the same processing is performed in the interrupt processing task 127 instead of changing the interrupt level. It can be realized similarly.
[0104]
(Embodiment 2)
FIG. 8 is a block diagram showing the configuration of the interrupt management apparatus according to Embodiment 2 of the present invention. In the second embodiment shown in this figure, parts corresponding to those in the first embodiment shown in FIG.
[0105]
The interrupt management device 700 according to the second embodiment shown in this figure includes an interrupt task switch control unit 701 in the interrupt handler 101 in addition to the components of the interrupt management device 100 according to the first embodiment. The interrupt task switch control unit 701 uses the task switching information managed by the interrupt task switch management unit 105 to control a task switching instruction from the interrupt processing task 127. Control is transferred again, and if there is no task switching instruction, processing similar to that of the interrupt task switch control unit 111 of the first embodiment is performed except that control is transferred to the interrupt factor determination processing unit 107.
[0106]
The interrupt factor determination processing unit 107 acquires IR information at the time of the interrupt immediately before being saved in the save processing unit 106, and was set in the interrupt controller 102 when an interrupt generated by the multiple interrupt control unit 110 occurred. The interrupt processing task 127 to the interrupt handler 101 use the interrupt mask state (S8) in which the mask for the interrupt factor determined by the interrupt factor determination processing unit 107 is set to the interrupt disabled state with respect to the interrupt mask state (S2). Each time control is transferred to, the same interrupt factor determination processing as in FIG. 5 is performed again for the same interrupt level.
[0107]
As described above, according to the interrupt management device 700 of the second embodiment, every time control is transferred from the interrupt processing task 127 to the interrupt handler 101, the processing resource restoration process is performed for an interrupt of the same interrupt level. It is possible to construct an interrupt process that can perform the interrupt factor determination process again without performing it.
[0108]
(Embodiment 3)
FIG. 9 is a block diagram showing the configuration of the interrupt management apparatus according to Embodiment 3 of the present invention. In the third embodiment shown in this figure, parts corresponding to those in the second embodiment shown in FIG.
[0109]
In addition to the components of the interrupt management device 700 of the second embodiment, the interrupt management device 800 of the third embodiment shown in this figure includes a factor determination calculation processing unit 801 and a factor determination calculation control unit 802 in the interrupt handler 101. And.
[0110]
Here, as an example, an OR operation is designated as the calculation method of the factor determination calculation control unit 802 that controls the calculation method when the factor determination calculation processing unit 801 performs calculation, and the interrupt factor determination processing unit 107 should process the calculation. A case where the factor determination calculation processing unit 801 performs OR calculation processing when determining an interrupt processing task will be described.
[0111]
Further, a case is considered in which, in the task switching information TKSreg from the interrupt processing task managed by the interrupt task switch management unit 105, the same information as the interrupt factor that controls the notification is managed using LSB8bit.
[0112]
In this case, it can be set as information for instructing an interrupt at the same position as that in FIG.
The factor determination calculation processing unit 801 performs an OR operation on the bit position corresponding to the instructed interrupt factor with the IR information saved by the save processing unit 106 immediately before, and stores the result in the save processing unit 106. Control is returned to the task switch control unit 111.
[0113]
As described above, according to the interrupt management device 800 of the third embodiment, when control is transferred from the interrupt processing task 127 to the interrupt handler 101, the generation of the interrupt factor managed by the interrupt controller 102 is generated from the task from the interrupt processing task 127. This can be performed by an instruction from the switch management unit 105, and it is possible to construct an interrupt process that does not require a save / restore process of the processing resource being processed.
[0114]
(Embodiment 4)
FIG. 10 is a block diagram showing the configuration of the interrupt management apparatus according to Embodiment 4 of the present invention. In the fourth embodiment shown in this figure, portions corresponding to those in the first embodiment shown in FIG.
[0115]
In addition to the components of the interrupt management apparatus 100 of the first embodiment, the interrupt management apparatus 900 of the fourth embodiment shown in this figure includes an execution task control unit 901, an initialization task instruction unit 902, and an initialization task management. 903, a task management control unit 904, a task suspension processing unit 905, a suspended task determination unit 906, and a task manager 909 provided with a dispatch processing unit 908 having a task control unit 907. The task management control unit 904, the task suspension processing unit 905, and the suspended task determination unit 906 are provided in the interrupt handler 101.
[0116]
The initialization task management unit 903 stores a call address of a task that performs task initialization processing independently of the interrupt handler 101. The execution task control unit 901 holds information on a task being executed. The initialization task instruction unit 902 instructs (holds) setting of a task that requires initialization processing. A dispatch processing unit 908 of the task manager 909 determines a processing task to be processed, stores a task control unit 901 that stores a calling address for each processing task, and stores a calling address of a task that performs task initialization processing. The initialization task management unit 903 is used to perform processing task switching processing to be called.
[0117]
When the task management control unit 904 uses the execution task control unit 901 and the initialization task instruction unit 902 to return to the suspended task, the task management control unit 904 determines whether or not the suspended task initialization process is necessary. When returning, the task that performs the initialization process stored in the initialization task management unit 903 is called. The task interruption processing unit 905 calls the dispatch processing unit 908 without restoring various information in the task that was being executed when the interrupt saved by the save processing unit 106 occurred. The suspended task determination unit 906 determines a task to be suspended from the suspended task information managed by the interrupt task switch management unit 105, and sets the information in the initialization task instruction unit 902.
[0118]
The operation of the interrupt management apparatus 900 of the fourth embodiment configured as described above will be described. However, in order to simplify the description of the processing in the interrupt handler 101, description will be made using the description in the first embodiment.
[0119]
(A) of FIG. 11 shows the state of the information of the task being executed stored in the execution task control unit 901. Each task of the processing task 4 and the interrupt processing task 2 is associated with each bit. This shows the case of management. On the other hand, FIG. 11B shows a case where a task that requires initialization processing is set in the initialization task instruction unit 902 corresponding to each bit in the same manner as the execution task control unit 901.
[0120]
The execution task control unit 901 stores information on a task being executed (called TSKINF) among the processing task and the interrupt processing task. First, when the process transitions to the interrupt handler 101, 1 is set to the corresponding bit of the processing task (interrupt task 125) being executed at that time (T1).
[0121]
Next, the multiple interrupt control unit 110 saves the information of the task being executed that was stored in the execution task control unit 901 when the interrupt occurred, that is, the state of T1 (the save register is referred to as TSKINF_SHLTreg), and interrupt factor determination processing Information (T2) of the R-th interrupt processing task 129 determined by the unit 107 is newly stored in the execution task control unit 901.
[0122]
When the R-th interrupt processing task 129 needs to be initialized, the task information to be initialized is stored in the interrupt task switch management unit 105. When the processing of the R-th interrupt processing task 129 is completed, when the control is transferred again to the interrupt task switch control unit 111, the interrupt task determination unit 906 performs initialization tasks stored in the interrupt task switch management unit 105 From this information, the task that needs to be initialized is interpreted, and the initialization task instruction unit 902 stores the information of the task to be initialized.
[0123]
Consider a case where the suspended task 125 is set as a task that requires initialization. In this case, 1 is set to the corresponding bit of the suspended task 125 in the initialization task instruction unit 902 (T3). Thereafter, the processing shifts to the interrupt task control processing unit 108. At this time, the information (T2) of the execution task control unit 901 saved by the multiple interrupt control unit 110 in TSKINF_SHLTreg before calling the interrupt processing task. The task management control unit 904 performs comparison using the information (T3) of the task to be initialized stored in the initialization task instruction unit 902.
[0124]
The task management control unit 904 calls the task suspension processing unit 905 when the compared tasks indicate the same task, and calls the task return processing unit 109 when the processing is unnecessary. For example, since the information of the execution task control unit 901 saved in TSKINF_SHLTreg is information on the task that was being executed when the interrupt occurred, only the corresponding 1 bit is always set to 1, so the task management control unit If the AND operation of T2 and T3 is performed at 904 and becomes a non-zero value, it can be determined that the compared task indicates the same task, and in this case, the task is the same.
[0125]
As described above, when returning to the suspended task, it is determined whether or not the initialization process of the suspended task is necessary, and when returning to the task that needs the initialization process, the interruption processing unit 106 is executing when an interrupt is saved. The task suspension processing unit 905 is called instead of the task return processing unit 109 that saves various information of the task.
[0126]
When the initialization process is not required, the task return processing unit 109 that restores various information in the task that was being executed when the interrupt saved by the save processing unit 106 is called is called, and the suspended task processing is resumed. The
[0127]
The comparison with the processing task instructed by the initialization task instruction unit 902 when switching the processing task to be called by the dispatch processing unit 908 of the task manager 909 is the same as the comparison processing in the task management control unit 904. If the process task to be called is a task that requires an initialization process, the task that performs the initialization process is called using the call address stored in the initialization task management unit 903.
[0128]
As described above, according to the interrupt management apparatus 900 of the fourth embodiment, the initialization task management unit 903 that stores the call address of the task that performs the task initialization process, and the execution task that holds the information of the task being executed The interrupt task determination unit 906 interprets the information of the task that requires the initialization processing set in the control unit 901 and the interrupt task switch management unit 105, sets the information in the initialization task instruction unit 902, and executes the task control unit 901. When the task is returned to the suspended task using the initialization task instruction unit 902, it is determined whether or not the initialization process of the suspended task is necessary. The task management control unit 904 calls a task that performs initialization processing using the call address stored in 903.
[0129]
For this reason, when the interrupt processing task 127 is controlled to start the task processing from the initial state, the interrupt processing task 127 does not need to initialize the task stack area, the task control means, and the like.
[0130]
Therefore, the interrupt processing task 127 does not need to be aware of the processing contents of the task to be initialized, and the processing procedure for performing initialization in the interrupt processing task 127 is independent of the interrupt processing task 127 and the task that requires initialization. It is possible to construct a mechanism that can be controlled easily.
[0131]
In addition, when initialization of a task occurs, various information on the task that was being executed is restored when an interrupt saved by the save processing unit 106 that no longer needs to be restored in the initialization process. Without performing this process, the initialization process can be started from the initialization process only when the dispatch processing unit 908 of the task manager 909 instructs the task again.
[0132]
(Embodiment 5)
FIG. 12 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 5 of the present invention. In the fifth embodiment shown in this figure, portions corresponding to those in the fourth embodiment shown in FIG. 10 are denoted by the same reference numerals, and the interrupt task switch control unit 111 is replaced with the interrupt task switch control unit 701 shown in FIG. It becomes the composition which became.
[0133]
Therefore, the interrupt management apparatus 1000 of the fourth embodiment shown in this figure exhibits the effects described in the second and fourth embodiments, and detailed description thereof is omitted.
[0134]
(Embodiment 6)
FIG. 13 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 6 of the present invention. In the sixth embodiment shown in this figure, portions corresponding to those in the third embodiment shown in FIG.
[0135]
In addition to the components of the interrupt device 800 of the third embodiment, the interrupt management device 1100 of the sixth embodiment shown in this figure includes an execution task control unit 901 that is a component of the fourth embodiment, and an initial A task manager provided with a dispatch processing unit 908 having a generalized task instruction unit 902, an initialization task management unit 903, a task management control unit 904, a task suspension processing unit 905, and a task control unit 907 in the interrupt handler 101 909, and includes an interrupted task determination unit 1101 that determines an interrupted task using the calculation result of the factor determination calculation processing unit 801.
[0136]
Then, with respect to the third embodiment, the factor determination calculation processing unit 801 performs an OR operation with the IR information saved immediately before by the save processing unit 106 at the bit position corresponding to the instructed interrupt factor, and save processing When the process is stored in the unit 106 and the control is returned to the task switch control unit 111, the interrupt task determination unit 1101 performs the same process as the interrupt task determination unit 906 in the fourth embodiment.
[0137]
Therefore, the interrupt management device 1100 of the sixth embodiment exhibits the effects described in the third and fourth embodiments, and a detailed description thereof is omitted.
[0138]
It should be noted that the present invention can be applied to all interrupt management devices that can read the data of the recording medium by programming the functions of the interrupt management device according to each of the embodiments described above and writing the recording medium. Is possible. Examples of the recording medium include a semiconductor recording medium, a magnetic recording medium, an optical recording medium, and an optical / magnetic recording medium.
[0139]
It is also possible to incorporate the functions of the interrupt management device according to each of the above embodiments as an interrupt management mechanism in a signal processing processor (DSP), and an application that uses interrupt processing independently of interrupt processing in the DSP. It is effective when realizing
[0140]
Further, the function of the interrupt management device according to each of the above embodiments can be incorporated into interrupt processing in an OS such as a computer processing real-time operation system and a multitask operation system, and is realized on a personal computer. The construction of an application system is effective when an application using interrupt processing is realized independently of interrupt processing within the OS. In addition, in the case of having multiple interrupts, the interrupt level can be constructed in a form independent of the interrupt mechanism in the OS, and this is particularly effective.
[0141]
Further, by providing the interrupt management device according to each of the above embodiments in a terminal device or base station device in mobile communication, it is possible to improve processing efficiency in communication.
[0142]
【The invention's effect】
As described above, according to the present invention, in an interrupt processing task, when it is desired to perform processing at an interrupt level different from the interrupt level of the interrupt processing task, software that requires saving / restoring processing of the processing resource being processed The interrupt level can be changed without specifying an interrupt.
[0143]
Further, every time control is transferred from the interrupt processing task to the interrupt handler, the interrupt factor determination process can be performed again for the interrupt of the same interrupt level without performing the return process of the processing resource being processed.
[0144]
In addition, when control is transferred from the interrupt processing task to the interrupt handler, the interrupt processing managed by the interrupt controller can be generated from the interrupt processing task, and interrupt processing that does not require saving / restoring processing resources during processing Is possible.
[0145]
In addition, when it is necessary to change interrupt handler processing, such as when other interrupts can be accepted within an interrupt task, or when certain interrupts are prohibited, interrupts by interrupt handlers or interrupt processing tasks The processing contents can be easily changed.
[0146]
Further, in the interrupt management method using the OS, even when interrupt handlers in the OS collectively perform interrupt disable / permit processing for all interrupt causes, the user can interrupt interrupt handlers in the OS. It is possible to create an interrupt processing task without being conscious of the interrupt management state.
[0147]
In addition, when the interrupt processing that does not depend on the interrupt management state of the interrupt handler in the OS and the interrupt processing task is controlled to start the task processing from the initial state, the task stack area, It is not necessary for the interrupt processing task to initialize task control means and the like.
[0148]
Therefore, it is not necessary for the interrupt processing task to be aware of the processing contents of the task to be initialized, and within the interrupt processing task, the processing procedure for initialization can be controlled independently of the interrupt processing task and the task that requires initialization. Can be constructed.
[0149]
In addition, when task initialization occurs, it is no longer necessary to restore various information on the task that was being executed when the interrupt was saved by the save processing unit that no longer needs to be restored in the initialization process. .
[0150]
Furthermore, the initialization process can be started from the initialization process only when the task is dispatched again by the task manager dispatch processing unit, and task management including initialization in the task manager is addressed. Since only the management and control methods are defined, it is possible to perform switching control of processing tasks independent of the call address of each processing task.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 1 of the present invention.
FIG. 2 is a diagram for explaining the operation of the interrupt controller of the interrupt management device according to the first embodiment;
FIG. 3 is a flowchart for explaining the operation of the interrupt controller of the interrupt management device according to the first embodiment;
FIG. 4 is a diagram showing a setting state of an interrupt mask register for each interrupt factor held in the interrupt acceptance management unit of the interrupt management device according to the first embodiment;
FIG. 5 is a diagram for explaining an interrupt factor determination processing procedure of the interrupt management device according to the first embodiment;
FIG. 6 is a diagram for explaining a processing procedure in a multiple interrupt control unit of the interrupt management device according to the first embodiment;
FIG. 7 is a diagram for explaining a processing procedure in an interrupt processing task of the interrupt management device according to the first embodiment;
FIG. 8 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 2 of the present invention.
FIG. 9 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 3 of the present invention.
FIG. 10 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 4 of the present invention.
FIG. 11 is a diagram showing a state of information on a task being executed that is stored in the execution task control unit of the interrupt management device according to the fourth embodiment;
FIG. 12 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 5 of the present invention.
FIG. 13 is a block diagram showing a configuration of an interrupt management apparatus according to Embodiment 6 of the present invention.
[Explanation of symbols]
100, 700, 800, 900, 1000, 1100 Interrupt management device
101 Interrupt handler
102 Interrupt controller
103 Interrupt acceptance manager
104 Interrupt mask release controller
105 Interrupt task switch manager
106 Evacuation processing unit
107 Interrupt factor determination processing section
108 Interrupt task control processing unit
109 Task return processing section
110 Multiple interrupt controller
111 Interrupt task switch controller
112 Interrupt mask section
121-1 First interrupt factor
121-N Nth interrupt factor
123 Processing Task
124-1 First Task
124-2 Suspended task
124-N Nth task
127 Interrupt processing task
128-1 First interrupt processing task
128-R Rth interrupt processing task
128-N Nth interrupt processing task
701 Interrupt task switch controller
801 Factor determination calculation processing unit
802 Factor determination calculation control unit
901 Execution task control unit
902 Initialization task instruction section
903 Initialization task management section
904 Task management control unit
905 Task interruption processing part
906 Interrupted task determination unit
907 Task control unit
908 Dispatch processing part
909 Task Manager

Claims (14)

割り込みマスクで割り込みハンドラへの割り込み通知の制御を行う割り込み制御手段と、前記割り込みハンドラとは独立に設けられ、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受付可能状態を保持する割り込み受付可能管理手段及び割り込み処理タスクにおける割り込み要因に対する割り込みマスクの解除を制御する割り込みマスク解除制御手段及び割り込み処理タスクからのタスク切り替え情報を管理する割り込みタスクスイッチ管理手段と、を具備する割り込み管理装置であって、
前記割り込みハンドラは、割り込みの発生時に実行中のタスクの情報を退避する退避処理手段と、割り込みの要因に応じて処理すべき割り込み処理タスクを決定する割り込み要因判定処理手段と、前記割り込み受付可能管理手段と前記割り込みマスク解除制御手段の処理に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行う多重割り込み制御手段と、前記割り込み要因判定処理手段で決定された割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行う割り込みタスク制御処理手段と、前記割り込みタスクスイッチ管理手段が管理するタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示があれば割り込み処理タスクに制御を移し、タスク切り替え指示がなければ前記割り込みタスク制御処理手段に制御を移す割り込みタスクスイッチ制御手段と、前記退避処理手段で退避された割り込み発生時に実行中のタスクの情報を復帰し中断していたタスクの処理を再開するタスク復帰処理手段と、を具備することを特徴とする割り込み管理装置。
An interrupt control means for controlling the interrupt notification to the interrupt handler in the interrupt mask, the interrupt handler provided independently from, holds the interrupt acceptance state consisting of a set of prepared for each interrupt factor Rutotomoni Interrupt Mask interrupt An interrupt management device comprising: an acceptable management means; an interrupt mask release control means for controlling release of an interrupt mask for an interrupt factor in an interrupt processing task; and an interrupt task switch management means for managing task switching information from the interrupt processing task. There,
The interrupt handler includes a save processing unit that saves information on a task that is being executed when an interrupt occurs, an interrupt factor determination processing unit that determines an interrupt processing task to be processed according to an interrupt factor, and the interrupt acceptance management And an interrupt processing task determined by the interrupt factor determination processing means, and a multiple interrupt control means for taking out an interrupt mask from the interrupt ready state and performing an update control of the interrupt mask according to the processing of the interrupt mask release control means. An interrupt task control processing unit that performs a process transition between the interrupt handler and the task switching information managed by the interrupt task switch management unit, and controls a task switching instruction from the interrupt processing task. If there is, transfer control to the interrupt processing task. If there is no task switching instruction, interrupt task switch control means for transferring control to the interrupt task control processing means, and processing of a task that has been interrupted by returning information on the task being executed when the interrupt saved by the save processing means occurs An interrupt management device comprising: task return processing means for resuming processing.
割り込みマスクで割り込みハンドラへの割り込み通知の制御を行う割り込み制御手段と、前記割り込みハンドラとは独立に設けられ、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受付可能状態を保持する割り込み受付可能管理手段及び割り込み処理タスクにおける割り込み要因に対する割り込みマスクの解除を制御する割り込みマスク解除制御手段及び割り込み処理タスクからのタスク切り替え情報を管理する割り込みタスクスイッチ管理手段と、を具備する割り込み管理装置であって、
前記割り込みハンドラは、割り込みの発生時に実行中のタスクの情報を退避する退避処理手段と、割り込みの要因に応じて処理すべき割り込み処理タスクを決定する割り込み要因判定処理手段と、前記割り込み受付可能管理手段と前記割り込みマスク解除制御手段の処理に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行う多重割り込み制御手段と、前記割り込み要因判定処理手段で決定された割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行う割り込みタスク制御処理手段と、前記割り込みタスクスイッチ管理手段が管理するタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示があれば割り込み処理タスクに制御を移し、タスク切り替え指示がなければ前記割り込み要因判定処理手段に制御を移す割り込みタスクスイッチ制御手段と、前記退避処理手段で退避された割り込み発生時に実行中のタスクの情報を復帰し中断していたタスクの処理を再開するタスク復帰処理手段と、を具備することを特徴とする割り込み管理装置。
An interrupt control means for controlling the interrupt notification to the interrupt handler in the interrupt mask, the interrupt handler provided independently from, holds the interrupt acceptance state consisting of a set of prepared for each interrupt factor Rutotomoni Interrupt Mask interrupt An interrupt management device comprising: an acceptable management means; an interrupt mask release control means for controlling release of an interrupt mask for an interrupt factor in an interrupt processing task; and an interrupt task switch management means for managing task switching information from the interrupt processing task. There,
The interrupt handler includes a save processing unit that saves information on a task that is being executed when an interrupt occurs, an interrupt factor determination processing unit that determines an interrupt processing task to be processed according to an interrupt factor, and the interrupt acceptance management And an interrupt processing task determined by the interrupt factor determination processing means, and a multiple interrupt control means for taking out an interrupt mask from the interrupt ready state and performing an update control of the interrupt mask according to the processing of the interrupt mask release control means. An interrupt task control processing unit that performs a process transition between the interrupt handler and the task switching information managed by the interrupt task switch management unit, and controls a task switching instruction from the interrupt processing task. If there is, transfer control to the interrupt processing task. If there is no task switching instruction, interrupt task switch control means for transferring control to the interrupt factor determination processing means, and processing of a task that has been interrupted by returning information on the task being executed when the interrupt saved by the save processing means occurs An interrupt management device comprising: task return processing means for resuming processing.
割り込みタスクスイッチ制御手段におけるタスク切り替え指示を制御する際に演算処理を行う要因判定演算処理手段を具備する一方、割り込みハンドラは、前記要因判定演算処理手段が演算を施す際の演算方法を制御する要因判定演算制御手段を具備することを特徴とする請求項2記載の割り込み管理装置。  The interrupt handler includes factor determination calculation processing means for performing calculation processing when controlling a task switching instruction in the interrupt task switch control means, while the interrupt handler is a factor for controlling a calculation method when the factor determination calculation processing means performs calculation 3. The interrupt management apparatus according to claim 2, further comprising a determination calculation control unit. タスクの初期化処理を行うためのタスクの呼び出しアドレスを格納する初期化タスク管理手段と、実行中のタスクの情報を保持する実行タスク制御手段と、処理を中断するタスクの情報を格納する初期化タスク指示手段と、処理対象となる処理タスクの判定を行い処理タスク毎の呼び出しアドレスを格納するタスク制御手段と、前記初期化タスク管理手段の処理に応じて呼び出す処理タスクの切り替えを行うディスパッチ処理手段とを具備する一方、割り込みハンドラは、割り込みタスクスイッチ制御手段からの情報を用いてタスクの中断判定を行い、タスクの中断が必要であれば中断するタスクの情報を前記初期化タスク指示手段に格納する中断タスク判定手段と、割り込み発生時に実行中であったタスクの情報に対して一度そのタスクの情報の復帰を行わず前記ディスパッチ処理手段を呼び出すタスク中断処理手段と、割り込み発生時に実行中であったタスクの種々の情報の復帰を行うタスク復帰処理手段と、前記実行タスク制御手段及び前記中断タスク判定手段の処理に応じて中断しているタスクを復帰させる際に当該タスクの初期化処理の要否判定を行い、初期化処理が必要なタスクに復帰させる場合は前記タスク中断処理手段を呼び出し、初期化処理が不要な場合は前記タスク復帰処理手段を呼び出すタスク管理制御手段と、を具備することを特徴とする請求項1から請求項3のいずれかに記載の割り込み管理装置。  Initialization task management means for storing the task call address for performing task initialization processing, execution task control means for storing information on the task being executed, and initialization for storing information on the task for which processing is interrupted Task instruction means, task control means for determining a processing task to be processed and storing a call address for each processing task, and dispatch processing means for switching a processing task to be called according to the processing of the initialization task management means On the other hand, the interrupt handler performs task interruption determination using information from the interrupt task switch control means, and stores information on the task to be interrupted in the initialization task instruction means if task interruption is necessary. The suspended task determination means to perform and the task information that was being executed when the interrupt occurred Task suspension processing means for calling the dispatch processing means without returning information, task return processing means for restoring various information of the task that was being executed when the interrupt occurred, the execution task control means, and the suspended task When returning a task that has been suspended according to the processing of the determination means, it is determined whether or not the initialization processing of the task is necessary, and when returning to a task that requires initialization processing, the task suspension processing means is called, 4. The interrupt management device according to claim 1, further comprising task management control means for calling up the task return processing means when initialization processing is unnecessary. 中断タスク判定手段は、要因判定演算処理手段の情報を用いてタスクの中断判定を行うことを特徴とする請求項4記載の割り込み管理装置。  5. The interrupt management apparatus according to claim 4, wherein the interrupt task determination unit performs task interrupt determination using information of the factor determination calculation processing unit. 請求項1から請求項5のいずれかに記載の割り込み管理装置を具備することを特徴とする基地局装置。  A base station apparatus comprising the interrupt management apparatus according to any one of claims 1 to 5. 請求項1から請求項5のいずれかに記載の割り込み管理装置を具備することを特徴とする移動局装置。  A mobile station apparatus comprising the interrupt management apparatus according to any one of claims 1 to 5. 割り込みマスクで割り込みハンドラへの割り込み通知を制御し、この制御による割り込み発生時に実行中のタスクの情報を退避し、割り込み要因に応じて処理すべき割り込み処理タスクを決定し、割り込みハンドラとは独立に、割り込み要因毎に用意されるとともに割り込みマスクの集合からなる割り込み受け付け可能状態を保持し、割り込み処理タスクにおいて割り込み許可を制御するための割り込みマスク解除制御情報及び割り込み受付可能状態の情報に応じて割り込みマスクを前記割り込み受付可能状態から取り出して割り込みマスクの更新制御を行い、決定した割り込み処理タスクと割り込みハンドラとの間の処理の遷移を行い、割り込み処理タスクからのタスク切り替え情報を管理し、そのタスク切り替え情報を用いて割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示がある場合には割り込み処理タスクに制御を移し、タスク切り替え指示がない場合には退避した割り込み発生時に実行中のタスク情報を復帰して中断していたタスクの処理を再開することを特徴とする割り込み管理方法。Controls interrupt notification to the interrupt handler with the interrupt mask, saves information on the task being executed when an interrupt is generated by this control, determines the interrupt processing task to be processed according to the interrupt factor, and is independent of the interrupt handler , is prepared for each interrupt factor holding the interrupt acceptance state consisting of a set of Rutotomoni interrupt mask in accordance with the interrupt unmasking control information and interrupt information of the reception state to control the interrupt enabling the interrupt processing task interrupt Take out the mask from the interrupt ready state , perform interrupt mask update control, transition the processing between the determined interrupt processing task and interrupt handler, manage task switching information from the interrupt processing task, and Interrupt handling using switching information Controls the task switching instruction from the task. If there is a task switching instruction, the control is transferred to the interrupt processing task. If there is no task switching instruction, the task information being executed is restored and interrupted when the saved interrupt occurs. An interrupt management method characterized by resuming processing of a task that has been interrupted. タスク切り替え情報を用いて、割り込み処理タスクからのタスク切り替え指示を制御し、タスク切り替え指示がある場合には割り込み処理タスクに制御を移し、タスク切り替え指示がない場合には割り込みの要因に応じて、処理すべき割り込み処理タスクの決定を行うタスクの呼び出しを行うことを特徴とする請求項8記載の割り込み管理方法。  Task switching information is used to control the task switching instruction from the interrupt processing task. If there is a task switching instruction, control is transferred to the interrupt processing task, and if there is no task switching instruction, depending on the cause of the interrupt, 9. The interrupt management method according to claim 8, wherein a task for determining an interrupt processing task to be processed is called. 割り込み要因判定処理で処理すべき割り込み処理タスクを決定する際に演算処理を行い、要因判定演算処理が演算を施す際の演算方法を制御することを特徴とする請求項8又は請求項9記載の割り込み管理方法。  10. The arithmetic processing when the interrupt processing task to be processed in the interrupt factor determination processing is determined, and the calculation method when the factor determination calculation processing performs the calculation is controlled. Interrupt management method. 割り込みハンドラとは独立に、タスクの初期化処理を行うためのタスクの呼び出しアドレスを格納する初期化タスク管理情報と、実行中のタスクの情報を保持し、前記タスク切り替え情報を用いてタスクの中断判定を行い、タスクの中断が必要な場合には、中断するタスクの情報を初期化タスク指示情報に格納し、処理対象となる処理タスクの判定を行い、処理タスク毎の呼び出しアドレスを格納したタスク制御情報と前記初期化タスク管理情報に応じて呼び出す処理タスクの切り替えを行うディスパッチ処理を有するタスクマネージャと、割り込み発生時に実行中のタスクにおける情報の復帰を行わず、前記ディスパッチ処理を呼び出すタスク中断処理タスクと、前記実行中のタスクの情報及び初期化タスク指示情報に応じて中断タスクに復帰する際に中断タスクの初期化処理の要否判定を行い、初期化処理が必要なタスクに復帰する場合は前記タスク中断処理タスクを呼び出し、初期化処理が不要な場合はタスク復帰処理タスクを呼び出すことを特徴とする請求項8から請求項10のいずれかに記載の割り込み管理方法。  Independent of the interrupt handler, it stores initialization task management information that stores the task call address for task initialization processing, and information on the task that is being executed. If the task is to be interrupted, the task information to be interrupted is stored in the initialization task instruction information, the processing task to be processed is determined, and the call address for each processing task is stored A task manager having a dispatch process for switching a processing task to be called according to control information and the initialization task management information, and a task interruption process for calling the dispatch process without returning the information in the task being executed when an interrupt occurs. Depending on the task and the information of the task being executed and the initialization task instruction information, When returning, it is judged whether or not the initialization process of the interrupted task is necessary, and when returning to the task that needs the initialization process, the task interruption process task is called, and when the initialization process is unnecessary, the task return process task is 11. The interrupt management method according to claim 8, wherein the interrupt management method is called. 請求項8から請求項11のいずれかに記載の割り込み管理方法をコンピュータに実行させるためのプログラムが記録されたことを特徴とする記録媒体。12. A recording medium on which a program for causing a computer to execute the interrupt management method according to claim 8 is recorded. 請求項8から請求項11のいずれかに記載の割り込み管理方法を実 現させるための処理機能を具備することを特徴とするオペレーティングシステムを記録した記録媒体 Recording medium recording the operating system, characterized by comprising a processing function for causing actual revealed interrupt management method according to any one of claims 11 to claim 8. 請求項8から請求項11のいずれかに記載の割り込み管理方法を実現させるための処理機能を具備することを特徴とする信号処理用プロセッサ。A signal processing processor comprising a processing function for realizing the interrupt management method according to claim 8.
JP2000264199A 2000-08-31 2000-08-31 Interrupt management device and interrupt management method Expired - Fee Related JP4057769B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000264199A JP4057769B2 (en) 2000-08-31 2000-08-31 Interrupt management device and interrupt management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000264199A JP4057769B2 (en) 2000-08-31 2000-08-31 Interrupt management device and interrupt management method

Publications (2)

Publication Number Publication Date
JP2002073350A JP2002073350A (en) 2002-03-12
JP4057769B2 true JP4057769B2 (en) 2008-03-05

Family

ID=18751648

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000264199A Expired - Fee Related JP4057769B2 (en) 2000-08-31 2000-08-31 Interrupt management device and interrupt management method

Country Status (1)

Country Link
JP (1) JP4057769B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004272844A (en) 2003-03-12 2004-09-30 Renesas Technology Corp Method for controlling interruption
US8255603B2 (en) * 2009-08-14 2012-08-28 Advanced Micro Devices, Inc. User-level interrupt mechanism for multi-core architectures
DE112017006454B4 (en) * 2017-01-25 2020-06-10 Mitsubishi Electric Corporation Computer device, task initiation process and task initiation program

Also Published As

Publication number Publication date
JP2002073350A (en) 2002-03-12

Similar Documents

Publication Publication Date Title
JP3600095B2 (en) Interrupt management device and interrupt management method
KR100746797B1 (en) Processor and information processing method
JP5323828B2 (en) Virtual machine control device, virtual machine control program, and virtual machine control circuit
EP3306470B1 (en) Method and apparatus for executing non-maskable interrupt
US7366814B2 (en) Heterogeneous multiprocessor system and OS configuration method thereof
JP4609113B2 (en) Processor
JP4057769B2 (en) Interrupt management device and interrupt management method
JP2005100034A (en) Information processing control system
JP2597283B2 (en) Scheduling method for interrupt
JP2001290637A (en) Dynamic replacing device for component and computer- readable storage medium
JPH0414376B2 (en)
JP2005519393A (en) Method and apparatus for virtual direct memory access
JPH0728544A (en) Computer system
JPH09160790A (en) Device and method for task schedule
JP2553526B2 (en) Multitasking processor
JPH11167494A (en) Arithmetic processor and register managing method for it
JPH10247161A (en) Memory management system
JP2001229038A (en) Multi-operating computer system
JPS58142451A (en) Interruption control system
JP2004013240A (en) Computer system
JP2000066905A (en) Method and device for task rising and wait processing in real time os
JPH0495137A (en) Context switching method for operating system
JPH1074148A (en) Interruption processor
JPH0612500A (en) Microprocessor
JP2001297007A (en) Computer control method and computer controlled by the method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070803

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070828

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071026

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: 20071120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071214

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131221

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees