JP2007026196A - Usb test monitor circuit - Google Patents
Usb test monitor circuit Download PDFInfo
- Publication number
- JP2007026196A JP2007026196A JP2005208694A JP2005208694A JP2007026196A JP 2007026196 A JP2007026196 A JP 2007026196A JP 2005208694 A JP2005208694 A JP 2005208694A JP 2005208694 A JP2005208694 A JP 2005208694A JP 2007026196 A JP2007026196 A JP 2007026196A
- Authority
- JP
- Japan
- Prior art keywords
- transaction
- signal
- usb
- data
- flag
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
本発明は、USBテストモニタ回路に関し、特に、USBバスを流れる差動信号を送受信する物理層と物理層の通信を行うシリアル・インタフェース・エンジンとの間のインタフェース信号をモニタしてUSBバスを流れるトランザクションを識別し、物理層に依存しない部分の正当性の評価を新規に測定器を用いることなく行うUSBテストモニタ回路に関する。 The present invention relates to a USB test monitor circuit, and in particular, monitors an interface signal between a physical layer that transmits and receives a differential signal flowing through a USB bus and a serial interface engine that performs physical layer communication and flows through the USB bus. The present invention relates to a USB test monitor circuit that identifies a transaction and evaluates the validity of a part that does not depend on a physical layer without using a new measuring instrument.
近年、パーソナルコンピュータやプリンタ、スキャナなどのPC周辺機器を相互に接続するためのインタフェースとして、USB(ユニバーサルシリアルバス)、IEEE1394などが注目されている。 In recent years, USB (Universal Serial Bus), IEEE 1394, and the like have attracted attention as interfaces for connecting PC peripheral devices such as personal computers, printers, and scanners to each other.
これらのインタフェースを介して接続された装置間でのデータ転送は、シリアル転送方式であり、データ転送が高速で行われる。 Data transfer between devices connected via these interfaces is a serial transfer method, and data transfer is performed at high speed.
また、これらのインタフェースを制御するコントローラは、通常、配線間を流れるアナログ信号を物理層においてデジタル信号に変換し、それをデータリンク層に転送して規定の形式に変換することにより、データの送受信をおこなう構成となっている。 Controllers that control these interfaces usually send and receive data by converting analog signals flowing between wires into digital signals in the physical layer, transferring them to the data link layer, and converting them into a prescribed format. It is the composition which performs.
また、物理層では、データリンク層から送られてきたパラレルデータを高速シリアル変換して配線へ出力するため、物理層での信号測定はデータ転送が高速になるほど難易度が高くなる。 In the physical layer, parallel data sent from the data link layer is serially converted at high speed and output to the wiring. Therefore, the signal measurement at the physical layer becomes more difficult as the data transfer speed increases.
したがって、高速でデータ転送されるインタフェースのコントローラの評価をおこなうためには、非常に高価な測定器をそろえた環境でなければ、評価をおこなうことができないという問題があった。 Therefore, in order to evaluate the controller of the interface that transfers data at high speed, there is a problem that the evaluation cannot be performed unless the environment is equipped with very expensive measuring instruments.
そこで、特許文献1には、新規に高価な測定器を準備しなくても、物理層に依存しない部分のデバッグをおこなうことができる高速シリアルコントローラが提案されている。
しかしながら、上記特許文献1では、テストモード時にPHY回路とLINK回路との間の信号をシリアルI/Fに出力し、PHYに依存しない回路部分の正当性を評価できるように構成されてものであり、高速シリアルバスを流れるトランザクションを識別しようとする場合には、トランザクションを識別する手段を別途用意する必要がある。
However, in the above-mentioned
そこで、本発明は、USBバスを流れる差動信号を送受信する物理層と物理層の通信を行うシリアル・インタフェース・エンジンとの間のインタフェース信号をモニタしてUSBバスを流れるトランザクションを識別し、物理層に依存しない部分の正当性の評価を新規に測定器を用いることなく行うUSBテストモニタ回路を提供することを目的とする。 Accordingly, the present invention monitors the interface signal between the physical layer that transmits and receives the differential signal flowing through the USB bus and the serial interface engine that communicates with the physical layer, identifies the transaction flowing through the USB bus, It is an object of the present invention to provide a USB test monitor circuit that performs a new evaluation of the validity of a layer-independent part without using a measuring instrument.
上記目的を達成するため、請求項1の発明は、USBバスを流れる差動信号を送受信する物理層と前記物理層の通信を行うシリアル・インタフェース・エンジンとの間の第1のインタフェース信号を取得する第1インタフェース信号取得手段と、前記第1のインタフェース信号に基づき前記USBバスを流れる差動信号のトランザクションを識別するトランザクション識別手段と、前記第1のインタフェース信号に基づき前記USBバスを流れるデータ信号を生成するデータ信号生成手段と、前記トランザクション識別手段で識別されたトランザクション識別結果と前記第1インタフェース信号取得手段で生成されたデータ信号とをパラレル出力する第1出力手段とを具備することを特徴とする。
To achieve the above object, the invention of
また、請求項2の発明は、請求項1の発明において、前記トランザクション識別手段は、前記第1のインタフェース信号に含まれるパケット識別子を識別することで前記USBバスを流れる差動信号のトランザクションを識別して該トランザクションの種別を識別するフラグ信号を出力することを特徴とする。 According to a second aspect of the present invention, in the first aspect of the invention, the transaction identifying means identifies a differential signal transaction flowing through the USB bus by identifying a packet identifier included in the first interface signal. Thus, a flag signal for identifying the type of the transaction is output.
また、請求項3の発明は、請求項2の発明において、前記フラグ信号に基づき前記トランザクション識別手段で識別されたトランザクションンの種別毎の発生回数をカウントするトランザクションカウンタを更に具備することを特徴とする。
The invention of
また、請求項4の発明は、請求項1の発明において、前記シリアル・インタフェース・エンジンとDMA制御回路との間の第2のインタフェース信号を取得する第2インタフェース信号取得手段と、前記第2のインタフェース信号をパラレルデータで出力する第2出力手段とを更に具備することを特徴とする。 According to a fourth aspect of the present invention, in the first aspect of the present invention, the second interface signal acquisition means for acquiring a second interface signal between the serial interface engine and the DMA control circuit, and the second interface signal And a second output means for outputting the interface signal as parallel data.
この発明のUSBテストモニタ回路によれば、PHYとSIEを内蔵するASICのUSB動作評価を行うにあたって、USBバスをモニタするための測定器を必要とせずに、既存の評価用測定器(ロジックアナライザ)を用いてパラレルI/Fに出力したインタフェース信号をASIC端子で観測することでUSBバスを流れるトランザクションをモニタすることができる。 According to the USB test monitor circuit of the present invention, when performing the USB operation evaluation of the ASIC having the built-in PHY and SIE, there is no need for a measuring instrument for monitoring the USB bus, and an existing measuring instrument for evaluation (logic analyzer) is used. ) Can be used to monitor a transaction flowing through the USB bus by observing the interface signal output to the parallel I / F at the ASIC terminal.
また、PHYとSIEとの間のインタフェース信号であるUTMI信号とは別に、各トランザクションを識別する識別フラグの信号を出力することで、動作しているトランザクションの種別を容易に確認することができる。 Further, by outputting an identification flag signal for identifying each transaction separately from the UTMI signal that is an interface signal between PHY and SIE, it is possible to easily confirm the type of transaction being operated.
また、トランザクション動作の発生回数をASIC内のカウンタでカウントすることで、各トランザクション動作の発生回数を確認することができる。 Also, by counting the number of occurrences of transaction operations with a counter in the ASIC, the number of occurrences of each transaction operation can be confirmed.
また、SIEとDMA制御部との間の信号をパラレルI/Fに出力することができるので、不具合が発生した場合は、USBバスの信号を容易にモニタすることができるという効果を奏する。 In addition, since a signal between the SIE and the DMA control unit can be output to the parallel I / F, the USB bus signal can be easily monitored when a problem occurs.
以下、本発明に係わるUSB(ユニバーサルシリアルバス)テストモニタ回路の一実施例について添付図面を参照して詳細に説明する。 Hereinafter, an embodiment of a USB (Universal Serial Bus) test monitor circuit according to the present invention will be described in detail with reference to the accompanying drawings.
図1は、本発明に係わるUSBテストモニタ回路100が設けられたプリンタコントローラ1の一例を概略的に示した構成図である。
FIG. 1 is a configuration diagram schematically showing an example of a
プリンタコントローラ1は、特定用途向け集積回路であるプリンタコントローラASIC(=Application Specific Integrated Circuit)10と、CPU(中央演算処理装置)20と、送受信バッファ用のメモリ30と、パラレルI/F(インタフェース)40とを備えており、プリンタコントローラASIC10は、ホスト側のUSB2(以下、「USBホスト2」という。)とプリンタコントローラASIC10のUSBとの間のUSB制御を行うUSB制御部と、USBテストモニタ回路100と、テストレジスタ17とを備えている。
The
USB制御部は、物理層の送受信を行うPHY11と、シリアル・インタフェース・エンジンであるSIE12と、DMA(=Direct Memory Access )制御を行うDMA制御部13と、パラレル制御部14と、割込み制御部15と、調停部16とを備えており、USBテストモニタ回路100は、データ生成部101と、ステートマシン102と、トランザクションカウンタ103と、エラーカウンタ104と、動作選択部105と、第1セレクタ106、第2セレクタ107、第3セレクタ108とを備えている。
The USB control unit includes a PHY 11 that performs physical layer transmission / reception, an
USB制御部のPHY11は、USBホスト2とプリンタコントローラASIC10のUSBとの間の物理層の送受信を行い、USBホスト2から転送されるUSB差動信号(D+、D−)をデジタル信号に変換する。 The PHY 11 of the USB control unit performs physical layer transmission / reception between the USB host 2 and the USB of the printer controller ASIC 10, and converts the USB differential signals (D +, D−) transferred from the USB host 2 into digital signals. .
また、SIE12は、PHY11から送信されるデジタル信号を解釈してUSBパケット(以下、「パケット」という。)を認識し、認識したパケットをUSBプロトコルに沿ってPHY11に送信する。 The SIE 12 interprets a digital signal transmitted from the PHY 11 to recognize a USB packet (hereinafter referred to as “packet”), and transmits the recognized packet to the PHY 11 according to the USB protocol.
また、SIE12は、CPU処理を必要としないパケットを受信した場合は、当該パケットをPHY11に自動的に返信し、CPU処理を必要とするパケットを受信した場合は、割込み制御部15に割り込み信号を出力して割込み制御を行わせ、CPU処理に基づくパケットをPHY11に送信する(コントロール転送)。
When the
DMA制御部13は、CPU20を介さずにUSBホスト2側とメモリ30との間で直接データ転送を行なうための制御を行う。
The
調停部16は、入力信号の出力の順番を調停する。 The arbitrating unit 16 arbitrates the output order of the input signals.
具体的には、バルク転送のような大量のデータを送受信する場合は、SIE12からDMA制御部13に対して出力される転送要求信号に基づきDMA制御部13が調停部16にDMA要求を出力し、調停部16がDMA制御部13からのDMA要求に基づきメモリ30と図示せぬ外部メモリとのデータの出力順番を調停することで、大量のデータがメモリ30と図示せぬ外部メモリとの間で送受信される。
Specifically, when a large amount of data such as bulk transfer is transmitted / received, the
パラレル制御部14は、USBテストモニタ回路100の第2セレクタ107及び第3セレクタ108に制御信号を出力し、第2セレクタ107及び第3セレクタ108を介してパラレルデータがパラレルI/F40に転送されるように制御する。
The
USBテストモニタ回路100は、USB制御部のPHY11とSIE12との間のインタフェース信号であるUTMI(USB Transceiver Macrocell Interface)信号をモニタし、データ有効時のPID(=Packet IDentifier:パケット識別子)によってトランザクションの種別を認識し、各種別毎のトランザクション動作の発生回数が検知できるように構成されている。
The USB
USBテストモニタ回路100のデータ生成部101は、USB制御部のPHY11とSIE12との間のUTMI信号に基づき8bitのデータを生成し、生成したデータはUSB制御部のパラレル制御部14の指示信号に基づき第1セレクタ106及び第2セレクタ107を介してパラレルデータとなってパラレルI/F40へ転送される。
The
なお、SIE12からPHY11に出力される信号は、例えばDataIn(8bit)、TxValid(1bit)、TxReady(1bit)等であり、PHY11からSIE12に出力される信号は、例えばDataOut(8bit)、RxActive(1bit)、RxValid(1bit)等である。
The signals output from the
ステートマシン102は、PHY11とSIE12との間のUTMI信号をモニタし、データ有効時のPIDに基づきトランザクションの種別を認識する。
The
また、ステートマシン102は、トランザクションの動作を示すフラグを「High」または「1」、トランザクションの動作が終了してIDLE状態に戻る時にフラグを「Low」または「0」に設定し、TxValid、TxReadyがどちらも「High」または「1」の時にDataInが有効であると認識し、RxActiveとRxValidがどちらも「High」または「1」の時にDataOutが有効であると認識する。
Further, the
ステートマシン102により設定され、出力されるフラグ値は、テストモード時にパラレルI/F40の制御信号ラインから制御信号として出力される。
トランザクションカウンタ103は、読み込み、クリアが可能なカウンタであり、トランザクション種別毎の発生回数をカウントする。
The flag value set and output by the
The
動作選択部105は、トランザクションカウンタ103でカウントする対象のトランザクション種別を選択指定する。
The
なお、テスト終了時の任意のタイミングでトランザクションカウンタ102のカウント値を読み取ることで、動作選択部105により選択指定された対象トランザクションの発生回数を読み取ることができる。
Note that by reading the count value of the
このトランザクションカウンタ103は、テストモードがOFFの場合、すなわちテストモードでない通常動作モードの場合でも動作可能であり、通常動作時にUSBバス上のトランザクション、ハンドシェイク等の発生回数をカウントすることで(例えば、NYETハンドシェイクの発生回数が分かれば受信バッファFullの度合いなどの目安を知ることができる。)USBバスを流れるトランザクションの動作状態をモニタすることができる。
This
第1セレクタ106及び第2セレクタ107は、USBテストモニタ回路100内で有効なデータラインを選択し、第3セレクタ108は、USBテストモニタ回路100内で有効な制御ラインを選択する。
The
具体的には、第1セレクタ106は、テストモード時に、テストレジスタ17から転送されるセレクト信号によって、データ生成部101で生成されて転送されたデータ信号もしくはSIE12とDMA制御部13との間で発生するデータ信号のうちの有効なデータ信号を選択して第2セレクタ107へ転送する。
Specifically, in the test mode, the
また、第2セレクタ107は、プリンタコントローラASIC10のテストモード時は、Testpin(端子)やテストレジスタ17から入力されるセレクト信号によって、第1セレクタ106で選択されて転送されたデータ信号(データ生成部101で生成されて転送されたデータ信号もしくはSIE12とDMA制御部13との間で発生するデータ信号)を選択し、通常動作時は、パラレル制御部14から転送されるデータ信号を選択してパラレルI/F40へ転送する。
The
エラーカウンタ104は、読み込み、クリアが可能なカウンタであり、ステートマシン102が認識したPIDが何れのPIDタイプ(例えば、トークン、ハンドシェイク、特殊等)にも該当しない場合は、エラーパルス信号をパラレルI/F40に出力するとともに、カウント値をカウントアップする。
The
なお、PHY11とSIE12との間のUTMI信号のデータバスが8bitの場合は60MHz同期の信号として動作し、UTMI信号のデータバスが16bitの場合は30MHz同期の信号として動作するので、USBテストモニタ回路100内で8bitにバスサイジングし、パラレルI/F40では60MHz同期の信号として動作する。
When the data bus of the UTMI signal between PHY11 and SIE12 is 8 bits, it operates as a 60 MHz synchronous signal, and when the data bus of the UTMI signal is 16 bits, it operates as a 30 MHz synchronous signal. The bus is sized to 8 bits within 100, and the parallel I /
また、パラレルI/F40のデータバスはテストモードに連動した出力方向となる。
In addition, the data bus of the parallel I /
第3セレクタ108は、プリンタコントローラASIC10のテストモード時は、テストレジスタ17またはTestpin(端子)によって、ステートマシン102から転送されるフラグ値を示す信号を選択し、通常動作時は、パラレル制御部14から転送される制御信号を選択してパラレルI/F40へ転送する。
The
図2は、ステートマシン102でモニタされるPIDとフラグの種類及びカウント対象動作の一例を示すPID一覧表200である。
FIG. 2 is a PID list 200 showing an example of PIDs and flag types monitored by the
なお、ステートマシン102は、DATA0、DATA1をモニタしない。
Note that the
PID一覧表20に示すように、PIDタイプには「トークン」、「ハンドシェイク」、「特殊」等があり、トランザクションは「トークン」または「特殊」パケットで始まり各PID名で示されるフェーズへ遷移する。
As shown in the
具体的には、「トークン」にはPID名で示される「OUT」、「IN」、「SOF」、「SETUP」があり、ホスト側(本実施例ではUSBホスト2)から「OUT」トークンパケットが発行されるとOUTトランザクションへ遷移し、「IN」トークンパケットが発行されるとINトランザクションへ遷移し、「SETUP」トークンパケットが発行されるとSETUPトランザクションへ遷移する。 Specifically, “token” includes “OUT”, “IN”, “SOF”, and “SETUP” indicated by PID names, and the “OUT” token packet from the host side (USB host 2 in this embodiment). When an “IN” token packet is issued, a transition is made to an IN transaction. When a “SETUP” token packet is issued, a transition is made to a SETUP transaction.
また、ホスト側から「SOF」トークンパケットが発行されるとホスト側で複数のトランザクションを編成するフレーム生成が開始される。 When the “SOF” token packet is issued from the host side, frame generation for organizing a plurality of transactions is started on the host side.
OUTトランザクションはホスト側からデバイス側(本実施例ではプリンタコントローラASIC10)への送信トランザクションの開始を示し、INトランザクションはデバイス側からホスト側への送信トランザクションの開始を示し、SOFトランザクションはフレームの開始を示し、SETUPトランザクションはコントロール転送のリクエストを発行することを示しており、各トランザクションがホスト側から発行される。 The OUT transaction indicates the start of a transmission transaction from the host side to the device side (printer controller ASIC 10 in this embodiment), the IN transaction indicates the start of a transmission transaction from the device side to the host side, and the SOF transaction indicates the start of a frame. The SETUP transaction indicates that a control transfer request is issued, and each transaction is issued from the host side.
また、「ハンドシェイク」の「ACK」はエラーなしデータパケットを受信したことを送信側に通知することを示し、「NAK」はデバイス側でデータの送受信に失敗したことを送信側に通知することを示し、「STALL」はデバイス側の何らかの異常状態のために通信の続行ができない旨を送信側に通知することを示し、「NYET」は受信側の準備がまだできていないことを通知することをそれぞれ示している。 In addition, “ACK” of “handshake” indicates to notify the transmitting side that a data packet without error has been received, and “NAK” notifies the transmitting side that data transmission / reception has failed on the device side. "STALL" indicates that the communication cannot be continued due to some abnormal state on the device side, and "NYET" indicates that the receiving side is not ready yet Respectively.
また、「特殊」にはPID名で示される「PING」があり、ホスト側から「PING」特殊パケットが発行されるとPINGトランザクションへ遷移し、受信側(本実施例ではプリンタコントローラASIC10)の状態を調べることを示している。 “Special” includes “PING” indicated by a PID name. When a “PING” special packet is issued from the host side, a transition is made to a PING transaction, and the state of the receiving side (the printer controller ASIC 10 in this embodiment) Shows to look into.
例えば、ホスト側から「OUT」トークンパケットが発行されると、OUTトランザクションへ遷移し、その際にステートマシン102がOUTトランザクション動作を示すoutフラグを「High」または「1」に設定し、OUTトランザクションの発行回数がトランザクションカウンタ102によりカウントされる。
For example, when an “OUT” token packet is issued from the host side, a transition is made to an OUT transaction. At that time, the
ホスト側は、「OUT」トークンに続いて、デバイス側の状態に関係なくDATA0またはDATA1のデータパケットを送信し、デバイス側はエラーなしでデータパケットを受信した場合は「ACK」ハンドシェイクパケットを返信し、データ受信の準備不良のためにデータの受信に失敗した場合は「NAK」ハンドシェイクパケットを返信し、何らかの異常状態が原因でデータパケットの受信に失敗した場合は「STALL」ハンドシェイクパケットを返信する。 The host side sends a data packet of DATA0 or DATA1 following the “OUT” token regardless of the state of the device side. If the device side receives the data packet without error, it returns an “ACK” handshake packet. If data reception fails due to poor data reception preparation, a “NAK” handshake packet is returned. If data packet reception fails due to some abnormal condition, a “STALL” handshake packet is returned. Send back.
また、ホスト側から「IN」トークンパケットが発行され、INトランザクションへ遷移するとステートマシン102がINトランザクション動作を示すinフラグを「High」または「1」に設定し、INトランザクションの発行回数がトランザクションカウンタ102によりカウントされる。
INトランザクションへ遷移するとデバイス側は、データ送信が可能な状態であればDATA0またはDATA1のデータパケットを送信し、デバイス側のデータ送信の準備が不良のためにデータ送信できない場合は「NAK」ハンドシェイクパケットを返信し、何らかの原因でデータ送信できない場合は「STALL」ハンドシェイクパケットを返信する。
Further, when an “IN” token packet is issued from the host side and transitions to the IN transaction, the
When transitioning to an IN transaction, the device transmits a DATA0 or DATA1 data packet if data transmission is possible, and a “NAK” handshake if the device cannot transmit data due to poor preparation for data transmission. A packet is returned, and when data cannot be transmitted for some reason, a “STALL” handshake packet is returned.
ホスト側は、デバイス側から送信されたデータパケットを正常に受信すると「ACK」ハンドシェイクパケットを送信し、デバイス側はホスト側から送信された「ACK」ハンドシェイクパケットを受信することでデータ転送が成功したと判断する。 When the host side successfully receives the data packet sent from the device side, it sends an “ACK” handshake packet, and the device side receives the “ACK” handshake packet sent from the host side to transfer the data. Judge that succeeded.
また、ホスト側から「SETUP」トークンパケットが発行され、SETUPトランザクションへ遷移すると、ステートマシン102がSETUPトランザクション動作を示すsetupフラグを「High」または「1」に設定し、SETUPトランザクションの発行回数がトランザクションカウンタ102によりカウントされる。
When a “SETUP” token packet is issued from the host side and transitions to a SETUP transaction, the
SETUPトランザクションへ遷移するとホスト側は、「SETUP」トークンに続いて、デバイス側の状態に関係なくDATA0のデータパケットを送信し、デバイス側はデータパケットの受信が成功した場合は「ACK」ハンドシェイクパケットを返信する。 When a transition is made to the SETUP transaction, the host side transmits a DATA0 data packet following the “SETUP” token regardless of the state of the device side. If the device side successfully receives the data packet, the “ACK” handshake packet is transmitted. Reply.
また、ホスト側から「SOF」トークンパケットが発行されるとホスト側で複数のトランザクションが編成されたフレームが生成されるとともに、ステートマシン102がSOF動作を示すsofフラグを「High」または「1」に設定する。
When a “SOF” token packet is issued from the host side, a frame in which a plurality of transactions are organized is generated on the host side, and the
図3は、SETUPトランザクション動作時のPHY11とSIE12との間で出力されるデータバス信号とステートマシン102が生成するフラグ信号及びパラレルI/F40から出力されるデータ信号の一例を示す図である。
FIG. 3 is a diagram illustrating an example of a data bus signal output between the PHY 11 and the
図3に示すように、USBテストモニタ回路100は、USB制御部のPHY11とSIE12との間のインタフェース信号であるUTMI信号をモニタし、PHY11からSIE12に出力されるRxActive信号302、RxValid信号304がどちらも「High」または「1」の時は、DataOut「7:0」信号303が有効であると判断し、DataOut「7:0」信号303のPID(この場合は「SETUP」)に基づきトランザクションをSETUPトランザクションと認識する。
As shown in FIG. 3, the USB
また、SETUPトランザクションが認識されると、ステートマシン102からSETUPフラグを「High」または「1」を示すSETUPフラグ信号が出力され、トランザクションカウンタ103のSETUPカウント値がカウントアップされたSETUPトランザクションカウンタ信号310が出力される。
When the SETUP transaction is recognized, a SETUP flag signal indicating “High” or “1” is output from the
SETUPフラグ信号は、第3セレクタ10及びパラレルI/F40を介してSETUPフラグ(パラレルI/F)信号308として出力され、PID、Data、Dataを含むDataOut「7:0」信号303が、第1セレクタ106、第2セレクタ107及びパラレルI/F40を介してデータ信号(パラレルI/F)309aとして出力される。
The SETUP flag signal is output as the SETUP flag (parallel I / F) signal 308 via the third selector 10 and the parallel I /
また、SIE12からPHY11に出力されるTxValid信号305、TxReady信号307がどちらも「High」または「1」の時は、DataIn「7:0」信号306が有効であると判断し、DataIn「7:0」信号306のPID(この場合は「SETUP」)に基づきトランザクションをSETUPトランザクションと認識し、TxValid305、TxReady信号307がどちらも「Low」となることで当該SETUPトランザクション動作が終了し、IDLE状態に戻ったと判断してSETUPフラグを「Low」または「1」に設定したSETUPフラグ信号308が第3セレクタ10及びパラレルI/F40を介して出力される。
When the
このように各信号が送受信される動作においてステートマシン102がPHY11とSIE12との間のUTMI信号をモニタし、データ有効時のPIDに基づくトランザクション種別を認識する動作の詳細について図4乃至図8の流れ図を参照し説明する。
As described above, the
図4に示すように、プリンタコントローラ1に設けられたUSBテストモニタ回路100のステートマシン102は、PHY11とSIE12との間のUTMI信号をモニタし、PHY11からSIE12に出力される信号であるRxActive、RxValidがどちらも「High」または「1」の時は(ステップS401でYES)、DataOut「7:0」が有効であると判断し、ホスト側(本実施例ではUSBホスト2)から送信されたDataOut「7:0」に含まれるPIDが「SETUP」、「IN」、「OUT」、「PING」、「SOF」の何れのトークンパケットもしくは特殊パケットであるかを識別する。
As shown in FIG. 4, the
具体的には、ステートマシン102がホスト側から送信されたDataOut「7:0」のPIDと「SETUP」、「IN」、「OUT」、「SOF」の各トークンパケット及び「PING」の特殊パケットの各PIDとを比較し、DataOut「7:0」のPIDが「SETUP」トークンパケットのPIDと一致している場合は(ステップS402でYES)、ホスト側から送信されたトークンパケットを「SETUP」トークンパケットと認識し、SETUPフラグを「1」、トランザクションカウンタ103のSETUPカウント値を+1だけカウントアップする。
Specifically, the DataOut “7: 0” PID, “SETUP”, “IN”, “OUT”, “SOF” token packets, and “PING” special packets sent from the host machine to the
また、DataOUT「7:0」のPIDが「IN」トークンパケットのPIDと一致している場合は(ステップS403でYES)、ホスト側から送信されたトークンパケットを「IN」トークンパケットと認識し、INフラグを「1」、トランザクションカウンタ103のINカウント値を+1だけカウントアップする。
If the PID of DataOUT “7: 0” matches the PID of the “IN” token packet (YES in step S403), the token packet transmitted from the host side is recognized as an “IN” token packet, The IN flag is incremented by “1”, and the IN count value of the
また、DataOUT「7:0」のPIDが「OUT」トークンパケットのPIDと一致している場合は(ステップS404でYES)、ホスト側から送信されたトークンパケットを「OUT」トークンパケットと認識し、OUTフラグを「1」、トランザクションカウンタ103のOUTカウント値を+1だけカウントアップする。
If the PID of DataOUT “7: 0” matches the PID of the “OUT” token packet (YES in step S404), the token packet transmitted from the host side is recognized as the “OUT” token packet, The OUT flag is incremented by “1” and the OUT count value of the
また、DataOUT「7:0」のPIDが「PING」特殊パケットのPIDと一致している場合は(ステップS405でYES)、ホスト側から送信された特殊パケットを「PING」特殊パケットと認識し、PINGフラグを「1」、トランザクションカウンタ103のPINGカウント値を+1だけカウントアップする。
If the PID of DataOUT “7: 0” matches the PID of the “PING” special packet (YES in step S405), the special packet transmitted from the host side is recognized as a “PING” special packet, The ping flag is incremented by “1”, and the ping count value of the
また、DataOUT「7:0」のPIDが「SOF」トークンパケットのPIDと一致している場合は(ステップS406でYES)、SOFフラグが「1」に設定される。 If the PID of DataOUT “7: 0” matches the PID of the “SOF” token packet (YES in step S406), the SOF flag is set to “1”.
また、DataOUT「7:0」のPIDが「SETUP」、「IN」、「OUT」、「PING」、「SOF」の何れでもない場合は(ステップS406でNO)、ステートマシン102によりエラーフラグが「1」、エラーカウンタのカウント値が+1だけカウントアップされる。
If the PID of DataOUT “7: 0” is not “SETUP”, “IN”, “OUT”, “PING”, or “SOF” (NO in step S406), the
なお、ホスト側からデバイス側(本実施例ではプリンタコントローラASIC10)へ「SETUP」トークンパケットが送信されることで(ステップS402でYES)IDLE状態からSETUPトランザクションへ遷移し(ステップS500)、「IN」トークンパケットが送信されることで(ステップS403でYES)IDLE状態からINトランザクションへ遷移し(ステップS600)、「OUT」トークンパケットが送信されることで(ステップS404でYES)IDLE状態からOUTトランザクションへ遷移し(ステップS700)、「PING」トークンパケットが送信されることで(ステップS405でYES)IDLE状態からPINGトランザクションへ遷移する(ステップS800)。
図5に示すように、SETUPトランザクションへ遷移し、SETUPトランザクション動作が開始されると(ステップS500)、ステートマシン102は、SIE12からPHY11に出力される信号であるTxValid、TxReadyがどちらも「High」または「1」の時にDataIN「7:0」が有効であると判断し(ステップS501でYES)、デバイス側からホスト側へ応答されるDataIN「7:0」の内容が「ACK」ハンドシェイクであるか否かを判別し(ステップS502)、「ACK」の場合は、SETUPフラグを「0」に設定する(ステップS502でYES)。
Note that when a “SETUP” token packet is transmitted from the host side to the device side (printer controller ASIC 10 in this embodiment) (YES in step S402), the IDLE state is changed to the SETUP transaction (step S500), and “IN”. When the token packet is transmitted (YES in step S403), the state transitions from the IDLE state to the IN transaction (step S600), and when the “OUT” token packet is transmitted (YES in step S404), the state transitions from the IDLE state to the OUT transaction. A transition is made (step S700), and a “PING” token packet is transmitted (YES in step S405), and a transition is made from the IDLE state to a PING transaction (step S800).
As shown in FIG. 5, when a transition is made to a SETUP transaction and a SETUP transaction operation is started (step S500), the
また、DataIN「7:0」の内容が「ACK」ハンドシェイクでない場合は(ステップS502でNO)、SETUPフラグを「0」、エラーフラグを「1」に設定し、エラーカウンタ104によりエラーのカウント値が+1だけカウントアップされる。 If the content of DataIN “7: 0” is not “ACK” handshake (NO in step S502), the SETUP flag is set to “0”, the error flag is set to “1”, and the error counter 104 counts the error. The value is counted up by +1.
また、SETUPトランザクションへ遷移後、デバイス側からホスト側へ「ACK」ハンドシェイクが応答されることでSETUPトランザクションからIDLE状態へ遷移する(ステップS503)。 In addition, after the transition to the SETUP transaction, an “ACK” handshake is responded from the device side to the host side, thereby transitioning from the SETUP transaction to the IDLE state (step S503).
また、図6に示すように、INトランザクションへ遷移し、INトランザクション動作が開始されると(ステップS600)、ステートマシン102は、SIE12からPHY11に出力される信号であるTxValid、TxReadyがどちらも「High」または「1」の時にDataIN「7:0」が有効であると判断し(ステップS601でYES)、デバイス側からホスト側へ応答されるDataIN「7:0」の内容が「NAK」または「STALL」の各ハンドシェイクでないか否かを判別し、各ハンドシェイクの内容に基づき各フラグ及びカウンタ値がカウントアップする。
As shown in FIG. 6, when the transition to the IN transaction is started and the IN transaction operation is started (step S600), the
具体的には、デバイス側からホスト側へ応答されるDataIN「7:0」の内容が「NAK」ハンドシェイクの場合は(ステップS603でYES)、ステートマシン102がINフラグを「0」に設定し、トランザクションカウンタ103によりNAK(IN)のカウント値が+1だけカウントアップされた後、INトランザクションからIDLE状態へ遷移する(ステップS606)。
Specifically, when the content of DataIN “7: 0” returned from the device side to the host side is “NAK” handshake (YES in step S603), the
また、DataIN「7:0」の内容が「STALL」ハンドシェイクの場合は(ステップS604でYES)、ステートマシン102がINフラグを「0」に設定し、トランザクションカウンタ103によりSTALL(IN)のカウント値が+1だけカウントアップされた後、INトランザクションからIDLE状態へ遷移する(ステップS606)。
If the content of DataIN “7: 0” is “STALL” handshake (YES in step S604), the
また、ステートマシン102は、PHY11からSIE12に出力される信号であるRxActive、RxValidがどちらも「High」または「1」の時にDataOUT「7:0」が有効であると判断し(ステップS602でYES)、ホスト側からデバイス側へ送信されるDataOUT「7:0」の内容に基づき各フラグ及びカウンタ値をカウントアップする。
In addition, the
具体的には、DataOUT「7:0」の内容が「ACK」ハンドシェイクの場合は(ステップS605でYES)、ステートマシン102によりINフラグが「0」に設定された後、INトランザクションからIDLE状態へ遷移する(ステップS606)。
Specifically, when the content of DataOUT “7: 0” is an “ACK” handshake (YES in step S605), the IN flag is set to “0” by the
また、DataOUT「7:0」の内容が「ACK」ハンドシェイクでない場合は(ステップS605でNO)、ステートマシン102がINフラグを「0」、エラーフラグを「1」に設定し、エラーカウンタ104によりエラーカウントのカウント値が+1だけカウントアップされた後、INトランザクションからIDLE状態へ遷移する(ステップS606)。
If the content of DataOUT “7: 0” is not the “ACK” handshake (NO in step S605), the
図7に示すように、OUTトランザクションへ遷移すると、OUTトランザクション動作が開始され(ステップS700)、ステートマシン102は、PHY11からSIE12に出力される信号であるTxValid、TxReadyがどちらも「High」または「1」の時にDataIN「7:0」が有効であると判断し(ステップS701でYES)、デバイス側からホスト側へ応答されるDataIN「7:0」の内容に基づき各フラグ及びカウンタ値をカウントアップする。
As shown in FIG. 7, when the transition is made to the OUT transaction, the OUT transaction operation is started (step S700), and the
具体的には、ホスト側からデバイス側へ送信されるDataIN「7:0」の内容が「ACK」ハンドシェイクの場合は(ステップS702でYES)、ステートマシン102によりOUTフラグが「0」に設定された後、OUTトランザクションからIDLE状態へ遷移する(ステップS706)。
Specifically, when the content of DataIN “7: 0” transmitted from the host side to the device side is “ACK” handshake (YES in step S702), the
また、DataIN「7:0」の内容が「STALL」ハンドシェイクの場合は(ステップS703でYES)、ステートマシン102がOUTフラグを「0」に設定し、トランザクションカウンタ103によりSTALL(OUT)のカウント値が+1だけカウントアップされた後、OUTトランザクションからIDLE状態へ遷移する(ステップS706)。
If the content of DataIN “7: 0” is “STALL” handshake (YES in step S703), the
また、DataIN「7:0」の内容が「NAK」ハンドシェイクの場合は(ステップS704でYES)、ステートマシン102がOUTフラグを「0」に設定し、トランザクションカウンタ103によりNAK(OUT)のカウント値が+1だけカウントアップされた後、OUTトランザクションからIDLE状態へ遷移する(ステップS706)。
If the content of DataIN “7: 0” is a “NAK” handshake (YES in step S704), the
また、DataIN「7:0」の内容が「NYET」ハンドシェイクの場合は(ステップS705でYES)、ステートマシン102がOUTフラグを「0」に設定し、トランザクションカウンタ103によりNYET(OUT)のカウント値が+1だけカウントアップされた後、OUTトランザクションからIDLE状態へ遷移する(ステップS706)。
When the content of DataIN “7: 0” is “NYET” handshake (YES in step S705), the
また、DataIN「7:0」の内容が「ACK」、「STALL」、「NAK」、「NYET」の何れのハンドシェイクでもない場合は(ステップS705でNO)、ステートマシン102がOUTフラグを「0」、エラーフラグを「1」に設定し、エラーカウンタ104によりエラーのカウント値が+1だけカウントアップされた後、OUTトランザクションからIDLE状態へ遷移する(ステップS706)。
If the content of DataIN “7: 0” is not any of “ACK”, “STALL”, “NAK”, and “NYET” handshake (NO in step S705), the
図8に示すように、PINGトランザクションへ遷移し、PINGトランザクションが動作が開始されると(ステップS800)、ステートマシン102は、PHY11からSIE12に出力される信号であるTxValid、TxReadyがどちらも「High」または「1」の時にDataIN「7:0」の内容に基づき各フラグ及びカウンタ値をカウントアップする。
As shown in FIG. 8, when a transition to a PING transaction starts and the operation of the PING transaction is started (step S800), the
具体的には、ホスト側からデバイス側へ送信されるDataIN「7:0」の内容が「ACK」の場合は(ステップS801でYES)、ステートマシン10によりPINGフラグが「0」に設定された後、PINGトランザクションからIDLE状態へ遷移する(ステップS805)。 Specifically, when the content of DataIN “7: 0” transmitted from the host side to the device side is “ACK” (YES in step S801), the PING flag is set to “0” by the state machine 10 Thereafter, the PING transaction makes a transition to the IDLE state (step S805).
また、DataIN「7:0」の内容が「STALL」ハンドシェイクの場合は(ステップS802でYES)、ステートマシン102がPINGフラグを「0」に設定し、トランザクションカウンタ103によりSTALL(PING)のカウント値が+1だけカウントアップされた後、PINGトランザクションからIDLE状態へ遷移する(ステップS805)。
If the content of DataIN “7: 0” is “STALL” handshake (YES in step S802), the
また、DataIN「7:0」の内容が「NAK」ハンドシェイクの場合は(ステップS804でYES)、ステートマシン102がPINGフラグを「0」に設定し、トランザクションカウンタ103によりNAK(PING)のカウント値が+1だけカウントアップされた後、PINGトランザクションからIDLE状態へ遷移する(ステップS805)。
If the content of DataIN “7: 0” is a “NAK” handshake (YES in step S804), the
また、DataIN「7:0」の内容が「ACK」、「STALL」、「NAK」の何れのハンドシェイクでもない場合は(ステップS804でNO)、ステートマシン102がPINGフラグを「0」、エラーフラグを「1」に設定し、トランザクションカウンタ103によりエラーカウンタ104のカウント値を+1だけカウントアップした後、PINGトランザクションからIDLE状態へ遷移する(ステップS805)。
If the content of DataIN “7: 0” is not any of “ACK”, “STALL”, and “NAK” handshake (NO in step S804), the
以上説明したように、本発明に係わるUSBテストモニタ回路100は、PHY11とSIE12を内蔵するプリンタコントローラASIC10のUSB動作評価を行うにあたって、既存の評価用測定器(ロジックアナライザ)を用いてパラレルI/Fに出力したインタフェース信号をプリンタコントローラASIC10端子で計測することでUSBバスを流れるトランザクションをモニタすることができる。
As described above, the USB
また、PHY11とSIE12との間のインタフェース信号であるUTMI信号とは別に、各トランザクションを識別する識別フラグの信号を出力することで、動作しているトランザクションの種別を容易に確認することができる。
In addition to the UTMI signal that is an interface signal between the PHY 11 and the
1 プリンタコントローラ
2 USBホスト
10 プリンタコントローラASIC(=Application Specific Integrated Circuit)
11 PHY(物理層)
12 SIE(シリアル・インタフェース・エンジン)
13 DMA(=Direct Memory Access )制御部
14 パラレル制御部
15 割込み制御部
16 調停部
17 テストレジスタ
20 CPU(中央演算処理装置)
30 メモリ(送受信バッファ)
40 パラレルI/F(=Interface:インタフェース)
100 USBテストモニタ回路
101 データ生成部
102 ステートマシン
103 トランザクションカウンタ
104 エラーカウンタ
105 動作選択部
106 第1セレクタ
107 第2セレクタ
108 第3セレクタ
200 PID一覧表
301 クロック信号
302 RxActive信号
303 DataOut「7:0」信号
304 RxValid信号
305 TxValid信号
306 DataIn「7:0」信号
307 TxReady信号
308 SETUPフラグ信号
309a データ信号(パラレルI/F)
309b データ信号(パラレルI/F)
310 SETUPトランザクションカウンタ信号
1 Printer Controller 2 USB Host 10 Printer Controller ASIC (= Application Specific Integrated Circuit)
11 PHY (physical layer)
12 SIE (Serial Interface Engine)
13 DMA (= Direct Memory Access)
30 memory (transmission / reception buffer)
40 Parallel I / F (= Interface: interface)
100 USB
309b Data signal (parallel I / F)
310 SETUP transaction counter signal
Claims (4)
前記第1のインタフェース信号に基づき前記USBバスを流れる差動信号のトランザクションを識別するトランザクション識別手段と、
前記第1のインタフェース信号に基づき前記USBバスを流れるデータ信号を生成するデータ信号生成手段と、
前記トランザクション識別手段で識別されたトランザクション識別結果と前記第1インタフェース信号取得手段で生成されたデータ信号とをパラレル出力する第1出力手段と
を具備することを特徴とするUSBテストモニタ回路。 First interface signal acquisition means for acquiring a first interface signal between a physical layer that transmits and receives a differential signal flowing through the USB bus and a serial interface engine that performs communication of the physical layer;
Transaction identifying means for identifying a differential signal transaction flowing through the USB bus based on the first interface signal;
Data signal generating means for generating a data signal flowing through the USB bus based on the first interface signal;
A USB test monitor circuit comprising: first output means for outputting in parallel the transaction identification result identified by the transaction identification means and the data signal generated by the first interface signal acquisition means.
前記第1のインタフェース信号に含まれるパケット識別子を識別することで前記USBバスを流れる差動信号のトランザクションを識別して該トランザクションの種別を識別するフラグ信号を出力する
ことを特徴とする請求項1記載のUSBテストモニタ回路。 The transaction identification means includes
The flag signal for identifying the transaction of the differential signal flowing through the USB bus by identifying the packet identifier included in the first interface signal and identifying the type of the transaction is output. The USB test monitor circuit described.
を更に具備することを特徴とする請求項2記載のUSBテストモニタ回路。 The USB test monitor circuit according to claim 2, further comprising a transaction counter that counts the number of occurrences of each type of transaction identified by the transaction identification unit based on the flag signal.
前記第2のインタフェース信号をパラレルデータで出力する第2出力手段と
を更に具備することを特徴とする請求項1記載のUSBテストモニタ回路。 Second interface signal acquisition means for acquiring a second interface signal between the serial interface engine and the DMA control circuit;
The USB test monitor circuit according to claim 1, further comprising: second output means for outputting the second interface signal as parallel data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005208694A JP2007026196A (en) | 2005-07-19 | 2005-07-19 | Usb test monitor circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005208694A JP2007026196A (en) | 2005-07-19 | 2005-07-19 | Usb test monitor circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007026196A true JP2007026196A (en) | 2007-02-01 |
Family
ID=37786846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005208694A Pending JP2007026196A (en) | 2005-07-19 | 2005-07-19 | Usb test monitor circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007026196A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965166A (en) * | 2015-07-16 | 2015-10-07 | 四川和芯微电子股份有限公司 | Test method of USB chip and system thereof |
US9734116B2 (en) | 2014-03-20 | 2017-08-15 | Intel Corporation | Method, apparatus and system for configuring a protocol stack of an integrated circuit chip |
US9910814B2 (en) | 2014-03-19 | 2018-03-06 | Intel Corporation | Method, apparatus and system for single-ended communication of transaction layer packets |
US10909062B2 (en) | 2019-02-05 | 2021-02-02 | Seiko Epson Corporation | Circuit device and electronic apparatus |
-
2005
- 2005-07-19 JP JP2005208694A patent/JP2007026196A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9910814B2 (en) | 2014-03-19 | 2018-03-06 | Intel Corporation | Method, apparatus and system for single-ended communication of transaction layer packets |
US9734116B2 (en) | 2014-03-20 | 2017-08-15 | Intel Corporation | Method, apparatus and system for configuring a protocol stack of an integrated circuit chip |
US10282341B2 (en) | 2014-03-20 | 2019-05-07 | Intel Corporation | Method, apparatus and system for configuring a protocol stack of an integrated circuit chip |
CN104965166A (en) * | 2015-07-16 | 2015-10-07 | 四川和芯微电子股份有限公司 | Test method of USB chip and system thereof |
US10909062B2 (en) | 2019-02-05 | 2021-02-02 | Seiko Epson Corporation | Circuit device and electronic apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11704274B2 (en) | System, apparatus and method for extended communication modes for a multi-drop interconnect | |
JP4847877B2 (en) | System and method for associating DLPDUs received by an interface chip with data measurements made by an external circuit | |
CN108234267B (en) | Communication system based on M-LVDS real-time multi-master high-speed bus | |
JP5096024B2 (en) | USB controller and USB controller test method | |
CN104077203A (en) | Method and device for diagnosing computer hardware through USB interface | |
CN104901859A (en) | AXI/PCIE bus converting device | |
CN114564427A (en) | Bus bridge, system and method from AHB bus to I2C bus | |
JP2007026196A (en) | Usb test monitor circuit | |
US5905744A (en) | Test mode for multifunction PCI device | |
US11977464B2 (en) | Error rate measuring apparatus and error rate measuring method | |
US6252874B1 (en) | Ethernet card and ethernet card improvement methods | |
US8245089B2 (en) | Transmission device, image data transmission system and transmission method | |
JP4736135B2 (en) | Internal bus analysis system for inter-card communication, method and program | |
CN100462952C (en) | Interface configurable universal series bus controller | |
CN116185936B (en) | SPI communication data receiving and transmitting abnormity detection control system and detection method | |
Warrier et al. | FPGA implementation of SPI To I2C bridge | |
JP2001236303A (en) | Universal serial bus control circuit | |
JP2007265108A (en) | Bus bridge | |
KR102519484B1 (en) | Peripheral component interconnect express interface device and system including the same | |
JP5482306B2 (en) | Data transfer control device and electronic device | |
JP3701762B2 (en) | Data transfer system | |
CN116775390A (en) | Interface protocol conversion verification system and method, electronic equipment and storage medium | |
KR100470898B1 (en) | CAN communication device | |
WO2024092193A1 (en) | Bus transaction security in multi-chip module | |
JP2002094512A (en) | Fault detection method and interface unit and cell switch unit |