JP3597744B2 - Interrupt factor signal flag register device - Google Patents
Interrupt factor signal flag register device Download PDFInfo
- Publication number
- JP3597744B2 JP3597744B2 JP35657799A JP35657799A JP3597744B2 JP 3597744 B2 JP3597744 B2 JP 3597744B2 JP 35657799 A JP35657799 A JP 35657799A JP 35657799 A JP35657799 A JP 35657799A JP 3597744 B2 JP3597744 B2 JP 3597744B2
- Authority
- JP
- Japan
- Prior art keywords
- flag
- signal
- register
- flag bit
- interrupt factor
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、割込み要因信号フラグレジスタ回路に関し、特にLSI(大規模集積回路)に内蔵する非同期系の割込み要因信号の検出およびクリアの装置に関する。
【0002】
【従来の技術】
図4は、第1の従来の割込み要因信号フラグレジスタ回路(装置)の概略ブロック図を示している。
要因信号フラグレジスタ回路は、割込要因毎に対応する8個のフラグビットレジスタ1a〜1hを備えるフラグレジスタ1と、制御手段(コントローラ)3からの各種制御信号に基づいてフラグレジスタ1の読出し/書込みを制御するアドレスデコーダ2とを備え、割込要因が発生すると、割込み要因に対応するフラグビットレジスタ1a〜1hにデータが保持される共に、割込みの発生がコントローラ3に通知され、割込みの発生の通知を受けたコントローラ3がアドレスデコーダ2を制御してフラグレジスタ1内に保持されたデータを読出し、データ内容を検出することで、発生した割込要因を判断し、対応する割込み制御を可能としている。
【0003】
また、コントローラ3は、割込み制御の実行に伴ってフラグビットレジスタ1a〜1hの内容を発生前の状態に戻すために、アドレスデコーダ2を制御してフラグビットレジスタ1a〜1hに所定のデータを書込み(クリア)を行う。
尚、フラグレジスタ1内のフラグビットレジスタの数は説明の便宜上8個で説明するが、その数は仕様条件により適宜決定できるもので限定するものではない。
【0004】
図4に示すように各フラグビットレジスタ1a〜1hには、割込要因の発生信号INTa〜INThを通知する割り込み要求線106a〜106h、コントローラ3から送られてくる入力データを伝達する入力データバス100、及びアドレスデコーダ2からの前記入力データの書込を可能とするライトイネーブル信号WCS(以下、「ライト信号WCS」と略記する)を伝達する書込制御線108とが、順に入力端子であるINTFRG端子、データ端子、WCS端子にそれぞれ接続されている。
【0005】
また、フラグビットレジスタ1内のデータを出力する出力端子DOUTは、2入力のAND回路4a〜4hを介してコントローラ3へ接続された出力データバス101に接続されており、該AND回路4a〜4hの一方の入力端子にはアドレスデコーダ2からリードイネーブル信号RCS(以下、「リード信号RCS」と略記する)を伝送する読込制御線107が接続され、該リード信号RCSのアクティブ/非アクティブに基づいて、コントローラ3へのフラグビットレジスタ1内の全データの読み出しが制御されている。
【0006】
前記アドレスデコーダ2は、コントローラ3からのアドレス信号を伝送するアドレスバス102、I/Oリード信号を伝送するI/Oリード信号線103、及びI/Oライト信号を伝送するI/Oライト信号線104が各入力端子に接続され、フラグビットレジスタ1へライト信号WCSを伝送する書込制御線108と、リード信号RCSを伝送する読込制御線107が各出力端子に接続されている。
【0007】
また、割込要因の発生信号INTa〜INThを通知する割り込み要求線106a〜106hは、割込み要因信号が“L”アクティブであればAND回路5、“H”アクティブであればOR回路を介して、割込要因の発生信号INTをコントローラ3に伝送する割込線105に接続されている。
【0008】
図5は、上記フラグビットレジスタ1a〜1hの動作を実現するブロック図の一例を示している。
フラグビットレジスタは、セレクタ回路13とDフリップフロップ14を備えており、入力信号に基づいてセレクタ回路13がDフリップフロップ14に保持するためのデータを選択、出力するものである。
【0009】
すなわち、セレクタ回路13は、3個のデータ入力端子▲1▼、▲2▼、▲3▼と、2個の切換制御端子A、Bと、1の出力端子▲4▼とを有している。
データ入力端子▲1▼には、Dフリップフロップ14からのフィードバック出力信号が入力され、端子▲2▼には端子INTFRGに入力された割込み要因信号INTx(xは0〜7のいづいか1、以下同様)がインバータ10を介して反転された反転割込み要因信号/INTxが入力され、端子▲3▼には端子ライトWCSとデータ入力端子に入力された両入力信号がAND回路11を介して出力した信号が接続されている。
切換制御端子Aには、端子INTFRGからの割込み要因信号INTxが接続され、切換制御端子BにはWCS端子の入力信号がインバータ12により反転して入力されている。出力端子▲4▼は、Dフリップフロップ14の入力端子Dに接続されている。
【0010】
Dフリップフロップ14は、前記したようにセレクタ回路13の出力信号を入力信号として、クロック信号入力にあわせて入力信号を遅延させた出力信号をセレクタ回路13のデータ入力端子▲1▼にフィードバック入力するとともに、保持したデータを出力端子であるDOUT端子からフラグビットレジスタ内のデータとして出力する。
【0011】
前記セレクタ回路13の選択動作について、以下に説明する。
まず、制御端子Aに”0”が入力された場合には、出力端子▲4▼には端子▲2▼が選択接続される。
制御端子Aに”1”が入力された場合には、更に制御端子Bを参照し、制御端子Bに”0”が入力された場合には、出力端子▲4▼には端子▲3▼が選択接続される。
制御端子Aに”1”が入力され、制御端子Bに”1”が入力された場合には、出力端子▲4▼には端子▲1▼が選択接続される。
【0012】
前記セレクタ回路13の選択動作を実現する論理回路の一例を図6に示す。
制御端子Aの入力信号をインバータ131で反転した信号と入力端子▲2▼の入力信号とを論理積をとるANDゲート132と、制御端子Bの入力信号をインバータ133にて反転した信号、制御端子Aの入力信号、及び入力端子▲3▼の3入力ANDゲート134と、制御端子A、Bの入力信号、及び端子▲1▼の入力信号の3入力ANDゲート135とを設ける。そして、前記した3つのANDゲート132〜135の出力信号の論理和をとるOR回路136を設け、かかるOR回路136の出力を出力端子▲4▼の出力信号とするものである。
【0013】
以上説明したセレクタ回路13の構成により、端子INTFRGからの割込み要因信号INTxが”0”の場合(割り込み要因信号が発生した場合)、セレクタ回路13の制御端子Aに”0”が入力され、出力端子▲4▼には入力端子▲2▼が選択されるが、入力端子▲2▼の入力信号は”1”なので、出力端子▲4▼は”1”を出力し、Dフリップフロップ14に”1”がライトされる。
【0014】
逆に、端子INTFRGからの割込み要因信号INTxが”1”(割り込み要因信号が発生していない場合)で、更にライト信号WSCが”1”の場合には、インバータ12により制御端子Bに”0”が入力され、出力端子▲4▼には入力端子▲3▼が選択されるが、入力端子▲3▼にはデータ信号がAND回路11を介して入力されるので、出力端子▲4▼はデータ信号を出力し、Dフリップフロップ14にはデータ信号がライトされる。
例えば、データ信号が”0”の場合にはDフリップフロップ14には”0”がライトされ、Dフリップフロップ14は”0”となる。
【0015】
また、端子INTFRGからの割込み要因信号INTxが”1”(割り込み要因信号が発生していない場合)で、更にライト信号WCSが”0”の場合には、インバータ12によりセレクタ回路13の制御信号Bが”1”となり、出力端子▲4▼には入力端子▲1▼が選択されるが、入力端子▲1▼にはDフリップフロップ14の出力Qが入力され、再びDフリップフロップ14の入力Dに入力される。
従って、Dフリップフロップ14の値は変化せず、DOUTの状態が保持される。
【0016】
割込み要因信号フラグレジスタ1には、リード・ライトの区別なく、単一アドレスが割り付けられている。
【0017】
次に、アドレスデコーダ2の構成を図7を参照して説明する。
図7は、上記説明した従来のアドレスデコーダ2のブロック図であり、デコーダ21、OR回路22、及び2個のAND回路23、24から構成されている。
アドレスバス102により送られてきたアドレス信号は、デコーダ21にてデコードされて、フラグビットレジスタに対応したデコードアドレス信号が出力(デコード信号線21a〜21hのいづれかをアクティブ“H”)され、更にOR回路22を介して1の制御信号とした後にI/Oリード信号と共にAND回路23に入力されて読込制御信号であるリード信号RCSを出力可能とし、また、該制御信号はI/Oライト信号と共にAND回路24に入力されて書込制御信号であるライト信号WCSを出力可能としている。
従って、アドレスデコーダ2はアドレス信号とI/Oリード信号が入力さた場合にはリード信号RCSを出力し、アドレス信号とI/Oライト信号が入力された場合にはライト信号WCSを出力する。
【0018】
次に、図8のフローチャートを参照しつつ、割込み要因の検出からフラグレジスタのクリアまでを説明する。
割込み要因の検出は、コントローラ3が割込みの発生の通知を受け取ると(S1)、割込み要因信号フラグレジスタ1に割り付けられたアドレス信号とI/Oリード信号をアドレスデコーダ2に出力する。そして、アドレスデコーダ2のリード信号RCSをアクティブ“H”にして、読込制御線107を介して全AND回路4a〜4hに入力して、フラグビットレジスタ1a〜1hに格納された全データ信号を出力データバス101に出力させる。該出力データバス101のデータ信号は、コントローラ3に送られ割込み要因の検出が可能となる(S2)。
【0019】
割込み要因信号フラグレジスタ1の内容は、割込みの発生があったフラグビットは”H”、その他のフラグビットは”L”状態になっているので、コントローラ3は読み出した割込み要因信号フラグレジスタ1のデータ内容で、割込み要因を認識して、コントローラ3内部にデータ内容を保存する(S3)。
【0020】
コントローラ3は、割込み要因の認識をした後、どの割り込み要因(フラグ)に起因する処理を行うか決定して(S4)、内部に保持したレジスタ内容の処理を行うフラグのみ“ゼロ”に変更し(S5)、変更した内部に保持したレジスタ内容を割込み要因信号フラグレジスタ1にライトする(S6)。
【0021】
コントローラ3が割込み要因信号フラグレジスタ1をライト(クリア)する手段は、コントローラ3が割込み要因信号フラグレジスタ1に割り付けられたアドレス信号、I/Oライト信号、及び書込むべき入力データを出力して、アドレスデコーダ2がアドレス信号とI/Oライト信号からライトWCS信号をアクティブにしてフラグビットレジスタ1a〜1hに送信することで該フラグビットレジスタ1a〜1hの書込可能状態とし、入力データバス100からの入力データを全フラグビットレジスタ1a〜1hにライトする。
【0022】
上記一連の割り込み要因検出とクリア処理で、コントローラ3が内部にリードした割込み要因信号フラグレジスタ1の内容を一旦保持するのは、コントローラ3が割込み要因信号フラグレジスタ1にライトする時に、全てのフラグビットレジスタ1a〜1hに入力データバス100の値をライトしてしまうため、ライトする前後で、変更したくないフラグビットレジスタの値を変更しないようにするためである。
すなわち、コントローラ3がリードした割込み要因信号が2個あった場合に、1の割込み処理に伴ってフラグビットレジスタの内容を一律にクリアした場合にも、残りの割込み処理をコントローラが認識、処理可能とするためである。
【0023】
また、第2の従来例の割込要因信号フラグレジスタ回路(装置)として、特開平8−44572号公報に開示されたものがあり、割込み要因のレジスタを上位装置(コントローラ等)でリードするときに、同時にレジスタをリセットする構成である。
【0024】
【発明が解決しようとする課題】
しかしながら、第1の従来の割込み検出手段では、コントローラ3は割込み要因信号フラグレジスタ1のリード時のデータを基に、クリアするビットのみを変更してライトしているために、いつ発生するかわからない非同期系の割込み要因信号が、コントローラ3が割込み要因信号フラグレジスタ1をリード動作した後からライト動作するまでの間に発生した場合には、割込み要因信号フラグレジスタ1内の割込み要因信号に該当するフラグビットレジスタが”H”に変化するものの、コントローラ3によって”L”ライトされてしまい、このリード−ライト間に発生した割込み要因の認識と特定ができなくなってしまうという問題があった。
【0025】
また、第2の従来例では、割込み要因が複数発生した場合、一度リードした時点ですべてをクリアしてしまう為、コントローラ側で割込み要因信号フラグレジスタのクリアを制御できなくなり、コントローラが割り込み要因に起因する処理を行っている最中に次々に割込み要因が発生すると、その度に、割込み要因信号フラグレジスタのデータをコントローラ内に保持する必要が生じ、更にはハードウェアの規模も大きくなるという問題があった。
【0026】
本発明は、前記の問題点を解消するためなされたものであって、コントローラが割込み要因信号フラグレジスタをリード動作した後から割込み要因信号フラグレジスタをライト動作するまでの間に、いつ発生するかわからない非同期系の割込み要因信号が発生しても、その割り込み要因信号がフラグとして割込み要因信号フラグレジスタに保持され、その後のコントローラによる割込み要因信号フラグレジスタへのライト動作によっても保持されたフラグがクリアされてしまうことが無くなり、確実に割込み要因信号の発生をコントロールできる割込み要因信号フラグレジスタ装置を提供することを目的とする。
【0027】
【課題を解決するための手段】
本発明においては上記課題を達成するため、割込み要因信号の発生パルスをフラグビットとして保持するフラグビットレジスタを複数備え、各フラグビットレジスタ毎にアドレスが割り付けられたフラグレジスタと、
制御部から送信された、前記フラグレジスタに関するアドレスのアドレス信号と、該フラグレジスタのフラグビットの読込みを指示するリード信号とに基づき、前記フラグレジスタ内の各フラグビットレジスタに保持したフラグビットを制御部に送信するフラグ読出し手段と、
前記制御部に送信されたフラグビット中で該制御部が対応する又は対応した割込処理に相当する処理フラグビットを保持したフラグビットレジスタのアドレス信号と、フラグレジスタへのフラグビットのクリアを指示するライト信号とに基づき、該処理フラグビットを保持したフラグビットレジスタのみをリセットするフラグリセット手段とを含み、
前記フラグリセット手段は、フラグビットレジスタ毎に出力端子を有し、入力するアドレス信号に対応するフラグビットレジスタの出力端子のみをアクティブにするデコーダと、このデコーダの各出力端子毎に前記ライト信号との論理積をとるANDゲートとを含み、
前記ANDゲート出力信号毎にアドレス信号に相当するフラグビットレジスタに接続することを特徴としている。
【0029】
本発明によれば、フラグレジスタのフラグビットをリードするために、制御部からアドレスを指定してリードするときに、各フラグビットレジスタごとに割り付けられているアドレス番地のいずれを指定しても、一度のリード動作で全てのフラグビットレジスタの状態をリードすることができる。
その後、制御部が対応する又は対応した割込処理に相当する処理フラグビットを保持したフラグビットレジスタのフラグビットをクリアするために、制御部からアドレスを指定して"ゼロ"ライトするときに、制御部が各フラグビットレジスタごとに割り付けられた特定のアドレス番地を指定すると、フラグレジスタの特定フラグビットだけライト動作が行われ、それ以外のフラグビットレジスタにはライト動作を行わない。
【0030】
これによって、制御部が割込み要因信号フラグレジスタをリード動作した後から割込み要因信号フラグレジスタをライト動作するまでの間に、いつ発生するかわからない非同期系の割込み要因信号が発生しても、その割り込み要因信号がフラグとして割込み要因信号フラグレジスタに保持され、その後の制御部による割込み要因信号フラグレジスタへのライト動作によっても保持されたフラグがクリアされてしまうことが無くなり、確実に割込み要因信号の発生をコントローラが把握できる。
【0031】
また、デコーダにより入力するのアドレス信号から該当する処理フラグビットを有したフラグビットレジスタの出力端子のみがアクティブとなり、その他のフラグビットレジスタの出力端子は非アクティブとなる。
従って、デコーダの各出力端子毎に設けたANDゲートのうち、処理フラグビットを有したフラグビットレジスタに対応するANDゲートの出力のみがアクティブとなり、該当するフラグビットレジスタのみのクリアが可能となる。
【0032】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を詳細に説明する。尚、前記した構成と同一部分には同一符号を付して説明を省略する。
図1は、本発明の実施形態にかかる割込み要因信号フラグレジスタ回路のブロック図であり、前記第1の従来例(図4)とはアドレスデコーダ2aの構成を変更している。
【0033】
アドレスデコーダ2aは、コントローラ3からアドレスを指定してフラグレジスタ1内のフラグビットレジスタ1a〜1hをリードする時に、各フラグビットレジスタ1a〜1h毎に割り付けられているアドレス番地のいずれを指定しても、アドレスデコーダ2aにおいてリードCSをアクティブにして、一度のリード動作で全てのフラグビットレジスタ1a〜1hの状態をリード可能とする共に、フラグレジスタ1の特定のフラグビットレジスタをクリアする時に、コントローラ3が各フラグビットレジスタ毎に割り付けられた特定のアドレス番地を指定すると、特定フラグビットレジスタに接続したライトCSのみをアクティブにし、特定フラグビットレジスタだけライト動作を行い、それ以外のフラグビットレジスタにはライト動作を行わない構成としている。
【0034】
これによって、コントローラ3が割込み要因信号フラグレジスタ1をリード動作した後からライト動作するまでの間に、いつ発生するかわからない非同期系の割込み要因信号INTa〜INThが発生しても、その割り込み要因信号がフラグとして割込み要因信号フラグレジスタ1に保持され、確実に割込み要因信号の発生をコントローラ3が把握可能できる。
【0035】
上記動作を実現するアドレスデコーダ2aとして本実施形態では、リード信号WCSは共通に各AND回路4a〜4hに入力するとともに、ライト信号RCSは各フラグビットレジスタ1a〜1h毎に独立して設けた書込制御線108a〜108hを介して、書込みを行う所望のフラグビットレジスタに接続された書込制御線のみをアクティブとすることで書込みを行う構成としている。
尚、本実施形態では、割込み要因信号INTa〜INThは“L”アクティブ、リード信号RCSは“H”アクティブ、ライト信号WCSは“H”アクティブとしている。
【0036】
図2は、アドレスデコーダ2aの詳細なブロック図を示している。
アドレスデコーダ2aは、フラグビットレジスタのアドレス番地より、フラグビットレジスタに対応したデコードアドレス信号(出力信号線21a〜21hのいづれかをアクティブ“H”)を出力するデコーダ21と、全デコードアドレス信号の論理和をとるORゲート22と、該ORゲート22の出力信号とI/Oリード信号の論理積をとるANDゲート23と、前記各デコードアドレス信号の出力信号線21a〜21h毎にI/Oライト信号と倫理積を求めるANDゲート24a〜24hが設けら、その出力が書込制御線108a〜108hとなっている。
【0037】
前記ANDゲート23の出力信号がリード信号RCSとなり、前記ANDゲート24a〜24hの出力信号がアドレスデータに対応するフラグビットレジスタに出力されるライト信号WSCとなる。
【0038】
アドレスデコーダ2aは、上記構成により、フラグビットレジスタに対応したアドレスをコントローラ3が指定すると、割込み要因信号フラグレジスタ1に対してライト時は、書込みを希望する特定のフラグビットレジスタに接続したライト信号WCSのみがアクティブになり、割込み要因信号フラグレジスタ1に対してリード時は、全てのフラグビットレジスタに接続した単一のリード信号RCSのみがアクティブになる。
【0039】
次に、本発明の実施形態にかかる割込み要因信号フラグレジスタ回路の全体の動作を、図1の回路図および図3のフローチャートを参照しつつ説明する。
割込み要因信号INTa〜INThが発生すると、AND回路3を通じて割込要因発生信号INTがコントローラ3に通知され、また、割込み要因信号に対応するフラグビットレジスタ1a〜1hに“H”が保持される。
【0040】
コントローラ3は、割込要因発生信号INTを受け取ると(S1)、割込み要因信号フラグレジスタ1に割り付けられたアドレスデータと、I/Oリード信号を出力して、アドレスデコーダ2によって、リード信号CSをアクティブ“H”にして、AND回路4a〜4hを通してフラグビットレジスタ1a〜1hの出力信号DOUTを全て出力データバス101に出力させ、割込み要因信号フラグレジスタ1の内容を読み出す(S2)。
【0041】
割込み要因信号フラグレジスタ1の内容は、割込みの発生があったフラグビットは、”H”、その他のフラグビットは”L”状態になっており、コントローラ3が出力データバス101をリードすることにより、割込み要因信号フラグレジスタ1の状態を把握できる。
【0042】
コントローラ3は、割込み要因の認識した後、どの割り込み要因に起因する処理を行うか決定する(S4)。更に、コントローラ3はその後行う処理に対応するフラグビットレジスタの内容をクリアするために、該特定のフラグビットレジスタに“ゼロ”信号をライトする(S7)。
【0043】
コントローラ3は、前記した特定のフラグビットレジスタをライトするために、その特定のフラグビットレジスタに割り付けられたアドレス信号と、I/Oライト信号と、及び書込み内容である“ゼロ”入力データとを出力する。
アドレス信号とI/Oライト信号を受けたアドレスデコーダ2は、アドレス信号に対応したライト信号WCSだけを“H”アクティブにするので、該等するフラグビットレジスタのみに入力データがライトされる。特定のフラグビットレジスタ以外のフラグビットレジスタは、ライト信号WCSが非アクティブのため、入力データのライトは行われず、状態が保持される。
また、上記処理(図3)では、従来の処理(図8)のS3とS5の処理が無くなり、処理時間の短縮や、コントローラのプログラムの簡素化に役立つ。
【0044】
なお、前記の実施形態では本発明の好適例を説明したが、本発明はこれに限定されないことはもちろんである。
例えば、アドレスデコーラ2aの構成は、図2に示したものに限定されず、各フラグビットレジスタ毎にライト信号WCSを設け、特定のライト信号WCSだけをアクティブ状態にできる回路構成であればよい。
【0045】
【発明の効果】
以上説明したように本発明によれば、制御部側では、フラグビットレジスタに割り付けられたアドレスを指定することにより、割込み要因信号フラグレジスタをリードするときは、フラグビットすべてをリードすることができ、ライト(クリア)するときは、特定のフラグビットだけをクリアすることができる。
これにより、制御部が割込み要因信号フラグレジスタをリード動作した後から割込み要因信号フラグレジスタをクリア動作するまでの間に、いつ発生するかわからない非同期系の割込み要因信号が発生しても、その割り込み要因信号がフラグとして割込み要因信号フラグレジスタに保持され、その後の制御部による割込み要因信号フラグレジスタへのクリア動作によっても保持されたフラグが消されてしまうことが無くなり、確実に割込み要因信号の発生を制御部が把握できる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る割込み要因信号フラグレジスタ回路の説明図である。
【図2】本発明の実施形態に係るアドレスデコーダの説明図である。
【図3】本発明の実施形態に係る割込み要因信号フラグレジスタ回路のフローチャートである。
【図4】従来例1の割込み要因信号フラグレジスタ回路の説明図である。
【図5】フラグビットレジスタの説明図である。
【図6】セレクタ回路の説明図である。
【図7】従来例1のアドレスデコーダの説明図である。
【図8】従来例1の割込み要因信号フラグレジスタ回路のフローチャートである。
【符号の説明】
1 フラグレジスタ
1a〜1h フラグビットレジスタ
2a アドレスデコーダ
3 コントローラ
4a〜4h 2入力AND回路
100 入力データバス
101 出力データバス
102 アドレスバス
103 I/Oリード信号線
104 I/Oライト信号線
107 読込制御線
INTa〜INTh 割り込み要因信号
108a〜108h 書込制御線
21 デコーダ
21a〜21h デコードアドレス信号
24a〜24h 2入力AND回路[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an interrupt factor signal flag register circuit, and more particularly to a device for detecting and clearing an asynchronous interrupt factor signal incorporated in an LSI (Large Scale Integrated Circuit).
[0002]
[Prior art]
FIG. 4 is a schematic block diagram of a first conventional interrupt factor signal flag register circuit (device).
The factor signal flag register circuit includes a
[0003]
Further, the
Note that the number of flag bit registers in the
[0004]
As shown in FIG. 4, each of the flag bit registers 1a to 1h has an interrupt request line 106a to 106h for notifying an interrupt generation signal INTa to INTh, and an input data bus for transmitting input data sent from the
[0005]
An output terminal DOUT for outputting data in the
[0006]
The
[0007]
Also, the interrupt request lines 106a to 106h for notifying the interrupt factor generation signals INTa to INTTh are provided via the
[0008]
FIG. 5 shows an example of a block diagram for realizing the operation of the flag bit registers 1a to 1h.
The flag bit register includes a
[0009]
That is, the
The data input terminal (1) receives a feedback output signal from the D flip-flop 14, and the terminal (2) receives an interrupt factor signal INTx (x is any one of 0 to 7; Similarly, the inverted interrupt factor signal / INTx inverted through the
The switching control terminal A is connected to an interrupt factor signal INTx from the terminal INTRFG, and the switching control terminal B receives the input signal of the WCS terminal after being inverted by the
[0010]
As described above, the D flip-flop 14 uses the output signal of the
[0011]
The selection operation of the
First, when "0" is input to the control terminal A, the terminal (2) is selectively connected to the output terminal (4).
When "1" is input to the control terminal A, the control terminal B is further referred to. When "0" is input to the control terminal B, the terminal (3) is connected to the output terminal (4). Select connection.
When "1" is input to the control terminal A and "1" is input to the control terminal B, the terminal (1) is selectively connected to the output terminal (4).
[0012]
FIG. 6 shows an example of a logic circuit for realizing the selecting operation of the
An
[0013]
According to the configuration of the
[0014]
Conversely, when the interrupt factor signal INTx from the terminal INTRFG is “1” (when no interrupt factor signal is generated) and the write signal WSC is “1”, the
For example, when the data signal is "0", "0" is written to the D flip-flop 14, and the D flip-flop 14 becomes "0".
[0015]
When the interrupt factor signal INTx from the terminal INTRFG is “1” (when no interrupt factor signal is generated) and when the write signal WCS is “0”, the control signal B of the
Therefore, the value of the D flip-flop 14 does not change, and the state of DOUT is maintained.
[0016]
A single address is assigned to the interrupt factor
[0017]
Next, the configuration of the
FIG. 7 is a block diagram of the
The address signal transmitted by the
Therefore, the
[0018]
Next, the process from detection of an interrupt factor to clearing of the flag register will be described with reference to the flowchart of FIG.
When detecting the interrupt factor, when the
[0019]
The content of the interrupt factor
[0020]
After recognizing the interrupt factor, the
[0021]
The means by which the
[0022]
In the above-described series of interrupt factor detection and clear processing, the content of the interrupt factor
In other words, if there are two interrupt cause signals read by the
[0023]
A second prior art interrupt factor signal flag register circuit (device) is disclosed in Japanese Unexamined Patent Application Publication No. Hei 8-44572. When an interrupt factor register is read by a higher-level device (such as a controller). Then, the register is simultaneously reset.
[0024]
[Problems to be solved by the invention]
However, in the first conventional interrupt detection means, since the
[0025]
Further, in the second conventional example, when a plurality of interrupt causes occur, all of them are cleared at the time of reading once, so that the controller cannot control the clearing of the interrupt cause signal flag register, and the controller becomes an interrupt cause. If interrupt factors occur one after another during the process that caused the problem, it is necessary to hold the data of the interrupt factor signal flag register in the controller each time, and the scale of the hardware also increases. was there.
[0026]
The present invention has been made in order to solve the above-mentioned problem, and it is intended that when the interrupt occurs after the controller reads the interrupt factor signal flag register and writes the interrupt factor signal flag register, Even if an unknown asynchronous interrupt cause signal is generated, the interrupt cause signal is held in the interrupt cause signal flag register as a flag, and the flag held by a subsequent write operation by the controller to the interrupt cause signal flag register is cleared. An object of the present invention is to provide an interrupt factor signal flag register device which can control the generation of an interrupt factor signal without being performed.
[0027]
[Means for Solving the Problems]
In the present invention, in order to achieve the above object, a plurality of flag bit registers that hold a pulse generated by an interrupt factor signal as flag bits, a flag register having an address assigned to each flag bit register,
Controlling the flag bits held in each flag bit register in the flag register based on an address signal of an address related to the flag register transmitted from the control unit and a read signal instructing reading of the flag bit in the flag register Flag reading means for transmitting to the unit;
An address signal of a flag bit register holding a processing flag bit corresponding to or corresponding to the interrupt processing corresponding to the control unit in the flag bits transmitted to the control unit, and instructing clearing of the flag bit to the flag register Flag reset means for resetting only the flag bit register holding the processing flag bit based on the write signal to be processed,
The flag reset means has an output terminal for each flag bit register, and activates only an output terminal of the flag bit register corresponding to an input address signal. The decoder resets the write signal for each output terminal of the decoder. AND gate that takes the logical product of
The present invention is characterized in that each AND gate output signal is connected to a flag bit register corresponding to an address signal.
[0029]
According to the present invention, in order to read a flag bit of a flag register, when reading by specifying an address from the control unit, regardless of which address address is assigned to each flag bit register, The state of all flag bit registers can be read by a single read operation.
Thereafter, when the control unit specifies the address from the control unit and writes "zero" to clear the flag bit of the flag bit register holding the processing flag bit corresponding to or corresponding to the interrupt processing, When the control unit designates a specific address assigned to each flag bit register, the write operation is performed only on the specific flag bit of the flag register, and the write operation is not performed on the other flag bit registers.
[0030]
As a result, even if an asynchronous interrupt factor signal is generated from the controller which performs the read operation of the interrupt factor signal flag register to the write operation of the interrupt factor signal flag register, it is not possible to determine when the asynchronous interrupt factor signal occurs. The cause signal is held as a flag in the interrupt cause signal flag register, and the held flag is not cleared by a subsequent write operation to the interrupt cause signal flag register by the control unit, so that the interrupt cause signal can be generated reliably. Can be grasped by the controller.
[0031]
Further, only the output terminal of the flag bit register having the corresponding processing flag bit from the address signal input by the decoder becomes active, and the output terminals of the other flag bit registers become inactive.
Therefore, of the AND gates provided for each output terminal of the decoder, only the output of the AND gate corresponding to the flag bit register having the processing flag bit becomes active, and only the corresponding flag bit register can be cleared.
[0032]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The same components as those described above are denoted by the same reference numerals, and description thereof will be omitted.
FIG. 1 is a block diagram of an interrupt factor signal flag register circuit according to an embodiment of the present invention. The configuration of the address decoder 2a is different from that of the first conventional example (FIG. 4).
[0033]
When reading the flag bit registers 1a to 1h in the
[0034]
As a result, even if the asynchronous interrupt factor signals INTa to INTTh which are not known when they occur during the period after the
[0035]
In this embodiment, as the address decoder 2a that realizes the above operation, the read signal WCS is commonly input to each of the AND circuits 4a to 4h, and the write signal RCS is independently provided for each of the flag bit registers 1a to 1h. Write is performed by activating only the write control line connected to the desired flag bit register for writing via the write control lines 108a to 108h.
In this embodiment, the interrupt factor signals INTa to INTh are "L" active, the read signal RCS is "H" active, and the write signal WCS is "H" active.
[0036]
FIG. 2 shows a detailed block diagram of the address decoder 2a.
The address decoder 2a outputs a decode address signal (one of the output signal lines 21a to 21h is active "H") corresponding to the flag bit register from the address of the flag bit register, and the logic of all the decode address signals. An OR
[0037]
The output signal of the AND
[0038]
When the
[0039]
Next, the overall operation of the interrupt factor signal flag register circuit according to the embodiment of the present invention will be described with reference to the circuit diagram of FIG. 1 and the flowchart of FIG.
When the interrupt factor signals INTa to INTh are generated, the interrupt factor signal INT is notified to the
[0040]
When the
[0041]
The contents of the interrupt factor
[0042]
After recognizing the interrupt factor, the
[0043]
The
The
Further, in the above processing (FIG. 3), the processing of S3 and S5 of the conventional processing (FIG. 8) is eliminated, which is useful for shortening the processing time and simplifying the program of the controller.
[0044]
Although the preferred embodiment of the present invention has been described in the above embodiment, the present invention is of course not limited to this.
For example, the configuration of the address decoder 2a is not limited to the configuration shown in FIG. 2, but may be any circuit configuration that can provide a write signal WCS for each flag bit register and activate only a specific write signal WCS. .
[0045]
【The invention's effect】
As described above, according to the present invention, when reading the interrupt factor signal flag register, the control unit can read all the flag bits by specifying the address assigned to the flag bit register. When writing (clearing), only a specific flag bit can be cleared.
As a result, even if an asynchronous interrupt factor signal is generated from the time when the control unit reads the interrupt factor signal flag register and clears the interrupt factor signal flag register, even if an asynchronous interrupt factor signal is generated, the interrupt is not interrupted. The cause signal is held as a flag in the interrupt cause signal flag register, and the held flag is not erased by the subsequent clearing operation of the interrupt cause signal flag register by the control unit, so that the interrupt cause signal is reliably generated. Can be grasped by the control unit.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram of an interrupt factor signal flag register circuit according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram of an address decoder according to the embodiment of the present invention.
FIG. 3 is a flowchart of an interrupt factor signal flag register circuit according to the embodiment of the present invention.
FIG. 4 is an explanatory diagram of an interrupt factor signal flag register circuit of Conventional Example 1.
FIG. 5 is an explanatory diagram of a flag bit register.
FIG. 6 is an explanatory diagram of a selector circuit.
FIG. 7 is an explanatory diagram of an address decoder of Conventional Example 1.
FIG. 8 is a flowchart of an interrupt factor signal flag register circuit according to Conventional Example 1.
[Explanation of symbols]
1 flag register 1a-1h flag bit register
Claims (1)
制御部から送信された、前記フラグレジスタに関するアドレスのアドレス信号と、該フラグレジスタのフラグビットの読込みを指示するリード信号とに基づき、前記フラグレジスタ内の各フラグビットレジスタに保持したフラグビットを制御部に送信するフラグ読出し手段と、
前記制御部に送信されたフラグビット中で該制御部が対応する又は対応した割込処理に相当する処理フラグビットを保持したフラグビットレジスタのアドレス信号と、フラグレジスタへのフラグビットのクリアを指示するライト信号とに基づき、該処理フラグビットを保持したフラグビットレジスタのみをリセットするフラグリセット手段とを含み、
前記フラグリセット手段は、フラグビットレジスタ毎に出力端子を有し、入力するアドレス信号に対応するフラグビットレジスタの出力端子のみをアクティブにするデコーダと、このデコーダの各出力端子毎に前記ライト信号との論理積をとるANDゲートとを含み、
前記ANDゲート出力信号毎にアドレス信号に相当するフラグビットレジスタに接続することを特徴とする割込み要因信号フラグレジスタ装置。 A plurality of flag bit registers for holding generated pulses of the interrupt factor signal as flag bits, and a flag register having an address assigned to each flag bit register;
Controlling the flag bits held in each flag bit register in the flag register based on an address signal of an address related to the flag register transmitted from the control unit and a read signal instructing reading of the flag bit in the flag register Flag reading means for transmitting to the unit;
An address signal of a flag bit register holding a processing flag bit corresponding to or corresponding to the interrupt processing corresponding to the control unit in the flag bits transmitted to the control unit, and instructing clearing of the flag bit to the flag register based on the write signal and which includes a flag resetting means for resetting only the flag bit register which holds the processing flag bits,
The flag reset means has an output terminal for each flag bit register, and activates only an output terminal of the flag bit register corresponding to an input address signal. The decoder resets the write signal for each output terminal of the decoder. AND gate that takes the logical product of
An interrupt factor signal flag register device, wherein each of the AND gate output signals is connected to a flag bit register corresponding to an address signal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35657799A JP3597744B2 (en) | 1999-12-15 | 1999-12-15 | Interrupt factor signal flag register device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35657799A JP3597744B2 (en) | 1999-12-15 | 1999-12-15 | Interrupt factor signal flag register device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001175483A JP2001175483A (en) | 2001-06-29 |
| JP3597744B2 true JP3597744B2 (en) | 2004-12-08 |
Family
ID=18449728
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP35657799A Expired - Fee Related JP3597744B2 (en) | 1999-12-15 | 1999-12-15 | Interrupt factor signal flag register device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3597744B2 (en) |
-
1999
- 1999-12-15 JP JP35657799A patent/JP3597744B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001175483A (en) | 2001-06-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5652536A (en) | Non-glitch clock switching circuit | |
| US5535376A (en) | Data processor having a timer circuit for performing a buffered pulse width modulation function and method therefor | |
| JP2658958B2 (en) | DMA controller | |
| JP3597744B2 (en) | Interrupt factor signal flag register device | |
| JPH08171504A (en) | Emulation device | |
| JP2990800B2 (en) | Interrupt processing device | |
| JP2600376B2 (en) | Memory controller | |
| JP2626125B2 (en) | Microcomputer | |
| JP3201439B2 (en) | Direct memory access control circuit | |
| JP2988139B2 (en) | Interrupt control device | |
| SU1636847A2 (en) | Data exchange device | |
| JPH05334099A (en) | Write circuit for state setting register | |
| JPH05334234A (en) | High speed dma transferring device | |
| JPH06187287A (en) | Bus control system | |
| JPH0934502A (en) | Controller | |
| JPS60113392A (en) | Semiconductor memory device | |
| JPH0589031A (en) | Microprocessor | |
| JPH07121483A (en) | Shared memory access control circuit | |
| JPS62296637A (en) | Data sink for serial data | |
| JPS62150434A (en) | Loop control type data processor | |
| JPS63180103A (en) | How to set signals for programmable controller input/output terminals | |
| JPS6246017B2 (en) | ||
| JPS59167764A (en) | Memory access system | |
| JPS6227846A (en) | Input and output channel | |
| JPS62175852A (en) | Register access device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040127 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040304 |
|
| 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: 20040907 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040909 |
|
| 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: 20080917 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080917 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090917 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090917 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100917 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |