JP2004118235A - Data processor - Google Patents
Data processor Download PDFInfo
- Publication number
- JP2004118235A JP2004118235A JP2002276345A JP2002276345A JP2004118235A JP 2004118235 A JP2004118235 A JP 2004118235A JP 2002276345 A JP2002276345 A JP 2002276345A JP 2002276345 A JP2002276345 A JP 2002276345A JP 2004118235 A JP2004118235 A JP 2004118235A
- Authority
- JP
- Japan
- Prior art keywords
- priority
- block
- interrupt
- data processing
- processing device
- 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.)
- Pending
Links
- 230000006870 function Effects 0.000 claims description 57
- 230000004931 aggregating effect Effects 0.000 claims description 2
- 230000004043 responsiveness Effects 0.000 abstract description 3
- 238000000034 method Methods 0.000 description 40
- 230000005540 biological transmission Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 9
- 230000001133 acceleration Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Abstract
Description
【0001】
【発明の属する技術分野】
この発明は、割込処理にかかる時間を短くして応答性を向上したデータ処理装置に関する。
【0002】
【従来の技術】
パーソナルコンピュータ等の周辺機器を制御するのにデータ処理装置が用いられている。複数の機能を搭載した多機能データ処理装置では、接続されているプロセッサに対して割込要求信号を通知する場合には、搭載されている複数の機能の実行を司る各機能ブロックの割込要求信号を割込制御ブロックにて集約した上で、単一の割込要求信号を出力して行うことが多い。この多機能データ処理装置とプロセッサからなるシステムでは、割込要因を特定するため、割込制御ブロック内の要因レジスタに記憶されているデータを読出して機能ブロックを特定し、さらにその特定した機能ブロックの割込要因レジスタに記憶されているデータを読出して更にサブブロックを特定するという割込要因の木構造追跡処理を行い、この木構造追跡処理により最終的に割込要因を特定している。
従来、多機能デバイスの割込処理高速化について、デバイス側が割込要求を生成した機能ブロックの割込要因データをプロセッサ側に送信することで、ソフトウェアが要因判定するサイクルを高速化するという技術があった(例えば、特許文献1参照。)。
【0003】
【特許文献1】
特開2001−209548号公報(第1頁)
【0004】
【発明が解決しようとする課題】
しかし、割込要因の木構造の深さ(割込要因の階層数)は機能ブロックによって異なり、深ければ(階層数が多ければ)それだけ割込要因の特定に要するアクセス時間が多くなってしまい、割込要因の特定の要する時間が長くなる。
【0005】
この発明は、上記の問題点を解決するためになされたもので、複数の機能ブロックの中で、特に優先して使用する機能ブロックの割込要因について、割込要因の木構造追跡処理によらずに特定を行い、割込処理に要する時間を短縮して高速化し、応答性を向上させることを目的とする。
【0006】
【課題を解決するための手段】
この発明は、上記の目的を達成するため、データ処理機能の実行を司る複数の機能ブロックと、該各機能ブロックから出力される複数の割込信号を入力及び集約して割込要求信号を出力する割込制御ブロックとを有するデータ処理装置であって、上記各機能ブロックにその優先要否を設定する優先設定部を設け、上記各機能ブロックが、上記優先設定部が優先要に設定されているときに、その機能ブロックを特定するブロックコードを含む優先割込信号を上記割込信号とは別に出力して上記割込制御ブロックに入力するデータ処理装置を特徴とする。
このデータ処理装置は、各機能ブロックの優先度を記憶する手段と、その手段に記憶された優先度に応じて、その優先割込信号に含まれるブロックコードを記憶する手段とを、上記割込制御ブロックに設けるとよい。
また、各機能ブロックについて、それぞれの優先度に応じた上記各機能ブロック固有の領域が割り当てられている記憶部を上記割込制御ブロックに設けてもよい。
【0007】
【発明の実施の形態】
以下、この発明の実施の形態を図面に基づいて詳細に説明する。
まず、図8及び図9を参照して、この発明によるデータ処理装置に関連するデータ処理装置200について説明する。
データ処理装置200は、優先要否の設定がされないデータ処理装置であり、複数の入出力インタフェースを持ち、入出力制御ブロックやダイレクトメモリアクセスコントロール(DMAC)ブロックといったいずれも優先度の設定がされない複数の機能ブロックを内蔵している。すなわち、データ処理装置200は、図8に示すようにUSB(Unibersal serial bus)機能ブロック210と、複数の入出力機能ブロック(図8では、第1の入出力機能ブロック220と、第nの入出力機能ブロック230)と、割込制御ブロック240とを有し、プロセッサバス151を介しプロセッサ150に接続されている。
【0008】
USB機能ブロック210は、図9に示すように、複数のサブブロックを内蔵していて、各サブブロックは個別の機能を有している。各サブブロックはUSB送信DMACブロック211と、USB受信DMACブロック212と、USB入出力制御ブロック213と、要因レジスタ210aとを有し、USB入出力制御ブロック213は第1のエンドポイントブロック215と、第2のエンドポイントブロック216とを有している。そして、USB送信DMACブロック211、USB受信DMACブロック212、USB入出力制御ブロック213及び第1、第2のエンドポイントブロック215,216はそれぞれ要因レジスタ211a,212a,213a,215a,216aを有している。USBはエンドポイントと呼ばれる複数の機能区分を持つため、USB入出力制御ブロック213は第1、第2のエンドポイントブロック215、216を内蔵している。
第1、第nの入出力機能ブロック220、230と、割込制御ブロック240とは、それぞれ要因レジスタ220a,230a,240aを有している。
【0009】
データ処理装置200は、各機能ブロックが内部状態に応じて割込信号を生成する。そして、各機能ブロック(例えば、USB機能ブロック210)の割込信号は、上位の機能ブロックに入力し、最終的には割込制御ブロック240に入力して集約され、ここから一本の割込要求信号aがプロセッサ150に対して出力される。そして、データ処理装置200は、内蔵される各機能ブロックに優先要否の設定がなされないため、出力されるどの割込信号も優先度を持たない。そのため、データ処理装置200は、木構造の割込要因追跡処理を行って、割込要因の判定を行っている。これは、図10に示すフローチャートのようにして行われる。
ここで、各機能ブロック、例えば、USB機能ブロック210の場合、出力される割込信号の接続経路は、図9のようになっている。なお、図9ではデータの経路及びデータの経路を制御するブロックや信号は省略している。以下の説明では、USB機能ブロック210の第1のエンドポイントブロック215で受信完了割込が発生した場合を想定している。なお、図10ではステップをSと略記している。
【0010】
まず、データ処理装置200は、受信完了割込が発生すると、割込要求信号aを出力して受信完了割込の発生をプロセッサ150に通知する。すると、プロセッサ150において、所定の判定プログラム(割込ハンドラ)が作動し、ステップ20に進んでプロセッサバス151を経由してデータ処理装置200内の割込制御ブロック240にアクセスして、その要因レジスタ240aに記憶されている情報を読み出す。すると、この情報の読出しにより、USB機能ブロック210の割込であることがわかる。
次に、ステップ21に進み、引続きUSB機能ブロック210の要因レジスタ210aにアクセスして、そこに記憶されている情報を読出す。すると、この情報の読出しにより、第1のエンドポイントブロック215から出力された割込であることがわかる(これはサブブロックの割込となる)。続く、ステップ22では割込がサブブロックの割込であるか否かを判断し、サブブロックの割込であればステップ23に進み、そうでなければステップ24に進む。第1のエンドポイントブロック215の割込はサブブロックの割込であるから、ステップ22からステップ23に進み、判定プログラムは引続きサブブロックである第1のエンドポイントブロック215の要因レジスタ215aにアクセスして、記憶されている情報を読み出す。この情報の読出しにより、受信完了割込であることがわかる。ステップ23に続いてステップ22を実行すると、さらなるサブブロック、すなわち、第1のエンドポイントブロック215に含まれる機能ブロックが存在しないので、ステップ24に進み、割込要因が確定したとして、第1のエンドポイントブロック215の受信完了割込に対応した処理を実行して、割込要因の判定処理を終了させる。
【0011】
次に、この発明によるデータ処理装置100について説明する。データ処理装置100は、上述したデータ処理装置200と同様に、複数の入出力インタフェースを持ち、入出力制御ブロックやダイレクトメモリアクセスコントロール(DMAC)ブロックといった複数の機能ブロックを内蔵しているが、いずれの機能ブロックとも、優先要否を設定する優先設定部である優先設定レジスタを有している点で、データ処理装置200と相違している。
すなわち、図1に示すように、データ処理装置100は、USB機能ブロック110と、複数の入出力機能ブロック(図1では、第1の入出力機能ブロック120と、第nの入出力機能ブロック130)と、割込制御ブロック140とを有し、プロセッサバス151を介しプロセッサ150に接続されている。
【0012】
USB機能ブロック110は、図2に示すように、USB送信DMACブロック111と、USB受信DMACブロック112と、USB入出力制御ブロック113と、要因レジスタ110a及び優先設定レジスタ110bを有していて、USB入出力制御ブロック113は,第1のエンドポイントブロック115と、第2のエンドポイントブロック116とを有している。そして、USB送信DMACブロック111、USB受信DMACブロック112及びUSB入出力制御ブロック113と、第1、第2のエンドポイントブロック115,116とは、それぞれ要因レジスタ111a,112a,113a,115a,116aとともに、優先設定レジスタ111b,112b,113b,115b,116bを有している。
第1、第nの入出力機能ブロック120、130は、それぞれ要因レジスタ120a,130aとともに、それぞれ優先設定レジスタ120b,130bを有している。
また、割込制御ブロック140は、図3に示すように、要因レジスタ140aとともに、ブロック番号デコーダ140cと、優先ブロック番号レジスタ140dとを有している。
【0013】
データ処理装置100は、上述のように、上位及びそのサブブロックを含む各機能ブロックが優先設定レジスタを有し、それぞれの優先設定レジスタに対してその各機能ブロックについて、優先するのかしないのか(優先要否)、すなわち、優先すべき割込信号(優先割込信号)を出力するのかしないのかを各割込要因と1対1に対応して設定することができる。また、各機能ブロックは、優先設定レジスタの設定に対応する割込要因(優先割込要因)による割込が発生すると、優先割込信号を出力しこれを上位の割込制御ブロック140に直接入力して通知する。データ処理装置100は、データ処理装置200と異なり、各機能ブロックが、割込信号のほかに優先割込信号を出力する。
そして、割込制御ブロック140は、データ処理装置200と同様に、下位の各機能ブロックから割込信号を入力及び集約して割込要求信号aを出力する一方、下位の機能ブロック(例えば、USB機能ブロック110)から優先割込信号を入力すると、ブロック番号デコーダ140cにより、それに含まれるブロックコードを信号の活性状態からデコードし(例えば第1のエンドポイントブロック115の優先割込信号が活性化していれば、第1のエンドポイントブロック115のブロックコードをデコードする)、得られたブロックコードを優先ブロック番号レジスタ140dに格納する。このブロックコードは各機能ブロックを特定するための情報、例えば各機能ブロック固有の番号からなっている。
【0014】
以上のデータ処理装置100は、各機能ブロックから出力される割込信号を割込制御ブロック140に入力及び集約して、割込要求信号aをプロセッサ150に対して出力するが、データ処理装置200と異なり、内蔵される各機能ブロックから優先割込信号を出力しているため、割込要因判定のフローは、図11に示すフローチャートのようにして行われる。ここで、各機能ブロック、例えば、USB機能ブロック110の場合、出力される割込要求信号の接続経路は、図2のようになっている。なお、図2では、データの経路及びデータの経路を制御するブロックや信号は省略している。
以下の説明では、内蔵する機能ブロックのうち、USB機能ブロック110の優先設定レジスタ110bと、第1のエンドポイントブロック115の優先設定レジスタ115bに優先要の設定がされ、その優先要の設定がされた割込要因(優先割込要因)を受信完了割込としている。その場合の割込要因の判定は、図11に示すフローチャートのようにして行われる。なお、図11ではステップをSと略記している。
【0015】
まず、データ処理装置100は、プロセッサ150のプログラムの指示を受けて、第1のエンドポイントブロック115の優先設定レジスタ115bにアクセスして、該当するエリアに“1”をセットしてビットを立て、受信完了割込を優先するための優先要の設定を行う。
そして、データ処理装置100は、受信実行等の通常の制御を実行する(この操作により、第1のエンドポイントブロック115における受信完了割込が発生することを想定している)。
データ処理装置100は、第1のエンドポイントブロック115において受信完了割込が発生しているが、この受信完了割込は優先割込要因であるから、第1のエンドポイントブロック115から、割込制御ブロック140に対して直接に優先割込信号bを入力して通知する。すると、割込制御ブロック140は、ブロック番号デコーダ140cが作動して、入力する優先割込信号bからそれに含まれるブロックコードを特定し、優先ブロック番号レジスタ140dに格納する。各機能ブロックとブロック番号デコーダ140cに設定されるブロックコードとの対応関係は、データ処理装置100において予め明確になっており、その対応関係は、プロセッサ150のプログラムでも明らかであるとすると、ブロック番号レジスタ140dに格納されているブロックコードから、入力する優先割込信号bがどの機能ブロックから出力されているのかを認識することができる。優先割込信号bを出力した機能ブロックが判明した時点で、プロセッサ150に割込要求信号aを出力して割込の発生を通知する。
【0016】
次に、プロセッサ150において、所定の判定プログラム(割込ハンドラ)が作動し、ステップ1に進みプロセッサバス151を経由して、割込制御ブロック140の優先ブロック番号レジスタ140dにアクセスし、記憶されている情報(ブロックコード)を読出す。続くステップ2では、優先ブロック番号レジスタ140dに記憶されている情報が有効な機能ブロック(すなわち、データ処理装置100に備えられている機能ブロック)の番号であるか否かを判断して、それが有効な機能ブロックの番号であればステップ3に進み、そうでなければステップ4に進み、上述した木構造の割込要因追跡処理を実行する。
ステップ3に進む場合は、ステップ1での情報の読出しによって、第1のエンドポイントブロック115を表す情報が得られている場合であるから、第1のエンドポイントブロック115からの割込であると判定されて、割込要因が確定する。この場合は、プロセッサ150において、発生した割込に対応する処理を実行すると、割込要因の判定処理を終了する。
【0017】
もし、発生した割込が優先要の設定がされない機能ブロックの優先割込要因によらない場合は、割込制御ブロック140に対し、優先割込信号bが通知されない(活性化しない)ため、割込制御ブロック140の優先ブロック番号レジスタ140dには、何ら情報がセットされずに空状態となる。このとき、プロセッサ150のプログラムの指示により、この優先ブロック番号レジスタ140dにセットされている情報を読込むと、割込は、優先要の設定がされない機能ブロックによる優先割込要因でない割込であることがわかるため、上述した木構造の追跡処理にしたがう割込要因の判定処理を実行する。
なお、上述の説明では、優先要の設定がされた機能ブロックを1つに設定したが、優先要の設定を複数の機能ブロックに行い、かつ、それらが同時に割込信号を出力するケースもある。その場合は、優先割込信号bの先着順にするか、若しくはブロックコード順で優先ブロック番号レジスタ140dにブロックコードが格納されるようにすればよい。
【0018】
このように、上述したデータ処理装置100は、予め優先要の設定をした機能ブロックから優先割込要因にしたがう優先割込信号が出力したときに、割込制御ブロック140の優先ブロック番号レジスタ140dを対象として、そこにセットされている情報(ブロックコード)を読出すだけで、予め設定した割込要因の特定が可能であり、木構造の追跡処理を行うことを要しない。そのため、割込に対する処理を高速化することができる。
次に、別のデータ処理装置について説明する。このデータ処理装置はデータ処理装置100と比較して、割込制御ブロック140が割込制御ブロック143となっている点で異なるほかは、同じ構成を有しているので、以下ではその割込制御ブロック143についての説明を中心に行い、共通する箇所については説明を省略乃至簡略化する。
その割込制御ブロック143は、図4に示すように、優先度設定レジスタ144と、優先度テーブル145と、テーブル制御レジスタ146とを有する点で異なり、そのほかの構成は同じである。
【0019】
優先度設定レジスタ144は、優先要の設定がされた複数の機能ブロックから優先割込要因にしたがう複数の優先割込信号が出力され得ることに対応して、予め設定された機能ブロック間の優先度を記憶する手段である。優先度テーブル145は、複数のテーブルエントリ145a,145b・・・を有し、優先度設定レジスタ144に記憶された優先度に応じて、各機能ブロックのブロックコードを記憶する手段である。テーブル制御レジスタ146は、優先度テーブル145のリセットに必要なデータを記憶している。例えば、図5に示すように、優先設定レジスタ144には、「受信完了」の項目にのみ“1”をセットし、他には“0”をセットして「受信完了」が優先するという設定をしている。
この優先度テーブル145には、次のようにしてブロックコードを記憶する。この手順について、図12のフローチャートを参照しつつ説明する。
【0020】
優先度テーブル145のデータ設定処理がスタートすると、初期化プログラムを作動させてテーブル制御レジスタ146に記憶されているデータを用いて優先度テーブル145を初期化し、リセットする。
ステップ5に進むと、各優先割込信号について、優先度設定レジスタ144に記憶された優先度に応じて、優先度の高い順にその機能ブロックのブロックコードを優先度テーブル145内の各テーブルエントリ145a,145a・・・に順次記憶させる。続く、ステップ6で優先要が設定されたすべての機能ブロックを設定(登録)したか否かを判断して、すべて設定されていれば処理を終了し、そうでなければステップ5に戻る。以上の処理により、各テーブルエントリ145a,145a・・・に機能ブロックのブロックコードが順次スタックされる。なお、テーブルエントリのエントリー番号はブロックコードの書込み毎に自動更新(加算)される。
優先要の設定がされた複数の機能ブロックが同時に優先割込信号を出力した場合、割込制御ブロック140は、優先度テーブル145を参照して、各テーブルエントリの中から、優先度が最も高い、すなわち、エントリー番号が最も小さいブロックコードを読出して、そのブロックコードを優先ブロック番号レジスタ140dに格納する。例えば、USB機能ブロック110の第1のエンドポイントブロック115に加えて、USB送信DMACブロック111からも受信完了割込にしたがう優先割込信号が出力するときに、USB送信DMACブロック111よりも、第1のエンドポイントブロック115を優先させたい場合は、上記手順に従い、第1のエンドポイントブロック115をUSB送信DMACブロック111のブロックコードよりも優先するようにして(第1のエンドポイントブロック115の優先度を高くして)優先度設定レジスタ144に優先度を書込む。
【0021】
このデータ処理装置は、優先度テーブル145を設けたことで、2以上の機能ブロックが同時に優先割込要求を出力した場合でも、優先度設定レジスタ144に記憶されている優先度にしたがい、そのいずれかが優先される。したがって例えば、先にUSB送信DMACブロック111の完了割込にしたがう優先割込信号が発生しても、優先度の高い優先割込信号が後から発生すると、その後から発生した優先割込信号が優先される。
このデータ処理装置は、予め優先要に設定した機能ブロックから優先割込信号が出力した時にひとつのレジスタを読出すだけで割込要因の判定が可能であり、しかも、その機能ブロックが複数あり、そのそれぞれが優先割込信号を同時に出力しても、予め機能ブロック間の優先度を優先度設定レジスタ144に設定することにより、各機能ブロックについて、割込処理の優先順位を持たせることができる。そのため、割込に対する処理を高速化できるだけでなく、優先度処理を柔軟に行える。
【0022】
次に、さらに別のデータ処理装置について説明する。このデータ処理装置はデータ処理装置100と比較して、割込制御ブロック140が割込制御ブロック147となっている点で異なるほかは、同じ構成を有しているので、以下ではその割込制御ブロック147についての説明を中心に行い、共通する箇所については説明を省略乃至簡略化する。
その割込制御ブロック147は、図6に示すように、割込制御ブロック140と比較して、優先ブロック番号レジスタ140dが優先ブロックビットマップレジスタ(以下「BMレジスタ」という)148になっている点で異なり、そのほかの構成は同じである。
このBMレジスタ148は、各機能ブロックについて、それぞれの優先度に応じた各機能ブロック固有の領域が割り当てられていて、各機能ブロックからの優先割込信号をビットマップ化し、その機能ブロックに対応する記憶領域にビットを設定する。また、BMレジスタ148は、例えば図7に示すように、各機能ブロックに対して、予め決められたビット位置が割り当てられ、そのビット位置にビットを設定して記憶するようになっている。
【0023】
上述のデータ処理装置と同様に、優先要に設定された複数の機能ブロックから優先割込信号が出力される場合、例えば、USB機能ブロック110の第1のエンドポイントブロック115と、USB送信DMACブロック111とから受信完了割込が発生したとすると、BMレジスタ148を用いた割込要因の判定は図13に示すフローチャートのようになる。
第1のエンドポイントブロック115と、USB送信DMACブロック111で受信完了割込が発生したとすると、その双方の優先割込信号が割込制御ブロック147に入力する。これを受けて、割込制御ブロック147は、入力した優先割込信号をビットマップに展開して、BMレジスタ148の双方の機能ブロックに対応する領域にビットを設定する。次いで、プロセッサ150に割込要求信号aを出力する。
【0024】
そして、割込要因の判定処理開始後ステップ7に進み、プロセッサ150からのプログラム(割込ハンドラ)の指示により、割込制御ブロック143のBMレジスタ148にアクセスして設定されている情報を読出す。
そして、ステップ8に進み、読出した情報がすべて“0”であるか否かを判断する。すべて“0”であれば、発生した割込の中に優先割込要因が含まれていなかった場合であり、割込制御ブロック147のBMレジスタ148は何ら情報がセットされずに空状態である。この場合は、ステップ8から分岐してステップ4に進み、上述した割込要因の判定処理(木構造の追跡処理)を実行する。そうでない場合は、ステップ9に進み、発生した割込に対応する処理を実行して処理を終了する。
ステップ9に進む場合は、優先要に設定された機能ブロックがいずれであるかを判断して割込要因を確定する。BMレジスタ148には、それまでの処理で第1のエンドポイントブロック115と、USB送信DMACブロック111に割り当てられた領域にビットが設定されているので、その双方が優先要に設定された機能ブロックであるとして、いずれか優先する方に分岐して処理を行うことになる(どちらの機能ブロックを優先するかはプロセッサ150のプログラムに委任されている。ここで、そのプログラムがUSB送信DMACブロック111の完了割込に対応する処理に分岐したとすると、USB送信DMACブロック111が優先されたことになる。)。
このように、このデータ処理装置は、予め優先要に設定した機能ブロックの優先割込要因が発生したときに、ひとつのレジスタを読出すだけでその割込要因の検出が可能であり、しかも、そのような機能ブロックが複数あり、同時に割込が発生した場合でも、機能ブロック間の優先順位を任意に定義して処理することができる。そのため、割込に対する処理を高速化でき、且つ柔軟な優先度処理ができる。
【0025】
【発明の効果】
以上説明してきたように、この発明によれば、優先割込信号が出力したときに1つのレジスタにセットされた情報を読出せば割込要因の特定が可能であり、木構造の追跡処理を行うことを要しないから、割込に対する処理を高速化することができる。
【図面の簡単な説明】
【図1】この発明によるデータ処理装置と、プロセッサの内部構成を示すブロック図である。
【図2】図1に示すデータ処理装置のUSB機能ブロックの内部構成を示すブロック図である。
【図3】図1に示すデータ処理装置の割込制御ブロックの内部構成を示すブロック図である。
【図4】別のデータ処理装置の割込制御ブロックの内部構成を示すブロック図である。
【図5】図4に示す割込制御ブロック内部の優先設定レジスタと、要因レジスタとの内部構成の一例を示すブロック図である。
【図6】また別のデータ処理装置の割込制御ブロックの内部構成を示すブロック図である。
【図7】図6に示す割込制御ブロック内部の優先ブロックビットマップレジスタの構成を示すブロック図である。
【図8】この発明に関連するデータ処理装置と、プロセッサの内部構成を示すブロック図である。
【図9】図8に示すデータ処理装置のUSB機能ブロックの内部構成を示すブロック図である。
【図10】図1に示すデータ処理装置による割込要因の判定処理の手順を示すフローチャート図である。
【図11】別のデータ処理装置による割込要因の判定処理の手順を示すフローチャート図である。
【図12】優先度テーブルにブロックコードを設定させる処理の手順を示すフローチャート図である。
【図13】また別のデータ処理装置による割込要因の判定処理の手順を示すフローチャート図である。
【符号の説明】
100:データ処理装置 150:プロセッサ
110:USB機能ブロック
111:USB送信DMACブロック
112:USB受信DMACブロック
113:USB入出力制御ブロック
115:第1のエンドポイントブロック
116:第2のエンドポイントブロック
111a,112a:要因レジスタ
113a,115a:要因レジスタ
116a:要因レジスタ
111b,112b:優先設定レジスタ
113b,115b:優先設定レジスタ
116b:優先設定レジスタ
120:第1の入出力機能ブロック
130:第nの入出力機能ブロック
140,143,147:割込制御ブロック
140a:要因レジスタ
140c:ブロック番号デコーダ
140d:優先ブロック番号レジスタ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data processing device in which the time required for interrupt processing is shortened to improve responsiveness.
[0002]
[Prior art]
2. Description of the Related Art Data processing devices are used to control peripheral devices such as personal computers. In a multi-function data processing device having a plurality of functions, when an interrupt request signal is notified to a connected processor, an interrupt request of each function block that controls execution of a plurality of mounted functions is provided. In many cases, the signals are aggregated by an interrupt control block, and then a single interrupt request signal is output. In the system including the multi-function data processing device and the processor, in order to identify the interrupt factor, the data stored in the factor register in the interrupt control block is read to identify the functional block, and further, the identified functional block The data stored in the interrupt factor register is read out to perform a tree structure tracking process of the interrupt factor to further specify the sub-block, and the tree structure tracking process finally specifies the interrupt factor.
Conventionally, with regard to the acceleration of the interrupt processing of a multifunction device, a technology that speeds up a cycle in which software determines a cause by transmitting interrupt factor data of a functional block in which a device generates an interrupt request to a processor side. (For example, see Patent Document 1).
[0003]
[Patent Document 1]
JP 2001-209548 A (page 1)
[0004]
[Problems to be solved by the invention]
However, the depth of the tree structure of the interrupt factor (the number of layers of the interrupt factor) differs depending on the function block. The deeper the depth (the greater the number of layers), the longer the access time required to specify the interrupt factor, The time required to specify the interrupt factor is increased.
[0005]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and an interrupt factor of a functional block to be used with priority among a plurality of functional blocks is determined by a tree structure tracking process of the interrupt factor. It is an object of the present invention to specify the data without interrupt, shorten the time required for the interrupt processing, increase the speed, and improve the responsiveness.
[0006]
[Means for Solving the Problems]
The present invention achieves the above object by inputting and aggregating a plurality of functional blocks for executing a data processing function and a plurality of interrupt signals output from the respective functional blocks to output an interrupt request signal. A data processing device having an interrupt control block to perform, wherein each of the functional blocks is provided with a priority setting unit for setting whether or not the priority is required, and each of the functional blocks is configured such that the priority setting unit is set to the priority required. A data processing device which outputs a priority interrupt signal including a block code specifying the functional block separately from the interrupt signal and inputs the signal to the interrupt control block.
This data processing device includes means for storing the priority of each functional block, and means for storing a block code included in the priority interrupt signal in accordance with the priority stored in the means. It may be provided in the control block.
The interrupt control block may be provided with a storage unit to which an area unique to each function block according to each priority is assigned for each function block.
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, a
The
[0008]
As shown in FIG. 9, the
The first and n-th input / output function blocks 220 and 230 and the
[0009]
In the
Here, in the case of each function block, for example, the
[0010]
First, when a reception completion interrupt occurs, the
Next, the process proceeds to a step S21, where the factor register 210a of the
[0011]
Next, the
That is, as shown in FIG. 1, the
[0012]
As shown in FIG. 2, the
The first and n-th input / output function blocks 120 and 130 have priority setting registers 120b and 130b, respectively, in addition to the factor registers 120a and 130a, respectively.
Further, as shown in FIG. 3, the interrupt control block 140 includes a
[0013]
As described above, in the
Then, similarly to the
[0014]
The above
In the following description, of the built-in function blocks, priority is set in the
[0015]
First, the
Then, the
In the
[0016]
Next, in the
When the process proceeds to step 3, since the information indicating the
[0017]
If the generated interrupt does not depend on the priority interrupt factor of the functional block for which the priority is not set, the
In the above description, the function block for which the priority is set is set to one, but there is a case where the setting of the priority is performed for a plurality of function blocks, and they simultaneously output an interrupt signal. . In that case, the priority interrupt signal b may be stored in the order of arrival, or the block codes may be stored in the priority
[0018]
As described above, the
Next, another data processing device will be described. This data processing device has the same configuration as the
The interrupt control block 143 is different in that it has a
[0019]
The
This priority table 145 stores block codes as follows. This procedure will be described with reference to the flowchart of FIG.
[0020]
When the data setting process of the priority table 145 is started, the initialization program is operated to initialize and reset the priority table 145 using the data stored in the
In step 5, for each priority interrupt signal, in accordance with the priority stored in the
When a plurality of function blocks for which priority is set output a priority interrupt signal at the same time, the interrupt control block 140 refers to the priority table 145 and has the highest priority among the table entries. That is, the block code having the smallest entry number is read, and the block code is stored in the priority
[0021]
By providing the priority table 145, even if two or more functional blocks output a priority interrupt request at the same time, the data processing apparatus can use any of the priority blocks stored in the
This data processing device can determine the cause of an interrupt only by reading one register when a priority interrupt signal is output from a function block set in advance as a priority required, and furthermore, there are a plurality of the function blocks, Even if each of them outputs the priority interrupt signal at the same time, the priority between the functional blocks is set in advance in the
[0022]
Next, another data processing apparatus will be described. This data processing device has the same configuration as the
As shown in FIG. 6, the interrupt control block 147 differs from the interrupt control block 140 in that the priority
In the
[0023]
Similarly to the above-described data processing device, when a priority interrupt signal is output from a plurality of function blocks set as priority required, for example, the
Assuming that a reception completion interrupt has occurred in the
[0024]
Then, after the start of the interrupt factor determination process, the process proceeds to step 7, in which the BM register 148 of the interrupt control block 143 is accessed to read the set information in accordance with a program (interrupt handler) instruction from the
Then, the process proceeds to a
When proceeding to step 9, it is determined which of the functional blocks has been set as the priority required, and the interrupt factor is determined. In the
As described above, this data processing device can detect the interrupt factor only by reading one register when the priority interrupt factor of the function block set as the priority required in advance occurs. Even when there are a plurality of such function blocks and an interrupt occurs at the same time, the priority between the function blocks can be arbitrarily defined and processed. Therefore, the processing for the interrupt can be speeded up and flexible priority processing can be performed.
[0025]
【The invention's effect】
As described above, according to the present invention, the interrupt factor can be specified by reading the information set in one register when the priority interrupt signal is output. Since it is not necessary to perform the processing, the processing for the interrupt can be speeded up.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an internal configuration of a data processing device and a processor according to the present invention.
FIG. 2 is a block diagram showing an internal configuration of a USB function block of the data processing device shown in FIG.
FIG. 3 is a block diagram showing an internal configuration of an interrupt control block of the data processing device shown in FIG.
FIG. 4 is a block diagram showing an internal configuration of an interrupt control block of another data processing device.
FIG. 5 is a block diagram showing an example of an internal configuration of a priority setting register and a factor register inside the interrupt control block shown in FIG. 4;
FIG. 6 is a block diagram showing an internal configuration of an interrupt control block of another data processing device.
FIG. 7 is a block diagram showing a configuration of a priority block bit map register in the interrupt control block shown in FIG. 6;
FIG. 8 is a block diagram showing an internal configuration of a data processing device and a processor related to the present invention.
FIG. 9 is a block diagram showing an internal configuration of a USB function block of the data processing device shown in FIG. 8;
FIG. 10 is a flowchart illustrating a procedure of an interrupt factor determination process performed by the data processing device illustrated in FIG. 1;
FIG. 11 is a flowchart illustrating a procedure of an interrupt factor determination process performed by another data processing device.
FIG. 12 is a flowchart illustrating a procedure of a process of setting a block code in a priority table.
FIG. 13 is a flowchart illustrating a procedure of an interrupt factor determination process performed by another data processing device.
[Explanation of symbols]
100: data processing device 150: processor
110: USB function block
111: USB transmission DMAC block
112: USB reception DMAC block
113: USB input / output control block
115: first endpoint block
116: Second endpoint block
111a, 112a: Cause register
113a, 115a: Cause register
116a: Cause register
111b, 112b: priority setting register
113b, 115b: priority setting register
116b: priority setting register
120: first input / output function block
130: n-th input / output function block
140, 143, 147: Interrupt control block
140a: Cause register
140c: block number decoder
140d: priority block number register
Claims (3)
前記各機能ブロックにその優先要否を設定する優先設定部を設け、
前記各機能ブロックが、前記優先設定部が優先要に設定されているときに、その機能ブロックを特定するブロックコードを含む優先割込信号を前記割込信号とは別に出力して前記割込制御ブロックに入力することを特徴とするデータ処理装置。A data processing device having a plurality of functional blocks for performing data processing functions and an interrupt control block for inputting and aggregating a plurality of interrupt signals output from the respective functional blocks and outputting an interrupt request signal. So,
Each of the functional blocks is provided with a priority setting unit for setting the priority necessity,
Each of the functional blocks outputs a priority interrupt signal including a block code for specifying the functional block separately from the interrupt signal when the priority setting unit is set to priority priority, thereby controlling the interrupt control. A data processing device for inputting to a block.
前記各機能ブロックの優先度を記憶する手段と、
該手段に記憶された優先度に応じて、前記優先割込信号に含まれるブロックコードを記憶する手段とを、前記割込制御ブロックに設けたことを特徴とするデータ処理装置。The data processing device according to claim 1,
Means for storing the priority of each of the functional blocks;
Means for storing a block code included in the priority interrupt signal in accordance with the priority stored in the means, provided in the interrupt control block.
各機能ブロックについて、それぞれの優先度に応じた前記各機能ブロック固有の領域が割り当てられている記憶部を前記割込制御ブロックに設けたことを特徴とするデータ処理装置。The data processing device according to claim 1,
A data processing device, characterized in that a storage unit to which an area unique to each functional block according to each priority is assigned to each functional block is provided in the interrupt control block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002276345A JP2004118235A (en) | 2002-09-20 | 2002-09-20 | Data processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002276345A JP2004118235A (en) | 2002-09-20 | 2002-09-20 | Data processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004118235A true JP2004118235A (en) | 2004-04-15 |
Family
ID=32272249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002276345A Pending JP2004118235A (en) | 2002-09-20 | 2002-09-20 | Data processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004118235A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006172196A (en) * | 2004-12-16 | 2006-06-29 | Canon Inc | Interrupt controller |
-
2002
- 2002-09-20 JP JP2002276345A patent/JP2004118235A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006172196A (en) * | 2004-12-16 | 2006-06-29 | Canon Inc | Interrupt controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7313381B2 (en) | Embedded scheduling of hardware resources for hardware acceleration | |
US4942519A (en) | Coprocessor having a slave processor capable of checking address mapping | |
US8200875B2 (en) | Processing and forwarding of message-signaled interrupts | |
KR20130023302A (en) | Instruction set architecture-based inter-sequencer communications with a heterogeneous resource | |
JPH02267634A (en) | Interrupt system | |
KR20050075722A (en) | Processor system, dma control circuit, dma control method, control method for dma controller, graphic processing method, and graphic processing circuit | |
JP5703378B2 (en) | Alignment control | |
JP7470685B2 (en) | Programming and Controlling Computational Units in Integrated Circuits | |
EP2054800A2 (en) | Flash memory access circuit | |
CN103902419B (en) | A kind of cache testing method and device | |
TWI722009B (en) | Hardware mechanism for performing atomic actions on remote processors | |
KR101793282B1 (en) | Micro computer | |
KR100532417B1 (en) | The low power consumption cache memory device of a digital signal processor and the control method of the cache memory device | |
JP5322567B2 (en) | Data processing system and semiconductor integrated circuit | |
JP2004118235A (en) | Data processor | |
JP2005258509A (en) | Storage device | |
JPWO2010029682A1 (en) | Information processing device | |
JPH056281A (en) | Information processor | |
JPH0377137A (en) | Information processor | |
US11003474B2 (en) | Semiconductor device for providing a virtualization technique | |
JP3733746B2 (en) | Programmable controller | |
JP4641391B2 (en) | Direct memory access device, control method therefor, and data processing device | |
JP2001306335A (en) | Computer | |
JP5949330B2 (en) | Information processing apparatus and information processing method | |
JPH0481934A (en) | Information processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040916 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060711 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060911 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070123 |