JP4171240B2 - Program verification system - Google Patents

Program verification system Download PDF

Info

Publication number
JP4171240B2
JP4171240B2 JP2002123082A JP2002123082A JP4171240B2 JP 4171240 B2 JP4171240 B2 JP 4171240B2 JP 2002123082 A JP2002123082 A JP 2002123082A JP 2002123082 A JP2002123082 A JP 2002123082A JP 4171240 B2 JP4171240 B2 JP 4171240B2
Authority
JP
Japan
Prior art keywords
program
virtual
verification
data
ram
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
JP2002123082A
Other languages
Japanese (ja)
Other versions
JP2003316603A (en
Inventor
克己 鶴本
司 永木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2002123082A priority Critical patent/JP4171240B2/en
Publication of JP2003316603A publication Critical patent/JP2003316603A/en
Application granted granted Critical
Publication of JP4171240B2 publication Critical patent/JP4171240B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ICEを用いてマイコンプログラムの動作検証を行うプログラム検証システムであって、特に、プログラム実行に必要な周辺デバイスとして実機デバイスと仮想デバイスとを用いるプログラム検証システムに関する。
【0002】
【従来の技術】
図15に、従来の実機デバッグセットの一例を示す。図15に示すように、シングルチップマイコン制御用アプリケーションプログラムの評価は、ターゲットとなるシングルチップマイコンの代わりに、シングルチップマイコンの全機能をエミュレートできるインサーキットエミュレータ(以下ICEと称する)400をデバッグボード18に組み込んだものを、ハードウエアで構成された実機デバッグセット(周辺デバイス120)に接続して行われていた。
【0003】
しかし、このようなデバッグセットを用いる場合、プログラムのテストを行うためには、システムを動作させるハードウエアが先行完成していることが必須条件であるため、ソフトウエア開発の工程がハードウエア開発の進捗状況に大きく左右されるという問題があった。
【0004】
この問題を解決するために、ターゲットとなるシングルチップマイコンのシミュレーションおよび周辺デバイスのシミュレーションを行うことで、実機を使わずに、プログラムを評価する方法が提案されている。
【0005】
このようなシミュレーション方法の一例が、例えば特開平9−114700号公報に開示されている。特開平9−114700号公報に開示されたシステムは、テスト/デバッグの対象となる組込みソフトウエアと、マイクロプロセッサユニット(MPU)およびメモリを模擬するMPUシミュレータと、入出力を模擬する入出力装置模擬部と、MPUと1つ以上の入出力装置を接続する信号線を模擬する入出力装置実行制御機構と、シミュレータの起動順序を記述した起動定義ファイルと、I/OモニタとI/Oモデルのプロセスを起動/終了する手段と、ユーザが全てのI/Oモデルのリソース情報を参照・変更できる手段と、I/OモデルとI/Oモニタの接続関係を表示する手段を持つ入出力模擬部操作環境とで構成されている。それぞれの構成要素は、複数のプロセスで構成され、仮想配線にて接続されている。このシミュレーション方法では、図16に示す通り、実機周辺デバイス120を全て仮想デバイス100にて実現する。
【0006】
また、実機デバッグ方法とシミュレータデバッグ方法の両方の良いところを合わせた実機・シミュレータ混載システムの一例が、特開平8−6810号公報に開示されている。特開平8−6810号公報に開示されたシステムは、図17に示す通り、ICE64を利用した実機デバッグセットと、仮想デバイス(シミュレーション部50)との混載システムである。このシステムでは、シミュレーション部50とICE64との入出力データの受渡しは、専用の実機インターフェースボード60を用いて実現されている。
【0007】
【発明が解決しようとする課題】
しかし、従来の実機・シミュレータ混載システムでは、図17に示したように、仮想デバイスとICEとの入出力データの受渡しを実現するために、専用のインターフェースボード60を必要とする。このため、周辺デバイスの仕様変更等が発生した場合は、それに合わせてインターフェースボードを設計変更するために費用と時間が必要となり、プログラムのデバッグおよび検証を効率良く行えないという問題があった。
【0008】
本発明は、上記の問題を解決するために、実機デバイスおよび仮想デバイスを周辺デバイスとして用いる場合に、効率良くプログラムの検証を行うことが可能なプログラム検証システムを提供することを目的とする。
【0009】
【課題を解決するための手段】
上記の目的を達成するために、本発明にかかるプログラム検証システムは、マイコンの周辺デバイスとして実機デバイスおよび仮想デバイスを用いて、前記マイコン用プログラムの動作を検証するプログラム検証システムであって、前記マイコン上の前記プログラムの動作をエミュレーションするエミュレータと、前記実機デバイスに対応した検証動作を行うよう前記エミュレータを制御する検証制御部と、前記検証制御部と前記仮想デバイスとの間に設けられ、前記仮想デバイスからの制御信号およびデータを前記検証制御部に適合させるブリッジ部と、前記実機デバイスと前記プログラムとの間の入出力データを格納する実機用RAMと、前記実機用RAMと前記仮想デバイスとの間に設けられた同期化RAMと、前記実機デバイスに対する前記プログラムの入出力動作に同期させて、前記同期化RAMと前記実機用RAMとの間のデータ転送を制御する、仮想・実機同期処理部とを備えたことを特徴とする。
【0010】
この構成は、実機のハードウェア開発よりもプログラム開発の方が先行した場合でも、実機デバイスの完成を待たずにプログラム検証を可能とするために、既存の実機デバイスの仕様に対応した検証制御部と、新規プログラムに対応する実機デバイスの仕様をソフトウェアによりシミュレーションする仮想デバイスとの間に、この仮想デバイスからの制御信号やデータを検証制御部に適合させるべく例えばコマンドやデータの変換等を行うブリッジ部を設けたものである。これにより、実機デバイスの完成を待たずに、新規プログラムの検証を行うことが可能となる。また、実機デバイスと仮想デバイスとの動作速度の違いを吸収するために、プログラムが使用する実機用RAMとは別に、同期化を行うための同期化RAMを設ける。さらに、同期化RAMと実機用RAMとのデータ転送を同期制御するために仮想・実機同期処理部を設ける。
【0011】
これにより、例えば、主機能が共通であるがユーザインターフェース周り(操作と表示に関する部分)の仕様にバリエーションを有する、いわゆる展開機種の開発を行うような場合に、新たにデバッグ用の実機セットをハードウェアで作らずとも、既存の実機セットを利用しつつ仮想デバイスでシミュレーションすることが可能となる。また、従来のように、仮想デバイスとICEとの間で入出力データを受け渡しするための、専用のインターフェースボードを作成する必要もない。以上のように、本発明によれば、実機デバッグセットの完成を待たずして、効率良くプログラムの開発を行うことが可能なプログラム検証システムを提供できる。
【0012】
前記プログラム検証システムにおいて、前記仮想デバイスと前記ブリッジ部とを仮想配線により接続した構成とすることが好ましい。また、前記仮想デバイスを各機能毎に分けて複数備えた構成とすれば、他の自動検証システムにも各デバイスの再利用が容易に行えるという利点がある。
【0013】
前記プログラム検証システムにおいて、前記実機デバイスにてモニタ出力される実機モニタ出力画像を撮影する撮影装置と、前記実機モニタ出力画像と前記仮想デバイスにてモニタ出力される仮想モニタ出力画像とを検証結果ファイルへ記録する検証結果書込部とをさらに備えた構成とすることが好ましい。
【0014】
この構成によれば、例えば、新規プログラムを搭載すべき実機デバイスの試作機が完成した場合等に、プログラム検証のために当該実機デバイスの仕様に対応させて準備した仮想デバイスを利用して、完成した実機デバイスの動作検証を行うことができる。すなわち、同じ仕様の実機デバイスおよび仮想デバイスを動作させ、それらのモニタ出力画像を検証結果ファイルへ書き込む。これにより、開発担当者が、検証結果ファイルに書き込まれたモニタ出力画像を比較することにより、実機デバイスが目的の仕様を満たしているか否かを判定できる。また、異常があった場合、実機デバイスおよびプログラムのどちらに問題があるのかを把握することが容易になる。
【0015】
さらに、この好ましい構成において、前記周辺デバイスにおける所定の変化を検出するイベント検出部と、前記イベント検出部の検出結果に従ったタイミングで、前記実機モニタ出力画像と前記仮想モニタ出力画像とを取り込む画像取得部とをさらに備えれば、例えば実機デバイスおよび仮想デバイスにおける入出力タイミングに合わせてモニタ出力画像を取り込むことができ、さらに効率良く検証を行うことが可能となる。
【0016】
さらに、前記撮影装置を複数台備えた構成とすれば、より多くの情報を検証結果ファイルへ記録することが可能となり、例えば実機デバイスを複数種類有する機器等の検証の際に、検証精度を向上させることができる。
【0017】
また、前記イベント検出部の検出結果に従い、前記実機モニタ出力画像または仮想モニタ出力画像を含む検証処理状況を検証処理状況を外部端末へ送信する検証状況配信部をさらに備えた構成とすることが好ましい。これにより、検証作業担当者が遠隔地に居る場合でも、リアルタイムで正確な情報が掴める。さらに、携帯情報端末等の外部端末から、制御信号およびその宛先を含むメッセージを受信し、受信したメッセージから前記制御信号を抽出し、当該制御信号の宛先へ配信するリモート制御部をさらに備えた構成とすればなお好ましい。これにより、プログラム自動検証作業中に何らかの問題が発生した場合に、プログラム検証システムをリモート制御することが可能となり、効率良いデバッグおよび検証が可能になる。
【0018】
また、前記した各構成にかかるプログラム検証システムにおいて、プログラムを自動的に検証するための操作手順を記録したシナリオファイルからデータを読み込み、前記ブリッジ部へ転送するシナリオ制御部をさらに備えたことが好ましい。
【0019】
この構成によれば、予め検証すべき操作手順が記録されたシナリオファイルからデータを読み込むことにより、仮想デバイスまたは実機デバイスから検証用の操作を行う必要がなくなり、本プログラム検証システムに自動的に検証作業を実行させることが可能となる。これにより、プログラム検証効率をさらに向上させることができる。
【0020】
また、前記シナリオファイルから読み込んだデータの前記ブリッジ部への転送を、前記エミュレータの動作状況に合わせて制御するタイミング制御部をさらに備えた構成とすれば、なお好ましい。この構成によれば、例えば何らかの要因によりエミュレータが異常動作した場合等にも、タイミング制御部が、例えばシナリオファイルを再度読み込んでブリッジ部へ転送する等の制御を行う。これにより、自動検証作業の信頼性が向上する。
【0021】
【発明の実施の形態】
最初に、以下の各実施形態で共通する構成および用語について、図1を参照しながら説明する。
【0022】
プログラム414は、マイコン上で動作するプログラムとして開発されたものであり、本発明にかかるプログラム検証システムにおいてデバッグ対象となるプログラムである。
【0023】
実機プログラム410とは、デバッグ対象のプログラム414と、同期化プログラム412とを含む。同期化プログラム412は、実機のマイコンには搭載されず、プログラム検証システムにおいてのみ用いられ、後に詳述するが、仮想デバイス100からユーザRAM402へのデータ書き込みを、実機デバイス150からのデータ書き込みと同期させる処理を行う。
【0024】
周辺デバイス120とは、プログラム414の動作検証に必要な入出力デバイスであり、実機デバイス150と仮想デバイス100とを含む。実機デバイス150とは、プログラム414が搭載される実機の入出力デバイス(ハードウェアそのもの)である。これに対して、仮想デバイス100は、プログラム414が搭載される実機のハードウェアをソフトウェアでシミュレーションするものである。
【0025】
ICE400は、プログラム414を実行検証するために、プログラム414が搭載される実機の組み込みマイコンをエミュレートするインサーキットエミュレータ(in circuit emulator)であり、マイコンエミュレータ406、ユーザRAM402、および同期化RAM404を含む。ユーザRAM402は、実機デバイス150とプログラム414との間の入出力データを格納するRAMであり、同期化RAM404は、後に詳述するが、仮想デバイス120からユーザRAM402へ書き込むべきデータを一時的に格納するRAMである。
【0026】
ICE400の動作は、デバッガ500により制御される。デバッガ500は、ブリッジ504およびICEデバッガ506(検証制御部)を含む。ICEデバッガ506は、実機デバイス150の仕様に対応した検証動作をICE400に実行させるように設計されている。これに対して、ブリッジ504は、実機デバイス150の代わりに仮想デバイス100を入出力デバイスとして用いた検証動作を可能とするために、仮想デバイス100とICE506との間で制御コマンドの変換等を行うものであり、ソフトウェアで実現される。
【0027】
すなわち、本実施形態にかかるプログラム検証システムは、実機のハードウェア開発よりもプログラム開発の方が先行した場合でも、実機デバイスの完成を待たずにプログラム検証を可能とするために、既存の実機デバイス150およびICEデバッガ506を用いながら、新規プログラム(プログラム414)に対応する実機デバイスの仕様をソフトウェアによりシミュレーションする仮想デバイス100と、この仮想デバイス100をICEデバッガ506に適合させるブリッジ504とを設けたものである。
【0028】
仮想配線206とは、仮想デバイス120とデバッガ500、並びに後の実施形態で説明する自動検証制御部等を、仮想的に接続する配線である。仮想デバイス100およびデバッガ500等を複数のパーソナルコンピュータで実現した場合は、この仮想配線206として、ネットワーク、USB、RS232C、IEEE1394を使用できる。また、仮想デバイス100およびデバッガ500等を、一台のパーソナルコンピュータ内で単独実行可能な複数のアプリケーションまたはプロセスとして実現した場合は、仮想配線206は、アプリケーションまたはプロセス間にて通信可能なDDE、COM等のデータ通信機能を利用して実現できる。なお、仮想配線206の具体的な実施形態は、本発明の発明者らによってなされた発明にかかる先の出願(特願2001−219887号)に、詳しく開示されている。
【0029】
仮想配線206による通信方法は、非同期通信または同期通信のどちらでもよい。非同期通信とは、データを通信相手に一方的に送信するだけで、返信がない通信方法である。同期通信とは、データを通信相手に送信した後、通信相手から返信データが返ってくるまで待っている通信方法である。
【0030】
HTAとは、HTML Applicationsの略で、Webページで実行可能なさまざまな機能(HTML、CSS、スクリプト言語(Java(登録商標、以下略)Script、VBA等)、Behavior)をサポートする。
【0031】
ActiveXとは、Internet対応のOLEドキュメントオブジェクトであるActiveXドキュメントや、Internetアクセス機能を持ったクライアントアプリケーションを開発するためのAPIである。
【0032】
OLEとは、Object Linking and Embeddingの略で、アプリケーションが別のアプリケーションの機能を呼出して自分自身の機能のように利用したりできる。後述の実施形態では、HTAからMicrosoft社のExcelアプリケーションを利用する例を説明する。
【0033】
(第1実施形態)
以下、本発明の一実施形態について、図を用いて説明する。
【0034】
本実施形態にかかるプログラム検証システムは、仮想デバイス100とICE400との間の入出力データの転送および同期化を全てソフトウエアで実現し、周辺デバイス120およびICE400等をそれぞれ仮想配線206上に接続することで、プログラム414の検証目的に合わせて柔軟な対応を可能にしたシステム構成である。すなわち、図17に示したような、ICE64とシミュレーション部50との間に、ハードウエアで実現した専用のI/F60を有する従来のシステムとは異なる構成である。
【0035】
<システム構成>
本実施形態にかかるプログラム検証システムでは、図1等に示す通り、プログラム414の動作に必要な周辺デバイス120は、仮想デバイス100および実機デバイス150により構成される。また、仮想デバイス100およびデバッガ500は、共に、仮想配線206に接続されている。
【0036】
<初期化処理>
本プログラム検証システムは、起動すると、初期化処理を行う。初期化処理において、仮想デバイス100およびデバッガ500は、仮想配線206に接続するための接続処理を行う。また、デバッガ500のブリッジ504は、予め、仮想デバイス100の仮想入力102および仮想出力104からのメッセージ受信を行うために、受信割込み許可しておく。また、ICE400は、予め、プログラム414を実行状態にしておく。
【0037】
<仮想入力からICEへのデータ転送>
仮想入力102からICE400へのデータ転送は、以下の(a1)〜(a3)のとおりに実行される。
【0038】
(a1)仮想入力から仮想配線へのデータ送出;
仮想入力102にて発生した入力イベントは、デバッガ500へのRAM書込みメッセージ転送を指定し、入力イベントデータを書込む同期化RAM404のRAMアドレスとRAMデータとを、バススロット106経由で、仮想配線206へ同期通信にて送出する。
【0039】
(a2)ブリッジの書込み処理;
仮想入力102から、仮想配線206およびバススロット502経由でブリッジ504に送られて来たメッセージは、図2に示す通り、ブリッジ504内で受信割込み処理を行う同期受信部550で受け取られる。その後、コマンド変換部552が、仮想入力102からのメッセージをICEデバッガ506が処理できるフォーマットに適合させるために、図3に示すようなメッセージ一覧表に従い、受け取ったメッセージが、1バイトメモリライト、1バイトメモリリード、ICEリセット、ICE実行等のどのメッセージであるかを分析する。コマンド発行部554は、その分析結果を、ICEデバッガ506内のVirtualLink560に渡す。
【0040】
VirtualLink560は、実機デバイス150の仕様に対応した検証動作を行うように設計されている既存デバッガ562を制御して、プログラム実行中のICE400内の同期化RAM404に、仮想入力102から渡された指定RAMアドレスのRAMデータを、オンザフライにて書込む。その後、同期受信部550が、前記メッセージへの返信としての書込み完了通知を、メッセージの送信元である仮想入力102へ返信する。なお、「オンザフライ」とは、プログラム414が実行中でも、ICE400内のユーザRAM402と同期化RAM404のRAMデータ、およびマイコンエミュレータ406内のレジスタの読書きを可能とする、ICE400の機能である。
【0041】
(a3)同期化RAMからユーザRAMへの転送処理;
同期化プログラム412は、マイコンエミュレータ406に、同期化RAM404に書込まれたデータの変化を、プログラム414に必要なタイミングでチェックさせている。
【0042】
同期化プログラム412は、例えばキー入力の場合は、プログラム414のキー入力処理の直後に呼ばれ、キー入力データにより同期化RAM404に生じる変化をマイコンエミュレータ406経由でチェックし、変化が有れば、キー入力データを、ユーザRAM402内に設けられたキー入力データ確定エリアに転送する。なお、仮想入力102のキーデータと実機入出力156からのキー入力データとが同時に入力された場合は、仮想キーデータが優先される。この処理の順番は、用途に合わせて、実機デバイス150からのキー入力データを優先する変更も可能である。
【0043】
同期化プログラム412内のキー入力処理は、具体的には、図4に示す通り、プログラム414から同期化プログラム412を呼出すことにより開始される(ステップS400)。まず、マイコンエミュレータ406経由にて仮想デバイス100から転送され同期化RAM404に格納されているキー入力データを読込み(ステップS402)、キー入力データの変化をチェックする(ステップS404)。
【0044】
もし変化が有れば、キー入力データを、ユーザRAM402内に設けられた実機キー入力データ確定エリアに上書きする(ステップS406)。実機キー入力データ確定エリアとは、ユーザRAM402において、実機入出力156からキー入力されて確定されたデータが記録されるべき領域である。このように、実機キー入力データ確定エリアに仮想デバイス100からのキー入力を上書きすることにより、仮想キー入力が、実機キー入力より優先されて処理される。
【0045】
また、同期化RAM404内の仮想デバイスから転送されたキーデータをクリアし(ステップS408)、周期的に呼ばれるキー処理にて連続データ処理されない様に対応している。もし連続キーを有効にする場合は、このステップS408を削除して、仮想入力102からキー押下時にONキーデータを送信し、キーが離された時に、OFFキーデータを送信する様にすれば良い。
【0046】
<ユーザRAMから仮想出力へのデータ転送>
一方、仮想入力102からの入力データ等によって、プログラム414がユーザRAM402内の出力RAMデータを変更した場合、この出力RAMデータをユーザRAM402から仮想出力104へ転送する手順は、以下の(b1)〜(b4)のとおりである。
【0047】
(b1)プログラムのユーザRAM変更;
プログラム414により、ユーザRAM402内の仮想出力104に関係するRAMデータが変更された直後に、ユーザRAM402から同期化RAM404内の特定RAMに変化を伝えるための処理を行う。具体的には、図5に示す通り、プログラム414から仮想同期化プログラムを呼び出すことにより、処理を開始する(ステップS420)。プログラム414からユーザRAM402への出力処理(ステップS422)を行った直後に、ユーザRAM402における出力RAMデータの変化を検出し(ステップS424)、変化があれば、出力RAMデータをユーザRAM402から同期化RAM404内に転送する(ステップS426)。
【0048】
(b2)仮想出力から仮想配線へのデータ送出;
次に、仮想出力104から、同期化RAM404内の出力RAMデータの変化イベントを読込むために、仮想出力104からデバッガ500へのメッセージ転送の指定とイベントを読込むためのRAMアドレスとを一緒に、バススロット108経由で、仮想配線206に同期通信により送出する。
【0049】
(b3)ブリッジデバイスの読込み処理;
仮想出力104からバススロット502経由でブリッジ504に送られて来たメッセージは、図2に示す通り、受信割込み処理を行う同期受信部550で受け取られる。その後、コマンド変換部552が、図3に示すようなメッセージ一覧表に従い、受け取ったメッセージが、1バイトメモリライト、1バイトメモリリード、ICEリセット、ICE実行等のどのメッセージであるかを分析する。コマンド発行部554は、その分析結果を、ICEデバッガ506内のVirtualLink560に渡す。VirtualLink560は、既存デバッガ562を制御して、プログラム実行中にICE400内の同期化RAM404内の出力RAMデータをオンザフライにて読み込む。その後、読み込んだ出力RAMデータを、同期受信部550が、前記メッセージの送信元である仮想出力104へ返信する。これにより、出力RAMデータの仮想出力104への転送が、完了する。
【0050】
(b4)仮想出力の表示処理;
仮想出力104は、出力RAMデータを元に、パソコンモニタに仮想LCD表示等を行う。
【0051】
また、上述したように同期化RAM404の変化のイベントを使う代わりに、仮想入力102から一定周期にて、デバッガ500にユーザRAM402のデータを読込むことにより、仮想出力104で仮想LCD表示等を行うようにしてもよい。
【0052】
<効果>
以上のように、本実施形態によれば、周辺デバイス120として実機デバイス150と仮想デバイス100とを用い、ICE400内に同期化RAM404を設け、仮想デバイス100とICE400との同期化処理を全てソフトウエア(ブリッジ504および同期化プログラム412)で行うことが可能となる。これにより、実機デバッグセットの完成を待たずして、効率良くプログラムの開発が可能となる。
【0053】
なお、本実施形態において、機能の異なる複数の仮想デバイス100を、仮想配線206に接続した構成としてもよい。この構成によれば、他の自動検証システムにも各デバイスの再利用が容易に行えるという利点がある。
【0054】
(第2実施形態)
ハードウェア開発よりもプログラム開発が先行している場合、実機デバッグセットが完成すれば、実機デバッグセットが正常に動作しているかを、開発中のプログラムを用いて動作検証することが必要になる。しかし、従来は、動作検証の際に実機デバッグセットが正常に動作しない場合、プログラムあるいは実機デバッグセットのどちらが悪いのかを判断することが難しく、解析に時間がかかるという問題もあった。
【0055】
そこで、本発明の第2実施形態にかかるプログラム検証システムは、図6等に示す通り、プログラム414のプログラム動作に必要な実機デバイス150の実入力152および実出力154を、ICE400からデバッガ500を経由して仮想配線206に接続した構成である。また、本プログラム検証システムは、実入力152および実出力154と同等な機能を仮想的に実現した仮想入力102および仮想出力104を、仮想配線206に接続した構成である。
【0056】
また、本プログラム検証システムでは、実出力154の表示をPCカメラ204にて撮影し、このPCカメラ204で撮影された映像を表示するカメラモニタ202を、パソコンのモニタ上に設ける。また、実出力154と同等機能である仮想出力104の画像も、パソコンのモニタに表示する。
【0057】
カメラモニタ202および仮想出力104の表示画像を記録するために、記録制御部302が、仮想入力102のキーコードをICE400に向けて転送した後、ICE400内の表示用イメージデータに合わせて表示する実出力154および仮想出力104の表示画像をクリップボード200にコピーし、検証結果ファイル350に記録する。合わせて、その時の表示ダンプデータも、検証結果ファイル350に記録する構成となっている。
【0058】
検証結果ファイル350は、実出力154と仮想出力104の実行結果をデバッグ作業者が目視で比較できるようにするためのアプリケーションファイルであり、例えば、Microsoft社のExcel(登録商標、以下略)等を利用して実現することができる。検証結果ファイル350の読み書きを制御する記録制御部302の制御プログラムは、HTAを利用して記述されている。また、検証結果ファイル350をExcelで作成する場合、その読書きを記録制御部302から行うために、OLE機能を利用する。また、記録制御部302と仮想配線206との間のデータ通信は、ActiveXを利用して実現できる。
【0059】
<初期化処理>
本実施形態にかかるプログラム検証システムも、起動されると、まず初期化処理を行う。仮想デバイス100、デバッガ500、および記録制御部302は、仮想配線206に接続するための接続処理を行う。ブリッジ504は、仮想入力102および仮想出力104からのメッセージ受信を行うために、予め、受信割込みを許可しておく。ICE400は、予め、プログラム414を実行状態にしておく。イベント検出部308は、仮想入力102およびブリッジ504からのメッセージ受信を許可しておく。画像データ取得部310は、仮想出力104からのメッセージ受信を許可しておく。
【0060】
<実機デバッグセットの動作確認>
本プログラム検証システムでは、例えば実出力154の動作確認を行うために、実出力154が完成するまでシミュレータによるプログラム評価に利用していた仮想出力デバイス100と、完成した実出力154との動作比較を、以下のとおりに行うことができる。
【0061】
<仮想入力からICEへのデータ転送>
仮想入力102からICE400にデータを転送する際の手順は、第1の実施形態で説明した(a1)〜(a3)とほぼ同じである。ただし、(a1)の手順において、仮想入力102が、デバッガ500だけでなく、イベント検出308へもRAM書き込みメッセージ転送を指定する点のみが、第1の実施形態とは異なる。
【0062】
<ユーザRAMから仮想出力へのデータ転送>
仮想入力102からの入力データ等によって、プログラム414がユーザRAM402内の出力RAMデータを変更した場合、この出力RAMデータを仮想出力104へ転送する手順は、第1の実施形態で説明した(b1)〜(b4)とほぼ同じである。ただし、(b4)の手順において、仮想出力104が、出力RAMデータをパソコンモニタに仮想LCD表示等するだけでなく、出力RAMデータに変化があれば、イベント検出部308に対し、仮想配線206経由で画面変化のイベント及び表示ダンプデータを転送する点が、第1の実施形態と異なる。
【0063】
<仮想入力から画像コピーイベント検出>
仮想入力102からキーイベントの発行を検出するために、イベント検出部308に、仮想入力102から仮想配線206経由にて、キーデータが送られてくる。イベント検出部308は、そのキーデータを、画像データ取得部310に渡す。また、同期化RAM404またはユーザRAM402から仮想出力104に取得した画像データの変化が有れば、仮想出力104から画像データ取得部310に対して、画像変化のメッセージおよび仮想出力104の表示ダンプデータを転送する。
【0064】
<表示画像の記録>
画像データ取得部310は、前記キーデータを、検証結果書込部304経由で、検証結果ファイル350に書込む。検証結果書込部304は、検証結果ファイル350の形式に適した方法で、データの読み書きを行う。
【0065】
また、画像データ取得部310は、仮想出力104から表示変化のメッセージを受けると、キャプチャー制御部306に指示を出し、実出力154の画像データであるカメラモニタ202の画像を、クリップボード200にキャプチャーする。また、仮想出力104の表示画像も、同様に、クリップボード200にキャプチャーする。クリップボード200にキャプチャーされた画像は、検証結果書込部304により、検証結果ファイル350に書込む。
【0066】
検証結果ファイル350の具体例を、図7に示す。図7に示すように、検証結果ファイル350には、画面モードと操作キーとの組み合わせ毎に、仮想画面および実機画面のそれぞれの画像イメージと、それらの表示の際に仮想出力104から送られてきた表示ダンプデータとが、記録される。
【0067】
図7に示す検証結果ファイル350からは、画面モードを“MDPWRON”として、“KPOWER”という名称で定義されているキー操作(電源をONにする操作)をした場合、仮想画面および実機画面の両方に何も表示されなかったことが分かる。また、“KCH UP”という名称で定義されているキー操作により、画面右上方に“CH03”という文字が表示され、さらに“KVOL UP”という名称で定義されているキー操作により、画面左下に“Vol 24”という文字が表示されたことが分かる。以上のキー操作の場合は、いずれも、仮想画面と実機画面との表示が一致している。しかし、“KMENU”という名称で定義されたキー操作に対しては、仮想画面において最上行に“MENU”と表示されているのに、実機画面では“MEU0”と表示されており、仮想画面と実機画面の表示状態が一致していない。これにより、“KMENU”のキー操作に関して、実機デバイス150にバグがあることが分かる。
【0068】
なお、図7では模式的に示したが、実際には、検証結果ファイル350の「仮想画面」の欄には、クリップボード200にキャプチャーされた仮想出力104の画像イメージそのものが貼り付けられる。また、「実機画面」の欄には、PCカメラ204で撮影されカメラモニタ202からクリップボード200にキャプチャーされた実出力154の画像イメージそのものが貼り付けられる。従って、これらの画像イメージを見比べることにより、デバッグ作業者が、仮想画面と実機画面との相違を容易に認識することが可能となる。
【0069】
<複数台のPCカメラを制御>
また、図8に示すように、実出力154の状態を撮影するPCカメラ204に加えて、実機入出力156の状態を撮影するPCカメラ205をさらに設けて、実機デバイス150を撮影する構成としてもよい。なお、実機入出力156の状態とは、例えば、実機デバイス150へのキー入力が実機モニタにエコー表示される様子や、処理結果がモニタへ表示される様子等をいう。PCカメラ204およびPCカメラ205には、カメラモニタ202およびカメラモニタ203をそれぞれ接続する。また、カメラモニタ202およびカメラモニタ203からクリップボード200へキャプチャーすべきモニタ画像を選択するキャプチャー選択部324を記録制御部302にさらに設ける。これにより、より多くのモニタ画像を記録することが可能になる。
【0070】
<効果>
以上のように、本実施形態では、新規に開発した実出力154の動作確認を行うために、この実出力154と同等の動作をする仮想出力104(動作検証済み)をICE400にて動作させて、実出力154および仮想出力104の実行結果を、デバッグ作業者が目視で確認できる状態で、検証結果ファイル350に書込む。これにより、実出力154と仮想出力104の動作比較が容易になり、実出力154のハードウエアの動作検証を効率良く行える。また、実機デバイス150の状態を撮影するためのPCカメラを複数台備えた構成とすれば、より多くの情報の記録が可能となり、検証精度を向上できる。
【0071】
(第3の実施形態)
本発明の第3の実施形態にかかるプログラム検証システムと、第2の実施形態にかかるプログラム検証システムとの主な相違点は、本実施形態にかかるプログラム検証システムは、プログラム自動検証を行うことにある。このため、図9等に示すとおり、本プログラム検証システムは、第2の実施形態で説明した検証結果ファイル350および記録制御部302の他に、シナリオファイル352と、これに対する読み書きを制御するシナリオ制御部314とを備えている。なお、記録制御部302およびシナリオ制御部314により、プログラム自動検証を実現するための自動検証制御部300が構成されている。
【0072】
シナリオファイル352とは、プログラム414を自動的に検証するための操作手順(シナリオ)を記録したファイルであり、検証結果ファイル350と同様に、例えば、Microsoft社のExcel等を利用して実現することができる。自動検証制御部300の制御プログラムは、HTAを利用して記述されている。また、検証結果ファイル350およびシナリオファイル352をExcelで作成する場合、これらの読書きを自動検証制御部300から行うために、OLE機能を利用する。また、自動検証制御部300と仮想配線206との間のデータ通信は、ActiveXを利用して実現できる。
【0073】
以下、本プログラム検証システムの構成および動作について、具体的な説明を行う。
【0074】
本プログラム検証システムは、ICE400内の表示用イメージデータの変化に基づいて、仮想出力104の表示を更新し、仮想出力104の表示画像をクリップボード200経由にて検証結果ファイル350に記録し、予め検証結果ファイル350に記録されていた検証用の期待値データと自動比較する構成となっている。
【0075】
<シナリオからICEへのデータ転送の自動シーケンス>
以下、本プログラム検証システムの自動検証処理について説明する。自動検証処理は、自動検証制御部300が、シナリオファイル352からキーデータ等を読み出し、ICE400へ自動的に転送して実行させ、その実行結果を検証結果ファイル350へ書き込んで評価することにより行う。
【0076】
シナリオファイル352には、動作検証に必要な操作情報(キーデータ等)が、検証手順に従ってあらかじめ記録されている。シナリオファイル352は、Excelファイルを利用して、例えば、図11に示すような状態遷移表として作成される。本プログラム検証システムでは、シナリオファイルに記述されている動作シーケンスに従って画面モードを所定の状態にした後、イベントであるキーの発行を実行して、各キー入力に対するアクション(有効または無効)の確認を行う。例えば、図11に示すシナリオファイル352の場合、図11中に示した実行順番に従い、まず、画面モードを“MDPWRON”にした状態で、“KPOWER”、“KCH UP”、“KVOL UP”、“KMENU”、“KSET”のキー入力を順次行い、これらの各キー操作に対する仮想デバイスおよび実機デバイスの動作を検証する。そして、次に、画面モードを“MDMENU”とした状態で、上述と同様に“KPOWER”、“KCH UP”、“KVOLUP”、“KMENU”、“KSET”のキー入力を順次行い、仮想デバイスおよび実機デバイスの動作を検証する。以降、“MDTIMER”、“MDSET”、“MDTEST”の各画面モードについて、同様に検証を行う。
【0077】
ここで、図11に示すシナリオファイル352を用いた自動検証処理の詳細について、画面モード“MDMENU”の状態での各キー入力に対する動作検証を行う場合を例にとり、さらに具体的に説明する。自動検証制御部300は、以下の(1)〜(9)の手順により、画面モード“MDMENU”の状態でのキー入力に対する動作検証を行う。
【0078】
(1)同期化RAM400内のリセット完了モニタ用フラグRAMに“1”をセットする。
【0079】
(2)ICE400にプログラム414を初期化させるために、シナリオ読込部316からデータ送信部320へ、リセットGOコマンド発行を指示する。なお、“リセットGO”コマンドとは、ICE400に実機プログラム410の実行を停止させ初期化する“リセット”コマンドと、ICE400に実機プログラム410を最初から実行開始させる“GO”コマンドとを一連に実行させるものである。データ送信部320は、同期通信により、ブリッジ504を経由してICEデバッガ506に対してリセットGOのメッセージを送る。ICEデバッガ506が、ICE400をリセットGO実行させることにより、実機プログラム410がリセットスタートされる。実機プログラムリセットスタート実行の先頭プログラムで、前記のリセット完了モニタ用フラグRAM値を“0”にする。ICE400がリセットGO完了すれば、ブリッジ504からデータ送信部320を経由して、シナリオ読込316部にリセットGO完了通知を行う。
【0080】
(3)リセット完了モニタ用フラグRAM値が“0”になったことを確認した後、画面モードを“MDMENU”にするために、シナリオファイル352において当該画面モードの動作シーケンスに記述されているキーをシナリオ読込部316により順次読み込み、発行する。発行されたキーは、データ送信部320、バススロット312、仮想配線206、デバッガ500を介して、ICE400へ渡される。図11の例では、“MDMENU”の動作シーケンスの最初の動作(図11のシナリオファイルにおける動作1の欄)として“KPOWER”というキーが記述されているので、このキーが最初に発行される。
【0081】
(4)“KPOWER”キーの処理を実機プログラム410が完了したかを、ユーザRAM402内の特定RAMにおける値の変化をチェックすることにより、確認する。特定RAMの変化が確認できると、次に、動作シーケンスの動作2に記述されている“KMENU”キーを発行し、上記と同様に、ユーザRAM402内の特定RAMの変化をチェックすることにより、“KMENU”キーの処理が完了したかを確認する。以上の処理を、シナリオファイル352の動作シーケンスに記述されている最後のキーまで、繰り返し実行する。図11に示す“MDMENU”の場合、“KPOWER”キーおよび“KMENU”キーの実行により、目的の画面モードである“MDMENU”になる。
【0082】
(5)目的の画面モードになったら、まず、ユーザRAM402内の画像データを同期RAM404に取り込む。
【0083】
(6)次に、シナリオファイル352に記述されている発行キーを、順次発行し、動作を検証する。図11の例では、最初に、“KPOWER”キーを発行する。“KPOWER”キーの処理が完了したことを、ユーザRAM402内の特定RAM値の変化で確認する。
【0084】
(7)“KPOWER”キーの処理が完了したことが確認できたら、この“KPOWER”キーの処理結果を検証する。仮想出力104は、画面変化の有無を、イベント検出部308に伝える。イベント検出部308は、画面変化の有無が、シナリオファイル352に記述されている有効・無効仕様に合致するかを判断する。
【0085】
例えば、図11に示すシナリオファイルの場合、○記号は、当該画面モードにおける当該キー発行が有効であることを表し、×記号は、当該画面モードにおける当該キー発行が無効であることを表す。なお、「キー発行が有効である」とは、そのキー発行により画面上に何らかの変化が生じることをいい、「キー発行が無効である」とは、そのキー発行によっても画面に変化が生じないことをいう。
【0086】
ここでは、“MDMENU”の列と“KPOWER”の行との交点にあたる欄には○記号が記述されているので、画面モードが“MDMENU”である場合に“KPOWER”キーを発行した場合、このキーが正しく処理されたならば、何らかの画面変化が生じるべきである。従って、“KPOWER”キーの発行により画面変化が生じていれば、イベント検出部308は、“MDMENU”画面モードにおける“KPOWER”キーの有効・無効仕様は満たされているものと判断する。
【0087】
イベント検出部308は、有効・無効仕様が満たされているか否かの判断結果に応じて、シナリオファイル352の有効・無効仕様欄に色付けする。すなわち、イベント検出部308が、シナリオファイル352に記述されている有効・無効仕様が満たされていると判断すれば、検証結果書込部304を介して、シナリオファイル352の当該有効・無効仕様欄の表示属性を例えば青色に設定し、満たされていないと判断した場合は例えば赤色に設定することにより異常動作であることが分かるようにする。これにより、デバッグ作業者は、シナリオファイル352の有効・無効仕様欄の表示色により、目標仕様が満たされているかを容易に識別することが可能となる。また、ここでは、有効・無効仕様の検証結果をシナリオファイル352に記録することとしたが、検証結果ファイル350に、有効・無効仕様の検証結果を記録する欄を別途設けるようにしてもよい。
【0088】
(8)また、検証結果書込部304は、画像データ取得部310によりユーザRAM402から取得した画面データ(実行画像データ)を、検証結果ファイル350へ書き込む。さらに、検証結果書込部304は、前記実行画像データと、検証処理の実行に先立って予め作成されている基準画像データとを比較し、比較結果を検証結果ファイル350へ書き込む。基準画像データとは、キーが正しく処理された結果として表示されるべき画像データのダンプデータであり、図12に示すように検証結果ファイル350へ書き込まれている。例えば図12に示した例にかかる検証結果ファイル350では、基準画像データと実行画像データとの比較結果が一致すれば○記号、一致しなければ×記号が、「判定」の欄に書き込まれている。これにより、デバッグ作業者は、検証結果ファイル350の判定欄を見るだけで、キー発行により所定の画面データが表示されたか否かを容易に検証できる。
【0089】
(9)また、検証結果ファイル350には、基準画像データに基づく画面イメージ(基準画面)が予め貼り付けられている。検証結果書込部304は、図12に示すように、この基準画面の隣の列に、仮想出力104に出力された画面(実行画面)を、クリップボード200を介して貼り付ける。これにより、デバッグ作業者は、検証結果ファイル350を見るだけで、基準画面と実行画面との違いを容易に識別することが可能となる。
【0090】
“KPOWER”キーについて上記の(9)までの処理が終了したら、(5)へ戻り、(6)においてシナリオファイルに記述されている次の発行キー“KCH UP”を発行し、以降の処理を行う。同様にして、シナリオファイルに記述されている全ての発行キーについて、(5)〜(9)の処理を繰り返すことにより、図12に示すような検証結果ファイルが完成する。
【0091】
また、本実施形態では、自動検証処理中の何らかの要因により、ICE400が異常動作になった場合に、自動検証処理が続行できなくなることを防ぐため、既存デバッガ562がICE400の挙動を監視する。そして、ICE400の動作に変化が発生した場合は、図13に示すようなメッセージを、ICEデバッガ506が、ブリッジ504内のICE状態モニタ558(図2参照)に伝える。さらに、このメッセージは、ICE状態送信部556から、仮想配線206を介して、シナリオ制御部314内のタイミング制御部318に伝えられる。これにより、タイミング制御部318は、ICE400の動作変化に合わせて、シナリオ読込部316にシナリオファイル352のデータを再発行させる等の処理を行う。
【0092】
以上のとおり、本実施形態によれば、プログラム自動検証を実現することができる。
【0093】
<リモート制御>
また、図10に示すように、記録制御部302内に自動検証処理の実行状況を配信する実行状況配信部322を設けると共に、外部装置との間で電子メールの送受信を行う電子メール送受信部602をさらに設けた構成としてもよい。この構成により、実行状況配信部322から電子メール送受信部602を経由して、自動検証処理の実行状況を携帯情報端末604等に電子メールにて配信すれば、し、自動検証処理の実行状況を遠隔地からリアルタイムでモニタすることが可能となる。
【0094】
そして、自動検証処理の実行中に、プログラム414の不具合等が見つかった場合は、携帯情報端末604等から、図3に示すようなデバッガ制御コマンドを、電子メールのメッセージとして本プログラム検証システムに送信することで、リモートにて本プログラム検証システムを制御することができる。また、リモート制御結果は、実行状況配信部322から電子メール送受信部602を経由して、携帯情報端末604等に電子メールにより配信する。
【0095】
これにより、プログラム検証システムをリモート制御可能となる。
【0096】
なお、自動検証処理において、シナリオファイル352として前記の状態遷移表を用いる代わりに、シナリオファイル352の記述方法や自動検証制御部300の制御方法を適宜変更することで、任意の自動検証処理を実現可能である。
【0097】
<具体的動作>
以下、プログラム自動検証を行う本プログラム検証システムの動作について、さらに具体的に説明する。
【0098】
<初期化処理>
本実施形態のプログラム検証システム(図10に示す構成)も、起動すると、まず、初期化処理を行う。仮想デバイス100、デバッガ500、自動検証制御部300、および電子メール送受信部602は、仮想配線206に接続するための接続処理を行う。また、ブリッジ504は、予め、データ送信部320および仮想出力104からのメッセージ受信を行うために、受信割込み許可しておく。また、実行状況配信部322は、仮想出力104からのメッセージ受信を許可しておく。また、電子メール送受信部602内の実行状況モニタ606は、実行状況配信部322からの受信を許可しておく。
【0099】
<シナリオ読込から仮想配線へリセットGOコマンドデータを流す>
シナリオ読込部316から、ICE400の実行を初期化するために、リセットGOコマンドの送信をデータ送信部320に指示する。データ送信部320は、図3に示すようなリセットGOコマンドのフォーマットに従って作成したメッセージを、ブリッジ504に宛てて、バススロット106から仮想配線206に同期通信にて送出する。
【0100】
<ブリッジデバイスの書込み処理>
データ送信部320からバススロット502経由でブリッジ504に送られて来たメッセージは、図2に示す通り、受信割込み処理を行う同期受信部550に受け取られる。コマンド変換部552は、図3に示すようなテーブルを参照し、受け取ったメッセージが、1バイトメモリライト、1バイトメモリリード、ICEリセット、ICE実行等のどのメッセージであるかを分析し、その結果をコマンド発行部554からICEデバッガ506内のVirtualLink560に渡す。
【0101】
VirtualLink560は、既存デバッガ562を制御して、ICE400にリセットコマンドを発行した後、実行開始コマンドを発行して、実行完了通知を同期受信部550の返信データとして、メッセージの送信元であるデータ送信部320に返信する。データ送信部320は、シナリオ読込部316にリセットGOコマンド実行完了を伝え、シナリオファイル352の内容に従った実行を行う。
【0102】
<シナリオファイルから仮想配線へのデータを流す>
シナリオ読込部316は、シナリオファイル352からキーコードを読込んで、データ送信部320に指示して、図3に示すようなメッセージ一覧表内の1バイトメモリライトコマンド発行フォーマットに従って作成したメッセージを、ブリッジ504に宛てて、バススロット106から仮想配線206へ同期通信にて送出する。
【0103】
<ブリッジの書込み処理>
データ送信320から、バススロット502経由でブリッジ504に送られて来たメッセージは、図2に示す通り、受信割込み処理を行う同期受信部550に受け取られる。そして、コマンド変換部552が、図3に示すようなテーブルに基づき、受け取ったメッセージが、1バイトメモリライト、1バイトメモリリード、ICEリセット、ICE実行等のどのメッセージであるかを分析する。その分析結果は、コマンド発行部554からICEデバッガ506内のVirtualLink560に渡される。
【0104】
VirtualLink560は、既存デバッガ562を制御して、プログラム414を実行中のICE400内の同期化RAM404に、仮想入力102から渡された指定RAMアドレスのRAMデータをオンザフライにて書込んだ後、書込み完了通知を、同期受信部550の返信データとして、メッセージの送信元であるデータ送信部320へ返信する。返信を受けると、キーデータを配信したことを、実行状況配信部322からイベント検出部308に伝える。
【0105】
<同期化RAMからユーザRAMへの転送処理>
同期化プログラム412は、同期化RAM404の変化を、プログラム414に必要なタイミングでマイコンエミュレータ406にチェックさせている。
【0106】
同期化プログラム412は、例えばキー入力の場合は、プログラム414のキー入力処理の直後に呼ばれ、同期化RAM404内のキーデータRAMの変化を、マイコンエミュレータ406経由でチェックし、もし変化が有れば、キーデータをユーザRAM402のキーデータ確定エリアに転送する。この際、仮想入力102のキーデータと実機デバイス150からのキーデータとが同時に入力された場合は、仮想入力102からのキーデータが優先される。
【0107】
同期化プログラム412内のキー入力処理は、具体的には、第1の実施形態において図4を用いて説明したとおりである。これにより、仮想キー入力が、実機キー入力より優先されて処理される。
【0108】
<ユーザRAMから仮想出力へのデータ転送>
シナリオファイル352から読み込んだキーコードによってプログラム414がユーザRAM402内の出力RAMデータ(仮想出力104への出力データ)を変更した場合、この出力RAMデータを仮想出力104へ転送する方法は、以下の(c1)〜(c4)のとおりである。
【0109】
(c1)プログラムのユーザRAM変更;
プログラム414により、ユーザRAM402内の仮想出力104に関係するRAMエリアが変更された直後に、ユーザRAM402から同期化RAM404内の特定RAMに変化を伝えるための処理を行う。具体的には、図5に示す通り、プログラム414から仮想同期化ルーチンを呼び出すことにより、処理を開始する(ステップS420)。実機デバイス150への出力処理(ステップS422)を行った直後に、実機デバイス150への出力RAMデータの変化を検出し(ステップS424)、変化があれば、出力RAMデータをユーザRAM402から同期化RAM404内に転送する(ステップS426)。
【0110】
(c2)仮想出力から仮想配線へデータを流す;
次に、仮想出力104から、同期化RAM404内の出力RAMデータの変化イベントを読込むために、仮想出力104からデバッガ500へのメッセージ転送の指定とイベントを読込むためのRAMアドレスとを一緒に、バススロット108経由で、仮想配線206に同期通信により送出する。
【0111】
(c3)ブリッジデバイスの読込み処理;
仮想出力104からバススロット502経由でブリッジ504に送られて来たメッセージは、図2に示す通り、受信割込み処理を行う同期受信部550で受け取られる。その後、コマンド変換部552が、図3に示すようなメッセージ一覧表に従い、受け取ったメッセージが、1バイトメモリライト、1バイトメモリリード、ICEリセット、ICE実行等のどのメッセージであるかを分析する。コマンド発行部554は、その分析結果を、ICEデバッガ506内のVirtualLink560に渡す。VirtualLink560は、既存デバッガ562を制御して、プログラム実行中にICE400内の同期化RAM404内の出力RAMデータをオンザフライにて読み込む。その後、読み込んだ出力RAMデータを、同期受信部550が、前記メッセージの送信元である仮想出力104へ返信する。これにより、出力RAMデータの仮想出力104への転送が、完了する。
【0112】
(c4)仮想出力の表示処理;
仮想出力104では、出力RAMデータを元にパソコンモニタに仮想LCD表示等を行う。また、同期化RAM404またはユーザRAM402から仮想出力104に取得した画像データの変化があれば、仮想出力104は、画像データ取得部310に対して、実行状況配信部322経由で、画像変化のメッセージおよび仮想出力104の表示ダンプデータを転送する。
【0113】
また、前記イベントを使わずに、仮想入力102から一定周期にて、デバッガ500にユーザRAM402のデータを読込み、仮想出力104にて仮想LCD表示等を行う方法でも良い。
【0114】
<データ転送からイベント検出に転送>
実行状況配信部322にデータ送信部320から前記キーデータが送られてくると、そのキーデータは、イベント検出部308から画像データ取得部310に渡される。また、同期化RAM404またはユーザRAM402から仮想出力104に取得した画像データの変化が有れば、仮想出力104から実行状況配信部322を経由して、画像データ取得部310に対して画像変化のメッセージおよび、仮想出力の表示ダンプデータを転送する。画像データ取得部310は、前記キーデータを検証結果書込部304から検証結果ファイル350に書込む。
【0115】
また、画像データ取得部310は、仮想出力104から表示変化のメッセージを受けると、仮想出力104の表示画像を、クリップボード200にキャプチャーする。クリップボード200にキャプチャーされた画像は、検証結果書込部304により、検証結果ファイル350に対して書込まれる。
【0116】
具体的には、図12に示すように、キーデータは操作キーの欄に書込み、シナリオファイル352の画面モードは、画面モードの欄に書込む。
【0117】
<基準画像データと実行画像データとの比較>
検証結果ファイル350において、「基準画像データ」と「実行画像データ」とのデータの相違を判定し、判定結果を「判定」の欄に「○」と「×」として書込む。なお、検証結果ファイル350をExcelで作成する場合は、IF関数を用いて「基準画像データ」と「実行画像データ」の相違の判定を行うことができる。
【0118】
<基準画像データの作成>
尚、自動検証処理を行うための基準画像およびその表示ダンプデータの作成については、前記自動実行する方法で、画像データおよび表示ダンプデータを図12に示す基準画面および実行画像データに書込むことで作成できる。
【0119】
<効果>
以上のように、本実施形態によれば、シナリオファイルを利用することにより、プログラム自動検証が行える様になり、評価効率の向上が可能となる。また、プログラム自動検証の実行状況を、遠隔地からも監視できるようになる。
【0120】
(第4の実施形態)
プログラム414を搭載すべき実機のハードウェアが完成した後は、図14に示すように、仮想デバイスを利用せず、実機デバッグセットのみを利用したプログラム検証システムにより、自動検証を行うことも可能である。
【0121】
【発明の効果】
以上のように、本発明によれば、ICEを利用したプログラム検証システムにおいて周辺デバイスを実機デバイスと仮想デバイスに分けたプログラム検証を行うためのハードウエアは必要とせず実現でき、短期間にプログラム検証システムを構築できる。また、自動検証に関しては、LCD表示等の出力表示を実機デバイスおよび仮想デバイス問わず、表示イメージのまま記録できるため、プログラム検証時間の短縮が可能となる。更に、自動検証をリモート制御できるため、遠隔操作によりプログラムのデバッグおよび検証が出来るようになり作業効率が向上する。
【図面の簡単な説明】
【図1】 本発明の第1の実施形態にかかるプログラム検証システムの構成を示すブロック図
【図2】 デバッガの内部構成を示すブロック図
【図3】 仮想デバイスからブリッジへのメッセージ一覧の説明図
【図4】 キー入力処理のフローチャート
【図5】 表示出力処理のフローチャート
【図6】 本発明の第2の実施形態にかかるプログラム検証システムの構成を示すブロック図
【図7】 検証結果ファイルの一例を示す説明図
【図8】 第2の実施形態にかかるプログラム検証システムの変形例として、複数のカメラを用いたプログラム検証システムのブロック図
【図9】 本発明の第3の実施形態にかかるプログラム検証システムの構成を示すブロック図
【図10】 第3の実施形態にかかるプログラム検証システムの変形例のブロック図
【図11】 シナリオファイルの一例を示す説明図
【図12】 第3の実施形態にかかる検証結果ファイルの一例を示す説明図
【図13】 ICEから仮想デバイスへ向けてのイベント一覧を示す説明図
【図14】 本発明の第4の実施形態にかかるプログラム検証システムの構成を示すブロック図
【図15】 従来の実機デバッグセットを用いたプログラム検証システムのブロック図
【図16】 従来のシステムシミュレータセットを用いたプログラム検証システムのブロック図
【図17】 従来の実セット・シミュレータ混載のプログラム検証システムのブロック図
【符号の説明】
100 仮想デバイス
102 仮想入力
104 仮想出力
120 周辺デバイス
150 実機デバイス
152 実入力
154 実出力
156 実機入出力
200 クリップボード
202,203 カメラモニタ
204,205 PCカメラ
206 仮想配線
300 自動検証制御部
302 記録制御部
304 検証結果書込部
308 イベント検出部
310 画像データ取得部
312 バススロット
314 シナリオ制御部
316 シナリオ読込部
318 タイミング制御部
320 データ送信部
322 実行状況配信部
350 検証結果ファイル
352 シナリオファイル
400 ICE
402 ユーザRAM
404 同期化RAM
410 実機プログラム
412 同期化プログラム
500 デバッガ
502 バススロット
504 ブリッジ
506 ICEデバッガ
600 電子メール送受信部
604 携帯情報端末
606 実行状況モニタ
608 リモート制御部
610 メール配信制御部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a program verification system that performs operation verification of a microcomputer program using ICE, and particularly to a program verification system that uses a real device and a virtual device as peripheral devices necessary for program execution.
[0002]
[Prior art]
FIG. 15 shows an example of a conventional real machine debug set. As shown in FIG. 15, the evaluation of an application program for controlling a single chip microcomputer is performed by debugging an in-circuit emulator (hereinafter referred to as ICE) 400 that can emulate all functions of a single chip microcomputer instead of a target single chip microcomputer. What is built into the board 18 is connected to an actual machine debug set (peripheral device 120) configured by hardware.
[0003]
However, when such a debug set is used, in order to test the program, it is essential that the hardware that operates the system is completed in advance, so the software development process is the hardware development process. There was a problem that it was greatly influenced by the progress.
[0004]
In order to solve this problem, a method of evaluating a program without using a real machine by simulating a target single-chip microcomputer and a peripheral device has been proposed.
[0005]
An example of such a simulation method is disclosed in, for example, JP-A-9-114700. The system disclosed in Japanese Patent Application Laid-Open No. 9-114700 includes embedded software to be tested / debugged, an MPU simulator for simulating a microprocessor unit (MPU) and a memory, and an input / output device simulation for simulating input / output. Unit, an input / output device execution control mechanism for simulating a signal line connecting the MPU and one or more input / output devices, a startup definition file describing the startup sequence of the simulator, an I / O monitor and an I / O model Input / output simulation unit having means for starting / ending processes, means for allowing a user to refer to / change resource information of all I / O models, and means for displaying connection relations between I / O models and I / O monitors It consists of an operating environment. Each component is composed of a plurality of processes and connected by virtual wiring. In this simulation method, as shown in FIG. 16, all of the actual peripheral devices 120 are realized by the virtual device 100.
[0006]
An example of an actual machine / simulator mixed system that combines the advantages of both an actual machine debugging method and a simulator debugging method is disclosed in Japanese Patent Laid-Open No. 8-6810. As shown in FIG. 17, the system disclosed in Japanese Patent Application Laid-Open No. 8-6810 is a mixed system of a real machine debug set using an ICE 64 and a virtual device (simulation unit 50). In this system, the transfer of input / output data between the simulation unit 50 and the ICE 64 is realized by using a dedicated actual machine interface board 60.
[0007]
[Problems to be solved by the invention]
However, in the conventional real machine / simulator mixed system, as shown in FIG. 17, a dedicated interface board 60 is required in order to exchange the input / output data between the virtual device and the ICE. For this reason, when a change in the specification of the peripheral device or the like occurs, the cost and time are required to change the design of the interface board accordingly, and there is a problem that the program cannot be debugged and verified efficiently.
[0008]
In order to solve the above problems, an object of the present invention is to provide a program verification system capable of efficiently verifying a program when a real device and a virtual device are used as peripheral devices.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, a program verification system according to the present invention is a program verification system that verifies the operation of a program for a microcomputer using a real device and a virtual device as peripheral devices of the microcomputer, the microcomputer An emulator that emulates the operation of the program above, a verification control unit that controls the emulator to perform a verification operation corresponding to the real device, and provided between the verification control unit and the virtual device, A bridge unit that adapts a control signal and data from a device to the verification control unit, a real machine RAM that stores input / output data between the real machine device and the program, a real machine RAM, and the virtual device. The synchronization RAM provided between the real device and the real device That in synchronism with the input operation of the program, and controls the data transfer between said synchronized RAM and the actual use RAM, characterized in that a virtual-actual synchronization processing unit.
[0010]
In order to enable program verification without waiting for completion of the actual device even when program development precedes actual hardware development, this configuration is a verification control unit that supports the specifications of the existing actual device. And a virtual device that simulates the specifications of the real device corresponding to the new program by software, for example, a command or data conversion to adapt the control signal and data from this virtual device to the verification control unit A part is provided. This makes it possible to verify a new program without waiting for completion of the actual device. Further, in order to absorb the difference in operation speed between the real device and the virtual device, a synchronization RAM for synchronization is provided separately from the real device RAM used by the program. In addition, a virtual / real machine synchronization processing unit is provided for synchronously controlling data transfer between the synchronization RAM and the real machine RAM.
[0011]
As a result, for example, when developing a so-called deployment model that has variations in the specifications around the user interface (parts related to operation and display) that have the same main functions, a new hardware set for debugging is newly installed. Even if it is not made with hardware, it is possible to simulate with a virtual device while using an existing real machine set. Further, unlike the prior art, there is no need to create a dedicated interface board for transferring input / output data between the virtual device and the ICE. As described above, according to the present invention, it is possible to provide a program verification system capable of efficiently developing a program without waiting for completion of an actual machine debug set.
[0012]
In the program verification system, it is preferable that the virtual device and the bridge unit are connected by virtual wiring. In addition, if a configuration including a plurality of virtual devices for each function is provided, another automatic verification system has an advantage that each device can be easily reused.
[0013]
In the program verification system, a verification result file including a photographing device that captures an actual monitor output image output by the actual device, a virtual monitor output image output by the virtual device, and a virtual monitor output image output by the virtual device It is preferable that the apparatus further includes a verification result writing unit for recording the data.
[0014]
According to this configuration, for example, when a prototype of a real device to be loaded with a new program is completed, the virtual device prepared according to the specification of the real device is used for program verification. The operation verification of the actual device can be performed. That is, an actual device and a virtual device having the same specifications are operated, and their monitor output images are written in the verification result file. Thus, the person in charge of development can determine whether or not the actual device satisfies the target specification by comparing the monitor output images written in the verification result file. Further, when there is an abnormality, it becomes easy to grasp which of the actual device and the program has a problem.
[0015]
Further, in this preferred configuration, an event detection unit that detects a predetermined change in the peripheral device, and an image that captures the actual monitor output image and the virtual monitor output image at a timing according to a detection result of the event detection unit. If the acquisition unit is further provided, for example, the monitor output image can be captured in accordance with the input / output timing of the real device and the virtual device, and the verification can be performed more efficiently.
[0016]
Furthermore, if the configuration includes a plurality of the photographing devices, more information can be recorded in the verification result file. For example, when verifying a device having a plurality of types of actual device, the verification accuracy is improved. Can be made.
[0017]
In addition, it is preferable to further include a verification status distribution unit that transmits the verification processing status including the actual machine monitor output image or the virtual monitor output image to the external terminal according to the detection result of the event detection unit. . Thereby, even when the person in charge of the verification work is in a remote place, accurate information can be grasped in real time. Further, a configuration further includes a remote control unit that receives a control signal and a message including its destination from an external terminal such as a portable information terminal, extracts the control signal from the received message, and distributes the control signal to the destination of the control signal This is still more preferable. As a result, when any problem occurs during the automatic program verification operation, the program verification system can be remotely controlled, enabling efficient debugging and verification.
[0018]
The program verification system according to each of the above-described configurations preferably further includes a scenario control unit that reads data from a scenario file that records an operation procedure for automatically verifying the program and transfers the data to the bridge unit. .
[0019]
According to this configuration, it is not necessary to perform a verification operation from the virtual device or the real device by reading data from the scenario file in which the operation procedure to be verified in advance is recorded, and the program verification system automatically performs verification. Work can be executed. Thereby, the program verification efficiency can be further improved.
[0020]
It is further preferable to further include a timing control unit that controls transfer of data read from the scenario file to the bridge unit in accordance with the operation status of the emulator. According to this configuration, for example, when the emulator malfunctions for some reason, the timing control unit performs control such as rereading the scenario file and transferring it to the bridge unit, for example. This improves the reliability of the automatic verification work.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
First, configurations and terms common to the following embodiments will be described with reference to FIG.
[0022]
The program 414 was developed as a program operating on a microcomputer, and is a program to be debugged in the program verification system according to the present invention.
[0023]
The actual machine program 410 includes a debug target program 414 and a synchronization program 412. The synchronization program 412 is not installed in the actual microcomputer and is used only in the program verification system. As will be described in detail later, the data writing from the virtual device 100 to the user RAM 402 is synchronized with the data writing from the actual device 150. To perform the process.
[0024]
The peripheral device 120 is an input / output device necessary for the operation verification of the program 414, and includes the real device 150 and the virtual device 100. The actual device 150 is an input / output device (hardware itself) of an actual device in which the program 414 is installed. On the other hand, the virtual device 100 simulates the hardware of the actual machine on which the program 414 is installed with software.
[0025]
The ICE 400 is an in-circuit emulator that emulates a built-in microcomputer of a real machine on which the program 414 is mounted in order to verify the execution of the program 414, and includes a microcomputer emulator 406, a user RAM 402, and a synchronization RAM 404. . The user RAM 402 is a RAM that stores input / output data between the real device 150 and the program 414. The synchronization RAM 404 temporarily stores data to be written from the virtual device 120 to the user RAM 402, which will be described in detail later. RAM.
[0026]
The operation of the ICE 400 is controlled by the debugger 500. The debugger 500 includes a bridge 504 and an ICE debugger 506 (verification control unit). The ICE debugger 506 is designed to cause the ICE 400 to execute a verification operation corresponding to the specification of the actual device 150. On the other hand, the bridge 504 performs control command conversion between the virtual device 100 and the ICE 506 in order to enable a verification operation using the virtual device 100 as an input / output device instead of the actual device 150. And implemented in software.
[0027]
That is, the program verification system according to the present embodiment is configured so that, even when program development precedes hardware development of actual devices, in order to enable program verification without waiting for completion of actual device, 150 and the ICE debugger 506, a virtual device 100 that simulates the specifications of a real device corresponding to a new program (program 414) by software, and a bridge 504 that adapts the virtual device 100 to the ICE debugger 506 It is.
[0028]
The virtual wiring 206 is a wiring that virtually connects the virtual device 120, the debugger 500, the automatic verification control unit described in the following embodiment, and the like. When the virtual device 100, the debugger 500, and the like are realized by a plurality of personal computers, a network, USB, RS232C, and IEEE1394 can be used as the virtual wiring 206. When the virtual device 100, the debugger 500, and the like are realized as a plurality of applications or processes that can be executed independently in one personal computer, the virtual wiring 206 is connected to the DDE, COM that can communicate between the applications or processes. It can be realized by using a data communication function such as A specific embodiment of the virtual wiring 206 is disclosed in detail in an earlier application (Japanese Patent Application No. 2001-219887) related to the invention made by the inventors of the present invention.
[0029]
The communication method using the virtual wiring 206 may be either asynchronous communication or synchronous communication. Asynchronous communication is a communication method in which data is transmitted unilaterally to a communication partner and there is no reply. Synchronous communication is a communication method in which data is sent to a communication partner and then waiting until return data is returned from the communication partner.
[0030]
HTA is an abbreviation of HTML Applications and supports various functions (HTML, CSS, script language (Java (registered trademark), Script, VBA, etc.), Behavior, etc.) that can be executed on a Web page.
[0031]
ActiveX is an API for developing an ActiveX document object that is an Internet-compatible OLE document object and a client application having an Internet access function.
[0032]
OLE is an abbreviation of Object Linking and Embedding, and an application can call a function of another application and use it like its own function. In the embodiment described later, an example in which an Microsoft Excel application from HTA is used will be described.
[0033]
(First embodiment)
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0034]
In the program verification system according to the present embodiment, transfer and synchronization of input / output data between the virtual device 100 and the ICE 400 are all realized by software, and the peripheral device 120, the ICE 400, and the like are connected to the virtual wiring 206, respectively. In this way, the system configuration allows flexible support in accordance with the verification purpose of the program 414. That is, the configuration is different from that of a conventional system having a dedicated I / F 60 realized by hardware between the ICE 64 and the simulation unit 50 as shown in FIG.
[0035]
<System configuration>
In the program verification system according to the present embodiment, the peripheral device 120 necessary for the operation of the program 414 includes the virtual device 100 and the real device 150 as shown in FIG. Both the virtual device 100 and the debugger 500 are connected to the virtual wiring 206.
[0036]
<Initialization process>
When the program verification system is activated, it performs an initialization process. In the initialization process, the virtual device 100 and the debugger 500 perform a connection process for connecting to the virtual wiring 206. In addition, the bridge 504 of the debugger 500 permits a reception interrupt in advance in order to receive a message from the virtual input 102 and the virtual output 104 of the virtual device 100. Also, the ICE 400 sets the program 414 in an execution state in advance.
[0037]
<Data transfer from virtual input to ICE>
Data transfer from the virtual input 102 to the ICE 400 is executed as follows (a1) to (a3).
[0038]
(A1) Data transmission from virtual input to virtual wiring;
An input event generated at the virtual input 102 designates a RAM write message transfer to the debugger 500, and the RAM address and RAM data of the synchronization RAM 404 to which the input event data is written are transferred via the bus slot 106 to the virtual wiring 206. Is sent out by synchronous communication.
[0039]
(A2) Bridge write processing;
A message sent from the virtual input 102 to the bridge 504 via the virtual wiring 206 and the bus slot 502 is received by the synchronous reception unit 550 that performs reception interrupt processing in the bridge 504 as shown in FIG. Thereafter, in order for the command conversion unit 552 to adapt the message from the virtual input 102 to a format that can be processed by the ICE debugger 506, the received message is written in 1 byte memory write, 1 in accordance with the message list shown in FIG. It analyzes which message is a byte memory read, ICE reset, ICE execution, or the like. The command issuing unit 554 passes the analysis result to the Virtual Link 560 in the ICE debugger 506.
[0040]
The VirtualLink 560 controls the existing debugger 562 designed to perform a verification operation corresponding to the specification of the real device 150, and designates the specified RAM passed from the virtual input 102 to the synchronization RAM 404 in the ICE 400 that is executing the program. Write address RAM data on the fly. Thereafter, the synchronous reception unit 550 returns a write completion notification as a reply to the message to the virtual input 102 that is the message transmission source. Note that “on the fly” is a function of the ICE 400 that allows the RAM data of the user RAM 402 and the synchronization RAM 404 in the ICE 400 and the register in the microcomputer emulator 406 to be read and written even when the program 414 is being executed.
[0041]
(A3) Transfer processing from the synchronization RAM to the user RAM;
The synchronization program 412 causes the microcomputer emulator 406 to check a change in data written in the synchronization RAM 404 at a timing necessary for the program 414.
[0042]
For example, in the case of key input, the synchronization program 412 is called immediately after the key input processing of the program 414, and checks for changes that occur in the synchronization RAM 404 by the key input data via the microcomputer emulator 406. The key input data is transferred to a key input data confirmation area provided in the user RAM 402. Note that when the key data of the virtual input 102 and the key input data from the actual machine input / output 156 are input simultaneously, the virtual key data has priority. The order of this processing can be changed to give priority to key input data from the actual device 150 according to the application.
[0043]
Specifically, the key input process in the synchronization program 412 is started by calling the synchronization program 412 from the program 414 as shown in FIG. 4 (step S400). First, the key input data transferred from the virtual device 100 via the microcomputer emulator 406 and stored in the synchronization RAM 404 is read (step S402), and a change in the key input data is checked (step S404).
[0044]
If there is a change, the key input data is overwritten on the actual machine key input data determination area provided in the user RAM 402 (step S406). The actual machine key input data confirmation area is an area in the user RAM 402 in which data that is confirmed by key input from the actual machine input / output 156 is to be recorded. Thus, by overwriting the key input from the virtual device 100 in the real machine key input data determination area, the virtual key input is processed with priority over the real machine key input.
[0045]
In addition, the key data transferred from the virtual device in the synchronization RAM 404 is cleared (step S408), so that the continuous data processing is not performed by the periodically called key processing. If the continuous key is to be enabled, step S408 can be deleted so that ON key data is transmitted when the key is pressed from the virtual input 102, and OFF key data is transmitted when the key is released. .
[0046]
<Data transfer from user RAM to virtual output>
On the other hand, when the program 414 changes the output RAM data in the user RAM 402 by the input data from the virtual input 102, the procedure for transferring the output RAM data from the user RAM 402 to the virtual output 104 is as follows (b1) to It is as (b4).
[0047]
(B1) Program user RAM change;
Immediately after the RAM data related to the virtual output 104 in the user RAM 402 is changed by the program 414, processing for transmitting the change from the user RAM 402 to the specific RAM in the synchronization RAM 404 is performed. Specifically, as shown in FIG. 5, the process is started by calling the virtual synchronization program from the program 414 (step S420). Immediately after the output processing from the program 414 to the user RAM 402 (step S422), a change in the output RAM data in the user RAM 402 is detected (step S424). If there is a change, the output RAM data is synchronized from the user RAM 402 to the synchronization RAM 404. (Step S426).
[0048]
(B2) Data transmission from virtual output to virtual wiring;
Next, in order to read the change event of the output RAM data in the synchronization RAM 404 from the virtual output 104, the message slot designation from the virtual output 104 to the debugger 500 and the RAM address for reading the event are combined with the bus slot 108. Via the virtual wiring 206 via synchronous communication.
[0049]
(B3) Bridge device read processing;
A message sent from the virtual output 104 to the bridge 504 via the bus slot 502 is received by the synchronous reception unit 550 that performs reception interrupt processing, as shown in FIG. After that, the command conversion unit 552 analyzes which message is 1 byte memory write, 1 byte memory read, ICE reset, ICE execution, or the like, according to the message list as shown in FIG. The command issuing unit 554 passes the analysis result to the Virtual Link 560 in the ICE debugger 506. The VirtualLink 560 controls the existing debugger 562 to read output RAM data in the synchronization RAM 404 in the ICE 400 on the fly during program execution. Thereafter, the synchronous reception unit 550 returns the read output RAM data to the virtual output 104 that is the transmission source of the message. Thereby, the transfer of the output RAM data to the virtual output 104 is completed.
[0050]
(B4) Virtual output display processing;
The virtual output 104 displays a virtual LCD on a personal computer monitor based on the output RAM data.
[0051]
Further, instead of using the change event of the synchronization RAM 404 as described above, the virtual output 104 is displayed on the virtual output 104 by reading the data of the user RAM 402 from the virtual input 102 into the debugger 500 at a constant cycle. You may do it.
[0052]
<Effect>
As described above, according to the present embodiment, the real device 150 and the virtual device 100 are used as the peripheral device 120, the synchronization RAM 404 is provided in the ICE 400, and all the synchronization processing between the virtual device 100 and the ICE 400 is performed by software. (Bridge 504 and synchronization program 412). As a result, the program can be efficiently developed without waiting for completion of the actual machine debug set.
[0053]
In this embodiment, a plurality of virtual devices 100 having different functions may be connected to the virtual wiring 206. According to this configuration, another automatic verification system has an advantage that each device can be easily reused.
[0054]
(Second Embodiment)
When program development precedes hardware development, when the actual machine debug set is completed, it is necessary to verify the operation of the actual machine debug set using the program under development. However, conventionally, when the actual machine debug set does not operate normally during operation verification, it is difficult to determine which of the program and the actual machine debug set is bad, and there is a problem that analysis takes time.
[0055]
Therefore, the program verification system according to the second exemplary embodiment of the present invention transmits the actual input 152 and the actual output 154 of the actual device 150 necessary for the program operation of the program 414 from the ICE 400 via the debugger 500 as shown in FIG. Thus, the configuration is connected to the virtual wiring 206. Further, the program verification system has a configuration in which a virtual input 102 and a virtual output 104 that virtually realize a function equivalent to the actual input 152 and the actual output 154 are connected to a virtual wiring 206.
[0056]
Further, in this program verification system, the display of the actual output 154 is taken by the PC camera 204, and a camera monitor 202 for displaying the video taken by the PC camera 204 is provided on the monitor of the personal computer. The image of the virtual output 104 having the same function as the actual output 154 is also displayed on the monitor of the personal computer.
[0057]
In order to record the display image of the camera monitor 202 and the virtual output 104, the recording control unit 302 transfers the key code of the virtual input 102 to the ICE 400, and then displays it according to the display image data in the ICE 400. The display images of the output 154 and the virtual output 104 are copied to the clipboard 200 and recorded in the verification result file 350. In addition, the display dump data at that time is also recorded in the verification result file 350.
[0058]
The verification result file 350 is an application file that allows a debug operator to visually compare the execution results of the actual output 154 and the virtual output 104. For example, Microsoft Excel (registered trademark, hereinafter abbreviated) or the like can be used. It can be realized by using. The control program of the recording control unit 302 that controls reading and writing of the verification result file 350 is described using HTA. When the verification result file 350 is created by Excel, the OLE function is used in order to read and write from the recording control unit 302. Further, data communication between the recording control unit 302 and the virtual wiring 206 can be realized using ActiveX.
[0059]
<Initialization process>
When the program verification system according to the present embodiment is also activated, it first performs an initialization process. The virtual device 100, the debugger 500, and the recording control unit 302 perform a connection process for connecting to the virtual wiring 206. In order to receive messages from the virtual input 102 and the virtual output 104, the bridge 504 permits a reception interrupt in advance. The ICE 400 places the program 414 in an execution state in advance. The event detection unit 308 permits message reception from the virtual input 102 and the bridge 504 in advance. The image data acquisition unit 310 permits message reception from the virtual output 104.
[0060]
<Operation check of actual machine debug set>
In this program verification system, for example, in order to confirm the operation of the actual output 154, an operation comparison between the virtual output device 100 used for program evaluation by the simulator until the actual output 154 is completed and the completed actual output 154 is performed. Can be performed as follows.
[0061]
<Data transfer from virtual input to ICE>
The procedure for transferring data from the virtual input 102 to the ICE 400 is substantially the same as (a1) to (a3) described in the first embodiment. However, in the procedure of (a1), only the point that the virtual input 102 designates the RAM write message transfer not only to the debugger 500 but also to the event detection 308 is different from the first embodiment.
[0062]
<Data transfer from user RAM to virtual output>
The procedure for transferring the output RAM data to the virtual output 104 when the program 414 changes the output RAM data in the user RAM 402 by the input data from the virtual input 102 or the like has been described in the first embodiment (b1). Is substantially the same as (b4). However, in the procedure (b4), the virtual output 104 not only displays the output RAM data on the personal computer monitor on the virtual LCD, but also if there is a change in the output RAM data, the event detection unit 308 is routed via the virtual wiring 206. Is different from the first embodiment in that a screen change event and display dump data are transferred.
[0063]
<Image copy event detection from virtual input>
In order to detect issuance of a key event from the virtual input 102, key data is sent from the virtual input 102 to the event detection unit 308 via the virtual wiring 206. The event detection unit 308 passes the key data to the image data acquisition unit 310. Further, if there is a change in the image data acquired from the synchronization RAM 404 or the user RAM 402 to the virtual output 104, an image change message and display dump data of the virtual output 104 are sent from the virtual output 104 to the image data acquisition unit 310. Forward.
[0064]
<Recording of display image>
The image data acquisition unit 310 writes the key data into the verification result file 350 via the verification result writing unit 304. The verification result writing unit 304 reads and writes data using a method suitable for the format of the verification result file 350.
[0065]
When the image data acquisition unit 310 receives a display change message from the virtual output 104, the image data acquisition unit 310 instructs the capture control unit 306 to capture the image of the camera monitor 202 as the actual output 154 image data on the clipboard 200. . Similarly, the display image of the virtual output 104 is also captured on the clipboard 200. The image captured on the clipboard 200 is written into the verification result file 350 by the verification result writing unit 304.
[0066]
A specific example of the verification result file 350 is shown in FIG. As shown in FIG. 7, the verification result file 350 is sent from the virtual output 104 when displaying each image of the virtual screen and the real machine screen for each combination of the screen mode and the operation key. Displayed dump data is recorded.
[0067]
From the verification result file 350 shown in FIG. 7, when the screen mode is “MDPWRON” and the key operation defined by the name “KPOWER” (operation to turn on the power) is performed, both the virtual screen and the actual machine screen are displayed. You can see that nothing was displayed on the screen. In addition, by the key operation defined by the name “KCH UP”, the characters “CH03” are displayed in the upper right corner of the screen, and further, by the key operation defined by the name “KVOL UP”, “ It can be seen that the characters "Vol 24" are displayed. In the case of the above key operations, the display on the virtual screen and the actual machine screen are the same. However, for a key operation defined with the name “KMENU”, “MENU” is displayed on the top line of the virtual screen, but “MEU0” is displayed on the actual screen, and the virtual screen The display state of the actual machine screen does not match. Thus, it can be seen that there is a bug in the actual device 150 regarding the key operation of “KMENU”.
[0068]
Although schematically shown in FIG. 7, the image image of the virtual output 104 captured on the clipboard 200 is actually pasted in the “virtual screen” field of the verification result file 350. In the “actual machine screen” field, an image image of the actual output 154 captured by the PC camera 204 and captured from the camera monitor 202 to the clipboard 200 is pasted. Therefore, by comparing these image images, the debug operator can easily recognize the difference between the virtual screen and the actual machine screen.
[0069]
<Control multiple PC cameras>
Further, as shown in FIG. 8, in addition to the PC camera 204 that captures the state of the actual output 154, a PC camera 205 that captures the state of the actual input / output 156 may be further provided to capture the actual device 150. Good. Note that the state of the real machine input / output 156 refers to, for example, a state in which key inputs to the real machine device 150 are echoed on the real machine monitor, a process result being displayed on the monitor, and the like. A camera monitor 202 and a camera monitor 203 are connected to the PC camera 204 and the PC camera 205, respectively. The recording control unit 302 is further provided with a capture selection unit 324 that selects a monitor image to be captured from the camera monitor 202 and the camera monitor 203 to the clipboard 200. This makes it possible to record more monitor images.
[0070]
<Effect>
As described above, in this embodiment, in order to confirm the operation of the newly developed actual output 154, the virtual output 104 (operation verified) that operates equivalent to the actual output 154 is operated on the ICE 400. The execution results of the actual output 154 and the virtual output 104 are written in the verification result file 350 in a state where the debugging operator can visually confirm the execution results. Thereby, the operation comparison between the actual output 154 and the virtual output 104 is facilitated, and the hardware operation verification of the actual output 154 can be performed efficiently. In addition, if the configuration includes a plurality of PC cameras for photographing the state of the actual device 150, more information can be recorded, and verification accuracy can be improved.
[0071]
(Third embodiment)
The main difference between the program verification system according to the third embodiment of the present invention and the program verification system according to the second embodiment is that the program verification system according to the present embodiment performs automatic program verification. is there. For this reason, as shown in FIG. 9 and the like, this program verification system, in addition to the verification result file 350 and the recording control unit 302 described in the second embodiment, the scenario control for controlling the scenario file 352 and reading / writing thereof. Part 314. The recording control unit 302 and the scenario control unit 314 constitute an automatic verification control unit 300 for realizing automatic program verification.
[0072]
The scenario file 352 is a file in which an operation procedure (scenario) for automatically verifying the program 414 is recorded. Like the verification result file 350, the scenario file 352 is realized using, for example, Microsoft Excel. Can do. The control program of the automatic verification control unit 300 is described using HTA. Further, when the verification result file 350 and the scenario file 352 are created by Excel, the OLE function is used in order to perform reading and writing from the automatic verification control unit 300. In addition, data communication between the automatic verification control unit 300 and the virtual wiring 206 can be realized using ActiveX.
[0073]
The configuration and operation of the program verification system will be specifically described below.
[0074]
The program verification system updates the display of the virtual output 104 based on the change in the display image data in the ICE 400, records the display image of the virtual output 104 in the verification result file 350 via the clipboard 200, and performs verification in advance. It is configured to automatically compare with the expected value data for verification recorded in the result file 350.
[0075]
<Automatic sequence of data transfer from scenario to ICE>
The automatic verification process of the program verification system will be described below. The automatic verification process is performed by the automatic verification control unit 300 reading key data and the like from the scenario file 352, automatically transferring them to the ICE 400 and executing them, and writing and executing the execution results in the verification result file 350 for evaluation.
[0076]
In the scenario file 352, operation information (key data or the like) necessary for operation verification is recorded in advance according to the verification procedure. The scenario file 352 is created as a state transition table as shown in FIG. 11, for example, using an Excel file. In this program verification system, after setting the screen mode to a predetermined state according to the operation sequence described in the scenario file, the key is issued as an event to confirm the action (valid or invalid) for each key input. Do. For example, in the case of the scenario file 352 shown in FIG. 11, according to the execution order shown in FIG. 11, first, with the screen mode set to “MDPWRON”, “KPOWER”, “KCH UP”, “KVOL UP”, “ Key inputs of “KMENU” and “KSET” are sequentially performed, and the operations of the virtual device and the real device for each of these key operations are verified. Next, with the screen mode set to “MMENU”, key inputs of “KPOWER”, “KCH UP”, “KVOLUP”, “KMENU”, and “KSET” are sequentially performed in the same manner as described above. Verify the operation of the actual device. Thereafter, the screen modes “MDTIMER”, “MDSET”, and “MDTEST” are similarly verified.
[0077]
Here, the details of the automatic verification process using the scenario file 352 shown in FIG. 11 will be described more specifically, taking as an example the case where operation verification is performed for each key input in the state of the screen mode “MDMENU”. The automatic verification control unit 300 performs the operation verification for the key input in the state of the screen mode “MDMENU” by the following procedures (1) to (9).
[0078]
(1) “1” is set in the reset completion monitor flag RAM in the synchronization RAM 400.
[0079]
(2) In order to initialize the ICE 400 with the program 414, the scenario reading unit 316 instructs the data transmission unit 320 to issue a reset GO command. The “reset GO” command causes the ICE 400 to sequentially execute a “reset” command for stopping and initializing the execution of the actual machine program 410 and a “GO” command for causing the ICE 400 to start executing the actual machine program 410 from the beginning. Is. The data transmission unit 320 sends a reset GO message to the ICE debugger 506 via the bridge 504 by synchronous communication. When the ICE debugger 506 causes the ICE 400 to execute reset GO, the actual machine program 410 is reset and started. The reset completion monitor flag RAM value is set to “0” in the head program of the actual program reset start execution. When the ICE 400 completes the reset GO, the reset GO completion notification is sent from the bridge 504 to the scenario reading 316 via the data transmission unit 320.
[0080]
(3) After confirming that the reset completion monitor flag RAM value is “0”, the key described in the operation sequence of the screen mode in the scenario file 352 in order to set the screen mode to “MDMENU”. Are sequentially read and issued by the scenario reading unit 316. The issued key is transferred to the ICE 400 via the data transmission unit 320, the bus slot 312, the virtual wiring 206, and the debugger 500. In the example of FIG. 11, since the key “KPOWER” is described as the first operation (operation 1 column in the scenario file of FIG. 11) of the operation sequence of “MDMENU”, this key is issued first.
[0081]
(4) Whether the actual machine program 410 has completed the processing of the “KPOWER” key is confirmed by checking a change in the value in the specific RAM in the user RAM 402. When the change of the specific RAM can be confirmed, next, the “KMENU” key described in the operation 2 of the operation sequence is issued, and the change of the specific RAM in the user RAM 402 is checked in the same manner as described above. Check whether the processing of the “KMENU” key is completed. The above processing is repeatedly executed up to the last key described in the operation sequence of the scenario file 352. In the case of “MDMENU” shown in FIG. 11, the target screen mode “MDMENU” is set by executing the “KPOWER” key and the “KMENU” key.
[0082]
(5) When the target screen mode is reached, first, the image data in the user RAM 402 is taken into the synchronous RAM 404.
[0083]
(6) Next, issue keys described in the scenario file 352 are issued sequentially to verify the operation. In the example of FIG. 11, first, a “KPOWER” key is issued. The completion of the processing of the “KPOWER” key is confirmed by a change in the specific RAM value in the user RAM 402.
[0084]
(7) When it is confirmed that the processing of the “KPOWER” key is completed, the processing result of the “KPOWER” key is verified. The virtual output 104 notifies the event detection unit 308 of the presence / absence of a screen change. The event detection unit 308 determines whether the screen change matches the valid / invalid specification described in the scenario file 352.
[0085]
For example, in the scenario file shown in FIG. 11, the symbol O indicates that the key issuance is valid in the screen mode, and the symbol X indicates that the key issuance is invalid in the screen mode. “Key issuance is valid” means that the key issuance causes some change on the screen. “Key issuance is invalid” means that the key issuance does not cause any change on the screen. That means.
[0086]
Here, since the circle symbol is described in the column corresponding to the intersection of the “MDMENU” column and the “KPOWER” row, when the “KPOWER” key is issued when the screen mode is “MDMENU”, If the key is processed correctly, some screen change should occur. Accordingly, if a screen change occurs due to the issuance of the “KPOWER” key, the event detection unit 308 determines that the “KPOWER” key valid / invalid specification in the “MDMENU” screen mode is satisfied.
[0087]
The event detection unit 308 colors the valid / invalid specification column of the scenario file 352 according to the determination result of whether the valid / invalid specification is satisfied. That is, if the event detection unit 308 determines that the valid / invalid specification described in the scenario file 352 is satisfied, the valid / invalid specification column of the scenario file 352 is passed through the verification result writing unit 304. The display attribute is set to, for example, blue, and when it is determined that the display attribute is not satisfied, for example, the display attribute is set to red so that the abnormal operation is understood. As a result, the debug operator can easily identify whether the target specification is satisfied by the display color of the valid / invalid specification column of the scenario file 352. Here, the verification result of the valid / invalid specification is recorded in the scenario file 352, but a column for recording the verification result of the valid / invalid specification may be separately provided in the verification result file 350.
[0088]
(8) Further, the verification result writing unit 304 writes the screen data (executed image data) acquired from the user RAM 402 by the image data acquisition unit 310 to the verification result file 350. Further, the verification result writing unit 304 compares the execution image data with reference image data created in advance prior to execution of the verification process, and writes the comparison result in the verification result file 350. The reference image data is dump data of image data to be displayed as a result of correctly processing the key, and is written in the verification result file 350 as shown in FIG. For example, in the verification result file 350 according to the example shown in FIG. 12, a symbol “◯” is written in the “judgment” column if the comparison result between the reference image data and the execution image data matches, and a symbol “x” is not matched. Yes. As a result, the debug operator can easily verify whether or not the predetermined screen data is displayed by issuing the key only by looking at the determination field of the verification result file 350.
[0089]
(9) In addition, a screen image (reference screen) based on the reference image data is pasted in the verification result file 350 in advance. As illustrated in FIG. 12, the verification result writing unit 304 pastes the screen (execution screen) output to the virtual output 104 to the next column of the reference screen via the clipboard 200. Thereby, the debug operator can easily identify the difference between the reference screen and the execution screen only by looking at the verification result file 350.
[0090]
When the processing up to the above (9) is completed for the “KPOWER” key, the processing returns to (5), the next issuance key “KCH UP” described in the scenario file is issued in (6), and the subsequent processing is performed. Do. Similarly, the verification result file as shown in FIG. 12 is completed by repeating the processes (5) to (9) for all the issuance keys described in the scenario file.
[0091]
In the present embodiment, the existing debugger 562 monitors the behavior of the ICE 400 in order to prevent the automatic verification process from being unable to continue when the ICE 400 becomes abnormal due to some factor during the automatic verification process. If a change occurs in the operation of the ICE 400, the ICE debugger 506 transmits a message as shown in FIG. 13 to the ICE status monitor 558 (see FIG. 2) in the bridge 504. Further, this message is transmitted from the ICE state transmission unit 556 to the timing control unit 318 in the scenario control unit 314 via the virtual wiring 206. Thereby, the timing control unit 318 performs processing such as causing the scenario reading unit 316 to reissue the data of the scenario file 352 in accordance with the operation change of the ICE 400.
[0092]
As described above, according to this embodiment, automatic program verification can be realized.
[0093]
<Remote control>
As shown in FIG. 10, an execution status distribution unit 322 that distributes the execution status of the automatic verification process is provided in the recording control unit 302, and an email transmission / reception unit 602 that transmits / receives an email to / from an external device. It is good also as a structure which provided further. With this configuration, if the execution status of the automatic verification process is distributed to the portable information terminal 604 or the like via the electronic mail transmission / reception unit 602 from the execution status distribution unit 322, the execution status of the automatic verification process is changed. It becomes possible to monitor in real time from a remote location.
[0094]
If a problem or the like of the program 414 is found during the execution of the automatic verification process, a debugger control command as shown in FIG. 3 is transmitted to the program verification system as an e-mail message from the portable information terminal 604 or the like. By doing so, the program verification system can be controlled remotely. The remote control result is distributed from the execution status distribution unit 322 via the electronic mail transmission / reception unit 602 to the portable information terminal 604 or the like by electronic mail.
[0095]
As a result, the program verification system can be remotely controlled.
[0096]
In the automatic verification process, instead of using the state transition table as the scenario file 352, any automatic verification process can be realized by appropriately changing the description method of the scenario file 352 and the control method of the automatic verification control unit 300. Is possible.
[0097]
<Specific operation>
Hereinafter, the operation of this program verification system that performs automatic program verification will be described more specifically.
[0098]
<Initialization process>
When the program verification system of the present embodiment (configuration shown in FIG. 10) is also activated, first, initialization processing is performed. The virtual device 100, the debugger 500, the automatic verification control unit 300, and the e-mail transmission / reception unit 602 perform connection processing for connecting to the virtual wiring 206. The bridge 504 permits reception interrupts in advance in order to receive messages from the data transmission unit 320 and the virtual output 104. Further, the execution status distribution unit 322 permits message reception from the virtual output 104. The execution status monitor 606 in the e-mail transmission / reception unit 602 permits reception from the execution status distribution unit 322.
[0099]
<Flow reset GO command data from scenario reading to virtual wiring>
The scenario reading unit 316 instructs the data transmission unit 320 to transmit a reset GO command in order to initialize the execution of the ICE 400. The data transmission unit 320 sends a message created according to the format of the reset GO command as shown in FIG. 3 to the bridge 504 and sends it from the bus slot 106 to the virtual wiring 206 by synchronous communication.
[0100]
<Bridge device write processing>
The message sent from the data transmission unit 320 to the bridge 504 via the bus slot 502 is received by the synchronous reception unit 550 that performs reception interrupt processing as shown in FIG. The command conversion unit 552 refers to the table as shown in FIG. 3 and analyzes which message is a received message such as 1 byte memory write, 1 byte memory read, ICE reset, ICE execution, and the result. Is sent from the command issuing unit 554 to the VirtualLink 560 in the ICE debugger 506.
[0101]
The VirtualLink 560 controls the existing debugger 562, issues a reset command to the ICE 400, issues an execution start command, uses the execution completion notification as return data of the synchronous reception unit 550, and a data transmission unit that is a message transmission source. Reply to 320. The data transmission unit 320 notifies the scenario reading unit 316 that the reset GO command has been executed, and executes the execution according to the contents of the scenario file 352.
[0102]
<Flow data from scenario file to virtual wiring>
The scenario reading unit 316 reads the key code from the scenario file 352, instructs the data transmission unit 320, and bridges the message created according to the 1-byte memory write command issue format in the message list as shown in FIG. Addressed to 504, the data is sent from the bus slot 106 to the virtual wiring 206 by synchronous communication.
[0103]
<Bridge writing process>
The message sent from the data transmission 320 to the bridge 504 via the bus slot 502 is received by the synchronous reception unit 550 that performs reception interrupt processing as shown in FIG. Then, the command conversion unit 552 analyzes which message, such as 1-byte memory write, 1-byte memory read, ICE reset, and ICE execution, is based on the table shown in FIG. The analysis result is passed from the command issuing unit 554 to the VirtualLink 560 in the ICE debugger 506.
[0104]
The VirtualLink 560 controls the existing debugger 562, writes the RAM data of the designated RAM address passed from the virtual input 102 to the synchronization RAM 404 in the ICE 400 executing the program 414 on the fly, and then notifies the completion of writing. Is sent back to the data transmission unit 320, which is the message transmission source, as reply data of the synchronous reception unit 550. When receiving the reply, the execution status distribution unit 322 notifies the event detection unit 308 that the key data has been distributed.
[0105]
<Transfer processing from synchronization RAM to user RAM>
The synchronization program 412 causes the microcomputer emulator 406 to check changes in the synchronization RAM 404 at a timing required for the program 414.
[0106]
For example, in the case of key input, the synchronization program 412 is called immediately after the key input processing of the program 414, and the change of the key data RAM in the synchronization RAM 404 is checked via the microcomputer emulator 406. For example, the key data is transferred to the key data confirmation area of the user RAM 402. At this time, when the key data of the virtual input 102 and the key data from the real device 150 are input at the same time, the key data from the virtual input 102 is given priority.
[0107]
Specifically, the key input process in the synchronization program 412 is as described with reference to FIG. 4 in the first embodiment. Thereby, the virtual key input is processed with priority over the actual machine key input.
[0108]
<Data transfer from user RAM to virtual output>
When the program 414 changes the output RAM data (output data to the virtual output 104) in the user RAM 402 by the key code read from the scenario file 352, the method of transferring this output RAM data to the virtual output 104 is as follows ( c1) to (c4).
[0109]
(C1) Program user RAM change;
Immediately after the RAM area related to the virtual output 104 in the user RAM 402 is changed by the program 414, processing for transmitting the change from the user RAM 402 to the specific RAM in the synchronization RAM 404 is performed. Specifically, as shown in FIG. 5, the process is started by calling a virtual synchronization routine from the program 414 (step S420). Immediately after performing the output process to the real device 150 (step S422), a change in the output RAM data to the real device 150 is detected (step S424). If there is a change, the output RAM data is synchronized from the user RAM 402 to the synchronization RAM 404. (Step S426).
[0110]
(C2) flowing data from the virtual output to the virtual wiring;
Next, in order to read the change event of the output RAM data in the synchronization RAM 404 from the virtual output 104, the message slot designation from the virtual output 104 to the debugger 500 and the RAM address for reading the event are combined with the bus slot 108. Via the virtual wiring 206 via synchronous communication.
[0111]
(C3) Bridge device read processing;
A message sent from the virtual output 104 to the bridge 504 via the bus slot 502 is received by the synchronous reception unit 550 that performs reception interrupt processing, as shown in FIG. After that, the command conversion unit 552 analyzes which message is 1 byte memory write, 1 byte memory read, ICE reset, ICE execution, or the like, according to the message list as shown in FIG. The command issuing unit 554 passes the analysis result to the Virtual Link 560 in the ICE debugger 506. The VirtualLink 560 controls the existing debugger 562 to read output RAM data in the synchronization RAM 404 in the ICE 400 on the fly during program execution. Thereafter, the synchronous reception unit 550 returns the read output RAM data to the virtual output 104 that is the transmission source of the message. Thereby, the transfer of the output RAM data to the virtual output 104 is completed.
[0112]
(C4) Virtual output display processing;
The virtual output 104 displays a virtual LCD on a personal computer monitor based on the output RAM data. If there is a change in the image data acquired from the synchronization RAM 404 or the user RAM 402 to the virtual output 104, the virtual output 104 sends an image change message and an image change message to the image data acquisition unit 310 via the execution status distribution unit 322. The display dump data of the virtual output 104 is transferred.
[0113]
Alternatively, a method may be used in which the data in the user RAM 402 is read into the debugger 500 from the virtual input 102 at a constant cycle and the virtual output 104 is displayed on the virtual output 104 without using the event.
[0114]
<Transfer from data transfer to event detection>
When the key data is sent from the data transmission unit 320 to the execution status distribution unit 322, the key data is transferred from the event detection unit 308 to the image data acquisition unit 310. If there is a change in the image data acquired from the synchronization RAM 404 or the user RAM 402 to the virtual output 104, the image change message is sent from the virtual output 104 to the image data acquisition unit 310 via the execution status distribution unit 322. And transfer the display dump data of virtual output. The image data acquisition unit 310 writes the key data from the verification result writing unit 304 to the verification result file 350.
[0115]
Further, upon receiving a display change message from the virtual output 104, the image data acquisition unit 310 captures a display image of the virtual output 104 on the clipboard 200. The image captured on the clipboard 200 is written into the verification result file 350 by the verification result writing unit 304.
[0116]
Specifically, as shown in FIG. 12, the key data is written in the operation key column, and the screen mode of the scenario file 352 is written in the screen mode column.
[0117]
<Comparison of reference image data and execution image data>
In the verification result file 350, the data difference between the “reference image data” and the “executed image data” is determined, and the determination result is written as “◯” and “X” in the “determination” column. When the verification result file 350 is created by Excel, the difference between “reference image data” and “executed image data” can be determined using an IF function.
[0118]
<Creation of reference image data>
The reference image for performing the automatic verification process and the display dump data thereof are created by writing the image data and the display dump data on the reference screen and the execution image data shown in FIG. Can be created.
[0119]
<Effect>
As described above, according to the present embodiment, by using a scenario file, automatic program verification can be performed, and evaluation efficiency can be improved. In addition, the execution status of automatic program verification can be monitored from a remote location.
[0120]
(Fourth embodiment)
After the hardware of the actual machine on which the program 414 is to be mounted is completed, as shown in FIG. 14, automatic verification can be performed by a program verification system using only the actual machine debug set without using a virtual device. is there.
[0121]
【The invention's effect】
As described above, according to the present invention, in a program verification system using ICE, hardware for performing program verification in which peripheral devices are divided into real devices and virtual devices is not required, and program verification can be performed in a short time. You can build a system. As for automatic verification, output display such as an LCD display can be recorded as a display image regardless of a real device or a virtual device, so that the program verification time can be shortened. Furthermore, since the automatic verification can be controlled remotely, the program can be debugged and verified by remote operation, thereby improving work efficiency.
[Brief description of the drawings]
FIG. 1 is a block diagram showing the configuration of a program verification system according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing the internal configuration of the debugger
FIG. 3 is an explanatory diagram of a list of messages from a virtual device to a bridge.
FIG. 4 is a flowchart of key input processing.
FIG. 5 is a flowchart of display output processing.
FIG. 6 is a block diagram showing a configuration of a program verification system according to a second embodiment of the present invention.
FIG. 7 is an explanatory diagram showing an example of a verification result file
FIG. 8 is a block diagram of a program verification system using a plurality of cameras as a modification of the program verification system according to the second embodiment.
FIG. 9 is a block diagram showing a configuration of a program verification system according to a third embodiment of the present invention.
FIG. 10 is a block diagram of a modification of the program verification system according to the third embodiment.
FIG. 11 is an explanatory diagram showing an example of a scenario file
FIG. 12 is an explanatory diagram showing an example of a verification result file according to the third embodiment.
FIG. 13 is an explanatory diagram showing a list of events from the ICE to the virtual device.
FIG. 14 is a block diagram showing a configuration of a program verification system according to a fourth embodiment of the present invention.
FIG. 15 is a block diagram of a conventional program verification system using an actual machine debug set.
FIG. 16 is a block diagram of a program verification system using a conventional system simulator set.
FIG. 17 is a block diagram of a conventional program verification system mixed with a real set simulator.
[Explanation of symbols]
100 virtual devices
102 Virtual input
104 Virtual output
120 peripheral devices
150 Actual device
152 Actual input
154 Actual output
156 Actual input / output
200 clipboard
202, 203 Camera monitor
204,205 PC camera
206 Virtual wiring
300 Automatic verification controller
302 Recording control unit
304 Verification result writing unit
308 Event detector
310 Image data acquisition unit
312 bus slot
314 Scenario control unit
316 Scenario reading part
318 Timing control unit
320 Data transmitter
322 execution status distribution part
350 Verification result file
352 scenario file
400 ICE
402 User RAM
404 Synchronization RAM
410 Real machine program
412 Synchronization program
500 Debugger
502 bus slot
504 bridge
506 ICE debugger
600 Email sending and receiving part
604 portable information terminal
606 Execution status monitor
608 Remote control unit
610 Mail delivery control unit

Claims (10)

マイコンの周辺デバイスとして実機デバイスおよび仮想デバイスを用いて、前記マイコン用プログラムの動作を検証するプログラム検証システムであって、
前記マイコン上の前記プログラムの動作をエミュレーションするエミュレータと、
前記実機デバイスに対応した検証動作を行うよう前記エミュレータを制御する検証制御部と、
前記検証制御部と前記仮想デバイスとの間に設けられ、前記仮想デバイスからの制御信号およびデータを前記検証制御部に適合させるブリッジ部と、
前記実機デバイスと前記プログラムとの間の入出力データを格納する実機用RAMと、
前記実機用RAMと前記仮想デバイスとの間に設けられた同期化RAMと、
前記実機デバイスに対する前記プログラムの入出力動作に同期させて、前記同期化RAMと前記実機用RAMとの間のデータ転送を制御する、仮想・実機同期処理部とを備えたことを特徴とするプログラム検証システム。
Using a real device and a virtual device as a peripheral device of a microcomputer, a program verification system for verifying the operation of the microcomputer program,
An emulator for emulating the operation of the program on the microcomputer;
A verification control unit that controls the emulator to perform a verification operation corresponding to the actual device;
A bridge unit that is provided between the verification control unit and the virtual device, and adapts a control signal and data from the virtual device to the verification control unit;
RAM for actual machine for storing input / output data between the actual machine device and the program;
A synchronization RAM provided between the real machine RAM and the virtual device;
A program comprising a virtual / real machine synchronization processing unit for controlling data transfer between the synchronization RAM and the real machine RAM in synchronization with an input / output operation of the program to the real machine device Verification system.
前記仮想デバイスと前記ブリッジ部とを仮想配線により接続した、請求項1に記載のプログラム検証システム。The program verification system according to claim 1, wherein the virtual device and the bridge unit are connected by virtual wiring. 前記仮想デバイスを複数備えた、請求項1に記載のプログラム検証システム。The program verification system according to claim 1, comprising a plurality of the virtual devices. 前記実機デバイスにてモニタ出力される実機モニタ出力画像を撮影する撮影装置と、
前記実機モニタ出力画像と、前記仮想デバイスにてモニタ出力される仮想モニタ出力画像とを、検証結果ファイルへ記録する、検証結果書込部とをさらに備えた、請求項1に記載のプログラム検証システム。
A photographing device for photographing a real machine monitor output image output by the real machine device;
The program verification system according to claim 1, further comprising a verification result writing unit that records the actual monitor output image and a virtual monitor output image output by the virtual device in a verification result file. .
前記周辺デバイスにおける所定の変化を検出するイベント検出部と、
前記イベント検出部の検出結果に従ったタイミングで、前記実機モニタ出力画像と前記仮想モニタ出力画像とを取り込む画像取得部とをさらに備えた、請求項4に記載のプログラム検証システム。
An event detector for detecting a predetermined change in the peripheral device;
5. The program verification system according to claim 4, further comprising an image acquisition unit that captures the actual machine monitor output image and the virtual monitor output image at a timing according to a detection result of the event detection unit.
前記イベント検出部の検出結果に従い、前記実機モニタ出力画像または仮想モニタ出力画像を含む検証処理状況を外部端末へ送信する検証状況配信部をさらに備えた、請求項5に記載のプログラム検証システム。The program verification system according to claim 5, further comprising a verification status distribution unit that transmits a verification processing status including the real machine monitor output image or the virtual monitor output image to an external terminal according to a detection result of the event detection unit. 外部端末から、制御信号およびその宛先を含むメッセージを受信し、受信したメッセージから前記制御信号を抽出し、当該制御信号の宛先へ配信するリモート制御部をさらに備えた、請求項6に記載のプログラム検証システム。The program according to claim 6, further comprising a remote control unit that receives a message including a control signal and its destination from an external terminal, extracts the control signal from the received message, and distributes the control signal to the destination of the control signal. Verification system. 前記撮影装置を複数台備えた、請求項4〜7のいずれか一項に記載のプログラム検証システム。The program verification system according to any one of claims 4 to 7, comprising a plurality of the photographing devices. 前記プログラムを自動的に検証するための操作手順を記録したシナリオファイルからデータを読み込み、前記ブリッジ部へ転送するシナリオ制御部をさらに備えた、請求項1〜8のいずれか一項に記載のプログラム検証システム。The program according to any one of claims 1 to 8, further comprising a scenario control unit that reads data from a scenario file that records an operation procedure for automatically verifying the program and transfers the data to the bridge unit. Verification system. 前記シナリオファイルから読み込んだデータの前記ブリッジ部への転送を、前記エミュレータの動作状況に合わせて制御するタイミング制御部をさらに備えた、請求項9に記載のプログラム検証システム。The program verification system according to claim 9, further comprising a timing control unit that controls transfer of data read from the scenario file to the bridge unit in accordance with an operation state of the emulator.
JP2002123082A 2002-04-24 2002-04-24 Program verification system Expired - Fee Related JP4171240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002123082A JP4171240B2 (en) 2002-04-24 2002-04-24 Program verification system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002123082A JP4171240B2 (en) 2002-04-24 2002-04-24 Program verification system

Publications (2)

Publication Number Publication Date
JP2003316603A JP2003316603A (en) 2003-11-07
JP4171240B2 true JP4171240B2 (en) 2008-10-22

Family

ID=29538515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002123082A Expired - Fee Related JP4171240B2 (en) 2002-04-24 2002-04-24 Program verification system

Country Status (1)

Country Link
JP (1) JP4171240B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4562439B2 (en) * 2003-11-11 2010-10-13 パナソニック株式会社 Program verification system and computer program for controlling program verification system
JP4038220B2 (en) * 2005-09-27 2008-01-23 ソフトバンクモバイル株式会社 Program development support device
JP5032764B2 (en) * 2005-11-09 2012-09-26 株式会社日立ハイテクノロジーズ Equipment controller for industrial equipment
JP4747060B2 (en) * 2006-09-20 2011-08-10 株式会社アイ・エル・シー Verification device, verification program, and verification method
US20090213083A1 (en) * 2008-02-26 2009-08-27 Apple Inc. Simulation of multi-point gestures with a single pointing device
JP5179249B2 (en) 2008-05-09 2013-04-10 インターナショナル・ビジネス・マシーンズ・コーポレーション Control device simulation method, system, and program
JP5153465B2 (en) 2008-06-09 2013-02-27 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation method, system and program
JP2012168851A (en) * 2011-02-16 2012-09-06 Fujitsu Ltd Emulator
CN114691486A (en) * 2020-12-30 2022-07-01 腾讯科技(深圳)有限公司 Program debugging method and device and computer equipment

Also Published As

Publication number Publication date
JP2003316603A (en) 2003-11-07

Similar Documents

Publication Publication Date Title
US5157782A (en) System and method for testing computer hardware and software
US5596714A (en) Method for simultaneously testing multiple graphic user interface programs
US7337104B2 (en) Device emulation in programmable circuits
JPH05506119A (en) in-circuit emulator
JP4171240B2 (en) Program verification system
CN109783340B (en) SoC test code programming method, IP test method and device
CN113076227A (en) MCU verification method, system and terminal equipment
US6263305B1 (en) Software development supporting system and ROM emulation apparatus
JP2004252585A (en) Program verification system
CN100403275C (en) Micro processor and method using in firmware program debug
CN114253781B (en) Test method, device, equipment and storage medium
JP4562439B2 (en) Program verification system and computer program for controlling program verification system
US20020184001A1 (en) System for integrating an emulator and a processor
JP3652307B2 (en) Print engine simulator, development system, simulation method, computer program product, and computer program
JPH11272494A (en) Debug/co-simulation system for wide band switch firmware
JP2002007483A (en) Device and method for scanner simulator
JP2004038387A (en) Logical verification system
JP2004157787A (en) Program verification system
CN109522244A (en) A kind of embedded device Debugging message acquisition methods and system
JPH03125233A (en) Recording device simulator and its simulation engine
JP2887515B2 (en) Recorder simulator
JP4344147B2 (en) Computer extended function testing device
CN117422026B (en) RISC-V architecture-based processor verification system
JP2908337B2 (en) VHDL simulation execution system for multi-process
JP2002236594A (en) Emulation system and emulator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050223

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070605

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

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

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

Free format text: PAYMENT UNTIL: 20110815

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120815

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees