JP2004021751A - Debug system, debug program, and debug program storage medium - Google Patents

Debug system, debug program, and debug program storage medium Download PDF

Info

Publication number
JP2004021751A
JP2004021751A JP2002177829A JP2002177829A JP2004021751A JP 2004021751 A JP2004021751 A JP 2004021751A JP 2002177829 A JP2002177829 A JP 2002177829A JP 2002177829 A JP2002177829 A JP 2002177829A JP 2004021751 A JP2004021751 A JP 2004021751A
Authority
JP
Japan
Prior art keywords
command
debugger
storage unit
unit
shared memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002177829A
Other languages
Japanese (ja)
Inventor
Yasuhiko Hamada
濱田 保彦
Wataru Ogoshi
大越 渉
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002177829A priority Critical patent/JP2004021751A/en
Publication of JP2004021751A publication Critical patent/JP2004021751A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enable the constitution of a device with minimized test system and terminal number in a debug device for a plurality of processor cores, and the high-speed execution thereof. <P>SOLUTION: Each of a plurality of processor cores 106 and 107 of an LSI 108 is debugged by debuggers 102 and 103 having input and output function of debugging command, which are operated on a computer system 101. This system has a shared memory 104 accessible from each of the debuggers 102 and 103. Only when the shared memory 104 is referred to acquire a hard access right by the content of the shared memory 104 before issuing a command for transmitting a debug command from an optional debugger to the LSI, a hard access is started. When the other debugger issues the command, also, it is determined by the content of the shared memory 104, and the hard access is performed only when the access right is acquired. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明はマイクロプロセッサを利用したターゲットシステムのハードウェア評価とソフトウェアデバッグとを支援するデバッグ装置に関し、特に、ターゲットシステムが複数プロセッサコアで構成されるシステムにおけるデバッグ装置に関するものである。
【0002】
【従来の技術】
従来より、マイクロプロセッサのターゲットシステム開発において、そのシステムおよびソフトウェアの評価のためにデバッグ装置が用いられている。また近年、システムLSI化が進むにつれ、オンチップデバッグ回路を持ったプロセッサコアが増えてきており、そのデバッグ回路を利用したデバッグ装置が一般的となってきている。その中で、複数プロセッサコアからなるシステムLSIのデバッグを行う際には、プロセッサコア間のシステム検証とソフトウェアデバッグとが重要な課題となっている。
【0003】
その課題に対し、今までは、複数プロセッサコアをJTAG方式等のシリアルポートで制御し、デバッグするプロセッサコアの数に合わせた複数組のシリアルポート出力端子に、それぞれのテストシステムをデバッグ対象のプロセッサコア分だけ用意して、デバッグシステムを構成していた。
【0004】
テストシステムは、通常、入出力機能を備えたコンピュータシステム上にコマンド入力機能と実行結果の出力機能とを備えており、コンピュータシステムからのコマンドは、マイクロプロセッサのデバッグ回路へ送受信するデータを制御する制御ユニットを介してやりとりされる。図19はその構成例である。LSI209がCORE(A)207とCORE(B)208との2つのプロセッサコアで構成され、それぞれに対してシリアルポートによる端子出力があり、それぞれが、制御ユニット(A)205と制御ユニット(B)206とに接続される。また、制御ユニットからはそれぞれコンピュータシステムPC(A)201、PC(B)202上のデバッガ(A)203、デバッガ(B)204に接続される。
【0005】
また、別のシステムとしては、複数のプロセッサコアが一組のシリアルポートで接続され、その出力端子に、制御ユニットを介して、コンピュータシステム上のサーバアプリケーションと、デバッグ対象コアに対する複数のデバッガアプリケーションとが起動し、デバッグ装置を構成するものが存在する。図20はその構成例である。LSI309がCORE(A)307とCORE(B)308とで構成され、それぞれがJTAG方式等のシリアルチェーンで接続され、LSI309からは1組のシリアルポートの端子出力があり、制御ユニット306に接続される。制御ユニット306へはマスターとなるコンピュータシステムPC(A)301が接続され、そのコンピュータシステムPC(A)301上でサーバアプリケーション305が制御ユニット306との間でのデータの送受信を行う。サーバアプリケーション305は、そのコンピュータシステムPC(A)301で起動するデバッガ(A)303、またはネットワーク接続されたリモートコンピュータシステムPC(B)302上のデバッガ(B)304からアクセスすることができる。
【0006】
【発明が解決しようとする課題】
しかしながら、前記図19の従来例にあるデバッグ装置は、複数のプロセッサコア207、208をデバッグするために、これらプロセッサコア207、208に対応した複数組のコンピュータシステム201、202と制御ユニット205、206とが必須となる。プロセッサコアが少数の場合には問題は少ないかもしれないが、多数のプロセッサコアを含むLSIをデバッグする環境を構築するのは困難である。さらに、LSIの微細化により、端子数によるチップ面積制限が大きな課題となっている中で、LSI309からデバッグ対象のプロセッサコア分のデバッグ用端子を個別に出力する必要があるため、チップ面積が大きくなってしまい、さらにチップのコストアップにも繋がるという課題がある。
【0007】
また、前記図20の従来例にあるデバッグ装置は、前記図19の従来例のような複数組のデバッグシステムやLSIからの出力端子は必要とはしないが、デバッガ303、304とプロセッサコア307、308とのデータのやり取りをサーバアプリケーション305を中継して行うため、デバッガの応答速度が遅くなるという課題がある。また、複数のプロセッサコアに対してデバッグを行う場合には、それに対応した複数のコンピュータシステムが必要であるという課題もある。
【0008】
本発明は上記従来の問題点を解決するもので、最小限のテストシステムと端子数で構成可能であり、かつ、高速に実行可能である、複数プロセッサコアデバッグ環境を実現することを目的とする。
【0009】
【課題を解決するための手段】
上記の目的を達成するため、本発明では、LSIの複数プロセッサコアのそれぞれに対し、コンピュータシステム上で動作するデバッグ用のコマンドの入出力機能を備えたデバッガでデバッグするシステムに関して、それぞれのデバッガからアクセス可能である共有メモリを備え、任意のデバッガよりLSIへデバッグ命令が送信されるコマンドを発行する前に、共有メモリを参照して、この共有メモリの内容によってハードアクセス権を取得した場合に限り、ハードアクセスを開始し、その間、他のデバッガがコマンドを発行する場合にもその共有メモリの内容で判断して、アクセス権が取得できなければ、ハードアクセスを行わない。これにより、従来のようなサーバアプリケーションを用いずとも、高速に複数プロセッサコアのデバッグを行うことが可能となる。
【0010】
このため、本発明にかかるデバッグ装置は、複数存在する任意のデバッガよりコマンドを発行する場合に、共有メモリ中の内容を参照して、その内容によってハードアクセス権を取得するかもしくはハードアクセスを取得できずに回避する調停部を備えたことを特徴とする。
【0011】
この構成によれば、複数プロセッサコアのデバッグを行う場合に、1つのコンピュータシステムでそれぞれのプロセッサコアに対する複数デバッガを起動し、デバッグを高速に行うことができる。また、1つのコンピュータシステムと1つの制御ユニットという最小限のシステムで複数プロセッサコアをデバッグすることが可能である。また、デバッグ装置に新たにデバッガを追加する場合にも、共有メモリへのアクセス処理部を追加するだけで済むため、デバッガの対応工数が軽減される。
【0012】
また、本発明のデバッグ装置は、共有メモリに、任意のデバッガがハードアクセス権を取得した場合に、そのデバッガの名称を格納する送信デバッガ名格納部を備えることが好ましい。
【0013】
この構成によれば、アクセス権が取得できないデバッガから送信デバッガ名格納部を参照することにより、現在ハードアクセス中のデバッガが何であるのかを確認することが可能である。また、デバッグ対象のプロセッサコアに対してコマンドを発行するごとに、シリアル接続された複数プロセッサコアへどのプロセッサコアをバイパスするか否かの情報を送る必要があるが、送信デバッガ名格納部を参照して、前回と同じデバッガがアクセスしようとする場合はバイパス情報を送る必要がなくなるため、より高速にコマンド実行を行うことが可能となる。
【0014】
さらに、本発明のデバッグ装置は、2つのデバッガを起動している場合に、一方のデバッガから他方のデバッガに対してコマンドを発行したい場合に、そのコマンドを格納できるコマンド格納部を備えることが好ましい。
【0015】
この構成によれば、一方のデバッガから他方のデバッガに対してコマンド操作行うことが可能となる。例えば、任意のデバッガから他のデバッガに対して実行や強制ブレークなどの操作を行うことが可能となる。
【0016】
また、本発明のデバッグ装置は、2つ以上のデバッガを起動している場合に、一つのデバッガから、ある特定のデバッガに対するコマンドを発行したい場合に、そのコマンド受信先であるデバッガ名を格納できる受信デバッガ名格納部を備えることが好ましい。
【0017】
この構成によれば、一つのデバッガからある特定のデバッガに対してコマンド操作を行うことが可能となる。例えば、任意のデバッガからある特定のデバッガに対して実行や強制ブレークなどの操作を行うことが可能となる。
【0018】
また、本発明のデバッグ装置は、コマンドを実行した結果を格納するコマンド結果格納部を備えることが好ましい。
この構成によれば、一つのデバッガからある特定のデバッガに対してコマンドを操作した結果を他方のデバッガから参照することが可能となる。例えば、任意のデバッガからある特定のデバッガのメモリ内容を参照したり、変更したりすることも可能になる。
【0019】
また、本発明のデバッグ装置は、コマンドを優先的に実行する優先調停部を備えることが好ましい。
この構成によれば、優先度の高いコマンド要求に対するコマンド実行がリアルタイムで可能であり、効率的なデバッグが可能である。
【0020】
また、本発明のデバッグ装置は、制御ユニットの複数デバッガ共通のレジスタ情報を任意のデバッガが格納する制御ユニット情報格納部を、共有メモリに備えることが好ましい。
【0021】
すなわち従来では、制御ユニットの複数デバッガで使用されるレジスタに関して、任意のデバッガがそのレジスタを参照し、かつすぐにその値をクリアしなければならない場合に、その参照したデバッガのみでしかそのレジスタの情報を知ることができなかった。しかし、この構成によれば、レジスタ内容を参照したデバッガが共有メモリ中の制御ユニット情報格納部にその共通レジスタ情報を格納することで、その他のデバッガからでもそのレジスタ情報を参照することが可能となる。
【0022】
また、上記の目的を達成するために、本発明にかかるデバッグプログラムは、コマンドを読み込んで、前記コマンドがハードアクセスコマンドか否かを判断するステップと、ハードアクセス権を取得できるか否かを判断するために共有メモリの調停部のメモリ内容を参照するステップと、ハードアクセス権が取得可能な場合に調停部のメモリ内容を変更するステップと、コマンドを実行するステップと、コマンド実行が終了した場合に調停部のアクセス権を放棄するために調停部のメモリ内容を参照してその内容を再び変更するステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする。
【0023】
このデバッグプログラムをコンピュータシステムに実行させることにより、本発明にかかるデバッグ装置を実現できる。
本発明では、前記デバッグプログラムが、調停部にアクセスする処理に加えて、調停部を参照するステップにおいて、ハードアクセス権を取得した場合に、送信デバッガ名格納部にハードアクセス権を取得したデバッガ名を設定するステップと、ハードアクセス権を取得できなかった場合に、送信デバッガ名格納部を参照するステップと、ハードアクセス権を放棄する場合に送信デバッガ名格納部をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることが好ましい。
【0024】
さらに本発明では、前記デバッグプログラムが、デバッガの起動数が2つの場合に、調停部にアクセスする処理に加え、一方のデバッガから他方のデバッガに対してコマンド実行を行うため、コマンド格納部にコマンド設定を行うか否か判断するステップと、コマンド設定を行うと判断した場合にコマンド格納部にコマンドを格納するステップと、コマンド格納部のメモリ内容がクリアされるまでループ処理するステップと、コマンド入力を行わない場合に、共有メモリのコマンド格納部にデータが設定されているか否かを一定周期ごとに確認するステップと、コマンド格納部にデータが設定されていると判断された場合に他方のデバッガでコマンドを実行するステップと、コマンドが終了した場合にコマンド格納部の内容をクリアするステップと、コマンド格納部がクリアされたときにループ処理を抜けるステップとを含む処理をコンピュータシステムに実行させるものであることが好ましい。
【0025】
さらに本発明では、前記デバッグプログラムが、デバッガの起動数が2つ以上の場合に、調停部にアクセスする処理とコマンド設定部にアクセスする処理に加え、任意のデバッガからある特定のデバッガにコマンドを発行するため、コマンドを実行する特定のデバッガ名を受信デバッガ名格納部に格納するステップと、共有メモリの受信デバッガ名に設定されているデータが自分自身のデバッガ名であるか否かを一定周期で判断するステップと、受信デバッガで一致すると判断された場合にコマンド格納部のコマンドを実行するステップと、ハードアクセス権を放棄する場合に受信デバッガ格納をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることが好ましい。
【0026】
さらに本発明では、前記デバッグプログラムが、調停部にアクセスする処理とコマンド設定部にアクセスする処理と受信デバッガ名格納部にアクセスする処理とに加え、任意のデバッガからある特定のデバッガにコマンド実行を行い、その結果を格納するため、コマンド格納部のコマンドを実行するステップの次にコマンド結果格納部にコマンド結果を格納するステップと、任意のデバッガよりコマンド結果格納部を参照するステップと、ハードアクセス権を放棄する場合にコマンド格納部をクリアするステップとを含むものであることが好ましい。
【0027】
さらに本発明では、前記デバッグプログラムが、調停部にアクセスする処理に加え、優先的にコマンド実行するために、優先実行可能か否か判断する目的で優先調停部を参照するステップと、優先調停部で実行可能な場合に優先調停部に優先実行を設定するステップと、優先実行を終了する場合に優先調停部の優先実行をクリアするステップとを含むものであることが好ましい。
【0028】
本発明のデバッグプログラム記憶媒体は、上記のデバッグプログラムうちの少なくともいずれか一つを記録したものであることを特徴とする。
また本発明のデバッグ装置は、複数デバッガそれぞれに対し、シリアル接続されたデバッグ対象となる複数プロセッサコアの前後に繋がるプロセッサコアが持つインストラクションレジスタ(IR)とデータレジスタ(DR)を定義するID情報設定部を備えることが好ましい。
【0029】
すなわち従来では各デバッガで一意にシリアル接続された複数プロセッサコアの接続情報を持つことで対応していたが、この構成によれば、ID情報定義部にIRとDRの前後に繋がるプロセッサコアのIRおよびDRを設定するだけで、汎用的にどんな接続を後から追加しても、ID情報設定部を変更するだけで、デバッグ対象のプロセッサコアに対する命令を発行することが可能となる。
【0030】
さらに本発明では、ID情報を格納する制御ユニットのID情報格納部と、複数プロセッサコアに対する送信コードを作成するためのコード自動生成部とを備えることが好ましい。
【0031】
この構成によれば、従来はデバッグ用命令を各デバッガで複数プロセッサ分を生成して制御ユニットを介して送信していたものが、デバッグ対象のプロセッサコアに対するデバッグ命令のみを送信すれば、制御ユニットでID情報から目的のターゲットシステムに繋がるシリアル接続されたプロセッサコアに対する命令コードを自動生成し、そのコードをターゲットシステムへ送信することで、従来と同じように、デバッグ命令を送信可能となる。しかも、このデバッグ装置の構成では、コンピュータシステムと制御ユニットとの通信に関し、ID情報と対象となるプロセッサコア以外の命令コードを毎回送信しなくても済むため、高速にデバッグ応答を実現できる。
【0032】
また本発明のデバッグ装置においては、制御ユニット中にモニタ命令格納部を備えることが好ましい。
すなわち従来では、ホストとなるコンピュータシステムからモニタ用のコードを1命令ずつシリアルポートを通じて入力させる方法であったが、ホストインターフェースの転送速度が原因となり、デバッガ全体の応答速度が遅くなるという問題点があった。また、例えば、デバッガがブレークした場合などに送られるモニタコード命令群は決まって一緒である。そのため本発明では、ブレーク直後に送られる命令群を制御ユニットのモニタ命令格納部に設定することで、ブレーク直後の命令のやりとりは制御ユニットおよびプロセッサ間の転送となるため、ホストインターフェース間の転送量を抑えることが可能となり、高速に命令を実行することができる。
【0033】
また本発明によれば、複数デバッガはただ唯一のコンピュータシステム上で動作することが好ましい。
この構成によれば、最小限のテストシステムでデバッグ環境を構築することが可能となる。すなわち、ノートパソコンなどのような省スペースで軽量なコンピュータシステムと、制御ユニットとさえあれば、ターゲットシステムをデバッグすることが可能となる。
【0034】
【発明の実施の形態】
以下、本発明の実施の形態を図面に基づいて説明する。
本発明の実施の形態にかかるデバッグ装置は、LSIが複数プロセッサコアからなり、それぞれのプロセッサコアがシリアル接続され、LSIから1組のみデバッグ用の出力端子が出力されるターゲットシステムにおいて、それぞれのプロセッサコアを、コンピュータシステム上で動作するとともにデバッグ用のコマンドの入出力機能を備えたデバッガでデバッグするシステムであることを前提とする。また、そのデバッガは、ターゲットシステム上で動作するプログラムをデバッグするために、プログラムの実行、停止(ブレーク)、ステップ実行機能、またデータ、レジスタ、スタックの参照または変更機能などを備えているものとする。
【0035】
図1は、本発明の実施の形態にかかるデバッグ装置の概略構成を示すブロック図である。このデバッグ装置において、コンピュータシステム101上でデバッガ(A)102とデバッガ(B)103が起動し、共有メモリ104が作成される。デバッガ(A)102およびデバッガ(B)103からのコマンドは、制御ユニット105を介してLSI108へ送られる。LSI108では、デバッガ(A)102のデバッグ対象となるプロセッサコア(A)106と、デバッガ(B)103のデバッグ対象となるプロセッサコア(B)107とがシリアルチェーンで接続され、LSI108から一組のデバッグ用端子が出力される。このようにデバッグ用端子は1組だけのため、コンピュータシステム101上で起動している複数のデバッガ102、103のうち、制御ユニット105を介してLSI108へハードアクセスを行うことが可能なのは、ただ1つのデバッガのみとなる。
【0036】
図9は、図2のように共有メモリ104の内部に調停部401が存在する場合に、任意のデバッガが共有メモリ104へアクセスする方法を示したフローチャートである。
【0037】
まず、コマンド入力ステップS101でデバッガ102、103がコマンドを入力する(なお、以下の説明では、簡単のため、「ステップ」を単に「S」と略記するだけにとどめる)。S102では、S101において入力されたコマンドがハードアクセスを伴う命令(ハードアクセス命令)か否かをチェックする。S102の判定結果がYESであれば、次のS103において、図2の共有メモリ104の調停部401にアクセスを行い、この調停部401にある調停フラグの状態を判定する。調停フラグがONであり、他のデバッガがハードアクセス状態であると判断した場合は、S101に戻る。調停フラグがOFFであり、他のどのデバッガもハードアクセス状態でないことが判断できたら、S104で調停フラグの値をONに設定する。これによりハードアクセスコマンドが許可されたので、次のS105ではハードアクセスを開始する。コマンドの実行が終了したら、S106で調停フラグの状態を判定する。調停フラグがONであれば、S107で調停フラグをOFFに設定し、ハードアクセスの終了手続きをする。なお、S102において、S101で入力されたコマンドが、ハードアクセスを伴わない命令である場合すなわちハードアクセス命令でない場合は、そのままS105でその命令を実行し、S106で調停フラグがOFFであれば、そのままハードアクセスの終了手続きをとる。以上の動作を繰り返すことで、複数プロセッサコアのLSIに対するデバッグが可能となる。
【0038】
図10は、図3のように共有メモリ104の内部に調停部501と送信デバッガ名格納部502とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0039】
まず、デバッガがコマンド入力ステップS201でコマンドを入力する。また、S202では、S201により入力されたコマンドがハードアクセス命令か否かをチェックする。S202の判定結果がYESであれば、次のS203において、共有メモリにアクセスを行い、共有メモリ中の調停フラグの状態を判定する。S203において、調停フラグがONであれば、その他のデバッガがハードアクセス命令を実行中であることを示す。よって、S205で共有メモリ中の送信デバッガ名格納部502を参照して、どのデバッガがハードアクセスを行っているかを確認したうえで、ステップS201に戻る。また、S203において調停フラグがOFFであり、他のどのデバッガもハードアクセス状態でないことが判断できたら、S204で調停フラグの値をONに設定する。次のS206では、ハードアクセスを開始したデバッガが自分自身のデバッガ名を図3の送信デバッガ名格納部502に格納する。次のS207では、ハードアクセスコマンドが許可されたので、ハードアクセスを開始する。コマンドの実行が終了したらS208で調停フラグの状態を判定する。調停フラグがONであれば、S209で調停フラグをOFFに設定し、S210で送信デバッガ名をクリアし、ハードアクセスの終了手続きをする。なお、S202において、S201で入力されたコマンドが、ハードアクセスを伴わない命令である場合すなわちハードアクセス命令でない場合は、そのままS207でその命令を実行し、S208で調停フラグがOFFであれば、そのままハードアクセスの終了手続きをとる。
【0040】
このように、送信デバッガ名格納部502にアクセス権を取得したデバッガ名を格納するので、複数のデバッガが起動している状態で、アクセス権が取れないような場合に、どのデバッガがアクセスしているかという情報について、アクセス権を取得できないデバッガ側から参照することができる。
【0041】
図11は、図4のように共有メモリ104の内部に調停部601とコマンド格納部602とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0042】
ここでは、デバッガが2つのみ起動してデバッグを行う場合を前提とする。まず、コマンド入力ステップS301で、デバッガがコマンドの入力開始状態か否かを確認する。コマンド入力が開始された場合には、S302でS301により入力されたコマンドがハードアクセス命令か否かをチェックする。S302の判定結果がYESであれば、次のS303において、共有メモリにアクセスを行い、共有メモリ中の調停フラグの状態を判定する。調停フラグがOFFであり、他方のデバッガもハードアクセス状態でないことが判断できたら、S304で調停フラグの値をONに設定する。S303において調停フラグがONの場合は、S301に戻る。
【0043】
次のS305では、アクセス権を取得しようとしているデバッガが他方のデバッガに対してコマンドを発行するか否かを判断する。もしコマンドを発行する場合には、S306で、そのコマンドを図4のコマンド格納部602に格納する。次のS307は、コマンド格納部602に設定したコマンドがクリアされたか否か判断するステップで、クリアされるまでチェックされる。他方のデバッガでコマンドが実行されるとコマンド格納部602がクリアされるため、次のステップであるS308に進む。このS308では、上記のコマンドの実行によってハードアクセスが終了したため、調停フラグがONであるか否かを判断し、ONである場合にはS309で調停フラグをOFFに設定し、ハードアクセスの終了手続きをとる。S308において調停フラグがOFFである場合には、ただちにハードアクセスの終了手続きをとる。
【0044】
S301のステップでコマンド入力が開始されない場合に、共有メモリ104の内部のコマンド格納部602にデータが格納されているか否かをある一定周期で判断するステップS310において、コマンド格納されていると判断された場合は、S311のステップでコマンド発行を行い、コマンドを実行する。コマンド格納されていないと判断された場合は、S301に戻る。次のS312のステップでは、コマンド格納部602にデータがあるか否か判断し、データが残っている場合には、次のS313のステップで、コマンド設定部602をクリアして、S307へ進み、ハードアクセスの終了手続きをする。S312において、データが残っていない場合には、ただちにS307に進む。
【0045】
S302において、入力されたコマンドがハードアクセス命令でない場合や、S305において、アクセス権を取得しようとしているデバッガが他方のデバッガに対してコマンドを発行しない場合には、S311でコマンド発行を行う。
【0046】
このようにコマンド格納部602にコマンドを設定することで、2つのデバッガが起動している場合に限り、一方のデバッガから他方のデバッガへコマンドを送信可能となり、例えば、自分自身のデバッガより相手側のデバッガに対して、強制的に実行操作を行なったり終了動作を行なったりすることができる。
【0047】
図12は、図5のように共有メモリ104に調停部701とコマンド格納部702と受信デバッガ名格納部703とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0048】
ここでは、デバッガが2つ以上起動してデバッグを行う場合を前提とする。まず、コマンド入力ステップS401で、デバッガがコマンドの入力開始状態か否かを確認する。コマンド入力が開始された場合には、S402でS401により入力されたコマンドがハードアクセス命令か否かをチェックする。S402の判定結果がYESであれば、次のS403において、共有メモリ104にアクセスを行い、共有メモリ中の調停フラグの状態を判定する。調停フラグがOFFであり、他のどのデバッガもハードアクセス状態でないことが判断できたら、S404で調停フラグの値をONに設定する。S403において調停フラグがONの場合は、S401に戻る。
【0049】
次のS405では、アクセス権を取得しようとしているデバッガが他のデバッガに対してコマンドを発行するか否かを判断する。もしコマンドを発行する場合には、S406で、そのコマンドを受信するデバッガ名を図5の受信デバッガ名格納部703に格納する。次にS407では、実行させたいコマンド名をコマンド格納部702に設定する。次のS408は、コマンド格納部702に設定したコマンドがクリアされたか否か判断するステップで、クリアされるまでチェックされる。他のデバッガでコマンドが実行されるとコマンド格納部702がクリアされるため、次のステップであるS409に進む。このS409では、ハードアクセスが終了したため、調停フラグがONであるか否かを判断し、ONである場合にはS410で調停フラグをOFFに設定し、ハードアクセスの終了手続きをとる。S409において調停フラグがOFFである場合には、ただちにハードアクセスの終了手続をとる。
【0050】
S401でコマンド入力が開始されない場合に、共有メモリ104の内部の受信デバッガ名格納部703に自分自身のデバッガ名が格納されているか否かをある一定周期で判断するS411のステップで、自分自身のデバッガ名が格納されていると判断された場合は、S412のステップでコマンド発行を行い、コマンドを実行する。次に、コマンド実行が終了すると、S413で受信デバッガ名が設定されている場合は、S414で受信デバッガ格納部703の内容をクリアする。また、S415でコマンド格納部702にコマンドが格納されている場合は、S416でコマンド格納部702の内容をクリアして、S408へ進み、ハードアクセスの終了手続きをする。S411において、自分自身のデバッガ名が格納されていない場合は、S401に戻る。S413において、受信デバッガ名が設定されていない場合は、ただちにS415に進む。またS415において、コマンド格納部702にコマンドが格納されていない場合は、ただちにS408に進む。
【0051】
このようにコマンド格納部702にコマンドを設定することで、あるデバッガから他の特定のデバッガへコマンドを送信可能となり、例えば、自分自身のデバッガよりある特定のデバッガに対して、強制的に実行操作を行ったり、終了動作を行ったりすることができる。
【0052】
図13は、図6のように共有メモリ104に調停部801とコマンド格納部802と受信デバッガ名格納部803とコマンド結果格納部804とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0053】
ここでは、コマンド入力ステップS501で、デバッガがコマンドの入力開始状態か否か確認する。コマンド入力が開始された場合には、S502でS501により入力されたコマンドがハードアクセス命令か否かをチェックする。S502の判定結果がYESであれば、次のS503において、共有メモリ104にアクセスを行い、共有メモリ中の調停フラグの状態を判定する。調停フラグがOFFであり、他のどのデバッガもハードアクセス状態でないことが判断できたら、S504で調停フラグの値をONに設定する。S503において調停フラグがONの場合は、S501に戻る。
【0054】
次のS505では、アクセス権を取得しようとしているデバッガが他方のデバッガに対してコマンドを発行するか否かを判断する。もし、コマンドを発行する場合には、S506で、そのコマンドを受信するデバッガ名を図6の受信デバッガ名格納部803に格納する。次にS507では、実行させたいコマンド名をコマンド格納部802に設定する。次のS508は、コマンド格納部802に設定したコマンドがクリアされたか否か判断するステップで、クリアされるまでチェックされる。他方のデバッガでコマンドが実行されるとコマンド格納部802がクリアされるため、次のステップに進む。
【0055】
すなわち、以上にてハードアクセスが終了したため、次のS509では、図6のコマンド結果格納部804を参照して、コマンドを受信したデバッガのコマンド結果のデータがあるか否かを判断し、そのデータがある場合には、S510でコマンド結果を参照する。参照したあとに、S511で、コマンド結果格納部804のデータをクリアする。次のS512では調停フラグがONであるか否かを判断し、ONである場合にはS513で調停フラグをOFFに設定し、ハードアクセスの終了手続きをする。S509においてコマンド結果のデータがない場合には、S512を実行する。S512において調停フラグがOFFである場合には、ただちにハードアクセスの終了手続をとる。
【0056】
S501でコマンド入力が開始されない場合に、共有メモリ104の内部の受信デバッガ名格納部803に自分自身のデバッガ名が格納されているか否かをある一定周期で判断するS514のステップで、自分自身のデバッガ名が格納されていると判断された場合は、次のS515のステップでコマンド発行を行い、コマンドを実行する。次に、コマンド実行が終了すると、S516で実行結果を図6のコマンド結果格納部804に格納するか否かの判断を行い、格納すると判断された場合にはS517でコマンド結果を格納する。
【0057】
次に、S518で受信デバッガ名が設定されている場合は、S519で受信デバッガ格納部803の内容をクリアする。また、S520でコマンド格納部802にコマンドが格納されている場合は、S521でコマンド格納部802の内容をクリアして、S508へ進み、ハードアクセスの終了手続きをする。S514において、自分自身のデバッガ名が格納されていない場合は、S501に戻る。S516において、実行結果を図6のコマンド結果格納部804に格納しない場合は、ただちにS518に進む。またS518において、受信デバッガ名格納部803に受信デバッガ名が設定されていない場合は、ただちにS520に進む。さらにS520において、コマンド格納部802にコマンドが格納されていない場合は、ただちにS508に進む。
【0058】
このようにコマンド格納部802にコマンドを設定することで、一つのデバッガから他の特定のデバッガへコマンドを送信可能となり、さらにコマンドの実行結果も、送信したデバッガ側から参照することができる。例えば、自分自身のデバッガより、ある特定のデバッガに対して、あるメモリの内容を参照、変更したりすることができる。また、ステップ実行させたあとの内容などを参照することも可能である。
【0059】
図14は、図7のように共有メモリ104に調停部901と優先調停部902とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0060】
ここでは、デバッガがコマンド入力ステップS601においてコマンドを入力する。次のS602で共有メモリ104にアクセスを行い、共有メモリ104の中の優先フラグの状態を判定する。優先フラグがOFFであり、他のどのデバッガも優先実行していないことが判断できたら、S603で共有メモリにアクセスを行い、共有メモリ中の調停フラグの状態を判定する。調停フラグがOFFであって、他のどのデバッガもハードアクセス状態でないことが判断できたなら、S604で調停フラグの値をONに設定する。S602において優先フラグがONである場合と、S603において調停フラグがONである場合とには、S601に戻る。
【0061】
次のS605ではコマンド入力を優先的に実行するか否かを判断し、優先実行する場合は、S606で図7の優先調停部902において優先フラグをON設定し、S607でコマンド実行を行う。S605においてコマンド入力を優先的に実行しない場合は、ただちにS607でコマンド実行を行う。コマンドの実行が終了したら、S608でもう一度優先的にコマンドを実行するか否かの判断を行い、優先実行する場合はS609でコマンド入力の実行を繰り返し、S607でこれを一つ実行するごとにS608で優先実行するか否かを判断する。
【0062】
優先実行を終了すると、S610で優先フラグの設定がONであるか否かを判断し、ONである場合には、S611で優先フラグをOFFとする。また、S612で調停フラグがONであるか否かを判断し、ONである場合には、S613で調停フラグをOFFとしてハードアクセスの終了手続きをとる。なお、S610で優先フラグの設定がOFFである場合には、ただちにS612に進み、またS612で調停フラグがOFFである場合には、ただちにハードアクセスの終了手続きをとる。このように優先調停部902に設定を行うことで、コマンド実行を優先的に行うことが可能である。
【0063】
図15は、図8のように共有メモリ104の内部に調停部1001と制御ユニット情報格納部1002とが存在する場合に、任意のデバッガが共有メモリへアクセスする方法を示したフローチャートである。
【0064】
ここでは、デバッガがコマンド入力ステップS701においてコマンドを入力する。次に、S702で、共有メモリ104の中の制御ユニット情報格納部1002にデータが格納されているか否かを判定する。格納されている場合には、S703で制御ユニット情報を参照したうえで、処理を終了する。
【0065】
S702で、制御ユニット情報格納部1002にデータが格納されていなければ、S704でS701で入力されたコマンドがハードアクセス命令か否かをチェックする。S704の判定結果がYESであれば、次のS705において、共有メモリ104にアクセスを行い、共有メモリ104中の調停部1001における調停フラグの状態を判定する。調停フラグがOFFであり、他のどのデバッガもハードアクセス状態でないことが判断できたら、S706で調停フラグの値をONに設定する。これによりハードアクセスコマンドが許可されたので、次のS707では、ハードアクセスを開始する。なお、S704において、S701で入力されたコマンドがハードアクセス命令でなかった場合はただちにS707に進み、またS705において調停フラグがONであった場合はS701に戻る。
【0066】
S707のコマンドの発行の終了が確認されたら、S708で、制御ユニットの複数デバッガに共通のレジスタ情報が格納されているか否かを判断する。S708で格納されていると判断された場合は、S709で、その共通レジスタ情報を図8の制御ユニット情報格納部1002に格納する。次のS710では調停フラグがONであるか否かを判断し、ONである場合にはS711で調停フラグをOFFに設定し、ハードアクセスの終了手続きをとる。なお、S708でレジスタ情報が格納されていない場合には、ただちにS710に進み、またS710で調停フラグがOFFである場合には、ただちにハードアクセスの終了手続きをとる。
【0067】
このように、制御ユニット中にある共通レジスタ情報を任意のデバッガが参照したあと、クリアしなければならない場合でも、共有メモリの制御ユニット情報格納部にそのレジスタ情報を格納することで、その他のデバッガでもその情報を参照することが可能となる。
【0068】
次に、図16を用いて、複数のデバッガのそれぞれに対し、シリアル接続された複数プロセッサコアのうちの、デバッグ対象となるプロセッサコアの前後に繋がるプロセッサコアが持つIR(インストラクションレジスタ)とDR(データレジスタ)とを定義して利用する場合について説明する。
【0069】
デバッグ用のインターフェースとして複数プロセッサコアをシリアル接続するが、通常では、JTAGインターフェースと呼ばれるインターフェースによってデバッグ機能を実現している。ここでは、そのJTAGを用いた場合について説明する。デバッグ対象のコアの前後には、他のプロセッサコアがシリアルでスキャンチェイン接続されている。よって、特定のコアに対してアクセスするためには、その前後のプロセッサコアをバイバスしてアクセスする必要がある。
【0070】
従来においては、任意のデバッガは、そのデバッグ対象となるプロセッサコアの前後のプロセッサコアの接続情報を、内部で直接保持していた。よって、接続の順番を変更する場合や、新たにプロセッサコアを追加する場合には、そのために前記デバッガを修正し直す必要があった。
【0071】
これに対し、図16では、デバッガ2001にID情報設定部2004を設定する。そのID情報設定部2004にはデバッグ対象コアの前後に繋がるIRとDRのレジスタビット数を設定する。つまり、ここでは、LSI2013のプロセッサA2014、プロセッサB2015、プロセッサC2016がJTAGインターフェースによってシリアル接続されているとする。プロセッサA2014はIRビット長が6であるとともにDRビット長が1であり、プロセッサB2015はIRビット長が4であるとともにDRビット長が6であり、プロセッサC2016はIRビット長が3であるとともにDRビット長が1である。そして、デバッガ2001でプロセッサB2015をデバッグすると仮定すると、ID情報設定部2004にはプロセッサB2015の前後に繋がるIRとDRを設定する。つまり、JTAGの入力側となるTDIのIR−IN2005にはプロセッサA2014のIRビット長となる6を設定する。また、DRはバイパスするため、DR−IN2007にはプロセッサA2014のDRビット長となる1を設定する。次に、プロセッサB2015の出力側となるTDOのIR−OUT2006にはプロセッサC2016のIRビット長となる3を設定する。DRはバイパスするため、DR−OUT2008にはプロセッサC2016のDRビット長となる1を設定する。
【0072】
デバッガ2001では、ID情報設定部2004におけるこれらの内容をID情報格納部2003へ格納し、さらにこれをID情報送信部2002から制御ユニット2009へ送信する。そして前記ID情報を制御ユニット2009のID情報受信部2012で受信し、受信したID情報をID情報格納部2011へ格納する。LSI2013へはバイパスするプロセッサコアを含めシリアル送信するため、コード自動生成部2010において、ID情報受信部2012で受信したバイパスするためのIRとDR情報をもとに、LSI2013へ送信するためのコードを生成する。そして、このように生成したコードをLSI2013へ送信することで、デバッグ対象のプロセッサB2015に対する命令コードを送信し、その結果を得ることができる。
【0073】
したがって、デバッガ2001のID情報設定部2004にデバッグ対象プロセッサB2015の前後に繋がるIRとDRのレジスタビットを設定するだけで、汎用的にどんな接続を後から追加しても、ID情報設定部2004を変更するだけで、デバッグ対象のプロセッサB2015に対する命令を発行することが可能となる。
【0074】
また、制御ユニット2009へ一度だけID情報を設定し、この制御ユニット2009における命令コードの自動生成部2010により命令コードを生成することで、コンピュータシステムと制御ユニット2009との間のデータ送信はデバッグ対象プロセッサに対するIRとDRデータを送信するだけで済み、このため送信データ量を削減することが可能となる。よって、さらに高速に実行することができる。
【0075】
図17を参照して、デバッガから送信されるモニタ命令を一括して送るデバッグ装置について説明する。デバッグ情報を得るためにはデバッガから制御ユニットを介してLSIへ命令を送信するが、その命令に関して、例えば、ブレーク直後にLSIへ送られるものは、毎回決まって同じ命令列である。その命令列をデバッガ3001の一括命令データに設定する。次に、起動時などにモニタ命令送信部3002でモニタ命令格納部3003のモニタ命令を制御ユニット3004へ1度だけ送信する。前記モニタ命令は制御ユニット3004のモニタ命令受信部3005で受信され、モニタ命令格納部3007に格納される。次に、デバッグ対象のプロセッサコアがブレークしたときには、モニタ命令格納部3007のデータがモニタ命令送信部3006からLSI3008へ送信される。LSI3008は、プロセッサA3009、プロセッサB3010、プロセッサC3011を有する。
【0076】
すなわち、従来ではホストとなるコンピュータシステムからモニタ用のコードを1命令ずつシリアルポートを通じて入力する必要があったが、このデバッグ装置によると、ブレーク直後の命令のやりとりは制御ユニットおよびプロセッサ間の転送となるため、ホストインターフェース間の転送量を抑えることが可能となり、高速に命令を実行することができる。
【0077】
以下では、図9から図15に示したフローチャートをもとに、代表的なコマンド操作の詳細な処理例について説明する。図18に示す1)から4)の要求に対して前記フローチャートで解析例を示しながら説明する。ターゲットシステムにA、B、Cのプロセッサコアが存在するとし、1つのコンピュータシステム上に、プロセッサコアに対応したA、B、Cの各デバッガが起動しているとする。そのときに、まず、1)デバッガCがRUN状態であり、デバッガAからデバッガCに対して強制ブレークを発行する場合について説明する。
【0078】
まず、デバッガAは図12のS401で強制ブレークのコマンドを入力する。それに対し、S402で強制ブレークコマンドがハードアクセスコマンドか否かを判断し、ハードアクセスコマンドであるので、次のS403のステップで調停部の調停フラグの内容を判断する。ここでは、調停フラグがOFFであったとすると、S404で調停権を取得するため、調停フラグをONに設定する。その次に、S405では他のデバッガに対するコマンドか否かを判断し、ここではデバッガCに対するコマンドであるため、S406で受信デバッガとして「C」を図5の受信デバッガ名格納部703に入力する。また、S407でコマンド格納部702に「強制ブレークコマンド」を格納する。次に、S408では、コマンド格納部702の内容がクリアされない限り、ループ処理で待ち続ける。そのとき、デバッガCではS401でコマンド入力を行っていないため、S411で一定時間の周期で受信デバッガ名格納部703のデータを確認し、デバッガAから書き込まれた「C」を判断し、自分へのコマンドであると認識する。デバッガCはS412で強制ブレークコマンドを発行し、デバッガCは強制ブレークする。次に、S413で受信デバッガ名が「C」と格納されているので、S414で受信デバッガ名格納部703をクリアする。次に、S415でコマンド格納部702には「強制ブレークコマンド」が格納されているため、S416でコマンド格納部702をクリアする。その後は、デバッガAがループ処理でコマンド格納部702がクリアされるのを待っていたため、S416でクリアされたのを確認し、S409へ進む。S409では、調停フラグがONか否かを確認し、ONとなっているため、調停フラグをOFFに設定し、1)の要求を終了する。以上の処理により1)の要求を実現することが可能となる。
【0079】
次に、2)デバッガAからハードアクセスコマンドを発行するがアクセス権が取れない場合について説明する。
まず、図9のフローチャートにおいて、デバッガAよりS101でハードアクセスコマンドを入力する。S102で、そのコマンドがハードアクセスコマンドと判定され、次にS103で調停フラグがONであるか否かを判断するが、ここで、調停フラグがONであると、すでにデバッガA以外のデバッガBまたはデバッガCからハードアクセスコマンドが発行されているのが分かる。この場合、S101へ戻り、再度、コマンド入力を行う。このフローチャートでは、アクセス権が取得できなかった場合はコマンド入力に戻るようなフローチャートにしているが、アクセス権を取得するために一定時間だけ調停部をアクセスして、アクセス権を取得できるまでループ処理で待つなどの処理も考えられる。
【0080】
また、2)でデバッガAがアクセス権を取得できなかったときに、デバッガBまたはデバッガCがアクセス権を持っていることは確認可能であるが、どちらがアクセス権を持っているかまでは知ることができない。そこで、デバッガBまたはデバッガCがアクセス権を取得する際には、図10のフローチャートで、アクセス権を取得したデバッガ名を図3の送信デバッガ名設定部502に格納する。このとき、まずS201からコマンド入力を行い、S202でハードアクセスコマンドと判定され、S203で調停フラグがOFFとなっているため、S204で調停権を取得し調停フラグをONに設定する。次に、S206にて、送信デバッガ名を送信デバッガ名格納部502に設定し、S207でコマンド発行を行う。次にS208で、調停フラグがONであるか否かを確認して、ONであるため、S209で調停フラグをOFFとし、S210で送信デバッガ名をクリアする。
【0081】
このようにS209で調停フラグをOFFとし、S210で送信デバッガ名をクリアするまでに、デバッガAがハードアクセスコマンドを発行するため、S203で調停フラグがONと判定され、S205において、S206で送信デバッガ名を設定したそのデバッガ名を参照することで、現在アクセス権を持っているデバッガがデバッガBであるかデバッガCであるかを判断することができる。以上の処理により2)の要求を実現することが可能となる。
【0082】
次に、3)デバッガAでステップ実行、メモリダンプを優先的に繰り返す場合について説明する。
図14のフローチャートにおいて、S601でデバッガAからステップ実行コマンドを入力する。次のS602では図7の優先調停部902の優先フラグがONであるか否かを判断し、優先フラグがOFFであるため、次のS603のステップで調停フラグがONであるか否かを判断する。ここで、調停フラグがOFFであり、他のデバッガからアクセスしていないと判断すると、S604で調停フラグをONに設定する。次に、デバッガAで優先的にコマンド実行を行いたいため、S605で優先コマンドであるとし、S606で優先調停部の優先フラグをONに設定する。S607では入力したステップ実行コマンドが実行され、S608で優先実行を繰り返すか否かを判断させる。ここでは、デバッガAはステップ実行とメモリダンプを繰り返すため、S609で再度コマンド入力を行う、この場合にはメモリダンプコマンドを入力する。このメモリダンプコマンドはS607で実行され、S608で優先実行を繰り返すか否か再度判定される。これを繰り返した後、S607で優先実行を終了する場合には、S610で優先フラグの状態をONと確認して、S611で優先フラグをOFFに設定する。またS612で調停フラグの状態をONと確認して、調停フラグをOFFに設定し、ハードアクセスを終了する。以上の処理により3)の要求を実現することが可能となる。
【0083】
次に、4)デバッガAからデバッガBのメモリ内容を参照する場合について説明する。
図13のフローチャートにおいて、まずS501でデバッガAがコマンド入力を開始する。S502でそのコマンドがハードアクセスコマンドか否かを確認し、S503で調停フラグがONか否かを判断して、OFFである場合にはS504で調停フラグをONに設定する。S505では他のデバッガに対するコマンド発行を選択し、S506でコマンド発行したいデバッガ名を図6の受信デバッガ名格納部803に設定し、S507でコマンド格納部802に設定する。この場合はデバッガBに対してメモリ内容を参照するコマンドを発行するため、受信デバッガ名格納部803には「B」と書き込み、コマンド格納部802にはダンプコマンドを書き込む。次に、S508ではコマンド格納部802のデータがクリアされるまで、ループ処理を行う。また、そのときデバッガBでは、S501でコマンド入力を行っていないため、S514で受信デバッガ名格納部803をチェックすることを一定時間で繰り返し、自分自身のデバッガ名か否かを確認する。S506でデバッガAが「B」と書き込んだ後、デバッガBはS514でそれを確認し、S515でダンプコマンドを実行する。実行が終了した時点で、S516でコマンド結果をコマンド結果格納部804に書き込むか否かを判断し、S517でダンプコマンドの結果を書き込む。S518で受信デバッガの設定があるため、S519でデータをクリアする。またS520でコマンド格納部のデータがあるため、S521でコマンド格納部をクリアする。そのとき、デバッガAではS508でループ処理を行っていたため、S521でコマンド格納部802をクリアしたことで、S509に進む。S509ではデバッガBで実行されたダンプコマンドの結果についてコマンド結果格納部804を参照することで、デバッガAからデバッガBのコマンド実行結果を参照することが可能となる。次に、S512で調停フラグのONを確認し、S513で調停フラグをOFFに設定する。S510ではコマンド結果格納部804のデータを確認し、S511でコマンド結果格納部804のデータをクリアし、コマンド実行の処理を終了する。以上の処理により4)の要求を実現することが可能となる。
【0084】
【発明の効果】
以上説明したように本発明によれば、最小限のテストシステムと端子数でデバッグ装置を構成可能である。よって1つのコンピュータシステムと1つの制御ユニットがあれば、複数プロセッサコアを含むターゲットシステムをデバッグすることが可能となるため、ターゲットシステムのフィールドテストなど、場所に拘らないデバッグが可能となる。かつ、従来のようなサーバアプリケーションを用いずとも、高速に複数プロセッサコアのデバッグが可能となる。また、複数デバッガで連携したデバッグが可能であり、複数プロセッサ間のシステム検証とソフトウェアデバッグを効率的に行うことが可能となる。
【図面の簡単な説明】
【図1】本発明の実施の形態の、共有メモリを含むデバッグ装置の構成図
【図2】本発明の実施の形態の、調停部を含む共有メモリの構成図
【図3】本発明の実施の形態の、送信デバッガ名格納部を含む共有メモリの構成図
【図4】本発明の実施の形態の、コマンド格納部を含む共有メモリの構成図
【図5】本発明の実施の形態の、受信デバッガ名格納部を含む共有メモリの構成図
【図6】本発明の実施の形態の、コマンド結果格納部を含む共有メモリの構成図
【図7】本発明の実施の形態の、優先調停部を含む共有メモリの構成図
【図8】本発明の実施の形態の、制御ユニット情報格納部を含む共有メモリの構成図
【図9】本発明の実施の形態の調停方法を示すフローチャート
【図10】本発明の実施の形態の送信デバッガ名格納部の使用方法を示すフローチャート
【図11】本発明の実施の形態のコマンド格納部の使用方法を示すフローチャート
【図12】本発明の実施の形態の受信デバッガ名格納部の使用方法を示すフローチャート
【図13】本発明の実施の形態のコマンド結果格納部の使用方法を示すフローチャート
【図14】本発明の実施の形態の優先調停部の使用方法を示すフローチャート
【図15】本発明の実施の形態の制御ユニット情報格納部の使用方法を示すフローチャート
【図16】本発明の実施の形態のID情報設定部と制御ユニットのコード自動生成部とを含むデバッグ装置の構成図
【図17】本発明の実施の形態のモニタ命令送受信部を含むデバッグ装置の構成図
【図18】本発明の実施の形態のデバッグ装置の実行例を示すためのコマンドの一例の図
【図19】従来のデバッグ装置の構成図
【図20】従来の他のデバッグ装置の構成図
【符号の説明】
101  コンピュータシステム
102  デバッガ(A)
103  デバッガ(B)
104  共有メモリ
105  制御ユニット
106  プロセッサコア(A)
107  プロセッサコア(B)
108  LSI
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a debugging device that supports hardware evaluation and software debugging of a target system using a microprocessor, and more particularly, to a debugging device in a system in which the target system includes a plurality of processor cores.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in developing a target system of a microprocessor, a debugging device has been used for evaluating the system and software. Further, in recent years, as the use of system LSIs has progressed, the number of processor cores having an on-chip debug circuit has increased, and a debug device using the debug circuit has become common. Among them, when debugging a system LSI composed of a plurality of processor cores, system verification between processor cores and software debugging are important issues.
[0003]
Until now, multiple processor cores have been controlled by serial ports such as JTAG, and the test system is connected to multiple sets of serial port output terminals according to the number of processor cores to be debugged. The debug system was configured with only cores.
[0004]
A test system usually has a command input function and an execution result output function on a computer system having an input / output function, and commands from the computer system control data transmitted to and received from a debug circuit of a microprocessor. It is exchanged via the control unit. FIG. 19 shows an example of the configuration. The LSI 209 is composed of two processor cores, CORE (A) 207 and CORE (B) 208, each of which has a terminal output by a serial port, and has a control unit (A) 205 and a control unit (B), respectively. 206. The control unit is connected to a debugger (A) 203 and a debugger (B) 204 on the computer systems PC (A) 201 and PC (B) 202, respectively.
[0005]
As another system, a plurality of processor cores are connected by a set of serial ports, and output terminals of the plurality of processor cores are connected to a server application on a computer system and a plurality of debugger applications for a debug target core via a control unit. Starts up and there is something that constitutes a debugging device. FIG. 20 shows an example of the configuration. An LSI 309 is composed of a CORE (A) 307 and a CORE (B) 308, each of which is connected by a serial chain such as a JTAG system. The LSI 309 has a terminal output of one set of serial ports, and is connected to a control unit 306. You. The control unit 306 is connected to a master computer system PC (A) 301, and the server application 305 transmits and receives data to and from the control unit 306 on the computer system PC (A) 301. The server application 305 can be accessed from a debugger (A) 303 started on the computer system PC (A) 301 or a debugger (B) 304 on a remote computer system PC (B) 302 connected to a network.
[0006]
[Problems to be solved by the invention]
However, in order to debug the plurality of processor cores 207 and 208, the debugging device in the conventional example of FIG. 19 has a plurality of sets of computer systems 201 and 202 and control units 205 and 206 corresponding to the processor cores 207 and 208. Is required. Although the problem may be small when the number of processor cores is small, it is difficult to construct an environment for debugging an LSI including a large number of processor cores. Furthermore, with the miniaturization of LSIs, the chip area limitation due to the number of terminals has become a major issue, and since it is necessary to output debugging terminals for the processor cores to be debugged individually from the LSI 309, the chip area is large. This leads to a problem that the cost of the chip is further increased.
[0007]
The debug device in the conventional example of FIG. 20 does not require a plurality of sets of debug systems or output terminals from an LSI as in the conventional example of FIG. 19, but the debuggers 303 and 304 and the processor core 307, Since the exchange of data with the server 308 is performed via the server application 305, there is a problem that the response speed of the debugger becomes slow. Further, when debugging is performed on a plurality of processor cores, there is another problem that a plurality of computer systems corresponding to the debug are required.
[0008]
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned conventional problems, and an object of the present invention is to realize a multi-processor core debug environment which can be configured with a minimum test system and the number of terminals and can be executed at high speed. .
[0009]
[Means for Solving the Problems]
In order to achieve the above object, according to the present invention, a system for debugging a plurality of processor cores of an LSI using a debugger having a command input / output function that operates on a computer system is provided. A shared memory that is accessible, and only when a hard access right is acquired by referring to the shared memory before issuing a command for sending a debug instruction from any debugger to the LSI, and by referring to the contents of the shared memory In the meantime, the hard access is started. During that time, even if another debugger issues a command, it is determined based on the contents of the shared memory, and if the access right cannot be acquired, the hard access is not performed. As a result, debugging of a plurality of processor cores can be performed at high speed without using a server application as in the related art.
[0010]
Therefore, when issuing a command from a plurality of arbitrary debuggers, the debugging device according to the present invention refers to the contents in the shared memory and acquires the hard access right or acquires the hard access based on the contents. An arbitration unit is provided for avoiding the failure.
[0011]
According to this configuration, when debugging a plurality of processor cores, a single computer system can activate a plurality of debuggers for each processor core to perform high-speed debugging. Further, it is possible to debug a plurality of processor cores with a minimum system of one computer system and one control unit. Further, even when a new debugger is added to the debug device, it is only necessary to add an access processing unit to the shared memory, so that the number of steps required for the debugger is reduced.
[0012]
Further, it is preferable that the debugging device of the present invention includes a transmission debugger name storage unit that stores the name of the debugger in the shared memory when an arbitrary debugger acquires the hard access right.
[0013]
According to this configuration, the debugger whose access right cannot be acquired can refer to the transmission debugger name storage unit to confirm what the debugger is currently performing hard access. Also, every time a command is issued to the processor core to be debugged, it is necessary to send information on which processor core should be bypassed to multiple serially connected processor cores. Then, when the same debugger as before tries to access, there is no need to send bypass information, so that it is possible to execute the command at higher speed.
[0014]
Furthermore, the debug device of the present invention preferably includes a command storage unit that can store a command when one debugger wants to issue a command to the other debugger when two debuggers are running. .
[0015]
According to this configuration, it is possible to perform a command operation from one debugger to the other debugger. For example, it is possible to perform operations such as execution and forced break from any debugger to another debugger.
[0016]
Further, when two or more debuggers are activated and one debugger wants to issue a command for a specific debugger, the debugger of the present invention can store the name of the debugger that is the command receiving destination. Preferably, a receiving debugger name storage is provided.
[0017]
According to this configuration, a command operation can be performed from one debugger to a specific debugger. For example, it is possible to perform operations such as execution and forced break from an arbitrary debugger to a specific debugger.
[0018]
Further, the debug device of the present invention preferably includes a command result storage unit for storing a result of executing the command.
According to this configuration, the result of operating a command from one debugger to a specific debugger can be referred to from the other debugger. For example, an arbitrary debugger can refer to or change the memory contents of a specific debugger.
[0019]
Further, it is preferable that the debugging device of the present invention includes a priority arbitration unit that executes the command with priority.
According to this configuration, it is possible to execute a command in response to a command request having a high priority in real time, and it is possible to perform efficient debugging.
[0020]
Further, the debug device of the present invention preferably includes, in the shared memory, a control unit information storage unit in which any debugger stores register information common to a plurality of debuggers of the control unit.
[0021]
That is, conventionally, regarding a register used by a plurality of debuggers of the control unit, if an arbitrary debugger needs to refer to the register and clear its value immediately, only the referred debugger can read the register. I could not get the information. However, according to this configuration, the debugger that refers to the register contents stores the common register information in the control unit information storage unit in the shared memory, so that other debuggers can refer to the register information. Become.
[0022]
In order to achieve the above object, a debug program according to the present invention reads a command and determines whether or not the command is a hard access command, and determines whether or not a hard access right can be acquired. Referencing the memory contents of the arbitration unit of the shared memory to perform the operation, changing the memory contents of the arbitration unit when the hard access right can be acquired, executing the command, and completing the command execution. And a step of referring to the memory content of the arbitration unit and changing the content again in order to relinquish the access right of the arbitration unit.
[0023]
By causing the computer system to execute the debug program, a debug device according to the present invention can be realized.
In the present invention, in the step of referring to the arbitration unit, in addition to the process of accessing the arbitration unit, when the debug program acquires the hard access right, the name of the debugger that acquired the hard access right in the transmission debugger name storage unit Setting, a step of referring to the transmission debugger name storage when the hard access right cannot be acquired, and a step of clearing the transmission debugger name storage when the hard access right is abandoned. Preferably, it is executed by a computer system.
[0024]
Further, in the present invention, when the number of activated debuggers is two, in addition to the process of accessing the arbitration unit when one of the debuggers is activated, a command is executed from one debugger to the other debugger. A step of determining whether or not to perform the setting; a step of storing the command in the command storage unit when it is determined that the command setting is to be performed; a step of looping until the memory content of the command storage unit is cleared; If the data is set in the command storage unit of the shared memory at regular intervals, and the other debugger is determined if the data is set in the command storage unit. To execute the command, and to clear the contents of the command storage when the command ends. And flop, it is preferable command storage unit in which to execute the processing including the steps of passing the loop when it is cleared in the computer system.
[0025]
Further, in the present invention, when the number of activated debuggers is two or more, in addition to the process of accessing the arbitration unit and the process of accessing the command setting unit, when the number of activated debuggers is two or more, the debug program sends a command from an arbitrary debugger to a specific debugger. In order to issue, the step of storing the name of the specific debugger that executes the command in the receiving debugger name storage unit, and whether the data set in the receiving debugger name in the shared memory is its own debugger name or not A step of executing a command in the command storage unit when the receiving debugger determines that the two match, and a step of clearing the receiving debugger storage when abandoning the hard access right to the computer system. It is preferable that the program be executed.
[0026]
Furthermore, in the present invention, in addition to the process of accessing the arbitration unit, the process of accessing the command setting unit, and the process of accessing the received debugger name storage unit, the debug program executes command execution from an arbitrary debugger to a specific debugger. Executing the command in the command storage unit to store the command result in the command result storage unit, storing the command result in the command result storage unit, and referring to the command result storage unit from an arbitrary debugger. Clearing the command storage when relinquishing the right.
[0027]
Further, in the present invention, in addition to the process of accessing the arbitration unit, the debug program refers to the priority arbitration unit for the purpose of determining whether or not priority execution is possible in order to execute the command preferentially; Preferably, the method includes a step of setting priority execution in the priority arbitration unit when the priority arbitration unit can be executed, and a step of clearing priority execution of the priority arbitration unit when ending the priority execution.
[0028]
A debug program storage medium according to the present invention is characterized by recording at least one of the above debug programs.
Further, the debugging device of the present invention sets, for each of a plurality of debuggers, ID information setting for defining an instruction register (IR) and a data register (DR) of a processor core connected before and after a plurality of processor cores to be debugged serially connected. It is preferable to provide a part.
[0029]
That is, in the prior art, each debugger has dealt with the connection information of a plurality of processor cores that are uniquely serially connected. However, according to this configuration, the ID information definition unit stores the IR of the processor core connected before and after the IR and DR. By simply setting the DR and DR, it is possible to issue an instruction to the processor core to be debugged simply by changing the ID information setting section, regardless of what connection is generally added later.
[0030]
Further, according to the present invention, it is preferable to include an ID information storage unit of the control unit that stores the ID information, and an automatic code generation unit for generating transmission codes for a plurality of processor cores.
[0031]
According to this configuration, conventionally, debug instructions are generated for each of a plurality of processors by each debugger and transmitted via the control unit. However, if only debug instructions for the processor core to be debugged are transmitted, the control unit By automatically generating an instruction code for a serially connected processor core connected to a target system from the ID information and transmitting the code to the target system, a debug instruction can be transmitted as in the related art. In addition, with the configuration of the debugging device, it is not necessary to transmit the ID information and the instruction code other than the target processor core every time the communication between the computer system and the control unit is performed, so that a high-speed debugging response can be realized.
[0032]
In the debugging device of the present invention, it is preferable that the control unit includes a monitor instruction storage unit.
That is, in the conventional method, a monitor code is input from a host computer system through a serial port one instruction at a time. However, the response speed of the entire debugger is reduced due to the transfer speed of the host interface. there were. For example, a group of monitor code instructions sent when a debugger breaks is always the same. Therefore, in the present invention, by setting the instruction group sent immediately after the break in the monitor instruction storage unit of the control unit, the exchange of the instruction immediately after the break becomes a transfer between the control unit and the processor. Can be suppressed, and instructions can be executed at high speed.
[0033]
Also, according to the invention, it is preferred that the multiple debuggers operate on only one computer system.
According to this configuration, it is possible to construct a debugging environment with a minimum test system. That is, if there is only a space-saving and lightweight computer system such as a notebook personal computer and a control unit, the target system can be debugged.
[0034]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
A debugging device according to an embodiment of the present invention provides a target system in which an LSI includes a plurality of processor cores, each of which is serially connected, and only one set of debugging output terminals is output from the LSI. It is assumed that the core is a system that operates on a computer system and is debugged by a debugger having a command input / output function for debugging. In addition, the debugger includes a program execution, stop (break), step execution function, data, register, and stack reference or change functions for debugging a program operating on the target system. I do.
[0035]
FIG. 1 is a block diagram illustrating a schematic configuration of a debugging device according to an embodiment of the present invention. In this debugging device, the debugger (A) 102 and the debugger (B) 103 are activated on the computer system 101, and the shared memory 104 is created. Commands from the debugger (A) 102 and the debugger (B) 103 are sent to the LSI 108 via the control unit 105. In the LSI 108, a processor core (A) 106 to be debugged by the debugger (A) 102 and a processor core (B) 107 to be debugged by the debugger (B) 103 are connected by a serial chain. The debugging terminal is output. Since there is only one set of debugging terminals, only one of the plurality of debuggers 102 and 103 running on the computer system 101 can make hard access to the LSI 108 via the control unit 105. Only one debugger.
[0036]
FIG. 9 is a flowchart illustrating a method of accessing an arbitrary shared memory 104 by an arbitrary debugger when the arbitration unit 401 exists inside the shared memory 104 as shown in FIG.
[0037]
First, in the command input step S101, the debuggers 102 and 103 input a command (in the following description, for simplicity, "step" is simply abbreviated to "S"). In S102, it is checked whether or not the command input in S101 is a command accompanied by hard access (hard access command). If the determination result in S102 is YES, in the next S103, the arbitration unit 401 of the shared memory 104 in FIG. 2 is accessed, and the state of the arbitration flag in the arbitration unit 401 is determined. If the arbitration flag is ON and it is determined that another debugger is in the hard access state, the process returns to S101. If it is determined that the arbitration flag is OFF and none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S104. As a result, the hard access command is permitted, and in the next S105, the hard access is started. When the execution of the command is completed, the state of the arbitration flag is determined in S106. If the arbitration flag is ON, the arbitration flag is set OFF in S107, and a hard access termination procedure is performed. In step S102, if the command input in step S101 is a command not accompanied by hard access, that is, if the command is not a hard access command, the command is directly executed in step S105, and if the arbitration flag is OFF in step S106, the command is directly executed. Perform the hard access termination procedure. By repeating the above operation, it is possible to debug an LSI having a plurality of processor cores.
[0038]
FIG. 10 is a flowchart illustrating a method of accessing a shared memory by an arbitrary debugger when the arbitration unit 501 and the transmission debugger name storage unit 502 exist inside the shared memory 104 as shown in FIG.
[0039]
First, the debugger inputs a command in a command input step S201. In S202, it is checked whether the command input in S201 is a hard access command. If the determination result in S202 is YES, in the next S203, the shared memory is accessed, and the state of the arbitration flag in the shared memory is determined. If the arbitration flag is ON in S203, it indicates that another debugger is executing a hard access instruction. Therefore, in step S205, referring to the transmission debugger name storage unit 502 in the shared memory to check which debugger is performing hard access, the process returns to step S201. If it is determined in S203 that the arbitration flag is OFF and none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S204. In the next step S206, the debugger that has started the hard access stores its own debugger name in the transmission debugger name storage unit 502 of FIG. In the next step S207, since the hard access command is permitted, the hard access is started. When the execution of the command is completed, the state of the arbitration flag is determined in S208. If the arbitration flag is ON, the arbitration flag is set OFF in S209, the transmission debugger name is cleared in S210, and a hard access termination procedure is performed. In S202, if the command input in S201 is a command not accompanied by hard access, that is, if the command is not a hard access command, the command is executed as it is in S207, and if the arbitration flag is OFF in S208, the command is Perform the hard access termination procedure.
[0040]
As described above, the name of the debugger for which the access right has been acquired is stored in the transmission debugger name storage unit 502. Therefore, in a case where the access right cannot be obtained while a plurality of debuggers are running, which debugger accesses the Can be referred from the debugger side that cannot acquire the access right.
[0041]
FIG. 11 is a flowchart illustrating a method of accessing a shared memory by an arbitrary debugger when the arbitration unit 601 and the command storage unit 602 exist inside the shared memory 104 as in FIG.
[0042]
Here, it is assumed that only two debuggers are activated to perform debugging. First, in a command input step S301, it is confirmed whether or not the debugger is in a command input start state. When the command input is started, it is checked in S302 whether the command input in S301 is a hard access command. If the determination result in S302 is YES, in the next S303, access to the shared memory is performed, and the state of the arbitration flag in the shared memory is determined. If it is determined that the arbitration flag is OFF and the other debugger is not in the hard access state, the value of the arbitration flag is set to ON in S304. If the arbitration flag is ON in S303, the process returns to S301.
[0043]
In the next step S305, it is determined whether or not the debugger attempting to acquire the access right issues a command to the other debugger. If a command is to be issued, the command is stored in the command storage unit 602 in FIG. The next step S307 is a step of judging whether or not the command set in the command storage section 602 has been cleared. When the command is executed by the other debugger, the command storage unit 602 is cleared, and the process proceeds to the next step, S308. In step S308, the execution of the above command terminates the hard access. Therefore, it is determined whether the arbitration flag is ON. If the arbitration flag is ON, the arbitration flag is set to OFF in step S309, and the hard access termination procedure is performed. Take. If the arbitration flag is OFF in S308, the procedure for terminating the hard access is immediately taken.
[0044]
When the command input is not started in the step of S301, it is determined that the command is stored in the step S310, in which it is determined at a certain period whether or not data is stored in the command storage unit 602 inside the shared memory 104. If it has, the command is issued in step S311 and the command is executed. If it is determined that no command is stored, the process returns to S301. In the next step S312, it is determined whether or not there is data in the command storage unit 602. If data remains, the command setting unit 602 is cleared in the next step S313, and the process proceeds to S307. Perform the hard access termination procedure. If no data remains in S312, the process immediately proceeds to S307.
[0045]
If the input command is not a hard access command in S302, or if the debugger trying to acquire the access right does not issue a command to the other debugger in S305, the command is issued in S311.
[0046]
By setting a command in the command storage unit 602 in this manner, a command can be transmitted from one debugger to the other debugger only when two debuggers are running. Forcibly perform an execution operation or an end operation on the debugger.
[0047]
FIG. 12 is a flowchart showing a method for an arbitrary debugger to access the shared memory when the arbitration unit 701, the command storage unit 702, and the received debugger name storage unit 703 exist in the shared memory 104 as shown in FIG. is there.
[0048]
Here, it is assumed that two or more debuggers are activated to perform debugging. First, in a command input step S401, it is checked whether or not the debugger is in a command input start state. When the command input is started, it is checked in S402 whether the command input in S401 is a hard access command. If the determination result in S402 is YES, in the next S403, the shared memory 104 is accessed, and the state of the arbitration flag in the shared memory is determined. If it is determined that the arbitration flag is OFF and none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S404. If the arbitration flag is ON in S403, the process returns to S401.
[0049]
In the next step S405, it is determined whether or not the debugger trying to acquire the access right issues a command to another debugger. If a command is issued, the name of the debugger that receives the command is stored in the received debugger name storage unit 703 in FIG. 5 in S406. Next, in S407, the command name to be executed is set in the command storage unit 702. The next step S408 is a step of judging whether or not the command set in the command storage section 702 has been cleared, and is checked until the command is cleared. When a command is executed by another debugger, the command storage unit 702 is cleared, and the process proceeds to the next step, S409. In step S409, since the hard access has been completed, it is determined whether the arbitration flag is ON. If the arbitration flag is ON, the arbitration flag is set to OFF in step S410, and a procedure for terminating the hard access is performed. If the arbitration flag is OFF in S409, the procedure for terminating the hard access is immediately taken.
[0050]
When the command input is not started in S401, in step S411, it is determined at a certain period whether or not the debugger name of the own device is stored in the receiving debugger name storage unit 703 inside the shared memory 104. If it is determined that the debugger name is stored, a command is issued in step S412, and the command is executed. Next, when the execution of the command is completed, if the reception debugger name is set in S413, the contents of the reception debugger storage unit 703 are cleared in S414. If a command is stored in the command storage unit 702 in step S415, the contents of the command storage unit 702 are cleared in step S416, and the process advances to step S408 to perform a hard access termination procedure. If the own debugger name is not stored in S411, the process returns to S401. If the receiving debugger name has not been set in S413, the process immediately proceeds to S415. If it is determined in step S415 that no command is stored in the command storage unit 702, the process immediately proceeds to step S408.
[0051]
By setting a command in the command storage unit 702 in this way, a command can be transmitted from a certain debugger to another specific debugger. And an end operation can be performed.
[0052]
FIG. 13 shows that an arbitrary debugger accesses the shared memory when the arbitration unit 801, the command storage unit 802, the received debugger name storage unit 803, and the command result storage unit 804 exist in the shared memory 104 as shown in FIG. 5 is a flowchart illustrating a method.
[0053]
Here, in the command input step S501, it is confirmed whether or not the debugger is in a command input start state. If the command input is started, it is checked in S502 whether the command input in S501 is a hard access command. If the determination result in S502 is YES, in the next S503, the shared memory 104 is accessed, and the state of the arbitration flag in the shared memory is determined. If it is determined that the arbitration flag is OFF and none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S504. If the arbitration flag is ON in S503, the process returns to S501.
[0054]
In the next step S505, it is determined whether the debugger trying to acquire the access right issues a command to the other debugger. If a command is issued, the name of the debugger that receives the command is stored in the received debugger name storage unit 803 in FIG. 6 in S506. Next, in S507, the command name to be executed is set in the command storage unit 802. The next step S508 is a step of determining whether or not the command set in the command storage unit 802 has been cleared. When the command is executed by the other debugger, the command storage unit 802 is cleared, and the process proceeds to the next step.
[0055]
That is, since the hard access has been completed as described above, in the next step S509, it is determined with reference to the command result storage unit 804 of FIG. If there is, the command result is referred to in S510. After the reference, in S511, the data in the command result storage unit 804 is cleared. In the next S512, it is determined whether or not the arbitration flag is ON. If the arbitration flag is ON, the arbitration flag is set to OFF in S513, and a hard access termination procedure is performed. If there is no command result data in S509, S512 is executed. If the arbitration flag is OFF in S512, a hard access termination procedure is immediately taken.
[0056]
If the command input is not started in S501, in step S514, it is determined at a certain period whether or not the debugger name is stored in the reception debugger name storage unit 803 in the shared memory 104. If it is determined that the debugger name is stored, a command is issued in the next step S515, and the command is executed. Next, when the command execution is completed, it is determined in S516 whether or not the execution result is stored in the command result storage unit 804 in FIG. 6, and if it is determined that the execution result is stored, the command result is stored in S517.
[0057]
Next, if the reception debugger name has been set in S518, the contents of the reception debugger storage unit 803 are cleared in S519. If a command is stored in the command storage unit 802 in step S520, the contents of the command storage unit 802 are cleared in step S521, and the process advances to step S508 to perform a hard access termination procedure. If the own debugger name is not stored in S514, the process returns to S501. In S516, if the execution result is not stored in the command result storage unit 804 of FIG. 6, the process immediately proceeds to S518. If the receiving debugger name is not set in the receiving debugger name storage unit 803 in S518, the process immediately proceeds to S520. Further, in step S520, if no command is stored in the command storage unit 802, the process immediately proceeds to step S508.
[0058]
By setting a command in the command storage unit 802 in this manner, a command can be transmitted from one debugger to another specific debugger, and the execution result of the command can be referred to from the transmitted debugger. For example, the contents of a certain memory can be referred to and changed by a certain debugger from the own debugger. It is also possible to refer to the contents after the step execution.
[0059]
FIG. 14 is a flowchart illustrating a method in which an arbitrary debugger accesses the shared memory when the arbitration unit 901 and the priority arbitration unit 902 exist in the shared memory 104 as in FIG.
[0060]
Here, the debugger inputs a command in the command input step S601. In the next step S602, the shared memory 104 is accessed, and the state of the priority flag in the shared memory 104 is determined. If it is determined that the priority flag is OFF and that no other debugger is executing priority, the shared memory is accessed in S603, and the state of the arbitration flag in the shared memory is determined. If the arbitration flag is OFF and it is determined that none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S604. When the priority flag is ON in S602 and when the arbitration flag is ON in S603, the process returns to S601.
[0061]
In the next step S605, it is determined whether or not to execute the command input with priority. If the command is to be executed with priority, the priority flag is set to ON in the priority arbitration unit 902 in FIG. 7 in S606, and the command is executed in S607. If the command input is not preferentially executed in S605, the command is immediately executed in S607. When the execution of the command is completed, it is determined in S608 whether or not the command is to be executed again preferentially. If the command is to be executed preferentially, the execution of the command input is repeated in S609, and in S607, every time this command is executed, S608 is executed. It is determined whether or not to execute preferentially.
[0062]
When the priority execution is completed, it is determined in S610 whether or not the setting of the priority flag is ON. If the setting is ON, the priority flag is turned OFF in S611. In addition, it is determined whether or not the arbitration flag is ON in S612, and if it is ON, the arbitration flag is turned OFF in S613 and a hard access termination procedure is performed. If the setting of the priority flag is OFF in S610, the process immediately proceeds to S612. If the arbitration flag is OFF in S612, a procedure for terminating the hard access is immediately performed. By setting the priority arbitration unit 902 in this way, it is possible to preferentially execute a command.
[0063]
FIG. 15 is a flowchart showing a method of accessing a shared memory by an arbitrary debugger when the arbitration unit 1001 and the control unit information storage unit 1002 exist inside the shared memory 104 as shown in FIG.
[0064]
Here, the debugger inputs a command in the command input step S701. Next, in S702, it is determined whether or not data is stored in the control unit information storage unit 1002 in the shared memory 104. If it is stored, the process ends after referring to the control unit information in S703.
[0065]
If data is not stored in the control unit information storage unit 1002 in S702, it is checked in S704 whether the command input in S701 is a hard access command. If the determination result in S704 is YES, in the next S705, the shared memory 104 is accessed, and the state of the arbitration flag in the arbitration unit 1001 in the shared memory 104 is determined. If it is determined that the arbitration flag is OFF and none of the other debuggers is in the hard access state, the value of the arbitration flag is set to ON in S706. As a result, the hard access command is permitted, and in the next step S707, the hard access is started. In S704, if the command input in S701 is not a hard access command, the process immediately proceeds to S707, and if the arbitration flag is ON in S705, the process returns to S701.
[0066]
When the completion of the command issuance in S707 is confirmed, it is determined in S708 whether register information common to a plurality of debuggers of the control unit is stored. If it is determined in step S708 that the common register information is stored, the common register information is stored in the control unit information storage unit 1002 in FIG. 8 in step S709. In the next step S710, it is determined whether or not the arbitration flag is ON. If the arbitration flag is ON, the arbitration flag is set to OFF in S711, and a hard access termination procedure is performed. If the register information is not stored in S708, the process immediately proceeds to S710, and if the arbitration flag is OFF in S710, a procedure for terminating the hard access is immediately performed.
[0067]
In this way, even if any debugger refers to the common register information in the control unit and needs to clear it, by storing the register information in the control unit information storage section of the shared memory, other debuggers can be used. However, that information can be referred to.
[0068]
Next, referring to FIG. 16, for each of the plurality of debuggers, the IR (instruction register) and DR (instruction register) of the processor cores connected before and after the processor core to be debugged among the plurality of serially connected processor cores will be described. A description will be given of a case where a data register is defined and used.
[0069]
A plurality of processor cores are serially connected as an interface for debugging. Usually, a debugging function is realized by an interface called a JTAG interface. Here, the case where the JTAG is used will be described. Before and after the core to be debugged, another processor core is serially scan-chain connected. Therefore, in order to access a specific core, it is necessary to bypass the processor cores before and after the particular core.
[0070]
Conventionally, an arbitrary debugger directly holds connection information of a processor core before and after a processor core to be debugged. Therefore, when the order of connection is changed or when a new processor core is added, it is necessary to modify the debugger again.
[0071]
On the other hand, in FIG. 16, the ID information setting unit 2004 is set in the debugger 2001. In the ID information setting unit 2004, the number of register bits of IR and DR connected before and after the core to be debugged is set. That is, here, it is assumed that the processor A2014, the processor B2015, and the processor C2016 of the LSI 2013 are serially connected by the JTAG interface. Processor A 2014 has an IR bit length of 6 and a DR bit length of 1, processor B 2015 has an IR bit length of 4 and a DR bit length of 6, and processor C 2016 has an IR bit length of 3 and a DR bit length of 3. The bit length is 1. Then, assuming that the debugger 2001 debugs the processor B 2015, the IR information and the DR connected before and after the processor B 2015 are set in the ID information setting unit 2004. That is, 6 which is the IR bit length of the processor A2014 is set in the IR-IN 2005 of the TDI which is the input side of the JTAG. In addition, since the DR is bypassed, 1 which is the DR bit length of the processor A 2014 is set in the DR-IN 2007. Next, 3 which is the IR bit length of the processor C 2016 is set in the IR-OUT 2006 of the TDO serving as the output side of the processor B 2015. Since DR is bypassed, 1 which is the DR bit length of the processor C 2016 is set in DR-OUT 2008.
[0072]
In the debugger 2001, these contents in the ID information setting unit 2004 are stored in the ID information storage unit 2003, and further transmitted from the ID information transmission unit 2002 to the control unit 2009. Then, the ID information is received by the ID information receiving unit 2012 of the control unit 2009, and the received ID information is stored in the ID information storage unit 2011. In order to perform serial transmission including the processor core to be bypassed to the LSI 2013, the code automatic generation unit 2010 generates a code to be transmitted to the LSI 2013 based on the IR and DR information for bypass received by the ID information reception unit 2012. Generate. Then, by transmitting the code generated in this manner to the LSI 2013, an instruction code for the processor B 2015 to be debugged can be transmitted, and the result can be obtained.
[0073]
Therefore, by simply setting the IR and DR register bits connected before and after the debug target processor B 2015 in the ID information setting unit 2004 of the debugger 2001, the ID information setting unit 2004 can be used regardless of any general connection added later. An instruction for the processor B 2015 to be debugged can be issued only by making a change.
[0074]
Also, by setting the ID information only once in the control unit 2009 and generating the instruction code by the automatic instruction code generation unit 2010 in the control unit 2009, the data transmission between the computer system and the control unit 2009 is a debug target. It is only necessary to transmit IR and DR data to the processor, so that the amount of transmission data can be reduced. Therefore, it can be executed at higher speed.
[0075]
With reference to FIG. 17, a description will be given of a debugging device that sends monitor instructions transmitted from a debugger all at once. To obtain debug information, an instruction is transmitted from the debugger to the LSI via the control unit. Regarding the instruction, for example, the instruction sent to the LSI immediately after the break is always the same instruction sequence. The instruction sequence is set as batch instruction data of the debugger 3001. Next, at the time of activation or the like, the monitor command in the monitor command storage unit 3003 is transmitted to the control unit 3004 only once by the monitor command transmission unit 3002. The monitor command is received by the monitor command receiving unit 3005 of the control unit 3004, and is stored in the monitor command storage unit 3007. Next, when the processor core to be debugged breaks, data in the monitor instruction storage unit 3007 is transmitted from the monitor instruction transmission unit 3006 to the LSI 3008. The LSI 3008 includes a processor A 3009, a processor B 3010, and a processor C 3011.
[0076]
That is, conventionally, it has been necessary to input a monitor code from the host computer system one instruction at a time through the serial port. However, according to this debug device, the exchange of instructions immediately after a break involves the transfer between the control unit and the processor. Therefore, the amount of transfer between host interfaces can be suppressed, and instructions can be executed at high speed.
[0077]
Hereinafter, a detailed processing example of a typical command operation will be described based on the flowcharts shown in FIGS. 9 to 15. The requests 1) to 4) shown in FIG. 18 will be described with reference to the flow chart showing an example of analysis. It is assumed that processor cores A, B, and C exist in the target system, and the debuggers A, B, and C corresponding to the processor cores are activated on one computer system. At that time, first, a case where the debugger C is in the RUN state and the debugger A issues a forced break to the debugger C will be described.
[0078]
First, the debugger A inputs a forced break command in S401 of FIG. On the other hand, in step S402, it is determined whether the forced break command is a hard access command. Since the command is a hard access command, the content of the arbitration flag of the arbitration unit is determined in the next step S403. Here, assuming that the arbitration flag is OFF, the arbitration flag is set ON to acquire the arbitration right in S404. Next, in S405, it is determined whether or not the command is for another debugger. Since the command is for the debugger C, "C" is input to the receiving debugger name storage unit 703 in FIG. 5 as a receiving debugger in S406. In step S407, the “forced break command” is stored in the command storage unit 702. Next, in S408, the process waits in a loop until the contents of the command storage unit 702 are cleared. At this time, since the debugger C has not input a command in S401, it checks the data in the received debugger name storage unit 703 at a fixed time period in S411, determines “C” written from the debugger A, and sends it to itself. The command is recognized. The debugger C issues a forced break command in S412, and the debugger C performs a forced break. Next, since the received debugger name is stored as “C” in S413, the received debugger name storage unit 703 is cleared in S414. Next, since the "forced break command" is stored in the command storage unit 702 in S415, the command storage unit 702 is cleared in S416. Thereafter, since the debugger A has been waiting for the command storage unit 702 to be cleared in the loop processing, it is confirmed that the command storage unit 702 has been cleared in S416, and the process proceeds to S409. In S409, it is checked whether or not the arbitration flag is ON. Since the arbitration flag is ON, the arbitration flag is set to OFF, and the request of 1) is completed. By the above processing, the request of 1) can be realized.
[0079]
Next, 2) a case where the debugger A issues a hard access command but cannot obtain an access right will be described.
First, in the flowchart of FIG. 9, a hard access command is input from the debugger A in S101. In S102, it is determined that the command is a hard access command. Next, in S103, it is determined whether or not the arbitration flag is ON. If the arbitration flag is ON, the debugger B or the debugger B other than the debugger A has already been determined. It can be seen that the debugger C has issued a hard access command. In this case, the process returns to S101, and the command is input again. In this flowchart, if the access right cannot be obtained, the flow returns to the command input. However, the arbitration unit is accessed for a certain period of time to obtain the access right, and a loop process is performed until the access right can be obtained. Processing such as waiting at the terminal can be considered.
[0080]
Further, when the debugger A cannot acquire the access right in 2), it can be confirmed that the debugger B or the debugger C has the access right, but it is possible to know which one has the access right. Can not. Therefore, when the debugger B or the debugger C acquires the access right, the name of the debugger having acquired the access right is stored in the transmission debugger name setting unit 502 in FIG. At this time, first, a command is input from S201, and it is determined that the command is a hard access command in S202. Since the arbitration flag is OFF in S203, the arbitration right is acquired and the arbitration flag is set to ON in S204. Next, in step S206, the transmission debugger name is set in the transmission debugger name storage unit 502, and a command is issued in step S207. Next, in S208, it is confirmed whether or not the arbitration flag is ON. Since the arbitration flag is ON, the arbitration flag is turned OFF in S209, and the transmission debugger name is cleared in S210.
[0081]
As described above, since the debugger A issues a hard access command until the arbitration flag is turned OFF in S209 and the transmission debugger name is cleared in S210, the arbitration flag is determined to be ON in S203, and in S205, the transmission debugger is determined in S206. By referring to the set debugger name, it is possible to determine whether the debugger currently having the access right is the debugger B or the debugger C. The above processing makes it possible to fulfill the requirement 2).
[0082]
Next, 3) a case where the debugger A repeats step execution and memory dump preferentially will be described.
In the flowchart of FIG. 14, a step execution command is input from the debugger A in S601. In the next step S602, it is determined whether or not the priority flag of the priority arbitration unit 902 in FIG. 7 is ON. Since the priority flag is OFF, it is determined in the next step S603 whether the arbitration flag is ON. I do. Here, if it is determined that the arbitration flag is OFF and that no access has been made from another debugger, the arbitration flag is set to ON in S604. Next, since the debugger A prefers to execute the command preferentially, it is determined that the command is a priority command in S605, and the priority flag of the priority arbitration unit is set to ON in S606. In step S607, the input step execution command is executed, and in step S608, it is determined whether to repeat the priority execution. Here, since the debugger A repeats the step execution and the memory dump, the command is input again in S609. In this case, the memory dump command is input. This memory dump command is executed in S607, and in S608, it is determined again whether or not to repeat the priority execution. After repeating this, when ending the priority execution in S607, the state of the priority flag is confirmed to be ON in S610, and the priority flag is set to OFF in S611. In step S612, the state of the arbitration flag is confirmed to be ON, the arbitration flag is set to OFF, and the hard access ends. With the above processing, the request of 3) can be realized.
[0083]
Next, 4) the case where the debugger A refers to the memory contents of the debugger B will be described.
In the flowchart of FIG. 13, first, in step S501, the debugger A starts inputting a command. In step S502, it is determined whether the command is a hard access command. In step S503, it is determined whether the arbitration flag is ON. If the arbitration flag is OFF, the arbitration flag is set to ON in step S504. In step S505, a command issuance to another debugger is selected. In step S506, a debugger name to which a command is to be issued is set in the received debugger name storage unit 803 of FIG. 6, and in step S507, the command storage unit 802 is set. In this case, in order to issue a command for referring to the memory contents to the debugger B, “B” is written in the received debugger name storage unit 803 and a dump command is written in the command storage unit 802. Next, in S508, a loop process is performed until the data in the command storage unit 802 is cleared. Further, at this time, the debugger B does not input a command in S501, so that the process of checking the received debugger name storage unit 803 in S514 is repeated for a fixed time to confirm whether or not the debugger name is its own debugger name. After the debugger A writes "B" in S506, the debugger B confirms it in S514 and executes the dump command in S515. When the execution is completed, it is determined in S516 whether or not the command result is to be written to the command result storage unit 804, and in S517, the result of the dump command is written. Since there is a setting of the reception debugger in S518, the data is cleared in S519. Since there is data in the command storage unit in S520, the command storage unit is cleared in S521. At this time, since the debugger A has performed the loop processing in S508, the command storage unit 802 is cleared in S521, and the process proceeds to S509. In step S509, the command execution result of the debugger B can be referred from the debugger A by referring to the command result storage unit 804 for the result of the dump command executed by the debugger B. Next, it is confirmed in S512 that the arbitration flag is ON, and the arbitration flag is set OFF in S513. In step S510, the data in the command result storage unit 804 is confirmed. In step S511, the data in the command result storage unit 804 is cleared, and the command execution process ends. The above processing makes it possible to fulfill the requirement 4).
[0084]
【The invention's effect】
As described above, according to the present invention, a debugging device can be configured with a minimum test system and a minimum number of terminals. Therefore, if there is one computer system and one control unit, it is possible to debug a target system including a plurality of processor cores, and thus it is possible to perform debugging regardless of a location such as a field test of the target system. Further, debugging of a plurality of processor cores can be performed at high speed without using a server application as in the related art. In addition, debugging can be performed in cooperation with a plurality of debuggers, and system verification and software debugging between a plurality of processors can be efficiently performed.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a debugging device including a shared memory according to an embodiment of the present invention.
FIG. 2 is a configuration diagram of a shared memory including an arbitration unit according to the embodiment of the present invention;
FIG. 3 is a configuration diagram of a shared memory including a transmission debugger name storage unit according to the embodiment of the present invention;
FIG. 4 is a configuration diagram of a shared memory including a command storage unit according to the embodiment of this invention;
FIG. 5 is a configuration diagram of a shared memory including a reception debugger name storage unit according to the embodiment of the present invention;
FIG. 6 is a configuration diagram of a shared memory including a command result storage unit according to the embodiment of this invention;
FIG. 7 is a configuration diagram of a shared memory including a priority arbitration unit according to the embodiment of the present invention;
FIG. 8 is a configuration diagram of a shared memory including a control unit information storage unit according to the embodiment of the present invention.
FIG. 9 is a flowchart illustrating an arbitration method according to an embodiment of the present invention.
FIG. 10 is a flowchart showing a method of using a transmission debugger name storage according to the embodiment of the present invention;
FIG. 11 is a flowchart illustrating a method of using the command storage unit according to the embodiment of this invention.
FIG. 12 is a flowchart illustrating a method of using the reception debugger name storage according to the embodiment of this invention;
FIG. 13 is a flowchart illustrating a method of using the command result storage unit according to the embodiment of this invention.
FIG. 14 is a flowchart showing a method of using the priority arbitration unit according to the embodiment of the present invention;
FIG. 15 is a flowchart showing a method of using the control unit information storage unit according to the embodiment of the present invention.
FIG. 16 is a configuration diagram of a debugging device including an ID information setting unit and an automatic code generation unit of a control unit according to an embodiment of the present invention.
FIG. 17 is a configuration diagram of a debugging device including a monitor instruction transmitting / receiving unit according to an embodiment of the present invention.
FIG. 18 is a diagram illustrating an example of a command for indicating an execution example of the debugging device according to the embodiment of this invention;
FIG. 19 is a configuration diagram of a conventional debugging device.
FIG. 20 is a configuration diagram of another conventional debugging device.
[Explanation of symbols]
101 Computer System
102 Debugger (A)
103 Debugger (B)
104 Shared memory
105 control unit
106 processor core (A)
107 processor core (B)
108 LSI

Claims (20)

LSIが、複数プロセッサコアで構成されるとともに、各プロセッサコアがシリアル接続されて一組の端子のみが出力されるターゲットシステムにて構成され、
前記複数プロセッサコアをコンピュータシステム上でデバッグするときに、前記コンピュータシステムとターゲットシステムとの間で制御ユニットを介して情報のやりとりを行なうように構成され、
デバッグ対象の前記プロセッサコアに対応した、デバッグ用のコマンドの入出力機能を備えたデバッガにて、前記デバッグを行うように構成され、
デバッグ対象の前記プロセッサコアに対応した複数のデバッガからアクセス可能であるとともに、各デバッガに対応プロセッサコアへのハードアクセス権を取得させるための情報を格納した、共有メモリを備えたことを特徴とするデバッグ装置。
An LSI is configured by a target system in which each of the processor cores is serially connected and only one set of terminals is output, and the LSI is configured by a plurality of processor cores;
When debugging the plurality of processor cores on a computer system, it is configured to exchange information between the computer system and a target system via a control unit,
A debugger having an input / output function of a command for debugging, corresponding to the processor core to be debugged, is configured to perform the debugging,
A shared memory that is accessible from a plurality of debuggers corresponding to the processor core to be debugged and stores information for causing each debugger to acquire a hard access right to the corresponding processor core; Debug device.
共有メモリは、複数デバッガのうちの任意のデバッガより、対応するプロセッサコアに対してコマンドを発行する前に、前記共有メモリの内容を参照して、そのメモリ内容によって前記コマンドを発行するか否かを決定する調停部を備えたことを特徴とする請求項1記載のデバッグ装置。The shared memory refers to the content of the shared memory before issuing a command to a corresponding processor core from any of the plurality of debuggers, and determines whether to issue the command based on the memory content. The debugging device according to claim 1, further comprising an arbitration unit that determines the condition. 共有メモリは、調停部に加えて、ハードアクセス権を取得した際にコマンドを送信するデバッガ名を格納するための送信デバッガ名格納部を備えることを特徴とする請求項2記載のデバッグ装置。3. The debugging device according to claim 2, wherein the shared memory includes, in addition to the arbitration unit, a transmission debugger name storage unit for storing a debugger name for transmitting a command when acquiring a hard access right. 共有メモリは、調停部に加えて、デバッガの起動数が2つの場合に、一方のデバッガよりコマンドを発行して他方のデバッガに実行させるためのコマンド格納部を備えることを特徴とする請求項2記載のデバッグ装置。3. The shared memory further includes a command storage unit for issuing a command from one debugger and causing the other debugger to execute the command when the number of activated debuggers is two, in addition to the arbitration unit. Debug device as described. 共有メモリは、調停部に加えて、デバッガの起動数が2つ以上の場合に、一つのデバッガよりコマンドを発行して他のデバッガに実行させるためのコマンド格納部と、前記コマンドを実行させるデバッガ名を格納する受信デバッガ名格納部とを備えることを特徴とする請求項2記載のデバッグ装置。The shared memory includes, in addition to the arbitration unit, a command storage unit for issuing a command from one debugger and causing another debugger to execute the command when the number of activated debuggers is two or more, and a debugger for executing the command. 3. The debugging device according to claim 2, further comprising a receiving debugger name storage unit for storing a name. 共有メモリは、調停部とコマンド格納部と受信デバッガ名格納部とに加えて、コマンドを実行した結果を格納するコマンド結果格納部を備えることを特徴とする請求項5記載のデバッグ装置。6. The debugging device according to claim 5, wherein the shared memory includes a command result storage unit that stores a result of executing the command, in addition to the arbitration unit, the command storage unit, and the reception debugger name storage unit. 共有メモリは、調停部に加えて、コマンドの実行を優先的に行わせるための優先調停部を備えることを特徴とする請求項2記載のデバッグ装置。3. The debugging device according to claim 2, wherein the shared memory includes, in addition to the arbitration unit, a priority arbitration unit for giving priority to execution of the command. 共有メモリは、調停部に加えて、制御ユニットが持つ複数デバッガ共通のレジスタの情報を格納する制御ユニット情報格納部を備えることを特徴とする請求項2記載のデバッグ装置。3. The debugging device according to claim 2, wherein the shared memory includes, in addition to the arbitration unit, a control unit information storage unit that stores information of registers common to a plurality of debuggers of the control unit. 請求項1から8までのいずれか1項記載のデバッグ装置においてデバッグを行わせるためのデバッグプログラムであって、コマンドを読み込んで、前記コマンドがハードアクセスコマンドか否かを判断するステップと、ハードアクセス権が取得できるか否か判断するために共有メモリの調停部にアクセスしてその内容を参照するステップと、前記ハードアクセス権が取得可能な場合に前記調停部の内容を変更するステップと、前記コマンドを実行するステップと、前記コマンド実行が終了した場合に前記アクセス権を放棄するために前記調停部の内容を参照してその内容を再び変更するステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とするデバッグプログラム。9. A debug program for performing debugging in the debug device according to any one of claims 1 to 8, wherein a command is read to determine whether the command is a hard access command. Accessing the arbitration unit of the shared memory to determine whether or not the right can be acquired, and referring to the contents thereof; and changing the contents of the arbitration unit when the hard access right can be acquired, Causing a computer system to execute a process including a step of executing a command and a step of referring to the content of the arbitration unit and changing the content again in order to relinquish the access right when the command execution is completed. A debugging program characterized by the following. 調停部を参照してハードアクセス権を取得した場合に、共有メモリの送信デバッガ名格納部に前記ハードアクセス権を取得したデバッガ名を設定するステップと、前記ハードアクセス権を取得できなかった場合に、前記送信デバッガ名格納部を参照するステップと、前記取得したハードアクセス権を放棄する場合に前記送信デバッガ名格納部をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。Setting the name of the debugger that has acquired the hard access right in the transmission debugger name storage unit of the shared memory when acquiring the hard access right with reference to the arbitration unit; and And causing the computer system to execute a process including a step of referring to the transmission debugger name storage unit and a step of clearing the transmission debugger name storage unit when the acquired hard access right is abandoned. The debug program according to claim 9, wherein デバッガの起動数が2つの場合に、一方のデバッガから他方のデバッガに対してコマンド実行を行うため、共有メモリのコマンド格納部にコマンド設定を行うか否かを判断するステップと、前記コマンド設定を行うと判断した場合に前記コマンド格納部にコマンドを格納するステップと、前記コマンド格納部のメモリ内容がクリアされるまでループ処理を行うステップと、コマンド入力を行わない場合に、前記コマンド格納部にデータが設定されているか否かを一定周期ごとに確認するステップと、前記コマンド格納部にデータが設定されている場合に前記コマンドを他方のデバッガで実行するステップと、前記コマンドが終了した場合に前記コマンド格納部の内容をクリアするステップと、前記コマンド格納部がクリアされたときに前記ループ処理を抜けるステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。When the number of activated debuggers is two, in order to execute a command from one debugger to the other debugger, a step of determining whether or not to set a command in a command storage unit of the shared memory; Storing a command in the command storage unit when it is determined to be performed; performing a loop process until the memory content of the command storage unit is cleared; and A step of confirming whether data is set or not at regular intervals; a step of executing the command with the other debugger when data is set in the command storage unit; and Clearing the contents of the command storage; and Claim 9, wherein the debugging program, characterized in that in which to execute the processing including the steps of passing the flop processing in a computer system. デバッガの起動数が2つ以上の場合に、任意のデバッガからある特定のデバッガにコマンドを発行するため、前記コマンドを実行する前記特定のデバッガの名前を共有メモリの受信デバッガ名格納部に格納するステップと、前記受信デバッガ名格納部に設定されているデータが自分自身のデバッガ名であるか否かを一定周期で判断するステップと、前記受信デバッガ名格納部に設定されているデータが自分自身のデバッガ名であると判断された場合に、共有メモリのコマンド格納部のコマンドを実行するステップと、ハードアクセス権を放棄する場合に前記受信デバッガ名格納部をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。When the number of activated debuggers is two or more, in order to issue a command from a given debugger to a particular debugger, the name of the particular debugger executing the command is stored in the received debugger name storage of the shared memory. Determining at regular intervals whether or not the data set in the receiving debugger name storage is its own debugger name; and Executing the command in the command storage unit of the shared memory when it is determined that the received debugger name is stored, and clearing the reception debugger name storage unit when relinquishing the hard access right. 10. The debugging program according to claim 9, which is executed by a system. 任意のデバッガからある特定のデバッガにコマンド実行を行い、その結果を格納するために、共有メモリのコマンド格納部のコマンドを実行するステップの次に、共有メモリのコマンド結果格納部にコマンド結果を格納するステップと、任意のデバッガより前記コマンド結果格納部を参照するステップと、ハードアクセス権を放棄する場合に前記コマンド格納部をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。Executes a command from a given debugger to a specific debugger and stores the command result in the command result storage section of the shared memory after the step of executing the command in the command storage section of the shared memory to store the result And a step of referring to the command result storage unit from an arbitrary debugger, and a step of clearing the command storage unit when relinquishing the hard access right. The debug program according to claim 9, wherein: 優先的にコマンド実行することが可能か否かを判断するために共有メモリの優先調停部を参照するステップと、優先的にコマンド実行することが可能な場合に前記優先調停部に優先実行を設定するステップと、前記優先実行を終了する場合に前記優先調停部に設定されている優先実行をクリアするステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。Referring to a priority arbitration unit of the shared memory to determine whether it is possible to execute the command with priority; and setting priority execution to the priority arbitration unit when the command can be executed with priority 10. The computer system according to claim 9, further comprising the step of: executing a process of executing the priority execution and a step of clearing the priority execution set in the priority arbitration unit when terminating the priority execution. Debug program. 共有メモリの制御ユニット情報格納部にデータがあるか否か判断するステップと、前記制御ユニット情報格納部に情報がある場合にはそれを参照するステップと、情報がない場合にはハードアクセスコマンドを発行するステップと、前記ハードアクセスコマンドの発行後に制御ユニットの各プロセッサ共通となるレジスタ割り当てに情報が格納されているか否かを判断するステップと、レジスタに情報がある場合に前記制御ユニット情報格納部に前記レジスタ情報を格納するステップとを含む処理をコンピュータシステムに実行させるものであることを特徴とする請求項9記載のデバッグプログラム。Determining whether there is data in the control unit information storage unit of the shared memory; referring to the information in the control unit information storage unit if there is information; and executing the hard access command if there is no information. Issuing the hard access command, determining whether or not information is stored in a register assignment common to each processor of the control unit after issuing the hard access command; and 10. The computer-readable storage medium according to claim 9, further comprising: causing a computer system to execute a process including a step of storing the register information. 請求項9から請求項15までのいずれか1項に記載のデバッグプログラムを記録したことを特徴とするデバッグプログラム記憶媒体。A debug program storage medium on which the debug program according to any one of claims 9 to 15 is recorded. LSIが、複数プロセッサコアで構成されるとともに、各プロセッサコアがシリアル接続されて一組の端子のみが出力されるターゲットシステムにて構成され、
前記複数プロセッサコアをコンピュータシステム上でデバッグするように、デバッグ対象の前記プロセッサに対応した、デバッグ用のコマンドの入出力機能を備えた複数デバッガにて、前記デバッグを行うように構成され、
前記複数デバッガのそれぞれに対し、デバック対象となるシリアル接続された前記複数プロセッサコアの前後に繋がる別のプロセッサコアが持つインストラクションレジスタとデータレジスタのビット数を設定するID情報設定部と、前記ID情報設定部にて設定されたID情報を格納するID情報格納部とを備えることを特徴とするデバッグ装置。
An LSI is configured by a target system in which each of the processor cores is serially connected and only one set of terminals is output, and the LSI is configured by a plurality of processor cores;
In order to debug the plurality of processor cores on a computer system, a plurality of debuggers corresponding to the processor to be debugged and having an input / output function of a command for debugging are configured to perform the debugging,
An ID information setting unit for setting, for each of the plurality of debuggers, the number of bits of an instruction register and a data register of another processor core connected before and after the serially connected plurality of processor cores to be debugged; A debug device comprising: an ID information storage unit that stores ID information set by a setting unit.
コンピュータシステムとターゲットシステムとの間で制御ユニットを介して情報のやりとりを行なうように構成され、前記制御ユニットは、複数デバッガのID情報送信部によってID情報格納部から前記制御ユニットに送信されたID情報を受信するID情報受信部と、この受信されたID情報を格納するID情報格納部と、前記ID情報格納部で格納された前記ID情報をもとに前記複数プロセッサへ送るための命令を自動生成するためのコード自動生成部とを備えることを特徴とする請求項17記載のデバッグ装置。The system is configured to exchange information between a computer system and a target system via a control unit, wherein the control unit transmits an ID transmitted from the ID information storage unit to the control unit by an ID information transmission unit of a plurality of debuggers. An ID information receiving unit for receiving information; an ID information storage unit for storing the received ID information; and an instruction for sending to the plurality of processors based on the ID information stored in the ID information storage unit. 18. The debugging device according to claim 17, further comprising an automatic code generation unit for automatically generating the code. LSIが、複数プロセッサコアで構成されるとともに、各プロセッサコアがシリアル接続されて一組の端子のみが出力されるターゲットシステムにて構成され、
前記複数プロセッサコアをコンピュータシステム上でデバッグするときに、前記コンピュータシステムとターゲットシステムとの間で制御ユニットを介して情報のやりとりを行なうように構成され、
デバッグ対象の前記プロセッサコアに対応した、デバッグ用のコマンドの入出力機能を備えた複数デバッガにて、前記デバッグを行うように構成され、
前記制御ユニットは、複数デバッガより発行されたコマンドを前記プロセッサコアで実行させるように構成されるとともに、デバッガから送信されるモニタ命令を格納するモニタ命令格納部を備えることを特徴とするデバッグ装置。
An LSI is configured by a target system in which each of the processor cores is serially connected and only one set of terminals is output, and the LSI is configured by a plurality of processor cores;
When debugging the plurality of processor cores on a computer system, it is configured to exchange information between the computer system and a target system via a control unit,
A plurality of debuggers having an input / output function of a command for debugging, corresponding to the processor core to be debugged, are configured to perform the debugging,
The debugging device, wherein the control unit is configured to cause the processor core to execute a command issued by a plurality of debuggers, and further includes a monitor instruction storage unit that stores a monitor instruction transmitted from the debugger.
前記複数デバッガは唯一つのコンピュータシステム上で動作するように構成されていることを特徴とする請求項1から8までのいずれか1項または請求項17から19までのいずれか1項記載のデバッグ装置。20. The debugging apparatus according to claim 1, wherein the plurality of debuggers are configured to operate on only one computer system. .
JP2002177829A 2002-06-19 2002-06-19 Debug system, debug program, and debug program storage medium Pending JP2004021751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002177829A JP2004021751A (en) 2002-06-19 2002-06-19 Debug system, debug program, and debug program storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002177829A JP2004021751A (en) 2002-06-19 2002-06-19 Debug system, debug program, and debug program storage medium

Publications (1)

Publication Number Publication Date
JP2004021751A true JP2004021751A (en) 2004-01-22

Family

ID=31175717

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002177829A Pending JP2004021751A (en) 2002-06-19 2002-06-19 Debug system, debug program, and debug program storage medium

Country Status (1)

Country Link
JP (1) JP2004021751A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006164001A (en) * 2004-12-09 2006-06-22 Fujitsu Ltd Ice server
JP2008513853A (en) * 2004-09-14 2008-05-01 コーウェア インコーポレイテッド Debug in multi-core architecture
WO2012077704A1 (en) * 2010-12-07 2012-06-14 日本電気株式会社 Debug stub server, debugging method and program
US9038076B2 (en) 2004-09-14 2015-05-19 Synopsys, Inc. Debug in a multicore architecture
CN113672554A (en) * 2021-07-06 2021-11-19 平头哥(杭州)半导体有限公司 Processor core, processor, system on chip and debugging system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008513853A (en) * 2004-09-14 2008-05-01 コーウェア インコーポレイテッド Debug in multi-core architecture
US9038076B2 (en) 2004-09-14 2015-05-19 Synopsys, Inc. Debug in a multicore architecture
US9038070B2 (en) 2004-09-14 2015-05-19 Synopsys, Inc. Debug in a multicore architecture
US9129050B2 (en) 2004-09-14 2015-09-08 Synopys, Inc. Debug in a multicore architecture
US9830241B2 (en) 2004-09-14 2017-11-28 Synopsys, Inc. Debug in a multicore architecture
JP2006164001A (en) * 2004-12-09 2006-06-22 Fujitsu Ltd Ice server
WO2012077704A1 (en) * 2010-12-07 2012-06-14 日本電気株式会社 Debug stub server, debugging method and program
JPWO2012077704A1 (en) * 2010-12-07 2014-05-22 日本電気株式会社 Debug stub server, debugging method and program
US9292395B2 (en) 2010-12-07 2016-03-22 Nec Corporation Debug stub server, debug method, and program
CN113672554A (en) * 2021-07-06 2021-11-19 平头哥(杭州)半导体有限公司 Processor core, processor, system on chip and debugging system
CN113672554B (en) * 2021-07-06 2023-12-29 平头哥(杭州)半导体有限公司 Processor core, processor, system on chip and debug system

Similar Documents

Publication Publication Date Title
JP3929574B2 (en) Integrated circuit device and communication method thereof
US8522079B2 (en) System and method for multi-core synchronous debugging of a multi-core platform
US7577874B2 (en) Interactive debug system for multiprocessor array
JP2021531530A (en) Debug controller circuit
JP2002358249A (en) Bus protocol compliance test method for device, and system
JPS581813B2 (en) data processing system
TWI588837B (en) System on chip with debug controller and operating method thereof
WO2016106935A1 (en) Flash memory controller and control method for flash memory controller
JPH01263760A (en) Data transfer control method and its circuit for coprocessor
TWI267740B (en) Method, apparatus, article and system of device resource allocation
US5341495A (en) Bus controller having state machine for translating commands and controlling accesses from system bus to synchronous bus having different bus protocols
US7519865B1 (en) Systems and methods for identifying incomplete transactions
KR100607023B1 (en) Program processing apparatus
JP3929572B2 (en) Integrated circuit device and communication method thereof
JP2004021751A (en) Debug system, debug program, and debug program storage medium
US20070250740A1 (en) System and method for conducting BIST operations
JP2005084957A (en) Circuit operation verification device and method
US7231568B2 (en) System debugging device and system debugging method
CN116483259A (en) Data processing method and related device
JP2003263339A (en) Debug function-incorporated microcomputer
JP2003122594A (en) Semiconductor device and evaluation tool
JP2004094451A (en) On-chip jtag interface circuit and system lsi
JP2003108513A (en) Hardware chain pull
JP2020140380A (en) Semiconductor device and debugging system
US7543307B2 (en) Interface method and device having interface for circuit comprising logical operation element