JP2006119998A - Bus information collection device, data processing apparatus and bus information collection method - Google Patents
Bus information collection device, data processing apparatus and bus information collection method Download PDFInfo
- Publication number
- JP2006119998A JP2006119998A JP2004308496A JP2004308496A JP2006119998A JP 2006119998 A JP2006119998 A JP 2006119998A JP 2004308496 A JP2004308496 A JP 2004308496A JP 2004308496 A JP2004308496 A JP 2004308496A JP 2006119998 A JP2006119998 A JP 2006119998A
- Authority
- JP
- Japan
- Prior art keywords
- bus
- latency
- bus information
- slave device
- transfer
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、バスマスターから発行されるトランザクションのバス情報を収集する技術に関する。 The present invention relates to a technique for collecting bus information of transactions issued from a bus master.
近年、半導体集積回路の回路規模は半導体プロセスの進化と共に増大し、1つのチップに搭載される機能は益々多様化・複雑化してきている。これに伴い、制御ソフトウェアも同様に大規模化・高機能化してきており、ハードウェアの性能を十分に発揮できるソフトウェアを効率良く開発することが求められている(例えば、特許文献1参照)。
半導体集積回路は、1つのチップに様々な機能を搭載してコストダウンができる反面、実機でのソフトウェア開発では内部の動作状態を把握するのが困難であるため、デバッグ作業や性能向上のための最適化作業が効率的にできないという問題がある。 While semiconductor integrated circuits can reduce costs by mounting various functions on a single chip, it is difficult to grasp the internal operating state with software development on actual machines, so debugging work and performance improvement are difficult. There is a problem that optimization work cannot be performed efficiently.
例えば、半導体集積回路に外部へバスのトレース情報等を出力する機能を持たせることで、ある程度内部状態を把握することは可能であるが、出力データを解析するための装置が必要になる。また、出力用の外部端子や出力データを蓄積する大容量のメモリを設けることでコストアップとなる。更に、動作周波数が上がると十分な情報を出力できない。 For example, it is possible to grasp the internal state to some extent by providing a semiconductor integrated circuit with a function of outputting bus trace information and the like to the outside, but an apparatus for analyzing output data is required. Further, providing an external terminal for output and a large-capacity memory for storing output data increases the cost. Furthermore, sufficient information cannot be output when the operating frequency increases.
また、1つのバスに複数のバスマスターと複数のスレーブデバイスとが接続されている場合、単純にバスの使用率等を計測しただけでは個々のバスマスター、スレーブデバイスの状態を十分に把握できないという問題がある。 Also, when multiple bus masters and multiple slave devices are connected to a single bus, it is not possible to fully grasp the status of individual bus masters and slave devices by simply measuring the bus usage rate. There's a problem.
本発明は、上記課題を解決するためになされたものであり、バスマスター毎のバス情報をスレーブデバイス毎に正確に把握することを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to accurately grasp bus information for each bus master for each slave device.
本発明は、バスに発行されたトランザクションをバスマスター毎に入力する入力手段と、前記入力手段で入力したトランザクションに基づいて前記バスマスター毎のバス情報を計測する計測手段と、前記計測手段で計測された前記バスマスター毎のバス情報をスレーブデバイス毎に格納する格納手段とを有し、前記バスマスター毎のバス情報を前記スレーブデバイス毎に読み出し可能とすることを特徴とする。 The present invention provides an input means for inputting a transaction issued to a bus for each bus master, a measuring means for measuring bus information for each bus master based on a transaction input by the input means, and a measurement by the measuring means. Storage means for storing the bus information for each bus master for each slave device, and the bus information for each bus master can be read for each slave device.
また、本発明は、バスに発行されたトランザクションをバスマスター毎に入力する入力工程と、前記入力工程で入力したトランザクションに基づいて前記バスマスター毎のバス情報を計測する計測工程と、前記計測工程で計測された前記バスマスター毎のバス情報をスレーブデバイス毎に格納する格納工程とを有し、前記バスマスター毎のバス情報を前記スレーブデバイス毎に読み出し可能とすることを特徴とする。 Further, the present invention provides an input step for inputting a transaction issued to a bus for each bus master, a measurement step for measuring bus information for each bus master based on the transaction input in the input step, and the measurement step Storing the bus information for each bus master measured in step S1 for each slave device, so that the bus information for each bus master can be read for each slave device.
本発明によれば、バスマスター毎のバス情報をスレーブデバイス毎に正確に把握することができるため、ソフトウェア開発におけるデバッグ作業、性能解析作業、最適化作業等を効率的に行うことができる。 According to the present invention, since bus information for each bus master can be accurately grasped for each slave device, debugging work, performance analysis work, optimization work, etc. in software development can be performed efficiently.
以下、図面を参照しながら発明を実施するための最良の形態について詳細に説明する。 The best mode for carrying out the invention will be described below in detail with reference to the drawings.
図1は、実施例1におけるバス情報収集回路の構成例を示すブロック図である。図1に示すように、バス情報収集回路1は、レジスタインターフェース(I/F)2、レジスタアクセス制御部3、バスマスターAのバス情報測定部4、バスマスターBのバス情報測定部5から構成されている。
FIG. 1 is a block diagram illustrating a configuration example of a bus information collection circuit according to the first embodiment. As shown in FIG. 1, the bus
尚、図1では、バスマスターAとバスマスターBの2つのバスマスターが存在する場合を例に示しているが、バスマスターの数はこれに限るものではなく、バスマスターが3つ存在しても良い。その場合、3つのバスマスターに対応してバス情報測定部が構成されていれば良い。 FIG. 1 shows an example in which there are two bus masters, bus master A and bus master B, but the number of bus masters is not limited to this, and there are three bus masters. Also good. In that case, the bus information measuring unit may be configured to correspond to the three bus masters.
レジスタインターフェース2は、不図示のCPUがバス情報収集回路1の動作制御及び測定された情報を読み出すために、バス情報測定部4及びバス情報測定部5のレジスタに対して読み書きを行う入出力部である。
The
レジスタアクセス制御部3は、CPUのアクセスにおけるアドレス値のデコード処理を行い、所定のアドレスにマッピングされているバス情報測定部4及びバス情報測定部5のレジスタに対する読み書きを制御する。
The register
バス情報測定部4は、バスマスターAのバス情報を測定するブロックで、バスマスターAがバス上で発行するトランザクションの回数と遅延時間(レイテンシ)に関する情報を転送方向別及び転送対象となるスレーブデバイス別に測定する。
The bus
更に、バス情報測定部4は、バス動作情報入力部10、レジスタ12、動作制御部13、トランザクション回数計測部14、レイテンシ計測部15、最大レイテンシ検出部16、最小レイテンシ検出部17から構成されている。
Further, the bus
バス動作情報入力部10には、バス上で発行されるトランザクションの内容を把握するために必要な情報が入力され、測定対象のバスマスターからの転送要求信号と読み書きを示す転送方向信号、バスの調停を行うアービターからの転送許可信号、スレーブデバイスを特定するデコーダーからのスレーブデバイス識別信号、スレーブデバイスからの転送完了信号等が入力される。
The bus operation
レジスタ12はレジスタ群で構成され、バス情報測定部4の制御用及び測定された情報読み出しインターフェースとして使用される。ここで、レジスタ12の内部について詳細に説明する。
The
図2は、実施例1におけるレジスタ12の詳細な構成を示すブロック図である。図2に示すように、レジスタ12はバス情報測定部4の動作モードや動作開始及び停止等を設定するコントロールレジスタ20、スレーブデバイスAに対する読み出しトランザクションの情報を保持するバス情報レジスタ21、スレーブデバイスAに対する書き込みトランザクションの情報を保持するバス情報レジスタ22、スレーブデバイスBに対する読み出しトランザクションの情報を保持するバス情報レジスタ23、スレーブデバイスBに対する書き込みトランザクションの情報を保持するバス情報レジスタ24から構成されている。
FIG. 2 is a block diagram illustrating a detailed configuration of the
尚、図2では、スレーブデバイスAとスレーブデバイスBの2つのスレーブデバイスが存在する場合を例に示しているが、スレーブデバイスの数はこれに限らず、スレーブデバイスの数に応じて、読み出しトランザクション用及び書き込みトランザクション用のバス情報レジスタが構成されていれば良い。 Note that FIG. 2 shows an example in which there are two slave devices, slave device A and slave device B, but the number of slave devices is not limited to this, and the read transaction depends on the number of slave devices. It is only necessary to configure a bus information register for use and write transactions.
レジスタ12の各バス情報レジスタ21〜24は、更にトランザクション回数を保持するトランザクション回数レジスタ30、レイテンシの累積値(単位はクロックサイクル)を保持するレイテンシ累積レジスタ31、レイテンシの最大値(単位はクロックサイクル)を保持するレイテンシ最大値レジスタ32、レイテンシの最小値(単位はクロックサイクル)を保持するレイテンシ最小値レジスタ33から構成される。
Each of the bus information registers 21 to 24 of the
ここで図1に戻り、バス情報測定部4の動作制御部13は、コントロールレジスタ20に設定された値に従い、バス情報測定部4における各ブロックの初期化や動作開始・停止等の制御を行う。
Here, referring back to FIG. 1, the
トランザクション回数計測部14は、バス動作情報入力部10からの入力に従い、転送方向別及び対象スレーブデバイス別にトランザクションの回数を計測し、レジスタ12のトランザクション回数レジスタ30に計測値を格納する。
The transaction
レイテンシ計測部15は、バス動作情報入力部10からの入力に従い、転送方向別及び対象スレーブデバイス別にトランザクションのレイテンシの累積を計測し、レジスタ12のレイテンシ累積レジスタ31に計測値を格納する。また、各トランザクションにおけるレイテンシを最大レイテンシ検出部16と最小レイテンシ検出部17に通知する。
The
最大レイテンシ検出部16は、バス動作情報入力部10からの入力に従い、転送方向別及び対象スレーブデバイス別にトランザクションの最大レイテンシの検出を行う。また、レイテンシ計測部15からレイテンシの計測値が通知されると、レジスタ12のレイテンシ最大値レジスタ32の値と比較し、レイテンシ計測部15から通知されたレイテンシの計測値が大きい場合は、レイテンシ最大値レジスタ32を更新する。
The maximum
最小レイテンシ検出部17は、バス動作情報入力部10からの入力に従い、転送方向別及び対象スレーブデバイス別にトランザクションの最小レイテンシの検出を行う。また、レイテンシ計測部15からレイテンシの計測値が通知されると、レジスタ12のレイテンシ最小値レジスタ33の値と比較し、レイテンシ計測部15から通知されたレイテンシの計測値が小さい場合は、レイテンシ最小値レジスタ33を更新する。
The minimum
バス情報測定部5は、バスマスターBのバス情報を測定するブロックであり、その構成はバス情報測定部4の構成と同一のものである。以下の説明において、バス情報測定部5に関しては、バス情報測定部4の説明に対し対象バスマスターが異なること以外は同様であるとして説明を省略する。
The bus
次に、図3を用いて、実施例1におけるバス情報収集回路1の動作について説明する。図3は、バス情報収集回路1の動作を説明するためのタイミングチャートである。ここではバスマスターAがバスに発行したトランザクションの動作を示し、「clk」はクロックサイクル、「request」は転送要求信号、「grant」は転送許可信号、「address」は転送対象領域のアドレス、「rw」は転送方向(Lowで読み出し、Highで書き込み)、「done」は転送完了信号、「rdata」は転送対象領域からの読み出しデータ、「wdata」は転送対象領域への書き込みデータ、「slave」は転送対象スレーブデバイスの識別値を示すものである。
Next, the operation of the bus
まず、不図示のCPUがコントロールレジスタ20に対して動作開始の設定を行うと、バス情報測定部4は、レジスタ12の初期化を行い、トランザクション回数計測部14とレイテンシ計測部15の動作を開始する。尚、レジスタ12の初期化として、各バス情報レジスタ21〜24のトランザクション回数レジスタ30、レイテンシ累積レジスタ31、レイテンシ最大値レジスタ32はそれぞれ“0”に、レイテンシ最小値レジスタ32は設定可能な最大値(例えば、16ビット構成の場合は65535)の値に設定される。
First, when a CPU (not shown) sets operation start to the
図3において、3〜9クロックサイクルの間は、バスマスターAがスレーブデバイスAのアドレスA0領域に対してデータ(wdata0)を書き込むトランザクションを示している。具体的には、3クロックサイクル目において、バスマスターAがrequest信号をアサートし、トランザクションが開始されると、レイテンシ計測部15がそのトランザクションにおけるレイテンシの計測を開始する。そして、5クロックサイクル目において、アービターからgrant信号がアサートされると、バスマスターAは次の6クロックサイクル目からaddress信号をA0、rw信号をHigh、wdata信号をwdata0に変化させる。
FIG. 3 shows a transaction in which the bus master A writes data (wdata0) to the address A0 area of the slave device A during 3 to 9 clock cycles. Specifically, in the third clock cycle, when the bus master A asserts the request signal and the transaction is started, the
この6クロックサイクル目において、バスマスターAがaddress信号を変化させると、デコーダーがアドレスA0をデコードし、slave信号をスレーブデバイスAを示す識別値に変化させる。その後、9クロックサイクル目において、done信号がアサートされると転送完了となり、レイテンシ計測部15はレイテンシの計測を終了(レイテンシは7クロックサイクル)する。
In the sixth clock cycle, when the bus master A changes the address signal, the decoder decodes the address A0 and changes the slave signal to an identification value indicating the slave device A. Thereafter, when the done signal is asserted in the ninth clock cycle, the transfer is completed, and the
このトランザクションは、スレーブデバイスAに対する書き込みであるため、レジスタ12のバス情報レジスタ22の値が更新される。まずトランザクション回数計測部14はトランザクション回数レジスタ30の値に“1”を加える。また、レイテンシ計測部15はレイテンシ累積レジスタ31に計測したレイテンシ(7クロックサイクル)を加える。更に、最大レイテンシ検出部16はレイテンシ計測部15が計測したレイテンシの値(7クロックサイクル)とレイテンシ最大値レジスタ32の値(0クロックサイクル)とを比較し、レイテンシ計測部15の計測値が大きいのでレイテンシ最大値レジスタ32の値を7クロックサイクルに更新する。そして、最小レイテンシ検出部17はレイテンシ計測部15が計測したレイテンシの値(7クロックサイクル)とレイテンシ最小値レジスタ33の値(設定可能な最大クロックサイクル)とを比較し、レイテンシ計測部15の計測値が小さいのでレイテンシ最小値レジスタ33の値を7クロックサイクルに更新する。
Since this transaction is writing to the slave device A, the value of the
図3に示す14〜23クロックサイクルの間は、バスマスターAがスレーブデバイスBのアドレスA1領域からrdata1のデータを読み出すトランザクションを示している。具体的には、14クロックサイクル目において、バスマスターAがrequest信号をアサートし、トランザクションが開始されると、レイテンシ計測部15はそのトランザクションにおけるレイテンシの計測を開始する。そして、15クロックサイクル目において、アービターからgrant信号がアサートされると、バスマスターAは次の16クロックサイクル目からaddress信号をA1、rw信号をLow(読み出し)に変化させる。
During the 14 to 23 clock cycles shown in FIG. 3, the bus master A shows a transaction for reading the data of rdata1 from the address A1 area of the slave device B. Specifically, in the 14th clock cycle, when the bus master A asserts the request signal and the transaction is started, the
この16クロックサイクル目において、バスマスターAがaddress信号を変化させると、デコーダーはアドレスA1をデコードし、slave信号をスレーブデバイスBを示す識別値に変化させる。その後、23クロックサイクル目において、rdata信号の変化と共にdone信号がアサートされると転送完了となり、レイテンシ計測部15はレイテンシの計測(レイテンシは10クロックサイクル)を終了する。
In the 16th clock cycle, when the bus master A changes the address signal, the decoder decodes the address A1 and changes the slave signal to an identification value indicating the slave device B. Thereafter, when the done signal is asserted together with the change of the rdata signal in the 23rd clock cycle, the transfer is completed, and the
このトランザクションは、スレーブデバイスBに対する読み出しであるため、レジスタ12のバス情報レジスタ23の値が更新される。まずトランザクション回数計測部14はトランザクション回数レジスタ30の値に“1”を加える。また、レイテンシ計測部15はレイテンシ累積レジスタ31に計測したレイテンシ(10クロックサイクル)を加える。更に、最大レイテンシ検出部16はレイテンシ計測部15が計測したレイテンシの値(10クロックサイクル)とレイテンシ最大値レジスタ32の値(0クロックサイクル)とを比較し、レイテンシ計測部15の計測値が大きいのでレイテンシ最大値レジスタ32の値を10クロックサイクルに更新する。そして、最小レイテンシ検出部17はレイテンシ計測部15が計測したレイテンシの値(10クロックサイクル)とレイテンシ最小値レジスタ33の値(設定可能な最大クロックサイクル)とを比較し、レイテンシ計測部15の計測値が小さいのでレイテンシ最小値レジスタ33の値を10クロックサイクルに更新する。
Since this transaction is a read to the slave device B, the value of the bus information register 23 of the
上述したように、バスマスターAがトランザクションを発行する毎に、バス情報測定部4が動作を行い、転送方向(読み出し/書き込み)及びスレーブデバイス別に備えられているトランザクション回数レジスタ30、レイテンシ累積レジスタ31、レイテンシ最大値レジスタ32、レイテンシ最小値レジスタ33の値を更新していく。
As described above, every time the bus master A issues a transaction, the bus
尚、バス情報計測部4及びバス情報計測部5のレジスタ12に保持されている情報は、CPUがいつでも読み出すことができ、通信デバイスを使って外部へ出力する等の処理を行うことができる。
The information held in the
次に、図4を用いて、所定のバスマスターが発行するトランザクションが1回のトランザクションで複数のデータ転送を行うバースト転送である場合を例に説明する。 Next, a case where a transaction issued by a predetermined bus master is a burst transfer in which a plurality of data transfers are performed in one transaction will be described with reference to FIG.
図4は、バースト転送における動作を説明するためのタイミングチャートである。図4において、burst信号はデータ転送回数、stb信号は転送データのストローブ信号を示し、それ以外は図3と同じである。 FIG. 4 is a timing chart for explaining the operation in burst transfer. In FIG. 4, the burst signal indicates the number of times of data transfer, the stb signal indicates the strobe signal of the transfer data, and the rest is the same as FIG.
図4に示す3〜9クロックサイクルの間は、アドレスA0からの領域に対し2回(burst信号が2)のデータ書き込み(wd0、wd1)が行われている。そして、14〜23クロックサイクルの間は、アドレスA1からの領域に対し4回(burst信号が4)のデータ読み出し(rd0、rd1、rd2、rd3)が行われている。これらバースト転送においても、トランザクション回数、レイテンシの累積、最大値、最小値は図3を用いて説明した場合と同様に計測される。 During the 3 to 9 clock cycles shown in FIG. 4, data write (wd0, wd1) is performed twice (burst signal is 2) to the area from address A0. During 14 to 23 clock cycles, data reading (rd0, rd1, rd2, rd3) is performed four times (burst signal is 4) for the area from address A1. Also in these burst transfers, the number of transactions, the accumulated latency, the maximum value, and the minimum value are measured in the same manner as described with reference to FIG.
尚、このburst信号が“1”である場合は、シングル転送と全く同じであることは言うまでもない。 Needless to say, when the burst signal is “1”, it is exactly the same as the single transfer.
また、トランザクションがシングル転送のみの場合は、トランザクション回数をデータ換算して転送データ量を得ることができるが、バースト転送が混在するとトランザクション回数だけでは転送データ量を得ることができない。そこで、バス情報測定部4にburst信号からデータ転送回数を計測するユニットと、レジスタ12に新たにデータ転送回数を格納するレジスタを設けることで、バースト転送が混在しても転送データ量を得ることができる。
In addition, when the transaction is only single transfer, the transfer data amount can be obtained by converting the number of transactions into data, but when burst transfer is mixed, the transfer data amount cannot be obtained only by the transaction number. Therefore, by providing a unit for measuring the number of data transfers from the burst signal in the bus
また、上述した説明では、レイテンシ計測部15はバスマスターAが転送要求を出してから転送が完了するまでのレイテンシを計測したが、バスマスターAが転送要求を出してからアービターから転送許可を得るまでのレイテンシを計測するように構成しても良い。この場合も、トランザクション回数、レイテンシの累積、最大値、最小値は上述した説明と同様に計測される。そうすることでバスの調停におけるレイテンシ情報が得られ、バスマスター間でバスの使用権に対する競合がどの程度発生しているかを把握できる。
In the above description, the
例えば、図3に示す3〜9クロックサイクルの間のトランザクションでは、レイテンシ計測部15で計測されるレイテンシはrequest信号がアサートされてからgrant信号がアサートされるまでの2クロックサイクルである。ここで、バスに競合が発生していない場合、1クロックサイクルでgrant信号がアサートされると仮定すると、1クロックサイクル分バスの競合が発生していたことになる。一方、14〜23クロックサイクルの間のトランザクションでは、レイテンシ計測部15で計測されるレイテンシは1クロックサイクルであり、バスに競合は発生していない。
For example, in the transaction between 3 and 9 clock cycles shown in FIG. 3, the latency measured by the
レイテンシの計測対象として、転送要求を出してから転送が完了するまでを計測するか、或いは転送要求を出してから転送許可を得るまでを計測するかの何れを選択するかは、コントロールレジスタ20で排他的に設定できるようにしても良い。また、レジスタ12に新たにレジスタを追加して両方の値を同時に計測できるようにしても良い。
It is the
また、上述した説明では、レイテンシ計測部15はバスマスターAが転送要求を出してから転送が完了するまでのレイテンシを計測したが、バスマスターAがアービターから転送許可を得てから転送が完了するまでのレイテンシを計測するように構成しても良い。この場合も、トランザクション回数、レイテンシの累積、最大値、最小値は上述した説明と同様に計測される。そうすることでスレーブデバイスにおけるレイテンシ情報が得られ、スレーブデバイスに対して効率良く制御できているかを把握できる。
In the above description, the
例えば、図3において、3〜9クロックサイクルの間のトランザクションでは、レイテンシ計測部15で計測されるレイテンシはgrant信号がアサートされてからdone信号がアサートされるまでの5クロックサイクルである。ここで、スレーブデバイスの最短応答時間が5クロックサイクルであるとすると、スレーブデバイスにおいて、特に問題なく最短応答されたことになる。一方、14〜23クロックサイクルの間のトランザクションでは、レイテンシ計測部15で計測されるレイテンシは9クロックサイクルであり、スレーブデバイスにおいて応答を遅らせる要因が発生したことが分かる。
For example, in FIG. 3, in the transaction between 3 and 9 clock cycles, the latency measured by the
レイテンシの計測対象として、転送要求を出してから転送が完了するまでを計測するか、或いは転送許可を得てから転送完了までを計測するかの何れを選択するかは、コントロールレジスタ20で排他的に設定できるようにしても良い。また、レジスタ12に新たにレジスタを追加して両方の値を同時に計測できるようにしても良い。
As a latency measurement target, it is exclusive in the
また、上述した説明では、バスマスターとスレーブデバイスとがそれぞれ2つずつ存在する場合に適用される例であるが、バスマスターの増減に対してはバス情報計測部を増減させる、スレーブデバイスの増減に対してはバス情報計測部内の各レジスタを増減させることで同様に適用可能である。 In the above description, the example is applied when there are two bus masters and two slave devices, respectively. However, it can be similarly applied by increasing or decreasing each register in the bus information measuring unit.
また、上述した説明では、転送方向別にトランザクションを区別していたが、読み出しと書き込みの一方の情報しか必要ない場合はその区別を行わず、バス情報計測部内のレジスタを何れか一方の半分に減らしても良い。 In the above description, the transaction is distinguished according to the transfer direction. However, when only one information of reading and writing is necessary, the distinction is not performed, and the register in the bus information measuring unit is reduced to one half. May be.
また、特定のバスマスターが特定のスレーブデバイスにのみアクセスする場合は、そのバスマスターを対象とするバス情報計測部において、レジスタを対象スレーブデバイス用のみの構成にしても良い。 When a specific bus master accesses only a specific slave device, the bus information measuring unit for the bus master may have a register only for the target slave device.
実施例1によれば、複数のバスマスターと複数のスレーブデバイスが存在するシステム構成において、各バスマスター及び各スレーブデバイス別にバスの情報を収集することができる。 According to the first embodiment, in a system configuration in which a plurality of bus masters and a plurality of slave devices exist, bus information can be collected for each bus master and each slave device.
次に、図面を参照しながら本発明に係る実施例2について詳細に説明する。実施例2では、ホストコンピュータと接続されるデータ処理装置として、バス情報収集回路を用いたプリンタを例に、プリンタを制御するソフトウェア開発におけるデバッグ作業、性能解析作業、最適化作業の効率を向上させた場合について説明する。
Next,
図5は、バス情報収集回路を用いたプリンタの構成例を示すブロック図である。図5に示すように、パーソナルコンピュータ(PC)40とプリンタ41は、USBケーブルで接続されている。このUSBは高速シリアルバス通信規格であり、様々な機器を接続するためのものとして広く一般的に普及している。
FIG. 5 is a block diagram illustrating a configuration example of a printer using a bus information collection circuit. As shown in FIG. 5, a personal computer (PC) 40 and a
プリンタ41には、実施例1で説明したバス情報収集回路を含む半導体集積回路42、メモリカードスロット等に接続されたメモリカード43、半導体集積回路42の制御プログラム等が格納された不揮発性のROM44、半導体集積回路42が動作時にワークメモリ領域として使用するDRAM45、印刷を行う印字ヘッド等の印字部46が搭載されている。
The
図5に示す半導体集積回路42は、プリンタ41全体を制御するCPU51と、ROM44に対してデータの読み出し制御を行うROMコントローラ52と、システムバス64の調停を行うアービター53と、システムバス上で発行されるトランザクションのアドレスをデコードし対象スレーブデバイスを特定するデコーダー54と、割り込みやタイマ制御等を行う周辺回路55と、DRAM45に対してデータの読み書き制御を行うDRAMコントローラ56と、バスマスター機能を有し、印字部46を制御する印字コントローラ57と、PC40と接続するためのUSBデバイスコントローラ58と、メモリカード43に対してデータ転送を制御するカードコントローラ59と、カードコントローラ59用DMAコントローラ60と、前述したバス情報収集回路1に相当するバス情報収集部61と、バスマスター機能を有し、印刷用の画像処理を行って印字データを生成する印刷画像処理部62と、CPU51の動作プログラム配置用やワーク領域として使用するSRAM63とで構成される。
The semiconductor integrated
ここで、システムバス64に接続されているバスマスターとしては、CPU51、印字コントローラ57、DMAコントローラ60、印刷画像処理部62の計4つである。また、スレーブデバイスとしては、ROMコントローラ52を経由するROM領域、DRAMコントローラ56を経由するDRAM領域、SRAM63のSRAM領域、各コントローラのレジスタ領域の4つのアドレス空間が割り当てられている。
Here, there are a total of four bus masters connected to the system bus 64: the
上述のCPU51、印字コントローラ57、印刷画像処理部62は、システムバス64にシングル転送とバースト転送を混在させてトランザクションを発行する。
The
そして、アービター53は、CPU51によって設定される各バスマスターの優先度に応じてシステムバス使用権の調停を行う。
The
実施例2のバス情報収集部61は、CPU51、印字コントローラ57、印刷画像処理部62のバス情報を収集し、それぞれのトランザクション回数とデータ転送回数、CPU51に対して、ROM領域とSRAM領域の転送要求を出してから転送許可を得るまでのレイテンシ、印字コントローラ57に対して、DRAM領域の転送要求を出してから転送が完了するまでのレイテンシ、印刷画像処理部62に対して、DRAM領域の転送許可を得てから転送が完了するまでのレイテンシを収集する構成とする。また、バス情報収集部61には、CPU51、印字コントローラ57、印刷画像処理部62からの転送要求信号と読み書きを示す転送方向信号及び転送回数信号、アービター53からの転送許可信号、デコーダー54からのスレーブデバイス識別信号、各スレーブデバイスからの転送完了信号が入力される。
The bus
次に、プリンタ41のソフトウェア開発におけるデバッグ作業、性能解析作業、最適化作業に関して、メモリカード43に圧縮保存されている画像ファイルを印字部46で印刷処理を行うソフトウェア開発を例に説明する。
Next, with regard to debugging work, performance analysis work, and optimization work in software development of the
この印刷処理において、半導体集積回路42内では次のような動作が行われる。CPU51がDRAM45上に画像ファイルを格納するためのバッファ領域、画像ファイルの伸張処理結果を格納するためのバッファ領域、印字データを格納するためのバッファ領域を確保する。メモリカード43内に保存された画像ファイルはカードコントローラ59及びDMAコントローラ60によってDRAM45へ書き込まれる。そして、CPU51は、DRAM45へ書き込まれた画像ファイルを読み出し、伸張処理を行って結果をDRAM45へ書き込む。
In the printing process, the following operation is performed in the semiconductor integrated
このDRAM45への書き込みが終了すると、印刷画像処理部62がDRAM45から伸張処理結果を読み出し、印刷画像処理を行って印字データをDRAM45へ書き込む。そして、印字コントローラ57がDRAM45から印字データを読み出し、印字部46へ印字データを転送する。
When the writing to the
これらの処理は所定のデータサイズ単位で順次並列に動作するため、システムバス64上ではそれぞれのバスマスターからのDRAM45に対する読み書きが大量に発生する。また、CPU51に対して割り込み処理や画像処理による大きな負荷がかかるため、割り込み処理や伸張処理用プログラム、参照頻度の高いデータをROM44及びDRAM45と比較して高速に動作するSRAM63上に配置し、処理の高速化が行われている。
Since these processes sequentially operate in parallel in units of a predetermined data size, a large amount of reading / writing from / to the
上述した動作のソフトウェア開発におけるデバッグ作業、性能解析作業、最適化作業では、実際にプリンタ41を動作させ、バス情報収集部61によってCPU51、印字コントローラ57、印刷画像処理部62のバス情報を収集する。そして、収集したデータは、CPU51がバス情報収集部61のレジスタに保持されているデータを読み込み、USBデバイスコントローラ58等の通信デバイスを使ってPC40へ転送し、表示させる。
In the debugging work, performance analysis work, and optimization work in the software development of the above-described operation, the
例えば、CPU51に対するバス情報として以下のようなデータが得られたとする。
For example, assume that the following data is obtained as bus information for the
[ROM領域からの読み出し]
トランザクション回数:1,257,349回
データ転送回数:5,028,531回
レイテンシ累積:25,435,834クロックサイクル
レイテンシ最大値:134クロックサイクル
レイテンシ最小値:1クロックサイクル
[SRAM領域からの読み出し]
トランザクション回数:5,241,746回
データ転送回数:20,966,984回
レイテンシ累積:134,958,327クロックサイクル
レイテンシ最大値:128クロックサイクル
レイテンシ最小値:1クロックサイクル
上記のレイテンシは、システムバス64の調停レイテンシ(転送要求を出してから転送許可を得るまで)を計測したもので、1回のトランザクション当たりROM44領域からの読み出しで約20クロックサイクルであり、SRAM63領域からの読み出しで約26クロックサイクルであることが分かる。また、システムバス64に競合が発生していない状態での調停レイテンシが1クロックサイクルであるとすると、システムバス64の競合によってCPU51の調停レイテンシが20倍以上増加し、動作速度に影響していることが分かる。
[Read from ROM area]
Number of transactions: 1,257,349
Number of data transfers: 5,028,531
Latency accumulation: 25,435,834 clock cycles Latency maximum value: 134 clock cycles Latency minimum value: 1 clock cycle
[Read from SRAM area]
Number of transactions: 5,241,746
Number of data transfers: 20,966,984
Latency accumulation: 134,958,327 clock cycles Latency maximum value: 128 clock cycles Latency minimum value: 1 clock cycle The above latency measures the arbitration latency of the system bus 64 (from when a transfer request is issued until transfer permission is obtained) Thus, it can be seen that it takes about 20 clock cycles for reading from the
よって、CPU51の動作速度を高めるためには、アービター53におけるCPU51の優先度を高くし、競合状態でも優先的にシステムバスを使用できるような対処を行えば良い。
Therefore, in order to increase the operating speed of the
また、印字コントローラ57に対するバス情報として以下のようなデータが得られたとする。
Further, it is assumed that the following data is obtained as bus information for the
[DRAM領域からの読み出し]
トランザクション回数:105,453,210回
データ転送回数:442,903,482回
レイテンシ累積:3,921,400,639クロックサイクル
レイテンシ最大値:45クロックサイクル
レイテンシ最小値:30クロックサイクル
上記のレイテンシは転送要求を出してから転送が完了するまでを計測したもので、1回のトランザクションあたりDRAM領域からの読み出しが約37クロックサイクルであることが分かる。印字部46に対して10万回のデータ転送を200万クロックサイクル内で完了しなければならない制約があるとすると、10万回のデータ転送に必要なトランザクション回数は約23,810回、その全てが最大レイテンシで実行されたとしても約107万クロックサイクルで、制約に対し約2倍の性能で印字コントローラ57が動作していることが分かる。
[Read from DRAM area]
Number of transactions: 105,453,210
Number of data transfers: 442,903,482 times
Latency accumulation: 3,921,400,639 clock cycles Latency maximum value: 45 clock cycles Latency minimum value: 30 clock cycles The above latency is measured from when a transfer request is issued until the transfer is completed. It can be seen that reading from the DRAM area per transaction takes about 37 clock cycles. If there is a restriction that the data transfer of 100,000 times to the
また、印刷画像処理部62に対するバス情報として、以下のようなデータが得られたとする。
Further, it is assumed that the following data is obtained as bus information for the print
[DRAM領域からの読み出し]
トランザクション回数:23,647,515回
データ転送回数:47,293,103回
レイテンシ累積:761,449,983クロックサイクル
レ イテンシ最大値:35クロックサイクル
レイテンシ最小値:29クロックサイクル
[DRAM領域への書き込み]
トランザクション回数:105,453,210回
データ転送回数:442,903,482回
レイテンシ累積:2,847,236,670クロックサイクル
レイテンシ最大値:32クロックサイクル
レイテンシ最小値:26クロックサイクル
上記のレイテンシはスレーブデバイスにおけるレイテンシ(転送許可を得てから転送が完了するまで)を計測したもので、1回のトランザクション当たりDRAM45領域からの読み出しで約32クロックサイクルであり、DRAM45領域への書き込みで約27クロックサイクルであることが分かる。
[Read from DRAM area]
Number of transactions: 23,647,515
Number of data transfers: 47,293,103 times
Latency accumulation: 761,449,983 clock cycles Latency maximum value: 35 clock cycles Latency minimum value: 29 clock cycles
[Write to DRAM area]
Number of transactions: 105,453,210
Number of data transfers: 442,903,482 times
Latency accumulation: 2,847, 236, 670 clock cycles Latency maximum value: 32 clock cycles Latency minimum value: 26 clock cycles The above latency is the latency measured in the slave device (from transfer permission to transfer completion) Thus, it can be seen that reading from the
このように、DRAM45において、同一のページに連続でアクセスするページヒット状態で読み出し及び書き込みレイテンシがそれぞれ29及び26クロックサイクルであり、異なるページにアクセスするページミス状態で読み出し及び書き込みレイテンシがそれぞれ35及び32クロックサイクルであるとすると、印刷画像処理部62がDRAM45領域からデータを読み出す場合はページミス状態の比率が高く、効率的な読み出しを行っていないことが分かる。よって、DRAM45領域に対して効率的にアクセスするためには、DRAM45領域に確保する各種バッファ領域をできるだけ、ページミス状態が発生しないように調整する対処を行えば良い。
As described above, in the
以上説明したように、実施例によれば、複数のバスマスターと複数のスレーブデバイスが存在する構成において、各バスマスター及び各スレーブデバイス別にバスの情報を収集し、その情報に基づいてソフトウェア開発におけるデバッグ作業、性能解析作業、最適化作業を効率的に行うことができる。 As described above, according to the embodiment, in a configuration in which a plurality of bus masters and a plurality of slave devices exist, bus information is collected for each bus master and each slave device, and software development is performed based on the information. Debugging work, performance analysis work, and optimization work can be performed efficiently.
実施例2では、本発明に係るバス情報収集回路を用いたデータ処理装置としてプリンタを例に説明したが、本発明はこれに限定されるものではなく、複数のバスマスターと複数のスレーブデバイスが存在する構成において、各バスマスターと各スレーブデバイス別にバスの情報を収集するものであれば、他の装置にも適用可能である。 In the second embodiment, the printer is described as an example of the data processing apparatus using the bus information collecting circuit according to the present invention. However, the present invention is not limited to this, and a plurality of bus masters and a plurality of slave devices are included. In the existing configuration, any device that collects bus information for each bus master and each slave device can be applied to other devices.
尚、本発明は複数の機器(例えば、ホストコンピュータ,インターフェース機器,リーダ,プリンタなど)から構成されるシステムに適用しても、1つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用しても良い。 Even if the present invention is applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), it is applied to an apparatus (for example, a copier, a facsimile machine, etc.) composed of a single device. It may be applied.
また、本発明の目的は前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPU若しくはMPU)が記録媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。 Another object of the present invention is to supply a recording medium in which a program code of software realizing the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (CPU or MPU) of the system or apparatus stores it in the recording medium. Needless to say, this can also be achieved by reading and executing the programmed program code.
この場合、記録媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。 In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium storing the program code constitutes the present invention.
このプログラムコードを供給するための記録媒体としては、例えばフロッピー(登録商標)ディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。 As a recording medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like is used. be able to.
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
更に、記録媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, after the program code read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
1 バス情報収集回路
2 レジスタインターフェース
3 レジスタアクセス制御部
4 バス情報測定部
5 バス情報測定部
10 バス動作情報入力部
12 レジスタ
13 動作制御部
14 トランザクション回数計測部
15 レイテンシ計測部
16 最大レイテンシ検出部
17 最小レイテンシ検出部
20 コントロールレジスタ
21 バス情報レジスタ
22 バス情報レジスタ
23 バス情報レジスタ
24 バス情報レジスタ
30 トランザクション回数レジスタ
31 レイテンシ累積レジスタ
32 レイテンシ最大値レジスタ
33 レイテンシ最小値レジスタ
40 PC
41 プリンタ
42 半導体集積回路
43 メモリカード
44 ROM
45 DRAM
46 印字部
51 CPU
52 ROMコントローラ
53 アービター
54 デコーダ
55 周辺回路
56 DRAMコントローラ
57 印字コントローラ
58 USBデバイスコントローラ
59 カードコントローラ
60 DMAコントローラ
62 印刷画像処理部
63 SRAM
64 システムバス
DESCRIPTION OF
41
45 DRAM
46
52
64 System bus
Claims (10)
前記入力手段で入力したトランザクションに基づいて前記バスマスター毎のバス情報を計測する計測手段と、
前記計測手段で計測された前記バスマスター毎のバス情報をスレーブデバイス毎に格納する格納手段とを有し、
前記バスマスター毎のバス情報を前記スレーブデバイス毎に読み出し可能とすることを特徴とするバス情報収集装置。 An input means for inputting a transaction issued to the bus for each bus master;
Measuring means for measuring bus information for each bus master based on the transaction input by the input means;
Storing means for storing for each slave device the bus information for each bus master measured by the measuring means,
A bus information collecting apparatus, wherein the bus information for each bus master can be read for each slave device.
前記入力工程で入力したトランザクションに基づいて前記バスマスター毎のバス情報を計測する計測工程と、
前記計測工程で計測された前記バスマスター毎のバス情報をスレーブデバイス毎に格納する格納工程とを有し、
前記バスマスター毎のバス情報を前記スレーブデバイス毎に読み出し可能とすることを特徴とするバス情報収集方法。 An input process for inputting a transaction issued to the bus for each bus master;
A measurement step of measuring bus information for each bus master based on the transaction input in the input step;
Storing the bus information for each bus master measured in the measurement step for each slave device,
A bus information collecting method, wherein the bus information for each bus master can be read for each slave device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004308496A JP2006119998A (en) | 2004-10-22 | 2004-10-22 | Bus information collection device, data processing apparatus and bus information collection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004308496A JP2006119998A (en) | 2004-10-22 | 2004-10-22 | Bus information collection device, data processing apparatus and bus information collection method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006119998A true JP2006119998A (en) | 2006-05-11 |
Family
ID=36537808
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004308496A Withdrawn JP2006119998A (en) | 2004-10-22 | 2004-10-22 | Bus information collection device, data processing apparatus and bus information collection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006119998A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014505310A (en) * | 2011-01-28 | 2014-02-27 | クアルコム,インコーポレイテッド | Bus clock frequency scaling for bus interconnects, and related devices, systems, and methods |
JP2016021165A (en) * | 2014-07-15 | 2016-02-04 | ヤマハ株式会社 | Observation circuit |
-
2004
- 2004-10-22 JP JP2004308496A patent/JP2006119998A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014505310A (en) * | 2011-01-28 | 2014-02-27 | クアルコム,インコーポレイテッド | Bus clock frequency scaling for bus interconnects, and related devices, systems, and methods |
US9286257B2 (en) | 2011-01-28 | 2016-03-15 | Qualcomm Incorporated | Bus clock frequency scaling for a bus interconnect and related devices, systems, and methods |
JP2016021165A (en) * | 2014-07-15 | 2016-02-04 | ヤマハ株式会社 | Observation circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8266369B2 (en) | Flash memory interface | |
KR0160193B1 (en) | Dma control apparatus | |
US7263572B2 (en) | Bus bridge and data transfer method | |
KR20170005900A (en) | Flash memory controller | |
MX2012005183A (en) | Command queue for peripheral component. | |
TWI498743B (en) | Data storage system and management method thereof | |
JP3895610B2 (en) | Image forming apparatus and image forming method | |
US20130297896A1 (en) | Memory access control device, command issuing device, and method | |
JP4198376B2 (en) | Bus system and information processing system including bus system | |
EP1708091A1 (en) | Dedicated DMA-memory bus for an AMBA system | |
US6678838B1 (en) | Method to track master contribution information in a write buffer | |
US20070038790A1 (en) | Integrated circuit devices, methods, and computer program products for monitoring a bus | |
JP2004118252A (en) | Semiconductor data processor | |
US20150177816A1 (en) | Semiconductor integrated circuit apparatus | |
US7774513B2 (en) | DMA circuit and computer system | |
JP2006119998A (en) | Bus information collection device, data processing apparatus and bus information collection method | |
US6032238A (en) | Overlapped DMA line transfers | |
JP2005141532A (en) | System debugging device | |
US20080195825A1 (en) | Metrics modules and methods for monitoring, analyzing and optimizing bus and memory operations in a complex integrated circuit | |
JP2002024156A (en) | Dma controller and transfer method therefor | |
JP2005165508A (en) | Direct memory access controller | |
JP2003271414A (en) | Input/output control device and computer system | |
US8402233B2 (en) | Method and apparatus for high throughput mass storage device interface in a microprocessor for handheld systems | |
JP2002366509A (en) | Direct memory access controller and its access control method | |
JP2004118825A (en) | Memory bus interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080108 |