JP2015005124A - Device for electronic apparatus, and electronic apparatus mounting the device therein - Google Patents
Device for electronic apparatus, and electronic apparatus mounting the device therein Download PDFInfo
- Publication number
- JP2015005124A JP2015005124A JP2013129851A JP2013129851A JP2015005124A JP 2015005124 A JP2015005124 A JP 2015005124A JP 2013129851 A JP2013129851 A JP 2013129851A JP 2013129851 A JP2013129851 A JP 2013129851A JP 2015005124 A JP2015005124 A JP 2015005124A
- Authority
- JP
- Japan
- Prior art keywords
- access
- log
- log information
- time
- cpu
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、電子機器用のデバイス及び前記デバイスを搭載した電子機器に関する。 The present invention relates to a device for electronic equipment and an electronic equipment equipped with the device.
近年、CPU I/Fを有し、CPUがアクセスが可能なモジュールを持つ半導体デバイスが様々な電子装置に用いられている。電子装置の一例としては、例えばコピー機等の画像形成装置が挙げられる。 In recent years, a semiconductor device having a CPU I / F and having a module accessible by the CPU is used in various electronic apparatuses. An example of the electronic apparatus is an image forming apparatus such as a copying machine.
こうした電子装置に障害が発生した場合の解析において、従来行われている一般的な方法は、ICE(In Circuit Emulator)等のデバッグ装置を使用してCPUのアクセス内容をトレースしたり、レジスタへの設定を行ったりすることで、原因を究明する方法である。 In the analysis when a failure occurs in such an electronic device, a general method conventionally performed is to trace the access contents of the CPU using a debugging device such as ICE (In Circuit Emulator) or It is a method of investigating the cause by making settings.
ただし、この方法では、解析に際しデバッグ装置を持ち込み、接続するといった準備に手間が掛かる。その上、この方法では、CPUを内蔵するデバイスの場合、CPU I/Fにデバッグ装置を接続することができないため、デバッグ装置を使用して解析する方法を採ることは不可能であった。 However, with this method, it takes time to prepare for bringing in and connecting a debugging device for analysis. In addition, in this method, since a debug device cannot be connected to the CPU I / F in the case of a device with a built-in CPU, it has been impossible to take a method of analysis using the debug device.
このような問題の解決を図ることが可能な方法として、CPUからレジスタへのアクセスをモニターし、検知されたアクセスのログ情報を作成し、作成したログの内蔵メモリへの保存、外部への出力が可能なハードウェアをデバイス内部に備えることで、デバッグの容易化を図る方法が知られている(例えば、特許文献1を参照)。 As a method that can solve such problems, CPU access to registers is monitored, detected access log information is created, and the created logs are saved in internal memory and output to the outside There is known a method of facilitating debugging by providing hardware capable of performing the above in the device (for example, see Patent Document 1).
特許文献1では、CPUからレジスタへのアクセスをモニターし、ログ情報を取得する。その際、特許文献1は、不要なアクセスのログ情報の取得による処理負担やリソースの無駄使いをすることなくログ情報を取得することを目的とする。そのため、特許文献1では、CPUからレジスタへのアクセスの種類によりログ情報の要及び不要を判断し、必要なログ情報のみを取得することが開示されている。
In
しかしながら、上述したようにレジスタへのアクセスをモニターし、ログ情報を作成する方法では、取得対象とした全てのアクセスに対してアドレス(例えば、32bit)及びデータ(例えば、16bit)の情報をそのままログ情報として保存する。このため、解析時間が長い場合や取得対象とするアクセスの範囲が広い場合にはログ情報のデータ量が膨大になり、保存に必要なメモリの容量が大きくなり、コストが高くなるという課題があった。 However, as described above, in the method of monitoring the access to the register and creating the log information, the address (for example, 32 bits) and data (for example, 16 bits) information is directly logged for all accesses to be acquired. Save as information. For this reason, when the analysis time is long or the range of access to be acquired is wide, the amount of log information becomes enormous, the memory capacity required for storage increases, and the cost increases. It was.
上記課題に鑑み、一側面では、制御手段からレジスタへのアクセスに対するログ情報を蓄積するメモリの容量を抑えることを目的とする。 In view of the above problems, an object of one aspect is to suppress the capacity of a memory that stores log information for access to a register from a control unit.
上記課題を解決するために、一の態様によれば、
制御手段からアクセスされるモジュールを有する電子機器用のデバイスであって、
制御手段から前記モジュールへのアクセスを検知するアクセス検知部と、
前記検知されたアクセスに関するログ情報を作成するログ作成部と、を有し、
前記ログ作成部は、
前記検知されたアクセスが空間的に連続したアドレスへの時間的に連続したアクセスである場合、前記検知されたアクセスに関するログ情報に、前記連続したアクセスの先頭のアクセスの時刻及びアドレスと、前記連続したアクセスの前記先頭のアクセスから最終のアクセスまでの時刻の差分及びアドレスの差分と、を含める、
ことを特徴とする電子機器用のデバイスが提供される。
In order to solve the above problem, according to one aspect,
A device for electronic equipment having a module accessed from a control means,
An access detector for detecting access to the module from the control means;
A log creation unit for creating log information relating to the detected access,
The log creating unit
When the detected access is a temporally continuous access to a spatially continuous address, the log information related to the detected access includes the time and address of the top access of the continuous access and the continuous Including the time difference and the address difference from the top access to the last access
A device for electronic equipment is provided.
一の態様によれば、制御手段からレジスタへのアクセスに対するログ情報を蓄積するメモリの容量を抑えることができる。 According to one aspect, it is possible to suppress the capacity of the memory that stores log information for access from the control means to the register.
以下、本発明の好適な実施形態について添付の図面を参照しながら説明する。なお、本明細書及び図面において、実質的に同一の構成については、同一の符号を付することにより重複した説明を省く。 DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described with reference to the accompanying drawings. In addition, in this specification and drawing, about the substantially same structure, the duplicate description is abbreviate | omitted by attaching | subjecting the same code | symbol.
[電子機器用のデバイス]
まず、本発明の一実施形態に係る電子機器用のデバイスについて、図1を参照しながら説明する。図1は、一実施形態に係る電子機器用のデバイスの全体構成図である。
[Devices for electronic devices]
First, a device for an electronic apparatus according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is an overall configuration diagram of a device for an electronic apparatus according to an embodiment.
電子機器用のデバイス601は、ターゲット基板600上に形成されている。ターゲット基板600は、電子機器の回路部を構成する部品である。ターゲット基板600には、CPU620と、CPU620からアクセスを受ける電子機器用のデバイス601とが搭載されている。図1の構成例では、CPU620が、デバイス601に対して外付けになっており、デバイス601内で取得される、CPU620からのアクセスに対するログ情報を記憶する内蔵メモリ609がデバイス601に内蔵されている。なお、CPU620は、デバイス601に内蔵されてもよい。また、内蔵メモリ609は、デバイス601に対して外付けになっていてもよい。CPU620は、制御手段の一例である。
The
デバイス601を搭載する電子機器は、例えばコピー機等の画像形成装置等であってもよい。この場合、デバイス601は、例えば、プリンタ制御用のASIC(Application Specific Integrated Circuit)といった、CPU I/Fを有するデバイスであってもよい。図1に示すように、デバイス601は、CPU I/F603、機能モジュール607a、607b、607c、内蔵メモリ609、シリアルI/F611及びデバッグ制御部613を有する。CPU I/F603は、割り込みコントローラ605を含む。
The electronic device in which the
CPU I/F603は、CPUバスを介してCPU620に接続されている。CPU I/F603は、デバイス601内のレジスタI/Fを介して機能モジュールA607a、機能モジュールB607b、機能モジュールC607c(以下、総称して機能モジュール607ともいう。)にそれぞれ接続されている。
The CPU I / F 603 is connected to the
機能モジュールA607a、機能モジュールB607b、機能モジュールC607cは、デバイス601に内蔵された所望の機能を有するモジュールに相当し、それぞれCPU620からアクセス可能なレジスタを有する。CPU620から機能モジュール607へのアクセスは、内部バス(レジスタI/F)経由で行われる。なお、図1では、機能モジュールA607a、機能モジュールB607b、機能モジュールC607cの3つのモジュールを例に挙げているが、機能モジュールのモジュール数はいくつでも構わない。
The function module A 607a, the
内蔵メモリ609は、CPU620から機能モジュール607のレジスタへのアクセスのログ情報を格納するために用いられる記憶装置である。内蔵メモリ609に格納されたログ情報は、CPU620から直接アクセスすること、または、後述するターミナルPC630からアクセスすることにより取得可能である。
The built-in
シリアルI/F611は、ターミナルPC630から内蔵メモリ609にアクセスするためのI/Fとして機能する。ターミナルPC630は、シリアル通信が可能な外部機器の一例である。シリアルI/F611は、内蔵メモリ609に蓄積されたログ情報を外部機器に出力するためのシリアル通信部の一例である。ターミナルPC630とシリアルI/F611とは、シリアルに接続されている。
The serial I /
ターミナルPC630は、シリアル操作が可能な表示用のPC(Personal Computer)である。ターミナルPC630は、シリアルI/F611を介して内蔵メモリ609にアクセスし、内蔵メモリ609に格納されたアクセスのログ情報を取得することが可能な管理端末機である。
The terminal PC 630 is a display PC (Personal Computer) capable of serial operation. The terminal PC 630 is a management terminal capable of accessing the
デバッグ制御部613は、CPU620から機能モジュール607へのアクセスを監視し、検知されたアクセスのログ情報を作成して内蔵メモリ609に出力するモジュールである。デバッグ制御部613は、監視状況に応じて、割り込みコントローラ605を介してCPU620に割り込みを通知することができる。
The
[デバッグ制御部の構成]
次に、一実施形態に係るデバッグ制御部613の内部構成について、図2を参照しながら説明する。図2は、一実施形態に係るデバッグ制御部の内部構成図である。デバッグ制御部613は、アクセス検知部641、タイマー643、ログ作成部645及び制御レジスタ647を有する。
[Configuration of debug controller]
Next, the internal configuration of the
アクセス検知部641は、レジスタI/Fを用いてCPU620から機能モジュール607のレジスタに対するアクセスを監視する。アクセス検知部641は、検知したアクセスのログ情報を生成して内蔵メモリ609に出力する。
The
アクセス検知部641は、通常、機能モジュール607のレジスタに対する全てのアクセスに対して下記に示したログ情報を記録する。
・タイムスタンプ
・アドレス
・アクセス種別(リード/ライト)
・データ
一方、アクセス検知部641は、空間的に連続したアドレスへ、時間的に連続して複数回、同じアクセス種別(リード/ライト)のアクセスを検知した場合は、下記の情報をアクセスのログ情報として記録する。
・先頭アクセスのタイムスタンプ
・先頭アクセスのアドレス
・アクセス種別(リード/ライト)
・全てのアクセスのデータ
・最終アクセスと先頭アクセスのタイムスタンプ差分
・最終アクセスと先頭アクセスのアドレス差分
上記「空間的に連続したアドレスへ、時間的に連続して複数回、同じアクセス種別(リード/ライト)のアクセスを検知した場合」のうち「空間的に連続したアドレスへのアクセス」は、CPU620から機能モジュール607のレジスタに対する2回以上の連続したアクセスの、アクセス先アドレスが連続(例えば、2回目のアドレスが1回目のアドレス+1のアドレスである場合)していることをいう。
The
・ Time stamp ・ Address ・ Access type (read / write)
Data On the other hand, when the
-Time stamp of top access-Address of top access-Access type (read / write)
・ Data for all accesses ・ Timestamp difference between last access and head access ・ Address difference between last access and head access The above “same access type (read / read to multiple spatially continuous addresses) “Access to spatially continuous addresses” among “when a write access is detected” indicates that the access destination addresses of two or more consecutive accesses from the
また、上記「空間的に連続したアドレスへ、時間的に連続して複数回、同じアクセス種別(リード/ライト)のアクセスを検知した場合」のうち「時間的に連続したアドレスへのアクセス」は、上記の「CPU620から機能モジュール607のレジスタに対する2回以上の連続したアクセス」をいう。この場合、2回目のアクセス時間が1回目のアクセス時間+1ms(又は+1s)のように、ある単位で連続しているかどうかは問わない。
In addition, “access to temporally continuous addresses” in the above “when the access of the same access type (read / write) is detected multiple times in succession to spatially continuous addresses” is The above-mentioned “two or more consecutive accesses from the
タイマー643は、カウンターを用いてアクセスに対する時間を計時する。タイマー643は、CPU620から機能モジュールへのアクセスに対する時間のカウント周期を可変に設定可能である。カウント周期の単位は、レジスタに設定することができる。タイマー643によるカウント値は、タイムスタンプとしてリアルタイムでタイマー643からアクセス検知部641に通知される。このようにタイマー643により解析するタイムレンジに応じて適切な分解能のタイムスタンプがログ情報に付加され得る。これにより、ログ情報を用いてより詳細な解析ができるようになる。
The
ログ作成部645は、アクセス検知部641により検知されたアクセスに関するログ情報を作成する。ログ作成部645は、検知されたアクセスが空間的に連続したアドレスへの時間的に連続したアクセスである場合、検知されたアクセスに関するログ情報に、連続したアクセスの先頭のアクセスの時刻及びアドレスと、連続したアクセスの先頭のアクセスから最終のアクセスまでの時刻の差分及びアドレスの差分とを含める。ログ作成部645は、アクセス検知部641に通知されたアクセスに対する時間情報(例えば、タイムスタンプ)をログ情報に含めてもよい。ログ情報にタイムスタンプ等の時間情報を含めることで、そのログ情報を用いてより詳細な解析を行うことができる。
The
制御レジスタ647は、下記に示した各種のレジスタを有する。
The
(1)ログ取得モード(log_mode)
制御レジスタ647は、ログ取得モードの制御レジスタを「0」又は「1」に設定する。
0:通常モード
1:差分モード
ログ取得モードが通常モード「0」に設定されている場合、機能モジュール607のレジスタに対する全てのアクセスに対して、タイムスタンプ及びアドレスがログ情報として記録される。
(1) Log acquisition mode (log_mode)
The control register 647 sets the control register for the log acquisition mode to “0” or “1”.
0: Normal mode 1: Differential mode When the log acquisition mode is set to the normal mode “0”, a time stamp and an address are recorded as log information for all accesses to the registers of the
ログ取得モードが差分モード「1」に設定されている場合、空間的に連続したアドレスへの時間的に連続したアクセスは、最終アクセスのタイムスタンプとアドレス、および最終アクセスと先頭アクセスのタイムスタンプ差分、最終アクセスと先頭アクセスのアドレス差分のみがログ情報として記録される。 When the log acquisition mode is set to the difference mode “1”, the temporally continuous access to the spatially continuous addresses is the time stamp difference between the last access and the time stamp between the last access and the top access. Only the address difference between the last access and the head access is recorded as log information.
(2)ログ取得タイミング制御(log_timing)
制御レジスタ647は、ログ取得タイミングの制御レジスタを「0」又は「1」に切り替える。
(2) Log acquisition timing control (log_timing)
The
ログ取得タイミングの制御レジスタが「0」に設定されている場合、電源オンと同時にログ取得を開始し、電源オフまで取得を継続する。 When the log acquisition timing control register is set to “0”, log acquisition is started as soon as the power is turned on, and the acquisition is continued until the power is turned off.
ログ取得タイミングの制御レジスタが「1」に設定されている場合、下記のログ取得の開始指示、ログ取得の終了指示を有効にする。 When the log acquisition timing control register is set to “1”, the following log acquisition start instruction and log acquisition end instruction are validated.
(3)ログ取得の開始指示(log_start)
log_timingの制御レジスタが「1」に設定されているときのみ有効である。つまり、log_timingの制御レジスタが「1」に設定されているときに、制御レジスタ647がログ取得の開始指示log_startを「1」に設定すると、ログ情報の取得が開始される。
(3) Log acquisition start instruction (log_start)
Valid only when the log_timing control register is set to "1". In other words, when the control register 647 sets the log acquisition start instruction log_start to “1” while the log_timing control register is set to “1”, acquisition of log information is started.
(4)ログ取得の終了指示(log_end)
log_timingの制御レジスタが「1」に設定されているときのみ有効である。つまり、log_timingの制御レジスタが「1」に設定されているときに、制御レジスタ647がログ取得の終了指示log_endを「1」に設定すると、ログ取得の取得が終了する。
(4) Log acquisition end instruction (log_end)
Valid only when the log_timing control register is set to "1". That is, when the control register 647 sets the log acquisition end instruction log_end to “1” while the log_timing control register is set to “1”, the log acquisition acquisition ends.
[タイマーのカウント周期]
また、制御レジスタ647は、例えば下記のようにタイマー643のカウント周期(タイマー周期ともいう)を可変に設定可能である。タイマー643は、設定されたカウント周期の分だけ時間が経過する毎に、タイムスタンプの値をインクリメントする。例えば、タイマー643が16ビット(bit)で下記カウント周期の設定値を「4」とした場合、タイマー643のカウント周期は1msとなり、タイマー643が1周すると65.535sのタイムスタンプが付加されることになる。
0:タイマー周期100ns
1:タイマー周期1μs
2:タイマー周期10μs
3:タイマー周期100μs
4:タイマー周期1ms
[アクセスのログ情報のフォーマット例]
次に、一実施形態に係るアクセスのログ情報のフォーマット例について、図3を参照しながら説明する。図3(a)は、通常時のアクセスのログ情報100のフォーマット例である。図3(b)は、連続アクセス時のアクセスのログ情報200のフォーマット例である。それぞれ8回分のアクセスのログ情報100,200が取得された場合の例が示されている。
[Timer count cycle]
Further, the
0: Timer period 100ns
1: Timer period 1μs
2:
3:
4:
[Example of access log information format]
Next, a format example of access log information according to an embodiment will be described with reference to FIG. FIG. 3A shows a format example of the
図3(a)のアクセスのログ情報100のフォーマット例において、time[15:0]はタイムスタンプ(タイムスタンプ)101を示し、addr[31:1]はアドレス102を示し、rwはアクセス種別(リード/ライト)103を示し、data[15:0]はデータ104を示す。
In the format example of the
図3(b)のアクセスのログ情報200のフォーマット例において、time_st[15:0]は先頭アクセスのタイムスタンプ(タイムカウンタ)201を示し、addr_st[31:1]は先頭アクセスのアドレス202を示す。また、rwはアクセス種別(リード/ライト)203を示し、data[15:0]はデータ204を示す。また、time_length[7:0]は最終アクセスと先頭アクセスのタイムスタンプの差分205を示し、addr_length[7:0]は最終アクセスと先頭アクセスのアドレスの差分206を示す。
In the format example of the
(通常時)
図3(a)のアクセスのログ情報100では、タイムスタンプ101(time[15:0])が16ビット(2バイト)、アドレス102及びrw103(addr[31:1]/rw)が32ビット(4バイト)、データ104(data[15:0])が16ビット(2バイト)である。
(Normal time)
In the
よって、通常時のアクセスのログ情報100のデータ量は下記の式で表される。
アクセス回数が1回あたりのアクセスのログ情報100のサイズ
=2バイト(time)+4バイト(addr/rw)+2バイト(data)=8バイト
アクセス回数nのときのアクセスのログ情報100のデータ量
=8バイト(アクセス1回あたりのログサイズ)×アクセス回数n
(連続アクセス時)
図3(b)のアクセスのログ情報200では、先頭アクセスのタイムスタンプ201(time_st[15:0])が16ビット(2バイト)、先頭アクセスのアドレス202及びrw203(addr_st[31:1]/rw)が32ビット(4バイト)、データ204(data[15:0])が16ビット(2バイト)である。また、最終アクセスと先頭アクセスのタイムスタンプの差分205(time_length[7:0])が8ビット(1バイト)、最終アクセスと先頭アクセスのアドレスの差分206(addr_length[7:0])が8ビット(1バイト)である。
Therefore, the data amount of the
Size of
(During continuous access)
In the
よって、連続アクセス時のアクセスのログ情報200のデータ量は下記の式で表される。
アクセス回数nのときのアクセスのログ情報200のデータ量
=2バイト(time_st)+4バイト(addr_st)+[2バイト(data)×アクセス回数n]+1バイト(time_length)+1バイト(addr_length)
[連続アクセス回数とログ情報のデータ量]
次に、空間的に連続したアドレスへの時間的に連続したアクセスの回数とログ情報200のデータ量(図3(b)の連続アクセス時)と、図3(a)の通常時のログ情報100のデータ量とを比較して説明する。図4の横軸は、連続アクセス回数を示し、縦軸は、ログ情報のデータ量(バイト)を示す。
Therefore, the data amount of the
Data amount of
[Number of consecutive accesses and amount of log information]
Next, the number of temporally continuous accesses to spatially continuous addresses, the data amount of the log information 200 (during continuous access in FIG. 3B), and the normal log information in FIG. A description will be given in comparison with 100 data amounts. The horizontal axis in FIG. 4 indicates the number of consecutive accesses, and the vertical axis indicates the data amount (bytes) of the log information.
これによれば、連続アクセスの回数が多いほど、連続アクセス時のログ情報200のデータ量は、通常時のログ情報100のデータ量と比較して少なくなり、ログ情報のデータ量の削減効果が大きい。例えば、連続アクセスの回数が4回のとき、連続アクセス時のログ情報200のデータ量は、通常時のログ情報100のデータ量の半分である。一方、連続アクセスの回数が10回のとき、連続アクセス時のログ情報200のデータ量は、通常時のログ情報100のデータ量の約1/3となり、連続アクセスの回数が多いほどデータ量の削減効果が大きいことがわかる。
According to this, as the number of continuous accesses increases, the data amount of the
[シーケンス(CPUからログ情報を読み出す場合)]
次に、一実施形態に係るログ情報の読み出しのシーケンスの一例について、図5に示したシーケンスを参照しながら説明する。図5は、CPU620からログ情報を読み出し、そのログ情報を用いて電子機器用のデバイス601を解析する際にデバッグ制御部613を動作させたときのシーケンス図である。
[Sequence (when reading log information from the CPU)]
Next, an example of a log information reading sequence according to an embodiment will be described with reference to the sequence shown in FIG. FIG. 5 is a sequence diagram when the log information is read from the
本実施形態に係るログ情報の読み出しのシーケンスでは、まず、CPU620は、予め、デバッグ制御部613の各制御レジスタ647の設定を行う(ステップS10)。本実施形態では、CPU620は、制御レジスタ647にてlog_timing=0を予め設定する。
In the log information reading sequence according to the present embodiment, the
デバイス601が搭載されている電子装置を動作させると、CPU620から、デバイス601の機能モジュール607のレジスタに対するアクセス(レジスタアクセス)が発生する(ステップS12、S14)。アクセス検知部641は、この機能モジュール607のレジスタに対するアクセスを検知する。ログ作成部645は、アクセス検知部641により検知されたアクセスのログ情報を作成し、内蔵メモリ609に蓄積する(ステップS16)。動作終了後、CPU620は、コマンド操作を行うことで内蔵メモリ609からログ情報を読み出し、取得する(ステップS18)。
When the electronic device in which the
以上、CPU620からログ情報を読み出す場合のログ情報の読み出しのシーケンスについて説明した。これによれば、内蔵メモリ609に蓄積したログ情報をソフトウェアにより読み出すことができる。
The log information reading sequence when the log information is read from the
[シーケンス(ターミナルPCからログ情報を読み出す場合)]
次に、一実施形態に係るログ情報の読み出しのシーケンスの他の例について、図6に示したシーケンスを参照しながら説明する。図6は、ターミナルPC630からログ情報を読み出し、そのログ情報を用いて電子機器用のデバイス601を解析する際にデバッグ制御部613を動作させたときのシーケンス図である。
[Sequence (when reading log information from terminal PC)]
Next, another example of the log information reading sequence according to the embodiment will be described with reference to the sequence shown in FIG. FIG. 6 is a sequence diagram when the log information is read from the
本実施形態に係るログ情報の読み出しのシーケンスでは、まず、CPU620は、予め、デバッグ制御部613の各制御レジスタ647の設定を行う(ステップS20)。本実施形態では、CPU620は、制御レジスタ647にてlog_timing=0を予め設定する。
In the log information reading sequence according to the present embodiment, the
デバイス601が搭載されている電子装置を動作させると、CPU620から、デバイス601の機能モジュール607のレジスタに対するアクセス(レジスタアクセス)が発生する(ステップS22、S24)。アクセス検知部641は、この機能モジュール607のレジスタに対するアクセスを検知する。ログ作成部645は、アクセス検知部641により検知されたアクセスのログ情報を作成し、内蔵メモリ609に蓄積する(ステップS26)。動作終了後、ターミナルPC630は、ログ情報を読み出すためのコマンド操作を行う(ステップS28)。ターミナルPC630は、内蔵メモリ609からログ情報を読み出し、取得する(ステップS29)。
When the electronic device in which the
以上、ターミナルPC630からログ情報を読み出す場合のログ情報の読み出しのシーケンスについて説明した。これによれば、シリアル通信可能な外部機器、例えばPC等の機器をデバイス601に接続することで、外部機器が直接ログ情報を取得することができる。
The log information reading sequence when reading log information from the
[シーケンス(ログ取得開始/終了指示がある場合)]
次に、一実施形態に係るログ情報の読み出しのシーケンスの他の例について、図7に示したシーケンスを参照しながら説明する。図7は、CPU620からログ取得の開始指示及び終了指示に応じてログ情報を読み出し、そのログ情報を用いて電子機器用のデバイス601を解析する際にデバッグ制御部613を動作させたときのシーケンス図である。
[Sequence (when there is a log acquisition start / end instruction)]
Next, another example of the log information reading sequence according to the embodiment will be described with reference to the sequence shown in FIG. FIG. 7 shows a sequence when the log information is read from the
本実施形態に係るログ情報の読み出しのシーケンスでは、まず、CPU620は、予め、デバッグ制御部613の各制御レジスタ647の設定を行う(ステップS30)。本実施形態では、CPU620は、制御レジスタ647にてlog_timing=1を予め設定する。
In the log information reading sequence according to the present embodiment, the
デバイス601が搭載されている電子装置を動作させると、CPU620から、デバイス601の機能モジュール607のレジスタに対するアクセス(レジスタアクセス)が発生する(ステップS32、S36、S38)。CPU620が、ログ取得の開始指示を行う前(つまり、「log_start」が1に設定される前)には、CPU620からの機能モジュール607のレジスタに対するアクセスが発生してもログ情報の取得は行われない。例えば、ステップS32にて発生したアクセスはログ取得の開始指示を行う前に行われているため、そのアクセスについてのログ情報は取得されない。つまり、CPU620からのログ取得の開始指示(log_start=1)が行われる前の期間T1は、ログ情報は取得されない。
When the electronic device in which the
一方、CPU620がログ取得の開始指示を行い(ステップS34)、その後に機能モジュール607のレジスタに対するアクセスが発生した場合、アクセス検知部641は、そのアクセスを検知する。例えば、ステップS36、S38のアクセスが検知されると、ログ作成部645は、それらの検知されたアクセスに対するログ情報を作成し、内蔵メモリ609に蓄積する(ステップS40)。
On the other hand, when the
その後、CPU620がログ取得の終了指示(log_start=0)を行う(ステップS42)。CPU620からのログ取得の開始指示(log_start=1)からログ取得の終了指示(log_start=0)までの期間T2において、アクセス検知部641がレジスタへのアクセスを検知すると、ログ作成部645は、それらの検知されたアクセスに対するログ情報を作成し内蔵メモリ609に蓄積する。
Thereafter, the
CPU620がログ取得の終了指示を行った後は、レジスタへのアクセスが発生しても(ステップS44)、ログ情報は取得されない。例えば、ログ取得の終了指示(log_start=0)が行われた後の期間T3は、ログ情報は取得されない。
After the
なお、動作終了後、CPU620は、コマンド操作を行うことで内蔵メモリ609からログ情報を読み出し、そのログ情報を取得する(ステップS46)。
After the operation is completed, the
以上、CPU620からログ取得の開始指示および終了指示がある場合のログ情報の読み出しのシーケンスについて説明した。これによれば、ログ情報を取得する期間をソフトウェアにより任意に設定できる。このため、必要な期間のみのログ情報を取得することができ、内蔵メモリ609を効率よく使用することができる。
The sequence of reading log information when there is a log acquisition start instruction and end instruction from the
以上に説明したように、本実施形態に係る電子機器用のデバイス601へのCPU620からのアクセスに対するログ情報の取得に際して、空間的に連続したアドレスへ、時間的に連続したアクセスが発生した場合には、全てのアクセスに対して時刻とアドレスとをログ情報として記録するのではなく、先頭アクセスの時刻及びアドレスと、先頭アクセスから最終アクセスまでの時間差分及び先頭アクセスから最終アクセスまでのアドレス差分のみをログ情報として記録する。これにより、ログ情報を蓄積する内蔵メモリ609の容量を小さく抑えることができる。
As described above, when log information is acquired for access from the
以上、電子機器用のデバイス及びそのデバイスを搭載した電子機器を上記実施形態により説明したが、本発明は上記実施例に限定されるものではなく、本発明の範囲内で種々の変形及び改良が可能である。 As mentioned above, although the device for electronic devices and the electronic device carrying the device were demonstrated by the said embodiment, this invention is not limited to the said Example, Various deformation | transformation and improvement are within the scope of the present invention. Is possible.
600 ターゲット基板
601 デバイス
603 CPU I/F
605 割り込みコントローラ
607、607a、607b、607c 機能モジュール
609 内蔵メモリ
611 シリアルI/F
613 デバッグ制御部
620 CPU
641 アクセス検知部
643 タイマー
645 ログ作成部
647 制御レジスタ
600
605 Interrupt
613
641
Claims (7)
制御手段から前記モジュールへのアクセスを検知するアクセス検知部と、
前記検知されたアクセスに関するログ情報を作成するログ作成部と、を有し、
前記ログ作成部は、
前記検知されたアクセスが空間的に連続したアドレスへの時間的に連続したアクセスである場合、前記検知されたアクセスに関するログ情報に、前記連続したアクセスの先頭のアクセスの時刻及びアドレスと、前記連続したアクセスの前記先頭のアクセスから最終のアクセスまでの時刻の差分及びアドレスの差分と、を含める、
ことを特徴とする電子機器用のデバイス。 A device for electronic equipment having a module accessed from a control means,
An access detector for detecting access to the module from the control means;
A log creation unit for creating log information relating to the detected access,
The log creating unit
When the detected access is a temporally continuous access to a spatially continuous address, the log information related to the detected access includes the time and address of the top access of the continuous access and the continuous Including the time difference and the address difference from the top access to the last access
A device for electronic equipment characterized by the above.
前記ログ作成部は、
前記タイマーにより計時された前記アクセスに対する時間情報をログ情報に含める、
ことを特徴とする請求項1に記載の電子機器用のデバイス。 A timer for measuring the time for the access;
The log creating unit
The log information includes time information for the access timed by the timer.
The device for electronic equipment according to claim 1.
ことを特徴とする請求項2に記載の電子機器用のデバイス。 The timer can variably set the time counting period for the access,
The device for an electronic device according to claim 2, wherein the device is an electronic device.
前記内蔵メモリに蓄積されたログ情報は、制御手段からの指示に応じて前記制御手段に送信される、
ことを特徴とする請求項1〜3のいずれか一項に記載の電子機器用のデバイス。 A built-in memory for storing the created log information;
The log information stored in the built-in memory is transmitted to the control unit in response to an instruction from the control unit.
The device for electronic equipment as described in any one of Claims 1-3 characterized by the above-mentioned.
ことを特徴とする請求項4に記載の電子機器用のデバイス。 A serial communication unit for outputting log information stored in the built-in memory to an external device;
The device for an electronic device according to claim 4.
ことを特徴とする請求項1〜5のいずれか一項に記載の電子機器用のデバイス。 The log creation unit starts creating log information related to the detected access in response to a log acquisition start instruction from the control unit, and relates to the detected access in response to a log acquisition end instruction from the control unit Finish creating log information,
The device for electronic devices as described in any one of Claims 1-5 characterized by the above-mentioned.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013129851A JP6127766B2 (en) | 2013-06-20 | 2013-06-20 | Device for electronic equipment and electronic equipment equipped with said device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013129851A JP6127766B2 (en) | 2013-06-20 | 2013-06-20 | Device for electronic equipment and electronic equipment equipped with said device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015005124A true JP2015005124A (en) | 2015-01-08 |
JP6127766B2 JP6127766B2 (en) | 2017-05-17 |
Family
ID=52300968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013129851A Active JP6127766B2 (en) | 2013-06-20 | 2013-06-20 | Device for electronic equipment and electronic equipment equipped with said device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6127766B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017071096A (en) * | 2015-10-06 | 2017-04-13 | 京セラドキュメントソリューションズ株式会社 | Image forming device |
CN107132819A (en) * | 2016-02-26 | 2017-09-05 | 欧姆龙株式会社 | Obtain the apparatus and method of daily record data |
US9910757B2 (en) | 2015-01-23 | 2018-03-06 | Ricoh Company, Ltd. | Semiconductor device, log acquisition method and electronic apparatus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0442331A (en) * | 1990-06-07 | 1992-02-12 | Nec Corp | Address trace memory device |
JPH06174802A (en) * | 1992-12-03 | 1994-06-24 | Kawasaki Steel Corp | Cpu mounted integrated circuit and debugger |
JPH08161196A (en) * | 1994-12-09 | 1996-06-21 | Nec Corp | Instruction tracing device |
JP2008287319A (en) * | 2007-05-15 | 2008-11-27 | Ricoh Co Ltd | Semiconductor device, electronic device and access log acquisition method |
-
2013
- 2013-06-20 JP JP2013129851A patent/JP6127766B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0442331A (en) * | 1990-06-07 | 1992-02-12 | Nec Corp | Address trace memory device |
JPH06174802A (en) * | 1992-12-03 | 1994-06-24 | Kawasaki Steel Corp | Cpu mounted integrated circuit and debugger |
JPH08161196A (en) * | 1994-12-09 | 1996-06-21 | Nec Corp | Instruction tracing device |
JP2008287319A (en) * | 2007-05-15 | 2008-11-27 | Ricoh Co Ltd | Semiconductor device, electronic device and access log acquisition method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9910757B2 (en) | 2015-01-23 | 2018-03-06 | Ricoh Company, Ltd. | Semiconductor device, log acquisition method and electronic apparatus |
JP2017071096A (en) * | 2015-10-06 | 2017-04-13 | 京セラドキュメントソリューションズ株式会社 | Image forming device |
CN107132819A (en) * | 2016-02-26 | 2017-09-05 | 欧姆龙株式会社 | Obtain the apparatus and method of daily record data |
Also Published As
Publication number | Publication date |
---|---|
JP6127766B2 (en) | 2017-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7937626B2 (en) | Techniques for generating a trace stream for a data processing apparatus | |
US9910757B2 (en) | Semiconductor device, log acquisition method and electronic apparatus | |
KR20110139125A (en) | Memory error detecting apparatus and method | |
JP6127766B2 (en) | Device for electronic equipment and electronic equipment equipped with said device | |
TWI666560B (en) | Electronic device and method for event logging | |
US7043718B1 (en) | System real-time analysis tool | |
JP2008287319A (en) | Semiconductor device, electronic device and access log acquisition method | |
US20170103797A1 (en) | Calibration method and device for dynamic random access memory | |
US9513984B2 (en) | Hardware signal logging in embedded block random access memory | |
JP2006318412A (en) | Semiconductor device | |
WO2012108020A1 (en) | Log recording apparatus | |
CN116361111A (en) | Data acquisition method and device and electronic equipment | |
JP5982845B2 (en) | Trace control apparatus and trace control method | |
JP4299634B2 (en) | Information processing apparatus and clock abnormality detection program for information processing apparatus | |
JP2013225291A (en) | Device for electronic apparatus | |
CN108040251B (en) | Digital video signal detection system | |
US9977754B2 (en) | Electronic system with diagnostic interface mechanism and method of operation thereof | |
JP6309919B2 (en) | Numerical control device with data acquisition function | |
CN118034991B (en) | Memory data access method and device, electronic equipment and readable storage medium | |
JP2018200570A (en) | Bus monitor and bus monitoring method | |
CN108228420A (en) | The method, apparatus of IO monitoring and the realization device of IO monitoring | |
CN111949431B (en) | Fatal error providing method and fatal error identification method for system-on-chip product | |
JP2022033610A (en) | Device for electronic apparatus, control method for device for electronic apparatus, and control program for device for electronic apparatus | |
JP2022114470A (en) | Information recording device and information recording method | |
CN118034991A (en) | Memory data access method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160607 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170224 |
|
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: 20170314 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170327 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6127766 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |