JP4871921B2 - Data processing system and program development system - Google Patents

Data processing system and program development system Download PDF

Info

Publication number
JP4871921B2
JP4871921B2 JP2008172955A JP2008172955A JP4871921B2 JP 4871921 B2 JP4871921 B2 JP 4871921B2 JP 2008172955 A JP2008172955 A JP 2008172955A JP 2008172955 A JP2008172955 A JP 2008172955A JP 4871921 B2 JP4871921 B2 JP 4871921B2
Authority
JP
Japan
Prior art keywords
program
cpu
target device
bus
bus load
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.)
Expired - Fee Related
Application number
JP2008172955A
Other languages
Japanese (ja)
Other versions
JP2010015275A (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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2008172955A priority Critical patent/JP4871921B2/en
Publication of JP2010015275A publication Critical patent/JP2010015275A/en
Application granted granted Critical
Publication of JP4871921B2 publication Critical patent/JP4871921B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、DMA(Direct Memory Access)制御装置、特にSoC(System on a Chip)においてCPUなどの演算処理装置を介さずにメモリ間またはメモリないし外部機器間でデータを直接転送する制御装置に関するものである。   The present invention relates to a DMA (Direct Memory Access) control device, and more particularly to a control device that directly transfers data between memories or between memories or external devices without using an arithmetic processing unit such as a CPU in SoC (System on a Chip). It is.

近年、情報機器の高性能化、多機能化に伴い、これらの機器に搭載されるSoC (Systems on a Chip)が処理するデータ量も増大している。このような、増大するデータ処理に対応するため、近年のSoCでは、ディスプレイ制御やCD・HDD制御など、外部周辺機器制御部やCPUなど複数のデータ処理部が並列にデータ処理を行うため、一個以上のバスにぶら下がるような形で複数のデータ処理部が接続されている。また、CPUの演算処理におけるデータやプログラム、ディスプレイ表示データなどの一時記憶を行うため、DRAMがMCU(Memory Controller Unit)を介してバスと接続されている。DRAMはデータ処理部毎に置くとコストが高くなるという理由で、DRAMとバスとのI/Fは一つに絞られていることがあり、MCUにおいて各データ処理部におけるバス占有権の調停を行っている。   In recent years, as information devices have become more sophisticated and multifunctional, the amount of data processed by SoC (Systems on a Chip) mounted on these devices has also increased. In order to cope with such increasing data processing, in recent SoCs, a plurality of data processing units such as external peripheral device control units and CPUs such as display control and CD / HDD control perform data processing in parallel. A plurality of data processing units are connected so as to hang on the above bus. A DRAM is connected to the bus via an MCU (Memory Controller Unit) in order to temporarily store data, programs, display display data, and the like in the arithmetic processing of the CPU. The DRAM and the bus I / F may be narrowed down to one because the cost increases if each DRAM is placed in each data processing unit. Is going.

一方、SoCにおいて、CPUなどの演算処理装置を介さずにメモリ間またはメモリないし外部周辺機器間でデータを直接転送するDMA制御装置というものがある。DMA制御装置もバスに接続されている。DMA制御装置におけるデータの転送方法は2種類に分けることができる。1つは、サイクルスチールモードと呼ばれるものであり、1回のデータ転送単位の転送を終了するたびにバスの占有権を他のデータ処理部に渡すというものである。もう1つは、バーストモードと呼ばれるものであり、DMA制御装置がいったんバスの占有権を取ると、転送終了条件が満たされるまでバスの占有権を解放せずに転送を続けるというものである。DMA制御装置のデータ転送方法、およびサイクルスチールモードにおける1回のデータ転送単位(一単位のデータ転送量)については、ユーザプログラムによりDMA制御装置内のレジスタを設定することで変更することが可能である。   On the other hand, in SoC, there is a DMA controller that directly transfers data between memories or between memories or external peripheral devices without using an arithmetic processing unit such as a CPU. A DMA controller is also connected to the bus. There are two types of data transfer methods in the DMA controller. One is called cycle steal mode, in which every time a transfer in one data transfer unit is completed, the right to occupy the bus is passed to another data processing unit. The other is called a burst mode. Once the DMA controller has taken the bus occupation right, the transfer is continued without releasing the bus occupation right until the transfer end condition is satisfied. The data transfer method of the DMA controller and the data transfer unit (data transfer amount per unit) in the cycle steal mode can be changed by setting a register in the DMA controller by the user program. is there.

DMA制御装置からのアクセス要求とその他のデータ処理部からのアクセス要求が同一のDRAMに対し同時に発生した時のアクセス調停方法として、DMA制御装置からのアクセス要求に高い優先度を、CPUからのアクセス要求に、DMA制御装置より低い優先度を付け、この優先度に従いアクセス要求を調停する方式がある。この調停方式を用いることにより、DMA制御装置からのアクセスを高速化することはできるものの、DMA制御装置からのアクセス要求が多い場合には、低優先のCPUからのアクセス要求が長い時間待たされ、結果としてシステム全体の性能が低下する。   As an access arbitration method when an access request from the DMA controller and an access request from another data processing unit are simultaneously generated for the same DRAM, a high priority is given to the access request from the DMA controller. There is a method in which a lower priority is given to the request than the DMA controller, and the access request is arbitrated according to this priority. By using this arbitration method, it is possible to speed up access from the DMA controller, but when there are many access requests from the DMA controller, the access request from the low priority CPU is kept waiting for a long time, As a result, the performance of the entire system is degraded.

また、DRAMへのアクセスを行う際には、記憶保持のためのプリチャージ処理やアクセス先アドレス指定処理などが最初に行われるため、その分オーバーヘッド的な時間がかかる。そのため、一回あたりのデータ転送単位を減らすと、オーバーヘッド的な時間が複数回入ることになり、転送効率が低下する。   Further, when accessing the DRAM, precharge processing for storing data and access destination address designation processing are performed first, and accordingly, it takes overhead time. Therefore, if the data transfer unit per time is reduced, an overhead time is required several times, and the transfer efficiency is lowered.

この問題を解決する発明として動的にデータ転送量を調整するという手段について記載された特許文献1または特許文献2が存在する。特許文献1は、DMA制御装置からのDRAMアクセスによるバス負荷を監視し、その結果によりCPUからのDRAMアクセスを制限するというものである。一方、特許文献2は、DMA制御装置からの一部のDRAMアクセスによるバス負荷を監視し、その結果によりDMA制御装置からの他のDRAMアクセスを制御するというものである。   As an invention for solving this problem, there is Patent Document 1 or Patent Document 2 that describes means for dynamically adjusting the data transfer amount. Japanese Patent Application Laid-Open No. 2004-228561 monitors the bus load due to DRAM access from the DMA controller, and restricts DRAM access from the CPU based on the result. On the other hand, Patent Document 2 monitors a bus load caused by a part of DRAM access from a DMA controller, and controls another DRAM access from the DMA controller based on the result.

特開2003−256355号公報JP 2003-256355 A 特開2003−178020号公報JP 2003-178020 A

一方、CPUからのDRAMアクセス回数を低減する装置としてキャッシュメモリが存在する。半導体技術の向上によりキャッシュメモリの記憶容量は年々増えてきているため、キャッシュメモリによりCPUからのDRAMアクセス回数は年々減り続けており、現状においてCPUからのDRAMアクセスがDMA制御装置からのDRAMアクセスに比べて数分の一である。上記のような状況においてDMAアクセス回数からバス負荷率を検知してCPUアクセスを制限すると、DMAアクセス回数が多いときにはCPUアクセスが全くできず、処理が滞るという問題がある。   On the other hand, there is a cache memory as a device for reducing the number of DRAM accesses from the CPU. Since the storage capacity of the cache memory has been increasing year by year due to improvements in semiconductor technology, the number of DRAM accesses from the CPU continues to decrease year by year due to the cache memory. At present, DRAM access from the CPU is replaced with DRAM access from the DMA controller. It is a fraction of that. In the above situation, if the CPU access is limited by detecting the bus load factor from the number of DMA accesses, there is a problem that when the number of DMA accesses is large, the CPU cannot be accessed at all and processing is delayed.

この問題の対策として、ユーザプログラムでDMA制御装置のレジスタを操作することにより動的にデータ転送量を調整するとことについて検討した。キャッシュメモリが採用されているときは、CPUがDRAMへアクセスする前に、CPU内の一時記憶装置であるキャッシュメモリ内にアクセス先のデータが入っているかどうかがチェックされ、キャッシュミスした場合にのみDRAMへのアクセスが行われる。キャッシュミスするかどうかについてはプログラムの実行結果に依存するため、ユーザプログラムから推測することは不可能である。したがって、ユーザプログラムからDMA制御装置のレジスタを用いて転送量を動的に調整することは難しい。   As a countermeasure for this problem, a study was made of dynamically adjusting the data transfer amount by manipulating the register of the DMA controller with a user program. When the cache memory is adopted, before the CPU accesses the DRAM, it is checked whether the access destination data is in the cache memory, which is a temporary storage device in the CPU, and only when a cache miss occurs. Access to the DRAM is performed. Since whether or not to make a cache miss depends on the execution result of the program, it cannot be estimated from the user program. Therefore, it is difficult to dynamically adjust the transfer amount from the user program using the register of the DMA controller.

本発明の目的は、CPU又はDMA制御装置の一方にメモリアクセスが偏ることを能動的に抑制することができるデータ処理システムを提供することにある。   An object of the present invention is to provide a data processing system capable of actively suppressing memory access from being biased to one of a CPU and a DMA control device.

本発明の別の目的は、CPU又はDMA制御装置の一方にメモリアクセスが偏ることを能動的に抑制することができるデータ処理システムのための開発環境を提供することにある。   Another object of the present invention is to provide a development environment for a data processing system that can actively suppress the bias of memory access to one of a CPU and a DMA controller.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、メモリへのアクセスにおいてCPU又はDMA制御装置の間でバス占有権を調停するバス調停回路バス調停装置は、前記CPUからの前記メモリに対するアクセスによるバス負荷を定期的に計測してそのバス負荷情報を前記DMA制御装置へ送信する。前記DMA制御装置は、バス調停装置から受取ったバス負荷情報に基づいて、データ転送制御のデータ転送量を少なくする制御を行う。これによれば、定期的に計測されたバス負荷に従ってDMA制御装置によるバス占有時間を動的に変更することができる。   That is, the bus arbitration circuit that arbitrates the bus occupation right between the CPU or the DMA control device in accessing the memory, the bus arbitration device periodically measures the bus load caused by the access to the memory from the CPU, and the bus load Information is transmitted to the DMA controller. The DMA control device performs control to reduce the data transfer amount of the data transfer control based on the bus load information received from the bus arbitration device. According to this, the bus occupation time by the DMA control device can be dynamically changed according to the bus load measured periodically.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、CPU又はDMA制御装置の一方にメモリアクセスが偏ることを能動的に抑制することができる。   That is, it is possible to actively suppress the memory access from being biased to one of the CPU and the DMA control device.

1.実施の形態の概要
先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. First, an outline of a typical embodiment of the invention disclosed in the present application will be described. Reference numerals in the drawings referred to in parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.

〔1〕本発明に係るデータ処理システムは、データ転送量およびデータ転送方法が設定されるレジスタを有するDMA制御装置と、メモリへのアクセスにおいてCPU又は前記DMA制御装置の間でバス占有権を調停するバス調停回路とを有する。前記バス調停装置は、前記CPUからの前記メモリに対するアクセスによるバス負荷を定期的に計測してそのバス負荷情報を前記DMA制御装置へ送信するバス負荷監視回路を有する。前記DMA制御装置は、前記バス負荷監視回路から受取ったバス負荷情報が所定のバス負荷を超えているときデータ転送制御によるデータ転送量を減らす制御を行う。   [1] A data processing system according to the present invention arbitrates a bus occupation right between a DMA controller having a register in which a data transfer amount and a data transfer method are set, and a CPU or the DMA controller in accessing a memory. A bus arbitration circuit. The bus arbitration device includes a bus load monitoring circuit that periodically measures a bus load caused by access from the CPU to the memory and transmits the bus load information to the DMA control device. The DMA controller performs control to reduce the data transfer amount by data transfer control when the bus load information received from the bus load monitoring circuit exceeds a predetermined bus load.

CPUからのメモリアクセスがDMA制御装置からのメモリアクセスに比べて数分の一になっているという今日の状況を前提として前記DMA制御装置によるデータ転送量の制御が行われると、CPUからのメモリアクセスによるバス負荷が高いときにはDMA制御装置からのメモリアクセス性能が多少低下する程度であり、必要に応じてCPUからのメモリアクセスが可能になり、また、CPUからのメモリアクセスによるバス負荷が少ないときにはDMA制御装置からのメモリアクセス効率が高くなる。   When the data transfer amount is controlled by the DMA controller on the assumption that the memory access from the CPU is a fraction of the memory access from the DMA controller, the memory from the CPU When the bus load due to access is high, the memory access performance from the DMA controller is only slightly reduced, and the memory access from the CPU becomes possible if necessary, and when the bus load due to memory access from the CPU is small The memory access efficiency from the DMA controller increases.

これにより、CPU又はDMA制御装置の一方にメモリアクセスが偏ることを能動的に抑制することができる。したがって、CPUからのDRAMアクセス頻度に変動があるプログラムを実行する場合においては全体的な処理の能率を上げることができる。   Thereby, it is possible to actively suppress the memory access from being biased to one of the CPU and the DMA control device. Therefore, when executing a program in which the DRAM access frequency from the CPU varies, the overall processing efficiency can be increased.

〔2〕項1のデータ処理システムにおいて、前記データ転送制御によるデータ転送量を少なくする制御は、サイクルスチールモードにおける1回のデータ転送量を減らす制御である。   [2] In the data processing system according to item 1, the control for reducing the data transfer amount by the data transfer control is a control for reducing the data transfer amount at one time in the cycle steal mode.

〔3〕項1のデータ処理システムにおいて、前記データ転送制御によるデータ転送量を少なくする制御は、データ転送制御モードをバーストモードからサイクルスチールモードに変更する制御である。   [3] In the data processing system according to item 1, the control for reducing the data transfer amount by the data transfer control is a control for changing the data transfer control mode from the burst mode to the cycle steal mode.

〔4〕項1のデータ処理システムにおいて、前記バス負荷監視回路は、一定時間における前記CPUからのメモリアクセス回数を計測し、アクセス回数が閾値以上かどうかを表す信号を前記バス負荷情報として求める。   [4] In the data processing system according to item 1, the bus load monitoring circuit measures the number of memory accesses from the CPU in a predetermined time, and obtains a signal indicating whether the number of accesses is equal to or greater than a threshold value as the bus load information.

〔5〕項1のデータ処理システムにおいて、前記バス調停装置は、前記CPUからのメモリアクセス要求を一時的に蓄積し、空き記憶容量を前記バス監視回路へ送信するバッファを更に有する。このとき、前記バス負荷監視回路は、一定時間における前記バッファのバッファ空き容量の積分値が閾値以上かどうかを表す情報を前記バス負荷情報として前記DMA制御装置へ送信する。   [5] In the data processing system according to item 1, the bus arbitration device further includes a buffer for temporarily accumulating memory access requests from the CPU and transmitting a free storage capacity to the bus monitoring circuit. At this time, the bus load monitoring circuit transmits, as the bus load information, information indicating whether or not the integrated value of the buffer free capacity of the buffer at a certain time is equal to or greater than a threshold value to the DMA controller.

〔6〕項1のデータ処理システムにおいて、前記CPUは、キャッシュミスヒットが発生した際にキャッシュミス信号をバス調停回路へ送信するキャッシュメモリを有する。このとき、前記バス負荷監視回路は、一定時間におけるキャッシュミス信号発生回数を計測し、キャッシュミス信号発生回数が閾値以上かどうかを表す情報を前記バス負荷情報として前記DMA制御装置へ送信する。   [6] In the data processing system according to item 1, the CPU includes a cache memory that transmits a cache miss signal to the bus arbitration circuit when a cache miss hit occurs. At this time, the bus load monitoring circuit measures the number of occurrences of the cache miss signal in a predetermined time, and transmits information indicating whether the number of occurrences of the cache miss signal is equal to or greater than a threshold value to the DMA controller as the bus load information.

〔7〕項1のデータ処理システムにおいて、前記CPUは実行すべき命令のアドレスを示すプログラムカウンタの値をバス調停回路へ出力する。このとき、前記バス負荷監視回路は、前記CPUからのメモリアクセス回数の少ないルーチンまたはタスクにおけるプログラムカウンタの開始値および範囲をルックアップテーブルとして記憶し、入力した前記プログラムカウンタの値がテーブル内にヒットしたかどうかに関する情報を前記バス負荷として前記DMA制御装置へ送信する。   [7] In the data processing system according to item 1, the CPU outputs a value of a program counter indicating an address of an instruction to be executed to the bus arbitration circuit. At this time, the bus load monitoring circuit stores the start value and range of the program counter in a routine or task with a small number of memory accesses from the CPU as a lookup table, and the input value of the program counter hits the table. The information regarding whether or not it has been transmitted is transmitted to the DMA controller as the bus load.

〔8〕項4のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムは、前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有する。前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるCPUからメモリアクセス回数の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有する。前記アップローダは、前記プロファイラで求められた前記CPUからのメモリアクセス回数の閾値および計測周期をプログラムと一緒に出力する。これにより、項4のデータ処理システムはこのプログラム開発システムで生成されたプログラムの実行に対して適応的なメモリアクセス回数の閾値および計測周期を用いることが可能になる。   [8] A program development system that supports development of a program using the data processing system according to item 4 as a target device includes a builder that converts a source code of a program operating on the target device into an execution format, and the program execution format. And an uploader for transferring onto the target device. The builder measures the number of memory accesses in the target device a plurality of times based on a simulator that simulates the target device and executes a program, and the execution result by the simulator, and stores memory from the CPU in the bus load monitoring circuit of the target device And a profiler that obtains the threshold of the number of accesses and the measurement cycle so that the program execution time is minimized. The uploader outputs a threshold value and a measurement cycle of the number of memory accesses from the CPU obtained by the profiler together with a program. As a result, the data processing system according to item 4 can use the threshold value and the measurement cycle of the memory access frequency that are adaptive to the execution of the program generated by the program development system.

〔9〕項5記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムは、前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有する。前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるバッファ空き容量の積分値の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有する。前記アップローダは、前記プロファイラで求められた前記バッファ空き容量の積分値の閾値および計測周期をプログラムと一緒に出力する。これにより、項5のデータ処理システムはこのプログラム開発システムで生成されたプログラムの実行に対して適応的なバッファ空き容量の積分値の閾値および計測周期を用いることが可能になる。   [9] A program development system for supporting development of a program using the data processing system according to item 5 as a target device, a builder for converting a source code of a program operating on the target device into an execution format, and the program execution format And an uploader for transferring the data to the target device. The builder simulates the target device and executes a program, and based on the execution result of the simulator, measures the number of memory accesses in the target device a plurality of times, and the buffer free capacity in the bus load monitoring circuit of the target device A profiler that obtains the threshold value of the integrated value and the measurement cycle so as to minimize the program execution time. The uploader outputs the threshold value and the measurement cycle of the integral value of the buffer free space obtained by the profiler together with the program. As a result, the data processing system according to item 5 can use the threshold value of the integral value of the buffer free space and the measurement cycle that are adaptive to the execution of the program generated by the program development system.

〔10〕項6記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムは、前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有する。前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるキャッシュミス回数の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有する。前記アップローダは、前記プロファイラで求められた前記キャッシュミス回数の閾値および計測周期をプログラムと一緒に出力する。これにより、項6のデータ処理システムはこのプログラム開発システムで生成されたプログラムの実行に対して適応的なキャッシュミス回数の閾値および計測周期を用いることが可能になる。   [10] A program development system that supports development of a program using the data processing system according to item 6 as a target device, a builder for converting a source code of a program operating on the target device into an execution format, and the program execution format And an uploader for transferring the data to the target device. The builder measures the number of memory accesses in the target device a plurality of times based on the execution result of the simulator by simulating the target device and executing the program, and the number of cache misses in the bus load monitoring circuit of the target device And a profiler that calculates the program execution time to minimize the program execution time. The uploader outputs a threshold value and a measurement cycle of the cache miss number obtained by the profiler together with a program. As a result, the data processing system according to item 6 can use a threshold value and a measurement cycle for the number of cache misses that are adaptive to the execution of the program generated by the program development system.

〔11〕項7記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムは前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有する。前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるCPUからのメモリアクセス回数の少ないルーチンまたはタスクにおけるプログラムカウンタの開始値および範囲を示すルックアップテーブルを求めるプロファイラと、を有する。前記アップローダは、前記プロファイラで求められたルックアップテーブルをプログラムと一緒に出力する。これにより、項7のデータ処理システムはこのプログラム開発システムで生成されたプログラムの実行に対して適応的なプログラムカウンタの開始値および範囲を示すルックアップテーブルを用いることが可能になる。   [11] A program development system that supports development of a program using the data processing system according to item 7 as a target device, a builder for converting a source code of a program operating on the target device into an execution format, and the program execution format And an uploader for transferring onto the target device. The builder measures the number of memory accesses in the target device a plurality of times based on the execution result of the simulator by simulating the target device and executing the program, and from the CPU in the bus load monitoring circuit of the target device. And a profiler for obtaining a look-up table indicating a start value and a range of a program counter in a routine or task having a low memory access frequency. The uploader outputs the look-up table obtained by the profiler together with the program. As a result, the data processing system according to item 7 can use a look-up table indicating a start value and a range of a program counter that is adaptive to the execution of the program generated by the program development system.

2.実施の形態の詳細
実施の形態について更に詳述する。以下、本発明を実施するための形態を図面に基づいて詳細に説明する。なお、発明を実施するための形態を説明するための全図において、同一の機能を有する要素には同一の符号を付して、その繰り返しの説明を省略する。
2. Details of Embodiments Embodiments will be further described in detail. DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiments for carrying out the invention, and the repetitive description thereof will be omitted.

《実施形態1》
図1は本発明の第1の実施形態に係るデータ処理システムが例示される。データ処理システム1はデータプロセッサ若しくはマイクロコンピュータのような1チップであってもよいし、オンボードのマルチチップシステムであってもよい。データ処理システム1はそのプログラム開発システムとしての開発環境2と共に図示され、データ処理システム1を便宜上ターゲット機器1とも称する。
Embodiment 1
FIG. 1 illustrates a data processing system according to the first embodiment of the present invention. The data processing system 1 may be a single chip such as a data processor or a microcomputer, or may be an on-board multi-chip system. The data processing system 1 is illustrated with a development environment 2 as its program development system, and the data processing system 1 is also referred to as a target device 1 for convenience.

ターゲット機器1はCPU11、DMA制御装置(DMAC)12、DRAM14、バス調停回路13、プログラムI/F16、プログラム専用RAM(ランダムアクセスメモリ)15から成り立っている。DRAM14は特に制限されないがクロック同期動作されるシンクロナスDRAMとされる。   The target device 1 includes a CPU 11, a DMA controller (DMAC) 12, a DRAM 14, a bus arbitration circuit 13, a program I / F 16, and a program dedicated RAM (Random Access Memory) 15. The DRAM 14 is not particularly limited, but is a synchronous DRAM that operates in clock synchronization.

ターゲット機器1は、開発環境2からプログラムインタフェース(プログラムI/F)16を介して受信してプログラム専用RAM15またはDRAM14にプログラムS05を格納し、CPU11がプログラム専用RAM15またはDRAM14からプログラムS05を読み込むことによってプログラムS05を実行する。同図においてはプログラム専用RAM15からプログラムを読み込む。CPU11およびDMA制御装置12はバス17とバス調停回路13を介してDRAM14と接続している。バス調停回路13はCPU11またはDMA制御装置12におけるバス占有権の調停を行うものである。バス17にはアドレス及びデータバスを想定する。特に図示はしないがキャッシュメモリはCPU11のブロックに含まれるものと理解された。   The target device 1 receives the program S05 from the development environment 2 via the program interface (program I / F) 16, stores the program S05 in the program dedicated RAM 15 or DRAM 14, and the CPU 11 reads the program S05 from the program dedicated RAM 15 or DRAM 14. The program S05 is executed. In the figure, the program is read from the program dedicated RAM 15. The CPU 11 and the DMA control device 12 are connected to the DRAM 14 via the bus 17 and the bus arbitration circuit 13. The bus arbitration circuit 13 performs arbitration of the bus occupation right in the CPU 11 or the DMA control device 12. The bus 17 is assumed to be an address and data bus. Although not particularly shown, it was understood that the cache memory was included in the block of the CPU 11.

開発環境2はホストPC(パーソナルコンピュータ)25にOS(オペレーティングシステム)24が搭載されており、OS24上で動作するビルダ22とアップローダ23、そしてビルダ22によって実行形式になるプログラム21から成り立っている。プログラム21はターゲット機器1上で動作するプログラムS05に対応するソースプログラムのことを指し、ビルダ22によって実行形式のプログラムS05に変換され、アップローダ23によってターゲット機器1へ転送される。ターゲット機器1はプログラムI/F16を介して、アップローダ23によって転送されたプログラムS05をプログラム専用RAM15またはDRAM14へ格納する。   The development environment 2 includes an OS (operating system) 24 mounted on a host PC (personal computer) 25, and includes a builder 22 and an uploader 23 that operate on the OS 24, and a program 21 that is executed by the builder 22. The program 21 refers to a source program corresponding to the program S05 operating on the target device 1, and is converted into an execution format program S05 by the builder 22, and transferred to the target device 1 by the uploader 23. The target device 1 stores the program S05 transferred by the uploader 23 in the program dedicated RAM 15 or DRAM 14 via the program I / F 16.

本実施形態は、バス調停回路13がバス負荷監視回路131を有することを特徴としている。バス負荷監視回路131は、CPU11からDRAMアクセス回数によるバス負荷を監視し、データ転送量を変更するか否かに関する信号S03をDMA制御装置12へ送信する。DMA制御装置12は、データ転送量を指定するレジスタを有し、単位時間あたりのアクセス回数によってデータ転送量に関する値をレジスタへ設定する。レジスタの設定項目は、仮に32バイトをC1、64バイトをC2、32バイト/64バイト自動切換をC3とする。   The present embodiment is characterized in that the bus arbitration circuit 13 includes a bus load monitoring circuit 131. The bus load monitoring circuit 131 monitors the bus load depending on the number of DRAM accesses from the CPU 11 and transmits a signal S03 regarding whether or not to change the data transfer amount to the DMA controller 12. The DMA controller 12 has a register for designating the data transfer amount, and sets a value related to the data transfer amount in the register according to the number of accesses per unit time. The register setting items are 32 bytes for C1, 64 bytes for C2, and 32 bytes / 64 bytes automatic switching for C3.

図2はDMA制御装置12の詳細図である。DMA制御装置12は、各種レジスタ類124、レジスタ制御回路121、各種制御回路122、バスI/F123から構成されている。各種レジスタ類124は、DMA制御装置12の動作設定に関する情報を蓄積するものである。レジスタ制御回路121は、各種レジスタ類124内の情報を読み込んだり書き込んだりするものである。各種制御回路122はDMA制御装置12の挙動を制御するものであり、DMAアクセス要求S02の優先順位を決める要求優先制御部、DMA転送の起動を開始したり終了したりする起動制御部、DMA転送回数をカウントしたりリセットしたりする回数制御部などが含まれる。   FIG. 2 is a detailed view of the DMA controller 12. The DMA controller 12 includes various registers 124, a register control circuit 121, various control circuits 122, and a bus I / F 123. The various registers 124 accumulate information related to operation settings of the DMA control device 12. The register control circuit 121 reads and writes information in various registers 124. The various control circuits 122 control the behavior of the DMA control device 12, a request priority control unit that determines the priority of the DMA access request S02, an activation control unit that starts and ends DMA transfer, and DMA transfer A number control unit for counting or resetting the number of times is included.

本発明においては、DMA転送サイズ指定要求を受けてレジスタ制御回路121が各種レジスタ類124へDMA転送サイズ指定に関する情報を書き込む。各種制御回路122はDMA転送要求に従って各種レジスタ類124の内容やバス17からの各種信号を読み取り、バスI/F123を介してバスへDMAアクセス要求S02を各デバイスへ送信する。   In the present invention, in response to a DMA transfer size designation request, the register control circuit 121 writes information relating to DMA transfer size designation to various registers 124. The various control circuits 122 read the contents of various registers 124 and various signals from the bus 17 in accordance with the DMA transfer request, and transmit a DMA access request S02 to the bus via the bus I / F 123 to each device.

図3は各種レジスタ類124の詳細図である。各種レジスタ類124には、DMAの転送モードおよび転送サイズなどに関する設定情報を格納するDMA制御レジスタ1241、DMA転送によって転送されるデータのアドレスおよび転送先のアドレスを格納するDMA転送元/転送先設定レジスタ1242、DMA転送時におけるチャネルの優先順位やDMAの転送状態を格納するDMA操作レジスタ1243、USB(ユニバーサル・シリアル・バス)やSCI/F(シリアル・コミュニケーション・インタフェース)などの外部デバイスに対してDMA転送を行う際に転送要求元ないし転送要求先を指定するDMA拡張リソースレジスタ1244、DMA転送回数を指定するDMA転送回数レジスタ1245から成り立っている。DMA制御レジスタ1241には、DMA転送サイズ指定ビット12411、DMA転送モード指定ビット12412、その他の設定ビット12415、予約ビット12416などから構成されている。DMA転送サイズ指定ビットを変更することにより、サイクルスチールモードにおける転送サイズ候補のうち1つを選択することが可能である。また、DMA転送モード指定ビットを変更することにより、転送モードをサイクルスチールモードまたはバーストモードのいずれか1つを選択することが可能である。   FIG. 3 is a detailed view of the various registers 124. The various registers 124 include a DMA control register 1241 that stores setting information related to the DMA transfer mode and transfer size, and a DMA transfer source / transfer destination setting that stores the address of the data transferred by the DMA transfer and the address of the transfer destination. Register 1242, DMA operation register 1243 for storing channel priority and DMA transfer status during DMA transfer, external devices such as USB (Universal Serial Bus) and SCI / F (Serial Communication Interface) It comprises a DMA extended resource register 1244 that designates a transfer request source or a transfer request destination when performing DMA transfer, and a DMA transfer number register 1245 that designates the number of DMA transfers. The DMA control register 1241 includes a DMA transfer size designation bit 12411, a DMA transfer mode designation bit 12412, other setting bits 12415, a reservation bit 12416, and the like. By changing the DMA transfer size designation bit, it is possible to select one of transfer size candidates in the cycle steal mode. Further, it is possible to select one of the cycle steal mode and the burst mode as the transfer mode by changing the DMA transfer mode designation bit.

本発明においては、DMA制御レジスタ1241においてDMA転送モード指定ビット12412やDMA転送サイズ指定ビット12411の他に、DMA転送モード自動切換ビット12414やDMA転送サイズ自動切換ビット12413を有することを特徴とする。DMA転送モード自動切換ビット12414を1にすることにより、レジスタ書込内容S09で指定するDMA転送モードの代わりに、DMA転送モード指定要求S33の指定したDMA転送モードの値を使用する(これについては図21を参照して後述する)。また、DMA転送サイズ自動切換ビット12413を1にすることにより、レジスタ書込内容S09で指定するDMA転送サイズの代わりに、DMA転送サイズ指定要求S03の指定したDMA転送サイズの値を使用する。   The present invention is characterized in that the DMA control register 1241 has a DMA transfer mode automatic switching bit 12414 and a DMA transfer size automatic switching bit 12413 in addition to the DMA transfer mode specifying bit 12412 and the DMA transfer size specifying bit 12411. By setting the DMA transfer mode automatic switching bit 12414 to 1, the value of the DMA transfer mode designated by the DMA transfer mode designation request S33 is used instead of the DMA transfer mode designated by the register write content S09 (about this) This will be described later with reference to FIG. 21). Also, by setting the DMA transfer size automatic switching bit 12413 to 1, the DMA transfer size value designated by the DMA transfer size designation request S03 is used instead of the DMA transfer size designated by the register write content S09.

また、レジスタ制御回路121がDMA転送サイズ指定要求S03を受けて、DMA転送サイズ指定ビット12411を含むレジスタ書込内容をDMA制御レジスタ1241にレジスタ制御回路121が書き込んだ結果、DMA転送サイズ指定ビット12411に変更後の値が書き込まれる。その後、各種制御回路122が各種レジスタ類124からレジスタ内容を読み込み、その値からDMA転送サイズ指定ビット12411を読み込むことで、サイクルスチールモードにおいて転送サイズ分だけのデータをDMA転送する。   Further, the register control circuit 121 receives the DMA transfer size designation request S03, and the register control circuit 121 writes the register write contents including the DMA transfer size designation bit 12411 to the DMA control register 1241, so that the DMA transfer size designation bit 12411 is obtained. The changed value is written to. Thereafter, the various control circuits 122 read the register contents from the various registers 124 and read the DMA transfer size designation bit 12411 from the value, thereby transferring the data corresponding to the transfer size in the DMA in the cycle steal mode.

図4はレジスタ制御回路121の詳細図である。レジスタ制御回路121は従来のレジスタ制御回路1212に加えて、レジスタ書込内容生成部1211、レジスタ書込内容S07を各設定内容に分解するDEMUX(デマルチプレクサ)回路1213、各設定内容を合成するMUX(マルチプレクサ)回路1214から成り立っている。   FIG. 4 is a detailed diagram of the register control circuit 121. In addition to the conventional register control circuit 1212, the register control circuit 121 includes a register write content generation unit 1211, a DEMUX (demultiplexer) circuit 1213 that decomposes the register write content S 07 into each set content, and a MUX that synthesizes each set content. (Multiplexer) circuit 1214 is formed.

本発明においては、従来のレジスタ制御回路1212によってレジスタ書込内容S07が生成されると、レジスタ制御回路121はDEMUX回路1213によってレジスタ書込内容S07を各設定内容に分解する。レジスタ書込内容生成部1211は、DMA転送サイズ指定要求S03と、各設定内容のうちDMA転送サイズ指定ビットS071から、新規のDMA転送サイズ指定ビットを生成する。   In the present invention, when the register write content S07 is generated by the conventional register control circuit 1212, the register control circuit 121 decomposes the register write content S07 into each set content by the DEMUX circuit 1213. The register write content generation unit 1211 generates a new DMA transfer size designation bit from the DMA transfer size designation request S03 and the DMA transfer size designation bit S071 among the set contents.

レジスタ書込内容生成部は、DMA転送サイズ指定要求S03が入力されなかった場合、新規のDMA転送サイズ指定ビットとしてDEMUXから分解されたDMA転送サイズ指定ビットS071を出力する。もしDMA転送サイズ指定要求S03が入力された場合、DMA転送サイズ指定要求S03の内容からDMAの転送サイズを判断し、レジスタに書き込むべきDMA転送サイズ指定ビットを設定、新規のDMA転送サイズ指定ビットとして出力する。MUX回路1214は新規のDMA転送サイズ指定ビットと、DEMUXにより分解されたその他の各設定内容を合成し、レジスタ書込内容S09として各種レジスタ類124に書き込む。   When the DMA transfer size designation request S03 is not input, the register write content generation unit outputs the DMA transfer size designation bit S071 disassembled from the DEMUX as a new DMA transfer size designation bit. If the DMA transfer size designation request S03 is input, the DMA transfer size is determined from the contents of the DMA transfer size designation request S03, the DMA transfer size designation bit to be written to the register is set, and a new DMA transfer size designation bit is set. Output. The MUX circuit 1214 synthesizes a new DMA transfer size designation bit and other setting contents decomposed by the DEMUX, and writes them in various registers 124 as register write contents S09.

図5はバス調停回路13の詳細図である。   FIG. 5 is a detailed diagram of the bus arbitration circuit 13.

DMA制御装置12からDRAM14へのアクセス要求(以下DMAアクセス要求S02と称す)およびCPU11からDRAM14へのアクセス要求(以下CPUアクセス要求S01と称す)は、それぞれ専用のキューバッファ132ないし133に蓄積される。優先順位判定回路134は、キューバッファ132ないし133から出力された各アクセス要求S01ないしS02から選択信号S13を出力する。ここでいう選択信号S13は、DMAアクセス要求S02とCPUアクセス要求S01のうちどちらを優先して出力するかを示す。セレクタ135は選択信号S13に従って、DMAアクセス要求S02またはCPUアクセス要求S01のうちどちらかを出力する。   An access request from the DMA controller 12 to the DRAM 14 (hereinafter referred to as a DMA access request S02) and an access request from the CPU 11 to the DRAM 14 (hereinafter referred to as a CPU access request S01) are stored in dedicated queue buffers 132 to 133, respectively. . The priority determination circuit 134 outputs a selection signal S13 from each access request S01 to S02 output from the queue buffers 132 to 133. The selection signal S13 here indicates which of the DMA access request S02 and the CPU access request S01 is to be output with priority. The selector 135 outputs either the DMA access request S02 or the CPU access request S01 according to the selection signal S13.

本発明においては、バス調停回路13はバス負荷監視回路131を有することを特徴とする。バス負荷監視回路131は、クロック信号S12とCPUアクセス要求S01から、DMA転送サイズ指定要求S03を出力する。   In the present invention, the bus arbitration circuit 13 includes a bus load monitoring circuit 131. The bus load monitoring circuit 131 outputs a DMA transfer size designation request S03 from the clock signal S12 and the CPU access request S01.

図6はバス負荷監視回路131の詳細図である。カウンタ13102はクロック信号S12が1クロック周期経過すると値を1インクリメントする。条件付カウンタ13101はクロック信号が1クロック周期経過し、かつCPUアクセス要求S01を検出すると値を1インクリメントする。周期格納メモリ13107は、CPUアクセス計測周期の値S19を格納する。周期格納メモリの値S19は、開発環境2によって生成され、開発環境2におけるアップローダ23によってプログラムS05と共に送信され、プログラムI/F16を介してバス調停回路13内のバス負荷監視回路131へ転送される。比較器13104はカウンタの値S15と周期格納メモリの値S19を比較し、カウンタの値S15がCPUアクセス計測周期S19以上になればCPUアクセス周期信号S17を出力し、条件付カウンタ13101およびカウンタ13102の値をリセットする。こうすることで、カウンタ13102によってCPUアクセス計測周期を計測し、条件付カウンタ13101によってCPUアクセス計測周期内におけるCPUアクセス要求が検出された時間S14を計測することができる。比較器13103は、CPUアクセス要求が検出された時間S14が閾値S18より小さければ、CPUアクセス要求S01が少ないと判定し、CPUアクセス要求S01が少ないときのDMA転送サイズ指定要求S16、たとえば0/1信号における1を出力する。サンプル&ホールド回路13105は、CPUアクセス計測周期の信号S17を読み取り、DMA転送サイズ指定要求S16の値を次のCPUアクセス計測周期分だけ保持して出力する。ここでDMA転送サイズ指定要求S16は、0がDMA転送サイズ32バイト、1がDMA転送サイズ64バイトとする。閾値の値S18は、開発環境2によって生成され、アップローダ23によってプログラムS05と共に送信され、プログラムI/F16を介してバス調停回路13内のバス負荷監視回路131へ転送される。   FIG. 6 is a detailed diagram of the bus load monitoring circuit 131. The counter 13102 increments the value by 1 when the clock signal S12 has passed one clock cycle. The conditional counter 13101 increments the value by 1 when the clock signal has passed one clock cycle and the CPU access request S01 is detected. The cycle storage memory 13107 stores a CPU access measurement cycle value S19. The value S19 of the periodic storage memory is generated by the development environment 2, transmitted together with the program S05 by the uploader 23 in the development environment 2, and transferred to the bus load monitoring circuit 131 in the bus arbitration circuit 13 via the program I / F16. . The comparator 13104 compares the value S15 of the counter with the value S19 of the cycle storage memory, and outputs a CPU access cycle signal S17 if the counter value S15 becomes equal to or greater than the CPU access measurement cycle S19. Reset the value. Thus, the CPU access measurement cycle can be measured by the counter 13102, and the time S14 when the CPU access request is detected within the CPU access measurement cycle can be measured by the conditional counter 13101. If the time S14 when the CPU access request is detected is smaller than the threshold value S18, the comparator 13103 determines that the CPU access request S01 is small, and the DMA transfer size designation request S16 when the CPU access request S01 is small, for example, 0/1. Output 1 in the signal. The sample & hold circuit 13105 reads the signal S17 of the CPU access measurement cycle, holds the value of the DMA transfer size designation request S16 for the next CPU access measurement cycle, and outputs it. Here, in the DMA transfer size designation request S16, 0 is a DMA transfer size of 32 bytes, and 1 is a DMA transfer size of 64 bytes. The threshold value S18 is generated by the development environment 2, transmitted by the uploader 23 together with the program S05, and transferred to the bus load monitoring circuit 131 in the bus arbitration circuit 13 via the program I / F16.

図18はビルダ22の詳細図、図19はバス負荷監視回路131におけるCPUからのDRAMアクセス回数の閾値S18および計測周期S19のビルダ22による計算処理フローである。ビルダ22は、プログラム21をC言語やJava(登録商標)言語などの各種言語から機械語へ変換するコンパイラ221、コンパイラ221によって機械語へ変換されたものを接続させて実行形式にするリンカ222、リンカ222の内容をPC25上で擬似的に実行するシミュレータ223、シミュレータ223上のプログラム実行結果からCPUアクセス負荷を計測するプロファイラ224から成り立っている。ここで、シミュレータ223内にはターゲット機器1と同様のキャッシュメモリ112を模擬する機能があり、プロファイラ224はシミュレータ223上のプログラム実行時におけるキャッシュミス発生回数をカウント可能であることを前提する。   FIG. 18 is a detailed diagram of the builder 22, and FIG. 19 is a calculation processing flow by the builder 22 of the DRAM access count threshold S18 and the measurement cycle S19 from the CPU in the bus load monitoring circuit 131. The builder 22 includes a compiler 221 that converts the program 21 from various languages such as C language and Java (registered trademark) language into machine language, and a linker 222 that connects the program 21 converted into machine language by the compiler 221 into an execution format. The simulator 223 executes the contents of the linker 222 on the PC 25 in a pseudo manner, and the profiler 224 measures the CPU access load from the program execution result on the simulator 223. Here, it is assumed that the simulator 223 has a function of simulating the cache memory 112 similar to that of the target device 1, and the profiler 224 can count the number of occurrences of cache misses during program execution on the simulator 223.

ビルダ22は、まずプログラム21をコンパイラ221でコンパイルし(F06)、リンカ222でリンクすることによりプログラムの実行形式を仮に作成する(F07)。次にシミュレータ223でプログラムの実行形式を用いてプログラムを実行する。プロファイラ224はプログラムにおけるキャッシュミス回数およびDMAからのDRAMアクセスのバスサイクル間隔を計測する(F10、F11)。図中LPで参照されるシンボルはそれによって挟まれた処理(F10)が複数回繰り返されることを意味する。DMAからのDRAMアクセスのバスサイクル間隔については、DMA制御装置12のレジスタにより一定バスサイクル間隔にアクセスするとプログラムによって設定された場合(F08)、DMAからのDRAMアクセスのバスサイクル間隔をレジスタ設定から求める(F09)。プロファイラ224はDMAからのDRAMアクセスの時間間隔を、CPUからのDRAMアクセス回数の計測周期S19(dT)とする(F12)。   The builder 22 first compiles the program 21 with the compiler 221 (F06), and creates a program execution format by linking with the linker 222 (F07). Next, the program is executed by the simulator 223 using the program execution format. The profiler 224 measures the number of cache misses in the program and the bus cycle interval of DRAM access from the DMA (F10, F11). In the figure, the symbol referred to by LP means that the process (F10) sandwiched between them is repeated a plurality of times. As for the bus cycle interval for DRAM access from the DMA, if a fixed bus cycle interval is accessed by the register of the DMA controller 12 by a program (F08), the bus cycle interval for DRAM access from the DMA is obtained from the register setting. (F09). The profiler 224 sets the DRAM access time interval from the DMA to the measurement cycle S19 (dT) of the DRAM access count from the CPU (F12).

またプロファイラ224は、DRAMアクセスによるレイテンシを除いたプログラム実行バスサイクルTを計測し(F10)、複数回のキャッシュミス回数から平均値を求めCPUアクセス要求の数Nとする(F13)。プロファイラ224はCPUからのDRAMアクセス回数の閾値nを下記の式により計算する(F14)。
n=ceil(N×dT/T) (N<T−T/dT)
n=dT−1 (N≧T−T/dT)
ここで、関数ceil (x)は、xの小数点切り上げ関数とする。n=0のときは完全にCPU優先、n=dTのときは完全にDMA優先になってしまい、DMA転送サイズ切り替えの意味がなくなってしまうため、1≦n≦dT-1とする。
The profiler 224 measures the program execution bus cycle T excluding the latency due to DRAM access (F10), obtains an average value from the number of cache misses and sets it as the number N of CPU access requests (F13). The profiler 224 calculates the threshold value n of the number of DRAM accesses from the CPU by the following formula (F14).
n = ceil (N × dT / T) (N <T−T / dT)
n = dT−1 (N ≧ T−T / dT)
Here, the function ceil (x) is a function for rounding up the decimal point of x. When n = 0, the CPU priority is completely given, and when n = dT, the DMA priority is given, and the meaning of switching the DMA transfer size is lost, so 1 ≦ n ≦ dT−1.

コンパイラ221はCPU11からのDRAMアクセス回数の閾値S18および計測周期S19、閾値S18および計測周期S19をバス負荷監視回路131へ転送するルーチンの書かれたソースファイルをコンパイルし、リンカ222はルックアップテーブルを他のルーチンとリンクし、実行ファイルを作成する。   The compiler 221 compiles a source file in which a routine for transferring the threshold value S18 and the measurement cycle S19 of the DRAM access count from the CPU 11 and the threshold value S18 and the measurement cycle S19 to the bus load monitoring circuit 131 is written. Link with other routines to create an executable file.

以上のようにバス負荷監視回路131におけるCPU11からのDRAMアクセス回数の閾値S18および計測周期S19をビルダ22によって計算しターゲット機器1へ転送することにより、プログラムにおけるCPU11からのDRAMアクセスの回数によってCPU優先にするかDMAC優先にするかを決めることができる。   As described above, the threshold S18 and the measurement cycle S19 of the DRAM access count from the CPU 11 in the bus load monitoring circuit 131 are calculated by the builder 22 and transferred to the target device 1, whereby the CPU priority is determined by the number of DRAM accesses from the CPU 11 in the program. Or DMAC priority can be determined.

なお、基本的にCPU11からのDRAMアクセス回数はDMAC12からのDRAMアクセス回数より少ないので、CPU11からのDRAMアクセス回数の閾値S18を1としてもよい。   Since the number of DRAM accesses from the CPU 11 is basically smaller than the number of DRAM accesses from the DMAC 12, the threshold S18 of the number of DRAM accesses from the CPU 11 may be set to 1.

図26はDRAMへのアクセス要求S04の詳細図であり、DMAアクセス要求S02もCPUアクセス要求S01もこれに該当する。アクセス要求S04の内訳は公知のものと同様であり、アクセス要求元識別子S041、アクセス先メモリアドレスS042、アクセスサイズS043、リード/ライトの区別S044から成り立っており、リード/ライトの区別S044がライトのときは書き込みデータS045も含むものとする。バス負荷監視回路131においては、このアクセス要求データS01が送られてきたかどうかを判別してバス負荷を計測する。   FIG. 26 is a detailed diagram of the DRAM access request S04, which corresponds to the DMA access request S02 and the CPU access request S01. The breakdown of the access request S04 is the same as the known one, and is composed of an access request source identifier S041, an access destination memory address S042, an access size S043, and a read / write distinction S044. In some cases, write data S045 is also included. The bus load monitoring circuit 131 determines whether the access request data S01 has been sent and measures the bus load.

図27はDRAM14の第1の動作タイミングチャートである。上段は従来の公知技術による転送サイズ32バイト固定時におけるDRAM14の動作タイミングチャートT01を、下段は本発明による転送サイズ自動切換時におけるDRAM14の動作タイミングチャートT02を、それぞれ示している。図においてHDはDRAM14アクセスのためのローアドレスの設定等に要する初期動作を意味し、DMA32BはDMACによる32バイトサイクルスチールモードによるDRAM14のメモリ動作、DMA64BはDMACによる64バイトサイクルスチールモードによるDRAM14のメモリ動作を意味する。   FIG. 27 is a first operation timing chart of the DRAM 14. The upper part shows an operation timing chart T01 of the DRAM 14 when the transfer size is fixed to 32 bytes according to a known technique, and the lower part shows an operation timing chart T02 of the DRAM 14 when the transfer size is automatically switched according to the present invention. In the figure, HD means an initial operation required for setting a row address for DRAM 14 access, DMA 32B is a memory operation of DRAM 14 in a 32-byte cycle steal mode by DMAC, and DMA 64B is a memory of DRAM 14 in a 64-byte cycle steal mode by DMAC. Means movement.

HDはDRAM14アクセスにおけるオーバーヘッド時間T03を、DMA32Bは32バイトアクセスにかかる時間T04を、DMA64Bは64バイトアクセスにかかる時間T05を、それぞれ示している。本発明におけるDMA転送サイズの初期値は32バイトとする。   HD indicates an overhead time T03 for DRAM 14 access, DMA 32B indicates a time T04 required for 32-byte access, and DMA 64B indicates a time T05 required for 64-byte access. The initial value of the DMA transfer size in the present invention is 32 bytes.

本発明の方の下段のタイムチャートにおいては、CPUアクセス計測期間T10においてCPUアクセスが少ないことを確認した後、DMA転送量切換タイミングT06からDMA転送量を64バイトに増やす。DMAデータの転送時間自体は32バイト固定に比べて2倍かかるものの、HDによるオーバーヘッド時間が32バイトアクセス時も64バイトアクセス時も等しいため、32バイトアクセスを4回行ったときと64バイトアクセスを2回行ったときでは64バイトアクセスのほうがオーバーヘッド時間分だけアクセス時間を短縮できる。   In the lower time chart of the present invention, after confirming that the CPU access is small in the CPU access measurement period T10, the DMA transfer amount is increased to 64 bytes from the DMA transfer amount switching timing T06. Although the DMA data transfer time itself takes twice as long as 32 bytes fixed, the overhead time due to HD is the same for both 32-byte access and 64-byte access. When it is performed twice, the access time can be shortened by the overhead time for 64-byte access.

図28はDRAM14の第2の動作タイミングチャートである。上段は従来の公知技術による転送サイズ64バイト固定時におけるDRAM14のタイムチャートT16を、下段は本発明による転送サイズ自動切換時におけるDRAM14のタイムチャートT02を、それぞれ示している。本発明におけるDMA転送サイズの初期値は64バイトとする。図においてCPUはCPUによるDRAM14のメモリ動作を意味し、HD、DMA32B、DMA64Bの意味は図27と同じである。   FIG. 28 is a second operation timing chart of the DRAM 14. The upper part shows a time chart T16 of the DRAM 14 when the transfer size is fixed to 64 bytes according to a conventional known technique, and the lower part shows a time chart T02 of the DRAM 14 when the transfer size is automatically switched according to the present invention. The initial value of the DMA transfer size in the present invention is 64 bytes. In the figure, CPU means the memory operation of the DRAM 14 by the CPU, and the meanings of HD, DMA 32B, and DMA 64B are the same as those in FIG.

本発明の方の下段のタイムチャートにおいては、CPUアクセス計測期間T10においてCPUアクセスが多いことを確認した後、DMA転送量切換タイミングT06からDMA転送量を32バイトに減らす。64バイト固定時においてDMAアクセスが完了しない分だけCPUアクセスが遅れるのに対し、本発明においてはDMAアクセスの時間がオーバーヘッド時間と32バイトアクセス時間との和になっている。64バイトアクセス時間から32バイトアクセス時間を引いた値分だけCPUアクセスを早く行うことができる。   In the lower time chart of the present invention, after confirming that there are many CPU accesses in the CPU access measurement period T10, the DMA transfer amount is reduced to 32 bytes from the DMA transfer amount switching timing T06. When the 64 bytes are fixed, the CPU access is delayed as much as the DMA access is not completed. In the present invention, the DMA access time is the sum of the overhead time and the 32 byte access time. CPU access can be performed faster by the value obtained by subtracting the 32-byte access time from the 64-byte access time.

《実施形態2》
図7は本発明の第2の実施形態における、バス調停回路13の詳細図である。本発明においては、第1の実施形態とはバス負荷監視回路131におけるバス監視方式が相違される。CPUアクセス要求側のキューバッファ133はバッファ空き容量S20を出力し、バス負荷監視回路131はクロック信号S12とバッファ空き容量S20からDMA転送サイズ指定要求S03を出力する。バス負荷監視回路131はCPUアクセス要求S01の代わりに、CPUアクセス要求S01を蓄積するキューバッファ133の空き容量S20を用いることで、CPUアクセスに関するバス負荷を監視している。例えばキューバッファ133のライトポインタとリードポインタは空(記憶データ無し)の状態で値が一致され、書き込み毎にライトポインタがインクリメントされ、読出し毎にリードポインタがインクリメントされ、リードポインタはライトポインタの値を追い抜くことはないとすると、前記バッファ空き容量S20はライトポインタの値に対するリードポインタの値の差になる。
<< Embodiment 2 >>
FIG. 7 is a detailed diagram of the bus arbitration circuit 13 in the second embodiment of the present invention. In the present invention, the bus monitoring system in the bus load monitoring circuit 131 is different from the first embodiment. The queue buffer 133 on the CPU access request side outputs the buffer free capacity S20, and the bus load monitoring circuit 131 outputs the DMA transfer size designation request S03 from the clock signal S12 and the buffer free capacity S20. The bus load monitoring circuit 131 monitors the bus load related to CPU access by using the free capacity S20 of the queue buffer 133 that stores the CPU access request S01 instead of the CPU access request S01. For example, the write pointer and the read pointer in the queue buffer 133 are in an empty state (no stored data), the values match, the write pointer is incremented for each write, the read pointer is incremented for each read, and the read pointer is the value of the write pointer. Assuming that the buffer free capacity S20 is not overtaken, the difference between the value of the read pointer and the value of the read pointer is the buffer free space S20.

図8は図7のバス負荷監視回路131の詳細図である。積分器13108はCPUアクセス計測周期S23の間だけバッファ空き容量S20を積分する。比較器13103は、バッファ空き容量の時間積分値S21が閾値S22より大きければCPUアクセス要求S01が少ないと判定し、CPUアクセス要求S01が少ないときのDMA転送サイズ指定要求S16、たとえば0/1信号における1を出力する。サンプル&ホールド回路13105は、CPUアクセス周期の信号S17を読み取り、DMA転送サイズ指定要求の値S16を次のCPUアクセス計測周期S23分だけ保持して出力する。   FIG. 8 is a detailed diagram of the bus load monitoring circuit 131 of FIG. The integrator 13108 integrates the buffer free space S20 only during the CPU access measurement period S23. The comparator 13103 determines that the CPU access request S01 is small if the time integral value S21 of the buffer free capacity is larger than the threshold value S22, and the DMA transfer size designation request S16 when the CPU access request S01 is small, for example, in the 0/1 signal 1 is output. The sample & hold circuit 13105 reads the CPU access cycle signal S17, holds the DMA transfer size designation request value S16 for the next CPU access measurement cycle S23, and outputs it.

なお、バス負荷監視回路131におけるバッファ空き容量時間積分値の計測間隔S23のビルダ22による計算処理については、実施形態1におけるCPUからのDRAMアクセス回数の計測周期S19の計算と同じであるが、バッファ空き容量時間積分値の閾値S22(n)については下記の計算式で求めるものとする。
n=dtx - dT (dT<dtx<M(dT+1))
ここで、dtxはCPUからのDRAMアクセスの最長バスサイクル数として希望する値、Mはバッファ最大容量とする。n=0のときは完全にCPU優先、n=MdTのときは完全にDMA優先になってしまい、DMA転送サイズ切り替えの意味がなくなってしまうため、1≦n<MdTとする。
Note that the calculation processing by the builder 22 of the measurement interval S23 of the buffer free space time integral value in the bus load monitoring circuit 131 is the same as the calculation in the measurement cycle S19 of the DRAM access count from the CPU in the first embodiment. The threshold S22 (n) of the free capacity time integration value is obtained by the following calculation formula.
n = dtx-dT (dT <dtx <M (dT + 1))
Here, dtx is a desired value as the longest bus cycle number of DRAM access from the CPU, and M is a buffer maximum capacity. When n = 0, the CPU priority is completely given, and when n = MdT, the DMA priority is given, and the meaning of switching the DMA transfer size is lost. Therefore, 1 ≦ n <MdT.

なお、基本的にCPUからのDRAMアクセス回数はDMAからのDRAMアクセス回数より少ないのでバッファ空き容量時間積分値の閾値S22を1としてもよい。   Since the number of DRAM accesses from the CPU is basically smaller than the number of DRAM accesses from the DMA, the threshold S22 of the buffer free capacity time integration value may be set to 1.

《実施形態3》
図9には本発明の第3の実施形態に係るデータ処理システム(ターゲット機器)1がその開発環境2と共に示される。第1及び第2の実施形態と異なる点は、CPU11がCPUアクセス要求S01のほかにキャッシュミス信号S24をバス調停回路13内のバス負荷監視回路131へ出力し、バス負荷監視回路131はキャッシュミス信号S24からバス負荷を計算してDMA転送サイズ指定要求S03を出力するところである。バス負荷監視回路131は、CPUアクセス要求S01の代わりにキャッシュミス信号S24を用いることで、CPUアクセスに関するバス負荷を監視している。
<< Embodiment 3 >>
FIG. 9 shows a data processing system (target device) 1 according to a third embodiment of the present invention together with its development environment 2. The difference from the first and second embodiments is that the CPU 11 outputs a cache miss signal S24 in addition to the CPU access request S01 to the bus load monitoring circuit 131 in the bus arbitration circuit 13, and the bus load monitoring circuit 131 The bus load is calculated from the signal S24 and a DMA transfer size designation request S03 is output. The bus load monitoring circuit 131 monitors the bus load related to CPU access by using the cache miss signal S24 instead of the CPU access request S01.

図10は図9におけるCPU11の詳細図である。CPUコア111はキャッシュメモリ112に対してキャッシュアクセス要求S25を行い、キャッシュメモリ112は要求S25の内容に応じてキャッシュ内データS26をCPUコア111へ送信する。キャッシュミスしたとき、キャッシュメモリ112はDRAM14に対してCPUアクセス要求S01を送信する。またキャッシュメモリ112は、キャッシュミス信号S24を含むデバッグ用データS27の出力機能を有する。   FIG. 10 is a detailed view of the CPU 11 in FIG. The CPU core 111 makes a cache access request S25 to the cache memory 112, and the cache memory 112 transmits the in-cache data S26 to the CPU core 111 according to the content of the request S25. When a cache miss occurs, the cache memory 112 transmits a CPU access request S01 to the DRAM 14. The cache memory 112 has a function of outputting debug data S27 including a cache miss signal S24.

第3の実施形態では、キャッシュメモリ112から出力されたキャッシュ関連デバッグ用データS27をDEMUX回路113により各データに分解し、そのデータをMUX回路114で合成すると同時に、キャッシュミス信号S24をバス負荷監視回路131へ送信する。   In the third embodiment, the cache-related debugging data S27 output from the cache memory 112 is decomposed into each data by the DEMUX circuit 113, and the data is synthesized by the MUX circuit 114. At the same time, the cache miss signal S24 is monitored by the bus load. Transmit to the circuit 131.

図11は第3の実施形態におけるバス調停回路13の詳細図である。実施形態1及び2との相違点は、バス負荷監視回路131の入力がCPUアクセス要求S01またはバッファ空き容量S20ではなく、キャッシュミス信号S24であることである。   FIG. 11 is a detailed diagram of the bus arbitration circuit 13 in the third embodiment. The difference from the first and second embodiments is that the input of the bus load monitoring circuit 131 is not the CPU access request S01 or the buffer free capacity S20 but the cache miss signal S24.

図12は第3の実施形態におけるバス負荷監視回路131の詳細図である。実施形態1と違うのは、条件付カウンタ13111は、クロック信号が1クロック周期経過し、かつキャッシュミス信号S24が1であるときに値を1インクリメントすることである。   FIG. 12 is a detailed diagram of the bus load monitoring circuit 131 in the third embodiment. The difference from the first embodiment is that the conditional counter 13111 increments the value by 1 when the clock signal has passed one clock cycle and the cache miss signal S24 is 1.

比較器13103は、キャッシュミス信号S24が1であるときの時間が閾値S29より小さければCPUアクセス要求S01が少ないと判定し、CPUアクセス要求S01が少ないときのDMA転送サイズ指定要求S16、たとえば0/1信号における1を、次のCPUアクセス計測周期S30分だけ出力する。サンプル&ホールド回路13105は、CPUアクセス周期の信号S17を読み取り、DMA転送サイズ指定要求の値S16を次のCPUアクセス計測周期S30分だけ保持して出力する。   The comparator 13103 determines that the CPU access request S01 is small if the time when the cache miss signal S24 is 1 is smaller than the threshold value S29, and the DMA transfer size designation request S16 when the CPU access request S01 is small, for example, 0 / 1 in one signal is output only for the next CPU access measurement cycle S30. The sample & hold circuit 13105 reads the CPU access cycle signal S17, holds the DMA transfer size designation request value S16 for the next CPU access measurement cycle S30, and outputs it.

なお、バス負荷監視回路131におけるキャッシュミス回数の閾値S29および計測周期S30のビルダ22による計算処理については、実施形態1におけるCPUからのDRAMアクセス回数の閾値S18および計測周期S19の計算と同じであってよい。   The calculation processing by the builder 22 of the cache miss frequency threshold S29 and the measurement cycle S30 in the bus load monitoring circuit 131 is the same as the calculation of the DRAM access frequency threshold S18 from the CPU and the measurement cycle S19 in the first embodiment. It's okay.

《実施形態4》
図13には本発明の第4の実施形態に係るデータ処理システム(ターゲット機器)1がその開発環境2と共に例示される。第1ないし第3の実施形態と異なる点は、CPU11がCPUアクセス要求S01のほかにプログラムカウンタの値S31をバス調停回路13内のバス負荷監視回路131へ出力し、バス負荷監視回路131はプログラムカウンタの値S31からバス負荷を計算してDMA転送サイズ指定要求S03を出力することである。バス負荷監視回路131は、CPUアクセス要求S01の代わりにプログラムカウンタの値S31を用いることで、CPUアクセスに関するバス負荷を監視している。
<< Embodiment 4 >>
FIG. 13 illustrates a data processing system (target device) 1 according to a fourth embodiment of the present invention together with its development environment 2. The difference from the first to third embodiments is that the CPU 11 outputs the program counter value S31 in addition to the CPU access request S01 to the bus load monitoring circuit 131 in the bus arbitration circuit 13, and the bus load monitoring circuit 131 is programmed. The bus load is calculated from the counter value S31 and a DMA transfer size designation request S03 is output. The bus load monitoring circuit 131 monitors the bus load related to CPU access by using the value S31 of the program counter instead of the CPU access request S01.

図14は第4の実施形態におけるCPU11の詳細図である。第3の実施形態と大きく異なる点は、CPUコア111から出力されたCPU関連デバッグ用データS32をDEMUX回路115により各データ群に分解し、そのデータ群をMUX回路116で合成すると同時に、データ群の中にあるプログラムカウンタの値S31をバス負荷監視回路131へ送信することである。   FIG. 14 is a detailed view of the CPU 11 in the fourth embodiment. A significant difference from the third embodiment is that the CPU-related debugging data S32 output from the CPU core 111 is decomposed into data groups by the DEMUX circuit 115, and the data group is synthesized by the MUX circuit 116, and at the same time, the data group Is transmitted to the bus load monitoring circuit 131.

図15は第4の実施形態におけるバス調停回路13の詳細図である。第1ないし第3の実施形態とは異なるのは、バス負荷監視回路131はCPUアクセス要求S01およびクロック信号S12の代わりに、プログラムカウンタの値S31を用いることで、CPUアクセスに関するバス負荷を監視しているところである。   FIG. 15 is a detailed diagram of the bus arbitration circuit 13 in the fourth embodiment. Unlike the first to third embodiments, the bus load monitoring circuit 131 monitors the bus load related to CPU access by using the program counter value S31 instead of the CPU access request S01 and the clock signal S12. It is in place.

図16は第4の実施形態におけるバス負荷監視回路131の詳細図であり、図17は第4の実施形態におけるバス負荷監視回路131の処理フローである。バス負荷監視回路131は、ルックアップテーブル13114から構成されている。ルックアップテーブル13114には、システム上で動作するプログラムにおいて、CPUアクセス負荷の多いルーチンまたはスレッドにおけるプログラムカウンタ開始値131141および範囲131142が記載されている。プログラムカウンタの値S31がプログラムカウンタ開始値131141から範囲131142の内にあれば、CPUアクセス要求が少ないと判定し、CPUアクセス要求が少ないときのDMA転送サイズ指定要求、たとえば0/1信号における1を、プログラムカウンタS31が範囲131142から出るまで出力する。   FIG. 16 is a detailed diagram of the bus load monitoring circuit 131 in the fourth embodiment, and FIG. 17 is a processing flow of the bus load monitoring circuit 131 in the fourth embodiment. The bus load monitoring circuit 131 includes a lookup table 13114. The look-up table 13114 describes a program counter start value 1311141 and a range 131142 in a routine or thread having a high CPU access load in a program operating on the system. If the program counter value S31 is within the range 131142 from the program counter start value 1311141, it is determined that the CPU access request is small, and a DMA transfer size designation request when the CPU access request is small, for example, 1 in the 0/1 signal is set. , And output until the program counter S31 comes out of the range 131142.

図20は第4の実施形態におけるビルダ22によるルックアップテーブル13114作成処理フローである。ビルダ22はまずプログラム21をコンパイラ221でコンパイルし(F06)、リンカ222でリンクすることによりプログラムの実行形式を仮に作成する(F07)。次にシミュレータ223でプログラムの実行形式を用いてプログラムを実行する。プロファイラ224はプログラム内のルーチンまたはスレッドの単位でキャッシュミス発生回数をカウント、およびプログラムカウンタの開始値131141および範囲131142を計測する(F10)。シミュレータとプロファイラはプログラムのパラメータを複数回変更してプログラムを実行し、キャッシュミス回数を計測する。複数回のキャッシュミス回数から平均値を求め、CPUアクセス要求の数とする(F22)。プロファイラ224はルーチンまたはタスクのCPUアクセス要求数を低い順にソートし、CPUアクセスの少ないルーチンまたはタスクにおけるプログラムカウンタ開始値131141および範囲131142を抽出してルックアップテーブル13114の内容を作成する。プロファイラ224はルックアップテーブル13114の内容をプログラムのソースファイルに変換し、プログラムの初期化においてルックアップテーブル13114の内容をバス負荷監視回路131へ転送するルーチンを動かすようプログラムのソースファイルを書き換える(F23)。   FIG. 20 is a flowchart of processing for creating the lookup table 13114 by the builder 22 in the fourth embodiment. The builder 22 first compiles the program 21 with the compiler 221 (F06), and creates the execution format of the program by linking with the linker 222 (F07). Next, the program is executed by the simulator 223 using the program execution format. The profiler 224 counts the number of cache miss occurrences in units of routines or threads in the program, and measures the start value 1311141 and the range 131142 of the program counter (F10). The simulator and profiler execute the program by changing the program parameters multiple times and measure the number of cache misses. An average value is obtained from the number of times of cache misses and is set as the number of CPU access requests (F22). The profiler 224 sorts the number of CPU access requests of the routine or task in ascending order, extracts the program counter start value 1311141 and the range 131142 in the routine or task with less CPU access, and creates the contents of the lookup table 13114. The profiler 224 converts the contents of the lookup table 13114 into a program source file, and rewrites the program source file to run a routine for transferring the contents of the lookup table 13114 to the bus load monitoring circuit 131 at the initialization of the program (F23). ).

コンパイラ221はルックアップテーブル13114の書かれたソースファイル、およびルックアップテーブル13114の内容をバス負荷監視回路131へ転送するルーチンの書かれたソースファイルをコンパイルし(F15)、リンカ222はルックアップテーブル13114を他のルーチンとリンクし(F16)、実行ファイルを作成する。   The compiler 221 compiles the source file in which the lookup table 13114 is written and the source file in which the routine for transferring the contents of the lookup table 13114 to the bus load monitoring circuit 131 is written (F15). 13114 is linked with another routine (F16), and an execution file is created.

以上のようにルックアップテーブル13114をバス負荷監視回路131に設置してプログラムカウンタの値S31を読み込むことで、たとえばCPU負荷の低いメモリとのデータ読み書きルーチンなどに関してはDMA転送サイズを増やして転送効率を上げることができ、CPU負荷の高い計算ルーチンにおいてはDMA転送サイズを減らしてCPUでのメモリアクセスを迅速にすることが可能である。   As described above, the look-up table 13114 is installed in the bus load monitoring circuit 131 and the value S31 of the program counter is read to increase the DMA transfer size and transfer efficiency with respect to, for example, a data read / write routine with a memory with a low CPU load. In a calculation routine with a high CPU load, it is possible to reduce the DMA transfer size and speed up memory access in the CPU.

《実施形態5》
図21には本発明の第5の実施形態に係るデータ処理システム(ターゲット機器)1がその開発環境2と共に例示される。第1ないし第4の実施形態と異なる点は、DMA転送効率を上げるために、バス負荷監視回路131がDMA転送サイズ指定要求S03の代わりにDMA転送モード指定要求S33を出力し、DMA制御装置12におけるDMA転送モードを変更することである。要するに、CPUアクセスが少なければ、即ち所定の閾値を超えなければDMA転送モードをバーストモードとし、CPUアクセスが多ければ、即ち所定の閾値を超えればDMA転送モードをサイクルスチールモードとする。この場合の制御手法は前述の説明から極めて容易に類することができる内容であるからその詳細な説明は省略する。
<< Embodiment 5 >>
FIG. 21 illustrates a data processing system (target device) 1 according to a fifth embodiment of the present invention together with its development environment 2. The difference from the first to fourth embodiments is that in order to increase the DMA transfer efficiency, the bus load monitoring circuit 131 outputs a DMA transfer mode designation request S33 instead of the DMA transfer size designation request S03, and the DMA controller 12 Is to change the DMA transfer mode. In short, if the CPU access is low, that is, if the predetermined threshold is not exceeded, the DMA transfer mode is set to the burst mode, and if the CPU access is high, that is, if the predetermined threshold is exceeded, the DMA transfer mode is set to the cycle steal mode. Since the control method in this case can be classified very easily from the above description, a detailed description thereof will be omitted.

《実施形態6》
図22には本発明の第6の実施形態に係るデータ処理システム(ターゲット機器)1がその開発環境2と共に例示される。第1ないし第5の実施形態と異なる点は、DMA転送効率を上げるために、バス負荷監視回路131がDMA転送サイズ指定要求S03およびDMA転送モード指定要求S33の両方を出力し、DMA制御装置12におけるDMA転送サイズおよびDMA転送モードを変更することである。
Embodiment 6
FIG. 22 illustrates a data processing system (target device) 1 according to the sixth embodiment of the present invention together with its development environment 2. The difference from the first to fifth embodiments is that the bus load monitoring circuit 131 outputs both the DMA transfer size designation request S03 and the DMA transfer mode designation request S33 in order to increase the DMA transfer efficiency. Changing the DMA transfer size and DMA transfer mode.

図23は第6の実施形態におけるバス調停回路13の詳細図である。実施形態1ないし5と違う点は、DMA転送モード指定要求用とDMA転送サイズ指定要求用とでバス負荷監視回路をそれぞれ1つずつ有するところである。DMA転送モードのほうがDMA転送サイズに比べてDMAの転送効率を向上させることができる反面、CPUからのDRAMアクセスを阻害する恐れがあるため、DMA転送モード指定要求用閾値をDMA転送サイズ指定要求用閾値より高く、DMA転送モード指定要求用計測周期をDMA転送サイズ指定要求用計測周期より長めに、それぞれ設定する。具体的には、DMA転送モード指定要求用閾値および計測周期をDMA転送サイズ指定要求用閾値の整数倍とする。   FIG. 23 is a detailed diagram of the bus arbitration circuit 13 in the sixth embodiment. The difference from the first to fifth embodiments is that one bus load monitoring circuit is provided for each of the DMA transfer mode designation request and the DMA transfer size designation request. The DMA transfer mode can improve the DMA transfer efficiency compared to the DMA transfer size, but there is a risk of hindering the DRAM access from the CPU. Therefore, the DMA transfer mode designation request threshold is set for the DMA transfer size designation request. The DMA transfer mode designation request measurement cycle is set higher than the threshold and longer than the DMA transfer size designation request measurement cycle. Specifically, the DMA transfer mode designation request threshold and the measurement cycle are set to integer multiples of the DMA transfer size designation request threshold.

《実施形態7》
図24には本発明の第7の実施形態に係るデータ処理システム(ターゲット機器)1がその開発環境2と共に例示される。第1ないし第6の実施形態と異なる点は、CPUがCPUアクセス要求S01のほかにプログラムカウンタ値S31を出力しており、かつバス負荷監視回路がDMA転送サイズ指定要求S03およびDMA転送モード指定要求S33の両方を出力し、DMA制御装置12におけるDMA転送サイズおよびDMA転送モードを変更することである。
<< Embodiment 7 >>
FIG. 24 illustrates a data processing system (target device) 1 according to a seventh embodiment of the present invention together with its development environment 2. The difference from the first to sixth embodiments is that the CPU outputs a program counter value S31 in addition to the CPU access request S01, and the bus load monitoring circuit receives a DMA transfer size designation request S03 and a DMA transfer mode designation request. Both S33 are output, and the DMA transfer size and the DMA transfer mode in the DMA controller 12 are changed.

図25は本発明の第7の実施形態における、バス負荷監視回路131の処理フローである。プログラムカウンタの値S31がプログラムカウンタ開始値131141から範囲131142の内にあれば(F02)、CPUアクセス要求S01が少ないと判定し、CPUアクセス要求S01が少ないときのDMA転送サイズ指定要求S03、たとえば0/1信号における1を、プログラムカウンタ値が範囲から出るまで出力する(F04ないしF05)。さらに、プログラムカウンタの値S03がルックアップテーブル13114のうち上位n番目に入っていれば(F19)、ルックアップテーブル13114はCPUアクセス要求S01が少ない順にソートされているため、CPUアクセス要求S01がさらに少ないと判定し、CPUアクセス要求S01が少ないときのDMA転送モード指定要求S33、たとえば0/1信号における1を、プログラムカウンタが範囲から出るまで出力する。ここでDMA転送モード指定要求S07の値が0のときはサイクルスチールモードを、1のときはバーストモードを示す。   FIG. 25 is a processing flow of the bus load monitoring circuit 131 in the seventh embodiment of the present invention. If the program counter value S31 is within the range 131142 from the program counter start value 131114 (F02), it is determined that the CPU access request S01 is small, and the DMA transfer size designation request S03 when the CPU access request S01 is small, for example, 0 1 in signal / 1 is output until the program counter value is out of range (F04 to F05). Further, if the value S03 of the program counter is in the top nth of the lookup table 13114 (F19), the lookup table 13114 is sorted in ascending order of the CPU access request S01. If the CPU access request S01 is small, the DMA transfer mode designation request S33, for example, 1 in the 0/1 signal is output until the program counter goes out of the range. Here, when the value of the DMA transfer mode designation request S07 is 0, the cycle steal mode is indicated, and when it is 1, the burst mode is indicated.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

本発明は、DMACを備えたマイクロコンピュータ又はデータプロセッサだけでなく各種SoCにも広く適用することができる。プログラム開発システムとしての開発環境はPCに構築されることに限定されず、エンジニアリングワークステーション等で構築することも可能である。CPUやDMACがアクセスするメモリがDRAMに限定されずその他のメモリであってもよい。   The present invention can be widely applied not only to a microcomputer or data processor equipped with a DMAC but also to various SoCs. The development environment as a program development system is not limited to being constructed on a PC, but can be constructed on an engineering workstation or the like. The memory accessed by the CPU or DMAC is not limited to DRAM, and may be other memory.

本発明の第1の実施形態である、データ処理システムの全体図である。1 is an overall view of a data processing system according to a first embodiment of the present invention. 本発明の第1の実施形態におけるデータ処理システムの詳細図である。1 is a detailed view of a data processing system according to a first embodiment of the present invention. 本発明の第1の実施形態における各種レジスタ類の詳細図である。FIG. 3 is a detailed view of various registers in the first embodiment of the present invention. 本発明の第1の実施形態におけるレジスタ制御回路の詳細図である。FIG. 2 is a detailed diagram of a register control circuit according to the first embodiment of the present invention. 本発明の第1の実施形態におけるバス調停回路の詳細図である。FIG. 2 is a detailed diagram of a bus arbitration circuit in the first embodiment of the present invention. 本発明の第1の実施形態におけるバス負荷監視回路の詳細図である。FIG. 3 is a detailed diagram of a bus load monitoring circuit according to the first embodiment of the present invention. 本発明の第2の実施形態におけるバス調停回路の詳細図である。It is a detailed diagram of the bus arbitration circuit in the second embodiment of the present invention. 本発明の第2の実施形態におけるバス負荷監視回路の詳細図である。It is a detailed diagram of a bus load monitoring circuit in the second embodiment of the present invention. 本発明の第3の実施形態である、データ処理システムの全体図である。It is a whole view of the data processing system which is the 3rd Embodiment of this invention. 本発明の第3の実施形態におけるCPUの詳細図である。It is a detailed view of CPU in the 3rd Embodiment of this invention. 本発明の第3の実施形態におけるバス調停回路の詳細図である。It is a detailed diagram of the bus arbitration circuit in the third embodiment of the present invention. 本発明の第3の実施形態におけるバス負荷監視回路の詳細図である。It is a detailed diagram of the bus load monitoring circuit in the third embodiment of the present invention. 本発明の第4の実施形態である、データ処理システムの全体図である。It is a whole data processing system which is the 4th Embodiment of this invention. 本発明の第4の実施形態におけるCPUの詳細図である。It is a detailed view of CPU in the 4th Embodiment of this invention. 本発明の第4の実施形態におけるバス調停回路の詳細図である。It is a detailed figure of the bus arbitration circuit in the 4th Embodiment of this invention. 本発明の第4の実施形態におけるバス負荷監視回路の詳細図である。It is a detailed diagram of a bus load monitoring circuit in the fourth embodiment of the present invention. 本発明の第4の実施形態におけるバス負荷監視回路の処理フローである。It is a processing flow of the bus load monitoring circuit in the 4th Embodiment of this invention. 本発明の第1の実施形態におけるビルダの詳細図である。It is detail drawing of the builder in the 1st Embodiment of this invention. 本発明の第1の実施形態におけるDRAMアクセス回数の閾値S18および計測周期S19のビルダ22による計算処理フローである。It is a calculation processing flow by the builder 22 of the threshold value S18 of DRAM access frequency in the 1st Embodiment of this invention, and the measurement period S19. 本発明の第4の実施形態における、ビルダによるルックアップテーブル作成処理フローである。It is the look-up table creation processing flow by the builder in the 4th Embodiment of this invention. 本発明の第5の実施形態である、データ処理システムの全体図である。FIG. 10 is an overall view of a data processing system according to a fifth embodiment of the present invention. 本発明の第6の実施形態である、データ処理システムの全体図である。It is a whole data processing system which is the 6th Embodiment of this invention. 本発明の第6の実施形態におけるバス負荷監視回路の詳細図である。It is a detailed view of the bus load monitoring circuit in the sixth embodiment of the present invention. 本発明の第7の実施形態である、データ処理システムの全体図である。FIG. 10 is an overall view of a data processing system according to a seventh embodiment of the present invention. 本発明の第7の実施形態におけるバス負荷監視回路の処理フローである。It is a processing flow of the bus load monitoring circuit in the 7th Embodiment of this invention. 本発明の第1の実施形態におけるDRAMへのアクセス要求の詳細図である。It is a detailed view of an access request to the DRAM in the first embodiment of the present invention. 本発明の第1の実施形態におけるDRAMの第1のタイムチャートである。3 is a first time chart of the DRAM according to the first embodiment of the present invention. 本発明の第1の実施形態におけるDRAMの第2のタイムチャートである。6 is a second time chart of the DRAM according to the first embodiment of the present invention.

符号の説明Explanation of symbols

1 ターゲット機器
11 CPU
111 CPUコア
112 キャッシュ
113 キャッシュ用デマルチプレクサ
114 キャッシュ用マルチプレクサ
115 CPUコア用デマルチプレクサ
116 CPUコア用マルチプレクサ
12 DMA制御装置(DMAC)
121 レジスタ制御回路
1211 レジスタ書込内容生成部
1212 従来のレジスタ制御回路
1213 デマルチプレクサ
1214 マルチプレクサ
122 各種制御回路
123 バスI/F
124 各種レジスタ類
125 DMA制御装置内部バス
13 バス調停回路
131 バス負荷監視回路
13101 条件付カウンタ
13102 タイマ用カウンタ
13103 DMA転送サイズ判定用比較器
13104 タイマ信号生成用比較器
13105 サンプル&ホールド回路
13106 CPUアクセス要求数閾値格納メモリ
13107 CPUアクセス要求数計測周期格納メモリ
13108 バッファ空き容量時間積分器
13109 バッファ空き容量時間積分閾値格納メモリ
13110 バッファ空き容量時間積分値計測周期格納メモリ
13111 キャッシュミス信号数用条件付カウンタ
13112 キャッシュミス信号数閾値格納メモリ
13113 キャッシュミス信号計測周期格納メモリ
13114 ルックアップテーブル
131141 プログラムカウンタ開始値
131151 プログラムカウンタ範囲
132 DMA用キューバッファ
133 CPU用キューバッファ
134 優先順位判定回路
135 セレクタ
14 DRAM
15 プログラム専用RAM
16 プログラムI/F
17 バス
2 開発環境
21 プログラム
22 ビルダ
221 コンパイラ
222 リンカ
223 シミュレータ
224 プロファイラ
23 アップローダ
24 OS
25 PC
S01 CPUアクセス要求
S02 DMAアクセス要求
S03 DMA転送サイズ指定要求
S04 DRAMアクセス
S041 アクセス要求元識別子
S042 アクセス先アドレス
S043 アクセスサイズ
S044 リード/ライト判別子
S045 書き込みデータ
S05 プログラム実行形式
S06 プログラム内命令
S07 レジスタ書込内容
S071 DMA転送サイズ指定ビット
S08 各種信号
S09 レジスタ書込内容(DMA転送サイズ指定要求反映後)
S10 各種レジスタ初期化信号
S11 レジスタ内容
S12 クロック信号
S13 選択信号
S14 CPUアクセス要求数
S15 タイマ用カウンタ信号
S16 DMA転送サイズ指定要求連続値
S17 タイマ信号
S18 CPUアクセス要求数閾値信号
S19 CPUアクセス要求数計測周期信号
S20 CPU用キューバッファ空き容量
S21 CPU用キューバッファ空き容量時間積分値
S22 CPU用キューバッファ空き容量時間積分閾値
S23 CPU用キューバッファ空き容量時間積分値計測周期
S24 キャッシュミス信号
S25 キャッシュアクセス要求
S26 キャッシュ内データ
S27 キャッシュ関連デバッグ用データ
S28 キャッシュミス信号数
S29 キャッシュミス信号数閾値
S30 キャッシュミス信号数計測周期
S31 プログラムカウンタ値
S32 CPU関連デバッグ用データ
S33 DMA転送モード指定要求
C1 DMA転送サイズ32バイト設定
C2 DMA転送サイズ64バイト設定
C3 DMA転送サイズ32バイト/64バイト自動切換設定
C4 DMA転送サイクルスチールモード設定
C5 DMA転送バーストモード設定
C6 DMA転送サイクルスチール/バースト自動切換モード設定
C7 DMA転送量・転送方法自動切換モード設定
F01 プログラムカウンタ開始値+範囲計算処理
F02 プログラムカウンタ値判定処理
F03 ルックアップテーブル全文読込完了判定処理
F04 DMA転送サイズ0指定処理
F05 DMA転送サイズ1指定処理
F06 プログラムのコンパイル処理
F07 プログラムのリンク処理
F08 DMAアクセス間隔判定処理
F09 レジスタ設定値からDMAアクセス間隔を求める処理
F10 シミュレーション実行処理
F11 プロファイラ計測結果からDMAアクセス間隔を求める処理
F12 CPUアクセス計測間隔算出処理
F13 CPUアクセス要求数平均値算出処理
F14 CPUアクセス要求閾値計算処理
F15 プログラム再コンパイル処理
F16 プログラム再リンク処理
F17 プログラムアップロード処理
F18 ルックアップテーブル作成処理
F19 ルックアップテーブル順位判定処理
F20 DMA転送モード0設定処理
F21 DMA転送モード1設定処理
F22 CPUアクセス回数計算処理
T01 DMA転送サイズ32バイト固定時タイムチャート
T02 DMA転送サイズ自動切換時タイムチャート
T03 DRAMアクセスのオーバーヘッド時間
T04 DMAによる32バイトDRAMアクセスにかかる時間
T05 DMAによる64バイトDRAMアクセスにかかる時間
T06 DMA転送量切換タイミング境界線
T07 DMA転送量切換タイミング境界印
T08 DMA転送サイズ自動切換時の転送完了を示す境界線
T09 DMA転送サイズ32バイト固定時の転送完了を示す境界線
T10 CPUアクセス計測期間を示す矢印
T11 DMA転送サイズ自動切換時と固定時とのアクセス時間差
T12 CPUからのDRAMアクセスにかかる時間
T13 DMA転送サイズ自動切換時のCPUアクセス完了を示す境界線
T14 DMA転送サイズ固定時のCPUアクセス完了を示す境界線
T15 DMA転送サイズ自動切換時と固定時とのCPUアクセス時間差
T16 DMA転送サイズ64バイト固定時タイムチャート
1 Target device 11 CPU
111 CPU Core 112 Cache 113 Cache Demultiplexer 114 Cache Multiplexer 115 CPU Core Demultiplexer 116 CPU Core Multiplexer 12 DMA Controller (DMAC)
121 Register Control Circuit 1211 Register Write Content Generation Unit 1212 Conventional Register Control Circuit 1213 Demultiplexer 1214 Multiplexer 122 Various Control Circuits 123 Bus I / F
124 Various registers 125 DMA controller internal bus 13 Bus arbitration circuit 131 Bus load monitoring circuit 13101 Conditional counter 13102 Timer counter 13103 Comparator for DMA transfer size determination 13104 Comparator for timer signal generation 13105 Sample & hold circuit 13106 CPU access Request number threshold storage memory 13107 CPU access request number measurement cycle storage memory 13108 Buffer free capacity time integrator 13109 Buffer free capacity time integration threshold storage memory 13110 Buffer free capacity time integration value measurement cycle storage memory 13111 Conditional counter for number of cache miss signals 13112 Cache miss signal count threshold storage memory 13113 Cache miss signal measurement cycle storage memory 13114 Look-up table 1311 1 Program counter start value 131,151 program counter range 132 queue for DMA queue buffer 133 CPU buffer 134 the priority decision circuit 135 selector 14 DRAM
15 Program dedicated RAM
16 Program I / F
17 Bus 2 Development Environment 21 Program 22 Builder 221 Compiler 222 Linker 223 Simulator 224 Profiler 23 Uploader 24 OS
25 PC
S01 CPU access request S02 DMA access request S03 DMA transfer size designation request S04 DRAM access S041 Access request source identifier S042 Access destination address S043 Access size S044 Read / write discriminator S045 Write data S05 Program execution format S06 In-program instruction S07 Register write Contents S071 DMA transfer size designation bit S08 Various signals S09 Register contents (after reflecting DMA transfer size designation request)
S10 Various register initialization signals S11 Register contents S12 Clock signal S13 Selection signal S14 CPU access request count S15 Timer counter signal S16 DMA transfer size designation request continuous value S17 Timer signal S18 CPU access request count threshold signal S19 CPU access request count measurement cycle Signal S20 CPU queue buffer free capacity S21 CPU queue buffer free capacity time integration value S22 CPU queue buffer free capacity time integration threshold S23 CPU queue buffer free capacity time integrated value measurement cycle S24 Cache miss signal S25 Cache access request S26 Cache Internal data S27 Cache-related debugging data S28 Number of cache miss signals S29 Cache miss signal number threshold S30 Cache miss signal number measurement cycle S31 Program counter value S32 CPU-related debugging data S33 DMA transfer mode designation request C1 DMA transfer size setting 32 bytes C2 DMA transfer size 64 bytes setting C3 DMA transfer size 32 bytes / 64 bytes automatic switching setting C4 DMA transfer cycle steal mode setting C5 DMA transfer burst mode setting C6 DMA transfer cycle steal / burst automatic switching mode setting C7 DMA transfer amount / transfer method automatic switching mode setting F01 Program counter start value + range calculation processing F02 Program counter value judgment processing F03 Lookup table full text read completion judgment Process F04 DMA transfer size 0 designation process F05 DMA transfer size 1 designation process F06 Program compilation process F07 Program link process F08 DM A access interval determination processing F09 Processing for obtaining DMA access interval from register set value F10 Simulation execution processing F11 Processing for obtaining DMA access interval from profiler measurement result F12 CPU access measurement interval calculation processing F13 CPU access request count average value calculation processing F14 CPU access Request threshold calculation process F15 Program recompilation process F16 Program relink process F17 Program upload process F18 Lookup table creation process F19 Lookup table rank determination process F20 DMA transfer mode 0 setting process F21 DMA transfer mode 1 setting process F22 CPU access count calculation Processing T01 Time chart when DMA transfer size is fixed to 32 bytes T02 Time chart when DMA transfer size is automatically switched T03 D RAM access overhead time T04 Time required for 32-byte DRAM access by DMA T05 Time required for 64-byte DRAM access by DMA T06 DMA transfer amount switching timing boundary line T07 DMA transfer amount switching timing boundary mark T08 Transfer at DMA transfer size automatic switching Boundary line indicating completion T09 Boundary line indicating transfer completion when DMA transfer size is fixed to 32 bytes T10 Arrow indicating CPU access measurement period T11 Access time difference between DMA transfer size automatic switching and fixed time T12 DRAM access from CPU Time T13 Boundary line indicating completion of CPU access during DMA transfer size automatic switching T14 Boundary line indicating CPU access completion when DMA transfer size is fixed T15 CP between DMA transfer size automatic switching and fixed time Access time difference T16 DMA transfer size 64-byte fixed at the time chart

Claims (11)

データ転送量およびデータ転送方法が設定されるレジスタを有するDMA制御装置と、メモリへのアクセスにおいてCPU又は前記DMA制御装置の間でバス占有権を調停するバス調停回路とを有するデータ処理システムにおいて、
前記バス調停装置は、前記CPUからの前記メモリに対するアクセスによるバス負荷を定期的に計測してそのバス負荷情報を前記DMA制御装置へ送信するバス負荷監視回路を有し、
前記DMA制御装置は、前記バス負荷監視回路から受取ったバス負荷情報が所定のバス負荷を超えているときデータ転送制御によるデータ転送量を少なくする制御を行う、データ処理システム。
In a data processing system having a DMA control device having a register in which a data transfer amount and a data transfer method are set, and a bus arbitration circuit for arbitrating a bus occupation right between the CPU or the DMA control device in accessing a memory,
The bus arbitration device includes a bus load monitoring circuit that periodically measures a bus load due to access to the memory from the CPU and transmits the bus load information to the DMA control device,
The data processing system, wherein the DMA controller performs control to reduce a data transfer amount by data transfer control when the bus load information received from the bus load monitoring circuit exceeds a predetermined bus load.
前記データ転送制御によるデータ転送量を少なくする制御は、サイクルスチールモードにおける1回のデータ転送量を減らす制御である、請求項1記載のデータ処理システム。   2. The data processing system according to claim 1, wherein the control for reducing the data transfer amount by the data transfer control is a control for reducing a single data transfer amount in the cycle steal mode. 前記データ転送制御によるデータ転送量を少なくする制御は、データ転送制御モードをバーストモードからサイクルスチールモードに変更する制御である、請求項1記載のデータ処理システム。   2. The data processing system according to claim 1, wherein the control for reducing the data transfer amount by the data transfer control is control for changing a data transfer control mode from a burst mode to a cycle steal mode. 前記バス負荷監視回路は、一定時間における前記CPUからのメモリアクセス回数を計測し、アクセス回数が閾値以上かどうかを表す信号を前記バス負荷情報として求める、請求項1項記載のデータ処理システム。   2. The data processing system according to claim 1, wherein the bus load monitoring circuit measures the number of memory accesses from the CPU in a predetermined time and obtains a signal indicating whether the number of accesses is equal to or greater than a threshold value as the bus load information. 前記バス調停装置は、前記CPUからのメモリアクセス要求を一時的に蓄積し、空き記憶容量を前記バス監視回路へ送信するバッファを更に有し、
前記バス負荷監視回路は、一定時間における前記バッファのバッファ空き容量の積分値が閾値以上か否かを表す情報を前記バス負荷情報として前記DMA制御装置へ送信する、請求項1記載のデータ処理システム。
The bus arbitration device further includes a buffer that temporarily accumulates memory access requests from the CPU and transmits a free storage capacity to the bus monitoring circuit;
2. The data processing system according to claim 1, wherein the bus load monitoring circuit transmits, as the bus load information, information indicating whether or not an integrated value of the buffer free capacity of the buffer at a certain time is equal to or greater than a threshold value to the DMA controller. .
前記CPUは、キャッシュミスヒットが発生した際にキャッシュミス信号をバス調停回路へ送信するキャッシュメモリを有し、
前記バス負荷監視回路は、一定時間におけるキャッシュミス信号発生回数を計測し、キャッシュミス信号発生回数が閾値以上かどうかを表す情報を前記バス負荷情報として前記DMA制御装置へ送信する、請求項1記載のデータ処理システム。
The CPU includes a cache memory that transmits a cache miss signal to the bus arbitration circuit when a cache miss hit occurs.
2. The bus load monitoring circuit measures the number of occurrences of a cache miss signal in a predetermined time, and transmits information indicating whether the number of occurrences of a cache miss signal is equal to or greater than a threshold to the DMA controller as the bus load information. Data processing system.
前記CPUは実行すべき命令のアドレスを示すプログラムカウンタの値をバス調停回路へ出力し、
前記バス負荷監視回路は、前記CPUからのメモリアクセス回数の少ないルーチンまたはタスクにおけるプログラムカウンタの開始値および範囲をルックアップテーブルとして記憶し、入力した前記プログラムカウンタの値がテーブル内にヒットしたかどうかに関する情報を前記バス負荷として前記DMA制御装置へ送信する、請求項1記載のデータ処理システム。
The CPU outputs a value of a program counter indicating an address of an instruction to be executed to the bus arbitration circuit,
The bus load monitoring circuit stores a start value and a range of a program counter in a routine or task with a small number of memory accesses from the CPU as a lookup table, and whether or not the input value of the program counter hits the table The data processing system according to claim 1, wherein the information regarding is transmitted to the DMA controller as the bus load.
請求項4記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムであって、
前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、
該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有し、
前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、
前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるCPUからのメモリアクセス回数の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有し、
前記アップローダは、前記プロファイラで求められた前記CPUからのメモリアクセス回数の閾値および計測周期をプログラムと一緒に出力する、プログラム開発システム。
A program development system that supports development of a program using the data processing system according to claim 4 as a target device,
A builder for converting a source code of a program operating on the target device into an execution format;
An uploader for transferring the program execution format onto the target device,
The builder simulates a target device and executes a program;
Based on the execution result by the simulator, the number of memory accesses in the target device is measured a plurality of times, and the threshold value and the measurement cycle of the number of memory accesses from the CPU in the bus load monitoring circuit of the target device are minimized. A profiler that seeks to be
The program uploading system, wherein the uploader outputs a threshold value and a measurement cycle of the number of memory accesses from the CPU obtained by the profiler together with a program.
請求項5記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムであって、
前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、
該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有し、
前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、
前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるバッファ空き容量の積分値の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有し、
前記アップローダは、前記プロファイラで求められた前記バッファ空き容量の積分値の閾値および計測周期をプログラムと一緒に出力する、プログラム開発システム。
A program development system that supports development of a program using the data processing system according to claim 5 as a target device,
A builder for converting a source code of a program operating on the target device into an execution format;
An uploader for transferring the program execution format onto the target device,
The builder simulates a target device and executes a program;
Based on the execution result by the simulator, the number of times of memory access in the target device is measured a plurality of times, and the threshold value and the measurement cycle of the integral value of the buffer free capacity in the bus load monitoring circuit of the target device are minimized. A profiler that seeks to be
The program development system, wherein the uploader outputs a threshold value and a measurement cycle of the integral value of the buffer free space obtained by the profiler together with a program.
請求項6記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムであって、
前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、
該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有し、
前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、
前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるキャッシュミス回数の閾値および計測周期を、プログラム実行時間が最短になるように求めるプロファイラと、を有し、
前記アップローダは、前記プロファイラで求められた前記キャッシュミス回数の閾値および計測周期をプログラムと一緒に出力する、プログラム開発システム。
A program development system that supports development of a program using the data processing system according to claim 6 as a target device,
A builder for converting a source code of a program operating on the target device into an execution format;
An uploader for transferring the program execution format onto the target device,
The builder simulates a target device and executes a program;
Based on the execution result by the simulator, the number of memory accesses in the target device is measured a plurality of times, and the threshold for the number of cache misses and the measurement cycle in the bus load monitoring circuit of the target device are set so that the program execution time is minimized. A profiler for which
The program uploading system, wherein the uploader outputs a threshold value and a measurement cycle of the cache miss number obtained by the profiler together with a program.
請求項7記載のデータ処理システムをターゲット機器としてそのプログラムの開発を支援するプログラム開発システムであって、
前記ターゲット機器上で動作するプログラムのソースコードを実行形式に変換するビルダと、
該プログラム実行形式を前記ターゲット機器上へ転送するアップローダとを有し、
前記ビルダは、ターゲット機器を模擬しプログラムを実行するシミュレータと、
前記シミュレータによる実行結果に基づいて、前記ターゲット機器におけるメモリアクセス回数を複数回計測し、前記ターゲット機器のバス負荷監視回路におけるCPUからのメモリアクセス回数の少ないルーチンまたはタスクにおけるプログラムカウンタの開始値および範囲を示すルックアップテーブルを求めるプロファイラと、を有し、
前記アップローダは、前記プロファイラで求められたルックアップテーブルをプログラムと一緒に出力するプログラム開発システム。
A program development system for supporting development of a program using the data processing system according to claim 7 as a target device,
A builder for converting a source code of a program operating on the target device into an execution format;
An uploader for transferring the program execution format onto the target device,
The builder simulates a target device and executes a program;
Based on the execution result by the simulator, the number of memory accesses in the target device is measured a plurality of times, and the start value and range of the program counter in a routine or task with a small number of memory accesses from the CPU in the bus load monitoring circuit of the target device And a profiler for obtaining a look-up table indicating
The uploader is a program development system that outputs a lookup table obtained by the profiler together with a program.
JP2008172955A 2008-07-02 2008-07-02 Data processing system and program development system Expired - Fee Related JP4871921B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008172955A JP4871921B2 (en) 2008-07-02 2008-07-02 Data processing system and program development system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008172955A JP4871921B2 (en) 2008-07-02 2008-07-02 Data processing system and program development system

Publications (2)

Publication Number Publication Date
JP2010015275A JP2010015275A (en) 2010-01-21
JP4871921B2 true JP4871921B2 (en) 2012-02-08

Family

ID=41701354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008172955A Expired - Fee Related JP4871921B2 (en) 2008-07-02 2008-07-02 Data processing system and program development system

Country Status (1)

Country Link
JP (1) JP4871921B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103210377B (en) 2010-11-15 2016-06-01 富士通株式会社 Information processing system
JP6985810B2 (en) 2017-04-27 2021-12-22 キヤノン株式会社 Transfer device, transfer method and multifunction device
CN113590512B (en) * 2021-07-30 2023-09-29 眸芯科技(上海)有限公司 Self-starting DMA device capable of directly connecting peripheral equipment and application

Also Published As

Publication number Publication date
JP2010015275A (en) 2010-01-21

Similar Documents

Publication Publication Date Title
JP7313381B2 (en) Embedded scheduling of hardware resources for hardware acceleration
EP1899828B1 (en) Device and method for arbitrating between direct memory access task requests
US7437618B2 (en) Method in a processor for dynamically during runtime allocating memory for in-memory hardware tracing
US7418629B2 (en) Synchronizing triggering of multiple hardware trace facilities using an existing system bus
US7421619B2 (en) Method in a processor for performing in-memory tracing using existing communication paths
US8527812B2 (en) Information processing device
EP1899825B1 (en) Device and method for controlling multiple dma tasks
US7913123B2 (en) Concurrently sharing a memory controller among a tracing process and non-tracing processes using a programmable variable number of shared memory write buffers
US20110055838A1 (en) Optimized thread scheduling via hardware performance monitoring
US20060184837A1 (en) Method, apparatus, and computer program product in a processor for balancing hardware trace collection among different hardware trace facilities
JP4813485B2 (en) Processing device with burst read / write operation
US9009368B2 (en) Interrupt latency performance counters
JP2007241918A (en) Processor device
EP3047380B1 (en) Pattern detector for detecting hangs
JP4871921B2 (en) Data processing system and program development system
EP1899827A1 (en) Device and method for executing a dma task
US8812783B2 (en) Operation apparatus, cache apparatus, and control method thereof
JP6192858B2 (en) Logic analyzer for detecting hangs
US8667233B2 (en) Competition testing device
US7761280B2 (en) Data processing apparatus simulation by generating anticipated timing information for bus data transfers
JP2007514214A (en) Integrated circuit with measuring unit for measuring usage
CN114514504A (en) Concurrent throttling of upstream resources
JP5077209B2 (en) Memory management device, memory management method and program
EP4339776A1 (en) Task scheduling method, system, and hardware task scheduler
JP2008171436A (en) Data transfer device and data transfer method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100326

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100527

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111025

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: 20111110

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111121

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141125

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees