JP2007026196A - Usb test monitor circuit - Google Patents

Usb test monitor circuit Download PDF

Info

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
Application number
JP2005208694A
Other languages
Japanese (ja)
Inventor
Takashi Tomizuka
隆 冨塚
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2005208694A priority Critical patent/JP2007026196A/en
Publication of JP2007026196A publication Critical patent/JP2007026196A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a USB test monitor circuit for monitoring interface signals between a physical layer transmitting/receiving differential signals flowing in a USB bus and a serial interface engine conducting communication of the physical layer, for identifying a transaction flowing in the USB bus, and for evaluating validity of a part independent of the physical layer without using an additional measurement apparatus. <P>SOLUTION: The USB test monitor circuit is provided with a state machine 102 for identifying the transaction of the differential signals flowing in the USB bus based on a UTMI signal between a PHY transmitting/receiving the differential signals flowing in the USB bus and an SIE conducting communication of the PHY; a data generation part 101 for generating data signals flowing in the USB bus based on the UTMI signal; and a parallel control part 14 for outputting in parallel the transaction identification result identified in the state machine 102 and the data signal generated in the data generation part 101. <P>COPYRIGHT: (C)2007,JPO&INPIT

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には、新規に高価な測定器を準備しなくても、物理層に依存しない部分のデバッグをおこなうことができる高速シリアルコントローラが提案されている。
特開2004−271282号公報
Therefore, Patent Document 1 proposes a high-speed serial controller that can debug a portion that does not depend on the physical layer without preparing a new expensive measuring instrument.
Japanese Patent Application Laid-Open No. 2004-271282

しかしながら、上記特許文献1では、テストモード時にPHY回路とLINK回路との間の信号をシリアルI/Fに出力し、PHYに依存しない回路部分の正当性を評価できるように構成されてものであり、高速シリアルバスを流れるトランザクションを識別しようとする場合には、トランザクションを識別する手段を別途用意する必要がある。   However, in the above-mentioned Patent Document 1, a signal between the PHY circuit and the LINK circuit is output to the serial I / F in the test mode so that the validity of the circuit portion independent of the PHY can be evaluated. In order to identify a transaction flowing through the high-speed serial bus, it is necessary to prepare a means for identifying the transaction.

そこで、本発明は、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 claim 1 acquires a first interface signal between a physical layer that transmits and receives a differential signal flowing through a USB bus and a serial interface engine that communicates with the physical layer. First interface signal acquisition means, transaction identification means for identifying a differential signal transaction flowing through the USB bus based on the first interface signal, and a data signal flowing through the USB bus based on the first interface signal And a 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. And

また、請求項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 claim 3 is the invention of claim 2, further comprising a transaction counter that counts the number of occurrences of each type of transaction identified by the transaction identification means based on the flag signal. To do.

また、請求項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 printer controller 1 provided with a USB test monitor circuit 100 according to the present invention.

プリンタコントローラ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 printer controller 1 includes a printer controller ASIC (= Application Specific Integrated Circuit) 10, a CPU (Central Processing Unit) 20, a transmission / reception buffer memory 30, and a parallel I / F (interface). The printer controller ASIC 10 includes a USB control unit that performs USB control between the USB 2 on the host side (hereinafter referred to as “USB host 2”) and the USB of the printer controller ASIC 10, and a USB test monitor circuit. 100 and a test register 17.

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 SIE 12 that is a serial interface engine, a DMA control unit 13 that performs DMA (= Direct Memory Access) control, a parallel control unit 14, and an interrupt control unit 15. The USB test monitor circuit 100 includes a data generation unit 101, a state machine 102, a transaction counter 103, an error counter 104, an operation selection unit 105, a first selector 106, A second selector 107 and a third selector 108 are provided.

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 SIE 12 receives a packet that does not require CPU processing, the SIE 12 automatically returns the packet to the PHY 11. When the SIE 12 receives a packet that requires CPU processing, the SIE 12 sends an interrupt signal to the interrupt control unit 15. Output and cause interrupt control, and send a packet based on CPU processing to the PHY 11 (control transfer).

DMA制御部13は、CPU20を介さずにUSBホスト2側とメモリ30との間で直接データ転送を行なうための制御を行う。   The DMA control unit 13 performs control for direct data transfer between the USB host 2 side and the memory 30 without using the CPU 20.

調停部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 DMA control unit 13 outputs a DMA request to the arbitration unit 16 based on a transfer request signal output from the SIE 12 to the DMA control unit 13. The arbitration unit 16 arbitrates the output order of data between the memory 30 and an external memory (not shown) based on the DMA request from the DMA control unit 13, so that a large amount of data is transferred between the memory 30 and the external memory (not shown). Sent and received.

パラレル制御部14は、USBテストモニタ回路100の第2セレクタ107及び第3セレクタ108に制御信号を出力し、第2セレクタ107及び第3セレクタ108を介してパラレルデータがパラレルI/F40に転送されるように制御する。   The parallel control unit 14 outputs control signals to the second selector 107 and the third selector 108 of the USB test monitor circuit 100, and the parallel data is transferred to the parallel I / F 40 via the second selector 107 and the third selector 108. To control.

USBテストモニタ回路100は、USB制御部のPHY11とSIE12との間のインタフェース信号であるUTMI(USB Transceiver Macrocell Interface)信号をモニタし、データ有効時のPID(=Packet IDentifier:パケット識別子)によってトランザクションの種別を認識し、各種別毎のトランザクション動作の発生回数が検知できるように構成されている。   The USB test monitor circuit 100 monitors a UTMI (USB Transceiver Macrocell Interface) signal, which is an interface signal between the PHY 11 and the SIE 12 of the USB control unit, and uses a PID (= Packet IDentifier: packet identifier) when data is valid. It is configured to recognize the type and detect the number of occurrences of transaction operations for each type.

USBテストモニタ回路100のデータ生成部101は、USB制御部のPHY11とSIE12との間のUTMI信号に基づき8bitのデータを生成し、生成したデータはUSB制御部のパラレル制御部14の指示信号に基づき第1セレクタ106及び第2セレクタ107を介してパラレルデータとなってパラレルI/F40へ転送される。   The data generation unit 101 of the USB test monitor circuit 100 generates 8-bit data based on the UTMI signal between the PHY 11 and the SIE 12 of the USB control unit, and the generated data is used as an instruction signal of the parallel control unit 14 of the USB control unit. Based on the first selector 106 and the second selector 107, the parallel data is transferred to the parallel I / F 40.

なお、SIE12からPHY11に出力される信号は、例えばDataIn(8bit)、TxValid(1bit)、TxReady(1bit)等であり、PHY11からSIE12に出力される信号は、例えばDataOut(8bit)、RxActive(1bit)、RxValid(1bit)等である。   The signals output from the SIE 12 to the PHY 11 are, for example, DataIn (8 bits), TxValid (1 bit), TxReady (1 bit), and the signals output from the PHY 11 to the SIE 12 are, for example, DataOut (8 bits), RxActive (1 bit). ), RxValid (1 bit), and the like.

ステートマシン102は、PHY11とSIE12との間のUTMI信号をモニタし、データ有効時のPIDに基づきトランザクションの種別を認識する。   The state machine 102 monitors the UTMI signal between the PHY 11 and the SIE 12, and recognizes the type of transaction based on the PID when the data is valid.

また、ステートマシン102は、トランザクションの動作を示すフラグを「High」または「1」、トランザクションの動作が終了してIDLE状態に戻る時にフラグを「Low」または「0」に設定し、TxValid、TxReadyがどちらも「High」または「1」の時にDataInが有効であると認識し、RxActiveとRxValidがどちらも「High」または「1」の時にDataOutが有効であると認識する。   Further, the state machine 102 sets the flag indicating the transaction operation to “High” or “1”, and sets the flag to “Low” or “0” when the transaction operation ends and returns to the IDLE state, and TxValid, TxReady When both are “High” or “1”, it is recognized that DataIn is valid, and when both RxActive and RxValid are “High” or “1”, it is recognized that DataOut is valid.

ステートマシン102により設定され、出力されるフラグ値は、テストモード時にパラレルI/F40の制御信号ラインから制御信号として出力される。
トランザクションカウンタ103は、読み込み、クリアが可能なカウンタであり、トランザクション種別毎の発生回数をカウントする。
The flag value set and output by the state machine 102 is output as a control signal from the control signal line of the parallel I / F 40 in the test mode.
The transaction counter 103 is a counter that can be read and cleared, and counts the number of occurrences for each transaction type.

動作選択部105は、トランザクションカウンタ103でカウントする対象のトランザクション種別を選択指定する。   The operation selection unit 105 selects and designates a target transaction type to be counted by the transaction counter 103.

なお、テスト終了時の任意のタイミングでトランザクションカウンタ102のカウント値を読み取ることで、動作選択部105により選択指定された対象トランザクションの発生回数を読み取ることができる。   Note that by reading the count value of the transaction counter 102 at an arbitrary timing at the end of the test, the number of occurrences of the target transaction selected and designated by the operation selection unit 105 can be read.

このトランザクションカウンタ103は、テストモードがOFFの場合、すなわちテストモードでない通常動作モードの場合でも動作可能であり、通常動作時にUSBバス上のトランザクション、ハンドシェイク等の発生回数をカウントすることで(例えば、NYETハンドシェイクの発生回数が分かれば受信バッファFullの度合いなどの目安を知ることができる。)USBバスを流れるトランザクションの動作状態をモニタすることができる。   This transaction counter 103 can operate even when the test mode is OFF, that is, in the normal operation mode that is not the test mode, and by counting the number of occurrences of transactions, handshakes, etc. on the USB bus during normal operation (for example, If the number of occurrences of the NYET handshake is known, it is possible to know a guideline such as the degree of the reception buffer Full.) It is possible to monitor the operation state of the transaction flowing through the USB bus.

第1セレクタ106及び第2セレクタ107は、USBテストモニタ回路100内で有効なデータラインを選択し、第3セレクタ108は、USBテストモニタ回路100内で有効な制御ラインを選択する。   The first selector 106 and the second selector 107 select a valid data line in the USB test monitor circuit 100, and the third selector 108 selects a valid control line in the USB test monitor circuit 100.

具体的には、第1セレクタ106は、テストモード時に、テストレジスタ17から転送されるセレクト信号によって、データ生成部101で生成されて転送されたデータ信号もしくはSIE12とDMA制御部13との間で発生するデータ信号のうちの有効なデータ信号を選択して第2セレクタ107へ転送する。   Specifically, in the test mode, the first selector 106 generates a data signal generated by the data generation unit 101 and transferred between the SIE 12 and the DMA control unit 13 according to a select signal transferred from the test register 17. A valid data signal is selected from the generated data signals and transferred to the second selector 107.

また、第2セレクタ107は、プリンタコントローラASIC10のテストモード時は、Testpin(端子)やテストレジスタ17から入力されるセレクト信号によって、第1セレクタ106で選択されて転送されたデータ信号(データ生成部101で生成されて転送されたデータ信号もしくはSIE12とDMA制御部13との間で発生するデータ信号)を選択し、通常動作時は、パラレル制御部14から転送されるデータ信号を選択してパラレルI/F40へ転送する。   The second selector 107 is a data signal (data generation unit) selected and transferred by the first selector 106 in accordance with a select signal input from a test pin (terminal) or the test register 17 when the printer controller ASIC 10 is in the test mode. The data signal generated and transferred at 101 or the data signal generated between the SIE 12 and the DMA control unit 13 is selected, and during normal operation, the data signal transferred from the parallel control unit 14 is selected to be parallel. Transfer to I / F 40.

エラーカウンタ104は、読み込み、クリアが可能なカウンタであり、ステートマシン102が認識したPIDが何れのPIDタイプ(例えば、トークン、ハンドシェイク、特殊等)にも該当しない場合は、エラーパルス信号をパラレルI/F40に出力するとともに、カウント値をカウントアップする。   The error counter 104 is a counter that can be read and cleared. When the PID recognized by the state machine 102 does not correspond to any PID type (for example, token, handshake, special, etc.), an error pulse signal is parallelized. While outputting to the I / F 40, the count value is counted up.

なお、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 / F 40 operates as a 60 MHz synchronous signal.

また、パラレルI/F40のデータバスはテストモードに連動した出力方向となる。   In addition, the data bus of the parallel I / F 40 has an output direction linked to the test mode.

第3セレクタ108は、プリンタコントローラASIC10のテストモード時は、テストレジスタ17またはTestpin(端子)によって、ステートマシン102から転送されるフラグ値を示す信号を選択し、通常動作時は、パラレル制御部14から転送される制御信号を選択してパラレルI/F40へ転送する。   The third selector 108 selects a signal indicating a flag value transferred from the state machine 102 by the test register 17 or Testpin (terminal) in the test mode of the printer controller ASIC 10, and in the normal operation, the parallel control unit 14. Is selected and transferred to the parallel I / F 40.

図2は、ステートマシン102でモニタされるPIDとフラグの種類及びカウント対象動作の一例を示すPID一覧表200である。   FIG. 2 is a PID list 200 showing an example of PIDs and flag types monitored by the state machine 102 and counting target operations.

なお、ステートマシン102は、DATA0、DATA1をモニタしない。   Note that the state machine 102 does not monitor DATA0 and DATA1.

PID一覧表20に示すように、PIDタイプには「トークン」、「ハンドシェイク」、「特殊」等があり、トランザクションは「トークン」または「特殊」パケットで始まり各PID名で示されるフェーズへ遷移する。   As shown in the PID list 20, the PID type includes “token”, “handshake”, “special”, etc., and the transaction starts with a “token” or “special” packet and transitions to a phase indicated by each PID name. To do.

具体的には、「トークン」には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 state machine 102 sets an out flag indicating an OUT transaction operation to “High” or “1”, and the OUT transaction Is issued by the transaction counter 102.

ホスト側は、「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 state machine 102 sets the in flag indicating the IN transaction operation to “High” or “1”, and the number of times the IN transaction is issued is the transaction counter It is counted by 102.
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 state machine 102 sets the setup flag indicating the SETUP transaction operation to “High” or “1”, and the number of times the SETUP transaction is issued is a transaction. It is counted by the counter 102.

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 state machine 102 sets a sof flag indicating the SOF operation to “High” or “1”. Set to.

図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 SIE 12 during the SETUP transaction operation, a flag signal generated by the state machine 102, and a data signal output from the parallel I / F 40.

図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 test monitor circuit 100 monitors a UTMI signal that is an interface signal between the PHY 11 and the SIE 12 of the USB control unit, and an RxActive signal 302 and an RxValid signal 304 output from the PHY 11 to the SIE 12 are displayed. When both are “High” or “1”, it is determined that the DataOut “7: 0” signal 303 is valid, and the transaction is performed based on the PID of the DataOut “7: 0” signal 303 (in this case, “SETUP”). Is recognized as a SETUP transaction.

また、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 state machine 102, and the SETUP transaction counter signal 310 in which the SETUP count value of the transaction counter 103 is incremented. Is output.

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 / F 40, and the DataOut “7: 0” signal 303 including the PID, Data, and Data is The data signal (parallel I / F) 309a is output via the selector 106, the second selector 107, and the parallel I / F 40.

また、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 TxValid signal 305 and the TxReady signal 307 output from the SIE 12 to the PHY 11 are both “High” or “1”, it is determined that the DataIn “7: 0” signal 306 is valid, and the DataIn “7: Based on the PID of “0” signal 306 (in this case, “SETUP”), the transaction is recognized as a SETUP transaction, and when both TxValid 305 and TxReady signal 307 become “Low”, the SETUP transaction operation ends, and the IDLE state is entered. A SETUP flag signal 308 in which the SETUP flag is set to “Low” or “1” by determining that it has returned is output via the third selector 10 and the parallel I / F 40.

このように各信号が送受信される動作においてステートマシン102がPHY11とSIE12との間のUTMI信号をモニタし、データ有効時のPIDに基づくトランザクション種別を認識する動作の詳細について図4乃至図8の流れ図を参照し説明する。   As described above, the state machine 102 monitors the UTMI signal between the PHY 11 and the SIE 12 and recognizes the transaction type based on the PID when the data is valid. This will be described with reference to a flowchart.

図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 state machine 102 of the USB test monitor circuit 100 provided in the printer controller 1 monitors the UTMI signal between the PHY 11 and the SIE 12, and RxActive, which is a signal output from the PHY 11 to the SIE 12. When both RxValid are “High” or “1” (YES in step S401), it is determined that DataOut “7: 0” is valid and is transmitted from the host side (USB host 2 in this embodiment). The token ID or special packet of “SETUP”, “IN”, “OUT”, “PING”, or “SOF” is identified as the PID included in DataOut “7: 0”.

具体的には、ステートマシン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 state machine 102 If the PID of DataOut “7: 0” matches the PID of the “SETUP” token packet (YES in step S402), the token packet transmitted from the host side is set to “SETUP”. Recognizing the token packet, the SETUP flag is incremented by “1”, and the SETUP count value of the transaction counter 103 is incremented by +1.

また、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 transaction counter 103 is incremented by +1.

また、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 transaction counter 103 is incremented by +1.

また、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 transaction counter 103 is incremented by +1.

また、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 state machine 102 sets an error flag. “1”, the count value of the error counter is incremented by +1.

なお、ホスト側からデバイス側(本実施例ではプリンタコントローラ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 state machine 102 indicates that both TxValid and TxReady, which are signals output from the SIE 12 to the PHY 11, are “High”. Alternatively, when “1”, it is determined that DataIN “7: 0” is valid (YES in step S501), and the content of DataIN “7: 0” returned from the device side to the host side is “ACK” handshake. It is determined whether or not there is (step S502). If “ACK”, the SETUP flag is set to “0” (YES in step S502).

また、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 state machine 102 indicates that both TxValid and TxReady, which are signals output from the SIE 12 to the PHY 11, are “ It is determined that DataIN “7: 0” is valid when “High” or “1” (YES in step S601), and the content of DataIN “7: 0” returned from the device side to the host side is “NAK” or It is determined whether or not each “STALL” handshake, and each flag and counter value is counted up based on the contents of each handshake.

具体的には、デバイス側からホスト側へ応答される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 state machine 102 sets the IN flag to “0”. Then, after the count value of NAK (IN) is incremented by +1 by the transaction counter 103, the transaction transits from the IN transaction to the IDLE state (step S606).

また、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 state machine 102 sets the IN flag to “0”, and the transaction counter 103 counts STALL (IN). After the value is incremented by +1, the IN transaction transits to the IDLE state (step S606).

また、ステートマシン102は、PHY11からSIE12に出力される信号であるRxActive、RxValidがどちらも「High」または「1」の時にDataOUT「7:0」が有効であると判断し(ステップS602でYES)、ホスト側からデバイス側へ送信されるDataOUT「7:0」の内容に基づき各フラグ及びカウンタ値をカウントアップする。   In addition, the state machine 102 determines that DataOUT “7: 0” is valid when both RxActive and RxValid, which are signals output from the PHY 11 to the SIE 12, are “High” or “1” (YES in Step S602). ) Each flag and counter value are counted up based on the contents of DataOUT “7: 0” transmitted from the host side to the device side.

具体的には、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 state machine 102, and then the IDLE state from the IN transaction. (Step S606).

また、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 state machine 102 sets the IN flag to “0”, the error flag to “1”, and the error counter 104 Thus, after the count value of the error count is incremented by +1, the transition from the IN transaction to the IDLE state is made (step S606).

図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 state machine 102 has both TxValid and TxReady, which are signals output from the PHY 11 to the SIE 12, being “High” or “ When “1”, it is determined that DataIN “7: 0” is valid (YES in step S701), and each flag and counter value is counted based on the content of DataIN “7: 0” returned from the device side to the host side. Up.

具体的には、ホスト側からデバイス側へ送信される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 state machine 102 sets the OUT flag to “0”. Then, the transition from the OUT transaction to the IDLE state is made (step S706).

また、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 state machine 102 sets the OUT flag to “0” and the transaction counter 103 counts the STALL (OUT). After the value is counted up by +1, the transition from the OUT transaction to the IDLE state is made (step S706).

また、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 state machine 102 sets the OUT flag to “0” and the transaction counter 103 counts the NAK (OUT). After the value is counted up by +1, the transition from the OUT transaction to the IDLE state is made (step S706).

また、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 state machine 102 sets the OUT flag to “0” and the transaction counter 103 counts NYET (OUT). After the value is counted up by +1, the transition from the OUT transaction to the IDLE state is made (step S706).

また、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 state machine 102 sets the OUT flag to “ “0” and the error flag are set to “1”, and the error counter value is incremented by +1 by the error counter 104. Then, the OUT transaction transits to the IDLE state (step S706).

図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 state machine 102 indicates that both TxValid and TxReady, which are signals output from the PHY11 to the SIE12, are “High”. "Or" 1 ", each flag and counter value are counted up based on the contents of DataIN" 7: 0 ".

具体的には、ホスト側からデバイス側へ送信される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 state machine 102 sets the PING flag to “0” and the transaction counter 103 counts the STALL (PING). After the value is incremented by +1, the PING transaction transits to the IDLE state (step S805).

また、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 state machine 102 sets the PING flag to “0” and the transaction counter 103 counts the NAK (PING). After the value is incremented by +1, the PING transaction transits to the IDLE state (step S805).

また、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 state machine 102 sets the PING flag to “0” and an error. After the flag is set to “1” and the count value of the error counter 104 is incremented by +1 by the transaction counter 103, the PING transaction is changed to the IDLE state (step S805).

以上説明したように、本発明に係わるUSBテストモニタ回路100は、PHY11とSIE12を内蔵するプリンタコントローラASIC10のUSB動作評価を行うにあたって、既存の評価用測定器(ロジックアナライザ)を用いてパラレルI/Fに出力したインタフェース信号をプリンタコントローラASIC10端子で計測することでUSBバスを流れるトランザクションをモニタすることができる。   As described above, the USB test monitor circuit 100 according to the present invention uses the existing measuring instrument (logic analyzer) for parallel I / O when performing USB operation evaluation of the printer controller ASIC 10 incorporating the PHY 11 and SIE 12. Transactions flowing through the USB bus can be monitored by measuring the interface signal output to F at the printer controller ASIC 10 terminal.

また、PHY11とSIE12との間のインタフェース信号であるUTMI信号とは別に、各トランザクションを識別する識別フラグの信号を出力することで、動作しているトランザクションの種別を容易に確認することができる。   In addition to the UTMI signal that is an interface signal between the PHY 11 and the SIE 12, by outputting an identification flag signal for identifying each transaction, it is possible to easily confirm the type of the transaction that is operating.

本発明に係わるUSBテストモニタ回路100が設けられたプリンタコントローラ1の一例を概略的に示した構成図1 is a block diagram schematically showing an example of a printer controller 1 provided with a USB test monitor circuit 100 according to the present invention. PIDの種類の一例を示すPID一覧表200PID list 200 showing an example of PID types SETUPトランザクション動作時のステートマシン102が生成するフラグ信号とデータバス信号の一例を示す図The figure which shows an example of the flag signal and data bus signal which the state machine 102 produces | generates at the time of a SETUP transaction operation | movement ステートマシン102がトランザクションの種別を認識し、各種別毎のトランザクション動作へ遷移する動作を示す流れ図A flow chart showing an operation in which the state machine 102 recognizes a transaction type and transitions to a transaction operation for each type. SETUPトランザクション動作の流れ図Flow chart of SETUP transaction operation INトランザクション動作の流れ図Flow chart of IN transaction operation OUTランザクション動作の流れ図OUT transaction flow diagram PINGランザクション動作の流れ図Flow chart of PING transaction operation

符号の説明Explanation of symbols

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) Control Unit 14 Parallel Control Unit 15 Interrupt Control Unit 16 Arbitration Unit 17 Test Register 20 CPU (Central Processing Unit)
30 memory (transmission / reception buffer)
40 Parallel I / F (= Interface: interface)
100 USB Test Monitor Circuit 101 Data Generation Unit 102 State Machine 103 Transaction Counter 104 Error Counter 105 Operation Selection Unit 106 First Selector 107 Second Selector 108 Third Selector 200 PID List 301 Clock Signal 302 RxActive Signal 303 DataOut “7: 0” ”Signal 304 RxValid signal 305 TxValid signal 306 DataIn“ 7: 0 ”signal 307 TxReady signal 308 SETUP flag signal 309a Data signal (parallel I / F)
309b Data signal (parallel I / F)
310 SETUP transaction counter signal

Claims (4)

USBバスを流れる差動信号を送受信する物理層と前記物理層の通信を行うシリアル・インタフェース・エンジンとの間の第1のインタフェース信号を取得する第1インタフェース信号取得手段と、
前記第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.
前記シリアル・インタフェース・エンジンとDMA制御回路との間の第2のインタフェース信号を取得する第2インタフェース信号取得手段と、
前記第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.
JP2005208694A 2005-07-19 2005-07-19 Usb test monitor circuit Pending JP2007026196A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (5)

* Cited by examiner, † Cited by third party
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