[go: up one dir, main page]

JP7516974B2 - DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE - Google Patents

DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE Download PDF

Info

Publication number
JP7516974B2
JP7516974B2 JP2020137597A JP2020137597A JP7516974B2 JP 7516974 B2 JP7516974 B2 JP 7516974B2 JP 2020137597 A JP2020137597 A JP 2020137597A JP 2020137597 A JP2020137597 A JP 2020137597A JP 7516974 B2 JP7516974 B2 JP 7516974B2
Authority
JP
Japan
Prior art keywords
information
access
log
unit
transition
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.)
Active
Application number
JP2020137597A
Other languages
Japanese (ja)
Other versions
JP2022033610A (en
Inventor
修士 市村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2020137597A priority Critical patent/JP7516974B2/en
Publication of JP2022033610A publication Critical patent/JP2022033610A/en
Application granted granted Critical
Publication of JP7516974B2 publication Critical patent/JP7516974B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は電子機器用デバイス、電子機器用デバイスの制御方法および電子機器用デバイスの制御プログラムに関する。 The present invention relates to a device for electronic equipment, a control method for an electronic equipment device, and a control program for an electronic equipment device.

近年、CPU(Central Processing Unit)インタフェースを有し、CPUがアクセス可能なモジュールを持つ半導体デバイスが様々な電子機器に使用されている。電子機器の一例として、例えば、コピー機等の画像形成装置が挙げられる。 In recent years, semiconductor devices that have a CPU (Central Processing Unit) interface and modules that can be accessed by the CPU are used in various electronic devices. One example of an electronic device is an image forming device such as a copy machine.

こうした電子機器に障害が発生した場合の解析において、従来行われている一般的な方法では、ICE(In Circuit Emulator)等のデバッグ装置が使用される。デバッグ装置により、CPUのアクセス内容をトレースし、あるいは、レジスタに所望の値を設定することで、障害の発生原因の究明が可能になる。 When a fault occurs in such electronic devices, the conventional method for analyzing the fault is to use a debugging device such as an In Circuit Emulator (ICE). The debugging device can be used to trace the access contents of the CPU or to set desired values in registers, making it possible to determine the cause of the fault.

ただし、デバッグ装置により障害の発生原因を究明する場合、デバッグ装置を解析場所に持ち込み、解析対象の電子機器に接続するため、解析するまでの準備に手間が掛かる。さらに、CPUが電子機器に搭載されるデバイスに内蔵されている場合、CPUインタフェースにデバッグ装置を接続できないため、デバッグ装置による解析ができなかった。 However, when using a debugging device to identify the cause of a fault, the debugging device must be brought to the analysis location and connected to the electronic device being analyzed, which requires time-consuming preparations before analysis. Furthermore, if the CPU is built into a device mounted on the electronic device, it is not possible to connect the debugging device to the CPU interface, making analysis using the debugging device impossible.

このような問題の解決するため、CPUからレジスタへのアクセスをモニタし、検知されたレジスタアクセスのログ情報を作成し、作成したログを外部に出力可能に内蔵メモリへ保存する手法が知られている(例えば、特許文献1参照)。 To solve this problem, a method is known in which accesses from the CPU to a register are monitored, log information of detected register accesses is created, and the created log is stored in an internal memory so that it can be output to the outside (see, for example, Patent Document 1).

また、プロセッサと、プロセッサの動作ログを記憶する主記憶装置と、PCI(Peripheral Component Interconnect) Expressバスを介してプロセッサに接続されるログ採取装置とを有する演算装置が知られている。ログ採取装置は、プロセッサから所定の周期で出力される信号を監視するウォッチドッグタイマと、DMAC(Direct Memory Access Controller)と、記憶部とを有する。 There is also known a computing device that has a processor, a main memory device that stores the processor's operation log, and a log collection device that is connected to the processor via a PCI (Peripheral Component Interconnect) Express bus. The log collection device has a watchdog timer that monitors a signal output from the processor at a predetermined interval, a DMAC (Direct Memory Access Controller), and a storage unit.

ログ採取装置は、プロセッサが動作不能であることをウォッチドッグタイマにより検出した場合、DMACを使用して主記憶装置に保持された動作ログを記憶部に高速に転送する。これにより、プロセッサが動作不能な場合にも動作ログを取得可能にする(例えば、特許文献2参照)。 When the log collection device detects by the watchdog timer that the processor is inoperable, it uses the DMAC to quickly transfer the operation log stored in the main memory to the storage unit. This makes it possible to obtain the operation log even if the processor is inoperable (see, for example, Patent Document 2).

しかしながら、ログ採取装置は、PCI Expressのリンク情報をログとして取得しない。このため、DMACが主記憶装置から動作ログを取得できない場合、ログ採取装置は、その原因がPCI Expressのリンクダウンによるものなのかを切り分けできなかった。PCI Expressのリンク情報をログとして取得するためには、リンク情報等を出力可能な外部端子にデバッグ装置を接続し、デバッグ装置が取得したリンク情報を解析する必要があり、非常に手間が掛かっていた。 However, the log collection device does not collect PCI Express link information as a log. Therefore, if the DMAC cannot collect the operation log from the main memory device, the log collection device cannot determine whether the cause is a PCI Express link down. In order to collect PCI Express link information as a log, it is necessary to connect a debugging device to an external terminal capable of outputting link information, etc., and analyze the link information collected by the debugging device, which is very time-consuming.

開示の技術は、上記の課題に鑑みてなされたものであり、プロセッサとの間で通信できない場合の原因が通信インタフェースであるかを、ログを参照して容易に判断することを目的とする。 The disclosed technology has been developed in consideration of the above-mentioned problems, and aims to easily determine, by referring to logs, whether the communication interface is the cause of a failure to communicate with the processor.

上記技術的課題を解決するため、本発明の一形態の電子機器用デバイスは、プロセッサに接続され、複数の動作状態を有する通信インタフェースと、前記複数の動作状態の遷移と、前記遷移の検出時の前記プロセッサと前記通信インタフェースとの接続状態を示すリンク情報とを検出する状態検出部と、前記プロセッサによる記憶部のアクセスを検出するアクセス検出部と、前記状態検出部が検出した前記遷移を示す遷移情報と前記リンク情報とを含むログを生成し、前記アクセス検出部が検出した前記アクセスを示すアクセス情報を含むログを生成するログ生成部と、を有することを特徴とする。 In order to solve the above technical problems, one embodiment of the present invention is a device for electronic equipment, characterized in that it comprises a communication interface connected to a processor and having a plurality of operating states, a state detection unit that detects transitions of the plurality of operating states and link information indicating a connection state between the processor and the communication interface at the time of detecting the transition, an access detection unit that detects access to a storage unit by the processor, and a log generation unit that generates a log including the transition information and the link information indicating the transition detected by the state detection unit, and generates a log including access information indicating the access detected by the access detection unit.

プロセッサとの間で通信できない場合の原因が通信インタフェースであるかを、ログを参照して容易に判断することができる。 If communication with the processor is not possible, you can easily determine whether the communication interface is the cause by referring to the log.

本発明の第1の実施形態における電子機器用デバイスの一例を示すブロック図である。1 is a block diagram showing an example of an electronic device according to a first embodiment of the present invention. 図1のデバッグコントローラの動作の一例を示すフロー図である。2 is a flow diagram showing an example of an operation of the debug controller of FIG. 1; 図1のデバッグコントローラの動作の別の例を示すフロー図である。10 is a flow diagram illustrating another example of the operation of the debug controller of FIG. 1. 本発明の第2の実施形態における電子機器用デバイスの一例を示すブロック図である。FIG. 11 is a block diagram showing an example of an electronic device according to a second embodiment of the present invention. PCIeのリンク状態のログのフォーマットの一例を示す説明図である。FIG. 11 is an explanatory diagram illustrating an example of a format of a PCIe link state log. レジスタアクセスのログのフォーマットの一例を示すブロック図である。FIG. 13 is a block diagram showing an example of a format of a log of register accesses. 本発明の第3の実施形態における電子機器用デバイスの一例を示すブロック図である。FIG. 11 is a block diagram showing an example of an electronic device according to a third embodiment of the present invention. 本発明の第4の実施形態における電子機器用デバイスの一例を示すブロック図である。FIG. 13 is a block diagram showing an example of an electronic device according to a fourth embodiment of the present invention.

以下、図面を参照して実施の形態の説明を行う。なお、各図面において、同一構成部分には同一符号を付し、重複した説明を省略する場合がある。以下では、信号を示す符号は、信号線を示す符号としても使用される。 The following describes the embodiments with reference to the drawings. Note that in each drawing, the same components are given the same reference numerals, and duplicate explanations may be omitted. Below, reference numerals indicating signals are also used to indicate signal lines.

(第1の実施形態)
図1は、第1の実施形態における電子機器用デバイスの一例を示すブロック図である。図1に示す電子機器用デバイス100は、PCI ExpressバスおよびPCI Expressのルートコンプレックス300を介してCPU200に接続される。PCI Expressは、PCIeとも称される。CPU200と電子機器用デバイス100とのは、PCIeバスを介して通信を実施可能である。CPU200は、プロセッサの一例である。
First Embodiment
Fig. 1 is a block diagram showing an example of an electronic device according to a first embodiment. The electronic device 100 shown in Fig. 1 is connected to a CPU 200 via a PCI Express bus and a PCI Express root complex 300. PCI Express is also called PCIe. The CPU 200 and the electronic device 100 can communicate with each other via the PCIe bus. The CPU 200 is an example of a processor.

電子機器用デバイス100は、PCIeの物理層インタフェース(PHY)10、PCIeのエンドポイント20およびデバッグコントローラ30を有する。PHY10は、ルートコンプレックス300およびPCIeバスを介してCPU200から制御信号およびデータ信号等を受信し、受信した信号をエンドポイント20に転送する。なお、図1では、エンドポイント20は、デバッグコントローラ30のみに接続されているが、実際には、様々な機器と接続可能である。PHY10は、通信インタフェースの一例であり、PCI Expressインタフェースの一例である。 The electronic device device 100 has a PCIe physical layer interface (PHY) 10, a PCIe endpoint 20, and a debug controller 30. The PHY 10 receives control signals, data signals, etc. from the CPU 200 via the root complex 300 and the PCIe bus, and transfers the received signals to the endpoint 20. Note that in FIG. 1, the endpoint 20 is connected only to the debug controller 30, but in reality, it can be connected to various devices. The PHY 10 is an example of a communication interface and an example of a PCI Express interface.

エンドポイント20は、PCIeリンクの管理、エラーの検出等を行う。エンドポイント20は、LTSSM(Link Training and Status State Machine)のステートを示すLTSSM情報、PCIeリンクの状態を示すリンク情報、およびCPU200が発行したレジスタアクセス信号を出力する。リンク情報は、CPU200とPHY10との接続状態を示す情報である。LTSSM情報およびリンク情報は、デバッグコントローラ30に供給される。レジスタアクセス信号は、デバッグコントローラ30および電子機器用デバイス100の外部に供給される。 The endpoint 20 manages the PCIe link, detects errors, etc. The endpoint 20 outputs LTSSM information indicating the state of the LTSSM (Link Training and Status State Machine), link information indicating the state of the PCIe link, and a register access signal issued by the CPU 200. The link information is information indicating the connection state between the CPU 200 and the PHY 10. The LTSSM information and the link information are supplied to the debug controller 30. The register access signal is supplied to the debug controller 30 and to the outside of the electronic device 100.

CPU200から出力されるレジスタアクセス信号は、例えば、システムSYSに搭載される図示しない各種機能モジュールに含まれるレジスタにアクセスするために使用される。レジスタは、記憶部の一例である。なお、各種機能モジュールは、電子機器用デバイス100に搭載されてもよい。各種機能モジュールは、レジスタの設定値に応じて動作モード等が切り替わる。なお、CPU200は、レジスタアクセス信号により、レジスタへの値の設定だけでなく、レジスタに設定された値を読み出すことができる。 The register access signal output from the CPU 200 is used, for example, to access registers included in various functional modules (not shown) mounted in the system SYS. The registers are an example of a storage unit. The various functional modules may be mounted in the electronic device 100. The various functional modules switch operating modes, etc., depending on the setting value of the register. The CPU 200 can use the register access signal not only to set values in the registers, but also to read values set in the registers.

デバッグコントローラ30は、状態検出部31、レジスタアクセス検出部32、調停部33、ログ生成部34およびログ保持部35を有する。状態検出部31、レジスタアクセス検出部32、調停部33およびログ生成部34は、ハードウェアにより実現されてもよく、ソフトウェアにより実現されてもよい。ソフトウェアにより実現される場合、状態検出部31、レジスタアクセス検出部32、調停部33およびログ生成部34は、デバッグコントローラ30に搭載される図示しないCPU等のコンピュータが実行する制御プログラムにより実現される。そして、制御プログラムの実行により、電子機器用デバイス100の制御方法が実現される。 The debug controller 30 has a state detection unit 31, a register access detection unit 32, an arbitration unit 33, a log generation unit 34, and a log retention unit 35. The state detection unit 31, the register access detection unit 32, the arbitration unit 33, and the log generation unit 34 may be realized by hardware or by software. When realized by software, the state detection unit 31, the register access detection unit 32, the arbitration unit 33, and the log generation unit 34 are realized by a control program executed by a computer such as a CPU (not shown) mounted on the debug controller 30. Then, the control program is executed to realize a control method for the electronic device 100.

状態検出部31は、LTSSM情報に基づいて、LTSSMステートの遷移を検出し、検出した遷移を示す遷移情報とリンク情報とを含む変化情報を調停部33に出力する。LTSMMステートは、LTSSMが取り得る複数の動作状態の一例である。例えば、状態検出部31は、LTSSMステートおよびLTSSMサブステートの両方の変化を検出した場合、遷移前のステートの情報および遷移後のステートの情報を含む遷移情報とリンク情報とを含む変化情報を調停部33に出力する。 The state detection unit 31 detects a transition of the LTSSM state based on the LTSSM information, and outputs change information including link information and transition information indicating the detected transition to the arbitration unit 33. The LTSMM state is an example of a plurality of operating states that the LTSSM can take. For example, when the state detection unit 31 detects changes in both the LTSSM state and the LTSSM substate, it outputs change information including link information and transition information including information on the state before the transition and information on the state after the transition to the arbitration unit 33.

レジスタアクセス検出部32は、エンドポイント20から出力されるレジスタアクセス信号に基づいてレジスタアクセスの発生を検出する。レジスタアクセス検出部32は、レジスタアクセスの発生を検出した場合、レジスタアクセス信号に含まれるアドレス、データおよびリードライト種別等を示すアクセス情報を調停部33に出力する。レジスタアクセス検出部32は、CPU200によるレジスタのアクセスを検出するアクセス検出部の一例である。 The register access detection unit 32 detects the occurrence of a register access based on a register access signal output from the endpoint 20. When the register access detection unit 32 detects the occurrence of a register access, it outputs access information indicating the address, data, read/write type, etc. included in the register access signal to the arbitration unit 33. The register access detection unit 32 is an example of an access detection unit that detects access to a register by the CPU 200.

調停部33は、受信した変化情報をログ生成部34に出力し、受信したアクセス情報をログ生成部34に出力する。調停部33は、変化情報とアクセス情報とを同時に受信した場合、ログ生成部34に出力する順序を決める調停処理を実施し、調停処理により決定した順序にしたがって、変化情報とアクセス情報とをログ生成部34に順次出力する。例えば、調停部33は、変化情報とアクセス情報とを同じ受信サイクルで受信した場合、同時受信を判定し、調停処理を実施する。 The arbitration unit 33 outputs the received change information to the log generation unit 34, and outputs the received access information to the log generation unit 34. When the arbitration unit 33 receives change information and access information simultaneously, it performs an arbitration process to determine the order in which to output them to the log generation unit 34, and outputs the change information and access information to the log generation unit 34 sequentially according to the order determined by the arbitration process. For example, when the arbitration unit 33 receives change information and access information in the same reception cycle, it determines that they were received simultaneously and performs arbitration processing.

ログ生成部34は、調停部33から受信する変化情報またはアクセス情報を記録したログを、調停部33からの受信順に生成する。したがって、調停部33が調停処理により決定する順序は、ログの生成順でもある。例えば、ログ生成部34は、調停部33から受信したLTSSMの遷移前後の各ステートとリンク情報とを含むログを生成する。また、ログ生成部34は、調停部33から受信したレジスタアクセスを示すアクセス情報を含むログを生成する。ログ生成部34は、生成したログをログ保持部35に格納する。 The log generation unit 34 generates a log that records the change information or access information received from the arbitration unit 33 in the order in which it is received from the arbitration unit 33. Therefore, the order determined by the arbitration unit 33 through the arbitration process is also the order in which the logs are generated. For example, the log generation unit 34 generates a log that includes each state and link information before and after the transition of the LTSSM received from the arbitration unit 33. The log generation unit 34 also generates a log that includes access information indicating register access received from the arbitration unit 33. The log generation unit 34 stores the generated logs in the log storage unit 35.

例えば、ログ保持部35に格納された情報は、図示しないシリアルインタフェース等を介してデバッグコントローラ30の外部から読み出し可能である。ログ保持部35は、デバッグコントローラ30の外部に設けられてもよい。なお、デバッグコントローラ30を、デバッグ時のみ動作させ、デバッグ時以外で停止するために、デバッグコントローラ30の動作を有効にするイネーブル信号を電子機器用デバイス100の外部からデバッグコントローラ30に供給してもよい。 For example, the information stored in the log storage unit 35 can be read from outside the debug controller 30 via a serial interface (not shown) or the like. The log storage unit 35 may be provided outside the debug controller 30. Note that an enable signal that enables the operation of the debug controller 30 may be supplied to the debug controller 30 from outside the electronic device 100 in order to operate the debug controller 30 only during debugging and stop it at other times.

電子機器用デバイス100にデバッグコントローラ30を設けることで、PCIeリンクのリンクアップ後だけでなく、リックアップ中のLTSSMのステートの変化と、PCIeリンクのリンク状態とをログとして記録することができる。この結果、PCIeリンクのリンクアップ中の挙動をログとして記録することができ、リンクアップ中の不具合をデバッグすることができる。例えば、PCIeのリンクがリンクアップしなかった場合の原因を特定しやすくすることができる。 By providing the debug controller 30 in the electronic device 100, it is possible to record as a log not only the changes in the state of the LTSSM during link-up of the PCIe link, but also the link state of the PCIe link, not only after link-up of the PCIe link. As a result, it is possible to record as a log the behavior of the PCIe link during link-up, and it is possible to debug malfunctions during link-up. For example, it is possible to easily identify the cause when the PCIe link does not link up.

これにより、CPU200と電子機器用デバイス100との間で通信できない場合に、その原因がPCIeインタフェースにあるか否かを、ログを参照して容易に判断することができる。したがって、CPU200および電子機器用デバイス100を含むシステムSYSを開発する開発者等は、生成されたログに基づいて、PCIeリンクの動作が正常か否かをデバッグすることができる。 As a result, when communication between the CPU 200 and the electronic device device 100 is not possible, it is easy to determine whether the cause is the PCIe interface by referring to the log. Therefore, developers of the system SYS including the CPU 200 and the electronic device device 100 can debug whether the operation of the PCIe link is normal based on the generated log.

さらに、LTSSMのステートの変化を常に監視するためのデバッグ装置を用意することなく、システムSYSの起動時(すなわち、PCIeリンクのリンクアップ時)のLTSSMのステートをチェックすることができる。この結果、システムSYSのデバッグを、従来に比べて容易にすることができる。 Furthermore, it is possible to check the state of the LTSSM when the system SYS is started (i.e., when the PCIe link is linked up) without having to prepare a debugging device to constantly monitor changes in the state of the LTSSM. As a result, debugging the system SYS can be made easier than before.

図2は、図1のデバッグコントローラ30の動作の一例を示すフロー図である。図2に示すフローは、例えば、電子機器用デバイス100が起動され、PCIeがリンクアップを開始したことに基づいて開始される。なお、デバッグコントローラ30は、電子機器用デバイス100に搭載されているため、図3に示すフローは、電子機器用デバイス100の起動とともに開始されてもよい。 FIG. 2 is a flow diagram showing an example of the operation of the debug controller 30 in FIG. 1. The flow shown in FIG. 2 is started, for example, when the electronic device 100 is started and the PCIe starts linking up. Note that since the debug controller 30 is mounted on the electronic device 100, the flow shown in FIG. 3 may be started together with the start of the electronic device 100.

まず、ステップS10において、デバッグコントローラ30は、状態検出部31により、LTSSMのステートの遷移が発生したか否かを検出する。デバッグコントローラ30は、LTSSMのステートの遷移が発生した場合、ステップS12を実施する。デバッグコントローラ30は、LTSSMのステートの遷移が発生するまで、ステップS10の判定を繰り返す。なお、デバッグコントローラ30は、ステップS10において、状態検出部31によりLTSSMステートおよびLTSSMサブステートの両方の遷移が検出された場合にステップS12を実施する。 First, in step S10, the debug controller 30 detects whether or not an LTSSM state transition has occurred using the state detection unit 31. If an LTSSM state transition has occurred, the debug controller 30 performs step S12. The debug controller 30 repeats the determination in step S10 until an LTSSM state transition has occurred. Note that the debug controller 30 performs step S12 if the state detection unit 31 detects transitions to both the LTSSM state and the LTSSM substate in step S10.

ステップS12において、デバッグコントローラ30は、ログ生成部34により、LTSSMの遷移前と遷移後のステートとリンク情報とを記録する。次に、ステップS14において、デバッグコントローラ30は、ログ生成部34により、記録した情報を含むログを生成し、図2に示す動作を終了する。例えば、ログ生成部34が生成したログは、ログ保持部35に保持される。 In step S12, the debug controller 30 records the states and link information before and after the transition of the LTSSM by the log generation unit 34. Next, in step S14, the debug controller 30 generates a log including the recorded information by the log generation unit 34, and ends the operation shown in FIG. 2. For example, the log generated by the log generation unit 34 is held in the log holding unit 35.

図2に示すように、デバッグコントローラ30は、PCIeのリンクアップの開始直後からLTSSMステートの変化を検出して、リンク情報とともに記録できる。すなわち、デバッグコントローラ30は、リンクアップ中に発生する不具合等をログとして記録することができる。 As shown in FIG. 2, the debug controller 30 can detect changes in the LTSSM state immediately after the start of PCIe link-up and record them together with the link information. In other words, the debug controller 30 can record any malfunctions that occur during link-up as a log.

図3は、図2のデバッグコントローラ30の動作の別の例を示すフロー図である。図3に示すフローは、例えば、CPU200が起動されたことに基づいて開始される。なお、電子機器用デバイス100が、例えば、CPU200と同じ基板に搭載され、CPU200と同時に起動される場合、図3に示すフローは、電子機器用デバイス100の起動とともに開始されてもよい。 FIG. 3 is a flow diagram showing another example of the operation of the debug controller 30 of FIG. 2. The flow shown in FIG. 3 is started, for example, when the CPU 200 is started. Note that, if the electronic device 100 is mounted on the same board as the CPU 200 and started at the same time as the CPU 200, for example, the flow shown in FIG. 3 may be started together with the start-up of the electronic device 100.

まず、ステップS20において、デバッグコントローラ30は、CPU200がレジスタアクセスを実施したか否かを、レジスタアクセス信号に基づいて判定する。デバッグコントローラ30は、レジスタアクセスが実施された場合、ステップS22を実施する。デバッグコントローラ30は、レジスタアクセスが実施されるまで、ステップS20の判定を繰り返す。 First, in step S20, the debug controller 30 determines whether or not the CPU 200 has performed a register access based on the register access signal. If a register access has been performed, the debug controller 30 performs step S22. The debug controller 30 repeats the determination of step S20 until a register access is performed.

ステップS22において、デバッグコントローラ30は、CPU200が実施したレジスタアクセスのアドレス、データおよびリードライト種別を記録する。次に、ステップS24において、デバッグコントローラ30は、ログ生成部34により、記録した情報を含むログを生成し、図3に示す動作を終了する。例えば、ログ生成部34が生成したログは、ログ保持部35に保持される。 In step S22, the debug controller 30 records the address, data, and read/write type of the register access performed by the CPU 200. Next, in step S24, the debug controller 30 causes the log generation unit 34 to generate a log including the recorded information, and ends the operation shown in FIG. 3. For example, the log generated by the log generation unit 34 is held in the log holding unit 35.

以上、第1の実施形態では、電子機器用デバイス100にデバッグコントローラ30が設けられる。このため、PCIeリンクのリンクアップ後だけでなく、リックアップ中のLTSSMのステートの変化と、PCIeリンクのリンク状態とをログとして記録することができる。この結果、PCIeリンクのリンクアップ中の挙動をログとして記録することができ、リンクアップ中の不具合をデバッグすることができる。例えば、PCIeのリンクがリンクアップしなかった場合の原因を特定しやすくすることができる。 As described above, in the first embodiment, the debug controller 30 is provided in the electronic device 100. Therefore, it is possible to record, as a log, not only after the PCIe link is linked up, but also the change in the state of the LTSSM during the link up and the link state of the PCIe link. As a result, it is possible to record, as a log, the behavior of the PCIe link during the link up, and it is possible to debug a malfunction during the link up. For example, it is possible to easily identify the cause when the PCIe link does not link up.

これにより、CPU200と電子機器用デバイス100との間で通信できない場合に、その原因がPCIeインタフェースにあるか否かを、ログを参照して容易に判断することができる。したがって、CPU200および電子機器用デバイス100を含むシステムSYSを開発する開発者等は、生成されたログに基づいて、PCIeリンクの動作が正常か否かをデバッグすることができる。 As a result, when communication between the CPU 200 and the electronic device device 100 is not possible, it is easy to determine whether the cause is the PCIe interface by referring to the log. Therefore, developers of the system SYS including the CPU 200 and the electronic device device 100 can debug whether the operation of the PCIe link is normal based on the generated log.

さらに、LTSSMのステートの変化を常に監視するためのデバッグ装置を用意することなく、システムSYSの起動時(すなわち、PCIeリンクのリンクアップ時)のLTSSMのステートをチェックすることができる。この結果、システムSYSのデバッグを、従来に比べて容易にすることができる。 Furthermore, it is possible to check the state of the LTSSM when the system SYS is started (i.e., when the PCIe link is linked up) without having to prepare a debugging device to constantly monitor changes in the state of the LTSSM. As a result, debugging the system SYS can be made easier than before.

(第2の実施形態)
図4は、本発明の第2の実施形態における電子機器用デバイスの一例を示すブロック図である。図1と同様の要素については、同じ符号を付し、詳細な説明は省略する。図4に示す電子機器用デバイス100は、図1のデバッグコントローラ30の代わりにデバッグコントローラ30Aを有する。電子機器用デバイス100のその他の構成および機能は、図1と同様である。
Second Embodiment
Fig. 4 is a block diagram showing an example of an electronic device according to a second embodiment of the present invention. The same elements as those in Fig. 1 are given the same reference numerals, and detailed description will be omitted. The electronic device 100 shown in Fig. 4 has a debug controller 30A instead of the debug controller 30 in Fig. 1. Other configurations and functions of the electronic device 100 are the same as those in Fig. 1.

デバッグコントローラ30Aは、図1の調停部33の代わりに調停部33Aを有する。また、デバッグコントローラ30Aは、図1のデバッグコントローラ30にタイムカウント部36を追加している。タイムカウント部36は、カウント値CNTを調停部33Aに出力する。デバッグコントローラ30Aのその他の構成および機能は、図1のデバッグコントローラ30と同様である。状態検出部31、レジスタアクセス検出部32、調停部33Aおよびログ生成部34は、図1のデバッグコントローラ30と同様に、ハードウェアにより実現されてもよく、ソフトウェアにより実現されてもよい。 The debug controller 30A has an arbitration unit 33A instead of the arbitration unit 33 in FIG. 1. In addition, the debug controller 30A adds a time count unit 36 to the debug controller 30 in FIG. 1. The time count unit 36 outputs a count value CNT to the arbitration unit 33A. The other configurations and functions of the debug controller 30A are the same as those of the debug controller 30 in FIG. 1. The state detection unit 31, the register access detection unit 32, the arbitration unit 33A, and the log generation unit 34 may be realized by hardware or software, similar to the debug controller 30 in FIG. 1.

タイムカウント部36は、電子機器用デバイス100の起動時に動作を開始して時間をカウントし、カウントした時間をカウント値CNTとして調停部33Aに出力する。例えば、タイムカウント部36は、電子機器用デバイス100の起動時に解除されるリセット信号に基づいて、図示しないクロック信号のクロック数を時間としてカウントする。タイムカウント部36に供給されるクロック信号は、電子機器用デバイス100を動作させるクロック信号でよく、電子機器用デバイス100を動作させるクロック信号の周波数を分周したクロック信号でもよい。タイムカウント部36は、タイマの一例である。タイムカウント部36が出力するカウント値CNTは、時間情報の一例である。 The time counting unit 36 starts operation when the electronic device 100 is started up, counts time, and outputs the counted time to the arbitration unit 33A as a count value CNT. For example, the time counting unit 36 counts the number of clocks of a clock signal (not shown) as time based on a reset signal that is released when the electronic device 100 is started up. The clock signal supplied to the time counting unit 36 may be a clock signal that operates the electronic device 100, or may be a clock signal obtained by dividing the frequency of the clock signal that operates the electronic device 100. The time counting unit 36 is an example of a timer. The count value CNT output by the time counting unit 36 is an example of time information.

調停部33Aは、遷移情報とリンク情報とを含む変化情報またはアクセス情報を受信した場合、変化情報またはアクセス情報にタイムカウント部36がカウント中のカウント値CNTを付加する。調停部33Aは、変化情報とアクセス情報とを同時に受信した場合、変化情報とアクセス情報とに同一のカウント値CNTを付加する。そして、調停部33Aは、カウント値CNTを付加した変化情報またはカウント値CNTを付加したアクセス情報をログ生成部34に出力する。 When the arbitration unit 33A receives change information or access information including transition information and link information, it adds the count value CNT being counted by the time count unit 36 to the change information or access information. When the arbitration unit 33A receives change information and access information simultaneously, it adds the same count value CNT to the change information and access information. Then, the arbitration unit 33A outputs the change information with the count value CNT added or the access information with the count value CNT added to the log generation unit 34.

例えば、ログ生成部34は、同一のカウント値CNTが付加された変化情報およびアクセス情報を、互いに異なるタイミングで受信し、それぞれのログを生成する。したがって、例えば、変化情報を含むログとアクセス情報を含むログとがこの順で生成された場合に、LTSSMステートの遷移とレジスタアクセスとが、ログの生成順通りに発生したのか、同時に発生したのかをカウント値CNTによって判別することができる。この結果、CPU200および電子機器用デバイス100を含むシステムSYSを開発する開発者等は、カウント値CNTを含むログに基づいて、PCIeリンクの動作を正確に把握することができ、デバッグ効率を向上することができる。 For example, the log generating unit 34 receives the change information and the access information, each having the same count value CNT added thereto, at different times, and generates the respective logs. Therefore, for example, when a log including change information and a log including access information are generated in this order, it is possible to determine from the count value CNT whether the LTSSM state transition and the register access occurred in the order in which the logs were generated, or whether they occurred simultaneously. As a result, developers of the system SYS including the CPU 200 and the electronic device device 100 can accurately grasp the operation of the PCIe link based on the log including the count value CNT, thereby improving debugging efficiency.

図5は、PCIeのリンク状態のログのフォーマットの一例を示す説明図である。ログ生成部34は、調停部33Aから受信して記録した変化情報を、図5に示すフォーマットのログとして生成する。ログは、1つの変化情報毎に、8バイトの領域を有する(上位がバイト7で、下位がバイト0)。 Figure 5 is an explanatory diagram showing an example of the format of a log of the PCIe link state. The log generation unit 34 generates the change information received and recorded from the arbitration unit 33A as a log in the format shown in Figure 5. The log has an 8-byte area for each piece of change information (the upper byte is byte 7 and the lower byte is byte 0).

バイト7-バイト3の5バイトの領域には、図4のタイムカウント部36がカウントした40ビットのカウント値CNTがカウント情報time_cnt[39:0]として格納される。バイト2のビット5-ビット4には、電源管理情報Powerduwn[1:0]が格納される。バイト2のビット3には、伝送信号の振幅情報txswingが格納される。振幅情報txswingの"0"は、フルスイングを示し、振幅情報txswingの"1"は、ハーフスウィング(低電圧仕様)を示す。 The 5-byte area from byte 7 to byte 3 stores the 40-bit count value CNT counted by the time count unit 36 in FIG. 4 as count information time_cnt[39:0]. Power management information Powerdown[1:0] is stored in bits 5 to 4 of byte 2. Amplitude information txswing of the transmission signal is stored in bit 3 of byte 2. "0" in the amplitude information txswing indicates full swing, and "1" in the amplitude information txswing indicates half swing (low voltage specification).

バイト2のビット2には、波形情報txdeemphが格納される。波形情報txdeemphの"1"は、ディエンファシスの選択を示し、波形情報txdeemphの"0"は、Coefficientの選択を示す。バイト2のビット1には、転送レート情報link_spdが格納される。 Bit 2 of byte 2 stores the waveform information txdeemph. A "1" in the waveform information txdeemph indicates the selection of de-emphasis, and a "0" in the waveform information txdeemph indicates the selection of Coefficient. Bit 1 of byte 2 stores the transfer rate information link_spd.

転送レート情報link_spdの"0"は、GEN1(PCI Express 1.1)を示し、転送レート情報link_spdの"1"は、GEN2(PCI Express 2.0)を示す。バイト2のビット0には、リンクアップ情報dl_upが格納される。リンクアップ情報dl_upの"0"は、通信不可能状態を示し、リンクアップ情報dl_upの"1"は、通信可能状態(すなわち、リンクアップ状態)を示す。 A "0" in the transfer rate information link_spd indicates GEN1 (PCI Express 1.1), and a "1" in the transfer rate information link_spd indicates GEN2 (PCI Express 2.0). Bit 0 of byte 2 stores the link up information dl_up. A "0" in the link up information dl_up indicates a communication unavailable state, and a "1" in the link up information dl_up indicates a communication available state (i.e., a link up state).

バイト1のビット7-ビット4には、LTSSMの遷移前のステート情報ltssm_beforeが格納される。バイト1のビット2-ビット0には、LTSSMの遷移前のサブステート情報ltssm_st_beforeが格納される。バイト0のビット7-ビット4には、LTSSMの遷移後のステート情報ltssm_afterが格納される。バイト0のビット2-ビット0には、LTSSMの遷移後のサブステート情報ltssm_st_afterが格納される。なお、上記のいずれの情報も格納されないビットには、"0"が格納される。 Bits 7 to 4 of byte 1 store state information ltssm_before before the LTSSM transition. Bits 2 to 0 of byte 1 store sub-state information ltssm_st_before before the LTSSM transition. Bits 7 to 4 of byte 0 store state information ltssm_after after the LTSSM transition. Bits 2 to 0 of byte 0 store sub-state information ltssm_st_after after the LTSSM transition. Note that "0" is stored in bits that do not store any of the above information.

図6は、レジスタアクセスのログのフォーマットの一例を示すブロック図である。ログ生成部34は、調停部33Aから受信して記録したアクセス情報を、図6に示すフォーマットのログとして生成する。ログは、1つのアクセス情報毎に、16バイト(上位バイト群と下位バイト群)の領域を有する。 Figure 6 is a block diagram showing an example of the format of a register access log. The log generation unit 34 generates the access information received and recorded from the arbitration unit 33A as a log in the format shown in Figure 6. The log has an area of 16 bytes (upper byte group and lower byte group) for each piece of access information.

上位バイト群および下位バイト群の最上位ビットは、上位バイト群と下位バイト群とを識別するための識別情報num[0]が格納される。上位バイト群の識別情報numには、"1"が格納され、下位バイト群の識別情報numには、"0"が格納される。上位バイト群のバイト4-バイト0の5バイトの領域には、カウント値CNTが40ビットのカウント情報time_cnt[39:0]として格納される。 The most significant bit of the upper byte group and the lower byte group stores identification information num[0] for identifying the upper byte group and the lower byte group. The identification information num of the upper byte group stores "1", and the identification information num of the lower byte group stores "0". The five-byte area from byte 4 to byte 0 of the upper byte group stores the count value CNT as 40-bit count information time_cnt[39:0].

下位バイト群のバイト7のビット6には、レジスタアクセスのリードライト情報rwが格納される。リードライト情報rwの"0"は、リードアクセスを示し、リードライト情報rwの"1"は、ライトアクセスを示す。下位バイト群のバイト7のビット5からバイト4のビット0は、アクセスアドレスを示す30ビットのアドレス情報addr[29:0]が格納される。下位バイト群のバイト3-バイト0は、データを示すデータ情報data[31:0]が格納される。上位バイト群および下位バイト群の他の領域には、"0"が格納される。 Bit 6 of byte 7 of the lower byte group stores the read/write information rw for register access. A "0" in the read/write information rw indicates a read access, and a "1" in the read/write information rw indicates a write access. Bit 5 of byte 7 to bit 0 of byte 4 of the lower byte group store 30-bit address information addr[29:0] indicating the access address. Bytes 3 to 0 of the lower byte group store data information data[31:0] indicating the data. "0" is stored in other areas of the upper byte group and the lower byte group.

以上、第2の実施形態においても、第1の実施形態と同様の効果を得ることができる。さらに、第2の実施形態では、調停部33Aは、変化情報またはアクセス情報を受信した場合、変化情報またはアクセス情報にカウント値CNTを付加、ログ生成部34は、変化情報およびアクセス情報のそれぞれにログを付加したログを生成する。これにより、LTSSMステートの遷移とレジスタアクセスとが、ログの生成順通りに発生したのか、同時に発生したのかをカウント値CNTによって判別することができる。この結果、システムSYSの開発者等は、システムSYSのデバッグにおいて、PCIeリンクの動作を正確に把握することができ、デバッグ効率を向上することができる。 As described above, the second embodiment can achieve the same effects as the first embodiment. Furthermore, in the second embodiment, when the arbitration unit 33A receives change information or access information, it adds a count value CNT to the change information or access information, and the log generation unit 34 generates a log in which a log is added to each of the change information and the access information. This makes it possible to determine, based on the count value CNT, whether the LTSSM state transition and the register access occurred in the order in which the logs were generated or simultaneously. As a result, system SYS developers and the like can accurately grasp the operation of the PCIe link when debugging the system SYS, thereby improving debugging efficiency.

(第3の実施形態)
図7は、本発明の第3の実施形態における電子機器用デバイスの一例を示すブロック図である。図1および図4と同様の要素については、同じ符号を付し、詳細な説明は省略する。図7に示す電子機器用デバイス100は、図1のデバッグコントローラ30の代わりにデバッグコントローラ30Bを有する。電子機器用デバイス100のその他の構成および機能は、図1と同様である。
Third Embodiment
Fig. 7 is a block diagram showing an example of an electronic device according to a third embodiment of the present invention. The same elements as those in Figs. 1 and 4 are given the same reference numerals, and detailed description thereof will be omitted. The electronic device 100 shown in Fig. 7 has a debug controller 30B instead of the debug controller 30 in Fig. 1. Other configurations and functions of the electronic device 100 are the same as those in Fig. 1.

また、この実施形態では、CPU200および電子機器用デバイス100を含むシステムSYSは、大容量メモリ400と、大容量メモリ400と電子機器用デバイス100とを接続するデータバスDBとを有する。また、エンドポイント20が出力するレジスタアクセス信号を伝送する信号線は、データバスDBに接続される。大容量メモリ400は、ログ生成部34が生成したログを格納可能な外部メモリの一例である。 In this embodiment, the system SYS including the CPU 200 and the electronic device device 100 has a large-capacity memory 400 and a data bus DB that connects the large-capacity memory 400 and the electronic device device 100. A signal line that transmits a register access signal output by the endpoint 20 is connected to the data bus DB. The large-capacity memory 400 is an example of an external memory that can store logs generated by the log generation unit 34.

デバッグコントローラ30Bは、図1のデバッグコントローラ30に、タイムカウント部36、メモリインタフェース部37、内蔵メモリ38およびDMA転送部39を追加している。また、デバッグコントローラ30Bは、図1の調停部33の代わりに調停部33Bを有し、ログ生成部34の代わりにログ生成部34Bを有する。状態検出部31、レジスタアクセス検出部32、調停部33Bおよびログ生成部34Bは、図1のデバッグコントローラ30と同様に、ハードウェアにより実現されてもよく、ソフトウェアにより実現されてもよい。 The debug controller 30B adds a time count unit 36, a memory interface unit 37, an internal memory 38, and a DMA transfer unit 39 to the debug controller 30 in FIG. 1. The debug controller 30B also has an arbitration unit 33B instead of the arbitration unit 33 in FIG. 1, and a log generation unit 34B instead of the log generation unit 34. The state detection unit 31, the register access detection unit 32, the arbitration unit 33B, and the log generation unit 34B may be realized by hardware or software, similar to the debug controller 30 in FIG. 1.

メモリインタフェース部37は、調停部33Bと内蔵メモリ38とログ生成部34Bとに接続される。ログ生成部34Bは、メモリインタフェース部37とDMA転送部39とに接続される。例えば、内蔵メモリ38は、ライトポートWPとリードポートRPとを有するデュアルポートメモリである。DMA転送部39は、データバスDBを介して大容量メモリ400に接続され、CPU200に負荷を掛けずに、大容量メモリ400にデータ等を高速に転送可能である。タイムカウント部36は、図4に示すタイムカウント部36と同様に、電子機器用デバイス100の起動時からの時間をカウントし、カウントした時間をカウント値CNTとして調停部33Bに出力する。 The memory interface unit 37 is connected to the arbitration unit 33B, the built-in memory 38, and the log generation unit 34B. The log generation unit 34B is connected to the memory interface unit 37 and the DMA transfer unit 39. For example, the built-in memory 38 is a dual-port memory having a write port WP and a read port RP. The DMA transfer unit 39 is connected to the large-capacity memory 400 via the data bus DB, and can transfer data, etc. to the large-capacity memory 400 at high speed without placing a load on the CPU 200. The time count unit 36, like the time count unit 36 shown in FIG. 4, counts the time from the start of the electronic device 100 and outputs the counted time to the arbitration unit 33B as a count value CNT.

調停部33Bは、変化情報およびアクセス情報を、メモリインタフェース部37を介して内蔵メモリ38に格納する機能を有する。例えば、システムSYSの起動時のフォーマット等の初期化処理により、データバスDBを介した大容量メモリ400へのアクセスがすぐにできない場合がある。大容量メモリ400がアクセスできない期間、調停部33Bは、状態検出部31から受信する変化情報とレジスタアクセス検出部32から受信するアクセス情報との少なくとも一方を内蔵メモリ38に書き込む書き込み要求をメモリインタフェース部37に出力する。 The arbitration unit 33B has a function of storing the change information and access information in the built-in memory 38 via the memory interface unit 37. For example, due to initialization processing such as formatting at the time of starting up the system SYS, there are cases where the large-capacity memory 400 cannot be immediately accessed via the data bus DB. During the period when the large-capacity memory 400 cannot be accessed, the arbitration unit 33B outputs a write request to the memory interface unit 37 to write at least one of the change information received from the state detection unit 31 and the access information received from the register access detection unit 32 to the built-in memory 38.

メモリインタフェース部37は、受信した書き込み要求に基づいて、変化情報およびアクセス情報の少なくとも一方を含む書き込みコマンドを生成し、生成した書き込みコマンドを内蔵メモリ38のライトポートWPに出力する。そして、変化情報およびアクセス情報の少なくとも一方は、内蔵メモリ38に書き込まれる。これにより、システムSYSの起動時等で、大容量メモリ400に変化情報またはアクセス情報を格納できない場合にも、システムSYSの起動中に発生した変化情報またはアクセス情報を欠損することなく保持することができる。 The memory interface unit 37 generates a write command including at least one of the change information and the access information based on the received write request, and outputs the generated write command to the write port WP of the built-in memory 38. At least one of the change information and the access information is then written to the built-in memory 38. As a result, even when the change information or the access information cannot be stored in the large-capacity memory 400, such as when the system SYS is started, the change information or the access information that occurs during the start-up of the system SYS can be retained without loss.

一方、システムSYSの起動が完了し、データバスDBが使用可能になり、DMA転送部39によるデバッグコントローラ30Bから大容量メモリ400への情報の書き込みが可能になったとする。この場合、ログ生成部34Bは、データバスDBに対するDMA転送が可能になったことを示す信号をDMA転送部39から受信する。また、ログ生成部34Bは、内蔵メモリ38に保持されている変化情報およびアクセス情報を内蔵メモリ38から読み出す読み出し要求をメモリインタフェース部37に出力する。 On the other hand, assume that the startup of the system SYS is complete, the data bus DB is available, and the DMA transfer unit 39 is able to write information from the debug controller 30B to the large-capacity memory 400. In this case, the log generation unit 34B receives a signal from the DMA transfer unit 39 indicating that DMA transfer to the data bus DB is now possible. The log generation unit 34B also outputs a read request to the memory interface unit 37 to read from the built-in memory 38 the change information and access information held in the built-in memory 38.

メモリインタフェース部37は、受信した読み出し要求に基づいて読み出しコマンドを生成して内蔵メモリ38のリードポートRPに出力し、内蔵メモリ38から変化情報およびアクセス情報を読み出す。メモリインタフェース部37は、内蔵メモリ38から読み出した変化情報およびアクセス情報を、読み出し要求の応答としてログ生成部34Bに出力する。 The memory interface unit 37 generates a read command based on the received read request, outputs it to the read port RP of the built-in memory 38, and reads the change information and access information from the built-in memory 38. The memory interface unit 37 outputs the change information and access information read from the built-in memory 38 to the log generation unit 34B as a response to the read request.

なお、調停部33Bは、システムSYSの起動が完了した後、状態検出部31から受信する変化情報およびレジスタアクセス検出部32から受信するアクセス情報を調停後、メモリインタフェース部37を介してログ生成部34Bに出力する機能を有する。ログ生成部34Bは、メモリインタフェース部37から受信した変化情報およびアクセス情報を、大容量メモリ400への転送要求とともにDMA転送部39に出力する。DMA転送部39は、受信した変化情報およびアクセス情報を、データバスDBを介して大容量メモリ400にDMA転送する。 After the startup of the system SYS is completed, the arbitration unit 33B arbitrates the change information received from the state detection unit 31 and the access information received from the register access detection unit 32, and then outputs the information to the log generation unit 34B via the memory interface unit 37. The log generation unit 34B outputs the change information and access information received from the memory interface unit 37 to the DMA transfer unit 39 together with a transfer request to the large-capacity memory 400. The DMA transfer unit 39 DMA transfers the received change information and access information to the large-capacity memory 400 via the data bus DB.

この実施形態では、システムSYSの起動中に発生する変化情報およびアクセス情報と、システムSYSの起動後に発生する変化情報およびアクセス情報とは、順不同で大容量メモリ400に転送される。しかしながら、調停部33Bにより変化情報およびアクセス情報に、カウント値CNTを付加されるため、カウント値CNTを参照することで、大容量メモリ400に順不同で書き込まれた変化情報およびアクセス情報の発生時間の順序を判定することができる。 In this embodiment, the change information and access information that occurs during startup of the system SYS and the change information and access information that occurs after startup of the system SYS are transferred to the large-capacity memory 400 in no particular order. However, because the arbitration unit 33B adds a count value CNT to the change information and access information, it is possible to determine the order of occurrence of the change information and access information that were written in no particular order to the large-capacity memory 400 by referring to the count value CNT.

DMA転送により、大容量メモリ400に書き込まれた変化情報およびアクセス情報は、データバスDBにアクセス可能なシリアルインタフェース等を介して読み出し可能である。このため、システムSYSの開発者等は、システムSYSのデバッグ時に、カウント値CNTが付加された変化情報を含むログおよびカウント値CNTが付加されたアクセス情報を含むログを大容量メモリ400から読み出すことができる。大容量メモリ400から読み出される変化情報およびアクセス情報は、システムSYSの起動中に発生したものも含まれるため、開発者等は、PCIeリンクの動作を正確に把握することができ、デバッグ効率を向上することができる。 By DMA transfer, the change information and access information written to the large-capacity memory 400 can be read out via a serial interface or the like that can access the data bus DB. Therefore, when debugging the system SYS, developers of the system SYS can read out a log including change information to which the count value CNT has been added and a log including access information to which the count value CNT has been added from the large-capacity memory 400. The change information and access information read out from the large-capacity memory 400 includes information that has occurred while the system SYS was booting up, so developers can accurately grasp the operation of the PCIe link and improve debugging efficiency.

以上、第3の実施形態においても、第1および第2の実施形態と同様の効果を得ることができる。さらに、第3の実施形態では、デバッグコントローラ30Bにメモリインタフェース部37と内蔵メモリ38とが設けられる。これにより、システムSYSの起動時等で、大容量メモリ400に変化情報またはアクセス情報が格納できない場合にも、システムSYSの起動中に発生した変化情報またはアクセス情報を欠損することなく内蔵メモリ38に保持することができる。 As described above, the third embodiment can also provide the same effects as the first and second embodiments. Furthermore, in the third embodiment, the debug controller 30B is provided with a memory interface unit 37 and an internal memory 38. As a result, even when change information or access information cannot be stored in the large-capacity memory 400, such as when the system SYS is started, the change information or access information generated during the start-up of the system SYS can be stored in the internal memory 38 without loss.

大容量メモリ400がアクセス可能になった後に、内蔵メモリ38から大容量メモリ400に転送される変化情報およびアクセス情報は、カウント値CNTを含む。このため、大容量メモリ400に順不同で書き込まれたログに含まれるカウント値CNTを参照することで、変化情報が示すLTSSMステートの遷移の発生時間と、アクセス情報が示すレジスタアクセスの発生時間との順序を判定することができる。 After the large-capacity memory 400 becomes accessible, the change information and access information transferred from the built-in memory 38 to the large-capacity memory 400 include the count value CNT. Therefore, by referring to the count value CNT included in the log written in random order to the large-capacity memory 400, it is possible to determine the order of the occurrence time of the LTSSM state transition indicated by the change information and the occurrence time of the register access indicated by the access information.

(第4の実施形態)
図8は、本発明の第4の実施形態における電子機器用デバイスの一例を示すブロック図である。図1、図4および図7と同様の要素については、同じ符号を付し、詳細な説明は省略する。図8に示す電子機器用デバイス100は、図7のデバッグコントローラ30Bの代わりにデバッグコントローラ30Cを有する。電子機器用デバイス100のその他の構成および機能と、CPU200および電子機器用デバイス100を含むシステムSYSの構成とは、図7と同様である。
Fourth Embodiment
Fig. 8 is a block diagram showing an example of an electronic device according to a fourth embodiment of the present invention. The same elements as those in Figs. 1, 4 and 7 are given the same reference numerals, and detailed description is omitted. The electronic device 100 shown in Fig. 8 has a debug controller 30C instead of the debug controller 30B in Fig. 7. Other configurations and functions of the electronic device 100 and the configuration of the system SYS including the CPU 200 and the electronic device 100 are the same as those in Fig. 7.

デバッグコントローラ30Cは、図7のデバッグコントローラ30Bの調停部33Bの代わりに調停部33Cを有し、図7のデバッグコントローラ30Bのログ生成部34Bの代わりにログ生成部34Cを有する。また、デバッグコントローラ30Cは、図7のメモリインタフェース部37の代わりにメモリインタフェース部37Cを有する。状態検出部31、レジスタアクセス検出部32、調停部33Cおよびログ生成部34Cは、図1のデバッグコントローラ30と同様に、ハードウェアにより実現されてもよく、ソフトウェアにより実現されてもよい。なお、内蔵メモリ38は、シングルポートメモリでもよい。 The debug controller 30C has an arbitration unit 33C instead of the arbitration unit 33B of the debug controller 30B of FIG. 7, and has a log generation unit 34C instead of the log generation unit 34B of the debug controller 30B of FIG. 7. The debug controller 30C also has a memory interface unit 37C instead of the memory interface unit 37 of FIG. 7. The state detection unit 31, the register access detection unit 32, the arbitration unit 33C, and the log generation unit 34C may be realized by hardware or software, similar to the debug controller 30 of FIG. 1. The built-in memory 38 may be a single-port memory.

メモリインタフェース部37Cは、調停部33Cと内蔵メモリ38とに接続される。ログ生成部34Cは、調停部33CとDMA転送部39とに接続される。 The memory interface unit 37C is connected to the arbitration unit 33C and the built-in memory 38. The log generation unit 34C is connected to the arbitration unit 33C and the DMA transfer unit 39.

調停部33Cは、変化情報およびアクセス情報を、メモリインタフェース部37Cを介して内蔵メモリ38に格納する機能を有する。また、調停部33Cは、内蔵メモリ38に格納された変化情報およびアクセス情報を、メモリインタフェース部37Cを介して内蔵メモリ38から読み出す機能を有する。さらに、調停部33Cは、図1の調停部33と同様に、変化情報およびアクセス情報をログ生成部34に出力する機能を有する。 The arbitration unit 33C has a function of storing the change information and access information in the built-in memory 38 via the memory interface unit 37C. The arbitration unit 33C also has a function of reading the change information and access information stored in the built-in memory 38 from the built-in memory 38 via the memory interface unit 37C. Furthermore, the arbitration unit 33C has a function of outputting the change information and access information to the log generation unit 34, similar to the arbitration unit 33 in FIG. 1.

調停部33Cは、図7に示した調停部33Bと同様に、変化情報とアクセス情報との少なくとも一方を内蔵メモリ38に書き込む書き込み要求をメモリインタフェース部37Cに出力する。メモリインタフェース部37Cは、受信した書き込み要求に基づいて、変化情報およびアクセス情報の少なくとも一方を含む書き込みコマンドを生成し、生成した書き込みコマンドを内蔵メモリ38のライトポートWPに出力する。そして、変化情報およびアクセス情報の少なくとも一方は、内蔵メモリ38に書き込まれる。 Similar to the arbitration unit 33B shown in FIG. 7, the arbitration unit 33C outputs a write request to the memory interface unit 37C to write at least one of the change information and the access information to the built-in memory 38. The memory interface unit 37C generates a write command including at least one of the change information and the access information based on the received write request, and outputs the generated write command to the write port WP of the built-in memory 38. Then, at least one of the change information and the access information is written to the built-in memory 38.

一方、システムSYSの起動が完了し、大容量メモリ400がアクセス可能になった場合、調停部33Cは、内蔵メモリ38が保持する変化情報およびアクセス情報を内蔵メモリ38から読み出す読み出し要求をメモリインタフェース部37Cに出力する。メモリインタフェース部37Cは、受信した読み出し要求に基づいて読み出しコマンドを生成して内蔵メモリ38に出力し、内蔵メモリ38から変化情報およびアクセス情報を読み出す。メモリインタフェース部37Cは、内蔵メモリ38から読み出した変化情報およびアクセス情報を、読み出し要求の応答として調停部33Cに出力する。 On the other hand, when the startup of the system SYS is completed and the large-capacity memory 400 becomes accessible, the arbitration unit 33C outputs a read request to the memory interface unit 37C to read from the built-in memory 38 the change information and access information held in the built-in memory 38. The memory interface unit 37C generates a read command based on the received read request and outputs it to the built-in memory 38, reading the change information and access information from the built-in memory 38. The memory interface unit 37C outputs the change information and access information read from the built-in memory 38 to the arbitration unit 33C as a response to the read request.

調停部33Cは、メモリインタフェース部37Cから受信した変化情報およびアクセス情報を、ログ生成部34Cに出力する。また、調停部33Cは、システムSYSの起動が完了した後、状態検出部31から受信する変化情報およびレジスタアクセス検出部32から受信するアクセス情報を調停後、ログ生成部34Cに出力する。 The arbitration unit 33C outputs the change information and access information received from the memory interface unit 37C to the log generation unit 34C. After the startup of the system SYS is completed, the arbitration unit 33C arbitrates the change information received from the state detection unit 31 and the access information received from the register access detection unit 32, and then outputs the information to the log generation unit 34C.

ログ生成部34Cは、図7に示したログ生成部34Bと同様に、調停部33Cから受信した変化情報およびアクセス情報を、大容量メモリ400に向けてDMA転送部39に出力する。DMA転送部39は、受信した変化情報およびアクセス情報を、データバスDBを介して大容量メモリ400にDMA転送する。 Like the log generation unit 34B shown in FIG. 7, the log generation unit 34C outputs the change information and access information received from the arbitration unit 33C to the DMA transfer unit 39 toward the large-capacity memory 400. The DMA transfer unit 39 DMA-transfers the received change information and access information to the large-capacity memory 400 via the data bus DB.

以上、第4の実施形態においても、第1から第3の実施形態と同様の効果を得ることができる。 As described above, the fourth embodiment can achieve the same effects as the first to third embodiments.

以上、各実施形態に基づき本発明の説明を行ってきたが、上記実施形態に示した要件に本発明が限定されるものではない。これらの点に関しては、本発明の主旨をそこなわない範囲で変更することができ、その応用形態に応じて適切に定めることができる。 The present invention has been described above based on each embodiment, but the present invention is not limited to the requirements shown in the above embodiments. These points can be changed without departing from the spirit of the present invention, and can be appropriately determined according to the application form.

10 物理層インタフェース(PHY)
20 エンドポイント
30、30A、30B、30C デバッグコントローラ
31 状態検出部
32 レジスタアクセス検出部
33、33A、33B、33C 調停部
34、34B、34C ログ生成部
35 ログ保持部
36 タイムカウント部
37、37C メモリインタフェース部
38 内蔵メモリ
39 DMA転送部
100 電子機器用デバイス
200 CPU
300 ルートコンプレックス
CNT カウント値
DB データバス
SYS システム
10 Physical Layer Interface (PHY)
20 endpoint 30, 30A, 30B, 30C debug controller 31 state detection unit 32 register access detection unit 33, 33A, 33B, 33C arbitration unit 34, 34B, 34C log generation unit 35 log retention unit 36 time count unit 37, 37C memory interface unit 38 built-in memory 39 DMA transfer unit 100 electronic device device 200 CPU
300 Root Complex CNT Count Value DB Data Bus SYS System

特許第6127766号公報Patent No. 6127766 特開2014-182676号公報JP 2014-182676 A

Claims (6)

プロセッサに接続され、複数の動作状態を有する通信インタフェースと、
前記複数の動作状態の遷移と、前記遷移の検出時の前記プロセッサと前記通信インタフェースとの接続状態を示すリンク情報とを検出する状態検出部と、
前記プロセッサによる記憶部のアクセスを検出するアクセス検出部と、
前記状態検出部が検出した前記遷移を示す遷移情報と前記リンク情報とを含むログを生成し、前記アクセス検出部が検出した前記アクセスを示すアクセス情報を含むログを生成するログ生成部と、
を有することを特徴とする電子機器用デバイス。
a communication interface coupled to the processor and having a plurality of operating states;
a state detection unit that detects transitions of the plurality of operation states and link information indicating a connection state between the processor and the communication interface at the time of detecting the transition;
an access detection unit that detects an access to a storage unit by the processor;
a log generating unit that generates a log including transition information indicating the transition detected by the state detecting unit and the link information, and that generates a log including access information indicating the access detected by the access detecting unit;
A device for electronic equipment comprising:
前記状態検出部による前記遷移の検出と、前記アクセス検出部による前記アクセスの検出とが同時に発生した場合、前記ログ生成部が生成するログの生成順を決定する調停部と、
時間を示す時間情報を出力するタイマと、を有し、
前記調停部は、前記遷移の検出時の前記時間情報を前記遷移情報および前記リンク情報とともに前記ログ生成部に出力し、前記アクセスの検出時の前記時間情報を、前記アクセスを示す前記アクセス情報とともに前記ログ生成部に出力し、
前記ログ生成部は、前記遷移情報および前記リンク情報と、前記アクセス情報とに前記時間情報をそれぞれ付加したログを生成する
ことを特徴とする請求項1に記載の電子機器用デバイス。
an arbitration unit that determines an order of logs to be generated by the log generation unit when the detection of the transition by the state detection unit and the detection of the access by the access detection unit occur simultaneously;
A timer that outputs time information indicating a time,
the arbitration unit outputs the time information at the time of detection of the transition to the log generation unit together with the transition information and the link information, and outputs the time information at the time of detection of the access to the log generation unit together with the access information indicating the access;
The electronic device according to claim 1 , wherein the log generating unit generates a log in which the time information is added to the transition information, the link information, and the access information.
前記遷移情報および前記リンク情報と、前記アクセス情報とを格納可能な内蔵メモリと、
前記電子機器用デバイスの外部に接続され、前記ログ生成部が生成したログを格納可能な外部メモリと、を有し、
前記調停部は、
前記外部メモリがアクセスできない期間、前記遷移情報および前記リンク情報と、前記アクセス情報とを前記内蔵メモリに格納し、
前記外部メモリがアクセス可能になった場合、前記内蔵メモリから前記遷移情報および前記リンク情報と、前記アクセス情報とを読み出して、前記ログ生成部に出力し、
前記ログ生成部は、生成したログを前記外部メモリに向けて出力すること
を特徴とする請求項2に記載の電子機器用デバイス。
an internal memory capable of storing the transition information, the link information, and the access information;
an external memory connected to the outside of the electronic device and capable of storing the log generated by the log generating unit;
The arbitration unit is
storing the transition information, the link information, and the access information in the internal memory during a period when the external memory is inaccessible;
When the external memory becomes accessible, the transition information, the link information, and the access information are read from the internal memory, and output to the log generating unit;
The electronic device according to claim 2 , wherein the log generating unit outputs the generated log to the external memory.
前記通信インタフェースは、PCI Expressインタフェースであり、
前記状態検出部は、リンク・トレーニング・ステータス・ステート・マシンのステータスの遷移を検出すること
を特徴とする請求項1ないし請求項3のいずれか1項に記載の電子機器用デバイス。
the communication interface is a PCI Express interface,
4. The electronic device according to claim 1, wherein the state detection unit detects a transition of a status of a link training status state machine.
プロセッサに接続され、複数の動作状態を有する通信インタフェースを有する電子機器用デバイスの制御方法であって、
前記複数の動作状態の遷移と、前記遷移の検出時の前記プロセッサと前記通信インタフェースとの接続状態を示すリンク情報とを検出し、
前記プロセッサによる記憶部のアクセスを検出し、
検出した前記遷移を示す遷移情報と前記リンク情報とを含むログを生成し、検出した前記アクセスを示すアクセス情報を含むログを生成すること
を特徴とする電子機器用デバイスの制御方法。
1. A method for controlling an electronic device having a communication interface connected to a processor and having a plurality of operating states, comprising:
detecting transitions of the plurality of operation states and link information indicating a connection state between the processor and the communication interface at the time of detecting the transitions;
Detecting an access of a storage unit by the processor;
A method for controlling a device for an electronic device, comprising: generating a log including transition information indicating the detected transition and the link information; and generating a log including access information indicating the detected access.
プロセッサに接続され、複数の動作状態を有する通信インタフェースを有する電子機器用デバイスの制御プログラムであって、
前記複数の動作状態の遷移と、前記遷移の検出時の前記プロセッサと前記通信インタフェースとの接続状態を示すリンク情報とを検出し、
前記プロセッサによる記憶部のアクセスを検出し、
検出した前記遷移を示す遷移情報と前記リンク情報とを含むログを生成し、検出した前記アクセスを示すアクセス情報を含むログを生成する
処理をコンピュータに実行させること
を特徴とする電子機器用デバイスの制御プログラム。
A control program for an electronic device having a communication interface connected to a processor and having a plurality of operating states, comprising:
detecting transitions of the plurality of operation states and link information indicating a connection state between the processor and the communication interface at the time of detecting the transitions;
Detecting an access of a storage unit by the processor;
A control program for an electronic device, comprising: causing a computer to execute a process of generating a log including transition information indicating the detected transition and the link information; and generating a log including access information indicating the detected access.
JP2020137597A 2020-08-17 2020-08-17 DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE Active JP7516974B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020137597A JP7516974B2 (en) 2020-08-17 2020-08-17 DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020137597A JP7516974B2 (en) 2020-08-17 2020-08-17 DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE

Publications (2)

Publication Number Publication Date
JP2022033610A JP2022033610A (en) 2022-03-02
JP7516974B2 true JP7516974B2 (en) 2024-07-17

Family

ID=80375422

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020137597A Active JP7516974B2 (en) 2020-08-17 2020-08-17 DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE

Country Status (1)

Country Link
JP (1) JP7516974B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025032789A1 (en) * 2023-08-10 2025-02-13 株式会社ソシオネクスト Interface circuit and semiconductor integrated circuit

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011248814A (en) 2010-05-31 2011-12-08 Nec Corp Device having pci express link error detection and automatic restoration function
JP2014182676A (en) 2013-03-21 2014-09-29 Nec Corp Log collection device, arithmetic unit, and log collection method
JP2016136292A (en) 2015-01-23 2016-07-28 株式会社リコー Semiconductor device, log acquisition method, and electronic apparatus
JP2018163557A (en) 2017-03-27 2018-10-18 日本電気株式会社 Server system, switch module and log acquisition method
CN110377469A (en) 2019-07-12 2019-10-25 苏州浪潮智能科技有限公司 A kind of detection system and method for PCIE device
US20190361763A1 (en) 2018-05-25 2019-11-28 Qualcomm Incorporated Safe handling of link errors in a peripheral component interconnect express (pcie) device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011248814A (en) 2010-05-31 2011-12-08 Nec Corp Device having pci express link error detection and automatic restoration function
JP2014182676A (en) 2013-03-21 2014-09-29 Nec Corp Log collection device, arithmetic unit, and log collection method
JP2016136292A (en) 2015-01-23 2016-07-28 株式会社リコー Semiconductor device, log acquisition method, and electronic apparatus
JP2018163557A (en) 2017-03-27 2018-10-18 日本電気株式会社 Server system, switch module and log acquisition method
US20190361763A1 (en) 2018-05-25 2019-11-28 Qualcomm Incorporated Safe handling of link errors in a peripheral component interconnect express (pcie) device
CN110377469A (en) 2019-07-12 2019-10-25 苏州浪潮智能科技有限公司 A kind of detection system and method for PCIE device

Also Published As

Publication number Publication date
JP2022033610A (en) 2022-03-02

Similar Documents

Publication Publication Date Title
US9952963B2 (en) System on chip and corresponding monitoring method
JP3175757B2 (en) Debug system
CN102360329B (en) Bus monitoring and debugging control device and methods for monitoring and debugging bus
EP3369015B1 (en) Methods and circuits for debugging circuit designs
US6615374B1 (en) First and next error identification for integrated circuit devices
CN108132910A (en) System interconnection and the system on chip with system interconnection
CN101556551A (en) Hardware acquisition system and method for equipment failure log
CN117076337B (en) Data transmission method and device, electronic equipment and readable storage medium
US6584586B1 (en) Apparatus and method for capturing and transferring internal system activity
US10042692B1 (en) Circuit arrangement with transaction timeout detection
US10911259B1 (en) Server with master-slave architecture and method for reading and writing information thereof
JP7516974B2 (en) DEVICE FOR ELECTRONIC APPLICATION, CONTROL METHOD FOR ELECTRONIC APPLICATION DEVICE, AND CONTROL PROGRAM FOR ELECTRONIC APPLICATION DEVICE
US6643796B1 (en) Method and apparatus for providing cooperative fault recovery between a processor and a service processor
CN112685212B (en) Processor exception debugging and tracking method, device and system
US5673419A (en) Parity bit emulator with write parity bit checking
US7051237B2 (en) Program-controlled unit
CN100386733C (en) Debugging support unit with execution stopping capability on chip electronic hardware and method thereof
JP2003263339A (en) Microcomputer with built-in debug function
JP2003022222A (en) Information processing apparatus and its maintenance method
CN120104542B (en) PCIe device bandwidth management device, method and server
CN118689814A (en) System on chip debugging system, device and system on chip debugging method
JP3008914B2 (en) Semiconductor integrated circuit
CN118819983A (en) PCIe device debugging method, system, device, equipment and medium
JP2004348635A (en) Method for developing program
CN119167849A (en) Chip verification method and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240516

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240604

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240617

R150 Certificate of patent or registration of utility model

Ref document number: 7516974

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150