JP4178699B2 - Microcomputer output device and microcomputer - Google Patents
Microcomputer output device and microcomputer Download PDFInfo
- Publication number
- JP4178699B2 JP4178699B2 JP33802599A JP33802599A JP4178699B2 JP 4178699 B2 JP4178699 B2 JP 4178699B2 JP 33802599 A JP33802599 A JP 33802599A JP 33802599 A JP33802599 A JP 33802599A JP 4178699 B2 JP4178699 B2 JP 4178699B2
- Authority
- JP
- Japan
- Prior art keywords
- register
- bit
- output
- value
- general
- 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
Landscapes
- Microcomputers (AREA)
Description
【0001】
【発明の属する技術分野】
マイクロコンピュータ用出力装置及び当該出力装置を備えたマイクロコンピュータに関する。
【0002】
【従来の技術】
従来から、CPUの制御に応じて周辺回路にデジタル信号を出力するためのマイクロコンピュータ用出力装置が知られている。これらの出力装置は、CPUの所定のアドレスにマップされたレジスタから構成されており、CPUがそのアドレスにデータを出力した際に、その出力されたデータをラッチし、ラッチしたデータを周辺回路に出力する。また、レジスタがラッチしたデータは、CPUの制御によってCPU内部の汎用レジスタ等に読み込むことができる。
【0003】
このような出力装置では、1つのアドレスに、複数のビットからなるレジスタを備えるのが一般的である。特に、汎用のワンチップマイコンでは、レジスタを所定のビット幅(例えば8ビット幅)に固定し、そのビット幅を持つレジスタの出力信号線を、チップの内部または外部の周辺回路と接続可能な出力ポートとして用意するのが一般的である。
【0004】
例えば、8ビット幅の出力ポートに周辺回路を接続する場合には、8ビット全体を使ってパラレル出力装置などを周辺回路として接続することができる。また、8ビット幅の出力ポートの一部を使って、種々の周辺装置を駆動するための周辺回路を接続することもできる。例えば8ビット中4ビットを使って7セグメントLEDを制御するような場合である。また、8ビット幅の出力ポートの中から1ビットのみを使って、例えばランプの点灯などを制御することもできる。
【0005】
このように出力ポートの信号線を介して制御対象の回路と接続されたレジスタの各ビットに、CPUが値(データ)を書き込むことで、制御対象を制御することができる。つまり、CPUは、所定のアドレスの所定のビットに値を書き込むことで、その書き込んだ値に対応するデジタル信号を、その所定のビットに対応する周辺回路に対して出力することができる。
【0006】
これらの出力装置の一例を図4を参照して説明する。
図4は、従来のメモリマップドI/O方式のマイクロコンピュータ用出力装置の構成例である。この出力装置は、図示しないCPUと共に1つのマイコンチップに集積されている。そして、この出力装置は、CPUのメモリ空間の複数のアドレス上に8ビット幅のレジスタを備えている。また、各レジスタの各ビットの出力は、マイコンチップの異なるピン(出力端子)にそれぞれ接続されており、これらのピンにはチップ外部の様々な周辺回路を接続することができる。
【0007】
図4のレジスタAは、ビット0からビット7の8ビット幅のレジスタであり、CPUのメモリ空間の0xFFFFFA00番地にマップされている。なお、「0x」は0xより後ろの数値が16進数であることを示し、「0b」は、0bより後ろの数値が2進数であることを示す。レジスタBはレジスタAと同様の構成であり、0xFFFFFA01番地にマップされている。また、レジスタC、レジスタD、・・・、レジスタXとそれぞれ異なるアドレスにマップされた図示しない複数のレジスタを備えている。
【0008】
そして、各レジスタの各ビットの出力は、マイコンチップのピンにそれぞれ接続されている。つまり、レジスタAのビット0は1ピン、ビット1は2ピン、ビット2は3ピン、ビット3は4ピン、ビット4は5ピン、ビット5は6ピン、ビット6は7ピン、ビット7は8ピンに接続されている。また、レジスタBのビット0は9ピン、ビット1は10ピン、ビット2は11ピン、ビット3は12ピン、ビット4は13ピン、ビット5は14ピン、ビット6は15ピン、ビット7は16ピンに接続されている。なお、その他のレジスタの各ビットの出力も順に異なるピンに接続されており、各レジスタに対応する複数の出力ポートを構成している。図4では、1〜8ピンである出力ポートA、9〜16ピンである出力ポートBの2つの出力ポートを図示している。
【0009】
このような構成によれば、例えば、CPUが0xFFFFFA00番地に0b11111111を書き込めば、マイコンチップの1ピンから8ピン(出力ポートAの各ピン)はすべてHiレベルとなり、0xFFFFFA00番地に0b00000000を出力すれば、出力ポートAの各ピンはすべてLowレベルとなる。
【0010】
このようにCPUは、各ピンを介して接続された周辺回路を制御することができる。また、各レジスタにラッチされたデータはCPUが読み出すこともできる。例えば、CPUが0xFFFFFA00番地に0b10101010を書き込んだ後に、0xFFFFFA00番地のデータをCPUの汎用レジスタに読み込めば、その汎用レジスタの値はレジスタAの値である0b10101010となる。
【0011】
レジスタへの書き込みの際には、ビット0からビット7を同時に書き換えてもよいが、CPUがアドレス上の特定のビットを直接制御できるタイプのものであれば、レジスタ上の特定の1ビットのみを変更することもできる。例えば、8ピンにLEDが接続されているとすれば、このLEDを点灯させるためにCPUは、0xFFFFFA00番地のビット7のみを0から1に書き換えればよい。すると8ピンの電圧レベルが、例えばLowレベルからHiレベルに変化し、LEDを消灯状態から点灯状態に変化させることができる。
【0012】
【発明が解決しようとする課題】
しかしながら、例えば一般的なRISCを採用したCPUのように、CPUのアドレス上に配置されたレジスタの特定のビットを直接制御できないCPUがある。このようなCPUで、そのレジスタの特定のビットに値を書き込むためには、▲1▼CPUの汎用レジスタ上へそのアドレスのレジスタの値を読み込み(リード)、▲2▼CPUの汎用レジスタ上でそのビットを変更し(モディファイ)、▲3▼CPUの汎用レジスタの値をそのアドレスのレジスタへ書き込む(ライト)といったリード・モディファイ・ライトの操作が必要となる。
【0013】
このとき、複数の処理ルーチンが同一のレジスタにデータを書き込むと、タイミング多重アクセスが発生することになり、出力に異常が発生することがある。
この一例を図5を参照して説明する。
図5は、レジスタの多重アクセスによる出力異常の例である。
【0014】
図5のレジスタAは前述の図4のレジスタAに相当する。図4の1ピンにはランプ、2ピンにはソレノイド1、4ピンにはヒータ1、5ピンにはヒータ2、6ピンにはソレノイド2、7ピンにはソレノイド3、8ピンにはソレノイド4を駆動する駆動回路が周辺回路として接続されている。なお2ピンは未使用である。よって、図5に示すようにレジスタAはビット0がランプ、ビット1がソレノイド1、ビット3がヒータ1、ビット4がヒータ2、ビット5がソレノイド2、ビット6がソレノイド3、ビット7がソレノイド4用のビットとなる。なお、3ピンは未使用となる。
【0015】
これらの制御対象の装置のうちソレノイド1〜ソレノイド4は必ず4ms毎に駆動する必要があるが、ランプ、ヒータ1、ヒータ2は特に時間要求等はない。そこで、CPUによるレジスタAの制御は、プライオリティが相対的に低いベースルーチンと、プライオリティが相対的に高いタイマ割込みルーチンの2つのルーチンの実行によって行われる。ベースルーチンは、ランプ、ヒータ1、ヒータ2の各ビットにアクセスし、タイマ割込みルーチンはソレノイド1、ソレノイド2、ソレノイド3、ソレノイド4の各ビットにアクセスする。タイマ割込みの時間は4msとする。
【0016】
レジスタAにアクセスするCPUは、一般的なRISCを採用したCPUであり、レジスタの特定のビットを直接操作することができないタイプのものである。よって、各ルーチンにおいてレジスタAに書き込む際には、前述のリード・モディファイ・ライトの操作を行う必要がある。
【0017】
図5の例は、ベースルーチンS1、S2、S3でリード・モディファイ・ライトの操作によってランプをONにする処理を行っている最中に、タイマ割込みが発生し、タイマ割込みルーチンに処理が移行する場合の処理を示すものである。なお、タイマ割込みルーチンでは、S11、S12、S13によって、ソレノイド1をONにする処理を行う。
【0018】
以下に、この時のCPUの動作、CPUの汎用レジスタの値、レジスタAの値を説明する。なお、レジスタAの初期値は0b00000000であり、すべての装置はOFF状態である。また、以下、「汎用レジスタ」はCPUの汎用レジスタを示す。また、図5において右側の縦一列のレジスタはCPUの汎用レジスタの値を表し、左側の縦一列のレジスタはレジスタAの値を示したものである。
【0019】
S1では、レジスタAの値を汎用レジスタへリードする。よって、汎用レジスタの値は0b00000000となる。
S2では、汎用レジスタのランプのビットを1にする。つまり、ビット0の値を1へモディファイする。よって、汎用レジスタの値は0b00000001となる。
【0020】
ここで、タイマ割込みが発生すると、CPUでの処理は、ベースルーチンから割込みルーチンへ移行する。この割込みルーチンでは汎用レジスタの値を退避して、S11〜S13の処理を行う。
S11では、レジスタAの値を汎用レジスタへリードする。このとき、レジスタAの値は、0b00000000のままであるため、リードした汎用レジスタの値も0b00000000となる。
【0021】
S12では、汎用レジスタのソレノイド1のビットを1にする。つまり、ビット1を1へモディファイする。よって、汎用レジスタの値は、0b00000010となる。
S13では、汎用レジスタの値をレジスタAへライトする。このライトによって、レジスタAの値は0b00000010となり、2ピンがHiレベルとなって、ソレノイド1がONになる。
【0022】
続いて割込みルーチンからベースルーチンに復帰するために、退避した汎用レジスタの値を復帰する。復帰した汎用レジスタの値はS2での値となり0b00000001となる。そして、処理はベースルーチンへ復帰する。
S3では、汎用レジスタの値をレジスタAへライトする。汎用レジスタの値は0b00000001であるので、レジスタAの値は0b00000001となる。よって、1ピンがHiレベルとなりランプがONになると同時に、2ピンがLowレベルとなりソレノイド1がOFFとなる。
【0023】
そのため、タイマ割込みルーチンでソレノイド1をONにしたはずが、S3でOFFになってしまうという問題が発生する。正しくは、レジスタの値が0b00000011となり、ソレノイド1とランプは共にONになるはずだからである。なお、このような問題はS1の直後にタイマ割込みが発生した場合にも、同様に発生する。
【0024】
この問題を回避するためには、ベースルーチンとタイマ割込みルーチンがアクセスするレジスタを別のレジスタにすればよい。例えば、レジスタAをベースルーチン用、レジスタBをタイマ割込みルーチン用とする。このようにすれば、上述の問題は起こらない。しかし、マイコンチップのピンの利用効率が悪くなるという問題がある。また、マイコンチップのピン数の制限によりこのような配置ができないことが多い。例えば、レジスタAをベースルーチン用、レジスタBをタイマ割込みルーチン用とした場合、ベースルーチン用に使用されるビットはレジスタAのランプ、ヒータ1、ヒータ2に対応する3ビットのみであり、タイマ割込みルーチンに使用されるビットは、ソレノイド1〜4の4ビットのみである。よって、レジスタA、レジスタBからの出力端子である1ピンから16ピンの16本のピンの中で使用されるピンはわずか7本となり、ピンの利用効率が悪くなる。また、そもそもレジスタが1つしかない出力装置ではこのようなことはできない。
【0025】
よって、通常は、実行レベル毎に1つの出力ポートを占有できない場合が多く、多重アクセスが発生する場合でも1つのポートに複数の実行レベルから制御される装置を割り当てざるを得ない。
そこで、以上のような多重アクセスの問題を回避するために、リード・モディファイ・ライトの期間中、割込みを禁止してレジスタへのアクセスを排他制御する方法がある。この回避方法について図6を参照して説明する。
【0026】
図6は、図5における問題点を解決するために、図5の処理にソフトウェアの割込み禁止・割込み解除による対策を行った例である。
図5の処理との相違点は、図5のベースルーチンの処理期間(S1、S2、S3)中の割込みを禁止することと、タイマ割込みルーチンの処理期間(S11、S12、S13)中の割込みを禁止することである。
【0027】
以下、図6を参照して図5を参照して説明した多重アクセスの問題が発生しないことを確認する。
図6のレジスタAの構成、レジスタAの初期値、各ルーチンでの制御対象、各レジスタの値の示し方等は図5と同様である。
【0028】
S20では、割込み禁止を掛ける(DI)。
S21では、レジスタAの値を汎用レジスタへリードする。よって、汎用レジスタの値は0b00000000となる。
S22では、汎用レジスタのランプのビットを1にする。つまり、汎用レジスタのビット0の値を1へモディファイする。よって、汎用レジスタの値は0b00000001となる。
【0029】
ここで、タイマ割込みが発生する。しかし、割込み禁止状態のため、割込み禁止が解除されるまでタイマ割込みルーチンの実行は保留される。よって、中断されることなくベースルーチンの処理は続行される。
S23では、汎用レジスタの値をレジスタAへライトする。汎用レジスタの値は0b00000001であるので、レジスタAの値は0b00000001となり、ランプがONになる。
【0030】
S24では、割込み禁止を解除する(EI)。
ここで割込み禁止が解除されたことにより、CPUでの処理はタイマ割込みルーチンに移行する。
この割込みルーチンでは汎用レジスタの値を退避して、S30〜S34の処理を行う。
【0031】
S30では、割込み禁止を掛ける(DI)。
S31では、レジスタAの値を汎用レジスタへリードする。このとき、レジスタAの値は、0b00000001であるため、リードした汎用レジスタの値も0b00000001となる。
【0032】
S32では、汎用レジスタのソレノイド1のビットを1にする。つまり、汎用レジスタのビット1を1へモディファイする。よって、汎用レジスタの値は0b00000011になる。
S33では、汎用レジスタの値をレジスタAへライトする。このライトによって、ソレノイド1がONになる。レジスタAにライトされた値は、0b00000011となるので、ランプもONのままとなり、正しい動作が行われていることが分かる。
【0033】
S34では割込み禁止を解除する。よって、割込み禁止が解除された際のレジスタAの値は、S33での値のままである。そのため、最終的にランプとソレノイドが共にON状態であり、正しい動作が行われていることが分かる。
このようにリード・モディファイ・ライトの期間中の割込みを禁止し、レジスタへのアクセスを排他制御することによって、前述の多重アクセスの問題を防ぐことができる。
【0034】
なお、タイマー割込みルーチンのS30及びS34の割込み禁止/解除命令は、この例の範囲内であれば無くても構わない。しかし、将来の拡張・変更や、割込み禁止/解除命令が正しく挿入されているかのチェックを容易にする目的で挿入しておくのが一般的である。例えば、将来、図4の3ピンに新たな制御対象を接続し、レジスタAの未使用ビットであるビット2を最上位の割込みルーチンから制御するように割り当てる場合などには、S30及びS34の割込み禁止/解除命令が必要となるからである。また、書き込み箇所で一律に割込み禁止とすることで、割込み禁止/解除命令を挿入し忘れているのか、それとも割込み禁止/解除命令が必要ない箇所なのかをチェックする必要がなくなり、チェックが容易になるからである。
【0035】
以上のような対策を行う場合には、割り込み禁止/解除の命令をレジスタへの書き込み処理毎に挿入する必要がある。
そのため、割り込み禁止/解除の命令を追加する分、オブジェクトコードのサイズが増大する。そして、オブジェクトコードのサイズが増大すると、それを格納するためのROMやRAMなどのメモリサイズが増大しコストが上昇する。
【0036】
また、割込み禁止、割込み解除の命令を実行するためには所定の時間を要するため、処理時間も増加する。図7に、図6の割込み禁止/解除命令を挿入する場合と、図5の割込み禁止/解除命令を挿入しない場合の実行時間の違いを示す。図7の(a)は、前述の図5の割込み禁止/解除命令を挿入しない場合(対策前)の実行時間を示す図である。一方、図7の(b)は、前述の図6の割込み禁止/解除命令を挿入した場合(対策後)の実行時間を示す図である。この図に示すように、(b)の対策後の実行時間は(a)の対策前の実行時間に比べ、S20、S24とS30、S34の割り込み禁止/解除命令の実行時間分だけ余分に実行時間を必要とする。
【0037】
このようなオブジェクトコードサイズの増加、処理時間の増加は、例えば制御用のマイクロコンピュータ等では、無視できない場合がある。なぜなら、これらのマイクロコンピュータ等での処理においては、機器を制御するためにアドレス空間に配置されたレジスタへのアクセスが頻繁に発生するからである。そのため、割り込み禁止/解除の命令を随所に挿入する必要があり、また追加した命令は頻繁に実行されることとなる。
【0038】
さらに、この様にソフトウェアによる対策を実施した場合、1カ所でもその対策もれがあるとレジスタへのアクセスの排他制御がされなくなるため、ソフトウェアを変更するたびに、割込み禁止/解除命令が適切に挿入されているかをチェックをする必要が生じる。そして、その作業工数がこれらのレジスタへの書き込み箇所の数に比例して増大するという問題が発生する。
【0039】
そこで本発明は、ソフトウェアによる排他制御を必要としないマイクロコンピュータ用出力装置を提供することを目的とする。
【0040】
【課題を解決するための手段及び発明の効果】
上述した問題点を解決するためになされた請求項1に記載のマイクロコンピュータ用出力装置は、所定のアドレスに配置され、このアドレスを指定することでCPUによるアクセスが可能なレジスタと、CPUによりレジスタに書き込まれた値を該レジスタの各ビットにそれぞれ対応する複数の信号線を介してデジタル信号として出力する出力ポートとを備えている。そして、出力ポートの各信号線はそれぞれ異なる論理和回路の出力部と接続されている。
【0041】
一方、この1つの論理和回路には、複数の入力部があり、これらの入力部は、それぞれ異なるアドレスに配置された所定のビット幅を持つレジスタの同一ビット番号の出力部と接続されている。そして、それぞれの論理和回路の入力部はすべてこのように構成されている。さらに、各レジスタは、CPUが1つの出力ポートを共有する複数のルーチンを実行する際に、各ルーチンによってそれぞれ別のアドレスに配置されたレジスタにアクセスされる。
【0042】
なお、アドレスに配置されたレジスタとは、例えばCPUなどの制御装置がアドレスを指定してアクセス可能なレジスタを意味する。また、論理和回路とは、複数の入力信号の論理和を取り、その論理和を取った信号を出力するものであればどのようなものでもよい。例えば、ワイヤードOR回路でもよい。
【0043】
このような構成によれば、例えば、CPUが異なるアドレスのいずれか1つのレジスタ上のビットの値を1にすることで、論理和回路を介して出力される出力ポートの信号線の値を1にすることができる。
よって、前述のよう多重アクセスが発生する場合には、多重アクセスの発生する各ルーチンがそれぞれ別のアドレスに配置されたレジスタにアクセスすれば、多重アクセスは発生しない。しかも、前述の論理和回路によって、常に各レジスタの値の論理和を取った値が出力ポートに出力される。そのため、ソフトウェアによる割込み禁止/解除の対策を行わなくても、期待通りの値が出力ポートに出力される。
【0044】
よって、割込み禁止/解除命令を追加する必要が無くなり、オブジェクトコードサイズを小さくすることができる。従って、マイコンの選択時には、相対的に少ないメモリ容量のマイコンを選択することができ、コストを抑えることができる。
【0045】
また、割込み禁止/解除命令を実行する必要がないので、処理時間が短縮される。しかも、ソフトウェアを変更するたびに、割込み禁止/解除命令が適切に挿入されているか否かのチェックを行う必要がなくなり、ソフトウェアの作成・保守の工数を大幅に削減することができる。
【0046】
さらに、例えば前述の図5を参照して説明したベースルーチンと割込みルーチンのように、各ルーチンのアクセスするレジスタのビット番号が重複しないように割り当てられている既存のソフトウェアを、本出力装置で動作させるためには、各ルーチン毎にアクセスするレジスタのアドレスを変更するだけでよい。つまり、ソフトウェアにおけるビットの割り当てを変更しなくてもよいため、既存のソフトウェア資源を有効利用をすることができる。
【0047】
ところで、請求項1に記載の発明では、各レジスタは所定のビット幅を持っている。この所定のビット幅は、例えば、8ビット幅や16ビット幅など、複数ビット幅である。また、各レジスタのビット幅は異なるものでもよい。例えば、アドレスの1番地にビット31〜ビット0の32ビット幅のレジスタを備え、2番地にビット31〜ビット0の32ビット幅のレジスタを備え、3番地にビット7〜ビット0の8ビット幅のレジスタを備えており、それぞれのレジスタの同一ビット番号の出力部を同じ論理和回路の入力部に接続し、これらの論理和回路の出力信号線を出力ポートとするような場合である。この場合、出力ポートは32本の信号線からなる。ビット31〜ビット8に対応する出力ポートの各信号線の論理値は、アドレス1番地とアドレス2番地の各レジスタの各ビットの論理和を取った値となり、ビット7〜ビット0についてはアドレス1番地とアドレス2番地とアドレス3番地の各レジスタの各ビットの論理和を取った値となる。
【0048】
このようにすれば、例えばCPUの動作モードによってアクセス可能なビット幅が変化するような場合等にも、一つの出力ポートを異なる動作モードで実行するルーチンで共有することができる。また、後述のように出力ポートをマイコンチップ(パッケージ)の外部に出力する場合には、空き端子のない効率のよいピン割付ができる。
【0049】
そして、各レジスタのビット幅は、請求項2のように、同一であるようにしてもよい。このようにすれば、汎用の出力装置として利用することができ、ソフト側でアクセスするレジスタのビットの割り当てを自由に変えることができる。つまり、すべてのレジスタのビット幅が同一であるため、例えば、制御対象の制御処理を実行プライオリティの違うルーチンに移動する場合には、アクセスするレジスタを変更するだけでよい。特に組み込みシステムでは、制御対象が多数あり、様々な用途で使用されるため、このような汎用性があることが要求される。
【0050】
そして、本出力装置は1つのチップに集積するとよい。この場合、本出力装置に接続される回路は、チップの内部または外部に存在する。つまり、出力ポートに接続される回路がチップの内部に存在する場合とチップの外部に存在する場合がある。チップの内部に存在する場合には、出力ポートの各信号線はチップ内の各回路に接続される。一方、チップの外部に存在する場合には、請求項3に示すように、出力ポートの各信号線はチップのピンに接続するとよい。このようにすれば、チップの外部の回路を制御することができる。また、例えば前述のような多重アクセスの問題を回避するために各実行レベル毎に1つの出力ポートを占有してしまい、マイコンチップの出力端子の利用効率が悪くなることもない。よって、空き端子のない効率のよいピン割付が可能となる。
【0051】
また、本出力装置を1つのチップに集積する場合には、出力装置単体をチップに集積してもよいし、出力装置と出力装置に接続された周辺回路とをチップに集積してもよい。また、請求項4に示すように出力装置のレジスタに書き込み可能なCPUとともに出力装置を1つのチップに集積してもよい。このようにすれば、前述の特徴を備えた出力ポートを持つマイクロコンピュータとなる。
【0052】
【発明の実施の形態】
以下、本発明が適用された実施例について図面を用いて説明する。なお、本発明の実施の形態は、下記の実施例に何ら限定されることなく、本発明の技術的範囲に属する限り種々の形態を採りうることは言うまでもない。
【0053】
以下、図1〜図3を参照して説明する。
図1は、本実施例における出力装置10のハードウェア構成を示し、図2は、周辺装置をONにする際の出力装置10の使用例と動作を示す。そして、図3は、周辺装置をOFFにする際の出力装置10の使用例と動作を示す。
【0054】
図1の本実施例のマイクロコンピュータ用出力装置10は、図示しないCPUとともに、マイコンチップ20に集積されている。
図1のA−1レジスタ11は図4を参照して説明した前述のレジスタAと同様の構成である。また、A−2レジスタ12は図4を参照して説明した前述のレジスタBと同様の構成である。よって、説明は省略する。
【0055】
ただし、A−1レジスタ11、A−2レジスタ12の各出力部は、図4のようにそのままマイコンチップのピンに接続されるのではなく、図1に示すように、A−1レジスタ11とA−2レジスタ12の各ビット番号毎にORゲート群13の1つのORゲートに接続され、そのORゲート群13の出力が信号線群15を介して各ピンに接続される。具体的には、A−1レジスタ11のビット0の出力部17aとA−2レジスタ12のビット0の出力部18aとがORゲート13aの入力部19a,19bにそれぞれ接続され、このORゲート13aの出力部からの信号線15aがマイコンチップ20の1ピンに接続される。同様に、A−1レジスタ11のビット1の出力部17bとA−2レジスタ12のビット1の出力部18bとがORゲート13bの入力部19c,19dにそれぞれ接続され、このORゲート13bの出力部からの信号線15bがマイコンチップ20の2ピンに接続される。以下、図1に示すように、各レジスタのビット7まで同様の回路が構成される。
【0056】
つまり、A−1レジスタ11のビットnとA−2レジスタ12のビットnとがORゲート群13の1つのORゲートの入力部に接続されており、そのORゲートの出力部からの信号線が第一出力ポート14としてマイコンチップ20の(n+1)ピンに接続されている。なお、本実施例ではnは0から7となる。
【0057】
そして、図4の例と同様に、図1の1ピンにはランプ、2ピンにはソレノイド1、4ピンにはヒータ1、5ピンにはヒータ2、6ピンにはソレノイド2、7ピンにはソレノイド3、8ピンにはソレノイド4を駆動する駆動回路が周辺回路として接続されている。なお2ピンは未使用である。
【0058】
よって、A−1レジスタ11、A−2レジスタ12はそれぞれビット0がランプ、ビット1がソレノイド1、ビット2は未使用、ビット3がヒータ1、ビット4がヒータ2、ビット5がソレノイド2、ビット6がソレノイド3、ビット7がソレノイド4の制御用ビットとなる。そして、図1の回路によって、例えば、A−1レジスタ11のビット0とA−2レジスタ12のビット0の少なくともいずれか一方を1にすれば、1ピンの出力はHiレベルとなり、ランプを点灯させることができる。
【0059】
なお、ここで本実施例の用語と特許請求の範囲に記載した用語との関係を簡単に説明する。基本的には同じ用語を用いているので、異なる点について述べる。本実施例において、特許請求の範囲の論理和回路はORゲートに相当し、マイクロコンピュータはマイコンチップ20に相当する。
【0060】
以下に、図1に示した本実施例のハードウェアにおいて、図5・図6を参照して説明した処理を行う場合の各レジスタの値を図2に示して説明する。
処理の内容は図5・図6の場合と同様であり、図2のソレノイド1〜ソレノイド4は必ず4ms毎に駆動する必要がある一方、ランプ、ヒータ1、ヒータ2は特に時間要求がないため、A−1レジスタ11はベースルーチンからのアクセス専用とし、A−2レジスタ12はタイマ割込みルーチンからのアクセス専用とする。つまり、A−1レジスタ11は、プライオリティが相対的に低いベースルーチンから制御し、A−1レジスタ11は、プライオリティが相対的に高いタイマ割込みルーチンから制御する。このタイマ割込みの時間は4msとする。
【0061】
A−1レジスタ11及びA−2レジスタ12にアクセスするCPUは、一般的なRISCを採用したCPUであり、レジスタの特定のビットを直接操作することができないタイプのものである。よって、各ルーチンでは、前述のリード・モディファイ・ライトの操作を行う必要がある。
【0062】
ベースルーチンは、ランプ、ヒータ1、ヒータ2の各ビットにアクセスし、タイマ割込みルーチンはソレノイド1、ソレノイド2、ソレノイド3、ソレノイド4の各ビットにアクセスする。図中、ハッチング部分のビットはそれぞれの各ルーチンにおいて操作対象外のビットを示す。
【0063】
図2の例は、ベースルーチンS110、S120、S130でランプをONにする処理中に、タイマ割込みによってS120から、タイマ割込みルーチンに移行する処理である。そして、タイマ割込みルーチンでは、S210、S220、S230で、ソレノイド1をONにする処理を行う。
【0064】
以下に、この時のCPUの動作、CPUの汎用レジスタの値、A−1レジスタ11の値、A−2レジスタ12の値を説明する。なお、A−1レジスタ11及びA−2レジスタ12の初期値はいずれも0b00000000であり、すべての装置はOFF状態である。また、以下、「汎用レジスタ」はCPUの汎用レジスタを示す。また、図2及び図3において右側の縦一列のレジスタは汎用レジスタの値を表し、中央の縦一列のレジスタはA−1レジスタ11またはA−2レジスタ12の値を示したものである。そして、左側の一列は図1の第一出力ポート14の各出力端子の信号レベルを示し、8ピンからから1ピンに向けて各ビットの出力の信号レベルを左から順に表記したものである。
【0065】
図1に示すように、A−1レジスタ11は、メモリ空間の0xFFFFFA00番地にマップされており、A−2レジスタ12は、0xFFFFFA01番地にマップされている。よって、以下、CPUはこれらアドレスを指定してそれぞれのレジスタの値をリードまたはライトする。
【0066】
S110では、A−1レジスタ11の値を汎用レジスタへリードする。よって、汎用レジスタの値は0b00000000となる。
S120では、汎用レジスタのランプのビットを1にする。つまり、ビット0の値を1へモディファイする。よって、汎用レジスタの値は0b00000001となる。
【0067】
ここで、タイマ割込みが発生すると、CPUでの処理は、ベースルーチンから割込みルーチンへ移行する。この割込みルーチンでは汎用レジスタの値を退避して、S210〜S230の処理を行う。
S210では、A−2レジスタ12の値を汎用レジスタへリードする。よって、汎用レジスタの値は、0b00000000となる。
【0068】
S220では、汎用レジスタのソレノイド1のビットを1にする。つまり、ビット1を1へモディファイする。よって、汎用レジスタの値は、0b00000010となる。
S230では、汎用レジスタの値をA−2レジスタ12へライトする。このライトによって、A−2レジスタ12の値は0b00000010となる。よって、A−2レジスタ12の出力のレベルはビット7からビット0に向けて各ビットの出力のレベルを表記するとLLLLLLHLとなる。一方、A−1レジスタ11の値は0b00000000のままである。よって、A−1レジスタ11の出力のレベルは同様に表記するとLLLLLLLLとなる。前述の図1の回路構成によって、両レジスタの対応する各ビット番号毎にORを取ったレベルが出力されることになるので、第一出力ポート14の信号レベルはLLLLLLHLとなる。よって、2ピンがHiレベルとなり、ソレノイド1がONになる。
【0069】
続いて割込みルーチンからベースルーチンに復帰するために、退避した汎用レジスタの値を復帰する。復帰した汎用レジスタの値はS120での値である0b00000001となり、処理はベースルーチンへ復帰する。
S130では、汎用レジスタの値をA−1レジスタ11へライトする。よって、A−1レジスタ11の値は0b00000001となり、A−1レジスタ11の出力は、LLLLLLLHとなる。一方、このときA−2レジスタ12の出力は、LLLLLLHLのままであるので、図1の回路によって、出力はLLLLLLHHとなる。つまり、1ピンがHiレベルとなりランプがONになる。また、2ピンはHiレベルのままでありソレノイド1がON状態のままである。よって、ベースルーチンでONにしたランプと割込みルーチンでONにしたソレノイドはともにONとなり、期待通りの動作が行われる。
【0070】
つまり、本構成によれば、図6を参照して説明したようにソフトウェアによる割込み禁止/解除を行わなくても、図5を参照して説明したような多重アクセスによる出力異常が起こらない。
これは、周辺装置をOFFにする場合も同様である。以下に、図3を参照して、周辺装置をOFFにする場合の例を説明する。
【0071】
図3の回路構成は図2の場合と同様である。また、ベースルーチン、割込みルーチンへの各レジスタの割り当ても同様である。
図3では初期状態として、A−1レジスタ11の値を0b00000001とし、A−2レジスタ12の値を0b10100010とする。図1の回路によって出力端子のレベルは、HLHLLLHHとなり、ランプ、ソレノイド1、ソレノイド2、ソレノイド4がON状態となり、ヒータ1、ヒータ2、ソレノイド3がOFF状態となっている。この状態からベースルーチンではランプをOFFにする処理を行い、タイマ割込みルーチンではソレノイド1をOFFとする処理を行う。
【0072】
以下、図3の各ステップについて説明する。
S310では、A−1レジスタ11の値を汎用レジスタへリードする。よって、汎用レジスタの値は0b00000001となる。
S320では、汎用レジスタのランプのビットを0にする。つまり、ビット0の値を0へモディファイする。よって汎用レジスタの値は0b00000000となる。
【0073】
ここで、タイマ割込みが発生すると、CPUでの処理は、ベースルーチンから割込みルーチンへ移行する。この割込みルーチンでは汎用レジスタの値を退避して、S410〜S430の処理を行う。
S410では、A−2レジスタ12の値を汎用レジスタへリードする。よって、汎用レジスタの値は、0b10100010となる。
【0074】
S420では、汎用レジスタのソレノイド1のビットを0にする。つまり、ビット1を0へモディファイする。よって、汎用レジスタの値は、0b10100000となる。
S430では、汎用レジスタの値をA−2レジスタ12へライトする。このライトによって、A−2レジスタ12の値は0b10100000となる。よって、A−2レジスタ12の出力のレベルはHLHLLLLLとなる。一方、A−1レジスタ11の値は0b00000001のままである。よって、A−1レジスタ11の出力のレベルはLLLLLLLHとなる。前述の図1の回路構成によって、両レジスタの対応する各ビット番号毎にORを取ったレベルが出力されることになるので、第一出力ポート14の信号レベルはHLHLLLLHとなる。よって、2ピンがLowレベルとなり、ソレノイド1がOFFとなる。
【0075】
続いて割込みルーチンからベースルーチンに復帰するために、退避した汎用レジスタの値を復帰する。復帰した汎用レジスタの値はS320での値である0b00000000となる。そして、処理はベースルーチンへ復帰する。
S330では、汎用レジスタの値をA−1レジスタ11へライトする。すると、A−1レジスタ11の値は0b00000000となり、A−1レジスタ11の出力は、LLLLLLLLとなる。一方、このときA−2レジスタ12の出力は、HLHLLLLLのままであるので、図1の回路によって、第一出力ポート14はHLHLLLLLとなる。つまり、1ピンがLowレベルとなりランプがOFFになる。また、2ピンはLowレベルのままでありソレノイド1はOFF状態のままである。よって、割込みルーチンでOFFにしたソレノイド1とベースルーチンでOFFにしたランプとはともにOFFとなり、期待通りの動作が行われる。
【0076】
よって、本出力装置10によれば、出力をOFFにする場合も、ONにする場合も、図6のようなソフトウェアによる割込み禁止/解除を行う必要がない。
A−1レジスタ11をベースルーチン用、A−2レジスタ12を割り込みルーチン用として各々のルーチンが操作するビットが同じビットにならないように割り当て、自ルーチンで操作しないビットの値を0に固定することで、各々のルーチンにおける出力処理時に排他処理をする必要がなくなるからである。
【0077】
そして、この場合の処理ステップは、排他処理追加前の図5の場合と等しくなる。よって、実行時間は図7の(a)対策前と等しくなり、図7(b)のような割込み禁止/解除命令の追加によるオーバーヘッドは発生しない。しかも、図5に示した多重アクセスの問題も発生しない。よって、正常な動作を実現しつつ実行時間を削減することができる。
【0078】
また、割込み禁止/解除命令が不要であるため、オブジェクトコードのサイズが小さくなり、ROMサイズを低減できる。
そして、実行レベル毎に出力ポートを占有する必要もなく、最大でも、同一のポートのレジスタにパッキングされている実行レベル分のレジスタを用意し、その各ビットを同一ビット番号毎に論理和を取って出力すればよいことになる。また、実行レベル毎のポートのパッキング数はすべて任意に設定できるため、空き端子のない効率よい割付が実現できる。
【0079】
また、例えば、ベースルーチンで実行していたヒータ2の制御をタイマ割込みルーチンで行うように変更する場合など、ビットを操作するルーチンの実行レベルを変更する場合にも、ソフトウェアに排他処理を追加せずに対応できる。
さらに、従来の図6のソフトウェア資産を本装置に対応させるためには、レジスタのビット配列はそのままでよく、外部の基盤の回路パターンの変更をする必要もない。
[別実施例]
(1)上記実施例においては、A−1レジスタ11とA−2レジスタ12の二つのレジスタによる構成と動作について説明したが、これらのレジスタは、3つ以上でもよい。例えば、A−1レジスタ11からA−mレジスタまでのm本のレジスタを備え、A−1レジスタ11からA−mレジスタまでのそれぞれのレジスタのビットiの出力をORゲートの入力部にそれぞれ接続し、その出力を出力端子に接続するようにしてもよい。このようにすればm個のルーチンから排他制御無しに、出力端子に接続した周辺回路を制御することができる。
【0080】
また、レジスタのビット幅も8ビットに固定されている必要はなく、例えば、16ビット、32ビットなど、1ビット以上であればよい。つまり上述の例のiは任意のビット数としてよい。
(2)上記実施例においては、多重アクセスの例として割込みを挙げたが、多重アクセスは割込みに限らず種々の状況で発生する。例えば、リアルタイムOSではタスクの優先順位に従って各ルーチンを実行するが、この時も同一ポートへの書き込みが発生する場合がある。このように多重アクセスが発生する状況であれば、本装置が有効に利用できる。
(3)上記実施例においては、ORゲート群13を用いることとしたが、ワイヤードORなどゲートを用いないOR回路でもよい。つまり、論理和を取ることができればどのような構成のものでもよい。
(4)上記実施例においては、ORゲート群13の出力はマイコンチップ20のピンに接続することとしたが、種々の回路を介して接続するようにしてもよい。例えばドライバ回路や保護回路等を介して接続してもよいし、プログラマブルインバータ等を介して接続してもよい。また信号レベルを反転するためにNORゲートとしてもよい。各レジスタの出力も同様である。また、もちろんピン配置は自由に定めてよい。
(5)上記実施例においては、各実行レベル毎に異なるビットの操作を行うことで排他制御を行っているが、この図1の回路の一部または全部は次のような利用方法によって上記実施例とは別の制御に利用することもできる。
【0081】
例えば、図5の未使用ビットであるレジスタAのビット2に対応する図4の3ピンにLEDを接続し、フラグ1とフラグ2のいずれか一方がONの場合(OR条件)にLEDを点灯させることとする。このような場合、従来はソフトウェアでいずれかのフラグがONであるかを判定し、判定の結果、フラグ1またはフラグ2のいずれかがONである場合に図4のレジスタAを1とすることでLEDを点灯させていた。
【0082】
しかし、図1の3ピンにLEDを接続した場合には、このようなソフトウェアによるフラグの判定は不要となり、フラグ1をONにする代わりにA−1レジスタ11のビット2を1とし、フラグ2をONにする代わりにA−2レジスタ12のビット2を1とするだけで、LEDを点灯させることができる。このような構成によれば、ソフトウェアによる判定が不要となり、この判定の完了までに発生する遅延が起こらなくなる。
【0083】
また、ORゲート群13のそれぞれの信号線をプログラマブルインバータ等に接続すれば、OR条件ではなく、NAND条件で出力をすることもできる。またレジスタが複数ある場合には、例えば複数ビットのORでON/OFFまたは複数ビットのANDでON/OFF等を組み合わせて使うことができる。
(6)上記実施例においては、出力装置10は図示しないCPUと共にマイコンチップ20に集積されることとしたが、CPUは含まずに出力装置単体で集積してもよい。このようにすれば、汎用のCPU等を接続してこれらのCPUの出力装置として利用することができる。
【0084】
また、上記実施例においては、各出力ポートは出力端子に接続することとし、チップの外部にある周辺回路に出力することとしたが、チップ内部にある周辺回路に接続するようにしてもよい。このようにすれば、チップ内の周辺回路に関しても同様に制御を行うことができる。
(7)上記実施例においては、出力ポートは第一出力ポート14についてのみ説明したが、出力ポートは複数あってもよい。このようにすれば、多数の制御対象の制御を行うことができる。
【0085】
また各出力ポートのハードウェア構成は異なるものとしてもよい。例えば、第一出力ポート14とともに、第2出力ポートとして、それぞれ16ビット幅のB−1レジスタとB−2レジスタとB−3レジスタによる回路を備え、第一出力ポート14とともに利用するようにしてもよい。このようにすれば、利用する信号線の数と、アクセスするルーチンの数によって最適な構成を採ることができる。
【図面の簡単な説明】
【図1】 実施例の出力装置10のハードウェア構成を示す説明図である。
【図2】 実施例の周辺装置をONにする際の出力装置10の使用例と動作の説明を示す説明図である。
【図3】 実施例の周辺装置をOFFにする際の出力装置10の使用例と動作の説明を示す説明図である。
【図4】 従来の出力装置10のハードウェア構成を示す説明図である。
【図5】 従来のレジスタの多重アクセスによる出力異常の例を示す説明図である。
【図6】 従来のソフトウェアの割込み禁止・割込み解除による対策を行った例を示す説明図である。
【図7】 ソフトウェアによる対策の前後における実行時間の変化を示す説明図である。
【符号の説明】
10…マイクロコンピュータ用出力装置 11…A−1レジスタ
12…A−2レジスタ 13…ORゲート群
13a,13b…ORゲート 14…第一出力ポート
15…信号線群 15a,15b…信号線
17a…A−1レジスタのビット0の出力部
17b…A−1レジスタのビット1の出力部
18a…A−2レジスタのビット0の出力部
18b…A−2レジスタのビット1の出力部
19a,19b,19c,19d…ORゲートの入力部
20…マイコンチップ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcomputer output device and a microcomputer including the output device.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, microcomputer output devices for outputting digital signals to peripheral circuits in accordance with CPU control are known. These output devices are composed of a register mapped to a predetermined address of the CPU. When the CPU outputs data to the address, the output data is latched, and the latched data is transferred to the peripheral circuit. Output. The data latched by the register can be read into a general-purpose register in the CPU under the control of the CPU.
[0003]
In such an output device, a register having a plurality of bits is generally provided at one address. In particular, in a general-purpose one-chip microcomputer, the register is fixed to a predetermined bit width (for example, 8 bit width), and the output signal line of the register having the bit width can be connected to a peripheral circuit inside or outside the chip. It is common to prepare it as a port.
[0004]
For example, when a peripheral circuit is connected to an 8-bit width output port, a parallel output device or the like can be connected as a peripheral circuit using the entire 8 bits. In addition, a peripheral circuit for driving various peripheral devices can be connected by using a part of the output port having an 8-bit width. For example, a 7-segment LED is controlled using 4 bits out of 8 bits. Further, it is possible to control, for example, lighting of a lamp by using only one bit from an output port having an 8-bit width.
[0005]
In this way, the control target can be controlled by the CPU writing the value (data) to each bit of the register connected to the control target circuit via the signal line of the output port. In other words, the CPU can output a digital signal corresponding to the written value to the peripheral circuit corresponding to the predetermined bit by writing the value in the predetermined bit of the predetermined address.
[0006]
An example of these output devices will be described with reference to FIG.
FIG. 4 is a configuration example of a conventional memory mapped I / O microcomputer output device. This output device is integrated on one microcomputer chip together with a CPU (not shown). This output device is provided with 8-bit wide registers at a plurality of addresses in the memory space of the CPU. The output of each bit of each register is connected to a different pin (output terminal) of the microcomputer chip, and various peripheral circuits outside the chip can be connected to these pins.
[0007]
The register A of FIG. 4 is an 8-bit wide register from
[0008]
The output of each bit of each register is connected to a pin of the microcomputer chip. That is,
[0009]
According to such a configuration, for example, if the CPU writes 0b11111111 to address 0xFFFFFA00, all
[0010]
In this way, the CPU can control the peripheral circuits connected through the pins. The data latched in each register can be read by the CPU. For example, if the CPU writes 0b10101010 at address 0xFFFFFA00 and then reads the data at address 0xFFFFFA00 into the general-purpose register of the CPU, the value of the general-purpose register becomes 0b10101010 which is the value of register A.
[0011]
When writing to the register,
[0012]
[Problems to be solved by the invention]
However, there is a CPU that cannot directly control a specific bit of a register arranged on the address of the CPU, such as a CPU adopting a general RISC. In such a CPU, in order to write a value to a specific bit of the register, (1) the value of the register at the address is read (read) onto the general-purpose register of the CPU, and (2) on the general-purpose register of the CPU. It is necessary to perform a read-modify-write operation in which the bit is changed (modify) and (3) the value of the general-purpose register of the CPU is written (write) to the register at the address.
[0013]
At this time, if a plurality of processing routines write data to the same register, timing multiple access occurs, and an abnormality may occur in the output.
An example of this will be described with reference to FIG.
FIG. 5 is an example of output abnormality due to multiple access of registers.
[0014]
The register A in FIG. 5 corresponds to the register A in FIG. In FIG. 4, 1 pin is a lamp, 2 pin is a
[0015]
Among these devices to be controlled, the
[0016]
The CPU that accesses the register A is a CPU that employs a general RISC, and is of a type that cannot directly manipulate specific bits of the register. Therefore, when writing to the register A in each routine, it is necessary to perform the above-described read-modify-write operation.
[0017]
In the example of FIG. 5, a timer interrupt occurs during the process of turning on the lamp by the read, modify, and write operations in the base routines S1, S2, and S3, and the process proceeds to the timer interrupt routine. The processing of the case is shown. In the timer interrupt routine, processing for turning on the
[0018]
The operation of the CPU, the value of the general-purpose register of the CPU, and the value of the register A will be described below. Note that the initial value of the register A is 0b00000000, and all the devices are in the OFF state. Hereinafter, “general-purpose register” indicates a general-purpose register of the CPU. In FIG. 5, the right vertical column of registers represents the values of the general-purpose registers of the CPU, and the left vertical column of registers represents the values of the register A.
[0019]
In S1, the value of register A is read into the general-purpose register. Therefore, the value of the general-purpose register is 0b00000000.
In S2, the ramp bit of the general-purpose register is set to 1. That is, the value of
[0020]
Here, when a timer interrupt occurs, the processing in the CPU shifts from the base routine to the interrupt routine. In this interrupt routine, the value of the general-purpose register is saved and the processing of S11 to S13 is performed.
In S11, the value of the register A is read to the general purpose register. At this time, since the value of the register A remains 0b00000000, the value of the read general-purpose register is also 0b00000000.
[0021]
In S12, the bit of
In S13, the value of the general-purpose register is written to the register A. By this writing, the value of the register A becomes 0b00000010, the 2 pin becomes Hi level, and the
[0022]
Subsequently, in order to return from the interrupt routine to the base routine, the saved general register value is restored. The value of the restored general-purpose register is the value in S2 and becomes 0b00000001. Then, the process returns to the base routine.
In S3, the value of the general-purpose register is written to the register A. Since the value of the general-purpose register is 0b00000001, the value of the register A is 0b00000001. Therefore,
[0023]
For this reason, the solenoid interrupt 1 should have been turned on in the timer interruption routine, but the problem that it is turned off in S3 occurs. This is because the value of the register is 0b00000011 and both the
[0024]
In order to avoid this problem, the registers accessed by the base routine and the timer interrupt routine may be different registers. For example, register A is for the base routine and register B is for the timer interrupt routine. In this way, the above problem does not occur. However, there is a problem that the utilization efficiency of pins of the microcomputer chip is deteriorated. Further, such arrangement is often not possible due to the limitation of the number of pins of the microcomputer chip. For example, when register A is used for the base routine and register B is used for the timer interrupt routine, the bits used for the base routine are only 3 bits corresponding to the lamp,
[0025]
Therefore, normally, there are many cases where one output port cannot be occupied for each execution level, and even when multiple accesses occur, a device controlled from a plurality of execution levels must be assigned to one port.
Therefore, in order to avoid the multiple access problem as described above, there is a method in which interrupts are prohibited and exclusive access control is performed during a read-modify-write period. This avoidance method will be described with reference to FIG.
[0026]
FIG. 6 shows an example in which a countermeasure by software interrupt inhibition / interrupt is applied to the process of FIG. 5 in order to solve the problem in FIG.
The difference from the processing of FIG. 5 is that the interrupt during the processing period (S1, S2, S3) of the base routine of FIG. 5 is prohibited and the interrupt during the processing period of the timer interrupt routine (S11, S12, S13). Is to ban.
[0027]
Hereinafter, it will be confirmed that the multiple access problem described with reference to FIG. 5 does not occur with reference to FIG.
The configuration of the register A in FIG. 6, the initial value of the register A, the control target in each routine, how to indicate the value of each register, and the like are the same as in FIG.
[0028]
In S20, interrupt inhibition is applied (DI).
In S21, the value of the register A is read to the general purpose register. Therefore, the value of the general-purpose register is 0b00000000.
In S22, the ramp bit of the general-purpose register is set to 1. That is, the value of
[0029]
Here, a timer interrupt occurs. However, since the interrupt is disabled, the execution of the timer interrupt routine is suspended until the interrupt is canceled. Therefore, the processing of the base routine is continued without being interrupted.
In S23, the value of the general-purpose register is written to the register A. Since the value of the general-purpose register is 0b00000001, the value of the register A is 0b00000001, and the lamp is turned on.
[0030]
In S24, the interrupt inhibition is canceled (EI).
Here, when the prohibition of interrupt is canceled, the processing in the CPU shifts to the timer interrupt routine.
In this interrupt routine, the value of the general-purpose register is saved and the processing of S30 to S34 is performed.
[0031]
In S30, interrupt inhibition is applied (DI).
In S31, the value of the register A is read to the general purpose register. At this time, since the value of the register A is 0b00000001, the value of the read general-purpose register is also 0b00000001.
[0032]
In S32, the bit of
In S33, the value of the general-purpose register is written to the register A. This light turns on the
[0033]
In S34, the interrupt prohibition is canceled. Therefore, the value of the register A when the interrupt prohibition is released remains the value in S33. Therefore, it can be seen that both the lamp and the solenoid are finally in the ON state and correct operation is being performed.
Thus, by prohibiting interrupts during the read-modify-write period and exclusively controlling access to the registers, the above-mentioned problem of multiple access can be prevented.
[0034]
Note that the interrupt disable / cancel instructions in S30 and S34 of the timer interrupt routine may be omitted as long as they are within the range of this example. However, it is generally inserted for the purpose of facilitating future expansion / change and checking whether an interrupt disable / cancel instruction is correctly inserted. For example, in the future, when a new control target is connected to pin 3 in FIG. 4 and
[0035]
When the above measures are taken, it is necessary to insert an interrupt disable / cancel instruction for each register write process.
For this reason, the size of the object code increases as the interrupt disable / release instruction is added. When the size of the object code increases, the memory size such as ROM and RAM for storing the object code increases, and the cost increases.
[0036]
In addition, since a predetermined time is required to execute the interrupt disable / interrupt cancel instruction, the processing time also increases. FIG. 7 shows a difference in execution time between the case where the interrupt disable / release instruction of FIG. 6 is inserted and the case where the interrupt disable / release instruction of FIG. 5 is not inserted. FIG. 7A is a diagram showing the execution time when the interrupt disable / cancel instruction of FIG. 5 is not inserted (before countermeasures). On the other hand, FIG. 7B is a diagram showing the execution time when the above-described interrupt disable / cancel instruction of FIG. 6 is inserted (after countermeasures). As shown in this figure, the execution time after the countermeasure of (b) is executed in excess of the execution time of the interrupt disable / release instructions of S20, S24, S30, and S34, compared with the execution time before the countermeasure of (a). Need time.
[0037]
Such an increase in object code size and an increase in processing time may not be negligible, for example, in a control microcomputer. This is because, in the processing in these microcomputers or the like, accesses to registers arranged in the address space frequently occur in order to control devices. Therefore, it is necessary to insert an instruction to disable / release interrupts everywhere, and the added instruction is frequently executed.
[0038]
Furthermore, when software measures are taken in this way, if there is a leak at one location, the exclusive control of access to the registers will not be performed. It is necessary to check whether it is inserted. Then, there is a problem that the number of work steps increases in proportion to the number of write locations in these registers.
[0039]
Accordingly, an object of the present invention is to provide an output device for a microcomputer that does not require exclusive control by software.
[0040]
[Means for Solving the Problems and Effects of the Invention]
The microcomputer output device according to
[0041]
On the other hand, this one OR circuit has a plurality of input units, and these input units are connected to output units having the same bit number of registers having predetermined bit widths arranged at different addresses. . And all the input parts of each logical sum circuit are constituted in this way.Furthermore, when the CPU executes a plurality of routines that share one output port, each register is accessed by each routine at a different address.
[0042]
Note that the register arranged at an address means a register that can be accessed by a control device such as a CPU by designating the address. The logical sum circuit may be any circuit as long as it takes a logical sum of a plurality of input signals and outputs a signal obtained by taking the logical sum. For example, a wired OR circuit may be used.
[0043]
According to such a configuration, for example, the CPU sets the value of the bit on any one register of different addresses to 1, thereby setting the value of the signal line of the output port output via the OR circuit to 1 Can be.
Therefore, when multiple access occurs as described above, multiple access does not occur if each routine in which multiple access occurs accesses a register located at a different address. Moreover, a value obtained by logically summing the values of the registers is always output to the output port by the above-described OR circuit. Therefore, an expected value is output to the output port without taking measures to disable / release interrupts by software.
[0044]
Therefore, it is not necessary to add an interrupt disable / release instruction, and the object code size can be reduced. Therefore, when selecting a microcomputer, a microcomputer having a relatively small memory capacity can be selected, and the cost can be reduced.
[0045]
In addition, since it is not necessary to execute an interrupt disable / release instruction, the processing time is shortened. In addition, it is not necessary to check whether or not an interrupt disable / cancel instruction is properly inserted every time the software is changed, and the number of steps for software creation / maintenance can be greatly reduced.
[0046]
Furthermore, existing software assigned so that the bit numbers of the registers accessed by each routine do not overlap, such as the base routine and interrupt routine described with reference to FIG. For this purpose, it is only necessary to change the address of the register to be accessed for each routine. That is, since it is not necessary to change the bit allocation in software, existing software resources can be used effectively.
[0047]
By the way, in the invention described in
[0048]
In this way, even when the accessible bit width changes depending on the operation mode of the CPU, for example, one output port can be shared by routines that execute in different operation modes. In addition, when the output port is output to the outside of the microcomputer chip (package) as will be described later, efficient pin assignment without an empty terminal can be performed.
[0049]
The bit width of each register may be the same as in the second aspect. In this way, it can be used as a general-purpose output device, and the bit assignment of the register accessed on the software side can be freely changed. That is, since the bit widths of all the registers are the same, for example, when the control process to be controlled is moved to a routine having a different execution priority, it is only necessary to change the register to be accessed. Especially in an embedded system, since there are many controlled objects and it is used for various purposes, such versatility is required.
[0050]
The output device is preferably integrated on one chip. In this case, the circuit connected to the output device exists inside or outside the chip. That is, a circuit connected to the output port may exist inside the chip or may exist outside the chip. When present inside the chip, each signal line of the output port is connected to each circuit in the chip. On the other hand, if it exists outside the chip, as shown in
[0051]
When the output device is integrated on one chip, the output device alone may be integrated on the chip, or the output device and peripheral circuits connected to the output device may be integrated on the chip. Further, according to a fourth aspect of the present invention, the output device may be integrated on one chip together with a CPU that can write to the register of the output device. In this way, a microcomputer having an output port having the above-described characteristics is obtained.
[0052]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments to which the present invention is applied will be described below with reference to the drawings. Needless to say, the embodiments of the present invention are not limited to the following examples, and can take various forms as long as they belong to the technical scope of the present invention.
[0053]
Hereinafter, a description will be given with reference to FIGS.
FIG. 1 shows a hardware configuration of the
[0054]
The
The A-1 register 11 in FIG. 1 has the same configuration as the register A described above with reference to FIG. The A-2 register 12 has the same configuration as the register B described above with reference to FIG. Therefore, the description is omitted.
[0055]
However, the output sections of the A-1 register 11 and the A-2 register 12 are not directly connected to the pins of the microcomputer chip as shown in FIG. 4, but are connected to the A-1 register 11 as shown in FIG. Each bit number of the A-2 register 12 is connected to one OR gate of the
[0056]
That is, bit n of the A-1 register 11 and bit n of the A-2 register 12 are connected to the input part of one OR gate of the
[0057]
As in the example of FIG. 4, the
[0058]
Therefore, in the A-1 register 11 and the A-2 register 12,
[0059]
In addition, the relationship between the term of a present Example and the term described in the claim here is demonstrated easily. Since the same terminology is used basically, different points will be described. In this embodiment, the OR circuit in the claims corresponds to an OR gate, and the microcomputer corresponds to the
[0060]
In the following, the value of each register when performing the processing described with reference to FIGS. 5 and 6 in the hardware of the present embodiment shown in FIG. 1 will be described with reference to FIG.
The contents of the processing are the same as those in FIGS. 5 and 6, and
[0061]
The CPU that accesses the A-1 register 11 and the A-2 register 12 is a CPU that employs a general RISC, and is a type that cannot directly operate specific bits of the register. Therefore, in each routine, it is necessary to perform the above-described read-modify-write operation.
[0062]
The base routine accesses the lamp,
[0063]
The example of FIG. 2 is a process for shifting from S120 to the timer interrupt routine by a timer interrupt during the process of turning on the lamp in the base routines S110, S120, and S130. In the timer interrupt routine, processing for turning on the
[0064]
Below, the operation of the CPU, the value of the general-purpose register of the CPU, the value of the A-1 register 11 and the value of the A-2 register 12 will be described. The initial values of the A-1 register 11 and the A-2 register 12 are both 0b00000000, and all the devices are in the OFF state. Hereinafter, “general-purpose register” indicates a general-purpose register of the CPU. 2 and 3, the right vertical column register indicates the value of the general-purpose register, and the central vertical column register indicates the value of the A-1 register 11 or the A-2 register 12. The left column shows the signal level of each output terminal of the first output port 14 in FIG. 1, and the signal level of each bit output is described from the 8th pin to the 1st pin in order from the left.
[0065]
As shown in FIG. 1, the A-1 register 11 is mapped to the address 0xFFFFFA00 in the memory space, and the A-2 register 12 is mapped to the address 0xFFFFFA01. Therefore, hereinafter, the CPU designates these addresses and reads or writes the values of the respective registers.
[0066]
In S110, the value of the A-1 register 11 is read to the general purpose register. Therefore, the value of the general-purpose register is 0b00000000.
In S120, the ramp bit of the general-purpose register is set to 1. That is, the value of
[0067]
Here, when a timer interrupt occurs, the processing in the CPU shifts from the base routine to the interrupt routine. In this interrupt routine, the value of the general-purpose register is saved and the processing of S210 to S230 is performed.
In S210, the value of the A-2 register 12 is read to the general purpose register. Therefore, the value of the general-purpose register is 0b00000000.
[0068]
In S220, the bit of
In S230, the value of the general-purpose register is written to the A-2 register 12. By this writing, the value of the A-2 register 12 becomes 0b00000010. Therefore, the output level of the A-2 register 12 is LLLLLLLHL when the output level of each bit is expressed from bit 7 to
[0069]
Subsequently, in order to return from the interrupt routine to the base routine, the saved general register value is restored. The value of the returned general-purpose register is 0b00000001 which is the value in S120, and the process returns to the base routine.
In S130, the value of the general-purpose register is written to the A-1 register 11. Therefore, the value of the A-1 register 11 is 0b00000001, and the output of the A-1 register 11 is LLLLLLLLH. On the other hand, at this time, since the output of the A-2 register 12 remains LLLLLLLHL, the output becomes LLLLLLLLHH by the circuit of FIG. That is, the 1 pin becomes Hi level and the lamp is turned on. Further,
[0070]
That is, according to this configuration, the output abnormality due to the multiple access as described with reference to FIG. 5 does not occur even if the software interrupt prohibition / cancellation is not performed as described with reference to FIG.
This is the same when the peripheral device is turned off. Hereinafter, an example in which the peripheral device is turned off will be described with reference to FIG.
[0071]
The circuit configuration of FIG. 3 is the same as that of FIG. The same applies to the allocation of each register to the base routine and the interrupt routine.
In FIG. 3, as an initial state, the value of the A-1 register 11 is set to 0b00000001, and the value of the A-2 register 12 is set to 0b10110000. With the circuit of FIG. 1, the level of the output terminal becomes HLHLLLHH, the lamp,
[0072]
Hereinafter, each step of FIG. 3 will be described.
In S310, the value of the A-1 register 11 is read to the general purpose register. Therefore, the value of the general-purpose register is 0b00000001.
In S320, the ramp bit of the general-purpose register is set to zero. That is, the value of
[0073]
Here, when a timer interrupt occurs, the processing in the CPU shifts from the base routine to the interrupt routine. In this interrupt routine, the value of the general-purpose register is saved and the processing of S410 to S430 is performed.
In S410, the value of the A-2 register 12 is read to the general purpose register. Therefore, the value of the general-purpose register is 0b10110000.
[0074]
In S420, the bit of
In S430, the value of the general-purpose register is written to the A-2 register 12. By this writing, the value of the A-2 register 12 becomes 0b10100000. Therefore, the output level of the A-2 register 12 is HLHLLLLL. On the other hand, the value of the A-1 register 11 remains 0b00000001. Therefore, the output level of the A-1 register 11 is LLLLLLLLH. The above-described circuit configuration of FIG. 1 outputs an ORed level for each corresponding bit number of both registers, so that the signal level of the first output port 14 becomes HLHLLLLLH. Therefore,
[0075]
Subsequently, in order to return from the interrupt routine to the base routine, the saved general register value is restored. The value of the restored general-purpose register is 0b00000000, which is the value in S320. Then, the process returns to the base routine.
In S330, the value of the general register is written to the A-1 register 11. Then, the value of the A-1 register 11 becomes 0b00000000, and the output of the A-1 register 11 becomes LLLLLLLLLL. On the other hand, since the output of the A-2 register 12 remains HLHLLLLL at this time, the first output port 14 becomes HLHLLLLL by the circuit of FIG. In other words, the
[0076]
Therefore, according to the
A-1 register 11 is used for the base routine and A-2 register 12 is used for the interrupt routine so that the bits operated by each routine are not the same bit, and the value of the bit not operated by the own routine is fixed to 0. This is because it is not necessary to perform exclusive processing during output processing in each routine.
[0077]
The processing steps in this case are the same as those in FIG. 5 before the exclusion process is added. Therefore, the execution time is equal to that before the countermeasure of FIG. 7A, and overhead due to addition of the interrupt disable / release instruction as shown in FIG. 7B does not occur. In addition, the multiple access problem shown in FIG. 5 does not occur. Therefore, it is possible to reduce the execution time while realizing a normal operation.
[0078]
Further, since the interrupt disable / release instruction is unnecessary, the size of the object code is reduced, and the ROM size can be reduced.
It is not necessary to occupy an output port for each execution level, and at most, registers for the execution level packed in the register of the same port are prepared, and each bit is logically ORed for each same bit number. Output. In addition, since the number of port packings for each execution level can be set arbitrarily, efficient allocation without empty terminals can be realized.
[0079]
Also, for example, when changing the execution level of a routine that manipulates bits, such as when changing the control of the
Furthermore, in order to make the conventional software asset of FIG. 6 correspond to this apparatus, the bit arrangement of the register is not changed, and it is not necessary to change the circuit pattern of the external base.
[Another embodiment]
(1) In the above embodiment, the configuration and operation of the two registers, the A-1 register 11 and the A-2 register 12, have been described. However, these registers may be three or more. For example, m registers from A-1 register 11 to Am register are provided, and the output of bit i of each register from A-1 register 11 to Am register is connected to the input part of the OR gate, respectively. The output may be connected to the output terminal. In this way, the peripheral circuit connected to the output terminal can be controlled from the m routines without exclusive control.
[0080]
Also, the bit width of the register need not be fixed to 8 bits, and may be 1 bit or more, such as 16 bits or 32 bits. That is, i in the above example may be an arbitrary number of bits.
(2) In the above-described embodiment, an interrupt is given as an example of multiple access. However, multiple access is not limited to an interrupt but occurs in various situations. For example, in the real-time OS, each routine is executed in accordance with the priority order of tasks, but writing to the same port may occur at this time as well. In such a situation where multiple accesses occur, the present apparatus can be used effectively.
(3) Although the
(4) In the above embodiment, the output of the
(5) In the above embodiment, exclusive control is performed by performing different bit operations for each execution level. However, part or all of the circuit of FIG. It can also be used for control other than the example.
[0081]
For example, an LED is connected to pin 3 in FIG. 4 corresponding to bit 2 of register A, which is an unused bit in FIG. 5, and the LED is turned on when either
[0082]
However, when the LED is connected to pin 3 in FIG. 1, such flag determination by software is unnecessary, and instead of turning
[0083]
Further, if each signal line of the
(6) In the above embodiment, the
[0084]
In the above embodiment, each output port is connected to an output terminal and output to a peripheral circuit outside the chip. However, it may be connected to a peripheral circuit inside the chip. In this way, it is possible to similarly control the peripheral circuits in the chip.
(7) In the above embodiment, only the first output port 14 has been described as the output port, but there may be a plurality of output ports. In this way, it is possible to control a large number of controlled objects.
[0085]
The hardware configuration of each output port may be different. For example, together with the first output port 14, the second output port is provided with circuits each having a 16-bit width B-1 register, B-2 register, and B-3 register, and used together with the first output port 14. Also good. In this way, an optimum configuration can be adopted depending on the number of signal lines to be used and the number of routines to be accessed.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram illustrating a hardware configuration of an
FIG. 2 is an explanatory diagram illustrating a usage example and operation of the
FIG. 3 is an explanatory diagram illustrating a usage example and operation of the
4 is an explanatory diagram showing a hardware configuration of a
FIG. 5 is an explanatory diagram illustrating an example of output abnormality due to multiple access of a conventional register.
FIG. 6 is an explanatory diagram showing an example in which countermeasures are taken by interrupt prohibition / interruption of a conventional software.
FIG. 7 is an explanatory diagram showing changes in execution time before and after countermeasures by software.
[Explanation of symbols]
DESCRIPTION OF
12 ...
13a, 13b ... OR gate 14 ... First output port
15 ... Signal line group 15a, 15b ... Signal line
17a: Output section of
17b: Output section of
18a: Output section of
18b: Output section of
19a, 19b, 19c, 19d ... OR gate input section
20 ... Microcomputer chip
Claims (4)
それぞれ異なるアドレスに配置された所定のビット幅を持つ複数の前記レジスタを備え、
前記出力ポートの各信号線は、それぞれ異なる論理和回路の出力部と接続されており、
前記論理和回路の入力部は、前記各レジスタにおける同一ビット番号の出力部と接続されており、
前記各レジスタは、前記CPUが1つの前記出力ポートを共有する複数のルーチンを実行する際に、各ルーチンによってそれぞれ別のアドレスに配置された前記レジスタにアクセスされること
を特徴とするマイクロコンピュータ用出力装置。 A register arranged at a predetermined address and accessible by the CPU by designating this address, and a value written to the register by the CPU via a plurality of signal lines respectively corresponding to each bit of the register in the output device for a microcomputer including an output port for outputting a digital signal,
A plurality of the registers each having a predetermined bit width arranged at different addresses;
Each signal line of the output port is connected to an output part of a different OR circuit,
The input part of the logical sum circuit is connected to the output part of the same bit number in each register,
Each of the registers is accessed by the routine when the CPU executes a plurality of routines that share one output port, and each of the registers is located at a different address . Output device.
前記それぞれ異なるアドレスに配置されたレジスタのビット幅は、すべて同一であること
を特徴とするマイクロコンピュータ用出力装置。The microcomputer output device according to claim 1,
The microcomputer output device, wherein the bit widths of the registers arranged at different addresses are all the same.
前記出力ポートの各信号線は、チップのそれぞれ異なるピンに接続されていること
を特徴とするマイクロコンピュータ用出力装置。The microcomputer output device according to claim 1 or 2,
Each signal line of the output port is connected to a different pin of the chip.
該出力装置の前記レジスタに書き込み可能なCPUとを備えること
を特徴とするマイクロコンピュータ。The microcomputer output device according to any one of claims 1 to 3,
A microcomputer comprising: a CPU capable of writing to the register of the output device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33802599A JP4178699B2 (en) | 1999-11-29 | 1999-11-29 | Microcomputer output device and microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33802599A JP4178699B2 (en) | 1999-11-29 | 1999-11-29 | Microcomputer output device and microcomputer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001155008A JP2001155008A (en) | 2001-06-08 |
| JP4178699B2 true JP4178699B2 (en) | 2008-11-12 |
Family
ID=18314238
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP33802599A Expired - Fee Related JP4178699B2 (en) | 1999-11-29 | 1999-11-29 | Microcomputer output device and microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4178699B2 (en) |
-
1999
- 1999-11-29 JP JP33802599A patent/JP4178699B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001155008A (en) | 2001-06-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8234476B2 (en) | Information processing apparatus and method of updating stack pointer | |
| JP3710671B2 (en) | One-chip microcomputer, IC card using the same, and access control method for one-chip microcomputer | |
| US20030156473A1 (en) | Memory controller | |
| US9626303B2 (en) | Data processing apparatus and address space protection method | |
| US8381283B2 (en) | Information processing apparatus and method of controlling program execution of same | |
| US5713038A (en) | Microprocessor having register file | |
| EP1324190B1 (en) | Data processing system having a read-modify-write unit | |
| US20010011326A1 (en) | Data processor and data processing system with internal memories | |
| JP2009524140A (en) | Area protection device, instruction set, and method for protecting memory area | |
| KR20010051991A (en) | Flexible general-purpose input/output system | |
| JP3563768B2 (en) | ROM program change device | |
| JP4178699B2 (en) | Microcomputer output device and microcomputer | |
| JP3661852B2 (en) | Protected microprocessor with system for assigning rights to the library | |
| US7162559B1 (en) | System for controlling interrupts between input/output devices and central processing units | |
| US5592652A (en) | Single-chip microcomputer system having address space allocation hardware for different modes | |
| JP2001075941A (en) | Microcomputer with built-in flash memory and operating method thereof | |
| EP0864983A2 (en) | Computer system including memory adress management circuit for protecting memory from illegal writing | |
| JP2017204083A (en) | Memory protection system | |
| WO2000075747A2 (en) | Microcontroller virtual memory system and method | |
| US4628450A (en) | Data processing system having a local memory which does not use a directory device with distributed resident programs and a method therefor | |
| JP2729151B2 (en) | Storage controller | |
| JP6998434B2 (en) | Electronic control device for automobiles | |
| JP2020004448A (en) | Automotive electronic control unit | |
| JP6596455B2 (en) | Electronic control unit for automobile | |
| JPS60230248A (en) | Memory protecting system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060308 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080122 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080129 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080326 |
|
| 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: 20080805 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080818 |
|
| 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: 20110905 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130905 Year of fee payment: 5 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |