JP6128833B2 - Processing equipment - Google Patents
Processing equipment Download PDFInfo
- Publication number
- JP6128833B2 JP6128833B2 JP2012281173A JP2012281173A JP6128833B2 JP 6128833 B2 JP6128833 B2 JP 6128833B2 JP 2012281173 A JP2012281173 A JP 2012281173A JP 2012281173 A JP2012281173 A JP 2012281173A JP 6128833 B2 JP6128833 B2 JP 6128833B2
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- clock
- frequency
- bus
- information
- 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
Links
Images
Landscapes
- Power Sources (AREA)
Description
本発明は処理装置に関し、特に複数のCPUを用いて処理を行う装置に関する。 The present invention relates to a processing apparatus, and more particularly to an apparatus that performs processing using a plurality of CPUs.
従来、デジタルカメラや携帯電話、スマートフォンなどの情報処理装置においては、CPUを用いて動画や静止画、或いは音声などの情報データを処理している(例えば、特許文献1参照)。また、携帯機器においては、CPUに供給する動作クロックの周波数を制御することにより消費電力を削減することが行われている。 Conventionally, in an information processing apparatus such as a digital camera, a mobile phone, and a smartphone, information data such as a moving image, a still image, or sound is processed using a CPU (see, for example, Patent Document 1). In portable devices, power consumption is reduced by controlling the frequency of an operation clock supplied to a CPU.
例えば、CPUで処理すべき作業が無くなった場合には、CPU自体を省電力なスリープモードに入れるとともに、CPUの動作クロックやCPUバスクロックの周波数を下げるようにする。 For example, when there is no work to be processed by the CPU, the CPU itself is put into a power saving sleep mode and the frequency of the CPU operation clock and CPU bus clock is lowered.
近年では、処理されるデータの量が増加しているため、複数のCPUを用いて処理を行うようになった。一つのCPUバスに複数のCPUが接続された場合、各CPUが自分自身の都合で、CPUバスクロックの周波数を下げるようなことができない。 In recent years, since the amount of data to be processed has increased, processing has been performed using a plurality of CPUs. When a plurality of CPUs are connected to one CPU bus, each CPU cannot reduce the frequency of the CPU bus clock for its own convenience.
そのため、消費電力を削減することができないという問題があった。 Therefore, there has been a problem that power consumption cannot be reduced.
本発明はこのような課題を解決し、複数のCPUが共通のバスに接続されている場合であっても、少ない回路規模で、消費電力を削減することができるようにすることを目的とする。 An object of the present invention is to solve such problems and to reduce power consumption with a small circuit scale even when a plurality of CPUs are connected to a common bus. .
本発明においては、バスクロックに応じてデータの転送を行うバスと、それぞれ前記バスに接続され、CPUクロックに応じて動作すると共に、それぞれが要求する、前記CPUクロックの周波数に関する第1の情報と前記バスクロックの周波数に関する第2の情報とを出力する複数のCPUと、前記複数のCPUそれぞれから出力された前記第1の情報と前記第2の情報とを記憶するレジスタを有し、前記複数のCPUから出力され、前記レジスタに記憶された前記第1の情報と前記第2の情報とに基づいて、前記複数のCPUに供給する前記CPUクロックそれぞれの周波数と、前記バスクロックの周波数とを決定し、前記複数のCPUにそれぞれ前記CPUクロックを供給すると共に、前記バスに前記バスクロックを供給するクロック管理手段とを備え、前記クロック管理手段は、前記レジスタに記憶された前記第2の情報に基づいて、前記複数のCPUがそれぞれ要求したバスクロックの周波数のうち最も高い周波数を前記バスクロックの周波数として決定し、前記決定したバスクロックの周波数と前記レジスタに記憶された前記第1の情報とに基づいて、前記CPUが要求したCPUクロックの周波数が前記決定したバスクロックの周波数以上である場合は、前記CPUが要求した周波数を当該CPUに供給する前記CPUクロックの周波数として決定し、前記CPUが要求したCPUクロックの周波数が前記決定したバスクロックの周波数よりも低い場合は、前記決定したバスクロックの周波数を当該CPUに供給する前記CPUクロックの周波数として決定する。 In the present invention, a bus that transfers data according to a bus clock, and is connected to the bus, operates according to the CPU clock, and requests the first information about the frequency of the CPU clock that each requests A plurality of CPUs for outputting second information related to the frequency of the bus clock; and a register for storing the first information and the second information output from each of the plurality of CPUs. The frequency of each of the CPU clocks supplied to the plurality of CPUs and the frequency of the bus clock based on the first information and the second information output from the CPU and stored in the register A clock that determines and supplies the CPU clock to each of the plurality of CPUs and supplies the bus clock to the bus And the clock management means determines the highest frequency among the bus clock frequencies requested by the plurality of CPUs based on the second information stored in the register. And the CPU clock frequency requested by the CPU is equal to or higher than the determined bus clock frequency based on the determined bus clock frequency and the first information stored in the register. , The frequency requested by the CPU is determined as the frequency of the CPU clock supplied to the CPU, and if the frequency of the CPU clock requested by the CPU is lower than the determined bus clock frequency, the determined bus clock Is determined as the frequency of the CPU clock supplied to the CPU.
本発明によれば、複数のCPUが共通のバスに接続されている場合であっても、少ない回路規模で、消費電力を削減することができるようになる。 According to the present invention, even when a plurality of CPUs are connected to a common bus, power consumption can be reduced with a small circuit scale.
以下に、添付図面を参照して本発明を実施するための形態について詳細に説明する。実施例では、本発明の処理装置をカメラに適用した場合を例として記載する。以下に説明する実施の形態は、本発明の実現するための一例であり、本発明が適用される装置の構成や各種条件によって適宜修正又は変更されるべきものであり、本発明は以下の実施の形態に限定されるものではない。図9は、本発明の実施形態によるカメラ900の構成を示す図である。
EMBODIMENT OF THE INVENTION Below, the form for implementing this invention with reference to an accompanying drawing is demonstrated in detail. In the embodiment, a case where the processing apparatus of the present invention is applied to a camera will be described as an example. The embodiment described below is an example for realizing the present invention, and should be appropriately modified or changed according to the configuration of the apparatus to which the present invention is applied and various conditions. The present invention is described below. It is not limited to the form. FIG. 9 is a diagram showing a configuration of a
図9において、撮像部901は信号処理回路903からの指示により被写体を撮影し、動画データや静止画データを出力する。マイク902は、被写体周囲の音声を取得し、音声データを出力する。信号処理回路903は、後述のように複数のCPUを備え、動画や静止画データ、或いは、音声データを処理する。操作部904は、電源スイッチや記録開始、停止の指示スイッチ等の、ユーザが操作可能な各種のスイッチやボタンを備える。また、操作部904は、タッチパネル等により構成されることも可能である。メモリ905は、信号処理回路903の処理のために使用されるメモリであり、動画データや静止画データ、音声データ、或いは、他のデータを記憶する。メモリ903は揮発性メモリであり、例えば、DRAMで構成される。また、メモリ905は、信号処理回路903とは別の集積回路(IC)として構成される。メモリカード906、907はそれぞれフラッシュメモリを内蔵している。メモリカード906、907はそれぞれ、不図示のカードスロット等の装着、排出機構により、カメラ900に対して容易に装着、排出が可能である。また、メモリカード906、907の一方を、無線LAN機能を持つメモリカードとしてもよい。ディスプレイ908は、撮影された動画や静止画、或いは、再生された画像、及び、操作メニューなどの各種の情報を表示する。ディスプレイ908は、液晶パネルや有機ELパネルを備える。スピーカ909は、再生された音声を出力する。
In FIG. 9, an imaging unit 901 captures a subject in response to an instruction from the
次に、信号処理回路903について説明する。図1は、信号処理回路903の構成を示す図である。図1に示す信号処理回路903の各処理ブロックは、一つの集積回路として構成される。
Next, the
図1において、第1のCPU(Central Processing Unit)101と第2のCPU102はそれぞれ、カメラ900の全体の動作を制御する。CPU101とCPU102はそれぞれ、マイクロプロセッサやレジスタなどを備え、不図示の不揮発メモリに記憶されたソフトウエア(ファームウエア)に従って動作する。また、CPU101とCPU102は互いに処理を分担して実行する。例えば、CPU101はカードコントローラ105を制御して、メモリカード906に対する各種のデータの書き込み、読み出しを行う。また、CPU102はカードコントローラ106を制御して、メモリカード907に対する各種のデータの書き込み、読み出しを行う。このようにCPU101とCPU102が互いに異なる処理を分担し、或いは同時に処理を行うことで、カメラ900における処理パフォーマンスを上げている。CPU101とCPU102はそれぞれ、クロック管理部103より供給される動作クロック(以下CPUクロック)に従って動作する。
In FIG. 1, a first CPU (Central Processing Unit) 101 and a
クロック管理部103は、CPU101とCPU102にCPUクロックを供給し、更に、CPUバスのクロック(以下CPUバスクロック)も供給する。クロック管理部103についての詳細は後述する。
The
メモリ104は、第1のCPU101と第2のCPU102の間のデータ通信や、またカードコントローラ106、107に対するデータの書き込み、読み出しのためのバッファメモリとして利用される。
The
カードコントローラ105、106はそれぞれ、メモリカードに対しデータの読み書きを行う。カードコントローラ105、106は、CPU101、102により制御され、CPUバス113を介して入力したデータを各メモリカード906、907に記録する。また、カードコントローラ105、106は、メモリカード906、907から読み出したデータを、CPUバス113を介してメモリ104に記憶する。また、カードコントローラ105、106はそれぞれ、メモリカードに対する書き込み、或いは読み出しコマンドによりデータの書き込みや読み出しが完了すると、完了を通知する割り込み信号を各CPUに出力する。
Each of the
画像信号処理部107は、撮像部901から出力された動画データや静止画データに対しホワイトバランスやガンマ補正等の所定の信号処理を行い、メモリバス115を介してメモリ905に記憶する。音声信号処理部108は、記録時においては、マイク902から入力される音声データに対し、ノイズ除去等の所定の信号処理を行い、メモリバス115を介してメモリ905に記憶する。また、再生時においては、メモリ905に記憶されている音声データを読み出し、スピーカ909から出力する機能を有する。
The image
コーデック109は、記録時においては、画像信号処理部107によりメモリ905に記憶された動画データや静止画像データを読みだして、MPEGやH.264、或いはJPEGなどの所定の符号化方式に従って符号化してメモリ905に記憶する。また、コーデック109は、音声信号処理部108によりメモリ905に記憶された音声データを読み出してAAC等の符号化方式に従って符号化してメモリ905に記憶する。また、コーデック109は、再生時には、再生された動画データや静止画データ、或いは音声データを復号してメモリ905に記憶する。
At the time of recording, the
表示部110は、メモリ905に記憶されている動画や音声データを表示するための処理を行い、ディスプレイ908に出力する。また、表示部110は、メニュー画面等の各種の情報をディスプレイ908に出力する。また、ディスプレイ908がタッチパネルの機能を持つ場合、ユーザによるタッチ操作を検出し、各CPUにユーザ操作を伝達する機能を有する。なお、本実施形態では、第1のCPU101がユーザの操作を受け付け、必要に応じて第2のCPU102を制御するものとする。
The
通信部111、通信部112はそれぞれ、信号処理回路103の外部の構成と通信を行う機能を有する。具体的には、撮像部901におけるレンズ駆動部と通信し、各CPUからの指示でレンズのフォーカス制御やズーム制御を行ったり、オートフォーカスセンサから随時データを通信により読み出し、読み出したデータを、フォーカス状態を判断するために利用したりする。
Each of the
CPUバス113、114は、各CPUが各ブロックを制御するためのコマンドやデータなどを送受信するための伝送路として利用される。また、CPUバス113、114は、カードコントローラ105、106とメモリ104との間のデータ転送、あるいは、メモリバス115を介してのメモリ905へのデータ転送のための伝送路として利用される。CPUバス113、114は、クロック管理部103から供給されるCPUバスクロックに応じて動作し、各回路ブロックの間でデータの転送を行う。本実施形態では、CPUバスを二つに分けることにより、複数の回路ブロックが共通のCPUバスに接続された場合の回路規模の増加を抑えている。
The
メモリバス115は、各ブロックとメモリ905との間でデータやコマンドを送受信するための伝送路である。メモリバス115と、CPU101、CPU102、カードコントローラ105、カードコントローラ106とは、CPUバス113を介して接続されており、これらの回路ブロックからメモリ905へのアクセスが可能である。
The
このように、CPU101、102、メモリ104、カードコントローラ105、106、画像信号処理部107、音声信号処理部108、コーデック109、表示部110の各処理回路が、CPUバス113に接続される。また、通信部111、112がCPUバス114に接続される。
In this way, the processing circuits of the
次に、クロック管理部103について説明する。クロック制御部103は発振器を備え、発振器により生成されたクロックの周波数を分周することにより、異なる周波数のCPUクロックとCPUバスクロックを生成する。また、クロック管理部103は、各CPUより出力された、CPUクロックとCPUバスクロックの周波数に関する情報を記憶するためのレジスタを備えている。
Next, the
図2(a)はこれらのクロック周波数の情報を記憶するレジスタを示している。第1のCPUクロックレジスタ201は、CPU101から要求されたCPUクロックの周波数の情報を記憶するレジスタである。第2のCPUクロックレジスタ202も同様に、CPU102から要求されたCPUクロックの周波数の情報を記憶するレジスタである。第1のCPUバスクロックレジスタ203は、CPU101から要求されたCPUバス113、114のCPUバスクロックの周波数の情報を記憶するレジスタである。第2のCPUバスクロックレジスタ204も同様に、CPU102から要求されたCPUバス113、114のCPUバスクロックの周波数の情報を記憶するレジスタである。
FIG. 2A shows a register for storing information on these clock frequencies. The first
クロック管理部103は、各レジスタに記憶された周波数の情報に基づいて、CPU101、CPU102に対して出力するCPUクロックの周波数を決める。また、クロック管理部103は、各レジスタに記憶された周波数の情報に基づいて、CPUバス113、114に出力するCPUバスクロックの周波数を決める。CPU101から要求されたCPUバスクロックの周波数と、CPU102から要求されたCPUバスクロックの周波数とが異なる可能性があり、その場合にCPUバスクロックをどのように設定するのかを決めておく必要がある。また、一般に、CPUクロックの周波数とCPUバスクロックの周波数とを全く独立に制御することはできず、所定の依存関係を保つ必要がある。本実施形態では、以下のような制限、依存関係に従い、CPUクロックとCPUバスクロックの周波数を決定する。
(1)CPU101から要求されたCPUバスクロックの周波数とCPU102から要求されたCPUバスクロックの周波数とが異なる場合には、高い方の値を使用する。これは、処理パフォーマンス優先するという思想によるものである。
(2)CPUクロックの周波数≧CPUバスクロックの周波数とする。
(3)クロックの周波数は、200メガヘルツ(MHz)、100MHz、50MHzの3種類から選択される。
The
(1) When the frequency of the CPU bus clock requested from the
(2) CPU clock frequency ≧ CPU bus clock frequency.
(3) The clock frequency is selected from three types of 200 megahertz (MHz), 100 MHz, and 50 MHz.
本実施形態では、各CPUが設定したCPUバスクロックの周波数が、ともに低い方の周波数である50Hzの場合、クロック管理部103は、CPUバスクロック周波数を50MHzと決定する。また、少なくとも一方のCPUが設定したCPUバスクロック周波数が、高い方の周波数である100MHzである場合、クロック管理部103は、CPUバスクロック周波数を100MHzと決定する。言い換えると、クロック管理部103は、複数のCPUにより設定されたCPUバスクロックの周波数のうち、最も高い周波数を、CPUバスクロックの周波数として決定する。
In the present embodiment, when the frequency of the CPU bus clock set by each CPU is 50 Hz, which is the lower frequency, the
更に、クロック管理部103は、各CPUが設定したCPUクロック周波数が、このように決定したCPUバスクロック周波数以上である場合は、各CPUに供給するCPUクロック周波数を、要求された周波数に決定する。一方、CPUが設定したCPUクロックの周波数が、決定されたCPUバスクロックの周波数よりも低い場合は、CPUクロックの周波数が、CPUバスクロックの周波数よりも低くならないように、ここではCPUバスクロックの周波数と同じ周波数に設定する。
Furthermore, when the CPU clock frequency set by each CPU is equal to or higher than the CPU bus clock frequency determined in this way, the
各レジスタに記憶された値と、その時に出力されるCPUクロック、CPUバスクロックの周波数を図2(b)の表205に示す。 Table 205 in FIG. 2B shows values stored in the respective registers and the CPU clock and CPU bus clock frequencies output at that time.
例えば、各CPUから要求され、レジスタに記憶された周波数の値が206に示す状態である場合、CPUバスクロックレジスタの設定値のどちらかが200MHzであるため、(1)により、CPUバスクロックの周波数は200MHzとなる。また、(2)(3)により、CPU102とCPU102のいずれのCPUクロックの周波数も200MHzとなる。これは、第2のCPUクロックレジスタ202の設定値が100MHzであっても、クロック管理部103により、CPU102のCPUクロック周波数が200MHzに設定されることを示す。
For example, when the frequency value requested from each CPU and stored in the register is in the state indicated by 206, either of the setting values of the CPU bus clock register is 200 MHz. The frequency is 200 MHz. In addition, due to (2) and (3), the CPU clock frequency of both the
また、207のように、CPU102によりCPUクロック周波数として50Hzが要求されている場合でも、クロック管理部103は、CPUバスクロック周波数として100Hzを設定したため、CPU102には100MHzのCPUクロックが供給される。
Further, even when the
このように、各CPUから要求されたクロック周波数に応じて、各CPUに供給する動作クロックの周波数とバスクロックの周波数とを制御する。また、各クロックの周波数は、前述のような規則に従って決めることができるので、クロック管理部103を比較的単純な回路構成とすることができる。
In this way, the frequency of the operation clock supplied to each CPU and the frequency of the bus clock are controlled in accordance with the clock frequency requested from each CPU. Further, since the frequency of each clock can be determined according to the rules as described above, the
次に各CPUで動作するソフトウェアについて説明する。各CPUでは、リアルタイムOSが動作しており、その上で動作するソフトウェアは、割り込み処理と、複数のタスク処理で構成される(リアルタイムOSの詳細については割愛する)。各CPUにおいては、各回路ブロックからの割り込み要求に応じて処理が開始され、リアルタイム性の求められる処理を行った後に、処理を終了する。割り込み処理内では、タスクを起床させるような処理が行われる場合もあり、そのような処理が行われた場合には、割り込み処理が終了後、起床したタスク処理が開始される。 Next, software that runs on each CPU will be described. Each CPU operates a real-time OS, and software that operates on the CPU includes interrupt processing and a plurality of task processing (details of the real-time OS are omitted). In each CPU, processing is started in response to an interrupt request from each circuit block, and after processing that requires real-time performance is performed, the processing ends. In the interrupt process, a process for waking up a task may be performed. When such a process is performed, the process for waking up is started after the interrupt process is completed.
タスクには優先度が設けられており、起床中のタスクが複数存在した場合には、最も優先度が高いタスクが動作する。動作したタスクは、必要な処理を行い、他のタスクを起床させたりして、処理が完了すると、スリープ状態に移行する。最も優先度の低いタスクはアイドルタスクと呼ばれ、アイドルタスクが動作可能な状態になった場合、つまりCPUが処理するものがなくなった際には、CPUを割り込み待ち状態に移行させる。この時CPU内部では、割り込み要求を受け付けるための回路のみが機能している状態となり、その他の内部ブロックに対しては、クロックの供給が遮断される。そのため、CPUの消費電力が抑えられる。 Tasks have priorities, and when there are multiple wake-up tasks, the task with the highest priority operates. The operated task performs necessary processing, wakes up another task, and transitions to a sleep state when the processing is completed. The task with the lowest priority is called an idle task, and when the idle task becomes operable, that is, when there is nothing to be processed by the CPU, the CPU is shifted to an interrupt waiting state. At this time, only the circuit for accepting the interrupt request is functioning in the CPU, and the supply of the clock is cut off to the other internal blocks. Therefore, power consumption of the CPU can be suppressed.
さらに各CPUは、CPUバスに接続された他の処理回路からの割り込み待ち状態への移行に応じて、CPUクロックやCPUバスクロックの周波数を設定し、設定した周波数を示す情報をクロック管理部103に出力する。また、各CPUは、割り込み待ち状態からタスク実行状態への移行に応じて、要求するCPUクロックやCPUバスクロックの周波数を設定し、設定した周波数を示す情報をクロック管理部103に出力する。クロック管理部103は、各CPUから出力されたCPUクロックやCPUバスクロックの周波数の値を、図2(a)のレジスタに記憶する。つまり、割り込み処理開始時と、アイドルタスク動作時に、クロック管理部103により、CPUクロックとCPUバスクロックの周波数が設定される。これらの処理について図3に示す。
Further, each CPU sets the frequency of the CPU clock and the CPU bus clock in accordance with the transition to the interrupt waiting state from another processing circuit connected to the CPU bus, and information indicating the set frequency is set in the
各CPUは、CPUクロックの周波数として複数の所定の周波数の何れかを設定する。そして、各CPUは、設定したCPUクロックの周波数に関する情報(第1の情報)と、CPUバスクロックの周波数に関する情報(第2の情報)を、クロック管理部103に出力する。即ち、各CPUは、CPUCLK_MAX、CPUCLK_MIN、のいずれかの周波数にCPUクロックを設定する。ここで、CPUCLK_MAXはCPUが高速に処理を実行するためのCPUクロック周波数で、CPUCLK_MINは低消費電力状態におけるCPUクロック周波数である。CPUCLK_MAXの周波数よりも、CPUCLK_MINの方が低い。
Each CPU sets one of a plurality of predetermined frequencies as the CPU clock frequency. Each CPU then outputs information about the set CPU clock frequency (first information) and information about the CPU bus clock frequency (second information) to the
また、各CPUは、CPUバスクロックの周波数として、複数の所定の周波数の何れかを要求する。即ち、各CPUは、CPUBCLK_MAX、CPUBCLK_MIN、CPUBCLK_DMAのいずれかの周波数にCPUバスクロックを設定する。ここで、CPUBCLK_MAXはCPUバス動作時におけるCPUバスクロック周波数である。また、CPUBCLK_MINはCPUバスが動作していない状態におけるCPUバスクロックの周波数である。また、CPUBCLK_DMAはカードコントローラ105、106がデータ転送を十分高速に行うために必要なCPUバスクロックの周波数である。CPUBCLK_MAXの周波数よりも、CPUBCLK_MINの方が低い。
Each CPU requests one of a plurality of predetermined frequencies as the frequency of the CPU bus clock. That is, each CPU sets the CPU bus clock to any frequency of CPUBCLK_MAX, CPUBCLK_MIN, and CPUBCLK_DMA. Here, CPUBCLK_MAX is the CPU bus clock frequency during the CPU bus operation. CPUBCLK_MIN is the frequency of the CPU bus clock when the CPU bus is not operating. CPUBCLK_DMA is a frequency of the CPU bus clock necessary for the
図3(a)は、各CPUにより実行されるアイドルタスクの処理を示すフローチャートである。他のタスクの処理が全て無くなり、アイドルタスクの処理に移行した場合、CPUは、CPUクロックの周波数を、あらかじめ決定していたCPUCLK_MINに設定する(S301)。 FIG. 3A is a flowchart showing idle task processing executed by each CPU. When all the other task processes are eliminated and the process shifts to the idle task process, the CPU sets the CPU clock frequency to the predetermined CPUCLK_MIN (S301).
次に、CPUは、CPUバス113、114が使用中か否かを判別する(S302)。この判別処理について図4を用いて説明する。この判別処理のため、CPUバス使用中フラグを使用する。CPU以外のブロックがCPUバスのバスマスターとして動作する場合に、CPUバス使用中フラグとして所定値が設定される。CPU101、102はそれぞれ、内部のレジスタに、CPUバス使用中フラグの設定値を保持する。CPU101、102は、カードコントローラ105、106がメモリ104やメモリ905にデータ転送(DMA:Direct MemoryAccess)を行う場合に、CPUバス使用中フラグに所定値を設定する。
Next, the CPU determines whether or not the
図4(a)は、CPU101、102によるカードコントローラ105、106の制御処理の一部であるところのDMA開始処理のフローチャートである。処理が開始されると、CPUは、カードコントローラ105、106に対し、データ転送サイズ、アドレス等のDMA設定コマンドを送信し、更に、データ転送の開始を指示する(S401)。次に、CPUは、CPUバス使用中フラグの設定値に1を加える(立てる)(S402)。本実施形態では、カードコントローラ105と106があるため、二つのカードコントローラ105、106が共にDMA転送を行う状態と、一方だけがDMA転送を行っている状態が考えられる。そのため、カードコントローラに対するDMA転送を指示した場合に、CPUバス使用中フラグに1を加えることで、二つのカードコントローラが共にDMA転送を行っている状態を判別できるようにしている。CPUバス使用中フラグは、CPUバス113、114を用いてデータの転送を行っている処理回路の数を示す情報であるともいえる。次に、CPUは、DMA転送完了の割り込み待ち状態に移行し、処理タスクはスリープ状態となる(S403)。
FIG. 4A is a flowchart of the DMA start process which is a part of the control process of the
図4(b)は、カードコントローラ105、106からDMA転送完了の割り込み通知を受けた場合のCPU101、102の処理を示すフローチャートである。この処理は、後述する図3(b)のS303の処理の具体例の1つである。
FIG. 4B is a flowchart showing processing of the
割り込み処理が開始されると、CPUはCPUバス使用中フラグの設定値から1を引く(S404)。次に、CPUは、スリープ状態にあるタスクに起床(ウエイクアップ)指示を出し、割り込み処理を終了する(S405)。 When the interrupt process is started, the CPU subtracts 1 from the set value of the CPU bus busy flag (S404). Next, the CPU issues a wake-up instruction to the task in the sleep state, and ends the interrupt process (S405).
図4(c)は、S302のCPUバスが使用中であるか否かの判別処理を示すフローチャートである。まず、CPUは、CPUバス使用中フラグに設定されている値をチェックし(S406)、1以上の値が設定されているか否かを判別する(S407)。CPUバス使用中フラグに1以上の値が設定されていた場合、二つのカードコントローラ105、106の少なくとも一方がCPUバス113、114を使用してデータ転送中である。そのため、CPUは、この場合、CPUバスの使用中であると判定する(S408)。また、CPUバス使用中フラグが0に設定されていた場合、CPUは、CPUバス113、114が使用されていないと判定する(S409)。
FIG. 4C is a flowchart showing a determination process for determining whether or not the CPU bus in S302 is in use. First, the CPU checks the value set in the CPU bus busy flag (S406), and determines whether or not a value of 1 or more is set (S407). When the CPU bus busy flag is set to 1 or more, at least one of the two
ここで図3(a)のフローチャートに戻る。S302で、CPUバス113、114の使用中ではないと判定された場合には、CPUは、CPUバスクロックの周波数をあらかじめ決定していたCPUBCLK_MINに設定する。また、CPUバスの使用中と判定された場合、CPUは、CPUバスクロックの周波数をあらかじめ決定していたCPUBCLK_DMAに設定する(S305)。
Here, it returns to the flowchart of Fig.3 (a). If it is determined in S302 that the
次に、CPUは、割り込み待ち状態に移行し、低消費電力状態とする(S304)。CPUは割り込み要求を受けるまで、この低消費電力状態を保つことになる。またCPUバスクロックの周波数は、CPUBCLK_MINまたはCPUBCLK_DMAという周波数に設定される。 Next, the CPU shifts to an interrupt waiting state and enters a low power consumption state (S304). The CPU maintains this low power consumption state until receiving an interrupt request. The frequency of the CPU bus clock is set to a frequency of CPUBCLK_MIN or CPUBCLK_DMA.
図3(b)は各CPUにおける割り込み処理のフローチャートである。割り込み待ち状態、或いは通常の動作状態において、各処理ブロックから割り込み要求を受けた場合、CPUは、CPUクロックの周波数をあらかじめ決定していたCPUCLK_MAXに設定する(S306)。次に、CPUは、CPUバスクロックの周波数をあらかじめ決定していたCPUBCLK_MAXに設定する(S307)。これらの処理により、CPUは低消費電力状態から高速処理状態に移行する。次に、CPUは、受け取った割り込み要因に応じた割り込み処理を行った後、割り込み処理を終了する(S308)。S308の処理において、タスクを起床させるような処理があった場合には、この後、起床したタスクの処理が実行される。S308の処理の具体例として、図4(b)の処理があげられる。 FIG. 3B is a flowchart of interrupt processing in each CPU. When receiving an interrupt request from each processing block in an interrupt wait state or a normal operation state, the CPU sets the CPU clock frequency to CPUCLK_MAX determined in advance (S306). Next, the CPU sets the CPU bus clock frequency to the previously determined CPUBCLK_MAX (S307). With these processes, the CPU shifts from the low power consumption state to the high speed processing state. Next, the CPU ends the interrupt process after performing the interrupt process according to the received interrupt factor (S308). In the process of S308, if there is a process that wakes up the task, then the process of the wake up task is executed. A specific example of the process of S308 is the process of FIG.
図5は、CPU101またはCPU102における各ソフトウェアの処理と、CPUバス使用中フラグ、クロック管理部103のレジスタに設定された周波数の例を示すタイムチャートである。なお、図5では、CPUCLK_MAX=CPUBCLK_MAX=200MHz、CPUCLK_MIN=CPUBCLK_MIN=50MHz、CPUBCLK_DMA=100MHzとしている。
FIG. 5 is a time chart showing an example of the processing of each software in the
図5において、スタート時には、タスク1の処理が実行されており(符号501)、CPUクロックレジスタ、CPUバスククロックレジスタともに200MHzが設定されている。その後割り込み処理2や(符号502)、それによって起こされたタスク2の処理に切り替わるが(符号503)、レジスタ設定は変わらない。その後、処理はタスク1に戻り(符号504)、この処理の中でカードコントローラのDMA開始処理が実行されたとすると、CPUバス使用中フラグに1が加えられ(符号505)、タスク1はスリープする。タスク1のスリープにより実行すべき処理が無くなったため、アイドルタスクが動作する(符号506)。
In FIG. 5, at the start, the processing of
アイドルタスクによりCPUクロックレジスタにはCPUCLK_MIN=50MHzに設定される。また、CPUバス使用中フラグが1であるため、CPUBCLK_DMA=100MHzに設定されて、割り込み待ちとなる。 The CPU clock register is set to CPUCLK_MIN = 50 MHz by the idle task. Further, since the CPU bus busy flag is 1, CPUBCLK_DMA = 100 MHz is set and an interrupt is waited for.
DMA完了割り込みにより割り込み処理1が実行され(符号507)、CPUクロック、CPUバスクロックの周波数がCPUCLK_MAX=CPUBCLK_MAX=200MHzに設定され、また、CPUバス使用中フラグから1が引かれて0となる。割り込み処理1が終了すると、割り込み処理1によって起床されたタスク1が動作し(符号508)、タスク1がスリープすると再びアイドルタスクが動作する(符号509)。この時CPUバス使用中フラグは0であるため、CPUクロック、CPUバスクロックの周波数は、共に50MHzに設定される。
Interrupt processing 1 is executed by the DMA completion interrupt (reference numeral 507), the frequency of the CPU clock and CPU bus clock is set to CPUCLK_MAX = CPUBCLK_MAX = 200 MHz, and 1 is subtracted from the CPU bus busy flag to 0. When the interrupt
図6は、CPU101とCPU102におけるCPUバス使用中フラグ、及び、各CPUから要求されたCPUクロックとCPUバスクロックの周波数の例を示すタイムチャートである。CPU101では、図5と同様に、CPUCLK_MAX=CPUBCLK_MAX=200MHz、CPUCLK_MIN=CPUBCLK_MIN=50MHz、CPUBCLK_DMA=100MHzとする。CPU102では、CPUCLK_MAX=CPUBCLK_MAX=CPUBCLK_DMA=100MHz、CPUCLK_MIN=CPUBCLK_MIN=50MHzとする。各CPUが設定するクロック周波数は、これ以外の周波数とすることも可能である。
FIG. 6 is a time chart showing an example of the CPU bus busy flag in the
符号601、602はそれぞれ、CPU101、CPU102におけるCPUバス使用中フラグ、CPUクロック周波数、CPUバスクロック周波数の設定状態を示している。このように設定された場合、クロック管理部103により、符号603のように各CPUへのCPUクロック周波数と、CPUバスクロックの周波数が設定される。
以上説明したとおり、本実施形態では、簡単な回路構成により、各CPUの動作状態と、CPUバスの使用状態に応じた周波数のクロックを供給することが可能となる。そのため、複数のCPU共通のバスに接続される構成において、回路規模を大きくすることなく、消費電力を抑えることが可能となる。 As described above, in this embodiment, it is possible to supply a clock having a frequency corresponding to the operation state of each CPU and the use state of the CPU bus with a simple circuit configuration. Therefore, in a configuration connected to a bus common to a plurality of CPUs, power consumption can be suppressed without increasing the circuit scale.
なお、本実施形態では、主にカードコントローラによるDMA転送完了の割り込み通知によりCPUバスが使用中であるか否かを判別する場合について説明した。これ以外にも、CPUバスに接続されているその他の回路ブロックについても、同様にCPUバス使用中フラグを設定することにより、他の回路ブロックによるCPUバスの使用中か否かを判別することが可能となる。 In the present embodiment, a case has been described in which it is determined whether or not the CPU bus is in use mainly based on a DMA transfer completion interrupt notification from the card controller. In addition to this, for other circuit blocks connected to the CPU bus, it is possible to determine whether or not the CPU bus is being used by another circuit block by setting the CPU bus busy flag in the same manner. It becomes possible.
また、本実施形態では、一つのCPUバスに二つのCPUが接続されている構成としたが、三つ以上のCPUが共通のCPUバスに接続されている構成であっても、同様にCPUクロックとCPUバスクロックを制御することが可能である。 In the present embodiment, two CPUs are connected to one CPU bus. However, even in a configuration in which three or more CPUs are connected to a common CPU bus, the CPU clock is similarly applied. And the CPU bus clock can be controlled.
また、本実施形態では、動画データや静止画データなどをメモリカードに記録する構成であったが、メモリカード以外の、ランダムアクセスの記録媒体を用いることも可能である。この場合、カードコントローラではなく、記録媒体に対して各種の情報を記録し、再生する記録再生部が設けられる。 In the present embodiment, moving image data, still image data, and the like are recorded on the memory card. However, a random access recording medium other than the memory card can be used. In this case, not a card controller but a recording / reproducing unit that records and reproduces various information on a recording medium is provided.
次に、第2の実施形態を説明する。図7は、第2の実施形態における信号処理回路903の構成を示すブロック図である。図1と同様の構成については、同一の番号を付加し、詳細な説明は省略する。
Next, a second embodiment will be described. FIG. 7 is a block diagram showing the configuration of the
図7では、CPUバス114に第3のCPU701が接続される。CPU701は、通信部111、通信部112の制御を行う。また、CPU701は、メモリ702を使用して、CPU101、102と通信しながら、カメラ900全体の制御を行う。
In FIG. 7, the
CPU701は、CPU101、102とは異なる方法で、CPUクロックの周波数やCPUバスクロックの周波数をクロック管理部103に対して設定する。CPU701は、クロック管理部103に対し、スリープ信号701sを出力する。スリープ信号701sは、CPU701が割り込み待ちの状態(スリープ状態)に移行した場合にアサートされる信号である。
The
クロック管理部103は、CPU701からスリープ信号701sを受けた場合、CPU701に供給する動作クロックの周波数を下げても良いと判断する。つまり、第1の実施形態における、CPUCLK_MIN、CPUBCLK_MINの設定が行われた場合と同様の扱いとなる。また逆に、スリープ状態において割り込みを受け付け、割り込み処理が開始されると、CPU701は、スリープ信号701sをデアサートする。クロック管理部103は、スリープ信号701sがデアサートされた場合、CPU701に供給する動作クロックの周波数を上げる必要があると判断する。つまり、第1の実施形態における、CPUCLK_MAX、CPUBCLK_MAXの設定が行われた場合と同様の扱いとなる。
When receiving the sleep signal 701 s from the
クロック管理部103は、スリープ信号701sがアサート状態の場合と、デアサート状態の場合において、それぞれ、決められた周波数のクロックをCPU701のCPUクロック周波数として設定する。
The
そして、クロック管理部103は、CPU101、CPU102により要求されたCPUクロック及びCPUバスクロックの周波数と、CPU701からのスリープ信号701sにより、各CPUへのCPUクロック周波数と、CPUバスクロックを設定する。
Then, the
本実施形態では、クロック管理部103は、第3のCPU701からのスリープ信号701sのアサート状態とデアサート状態に応じたクロック周波数が設定されるレジスタを備えている。即ち、クロック管理部103は、スリープ信号701sがアサート状態とデアサート状態のときに、それぞれCPU701のCPUクロック周波数として要求される値を第3のCPUアクティブ/スリープクロックレジスタに設定する。また、クロック管理部103は、スリープ信号701sがアサート状態とデアサート状態のときに、それぞれCPU701のCPUバスクロック周波数として要求される値を第3のCPUバスアクティブ/スリープクロックレジスタに設定する。
In the present embodiment, the
例えば、スリープ信号701sがアサート状態、即ちCPU701がスリープ状態であることを示す場合、第3のCPUアクティブ/スリープクロックレジスタと、第3のCPUバスアクティブ/スリープクロックレジスタにはそれぞれ50MHzが設定される。スリープ信号701sがデアサート状態、即ちCPU701がアクティブ状態である場合、第3のCPUアクティブ/スリープクロックレジスタには200MHzが設定され、第3のCPUバスアクティブ/スリープクロックレジスタには100MHzが設定される。
For example, when the sleep signal 701s indicates the asserted state, that is, the
クロック管理部103は、CPU701がアクティブ状態、スリープ状態である場合に設定すべきクロック周波数を予め記憶している。そのため、CPU701は、クロック管理部103に対してクロック周波数の値を出力せずに、スリープ信号701sの状態を変えることにより、要求するクロック周波数を設定することができる。
The
本実施形において、各レジスタに記憶された値と、その時に出力されるCPUクロック、CPUバスクロックの周波数を図8に示す。このように、各クロックの周波数を決めることができるため、クロック管理部103を比較的単純な回路構成とすることができる。
In this embodiment, the values stored in each register and the CPU clock and CPU bus clock frequencies output at that time are shown in FIG. Thus, since the frequency of each clock can be determined, the
なお、第2の実施形態では、第3のCPU701をCPUバス114に接続する構成としたが、CPUバス113に第3のCPU701を接続する構成としてもよい。
In the second embodiment, the
なお、第1、第2の実施形態では、本発明をカメラに適用した場合について説明したが、これ以外にも、複数のCPUを備える他の装置に対しても同様に本発明を適用可能である。 In the first and second embodiments, the case where the present invention is applied to a camera has been described. However, the present invention can be similarly applied to other devices including a plurality of CPUs. is there.
Claims (3)
それぞれ前記バスに接続され、CPUクロックに応じて動作すると共に、それぞれが要求する、前記CPUクロックの周波数に関する第1の情報と前記バスクロックの周波数に関する第2の情報とを出力する複数のCPUと、
前記複数のCPUそれぞれから出力された前記第1の情報と前記第2の情報とを記憶するレジスタを有し、前記複数のCPUから出力され、前記レジスタに記憶された前記第1の情報と前記第2の情報とに基づいて、前記複数のCPUに供給する前記CPUクロックそれぞれの周波数と、前記バスクロックの周波数とを決定し、前記複数のCPUにそれぞれ前記CPUクロックを供給すると共に、前記バスに前記バスクロックを供給するクロック管理手段とを備え、
前記クロック管理手段は、前記レジスタに記憶された前記第2の情報に基づいて、前記複数のCPUがそれぞれ要求したバスクロックの周波数のうち最も高い周波数を前記バスクロックの周波数として決定し、前記決定したバスクロックの周波数と前記レジスタに記憶された前記第1の情報とに基づいて、前記CPUが要求したCPUクロックの周波数が前記決定したバスクロックの周波数以上である場合は、前記CPUが要求した周波数を当該CPUに供給する前記CPUクロックの周波数として決定し、前記CPUが要求したCPUクロックの周波数が前記決定したバスクロックの周波数よりも低い場合は、前記決定したバスクロックの周波数を当該CPUに供給する前記CPUクロックの周波数として決定することを特徴とする処理装置。 A bus that transfers data according to the bus clock; and
Are connected to the bus, as well as operate in accordance with the CPU clock, each requires a plurality of CPU outputs and a second information about the frequency of the first information about the frequency of the CPU clock the bus clock ,
A register for storing the first information and the second information output from each of the plurality of CPUs; and the first information output from the plurality of CPUs and stored in the registers; based on the second information, and the CPU clock respective frequency supplied to the plurality of CPU, together with the to determine the frequency of the bus clock, to supply each of the plurality of CPU said CPU clock, said bus a clock management means for supplying the bus clock,
The clock management means determines, as the bus clock frequency, the highest frequency among the bus clock frequencies requested by the plurality of CPUs based on the second information stored in the register, If the CPU clock frequency requested by the CPU is equal to or higher than the determined bus clock frequency based on the bus clock frequency and the first information stored in the register, the CPU requested If the frequency of the CPU clock requested by the CPU is lower than the determined frequency of the bus clock, the determined frequency of the bus clock is sent to the CPU. process instrumentation, characterized by determining the frequency of the supply the CPU clock .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012281173A JP6128833B2 (en) | 2012-12-25 | 2012-12-25 | Processing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012281173A JP6128833B2 (en) | 2012-12-25 | 2012-12-25 | Processing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014126915A JP2014126915A (en) | 2014-07-07 |
JP6128833B2 true JP6128833B2 (en) | 2017-05-17 |
Family
ID=51406385
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012281173A Expired - Fee Related JP6128833B2 (en) | 2012-12-25 | 2012-12-25 | Processing equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6128833B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105094968B (en) * | 2015-07-01 | 2019-05-21 | 小米科技有限责任公司 | Wake up the method and device of MCU |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5784599A (en) * | 1995-12-15 | 1998-07-21 | Compaq Computer Corporation | Method and apparatus for establishing host bus clock frequency and processor core clock ratios in a multi-processor computer system |
US6298448B1 (en) * | 1998-12-21 | 2001-10-02 | Siemens Information And Communication Networks, Inc. | Apparatus and method for automatic CPU speed control based on application-specific criteria |
JP2003091328A (en) * | 2001-09-19 | 2003-03-28 | Alps Electric Co Ltd | Computer |
US7966511B2 (en) * | 2004-07-27 | 2011-06-21 | Intel Corporation | Power management coordination in multi-core processors |
JP4837456B2 (en) * | 2006-06-28 | 2011-12-14 | パナソニック株式会社 | Information processing device |
JP5561374B2 (en) * | 2010-11-15 | 2014-07-30 | 富士通株式会社 | Information processing system |
-
2012
- 2012-12-25 JP JP2012281173A patent/JP6128833B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014126915A (en) | 2014-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4996519B2 (en) | Virtual multiprocessor, system LSI, mobile phone device, and virtual multiprocessor control method | |
US9678809B2 (en) | System and method for providing dynamic clock and voltage scaling (DCVS) aware interprocessor communication | |
US8726056B2 (en) | Clock control device, clock control method, clock control program and integrated circuit | |
JP2008530631A (en) | Power supply control circuit and electronic circuit | |
WO2016032860A1 (en) | System and method for providing dynamic quality of service levels based on coprocessor operation | |
JP6151465B1 (en) | Latency-based power mode unit for controlling the power mode of a processor core, and related methods and systems | |
CN110083398B (en) | Method and electronic device for controlling driving condition based on operation state | |
US7277976B2 (en) | Multilayer system and clock control method | |
JP6128833B2 (en) | Processing equipment | |
JP4773693B2 (en) | Memory control system | |
JP2001034530A (en) | Microcomputer and memory access control method | |
JP5783348B2 (en) | Control device, control program, and image forming apparatus | |
JP4361842B2 (en) | Mobile device | |
US20060282601A1 (en) | Information processing apparatus and power-saving controlling method | |
JP2007180600A (en) | Electronic equipment and method of controlling data transfer rate of electronic equipment | |
JP2017041007A (en) | Information processing device, power control method, program, and information processing system | |
JP2011013836A (en) | Memory arrangement management device and microprocessor | |
US20050198429A1 (en) | Multilayer system and clock control method | |
TWI772438B (en) | System and method for dynamic buffer sizing in a computing device | |
JP5017784B2 (en) | Processor and interrupt processing control method applied to the processor | |
JP5231496B2 (en) | Information processing apparatus and suspend / resume method thereof | |
JP2005010638A (en) | Display control apparatus and display control method | |
JP2011186731A (en) | Electronic circuit, control method thereof and image forming apparatus | |
JP2001117679A (en) | Information processor and method for controlling the same and storage medium | |
JP2009080747A (en) | Multiprocessor device and information processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20161031 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161115 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170113 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170314 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170411 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6128833 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |