インテルのみ表示可能 — GUID: mwh1410384974144
Ixiasoft
インテルのみ表示可能 — GUID: mwh1410384974144
Ixiasoft
6.5. In-System Sources and Probes EditorのTclインターフェイス
In-System Sources and Probes Editor用のTclインターフェイスで提供されている強力なプラットフォームでは、デザインのデバッグに役立てることができます。Tclインターフェイスが特に有用なのは、デザインのデバッグ時に複数のコントロール入力のセットのトグルが必要な場合です。複数のコマンドをTclスクリプトと組み合わせて、カスタム・コマンド・セットを定義します。
コマンド | 引数 | 説明 |
---|---|---|
start_insystem_source_probe | -device_name<device name> -hardware_name <hardware name> | デバイスへのハンドルを指定のハードウェアで開きます。 このコマンドの呼び出しは、トランザクションの開始前に行います。 |
get_insystem_source_probe_instance_info | -device_name <device name> -hardware_name <hardware name> | デザイン内のすべての ALTSOURCE_PROBE インスタンスのリストを返します。返される各レコードのフォーマットは次のとおりです。 {<instance Index>、 <source width>、<probe width>、 <instance name>} |
read_probe_data | -instance_index <instance_index> -value_in_hex (任意) | プローブの現在の値を取得します。 各プローブのステータスを指定する文字列が返されます。MSB は一番左側のビットになります。 |
read_source_data | -instance_index <instance_index> -value_in_hex (任意) | ソースの現在の値を取得します。 各ソースのステータスを特定する文字列が返されます。MSBは一番左側のビットになります。 |
write_source_data | -instance_index <instance_index> -value <value> -value_in_hex (任意) | ソースの値を設定します。 バイナリー文字列がソースポートへ送られます。MSBは一番左側のビットになります。 |
end_insystem_source_probe | なし | JTAGチェーンを解放します。 このコマンドの発行は、全てのトランザクションの終了後に行います。 |
次の図は、デザインのALTSOURCE_PROBEインスタンスを制御するプロシージャーのあるTclスクリプトの一例です。デザイン例には、DCFIFOからの読み出し、書き込みを行うためのALTSOURCE_PROBEインスタンスを持つDCFIFOが含まれています。入力ピンとALTSOURCE_PROBEインスタンス間でのDCFIFOへのデータフローを制御するために、一連のコントロール・マルチプレクサーがデザインに追加されています。シングル・サンプル・リードおよびライトを保証するためにリードリクエストおよびライトリクエスト・コントロール・ラインにパルス・ジェネレーターが追加されます。以下の例のスクリプトでALTSOURCE_PROBEインスタンスが使用されると、シングル・サンプル・ライトおよびリード動作を実行し、フルおよび空のステータスフラッグをレポートすることでFIFOのコンテンツに可視性がもたらされます。
## Setup USB hardware - assumes only USB Blaster is installed and ## an FPGA is the only device in the JTAG chain set usb [lindex [get_hardware_names] 0] set device_name [lindex [get_device_names -hardware_name $usb] 0] ## write procedure : argument value is integer proc write {value} { global device_name usb variable full start_insystem_source_probe -device_name $device_name -hardware_name $usb #read full flag set full [read_probe_data -instance_index 0] if {$full == 1} {end_insystem_source_probe return "Write Buffer Full" } ##toggle select line, drive value onto port, toggle enable ##bits 7:0 of instance 0 is S_data[7:0]; bit 8 = S_write_req; ##bit 9 = Source_write_sel ##int2bits is custom procedure that returns a bitstring from an integer ## argument write_source_data -instance_index 0 -value /[int2bits [expr 0x200 | $value]] write_source_data -instance_index 0 -value [int2bits [expr 0x300 | $value]] ##clear transaction write_source_data -instance_index 0 -value 0 end_insystem_source_probe } proc read {} { global device_name usb variable empty start_insystem_source_probe -device_name $device_name -hardware_name $usb ##read empty flag : probe port[7:0] reads FIFO output; bit 8 reads empty_flag set empty [read_probe_data -instance_index 1] if {[regexp {1........} $empty]} { end_insystem_source_probe return "FIFO empty" } ## toggle select line for read transaction ## Source_read_sel = bit 0; s_read_reg = bit 1 ## pulse read enable on DC FIFO write_source_data -instance_index 1 -value 0x1 -value_in_hex write_source_data -instance_index 1 -value 0x3 -value_in_hex set x [read_probe_data -instance_index 1 ] end_insystem_source_probe return $x }