JP4193336B2 - Microcontroller test circuit - Google Patents

Microcontroller test circuit Download PDF

Info

Publication number
JP4193336B2
JP4193336B2 JP2000175014A JP2000175014A JP4193336B2 JP 4193336 B2 JP4193336 B2 JP 4193336B2 JP 2000175014 A JP2000175014 A JP 2000175014A JP 2000175014 A JP2000175014 A JP 2000175014A JP 4193336 B2 JP4193336 B2 JP 4193336B2
Authority
JP
Japan
Prior art keywords
signal
microcontroller
address
test
predetermined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000175014A
Other languages
Japanese (ja)
Other versions
JP2001357024A (en
Inventor
清丈 藤後
正則 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2000175014A priority Critical patent/JP4193336B2/en
Publication of JP2001357024A publication Critical patent/JP2001357024A/en
Application granted granted Critical
Publication of JP4193336B2 publication Critical patent/JP4193336B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロコントローラ(以下マイコンと記す)内部の各機能を有するペリフェラル(周辺回路)をCPUを用いないで外部端子を介してテストするために内蔵されるマイクロコントローラテスト回路に関する。
【0002】
【従来の技術】
マイコンの高機能化が進み内部の各ペリフェラルをテストすることが難しくなる中で、マイクロコントローラテスト回路を内蔵させ、各ペリフェラル単体をCPUを用いずに各ペリフェラル毎に外部端子を介してテストするMUX分離方式が採用されている。このMUX分離方式では、マイクロコントローラテスト回路を正常に動作させるために、各ペリフェラル毎に分離して外部からテスト信号、制御信号等を入出力させる必要がある。そのため、各ペリフェラルを接続する共通バスの他に、各ペリフェラル毎に、外部からテスト信号を入出力するライン、制御信号を入出力する制御信号ライン等が配置され、これらのライン毎に外部端子が配置されていた。
【0003】
【発明が解決しようとする課題】
上記従来技術には、共通バスのビット数が大きくなる程、又はペリフェラル数が多くなる程、テストに必要な外部端子数が多くなり、かかる外部端子の全てを通常機能端子に割り当てることが困難になるという解決すべき課題が残されていた。
【0004】
【課題を解決するための手段】
本発明は以上の点を解決するため次の構成を採用する。
〈構成1〉
マイクロコントローラに内蔵され、マイクロコントローラが含む複数のペリフェラルを個別にテストするため、外部端子を介して所定の信号を前記マイクロコントローラの外部から入出力するマイクロコントローラテスト回路であって、前記ペリフェラルの所定のアドレスに期待値として書き込まれる複数並列ビットのライトデータと、書き込み完了後に前記複数並列ビットの期待値として読み出されたリードデータと比較して、前記ライトデータと前記リードデータとが一致したとき一致信号を出力する比較部と、前記マイクロコントローラの動作状態を監視して所望の動作状態を検知した時に前記比較部の出力を前記外部端子へ接続する状態監視部とを備え、前記外部端子を介して前記一致信号を出力するマイクロコントローラテスト回路において、前記所定のアドレス及びバス制御信号を生成するアドレス生成部と、前記所定のアドレスが予約領域であったときに前記アドレス生成部にスキップ信号を送出する予約領域認識部とを備え、前記アドレス生成部は、前記所定のアドレスに期待値の書き込み完了、及びバス読み出し完了後に前記所定のペリフェラルからのアクノリッジ信号がアクティブになった時、又は前記予約領域認識部からスキップ信号を受け入れた時カウントアップしたアドレスを出力し、前記予約領域認識部は、前記所定のペリフェラルからのアクノリッジ信号が所定の時間アクティブにならなかったとき前記所定のアドレスが予約領域であると認識して前記スキップ信号を前記アドレス生成部へ送出することを特徴とするマイクロコントローラテスト回路。
【0005
【0006】
〈構成
構成に記載のマイクロコントローラテスト回路において、上記予約領域認識部は、上記外部端子を介して上記所定の時間を任意に外部から設定可能な時間設定回路を備えることを特徴とするマイクロコントローラテスト回路。
【0007
【0008
【0009】
【発明の実施の形態】
以下、本発明の実施の形態を具体例を用いて説明する。
〈具体例1〉
図1は、具体例1の構成のブロック図である。
図1を用いて具体例1の説明をする前に、本発明によるマイクロコントローラテスト回路の解決課題をより鮮明にするために、以下に比較例を用いて上記MUX分離方式について説明する。
【0010】
図2は、比較例のブロック図である。
図2は、複数の機能を有するペリフェラル(周辺回路)単体をCPUを用いずに、外部端子からテストするテスト方式、即ちMUX分離方式を採用したマイコンのブロック図である。
図より、このマイコンは、CPU11、第一のペリフェラル12、第二のペリフェラル13、第三のペリフェラル14、アドレスデコーダ15、テスト回路16、ポート制御回路17、セレクタ20〜25、テスト制御回路26とで構成されている。
【0011】
CPU11は、マイコン全体を制御するマイクロプロセッサである。
第一から第三のペリフェラル12〜14は、マイコンが内蔵する各種の機能ブロックである。本発明の対象は、このペリフェラルを個別に外部端子から所定の信号を入出力させてテストすることである。ここでは一例として3個のみ記載したが実際のマイコンでは極めて多くの数量が内蔵されている。
【0012】
アドレスデコーダ15は、テストモードの時にテストすべきペリフェラル内部のアドレスを指定する部分である。
テスト回路16は、テストモードの時に上記第一から第三のペリフェラル12〜14に必要な制御信号を供給する部分である。
【0013】
ポート制御回路17は、ポートの入出力を制御する部分である。ここではテストモードの時にテストすべきペリフェラルを選択する部分である。
セレクタ20〜25は、入出力切替器である。
テスト制御回路26は、テストモードの時に共通バスを制御する部分である。
【0014】
上記マイコンのテストモードでの動作について一例として第二のペリフェラル13をテストする場合について説明する。
テスト回路16のテストモード端子81、82から第二のペリフェラル13をテストモードに設定する。
【0015】
このモード設定によって、テスト制御信号61、63がアクティブになる。テスト制御信号61がアクティブになるとCPU11は、共通バスを開放する。この時点から共通バスをセレクタ21とセレクタ20とテスト制御回路26が支配する。ここで、セレクタ21は、図上1個のみ記載されているが、実回路ではリードデータ41が通常32ビットデータ線を採用しているのでセレクタ21は32ビット分必要になる。
【0016】
このセレクタ21は、テスト制御信号61がアクティブになるとリードデータ41を32ビット分の通常機能端子(外部端子)51に接続する。即ち、第二のペリフェラル13の出力は外部から読み出し可能になる。
【0017】
テスト制御回路26は、32ビット分の通常機能端子(外部端子)52、24ビット分の通常機能端子(外部端子)53、及び2ビット分の通常機能端子(外部端子)54を、32ビットライトデータ42、24ビットアドレス信号43、及び2ビットバス制御信号44と接続して各通常機能端子52〜54から第二のペリフェラル13への期待値(ライトデータ)、アドレス値、バス制御信号値を外部から入力可能にする。
【0018】
またテスト制御信号63がアクティブ状態になるとセレクタ24は通常機能端子(外部端子)72を選択し、外部から第二のペリフェラル13への入力を可能にする。同様にセレクタ23は、第二のペリフェラル13の出力端子93を選択し、第二のペリフェラル13の出力信号値を通常機能端子(外部端子)73に出力可能にする。
【0019】
以上の結果、第二のペリフェラル13の全ての信号(バスを含む)をチップの通常機能端子(外部端子)から制御及びテストすることが可能になる。
ここで留意すべき点は以下の通りである。
ここではペリフェラルを3個に限定して記載したが実回路では極めて多数個である。従って、通常機能端子(外部端子)の必要数量は膨大な数量になってしまう。この通常機能端子(外部端子)の数量を増やすことなくテストすることを可能にすることが本発明の目的である。以下にその具体例について説明する。
【0020】
再度図1に戻って、具体例1の構成について説明する。
具体例1では、32ビットリードデータ41(図2)の通常機能端子(外部端子)51の数量減少を目的とする。
以下、一例としてリードデータ、ライトデータを32ビットに限定して説明する。
【0021】
図1より、具体例1のマイクロコントローラテスト回路は、比較部1と状態監視部2と選択部3とを備える。
比較部1は、ペリフェラルの所定のアドレス(レジスタ)に並列32ビットの期待値を書き込むライトデータ42(図2)と、書き込み完了後に書き込まれた期待値を読み出す並列32ビットのリードデータ41(図2)とを比較して、一致したときに一致信号を出力する部分である。
【0022】
ここではライトデータ42(図2)32ビットとリードデータ41(図2)32ビットの対応ビット毎に比較され32ビット全てが一致している時、即ち所定のアドレス(レジスタ)が正常に動作していることが確認されたときに一致信号が出力される。
【0023】
状態監視部2は、マイコンの動作状態を監視して所望の動作状態を検知した時上記比較部の一致信号を出力する部分である。
一例として3入力のアンドゲート102によって構成される。アクノリッジ信号40とバス制御信号44とを受け入れた時に一致信号111を通過させる。
【0024】
バス制御信号44によって所定のアドレス(レジスタ)への読み出しが指示され、読み出しが完了するとアクノリッジ信号40がアクティブになる。この状態で初めてライトデータ42(図2)とリードデータ41(図2)との一致を確認できるからである。
【0025】
選択部3は、テスト回路16(図2)が出力するテスト制御信号61によって、上記一致信号を通常機能端子(外部端子)121へ出力させる部分である。
かかる構成を備えることによって、比較例で説明したように32ビット分必要とされた通常機能端子(外部端子)51を1ビットの通常機能端子(外部端子)121で置き換えることが可能になる。
【0026】
〈具体例1の効果〉
以上説明した具体例1の構成を備えることによって、32ビット分必要とされた通常機能端子(外部端子)51を1ビットの通常機能端子(外部端子)121で置き換えることが可能になる。
【0027】
〈具体例2〉
具体例2では、テストの自動化を図ることを目的として内部にアドレス生成部を備える。
図3は、具体例2の構成のブロック図である。
図3より、具体例のマイクロコントローラテスト回路は、アドレス生成部130と、オアゲート140と、予約領域認識部150とを備える。
【0028】
アドレス生成部130は、ペリフェラルの所定のアドレス(レジスタ)に期待値の書き込み完了後にアクノリッジ信号がアクティブになった時、又は後に説明する予約領域認識部からスキップ信号を受け入れた時カウントアップしたアドレスを出力する部分である。
【0029】
予約領域認識部150は、ペリフェラルからのアクノリッジ信号が所定の時間アクティブにならなかったとき、そのアドレスが予約領域であると認識してスキップ信号を上記アドレス生成部130へ送出する部分である。この所定の時間は内部に配置されているクロックカウンタに予め設定されている。アクノリッジ信号の受入停止状態時に所定数のクロック数をカウントすると予約領域認識部150は、オーバフローしてスキップ信号を出力して再度カウント0に戻る。
【0030】
オアゲート140は、ペリフェラルの所定のアドレス(レジスタ)に期待値の書き込み完了後にアクノリッジ信号がアクティブになった時、又は予約領域認識部150からスキップ信号151を受け入れた時にカウントアップ信号141をアドレス生成部130へ送出する部分である。
【0031】
アドレス生成部130のアドレス生成動作について説明する。
図4は、レジスタマップ例説明図である。
通常、アドレス順に所定のアドレス(レジスタ)に期待値が書き込まれる場合には、アドレス生成部130が、アクノリッジ信号がアクティブになる毎にカウントアップすれば足りる。しかし図4に示す予約状態が設定される場合がある。例えば図4のアドレス1に書き込み完了後にアクノリッジ信号がアクティブになりアドレス生成部130はカウントアップされアドレス2を出力する。
【0032】
このアドレス(レジスタ)2は予約が設定されているため、アクノリッジ信号はアクティブにならない。即ちアドレス生成部130はカウントアップされずに動作停止状態になる。この場合に予約領域認識部150は、クロックカウントを開始する。ペリフェラルからのアクノリッジ信号が所定の時間アクティブにならなかったとき、そのアドレスが予約領域であると認識してスキップ信号151を上記オアゲート140へ送出する。
オアゲート140は予約領域認識部150からスキップ信号を受け入れた時にカウントアップ信号141をアドレス生成部130へ送出する。その結果アドレス生成部130は、カウントアップされアドレス3を出力する。
【0033】
〈具体例2の効果〉
以上説明した具体例2の構成を備えることによって以下の効果を得る。
.ペリフェラルのテストを自動化できる。
.ペリフェラルのアドレスに予約状態がある場合でもテストの自動化が可能になる。
3.24ビットのアドレス信号43(図2)を外部から入力する通常機能端子(外部端子)53(図2)を削除することも可能になる。
【0034】
〈具体例3〉
具体例3は、具体例2の拡張例であって、予約領域認識部が予約状態を認識するための時間を任意に変更するための時間設定回路を備える。
図5は、具体例3の構成のブロック図である。
具体例2との差異のみについて説明する。
図5より、予約領域認識部200は、一例として内部にカウンタ回路210と、時間設定回路220とを備える。
【0035】
カウンタ回路210は、アクノリッジ信号がノンアクティブ状態時に所定数のクロック数をカウントするとオーバフローしてスキップ信号を出力して再度カウント0に戻る部分である。
時間設定回路220は、バスを介して予約領域をスキップするためのカウント数を外部から任意に設定する部分である。即ち予約領域をスキップするための猶予時間を任意に外部から設定する部分である。
オアゲート140からカウントアップ信号を受け入れたアドレス生成部130は、上記具体例2と全く同様の動作を実行することになる。
その他の構成機能は具体例2と同様である。
【0036】
〈具体例3の効果〉
以上説明した構成を備えることによって、具体例2の効果に加えて、予約領域をスキップするための猶予時間を任意に外部から設定することが可能になるため冗長なテストサイクルを減らすことが可能になる。
【0037】
〈具体例4〉
具体例4では、ペリフェラルへの期待値の書き込み、及び読み出しとも共通バスを用いて行い、共通バス用の通常機能端子(外部端子)以外の外部端子を削除することを目的とする。
【0038】
図6は、具体例4の構成のブロック図である。
図6より具体例4のマイクロコントローラテスト回路は、テストレジスタ制御部120と、第一のレジスタ138と、第二のレジスタ139を備える。
テストレジスタ制御部120は、共通バスに接続され、この共通バスを介してマイコンの外部から所定の制御信号と期待値との送受信を可能にする部分である。
【0039】
第一のレジスタ138は、上記テストレジスタ制御部120から期待値を受け入れて、この期待値を一時保持し、固有の信号線を介してペリフェラルへ書き込む部分である。
第二のレジスタ139は、上記ペリフェラルへ期待値の書き込み完了後に固有の信号線を介して期待値を読み出して一時保持し、上記テストレジスタ制御部120へ送出する部分である。
【0040】
具体例4のマイクロコントローラテスト回路では、上記テストレジスタ制御部120と、第一のレジスタ138と、第二のレジスタ139とが、各ペリフェラル毎に配置される。
図6は、一例として第二のペリフェラル13に配置されている状態を表している。
【0041】
次に具体例4のマイクロコントローラテスト回路の動作について説明する。
テスト制御信号61〜64によって、第二のペリフェラル13はテスト状態に制御される。
テストレジスタ制御部120は、テスト制御信号61〜64の値によってテストセレクト信号122、125を制御して、第一のレジスタ138を共通バスから書き込み可能状態にし、第二のレジスタ139を第二のペリフェラル13から読み出し可能状態にする。
【0042】
上記状態でテストを行う。
共通バスを介して第一のレジスタ138へ期待値が書き込まれ一時保持される。この期待値は、セレクタ24を介して第二のペリフェラル13に書き込まれる。
第二のペリフェラル13に書き込まれた期待値は、信号線99を介して第二のレジスタ139へ送られ、一時保持される。
【0043】
この状態でテスト制御信号61〜64の値によってテストセレクト信号127を制御して、第二のレジスタ139を共通バスから読み出し可能にして第二のペリフェラル13に書き込まれた期待値を読み出す。
以上の結果、外部から第二のペリフェラル13をテストすることが可能になる。
【0044】
〈具体例4の効果〉
以上説明した構成を備えることによって、共通バス以外に接続される通常機能端子(外部端子)を削除することが可能になる。
【0045】
〈具体例5〉
具体例5では、具体例4と同様にペリフェラルへの期待値の書き込み、及び読み出しとも共通バスを用いて行い、共通バス用の通常機能端子(外部端子)以外の外部端子を削除することを目的とする他の例に関する。
【0046】
図7は、具体例5の構成のブロック図である。
図7より具体例5のマイクロコントローラテスト回路は、ポートレジスタ制御回路50と、第一のテストレジスタ56と、第2のテストレジスタ57と、テストポート制御部300と、セレクタ301、302とを備える。
ポートレジスタ制御回路50と、第一のテストレジスタ56と、第2のテストレジスタ57と、セレクタ301、302は、各ペリフェラル毎に配置される。
図7は、一例として第二のペリフェラル13に配置されている状態を表している。
【0047】
ポートレジスタ制御回路50は、共通バスに接続され、この共通バスを介してマイクロコントローラの外部から所定の制御信号と期待値との送受信を可能にする部分である。
第一のテストレジスタ56、及び第2のテストレジスタ57は、ポートレジスタ制御回路50とペリフェラルの間に配置され共通バスから期待値を受け入れて一時保持し、この期待値をペリフェラルへ書き込む部分である。更に、ペリフェラルに書き込まれた期待値を読み出して一時保持し、共通バスへ送出する部分でもある。
【0048】
テストポート制御部300は、マイクロコントローラテスト回路を制御してペリフェラルのテストを行う部分である。
セレクタ301、及びセレクタ302は、テストポート制御部300の制御に基づいてテストに必要な信号通路を形成する部分である。
【0049】
次に具体例5のマイクロコントローラテスト回路の動作について説明する。
テスト制御信号61〜64によって第二のペリフェラル13はテスト状態に制御される。
テストポート制御部300は、テスト制御信号61〜64の値によってテストセレクト信号311、312を制御して、第一のテストレジスタ56を共通バスから書き込み可能状態にし、第2のテストレジスタ57を第二のペリフェラル13から読み出し可能状態にする。
【0050】
上記状態でテストを行う。
共通バスを介して第一のテストレジスタ56へ期待値を書き込んで一時保持させる。この期待値は、セレクタ24を介して第二のペリフェラル13に書き込まれる。
第二のペリフェラル13に書き込まれた期待値は、信号線99を介して第2のテストレジスタ57へ送られ、一時保持される。
【0051】
この第2のテストレジスタ57に保持された期待値は、セレクタ59を介して外部端子214へ出力される。
以上の結果、外部から第二のペリフェラル13をテストすることが可能になる。
ここで留意すべき事項は以下の通りである。
セレクタ58、59と、第一のテストレジスタ56と、第2のテストレジスタ57と、ポートレジスタ制御回路50とは、既に説明した比較例(図2)のポート制御回路17(図2)に採用されており、当業者にとって周知の構成部分である。従ってマイクロコントローラテスト回路用として改めて配置する必要はなく、ポート制御回路17(図2)と共用できる。
【0052】
〈具体例5の効果〉
以上説明した構成を備えることによって、具体例4と同様に共通バス以外に接続される通常機能端子(外部端子)を削除することが可能になる。
更に、一部構成要素をポート制御回路と共用できるのでマイクロコントローラテスト回路のIC基板上での占有面積を縮小することができる。
【図面の簡単な説明】
【図1】具体例1の構成のブロック図である。
【図2】比較例の構成のブロック図である。
【図3】具体例2の構成のブロック図である。
【図4】レジスタマップ例説明図である。
【図5】具体例3の構成のブロック図である。
【図6】具体例4の構成のブロック図である。
【図7】具体例5の構成のブロック図である。
【符号の説明】
1 比較部
2 状態監視部
3 選択部
41 リードデータ
42 ライトデータ
112 一致信号
121 外部端子
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcontroller test circuit incorporated for testing peripherals (peripheral circuits) having respective functions inside a microcontroller (hereinafter referred to as a microcomputer) via an external terminal without using a CPU.
[0002]
[Prior art]
In it is difficult to test each pair referrals internal high functionality of the microcomputer proceeds, it is incorporated microcontroller test circuit, through an external terminal to each peripheral itself for each pair referrals without using the CPU The MUX separation method for testing is employed. In this MUX separation method, in order to normally operate the microcontroller test circuit, the test signal from the outside to separate each pair referrals, it is necessary to output a control signal or the like. Therefore, in addition to the common bus connecting each pair referrals, for each pair referrals, lines for inputting and outputting a test signal from the external control signal lines or the like for inputting and outputting a control signal are arranged, each of these lines The external terminal was arranged in.
[0003]
[Problems to be solved by the invention]
Above the prior art, as the number of bits of the common bus is increased, or enough to become many Bae referrals number, the number of number of external terminals required for test, assigning all such external terminals to the normal function terminal The problem to be solved was left to be difficult.
[0004]
[Means for Solving the Problems]
The present invention adopts the following configuration in order to solve the above points.
<Configuration 1>
Built in the microcontroller, for testing a plurality of Bae referrals including microcontroller individually, a microcontroller test circuit for input and output from the outside of the microcontroller a predetermined signal via the external terminals, each and La Itodeta multiple parallel bits written as an expected value at a predetermined address in the peripherals, and in comparison with the reading out has been read data as the expected value of the plurality of parallel bits after write completion, the said write data read data A comparison unit that outputs a coincidence signal when they match, and a state monitoring unit that monitors the operation state of the microcontroller and detects the desired operation state, and connects the output of the comparison unit to the external terminal, the external output of the previous SL coincidence signal through a terminal to luma Lee microcontroller tests In road, comprising an address generator for generating said predetermined address and bus control signals, and sends a skip signal to the address generation unit reserved area recognition unit when the predetermined address was reserved area, the The address generation unit counts when writing of an expected value to the predetermined address is completed and when an acknowledge signal from the predetermined peripheral becomes active after completion of bus reading, or when a skip signal is received from the reserved area recognition unit The reserved area recognition unit recognizes that the predetermined address is a reserved area when the acknowledge signal from the predetermined peripheral is not active for a predetermined time and outputs the skip signal. Microcontroller test characterized by sending to address generator Road.
[0005]
[0006]
<Configuration 2 >
The microcontroller test circuit according to Configuration 1 , wherein the reserved area recognition unit includes a time setting circuit capable of arbitrarily setting the predetermined time from the outside via the external terminal. .
[0007 ]
[0008 ]
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described using specific examples.
<Specific example 1>
FIG. 1 is a block diagram of the configuration of the first specific example.
Before explaining the specific example 1 with reference to FIG. 1, in order to clarify the solution problem of the microcontroller test circuit according to the present invention, the MUX separation method will be described below using a comparative example.
[0010]
FIG. 2 is a block diagram of a comparative example.
2, the peripheral (peripheral circuit) alone having a plurality of respective functions without using the CPU, the test method for testing from the external terminal, i.e. a block diagram of a microcomputer employing the MUX isolation scheme.
As shown in the figure, the microcomputer includes a CPU 11, a first peripheral 12, a second peripheral 13, a third peripheral 14, an address decoder 15, a test circuit 16, a port control circuit 17, selectors 20 to 25, and a test control circuit 26. It consists of
[0011]
The CPU 11 is a microprocessor that controls the entire microcomputer.
First from the third pair referrals 1 2-14 are various functional blocks microcomputer built. The present invention is to test a pair referrals this from individual external terminal to output a predetermined signal. Although only three are described here as an example, an extremely large number of actual microcomputers are incorporated.
[0012]
Address decoder 15 is a part that specifies the address of the test all-out Bae referrals in portion when the test mode.
Test circuit 16 is a part for supplying the control signals necessary to the third pair referrals 1 2-14 from the first to the test mode.
[0013]
The port control circuit 17 is a part that controls input / output of the port. Here is a partial to select a test all-out Bae referrals at the time of the test mode.
The selectors 20 to 25 are input / output switchers.
The test control circuit 26 is a part that controls the common bus in the test mode.
[0014]
As an example of the operation of the microcomputer in the test mode, a case where the second peripheral 13 is tested will be described.
The second peripheral 13 is set to the test mode from the test mode terminals 81 and 82 of the test circuit 16.
[0015]
By this mode setting, the test control signals 61 and 63 become active. When the test control signal 61 becomes active, the CPU 11 releases the common bus. A common bus from this point governs selector 21 and the selector 20 and the test control circuit 26. Here, only one selector 21 is shown in the figure, but in the actual circuit, the read data 41 normally employs a 32-bit data line, so the selector 21 needs 32 bits.
[0016]
The selector 21 connects the read data 41 to a 32-bit normal function terminal (external terminal) 51 when the test control signal 61 becomes active. That is, the output of the second peripheral 13 can be read from the outside.
[0017]
The test control circuit 26 writes a 32-bit normal function terminal (external terminal) 52, a 24-bit normal function terminal (external terminal) 53, and a 2-bit normal function terminal (external terminal) 54 to a 32-bit write. Connected to the data 42, 24-bit address signal 43, and 2-bit bus control signal 44, the expected value (write data), address value, and bus control signal value from each normal function terminal 52 to 54 to the second peripheral 13 are displayed. Enable input from outside.
[0018]
Further, when the test control signal 63 becomes active, the selector 24 selects the normal function terminal (external terminal) 72 and enables input to the second peripheral 13 from the outside. Similarly, the selector 23 selects the output terminal 93 of the second peripheral 13 and enables the output signal value of the second peripheral 13 to be output to the normal function terminal (external terminal) 73.
[0019]
As a result, all signals (including the bus) of the second peripheral 13 can be controlled and tested from the normal function terminals (external terminals) of the chip.
The points to be noted here are as follows.
Here, the number of peripherals is limited to three, but in an actual circuit, the number is extremely large. Therefore, the required quantity of normal function terminals (external terminals) is enormous. It is an object of the present invention to enable testing without increasing the number of normal function terminals (external terminals). Specific examples thereof will be described below.
[0020]
Returning to FIG. 1 again, the configuration of Example 1 will be described.
The specific example 1 aims to reduce the number of normal function terminals (external terminals) 51 of the 32-bit read data 41 (FIG. 2).
In the following description, read data and write data are limited to 32 bits as an example.
[0021]
As shown in FIG. 1, the microcontroller test circuit of the first specific example includes a comparison unit 1, a state monitoring unit 2, and a selection unit 3.
Comparing section 1, Bae and referrals write data 42 to write the parallel 32-bit expected value at a predetermined address (register) Le (Fig. 2), parallel 32 bit read to read the expected value written after completion of writing data 41 (FIG. 2) is a part that outputs a coincidence signal when they coincide.
[0022]
Here, 32 bits of write data 42 (FIG. 2) and 32 bits of read data 41 (FIG. 2) are compared, and when all 32 bits match, that is, a predetermined address (register) operates normally. A coincidence signal is output when it is confirmed.
[0023]
The state monitoring unit 2 is a part that outputs the coincidence signal of the comparison unit when the operation state of the microcomputer is monitored and a desired operation state is detected.
As an example, it is constituted by a three-input AND gate 102. When the acknowledge signal 40 and the bus control signal 44 are received, the coincidence signal 111 is passed.
[0024]
Reading to a predetermined address (register) is instructed by the bus control signal 44, and when the reading is completed, the acknowledge signal 40 becomes active. This is because the match between the write data 42 (FIG. 2) and the read data 41 (FIG. 2) can be confirmed for the first time in this state.
[0025]
The selection unit 3 is a part for outputting the coincidence signal to the normal function terminal (external terminal) 121 by the test control signal 61 output from the test circuit 16 (FIG. 2).
With this configuration, the normal function terminal (external terminal) 51 required for 32 bits can be replaced with a 1-bit normal function terminal (external terminal) 121 as described in the comparative example.
[0026]
<Effect of specific example 1>
With the configuration of the specific example 1 described above, the normal function terminal (external terminal) 51 required for 32 bits can be replaced with a 1-bit normal function terminal (external terminal) 121.
[0027]
<Specific example 2>
In specific example 2, an address generation unit is provided inside for the purpose of automating the test.
FIG. 3 is a block diagram of the configuration of the second specific example.
As shown in FIG. 3, the microcontroller test circuit of the specific example 2 includes an address generation unit 130, an OR gate 140, and a reserved area recognition unit 150.
[0028]
Address generator 130, Bae when referrals acknowledge signal after completion of the writing of the expected value at a predetermined address (register) of Le is activated, or after counted up when receiving a skip signal from the reservation area recognition unit to be described This is the part that outputs the address.
[0029]
Reserved area recognition unit 150, when the acknowledge signal pair referrals or we did not activate a predetermined time, the skip signal recognizes that the address is a reserved area in the portion to be sent to the address generator 130 is there. This predetermined time is set in advance in a clock counter disposed therein. When a predetermined number of clocks are counted while the acceptance of the acknowledge signal is stopped, the reserved area recognition unit 150 overflows, outputs a skip signal, and returns to count 0 again.
[0030]
OR gate 140, an address count-up signal 141 when the acknowledge signal after completion of writing of the expected value of accepted skip signal 151 from the time it is active, or reserved area recognition unit 150 at a predetermined address in Bae referrals (register) This is a part sent to the generation unit 130.
[0031]
An address generation operation of the address generation unit 130 will be described.
FIG. 4 is an explanatory diagram of a register map example.
Normally, when expected values are written to predetermined addresses (registers) in the order of addresses, it is sufficient for the address generator 130 to count up each time an acknowledge signal becomes active. However, the reservation state shown in FIG. 4 may be set. For example, the acknowledge signal becomes active after writing to address 1 in FIG. 4 is completed, and the address generator 130 counts up and outputs address 2.
[0032]
Since this address (register) 2 is reserved, the acknowledge signal is not activated. That is, the address generation unit 130 enters an operation stop state without being counted up. In this case, the reserved area recognition unit 150 starts clock counting . When Bae referrals or we acknowledge signal does not become active a predetermined time, and sends a skip signal 151 recognizes that the address is a reserved area to said OR gate 140.
The OR gate 140 sends a count-up signal 141 to the address generation unit 130 when it receives a skip signal from the reserved area recognition unit 150. As a result, the address generation unit 130 counts up and outputs address 3.
[0033]
<Effect of specific example 2>
The following effects are acquired by providing the structure of the specific example 2 demonstrated above.
1 . Bae referrals can automate the testing of Le.
2 . It is possible to automate the test even if the address of the pair referrals there is a reservation state.
3. It is also possible to delete the normal function terminal (external terminal) 53 (FIG. 2) for inputting the 24-bit address signal 43 (FIG. 2) from the outside.
[0034]
<Specific example 3>
Specific example 3 is an extended example of specific example 2 and includes a time setting circuit for arbitrarily changing the time for the reserved area recognition unit to recognize the reserved state.
FIG. 5 is a block diagram of the configuration of the third specific example.
Only differences from the second specific example will be described.
As shown in FIG. 5, the reserved area recognition unit 200 includes a counter circuit 210 and a time setting circuit 220 as an example.
[0035]
The counter circuit 210 is a portion that overflows when a predetermined number of clocks are counted when the acknowledge signal is in an inactive state, outputs a skip signal, and returns to the count of 0 again.
The time setting circuit 220 is a part that arbitrarily sets a count number for skipping a reserved area via the bus. That is, this is a part for arbitrarily setting a grace time for skipping the reserved area from the outside.
The address generator 130 that has received the count-up signal from the OR gate 140 performs the same operation as in the second specific example.
Other constituent functions are the same as those in the second specific example.
[0036]
<Effect of specific example 3>
By providing the configuration described above, in addition to the effect of the second specific example, it is possible to arbitrarily set a grace period for skipping the reserved area from the outside, so that it is possible to reduce redundant test cycles. Become.
[0037]
<Specific Example 4>
In Example 4, the writing of an expected to Bae referrals, and also reads performed using a common bus, and an object thereof is to remove the external terminal other than the normal function terminal for the common bus (external terminals).
[0038]
FIG. 6 is a block diagram of the configuration of the fourth specific example.
6, the microcontroller test circuit of the fourth specific example includes a test register control unit 120, a first register 138, and a second register 139.
The test register control unit 120 is connected to a common bus, and is a part that enables transmission and reception of predetermined control signals and expected values from the outside of the microcomputer via the common bus.
[0039]
The first register 138 receives an expected value from the test register control unit 120, the expected value temporarily holding a part to be written in the pair referrals via specific signal line.
The second register 139 holds temporarily read an expected value over a specific signal line after completion writing expectations onto Kipe referrals, a part to be sent to the test register control unit 120.
[0040]
The microcontroller test circuit embodiment 4, and the test register control unit 120, a first register 138, a second register 139 is arranged for each pair referrals.
Figure 6 shows a state which is arranged as an example in the second pair referrals 1 3.
[0041]
Next, the operation of the microcontroller test circuit of Example 4 will be described.
The test control signal 61 to 64, the second pair referrals 1 3 is controlled in the test state.
Test register control unit 120 controls the test select signal 122, 125 by the value of the test control signal 61 to 64, the first register 138 from the common bus to the write enable state, the second register 139 second to readable state from Bae referrals 1 3.
[0042]
Test in the above state.
The expected value is written to the first register 138 via the common bus and temporarily held. The expected value is written to the second pair referrals 1 3 via the selector 24.
Expected value written in the second pair referrals 1 3 is sent through a signal line 99 to the second register 139, and is temporarily held.
[0043]
And controls the test select signal 127 by the value of the test control signal 61 to 64 in this state, reads out the second pair referrals expected value written in the LE 1 3 the second register 139 to be read from the common bus .
As a result, it is possible to test a second pair referrals 1 3 from the outside.
[0044]
<Effect of specific example 4>
With the configuration described above, it is possible to delete the normal function terminals (external terminals) connected to other than the common bus.
[0045]
<Specific example 5>
In Example 5, the writing of an expected to similarly Bae referrals as in example 4, and also reads performed using a common bus, to remove the external terminal other than the normal function terminal for the common bus (external terminals) Regarding other examples aimed at.
[0046]
FIG. 7 is a block diagram of the configuration of the fifth specific example.
7, the microcontroller test circuit of Example 5 includes a port register control circuit 50, a first test register 56, a second test register 57, a test port control unit 300, and selectors 301 and 302. .
A port register control circuit 50, a first test register 56, a second test register 57, a selector 301, 302 are disposed for each pair referrals.
Figure 7 shows a state which is arranged as an example in the second pair referrals 1 3.
[0047]
The port register control circuit 50 is connected to a common bus, and is a part that enables transmission and reception of a predetermined control signal and an expected value from the outside of the microcontroller via the common bus.
First test register 56, and a second test register 57 is arranged between the port register control circuit 50 and the pair referrals and held temporarily accept the expected value from the common bus, the expected value to Bae referrals The part to write. Furthermore, temporarily held by reading the expectation value written to Bae referrals, it is also a part sends to the common bus.
[0048]
Test port control unit 300 is a part for performing tests Bae referrals controls the microcontroller test circuit.
The selector 301 and the selector 302 are portions that form signal paths necessary for the test based on the control of the test port control unit 300.
[0049]
Next, the operation of the microcontroller test circuit of Example 5 will be described.
The second pair referrals 1 3 by the test control signal 61 to 64 is controlled in the test state.
The test port control unit 300 controls the test select signals 311 and 312 according to the values of the test control signals 61 to 64, makes the first test register 56 writable from the common bus, and sets the second test register 57 to the second test register 57. to readable state from the second pair referrals 1 3.
[0050]
Test in the above state.
An expected value is written to the first test register 56 via the common bus and temporarily held. The expected value is written to the second pair referrals 1 3 via the selector 24.
Expected value written in the second pair referrals 1 3 is sent to a second test register 57 via the signal line 99, and is temporarily held.
[0051]
The expected value held in the second test register 57 is output to the external terminal 214 via the selector 59.
As a result, it is possible to test a second pair referrals 1 3 from the outside.
The matters to be noted here are as follows.
The selectors 58 and 59, the first test register 56, the second test register 57, and the port register control circuit 50 are employed in the port control circuit 17 (FIG. 2) of the comparative example (FIG. 2) already described. And are well known components to those skilled in the art. Therefore, it is not necessary to arrange again for the microcontroller test circuit, and it can be shared with the port control circuit 17 (FIG. 2).
[0052]
<Effect of Specific Example 5>
By providing the configuration described above, it is possible to delete the normal function terminals (external terminals) connected to other than the common bus as in the fourth specific example.
Furthermore, since some components can be shared with the port control circuit, the area occupied by the microcontroller test circuit on the IC substrate can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram of a configuration of a specific example 1;
FIG. 2 is a block diagram of a configuration of a comparative example.
FIG. 3 is a block diagram of a configuration of specific example 2;
FIG. 4 is an explanatory diagram of a register map example;
FIG. 5 is a block diagram of a configuration of specific example 3;
FIG. 6 is a block diagram of a configuration of a specific example 4;
FIG. 7 is a block diagram of a configuration of a specific example 5;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Comparison part 2 State monitoring part 3 Selection part 41 Read data 42 Write data 112 Match signal 121 External terminal

Claims (2)

マイクロコントローラに内蔵され、マイクロコントローラが含む複数のペリフェラルを個別にテストするため、外部端子を介して所定の信号を前記マイクロコントローラの外部から入出力するマイクロコントローラテスト回路であって、
前記ペリフェラルの所定のアドレスに期待値として書き込まれる複数並列ビットのライトデータと、書き込み完了後に前記複数並列ビットの期待値として読み出されたリードデータと比較して、前記ライトデータと前記リードデータとが一致したとき一致信号を出力する比較部と、
前記マイクロコントローラの動作状態を監視して所望の動作状態を検知した時に前記比較部の出力を前記外部端子へ接続する状態監視部とを備え、
前記外部端子を介して前記一致信号を出力するマイクロコントローラテスト回路において、
前記所定のアドレス及びバス制御信号を生成するアドレス生成部と、前記所定のアドレスが予約領域であったときに前記アドレス生成部にスキップ信号を送出する予約領域認識部とを備え、
前記アドレス生成部は、
前記所定のアドレスに期待値の書き込み完了、及びバス読み出し完了後に前記所定のペリフェラルからのアクノリッジ信号がアクティブになった時、又は前記予約領域認識部からスキップ信号を受け入れた時カウントアップしたアドレスを出力し、
前記予約領域認識部は、
前記所定のペリフェラルからのアクノリッジ信号が所定の時間アクティブにならなかったとき前記所定のアドレスが予約領域であると認識して前記スキップ信号を前記アドレス生成部へ送出することを特徴とするマイクロコントローラテスト回路。
Built in the microcontroller, for testing a plurality of Bae referrals including microcontroller individually, a microcontroller test circuit for input and output from the outside of the microcontroller a predetermined signal via an external terminal,
Compared the and La Itodeta multiple parallel bits written as an expected value at a predetermined address of the peripherals, and read out by the read data as an expected value of the plurality of parallel bits after completion of writing, the write data and the read A comparator that outputs a match signal when the data matches,
A state monitoring unit that monitors the operation state of the microcontroller and detects the desired operation state, and connects the output of the comparison unit to the external terminal;
In the output to the luma Lee microcontroller test circuit before Symbol coincidence signal through the external terminal,
An address generation unit that generates the predetermined address and bus control signal; and a reserved area recognition unit that sends a skip signal to the address generation unit when the predetermined address is a reserved area;
The address generation unit
Outputs the address counted up when the write of the expected value to the predetermined address is completed and the acknowledge signal from the predetermined peripheral becomes active after completion of the bus read, or when the skip signal is received from the reserved area recognition unit And
The reserved area recognition unit
A microcontroller test characterized in that when the acknowledge signal from the predetermined peripheral is not active for a predetermined time, the predetermined address is recognized as a reserved area and the skip signal is sent to the address generator. circuit.
請求項に記載のマイクロコントローラテスト回路において、
前記予約領域認識部は、
前記外部端子を介して前記所定の時間を外部から設定可能な時間設定回路を備えることを特徴とするマイクロコントローラテスト回路。
The microcontroller test circuit of claim 1 , wherein
The reserved area recognition unit
Microcontroller test circuit, characterized in that it comprises a time setting circuit capable of setting a predetermined time from an external via the external terminals.
JP2000175014A 2000-06-12 2000-06-12 Microcontroller test circuit Expired - Fee Related JP4193336B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000175014A JP4193336B2 (en) 2000-06-12 2000-06-12 Microcontroller test circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000175014A JP4193336B2 (en) 2000-06-12 2000-06-12 Microcontroller test circuit

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008105492A Division JP2008176822A (en) 2008-04-15 2008-04-15 Microcontroller testing circuit

Publications (2)

Publication Number Publication Date
JP2001357024A JP2001357024A (en) 2001-12-26
JP4193336B2 true JP4193336B2 (en) 2008-12-10

Family

ID=18676955

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000175014A Expired - Fee Related JP4193336B2 (en) 2000-06-12 2000-06-12 Microcontroller test circuit

Country Status (1)

Country Link
JP (1) JP4193336B2 (en)

Also Published As

Publication number Publication date
JP2001357024A (en) 2001-12-26

Similar Documents

Publication Publication Date Title
US8275579B2 (en) Communication of a diagnostic signal and a functional signal by an integrated circuit
US5005172A (en) Diagnostic system in a data processing system
CN109164374B (en) Chip and chip test system
JP4193336B2 (en) Microcontroller test circuit
US7080191B2 (en) Method and system for accessing memory devices
CN110750406A (en) Detection method and device and SOC chip
US7188010B2 (en) Device and method for converting a diagnostic interface to SPI standard
JP3735699B2 (en) Input / output circuit of high-speed semiconductor memory device and high-speed semiconductor memory device
JP4116805B2 (en) Internal bus test device and internal bus test method
JP2008176822A (en) Microcontroller testing circuit
US7395520B2 (en) LSI apparatus
JP2004185619A (en) System and method for switching clock source
JPH0520474A (en) One chip microcomputer
JPH01270684A (en) Testing system of lsi
JP4174272B2 (en) Device controller
CN115840592A (en) Flash access method, controller, system and readable storage medium
JP2002063078A (en) F/w access processing device
JP3975587B2 (en) Internal signal observation circuit
JP3177975B2 (en) One-chip microcomputer
SU1195351A1 (en) Device for exchanging information between microcomputer and peripherals
JP3117984B2 (en) Semiconductor nonvolatile memory device
RU1833920C (en) Device for memory unit check
CN112825063A (en) Joint test work group transmission system
JP3702592B2 (en) Pulse generator, multi-chip module and single-chip microcomputer
JP2004362157A (en) Semiconductor device, method for allocating its address, and method for controlling semiconductor device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060831

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060831

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080415

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

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111003

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20111003

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees