JP2008112274A - Controller and program - Google Patents
Controller and program Download PDFInfo
- Publication number
- JP2008112274A JP2008112274A JP2006294043A JP2006294043A JP2008112274A JP 2008112274 A JP2008112274 A JP 2008112274A JP 2006294043 A JP2006294043 A JP 2006294043A JP 2006294043 A JP2006294043 A JP 2006294043A JP 2008112274 A JP2008112274 A JP 2008112274A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- executed
- arithmetic processing
- predetermined
- target
- 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.)
- Pending
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
Description
本発明は、制御装置およびプログラムに関する。 The present invention relates to a control device and a program.
例えば、複雑な画像処理を実行する画像処理装置などにおいては、装置全体の動作を制御する演算処理装置(CPU等)に加えて、特定の画像処理に特化した演算処理装置(DSP等)を設ける構成を採用し、全体的な処理の効率化を図ることがある。以下では、この構成における前者の演算処理装置を「ホスト」といい、後者の演算処理装置を「ターゲット」という。 For example, in an image processing apparatus that performs complex image processing, an arithmetic processing apparatus (DSP or the like) specialized for specific image processing is added to an arithmetic processing apparatus (CPU or the like) that controls the operation of the entire apparatus. In some cases, a configuration to be provided is employed to improve overall processing efficiency. Hereinafter, the former arithmetic processing unit in this configuration is referred to as “host”, and the latter arithmetic processing unit is referred to as “target”.
ホストとターゲットとを用いて処理を行う場合に、ホストがターゲットの状態を知るための方法としては、割込とポーリングとがある(例えば、特許文献1および2参照)。ホストは、割込ハンドラを起動することによって割込への対応を行うが、割込ハンドラの起動に伴って多少のオーバーヘッド(時間的負荷)を生じる。それゆえ、ターゲットに要求する処理が何度も発生するような場合には、割込よりもポーリングを用いたほうが望ましいといえる。 When a process is performed using a host and a target, there are interrupt and polling as a method for the host to know the state of the target (see, for example, Patent Documents 1 and 2). The host responds to the interrupt by activating the interrupt handler, but some overhead (temporal load) is generated with the activation of the interrupt handler. Therefore, it can be said that it is preferable to use polling rather than interrupt when processing required for the target occurs many times.
ポーリングを行うときには、あらかじめターゲットが処理を行うために要する時間をホスト側で予測し、予測した時間に基づいてターゲットに問い合わせることがある。このようにすれば、ホストにおいて時間を無駄にすることなくポーリングに対応することができる。
しかし、ターゲットにおける処理は必ずしも予測通り行われるとは限らず、ノイズ等の予期せぬ遅延要因によって予測よりも多くの時間を要してしまうことがある。このような場合に、予測した時間に基づいてターゲットに問い合わせたのでは、所期する情報が1回のポーリングによっては得られず、ポーリングを繰り返し行わなければならないなどの不都合を生じる。そうすると、ホストおよびターゲットの双方において処理の遅延や無駄な処理の発生が生じ、処理効率が低下する。 However, processing at the target is not always performed as predicted, and may take more time than predicted due to unexpected delay factors such as noise. In such a case, if the target is inquired based on the predicted time, the expected information cannot be obtained by one polling, and the inconvenience arises that the polling must be repeated. Then, processing delay and wasteful processing occur in both the host and the target, and processing efficiency decreases.
本発明はかかる事情に鑑みてなされたものであり、その目的は、ターゲットにおける処理が予測通りに行われないことがあっても、処理の遅延や無駄な処理の発生を抑制することを可能にする技術を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to suppress delays in processing and occurrence of useless processing even when processing at a target is not performed as expected. It is to provide technology to do.
上述の目的を達成するために、本発明は、所定の処理を実行可能な演算処理装置であって、当該処理を終了すると割込信号を送信する演算処理装置と接続する接続手段と、自装置または前記演算処理装置において実行される処理の内容を特定する処理種別情報を取得する取得手段と、前記取得手段により取得された処理種別情報によって特定される処理が、前記演算処理装置において実行される前記所定の処理である場合に、前記接続手段を介して前記演算処理装置に当該処理の実行を要求する処理要求手段と、前記演算処理装置が前記処理要求手段により要求された前記所定の処理を開始してから終了するまでに要する所要時間を算出する算出手段と、前記接続手段を介して前記演算処理装置から受信した割込信号または前記取得手段により取得された処理種別情報に基づいて、自装置において実行すべき処理を実行する処理実行手段とを備え、前記処理実行手段は、前記処理要求手段により前記演算処理装置に前記所定の処理の実行が要求され、かつ、自装置において処理を実行中である場合に、前記処理要求手段が当該所定の処理の実行を要求してから前記算出手段により算出された所要時間が経過するまでの間に前記実行中の処理を中断し、その後、前記接続手段を介して割込信号を受信すると、前記演算処理装置が実行した前記所定の処理に応じた処理を実行する制御装置を提供する。 In order to achieve the above-described object, the present invention is an arithmetic processing device capable of executing a predetermined process, and a connection means for connecting to an arithmetic processing device that transmits an interrupt signal when the processing is completed, Alternatively, an acquisition unit that acquires process type information that specifies the content of a process executed in the arithmetic processing device, and a process that is specified by the process type information acquired by the acquisition unit is executed in the arithmetic processing device. In the case of the predetermined process, a processing request unit that requests the arithmetic processing unit to execute the process via the connection unit, and the predetermined process requested by the processing request unit by the processing unit. A calculation unit that calculates a time required from the start to the end, and an interrupt signal received from the arithmetic processing unit via the connection unit or the acquisition unit. Processing execution means for executing a process to be executed in the own apparatus based on the acquired process type information, and the process execution means causes the processing request means to execute the predetermined process on the arithmetic processing unit. When the process is requested and the process is being executed in the own apparatus, the process request unit requests the execution of the predetermined process until the required time calculated by the calculation unit elapses. When a process being executed is interrupted and then an interrupt signal is received via the connection means, a control device is provided that executes a process corresponding to the predetermined process executed by the arithmetic processing unit.
また、本発明は、前記演算処理装置が、複数の前記所定の処理を実行可能であって、各々の前記所定の処理を構成する複数の演算処理を実行する複数の内部プロセサと、前記複数の内部プロセサの状態を示す情報を各々の内部プロセサに対応する記憶領域に記憶するステータスレジスタとを備える場合において、前記処理実行手段は、前記接続手段を介して割込信号を受信すると、当該割込信号の契機となった前記所定の処理を前記算出手段により当該処理について算出された所要時間に基づいて特定する構成であってもよい。 According to the present invention, the arithmetic processing device is capable of executing a plurality of the predetermined processes, and includes a plurality of internal processors that execute a plurality of arithmetic processes constituting each of the predetermined processes, And a status register that stores information indicating the state of the internal processor in a storage area corresponding to each internal processor, the processing execution means receives the interrupt signal via the connection means, and The configuration may be such that the predetermined process triggered by the signal is specified based on the required time calculated for the process by the calculation unit.
また、かかる構成において、前記処理実行手段は、前記ステータスレジスタの記憶領域のうち、前記特定された所定の処理を実行する際に用いられた前記内部プロセサの状態を示す情報が記憶された記憶領域を特定して参照してもよい。
あるいは、前記処理実行手段は、前記所定の処理である第1の処理と第2の処理とを示す処理種別情報が前記取得手段により取得され、かつ、前記第1の処理を前記割込信号の契機となった処理として特定した場合、当該特定後であって前記演算処理装置が前記第2の処理を実行中である期間に、前記ステータスレジスタの記憶領域のうち前記第1の処理を実行する際に用いられた前記内部プロセサの状態を示す情報が記憶された記憶領域を参照してもよい。
Further, in this configuration, the process execution means stores a storage area in which information indicating the state of the internal processor used when executing the specified predetermined process is stored in the storage area of the status register May be identified and referenced.
Alternatively, the process execution means acquires the process type information indicating the first process and the second process as the predetermined process by the acquisition means, and performs the first process on the interrupt signal. When specified as a trigger process, the first process is executed in the storage area of the status register during the period after the specification and the arithmetic processing unit is executing the second process. You may refer to the storage area in which information indicating the state of the internal processor used at the time is stored.
また、本発明は、上述した制御装置の機能を実現するためのプログラムとしても特定され得る。例えば、本発明は、所定の処理を実行可能な演算処理装置であって、当該処理を終了すると割込信号を送信する演算処理装置と接続するコンピュータに、実行される処理の内容を特定する処理種別情報を取得する取得機能と、前記取得機能により取得された処理種別情報によって特定される処理が前記所定の処理である場合に、前記演算処理装置と接続する接続手段を介して、当該演算処理装置に当該処理の実行を要求する処理要求機能と、前記演算処理装置が前記処理要求機能により要求された前記所定の処理を開始してから終了するまでに要する所要時間を算出する算出機能と、前記接続手段を介して前記演算処理装置から受信した割込信号または前記取得機能により取得された処理種別情報に基づいて、自装置において実行すべき処理を実行する処理実行機能であって、前記処理要求機能により前記演算処理装置に前記所定の処理の実行が要求され、かつ、自装置において処理を実行中である場合に、前記処理要求機能が当該所定の処理の実行を要求してから前記算出機能により算出された所要時間が経過するまでの間に前記実行中の処理を中断し、その後、前記接続手段を介して割込信号を受信すると、前記演算処理装置が実行した前記所定の処理に応じた処理を実行する処理実行機能とを実現させるためのプログラムとしても特定され得る。 The present invention can also be specified as a program for realizing the functions of the control device described above. For example, the present invention is an arithmetic processing unit capable of executing a predetermined process, and a process for specifying the content of the process to be executed in a computer connected to the arithmetic processing unit that transmits an interrupt signal when the process ends. If the acquisition function for acquiring type information and the process specified by the process type information acquired by the acquisition function are the predetermined process, the calculation process is performed via a connection unit connected to the calculation processing device. A processing request function for requesting the apparatus to execute the processing; a calculation function for calculating a time required for the arithmetic processing apparatus to start from the predetermined processing requested by the processing request function; and Processing to be executed in its own device based on the interrupt signal received from the arithmetic processing device via the connection means or the processing type information acquired by the acquisition function A process execution function to be executed, when the processing request function requests the arithmetic processing device to execute the predetermined process, and the process request function When the execution of the process is requested until the required time calculated by the calculation function elapses, the process being executed is interrupted, and then an interrupt signal is received via the connection means. It can also be specified as a program for realizing a process execution function for executing a process according to the predetermined process executed by the arithmetic processing unit.
以上のような本発明により、ターゲットにおける処理が予測通りに行われないことがあっても、処理の遅延や無駄な処理の発生を抑制することが可能となる。 According to the present invention as described above, it is possible to suppress processing delays and useless processing even when processing at the target is not performed as expected.
以下、本発明の実施の形態について、図面を参照しながら説明する。
[構成]
図1は、本発明の一実施形態である画像処理装置100の構成を示すブロック図である。この画像処理装置100は、例えば、プリンタや複写機等の画像形成装置の一部を構成するものである。なお、画像形成装置は、ユーザが指示を入力するための入力装置や、ネットワークを介してコンピュータ装置と接続するための通信インタフェース等を備えている。画像処理装置100の構成は、同図に示すように、装置全体の動作を制御するホスト10と、特定の画像処理を実行するターゲット20とに大別される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[Constitution]
FIG. 1 is a block diagram illustrating a configuration of an
ホスト10は、コントローラ11と、メモリ12と、ターゲットIF(InterFace)13と、入出力IF14とを備える。コントローラ11は、CPU(Central Processing Unit)等の演算処理装置、ROM(Read Only Memory)、発振器およびタイマを備える。コントローラ11は、ROMに記憶された所定のプログラムに基づいて、入力装置や通信インタフェースを介して要求された処理を実行することにより、画像形成装置全体の動作を制御する。また、コントローラ11は、タイマを用いた時間計測機能を実現する。タイマは、演算処理装置から指示された所定の時間が経過(すなわちタイムアウト)すると、これを演算処理装置に通知するように構成されている。メモリ12は、SDRAM(Synchronous Dynamic Random Access Memory)やDDR(Double Data Rate)−SDRAM等の記憶装置を備え、コントローラ11のワークエリアとして機能する。ターゲットIF13は、コントローラ11がターゲット20とデータのやりとりを行うためのインタフェースであり、複数の信号線によりターゲット20と接続する。なお、ターゲットIF13と接続する複数の信号線には、ターゲット20からホスト10に割込信号を送信するための信号線と、ホスト10からターゲット20に画像処理の要求(コマンド)を送信するための信号線と、ホスト10とターゲット20との間で画像処理に関するデータを送受信するための信号線とが含まれる。入出力IF14は、入出力装置や通信インタフェースからの要求を表す情報や画像データなどを取得したり、あるいは、情報や画像データを供給するためのインタフェースである。入力装置や通信インタフェースから送信される情報は、画像処理装置100において実行すべき処理がどのようなものであるかを特定するものである。そこで、この情報のことを、以下では「処理種別情報」という。
The
なお、画像処理装置100において実行すべき処理のそれぞれには、所定の優先度が割り当てられている。ホスト10は、優先度の高い処理を優先的に実行するように構成されている。各処理の優先度は、処理種別情報から一意的に特定可能である。例えば、各処理の優先度は、処理種別情報と関連付けられてホスト10の内部にあらかじめ記憶されていてもよいし、処理種別情報に含まれる態様であってもよい。
A predetermined priority is assigned to each process to be executed in the
ターゲット20は、プロセサ21と、メモリ22と、ホストIF23とを備える。プロセサ21は、DSP(Digital Signal Processor)やASIC(Application Specific Integrated Circuit )等の演算処理装置や発振器を備え、供給されるデータに基づいて所定の画像処理を実行する。なお、プロセサ21は、複数の異なる画像処理を実行可能であるとともに、複数の演算処理を並列的に実行可能である。メモリ22は、SDRAMやDDR−SDRAM等の記憶装置を備え、プロセサ21のワークエリアとして機能する。ホストIF23は、プロセサ21がホスト10とデータのやりとりを行うためのインタフェースであり、上述した複数の信号線によりホスト10と接続する。なお、プロセサ21は、ホスト10から要求された画像処理を終了すると、ホストIF23を介して割込信号を送信するように構成されている。
The
ここで、図2を参照してプロセサ21の内部構成を説明する。同図に示すように、プロセサ21は、複数の内部プロセサP1、P11、P12、…、P1m、P2、P3、…、Pn(ただし、mおよびnは任意の自然数)と、複数のステータスレジスタR0、R1、R11、R12、…、R1m、R2、R3、…、Rnとを備える。個々の内部プロセサは、1または複数の演算器を有し、それぞれが決められた演算処理を実行する。また、個々のステータスレジスタは、所定のビット数のレジスタであり、内部プロセサのステータス(状態)、すなわち、要求された演算処理が内部プロセサによって正常に実行されたか否かを表す情報を記憶する。
Here, the internal configuration of the
ステータスレジスタは、あるレジスタの表す値が「1」の場合、当該レジスタに対応する演算処理が正常に終了したことを表しており、あるレジスタの表す値が「2」の場合、当該レジスタに対応する演算処理が正常に終了していない(すなわち異常終了した)ことを表している。また、ステータスレジスタは、あるレジスタの表す値が「0」の場合、当該レジスタに対応する内部プロセサが演算処理を要求されていない状態(アイドル状態)であることを表しており、あるレジスタの表す値が「3」の場合、当該レジスタに対応する内部プロセサが演算処理を実行中の状態(ビジー状態)であることを表している。つまり、この場合、ステータスレジスタは、2ビットの記憶領域により1つの内部プロセサのステータスを表している。 When the value represented by a certain register is “1”, the status register indicates that the arithmetic processing corresponding to the register has been completed normally. When the value represented by a certain register is “2”, the status register corresponds to the register. This indicates that the arithmetic processing to be performed has not ended normally (that is, ended abnormally). In addition, when the value represented by a certain register is “0”, the status register indicates that the internal processor corresponding to the register is not requested to perform arithmetic processing (idle state). A value of “3” indicates that the internal processor corresponding to the register is in a state (busy state) in which arithmetic processing is being executed. That is, in this case, the status register represents the status of one internal processor by a 2-bit storage area.
内部プロセサP1、P11、P12、…、P1m、P2、P3、…、Pnは、階層的な構造となるような関連を有している。図2において、内部プロセサP1、P2、P3、…、Pnは上層側に相当し、内部プロセサP11、P12、…、P1mは、内部プロセサP1に対して下層側に相当する。なお、同図においては図示を省略しているが、内部プロセサP2、P3、…、Pnについても、下層側に相当する内部プロセサが内部プロセサP1のそれと同様に関連付けられている。しかし、内部プロセサP2、P3、…、Pnに関連付けられた内部プロセサの数は、m個に限らない。また、これも特に図示しないが、内部プロセサP11、P12、…、P1mに対しても、より下層側の内部プロセサが存在する構成であってもよい。 The internal processors P1, P11, P12,..., P1m, P2, P3,..., Pn have a relationship that forms a hierarchical structure. In FIG. 2, internal processors P1, P2, P3,..., Pn correspond to the upper layer side, and internal processors P11, P12,..., P1m correspond to the lower layer side with respect to the internal processor P1. Although not shown in the figure, for the internal processors P2, P3,..., Pn, the internal processor corresponding to the lower layer side is associated with that of the internal processor P1. However, the number of internal processors associated with the internal processors P2, P3,..., Pn is not limited to m. Further, although not particularly illustrated, a configuration in which a lower-layer internal processor exists also for the internal processors P11, P12,..., P1m may be employed.
ステータスレジスタR0は、内部プロセサP1、P2、P3、…、Pnに対応するものである。すなわち、ステータスレジスタR0は、少なくとも2nビット分の記憶領域を有し、各記憶領域が内部プロセサP1、P2、P3、…、Pnのステータスを表す。また、ステータスレジスタR1は、内部プロセサP11、P12、…、P1mに対応する2mビット分の記憶領域を有し、各記憶領域が内部プロセサP11、P12、…、P1mの状態を表す。なお、ステータスレジスタR2、R3、…、Rnも、上述したステータスレジスタR1と同様の構造となっている。 The status register R0 corresponds to the internal processors P1, P2, P3,. That is, the status register R0 has a storage area of at least 2n bits, and each storage area represents the status of the internal processors P1, P2, P3,. The status register R1 has a storage area of 2 m bits corresponding to the internal processors P11, P12,..., P1m, and each storage area represents the state of the internal processors P11, P12,. The status registers R2, R3,..., Rn have the same structure as the status register R1 described above.
なお、ターゲット20が実行する画像処理には、その開始から終了までに要する時間(所要時間)が予測可能な処理とそうでない処理とがあるが、本実施形態において対象とするのは、前者とする。所要時間が予測不可能な画像処理については、通常の割込処理を行えばよい。所要時間が予測可能な処理には、例えば、入力された画像データのピクセル数に対して出力する画像データのピクセル数があらかじめ定まっている画像処理がある。このような画像処理の例としては、いわゆるネガポジ反転処理やサブサンプリング処理(間引き処理)などがある。ここにおいて、ネガポジ反転処理とは、例えば、入力された画像データの各ピクセルが8ビット(すなわち256階調)の階調値Nで表される場合に、その階調値を全て「255−N」に変換する処理のことである。また、サブサンプリング処理とは、画像データのピクセル数を所定の割合で間引く処理のことである。このような画像処理の場合、画像データのピクセル数やピクセル毎の処理に要するクロックサイクル数に基づいて、その所要時間を算出することが可能である。
Note that the image processing executed by the
[動作]
上述した構成のもと、画像処理装置100は、種々の処理を実行する。画像処理装置100においては、ホスト10が主体となって処理を実行するが、一部の処理については、ホスト10に代わってターゲット20が実行するようになっている。このときの動作を概要は以下の通りである。すなわち、画像処理装置100のホスト10は、まず、入力装置や通信インタフェースから処理種別情報を入力IF14を介して取得し、その情報に基づいて、実行すべき処理の内容を特定する。そして、ホスト10は、特定した処理のうち、自らが実行可能な処理については自らで実行し、ターゲット20が実行可能な画像処理についてはターゲット20に実行させる。ターゲット20における処理が終了したら、ホスト10は、その処理結果に応じた処理をさらに実行する。
[Operation]
Based on the above-described configuration, the
このような一連の処理を効率良く実行するために、ホスト10には、自らが実行可能な処理については自らで実行しつつ、ターゲット20の状態を適宜判断し、必要に応じてターゲット20に画像処理を実行させることが求められる。以下においては、画像処理装置100が上述した一連の処理を効率良く実行するための動作について、3つの動作例を挙げて説明する。なお、以下に示す動作例においては、処理種別情報が供給されるときに、ホスト10において何らかの処理が実行されている状況を前提として説明する。
In order to execute such a series of processes efficiently, the
(1)動作例1
図3は、本実施形態の画像処理装置100の第1の動作例を示すフローチャートである。以下、同図に沿って説明する。まず、画像処理装置100において、入力装置や通信インタフェースから何らかの要求が入力されると、ホスト10のコントローラ11は、この入力に対応する割込ハンドラを起動することにより、実行中の処理を中断し、その処理内容をメモリ12の所定領域に保持する(ステップSa1)。すなわち、コントローラ11は、実行中の処理をメモリ12に退避させ、後にこの処理を再開できるようにしておく。
(1) Operation example 1
FIG. 3 is a flowchart illustrating a first operation example of the
次に、コントローラ11は、入力された要求に応じた処理種別情報を取得する(ステップSa2)。処理種別情報を取得したら、コントローラ11は、処理種別情報により特定される処理がターゲット20の実行可能な画像処理であるか否かを判断する(ステップSa3)。処理種別情報により特定される処理がターゲット20の実行可能な画像処理でない場合(ステップSa3:NO)、コントローラ11は、この処理をホスト10で実行すべき処理であると特定し、その優先度に応じた処理を実行する(ステップSa13)。ここで、コントローラ11は、処理種別情報により特定された処理が退避中の処理よりも優先度の高い処理である場合は、当該特定された処理を実行し、処理種別情報により特定された処理が退避中の処理よりも優先度の低い処理である場合は、退避中の処理を再開し、終了した後に当該特定された処理を実行する。なお、このステップにおけるコントローラ11の動作は、通常の割込処理のそれと同様であるため、詳細な説明は省略する。
Next, the controller 11 acquires process type information corresponding to the input request (step Sa2). If the process type information is acquired, the controller 11 determines whether or not the process specified by the process type information is an image process that can be executed by the target 20 (step Sa3). When the process specified by the process type information is not an image process that can be executed by the target 20 (step Sa3: NO), the controller 11 specifies that this process is to be executed by the
一方、処理種別情報により特定される処理がターゲット20の実行可能な画像処理である場合(ステップSa3:YES)、コントローラ11は、その画像処理の所要時間を算出する(ステップSa4)。なお、このときコントローラ11が算出する所要時間は、予測値に過ぎない。そのため、ターゲット20は、要求された画像処理を実行するに際し、予期せぬ遅延要因によって所要時間よりも多くの時間を要してしまうこともある。
On the other hand, when the process specified by the process type information is an image process that can be executed by the target 20 (step Sa3: YES), the controller 11 calculates the time required for the image process (step Sa4). The required time calculated by the controller 11 at this time is only a predicted value. Therefore, the
所要時間を算出したら、コントローラ11は、この所要時間に基づいてタイマに時間の計測を開始させる(ステップSa5)。続いて、コントローラ11は、取得した処理種別情報により特定される画像処理の実行をターゲット20に要求する(ステップSa6)。そして、ターゲット20に要求を送信したら、コントローラ11は、メモリ12に退避させた処理に関するデータを読み出し、退避させていた処理を再開する(ステップSa7)。
After calculating the required time, the controller 11 causes the timer to start measuring time based on the required time (step Sa5). Subsequently, the controller 11 requests the
コントローラ11が処理を実行していると、やがて、ターゲット20における画像処理が終了する。上述したように、タイマは、所要時間に達するとこれを通知するように構成されている。そのため、コントローラ11は、ターゲット20における処理の終了前後において、タイマからのタイムアウトの通知の有無を判断する(ステップSa8)。そして、タイマがタイムアウトした場合、すなわち、タイマが計測を開始してからの時間が上述した所要時間と一致した場合(ステップSa8:YES)、コントローラ11は、実行中の処理を再び中断し、その処理内容をメモリ12の所定領域に保持する(ステップSa9)。
When the controller 11 is executing the processing, the image processing on the
ここで、コントローラ11は、ターゲット20から送信される割込信号の有無を判断する(ステップSa10)。この間、コントローラ11は、その他の処理を実行せずに待機している。そして、ターゲットIF13を介してターゲット20からの割込信号を受信したら(ステップSa10:YES)、コントローラ11は、この割込信号に対応する割込ハンドラを起動し、ターゲット20において実行された画像処理に応じた所定の処理を実行する(ステップSa11)。このとき実行される処理のことを、以下では「割込対応処理」という。
Here, the controller 11 determines whether or not there is an interrupt signal transmitted from the target 20 (step Sa10). During this time, the controller 11 stands by without performing other processes. When the interrupt signal from the
ここで、割込対応処理について説明する。割込対応処理においては、コントローラ11はまず、ターゲット20のステータスレジスタを参照する。なお、その後の処理については、ターゲット20が実行した画像処理やその処理結果に応じて異なる。例えば、コントローラ11は、参照したステータスレジスタが「2」であった場合、すなわち処理が異常終了した場合には、ターゲット20に同様の処理を再度実行させる。また、コントローラ11は、参照したステータスレジスタが「1」であった場合、すなわち処理が正常に終了した場合には、ターゲット20の処理結果を表すデータを受信し、そのデータにさらに演算処理を施すこともある。また、画像処理の種類によっては、ステータスレジスタを参照した後に処理を必要としない場合もある。
Here, the interrupt handling process will be described. In the interrupt handling process, the controller 11 first refers to the status register of the
続いて、コントローラ11がステータスレジスタを参照する手順を説明する。コントローラ11は、ターゲット20から割込信号を受信すると、ターゲット20において割込を必要とする何らかのイベントが発生したと判断することができる。ホスト10とターゲット20とを接続する信号線のうち、割込信号のために割り当てられた信号線は、通常1本である。そのため、このような構成においては、コントローラ11は、単に割込信号を受信しただけでは、ターゲット20において何らかのイベントが発生したということしか判断できず、具体的にどのような画像処理が実行されたのかなどを判断することはできない。そこで、コントローラ11は、プロセサ21のステータスレジスタを参照し、どの内部プロセサにおいて演算処理が実行されたかを特定することにより、割込信号の契機となった画像処理を特定している。所定の画像処理を実行するために必要な内部プロセサはあらかじめ決められているので、コントローラ11は、その内部プロセサに対応したステータスレジスタを参照すればよい。
Subsequently, a procedure in which the controller 11 refers to the status register will be described. When receiving an interrupt signal from the
プロセサ21が図2に示したような階層的な構造を有している場合、コントローラ11は、上層のステータスレジスタから順番に参照していき、目的とする下層のステータスレジスタの値を特定する。例えば、図2に例示した構成において、内部プロセサP11において演算処理が正常に実行され、コントローラ11がその状態を判断しようとする場合を考える。なお、この場合において、内部プロセサP2、…、Pnは、いずれも動作しないものとする。このような場合には、ステータスレジスタR0は、内部プロセサP1に対応するレジスタの値のみが「1(正常終了)」となっており、その他の内部プロセサP2、…、Pnに対応するレジスタの値は全て「0(アイドル状態)」となっている。また、ステータスレジスタR1は、内部プロセサP11に対応するレジスタの値が「1」となっている。
When the
割込信号に対応する画像処理を特定するために、コントローラ11は、まず、上層の内部プロセサに対応するステータスレジスタ、すなわちステータスレジスタR0を参照し、値が「1」となっているレジスタを特定する。続いて、コントローラ11は、値が「1」となっているレジスタに対応する内部プロセサの下層側に相当する内部プロセサのステータスレジスタを参照する。上述した場合であれば、内部プロセサP1に対応するレジスタの値が「1」となっているので、コントローラ11は、次にステータスレジスタR1を参照することとなる。 In order to identify the image processing corresponding to the interrupt signal, the controller 11 first refers to the status register corresponding to the upper layer internal processor, that is, the status register R0, and identifies the register whose value is “1”. To do. Subsequently, the controller 11 refers to the status register of the internal processor corresponding to the lower layer side of the internal processor corresponding to the register whose value is “1”. In the case described above, since the value of the register corresponding to the internal processor P1 is “1”, the controller 11 next refers to the status register R1.
ここで、図3の説明に戻る。コントローラ11は、上述のようにしてステータスレジスタを参照し、割込対応処理を実行する。そして、この割込対応処理が終了したら、コントローラ11は、退避させた処理に関するデータをメモリ12から読み出し、その処理を再開する(ステップSa12)。
Returning to the description of FIG. The controller 11 refers to the status register as described above and executes an interrupt handling process. When this interrupt handling process is completed, the controller 11 reads out the data related to the saved process from the
このように動作することにより、画像処理装置100は、ターゲット20が予測通りに画像処理を終えた場合のみならず、予測より多くの時間を要した場合においても、割込対応処理を遅滞なく開始することができる。そのため、画像処理装置100は、ターゲット20において予期せぬ遅延が生じたとしても、ターゲット20からの割込信号に即座に対応し、一連の処理を効率良く実行することが可能となる。画像処理装置100を本動作例のように動作させた場合、コントローラ11は、ターゲット20からの割込信号を受信する前に実行中の処理を退避させているので、割込信号を受信してから退避を行うような構成に比べて、割込対応処理をより迅速に行うことが可能となる。また、画像処理装置100を本動作例のように動作させた場合、ターゲット20において予期せぬ遅延が生じた場合であっても、コントローラ11は何もせずに待機するので、コントローラ11における無駄な処理(ポーリング等)の発生を抑制することが可能となる。
By operating in this way, the
(2)動作例2
続いて、本実施形態の画像処理装置100の第2の動作例について、図4のフローチャートを参照して説明する。本動作例は、ターゲット20に対して複数の画像処理の実行要求が連続的に送信されるような場合に特に適した動作例である。なお、本動作例においては、図4に示すように、上述した動作例1と同様の処理を行うステップが存在する。以下では、このようなステップについては、その説明を適宜省略する。
(2) Operation example 2
Subsequently, a second operation example of the
本動作例におけるステップSb1〜Sb10およびSb15の処理は、動作例1におけるステップSa1〜Sa10およびSa13の処理と概ね同様である。ただし、本動作例においては、ステップSb2において、それぞれが異なる内部プロセサにより実行される2つの画像処理を示す処理種別情報が取得されるとする。つまり、本動作例において、コントローラ11は、それぞれの画像処理について所要時間を算出し(ステップSb4)、処理の実行の要求(ステップSb6)などを行う。なお、以下においては、処理種別情報により特定される2つの画像処理のことを、それぞれ「第1の画像処理」、「第2の画像処理」と称して区別することとする。また、説明の便宜上、第2の画像処理の所要時間は第1の画像処理の所要時間よりも長いとする。 The processing of steps Sb1 to Sb10 and Sb15 in this operation example is substantially the same as the processing of steps Sa1 to Sa10 and Sa13 in operation example 1. However, in this operation example, it is assumed that process type information indicating two image processes executed by different internal processors is acquired in step Sb2. That is, in this operation example, the controller 11 calculates a required time for each image processing (step Sb4), and makes a request for execution of the processing (step Sb6). In the following description, the two image processes specified by the process type information are referred to as “first image process” and “second image process”, respectively. For convenience of explanation, it is assumed that the time required for the second image processing is longer than the time required for the first image processing.
コントローラ11は、ステップSb10において割込信号を受信すると、その割込信号の契機となった画像処理を特定する(ステップSb11)。このとき、コントローラ11は、割込信号を受信したタイミングと、ステップSb4において算出した所要時間とに基づいて、割込信号の契機となった画像処理を特定する。例えば、コントローラ11は、ステップSb6においてターゲット20に画像処理を要求してからステップSb10において割込信号を受信するまでの時間を、ステップSb4において算出した第1および第2の画像処理の所要時間のそれぞれと比較し、所要時間との差がより小さい方の画像処理を割込信号の契機となった画像処理として特定する。上述したように、ここでは、第2の画像処理の所要時間の方が第1の画像処理の所要時間よりも長いとしているから、第1の画像処理が先に特定されることとなる。
When the controller 11 receives the interrupt signal in step Sb10, the controller 11 specifies the image processing that triggered the interrupt signal (step Sb11). At this time, the controller 11 specifies the image processing that triggered the interrupt signal based on the timing at which the interrupt signal is received and the required time calculated in step Sb4. For example, the controller 11 determines the time from the time when image processing is requested to the
このようにして割込信号の契機となった画像処理を特定したら、コントローラ11は、割込対応処理を実行する(ステップSb12)。本動作例の割込対応処理は、上述した動作例1の割込対応処理と異なる。本動作例において、コントローラ11は、ステップSb11において特定された画像処理に基づいて、参照すべきステータスレジスタを特定する。コントローラ11は、割込信号の契機となった画像処理を既に特定しているので、この画像処理を実行するために用いられる内部プロセサを特定することができる。そのため、コントローラ11は、ステータスレジスタを階層的に順番に参照しなくとも、参照すべきステータスレジスタを特定することができるので、このステータスレジスタを直接参照する。そして、コントローラ11は、必要に応じて、上述した動作例1と同様にその後の処理を実行する。 When the image processing that triggered the interrupt signal is specified in this way, the controller 11 executes an interrupt handling process (step Sb12). The interrupt handling process of this operation example is different from the interrupt handling process of the operation example 1 described above. In this operation example, the controller 11 specifies a status register to be referred to based on the image processing specified in step Sb11. Since the controller 11 has already specified the image processing that triggered the interrupt signal, the controller 11 can specify the internal processor used for executing this image processing. Therefore, the controller 11 can specify the status register to be referred to without referring to the status register in a hierarchical order, and therefore directly refers to the status register. And the controller 11 performs a subsequent process similarly to the operation example 1 mentioned above as needed.
割込対応処理を終了したら、コントローラ11は、ターゲット20に要求した画像処理が全て終了したか否かを判断する(ステップSb13)。換言すると、この判断は、第1の画像処理の終了を契機に送信される割込信号と第2の画像処理の終了を契機に送信される割込信号の双方が受信されたか否かの判断に等しい。ターゲット20に要求した画像処理が全て終了した場合(ステップSb13:YES)、すなわち、第2の画像処理の終了を契機に送信される割込信号が受信された場合には、コントローラ11は、退避させた処理に関するデータをメモリ12から読み出し、その処理を再開する(ステップSb14)。一方、ターゲット20に要求した画像処理が終了していない場合(ステップSb13:NO)、すなわち、第2の画像処理の終了を契機に送信される割込信号が未だ受信されていない場合には、コントローラ11は、ステップSb7以降の処理を再度実行し、受信した割込信号に応じた処理を行う。
When the interrupt handling process is completed, the controller 11 determines whether or not the image processing requested for the
このように動作することにより、画像処理装置100は、ターゲット20において実行された画像処理を、ステータスレジスタを順次参照することなく特定することが可能となる。これにより、画像処理装置100は、割込信号の契機となった画像処理を実行した内部プロセサのステータスを直接参照することが可能となる。例えば、図2に例示した構成において、内部プロセサP11において演算処理が実行され、コントローラ11がその状態を判断しようとする場合、動作例1ではステータスレジスタR0を参照してからステータスレジスタR1を参照する必要があったが、本動作例においては、ステータスレジスタR0を参照せずにステータスレジスタR1を参照することができる。この結果、コントローラ11は、割込対応処理に要する時間(クロックサイクル数)を少なくすることができ、後続の処理をより早く実行することが可能となる。また、これに伴い、コントローラ11は、ターゲット20に連続的に要求を送信するような場合に、次の処理の実行をより早く要求することができるので、ターゲット20がアイドル状態となる時間を少なくすることが可能となる。つまり、本動作例によれば、画像処理装置100は、全体として処理の効率化を図ることが可能となる。
By operating in this way, the
[変形例]
以上においては、一の好適な実施形態とその動作例を例示して本発明を説明したが、本発明は上述した実施形態に限定されるものではなく、その他の種々の態様にて実施することも可能である。本発明においては、例えば、上述した実施形態に対して以下のような変形を適用することができる。
[Modification]
In the above, the present invention has been described by exemplifying one preferred embodiment and its operation example. However, the present invention is not limited to the above-described embodiment, and may be implemented in various other modes. Is also possible. In the present invention, for example, the following modifications can be applied to the above-described embodiment.
上述した動作例2において、コントローラ11は、ステータスレジスタを参照せずに割込信号の契機となった画像処理を特定することができるため、その画像処理の終了後に自らが実行すべき処理をステータスレジスタを参照する前に知ることができる。そのため、動作例2に示した処理においては、割込対応処理においてステータスレジスタの参照を省略することも可能である。このように動作した場合であっても、ターゲット20における画像処理が正常に終了している限りは、特に問題は生じない。
In the operation example 2 described above, the controller 11 can specify the image processing that triggered the interrupt signal without referring to the status register, so that the processing that the controller 11 should execute after the end of the image processing is displayed. You can know before referring to the register. For this reason, in the processing shown in the operation example 2, it is possible to omit reference to the status register in the interrupt handling processing. Even in such a case, there is no particular problem as long as the image processing on the
しかし、ステータスレジスタを参照しないということは、ターゲット20における画像処理が正常終了したか異常終了したかを判断しないということなので、ターゲット20における画像処理が異常終了した場合には、当然問題が生じる。そこで、割込対応処理においてステータスレジスタの参照を省略する場合であっても、その後のいずれかのタイミングでステータスレジスタを参照するのが望ましいといえる。ステータスレジスタを参照するタイミングとしては、例えば、ある割込信号に応じた割込対応処理の終了後であって、かつ、ターゲット20が画像処理を実行中である期間のいずれかが望ましい。具体的には、例えば、図4に示したフローチャートにおいて、ステップSb13における判断が否定的である場合に、この判断の後であってステップSb7の処理(退避中の処理の再開)を実行する前にステータスレジスタを参照するとよい。そして、ステータスレジスタを参照した結果、対応する処理が異常終了したと判断される場合には、同一の処理を再度実行させればよい。このようにすれば、効率的な処理を維持しつつ、異常時にリカバリをすることが可能となる。
However, not referring to the status register means that it is not determined whether the image processing at the
また、上述した実施形態においては、1のホスト10に対して1のターゲット20が接続されている構成を示したが、1のホスト10に対して複数のターゲット20が接続される構成であってもよい。また、このような構成の場合、あるターゲットの処理結果を他のターゲットに引き渡すこともあるが、このような処理を上述の割込対応処理に含んでもよい。また、上述した実施形態においては、ホスト10とターゲット20とを備えた画像処理装置100を示したが、本発明は画像処理装置に限定されるものではない。すなわち、上述した実施形態においては、ターゲット20は画像処理を実行するものとして説明したが、画像処理以外の演算処理を実行するものであってもよい。
In the above-described embodiment, a configuration in which one
100…画像処理装置、11…コントローラ、12、22…メモリ、13…ターゲットIF、14…入出力IF、21…プロセサ、23…ホストIF、P1、P11、P12、P1m、P2、P3、Pn…内部プロセサ、R0、R1、R11、R12、R1m、R2、R3、Rn…ステータスレジスタ
DESCRIPTION OF
Claims (5)
自装置または前記演算処理装置において実行される処理の内容を特定する処理種別情報を取得する取得手段と、
前記取得手段により取得された処理種別情報によって特定される処理が、前記演算処理装置において実行される前記所定の処理である場合に、前記接続手段を介して前記演算処理装置に当該処理の実行を要求する処理要求手段と、
前記演算処理装置が前記処理要求手段により要求された前記所定の処理を開始してから終了するまでに要する所要時間を算出する算出手段と、
前記接続手段を介して前記演算処理装置から受信した割込信号または前記取得手段により取得された処理種別情報に基づいて、自装置において実行すべき処理を実行する処理実行手段と
を備え、
前記処理実行手段は、
前記処理要求手段により前記演算処理装置に前記所定の処理の実行が要求され、かつ、自装置において処理を実行中である場合に、前記処理要求手段が当該所定の処理の実行を要求してから前記算出手段により算出された所要時間が経過するまでの間に前記実行中の処理を中断し、その後、前記接続手段を介して割込信号を受信すると、前記演算処理装置が実行した前記所定の処理に応じた処理を実行する
ことを特徴とする制御装置。 An arithmetic processing device capable of executing a predetermined process, and a connection means for connecting to an arithmetic processing device that transmits an interrupt signal when the processing ends.
An acquisition means for acquiring process type information for specifying the content of a process executed in the own apparatus or the arithmetic processing apparatus;
When the process specified by the process type information acquired by the acquisition means is the predetermined process executed in the arithmetic processing apparatus, the arithmetic processing apparatus is caused to execute the process via the connection means. Processing request means to request;
Calculating means for calculating a time required for the arithmetic processing unit to start after the predetermined processing requested by the processing requesting means is completed;
Based on the interrupt signal received from the arithmetic processing device via the connection means or the processing type information acquired by the acquisition means, a process execution means for executing a process to be executed in the own device,
The process execution means includes
When the processing requesting unit requests the arithmetic processing unit to execute the predetermined process and the processing requesting unit requests the execution of the predetermined process when the processing is being performed in the own device. When the processing being executed is interrupted until the required time calculated by the calculating means elapses and then an interrupt signal is received via the connecting means, the predetermined processing executed by the arithmetic processing unit is performed. A control device that performs processing according to processing.
前記処理実行手段は、
前記接続手段を介して割込信号を受信すると、当該割込信号の契機となった前記所定の処理を前記算出手段により当該処理について算出された所要時間に基づいて特定する
ことを特徴とする請求項1に記載の制御装置。 The arithmetic processing unit is capable of executing a plurality of the predetermined processes, and indicates a plurality of internal processors executing a plurality of arithmetic processes constituting each of the predetermined processes, and states of the plurality of internal processors In the case of providing a status register for storing information in a storage area corresponding to each internal processor,
The process execution means includes
When the interrupt signal is received through the connection means, the predetermined process that triggered the interrupt signal is specified based on the required time calculated for the process by the calculation means. Item 2. The control device according to Item 1.
前記ステータスレジスタの記憶領域のうち、前記特定された所定の処理を実行する際に用いられた前記内部プロセサの状態を示す情報が記憶された記憶領域を特定して参照する
ことを特徴とする請求項2に記載の制御装置。 The process execution means includes
The storage area of the status register is specified and referred to by specifying a storage area in which information indicating the state of the internal processor used when executing the specified processing is specified. Item 3. The control device according to Item 2.
前記所定の処理である第1の処理と第2の処理とを示す処理種別情報が前記取得手段により取得され、かつ、前記第1の処理を前記割込信号の契機となった処理として特定した場合、当該特定後であって前記演算処理装置が前記第2の処理を実行中である期間に、前記ステータスレジスタの記憶領域のうち前記第1の処理を実行する際に用いられた前記内部プロセサの状態を示す情報が記憶された記憶領域を参照する
ことを特徴とする請求項2に記載の制御装置。 The process execution means includes
Process type information indicating the first process and the second process, which are the predetermined processes, is acquired by the acquisition unit, and the first process is specified as a process triggered by the interrupt signal. In this case, the internal processor used when executing the first process in the storage area of the status register during the period after the identification and the arithmetic processing unit is executing the second process. The control device according to claim 2, wherein a storage area in which information indicating the state is stored is referred to.
実行される処理の内容を特定する処理種別情報を取得する取得機能と、
前記取得機能により取得された処理種別情報によって特定される処理が前記所定の処理である場合に、前記演算処理装置と接続する接続手段を介して、当該演算処理装置に当該処理の実行を要求する処理要求機能と、
前記演算処理装置が前記処理要求機能により要求された前記所定の処理を開始してから終了するまでに要する所要時間を算出する算出機能と、
前記接続手段を介して前記演算処理装置から受信した割込信号または前記取得機能により取得された処理種別情報に基づいて、自装置において実行すべき処理を実行する処理実行機能であって、前記処理要求機能により前記演算処理装置に前記所定の処理の実行が要求され、かつ、自装置において処理を実行中である場合に、前記処理要求機能が当該所定の処理の実行を要求してから前記算出機能により算出された所要時間が経過するまでの間に前記実行中の処理を中断し、その後、前記接続手段を介して割込信号を受信すると、前記演算処理装置が実行した前記所定の処理に応じた処理を実行する処理実行機能と
を実現させるためのプログラム。
An arithmetic processing unit capable of executing a predetermined process, and a computer connected to the arithmetic processing unit that transmits an interrupt signal upon completion of the process,
An acquisition function that acquires process type information that identifies the content of the process to be executed;
When the process specified by the process type information acquired by the acquisition function is the predetermined process, the calculation processing apparatus is requested to execute the process via a connection unit connected to the calculation processing apparatus. Processing request function;
A calculation function for calculating a time required for the arithmetic processing unit to start from the predetermined process requested by the process request function;
A process execution function for executing a process to be executed in the own apparatus based on an interrupt signal received from the arithmetic processing apparatus via the connection means or a process type information acquired by the acquisition function, When the request function requests the arithmetic processing device to execute the predetermined process, and the processing is being executed in the own device, the calculation is performed after the processing request function requests the execution of the predetermined process. When the processing being executed is interrupted until the required time calculated by the function elapses and then an interrupt signal is received via the connection means, the predetermined processing executed by the arithmetic processing unit is performed. A program that implements a process execution function that executes the corresponding process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006294043A JP2008112274A (en) | 2006-10-30 | 2006-10-30 | Controller and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006294043A JP2008112274A (en) | 2006-10-30 | 2006-10-30 | Controller and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008112274A true JP2008112274A (en) | 2008-05-15 |
Family
ID=39444764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006294043A Pending JP2008112274A (en) | 2006-10-30 | 2006-10-30 | Controller and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008112274A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010191682A (en) * | 2009-02-18 | 2010-09-02 | Toshiba Corp | Apparatus, method and program for processing information controlling computing system |
JP7418569B2 (en) | 2019-12-13 | 2024-01-19 | インテル コーポレイション | Transmission and synchronization techniques for hardware-accelerated task scheduling and load balancing on heterogeneous platforms |
-
2006
- 2006-10-30 JP JP2006294043A patent/JP2008112274A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010191682A (en) * | 2009-02-18 | 2010-09-02 | Toshiba Corp | Apparatus, method and program for processing information controlling computing system |
JP7418569B2 (en) | 2019-12-13 | 2024-01-19 | インテル コーポレイション | Transmission and synchronization techniques for hardware-accelerated task scheduling and load balancing on heterogeneous platforms |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8566493B2 (en) | Interrupt controller and methods of operation | |
JP2006195823A (en) | Dma device | |
EP1365321A2 (en) | Multiprocessor system | |
JP2011160366A (en) | Communication device | |
US6581119B1 (en) | Interrupt controller and a microcomputer incorporating this controller | |
US8913262B2 (en) | Image forming apparatus, power control method, and storage medium | |
US9552050B2 (en) | Information processing device, printing device, and control method | |
US9244692B2 (en) | Information processing apparatus, control method for information processing apparatus, and program to stop supply of clock to a DSP | |
JP2008112274A (en) | Controller and program | |
JP2004078683A (en) | Computer system and shared memory controlling method | |
JP2005085079A (en) | Data transfer controller | |
JP5783348B2 (en) | Control device, control program, and image forming apparatus | |
JPH11353291A (en) | Multiprocessor system and medium recording task exchange program | |
JP4862395B2 (en) | Information processing apparatus and information processing apparatus control method | |
JP2007208696A (en) | Encryption processing circuit and printer | |
JP4163487B2 (en) | Memory control apparatus, image forming apparatus, and memory system control method | |
JP4107278B2 (en) | Processor control circuit and information processing apparatus | |
JP2006059303A (en) | Computer system | |
JP4203337B2 (en) | Memory arbiter and memory control device | |
JP2018106583A (en) | Semiconductor device | |
JP3991999B2 (en) | Central processing unit and processor control method | |
JP2006195705A (en) | Processor | |
JP2007219925A (en) | Bus controller, bus control program and recording medium | |
JP2007320079A (en) | Image forming controlling apparatus and method for controlling image forming apparatus | |
JP2007060198A (en) | Digital composite machine |