JP2013069056A - Information processor and memory management method - Google Patents

Information processor and memory management method Download PDF

Info

Publication number
JP2013069056A
JP2013069056A JP2011206166A JP2011206166A JP2013069056A JP 2013069056 A JP2013069056 A JP 2013069056A JP 2011206166 A JP2011206166 A JP 2011206166A JP 2011206166 A JP2011206166 A JP 2011206166A JP 2013069056 A JP2013069056 A JP 2013069056A
Authority
JP
Japan
Prior art keywords
buffer
image data
holding
reception buffer
reception
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
Application number
JP2011206166A
Other languages
Japanese (ja)
Inventor
Tomoaki Kanazawa
知明 金澤
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011206166A priority Critical patent/JP2013069056A/en
Publication of JP2013069056A publication Critical patent/JP2013069056A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Memory System (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an information processor which allows efficient processing of image data transferred from a transfer equipment and a memory management method.SOLUTION: An information processor comprises: a memory; a table; change means; and notification means. The memory has multiple buffer areas holding multiple pieces of image data. The table assigns the multiple buffer areas to reception buffers where image data is written and buffers for holding image data are held. When image data written in a reception buffer is held, the change means switches between the reception buffer where the image data to be held is written and a holding buffer. The notification means notifies an image transfer destination of information showing the reception buffer after the change when the change means switches between the reception buffer and the holding buffer.

Description

本発明の実施形態は、情報処理装置及びメモリ管理方法に関する。   Embodiments described herein relate generally to an information processing apparatus and a memory management method.

情報処理装置には、転送装置から順次転送されてくる画像データに対して画像処理を施すものがある。また、DMA転送装置は、情報処理装置の制御部を介さずに、直接的に情報処理装置内のメモリに設けられた受信バッファに画像データを書き込む機能を有する。DMA転送装置により受信バッファに書き込まれた画像データに対して画像処理を施す場合、情報処理装置は、DMA転送装置によってバッファ上の画像データが上書きされないように、画像データを受信バッファから保持バッファへ物理的にコピーする処理が必要となる。   Some information processing apparatuses perform image processing on image data sequentially transferred from a transfer apparatus. Further, the DMA transfer device has a function of directly writing image data into a reception buffer provided in a memory in the information processing device without using the control unit of the information processing device. When performing image processing on the image data written in the reception buffer by the DMA transfer device, the information processing device transfers the image data from the reception buffer to the holding buffer so that the image data on the buffer is not overwritten by the DMA transfer device. Processing to physically copy is required.

特開平10−248003号公報Japanese Patent Laid-Open No. 10-248003

この発明は、転送装置から転送されてくる画像データを効率的に処理できる情報処理装置及びメモリ管理方法を提供することを目的とする。   An object of the present invention is to provide an information processing apparatus and a memory management method capable of efficiently processing image data transferred from a transfer apparatus.

実施形態によれば、情報処理装置は、メモリと、テーブルと、変更手段と、通知手段とを有する。メモリは、複数の画像データを保持する複数のバッファ領域を有する。テーブルは、複数のバッファ領域を画像データが書き込まれる受信バッファと画像データを保持する保持バッファとに割り当てる。変更手段は、前記受信バッファに書き込まれた画像データを保持する場合、前記保持すべき画像データが書き込まれた受信バッファと保持バッファとを入れ替える。通知手段は、変更手段により受信バッファと保持バッファとを入れ替えた場合、変更後の受信バッファを示す情報を画像転送元へ通知する。   According to the embodiment, the information processing apparatus includes a memory, a table, a changing unit, and a notification unit. The memory has a plurality of buffer areas for holding a plurality of image data. The table allocates a plurality of buffer areas to a reception buffer in which image data is written and a holding buffer that holds the image data. When holding the image data written in the reception buffer, the changing unit exchanges the reception buffer and the holding buffer in which the image data to be held is written. The notifying unit notifies the image transfer source of information indicating the changed reception buffer when the changing unit switches the reception buffer and the holding buffer.

図1は、画像転送システムの構成例を概略的に示す図である。FIG. 1 is a diagram schematically illustrating a configuration example of an image transfer system. 図2は、バッファ参照テーブルの例を示す図である。FIG. 2 is a diagram illustrating an example of a buffer reference table. 図3は、画像処理システムにける全体的な処理の流れを説明するためのフローチャートである。FIG. 3 is a flowchart for explaining the overall processing flow in the image processing system. 図4は、バッファ参照テーブルにおける状態遷移の例を示す図である。FIG. 4 is a diagram illustrating an example of state transition in the buffer reference table. 図5は、情報処理装置におけるメモリ管理処理の流れを説明するためのフローチャートである。FIG. 5 is a flowchart for explaining the flow of memory management processing in the information processing apparatus.

以下、実施形態について、図面を参照して説明する。
図1は、実施形態に係る画像処理システムのハードウエア構成例を概略的に示す図である。
画像処理システムは、カメラ1、DMA(Direct Memory Access)転送装置2、および、情報処理装置3を有する。カメラ1は、画像データを生成する画像生成部として機能する。たとえば、カメラ1は、撮影した画像をデジタル画像データとして出力するデジタルカメラにより構成する。カメラ1は、撮影した画像の画像データをDMA転送装置2へ送信する。
Hereinafter, embodiments will be described with reference to the drawings.
FIG. 1 is a diagram schematically illustrating a hardware configuration example of an image processing system according to an embodiment.
The image processing system includes a camera 1, a DMA (Direct Memory Access) transfer device 2, and an information processing device 3. The camera 1 functions as an image generation unit that generates image data. For example, the camera 1 is configured by a digital camera that outputs captured images as digital image data. The camera 1 transmits image data of the captured image to the DMA transfer device 2.

DMA転送装置2は、データを直接的に外部のメモリに書き込めるデータ転送装置である。DMA転送装置2は、制御部11およびバッファメモリ12を有する。制御部11は、DMA転送装置2の動作を司るものであり、データ転送の制御を行う。バッファメモリ12は、データを一時的に保持する。バッファメモリ12は、たとえば、FIFO方式のメモリであり、カメラ1からの画像データを受信する受信バッファメモリとして機能する。   The DMA transfer device 2 is a data transfer device that can directly write data to an external memory. The DMA transfer device 2 includes a control unit 11 and a buffer memory 12. The control unit 11 controls the operation of the DMA transfer apparatus 2 and controls data transfer. The buffer memory 12 temporarily holds data. The buffer memory 12 is, for example, a FIFO memory and functions as a reception buffer memory that receives image data from the camera 1.

制御部11は、データの転送先を指定する転送アドレステーブル11aを有する。制御部11は、情報処理装置3から転送用のバッファ(受信バッファ)のアドレスを示す通知を受けて転送アドレステーブル11aを随時更新する。制御部11は、転送アドレステーブル11aを参照してデータの転送先(書込先)となる情報処理装置3内の外部メモリにおけるアドレス(転送アドレス)を決定する。   The control unit 11 has a transfer address table 11a for designating a data transfer destination. The control unit 11 receives a notification indicating the address of the transfer buffer (reception buffer) from the information processing device 3, and updates the transfer address table 11a as needed. The control unit 11 refers to the transfer address table 11a to determine an address (transfer address) in the external memory in the information processing apparatus 3 that is a data transfer destination (write destination).

すなわち、図1に示す構成の画像処理システムにおいては、情報処理装置3の外部メモリへ転送するDMA転送装置2は、カメラ1から出力される画像データを一時的にバッファメモリ12に保持する。DMA転送装置2の制御部11は、転送アドレステーブル11aを参照して、情報処理装置3内の外部メモリに設けられた受信バッファのアドレス(転送アドレス)を決定する。転送アドレスを決定すると、制御部11は、バッファメモリ12に記憶した画像データを情報処理装置3内の外部メモリにおける受信バッファへ直接的に転送する(書き込む)。   That is, in the image processing system having the configuration shown in FIG. 1, the DMA transfer device 2 that transfers to the external memory of the information processing device 3 temporarily holds the image data output from the camera 1 in the buffer memory 12. The control unit 11 of the DMA transfer device 2 refers to the transfer address table 11a to determine the address (transfer address) of the reception buffer provided in the external memory in the information processing device 3. When the transfer address is determined, the control unit 11 directly transfers (writes) the image data stored in the buffer memory 12 to the reception buffer in the external memory in the information processing apparatus 3.

次に、情報処理装置3の構成について説明する。
図1に示す構成例では、情報処理装置3は、制御部21、外部メモリ22、および、画像処理部23を有する。制御部21は、情報処理装置3全体の動作を司るものである。制御部21は、プロセッサ(CPU)、RAMおよびROMなどを有し、プロセッサがROMなどに記憶したプログラムを実行することにより様々な処理を実現する。たとえば、制御部21は、DMA転送装置2から転送される画像データを記憶するために、外部メモリ22に設けたバッファ領域(バッファメモリ)を管理するメモリ管理機能を有する。
Next, the configuration of the information processing apparatus 3 will be described.
In the configuration example illustrated in FIG. 1, the information processing device 3 includes a control unit 21, an external memory 22, and an image processing unit 23. The control unit 21 governs the overall operation of the information processing apparatus 3. The control unit 21 includes a processor (CPU), a RAM, a ROM, and the like, and implements various processes when the processor executes programs stored in the ROM. For example, the control unit 21 has a memory management function for managing a buffer area (buffer memory) provided in the external memory 22 in order to store image data transferred from the DMA transfer device 2.

外部メモリ22は、複数のバッファ領域R1、R2、R3を有する。外部メモリ22の複数のバッファ領域R1、R2、R3には、受信バッファあるいは保持バッファが割り当てられる。外部メモリ22の受信バッファは、DMA転送装置2から直接的にデータが転送されるバッファメモリである。言い換えれば、本画像処理システムにおいては、DMA転送装置2は、情報処理装置3の制御部21を介さないで、外部メモリ22の受信バッファにデータが書き込めるようになっている。   The external memory 22 has a plurality of buffer areas R1, R2, and R3. A reception buffer or a holding buffer is allocated to the plurality of buffer areas R1, R2, and R3 of the external memory 22. The reception buffer of the external memory 22 is a buffer memory to which data is directly transferred from the DMA transfer device 2. In other words, in the present image processing system, the DMA transfer device 2 can write data to the reception buffer of the external memory 22 without going through the control unit 21 of the information processing device 3.

なお、図1に示す構成例において、複数のバッファ領域を有する外部メモリ22とメモリ管理機能により複数のバッファ領域の動作を制御する制御部21とは、メモリ管理部25として機能する。   In the configuration example shown in FIG. 1, the external memory 22 having a plurality of buffer areas and the control unit 21 that controls the operation of the plurality of buffer areas by the memory management function function as a memory management unit 25.

また、画像処理部23は、DMA転送装置2から転送されてきた画像データ(カメラ1が撮影した画像)に対して画像処理を施すものである。画像処理部23は、画像処理中に画像データが更新(上書き)されないように、外部メモリ22における保持バッファに記憶された画像データに対して画像処理を施すように制御される。   The image processing unit 23 performs image processing on the image data transferred from the DMA transfer device 2 (image taken by the camera 1). The image processing unit 23 is controlled to perform image processing on the image data stored in the holding buffer in the external memory 22 so that the image data is not updated (overwritten) during the image processing.

制御部21は、受信バッファおよび保持バッファの割り当てを示すバッファ参照テーブル24を有する。図1に示す構成例では、外部メモリ22に3つのバッファ領域RA、RB、RCが設けられる例を示している。この場合、バッファ参照テーブル24は、3つのバッファ領域を2つの受信バッファ(ダブルバッファ)と保持バッファとに割り当てられた情報を保持する。   The control unit 21 has a buffer reference table 24 indicating allocation of reception buffers and holding buffers. In the configuration example illustrated in FIG. 1, an example in which three buffer areas RA, RB, and RC are provided in the external memory 22 is illustrated. In this case, the buffer reference table 24 holds information assigned to the three buffer areas in the two reception buffers (double buffers) and the holding buffer.

図2は、バッファ参照テーブル24の構成例を示す図である。
図2に示す例において、バッファ参照テーブル24は、2つの受信バッファと1つの保持バッファとを設定する。各バッファには、たとえば、外部メモリ22における先頭アドレスで指定されるバッファ領域RA、RB、RCが割り当てられる。図2に示す例では、第1の受信バッファには先頭アドレスが「a」のバッファ領域RAが割り当てられ、第2の受信バッファには先頭アドレスが「b」のバッファ領域RBが割り当てられ、保持バッファには先頭アドレスが「c」のバッファ領域RCが割り当てられている。また、図2に示す構成例では、画像データの転送先として選択した領域(使用状況)を示す情報も付加されている。
FIG. 2 is a diagram illustrating a configuration example of the buffer reference table 24.
In the example illustrated in FIG. 2, the buffer reference table 24 sets two reception buffers and one holding buffer. For example, buffer areas RA, RB, and RC designated by the head address in the external memory 22 are allocated to each buffer. In the example shown in FIG. 2, a buffer area RA having a head address “a” is allocated to the first reception buffer, and a buffer area RB having a head address “b” is allocated to the second reception buffer. A buffer area RC having a head address “c” is allocated to the buffer. In the configuration example shown in FIG. 2, information indicating the area (usage status) selected as the transfer destination of the image data is also added.

2つの受信バッファは、順番(交互)にDMA転送装置2から画像データが直接的に書き込まれるバッファとして使用される。保持バッファは、DMA転送装置2から上書きされることがないように、画像データを保持するバッファメモリである。たとえば、画像処理部23から画像取得要求があった場合に、処理対象となる画像データを記憶している受信バッファが保持バッファと入れ替えられる。保持バッファと受信バッファとの入れ替えは、バッファ参照テーブル24において、保持バッファのアドレス情報と受信バッファのアドレス情報とを入れ替える(互いの先頭アドレスを書き換える)ことにより実現できる。   The two reception buffers are used as buffers in which image data is directly written from the DMA transfer device 2 in order (alternately). The holding buffer is a buffer memory that holds image data so as not to be overwritten from the DMA transfer apparatus 2. For example, when there is an image acquisition request from the image processing unit 23, the reception buffer storing the image data to be processed is replaced with a holding buffer. The replacement of the holding buffer and the receiving buffer can be realized by exchanging the address information of the holding buffer and the address information of the receiving buffer in the buffer reference table 24 (rewriting the head addresses of each other).

なお、本実施形態では、2つの受信バッファと1つの保持バッファとがバッファ参照テーブルにより定義される例を想定して説明するが、これに限定されるものではない。たとえば、受信バッファは、3以上の複数であっても良い。この場合、受信バッファは、順番にローテーションして使用すれば良い。   In the present embodiment, the description will be made assuming an example in which two reception buffers and one holding buffer are defined by a buffer reference table, but the present invention is not limited to this. For example, the reception buffer may be a plurality of three or more. In this case, the reception buffer may be rotated in order.

次に、画像処理システム全体における処理の流れについて説明する。
図3は、画像処理システムにおける動作シーケンス図である。
まず、メモリ管理部25としての情報処理装置3の制御部21は、バッファ参照テーブル24を参照して、DMA転送装置2から次に画像データが転送されるべき受信バッファを決定する(ステップS11、S15、S19)。制御部21は、複数の受信バッファに対して順番に画像データが書き込まれるように、DMA転送装置2から次に画像データが転送されるべき受信バッファを決定する。
Next, the flow of processing in the entire image processing system will be described.
FIG. 3 is an operation sequence diagram in the image processing system.
First, the control unit 21 of the information processing device 3 as the memory management unit 25 refers to the buffer reference table 24 to determine a reception buffer to which image data is to be transferred next from the DMA transfer device 2 (step S11, S15, S19). The control unit 21 determines a reception buffer to which image data is to be transferred next from the DMA transfer device 2 so that the image data is sequentially written to the plurality of reception buffers.

たとえば、図2に示すように2つの受信バッファが設定されている場合、制御部21は、2つの受信バッファに対して交互に画像データが書き込まれるように、DMA転送装置2から次に画像データが転送されるべき受信バッファを決定する。
画像データを受信する受信バッファを決定すると、制御部21は、決定した受信バッファを示す情報として外部メモリ22における先頭アドレス(転送アドレス)をDMA転送装置2へ通知する(ステップS12、S16、S20)。
For example, when two reception buffers are set as shown in FIG. 2, the control unit 21 next transfers the image data from the DMA transfer device 2 so that the image data is alternately written into the two reception buffers. Determines the receive buffer to be transferred.
When the reception buffer for receiving the image data is determined, the control unit 21 notifies the DMA transfer apparatus 2 of the start address (transfer address) in the external memory 22 as information indicating the determined reception buffer (steps S12, S16, and S20). .

DMA転送装置2は、情報処理装置3から通知された受信バッファを示す情報を制御部11の転送アドレステーブル11aに保存する。この状態において、DMA転送装置2のバッファメモリ12には、カメラ1が撮影した画像データが書き込まれる(ステップS13、S17、S21)。カメラ1からの画像データがバッファメモリ12に書き込まれると、DMA転送装置2の制御部11は、転送アドレステーブル11aで指定される情報処理装置3内の外部メモリ22における転送アドレスにバッファメモリ12に書き込まれた画像データを直接的に書き込む画像転送処理を行う(ステップS14、S18、S22)。   The DMA transfer device 2 stores information indicating the reception buffer notified from the information processing device 3 in the transfer address table 11 a of the control unit 11. In this state, image data captured by the camera 1 is written in the buffer memory 12 of the DMA transfer apparatus 2 (steps S13, S17, and S21). When the image data from the camera 1 is written into the buffer memory 12, the control unit 11 of the DMA transfer device 2 stores the transfer address in the external memory 22 in the information processing device 3 specified by the transfer address table 11a in the buffer memory 12. An image transfer process for directly writing the written image data is performed (steps S14, S18, S22).

DMA転送装置2と情報処理装置3(のメモリ管理部25)とは、上記ステップS11〜S14の処理を繰り返し実行する。これにより、カメラ1が撮影した画像データは、情報処理装置3の複数の受信バッファに順番に書き込まれる。   The DMA transfer device 2 and the information processing device 3 (its memory management unit 25) repeatedly execute the processes of steps S11 to S14. Thereby, the image data photographed by the camera 1 is sequentially written in the plurality of reception buffers of the information processing device 3.

また、情報処理装置3では、任意のタイミングで、画像処理部23が制御部21に対して処理対象とする画像データを要求する(ステップS23)。画像処理部23から画像要求を受信した場合、制御部21は、処理対象とする画像データを記憶している受信バッファを決定する。処理対象とする画像データを記憶している受信バッファを決定すると、制御部21は、処理対象の画像データを保持する受信バッファと現在の保持バッファとを入れ替える(ステップS24、S25)。すなわち、制御部21は、バッファ参照テーブル24において、処理対象の画像データを保持する受信バッファのアドレスと保持バッファのアドレスとを交換する。処理対象の画像データを保持する受信バッファと保持バッファとを入れ替えると、制御部21は、保持バッファに変更された領域に記憶している画像データを処理対象の画像データとして画像処理部23へ通知する(S26)。   In the information processing apparatus 3, the image processing unit 23 requests image data to be processed from the control unit 21 at an arbitrary timing (step S23). When an image request is received from the image processing unit 23, the control unit 21 determines a reception buffer that stores image data to be processed. When the reception buffer storing the image data to be processed is determined, the control unit 21 switches the reception buffer that holds the image data to be processed and the current holding buffer (steps S24 and S25). That is, the control unit 21 exchanges the address of the reception buffer that holds the image data to be processed and the address of the holding buffer in the buffer reference table 24. When the reception buffer holding the processing target image data and the holding buffer are switched, the control unit 21 notifies the image processing unit 23 of the image data stored in the area changed to the holding buffer as the processing target image data. (S26).

たとえば、図2に示す例において、第1受信バッファに設定されている先頭アドレス「a」の領域RAに記憶した画像データを画像処理の処理対象とする場合、制御部21は、テーブル24において、保持バッファの先頭アドレスを「a」に書き換え、第1受信バッファの先頭アドレスを「c」に書き換える。これにより。画像データを物理的にコピーすることなく、第1受信バッファと保持バッファとを論理的に入れ替えることができ、受信バッファで受信した画像データを高速に画像処理部23へ提供できる。   For example, in the example shown in FIG. 2, when the image data stored in the area RA of the head address “a” set in the first reception buffer is the processing target of the image processing, the control unit 21 The start address of the holding buffer is rewritten to “a”, and the start address of the first reception buffer is rewritten to “c”. By this. The first reception buffer and the holding buffer can be logically switched without physically copying the image data, and the image data received by the reception buffer can be provided to the image processing unit 23 at high speed.

また、第1受信バッファと保持バッファとの入れ替えによりバッファ参照テーブル24を更新した後、制御部21は、上記ステップS11〜S14の処理と同様に、テーブル24を参照して受信バッファの領域を決定し(S27、S31)、決定した受信バッファの先頭アドレス(転送アドレス)をDMA転送装置2へ通知する(S28、S32)。DMA転送装置2は、通知された転送アドレスを設定し、カメラ1からの画像データをバッファメモリ12で受信し(S29、S33)、バッファメモリ12に格納した画像データを設定した転送アドレスへ転送する(S30、S34)。   Further, after updating the buffer reference table 24 by exchanging the first reception buffer and the holding buffer, the control unit 21 determines the area of the reception buffer with reference to the table 24 in the same manner as the processing in steps S11 to S14. Then, the start address (transfer address) of the determined reception buffer is notified to the DMA transfer apparatus 2 (S28, S32). The DMA transfer device 2 sets the notified transfer address, receives the image data from the camera 1 by the buffer memory 12 (S29, S33), and transfers the image data stored in the buffer memory 12 to the set transfer address. (S30, S34).

次に、図3に示す処理の流れを具体例を挙げて説明する。
図4は、図3に示す処理によるバッファ参照テーブル24の遷移状態の例を示す図である。
たとえば、図3に示す例において、情報処理装置3の制御部21は、まず、バッファ参照テーブル24を参照して受信バッファを領域RAに決定するものとする(ステップS11)。すると、制御部21は、転送アドレスとして領域RAの先頭アドレス「a」をDMA転送装置2へ通知する(ステップS12)。DMA転送装置2は、通知された転送アドレス「a」を設定し、カメラ1からの第1の画像データをバッファメモリ12で受信し(ステップS13)、バッファメモリ12に格納した第1の画像データを転送アドレス「a」へ転送する(ステップS14)。
Next, the flow of processing shown in FIG. 3 will be described with a specific example.
FIG. 4 is a diagram illustrating an example of the transition state of the buffer reference table 24 by the processing illustrated in FIG.
For example, in the example illustrated in FIG. 3, the control unit 21 of the information processing device 3 first determines the reception buffer as the area RA with reference to the buffer reference table 24 (step S11). Then, the control unit 21 notifies the DMA transfer apparatus 2 of the leading address “a” of the area RA as a transfer address (step S12). The DMA transfer device 2 sets the notified transfer address “a”, receives the first image data from the camera 1 by the buffer memory 12 (step S13), and stores the first image data stored in the buffer memory 12 Is transferred to the transfer address “a” (step S14).

次に、情報処理装置3の制御部21は、バッファ参照テーブル24を参照して領域RAの次に画像データを受信する受信バッファを領域RBに決定し(ステップS15)、転送アドレスとして領域RBの先頭アドレス「b」をDMA転送装置2へ通知する(ステップS16)。DMA転送装置2は、情報処理装置3から通知された転送アドレス「b」を設定し、カメラ1からの第2の画像データをバッファメモリ12で受信し(ステップS17)、バッファメモリ12に格納した第2の画像データを転送アドレス「b」へ転送する(ステップS18)。   Next, the control unit 21 of the information processing device 3 refers to the buffer reference table 24 to determine the reception buffer that receives the image data next to the area RA as the area RB (step S15), and uses the area RB as a transfer address. The start address “b” is notified to the DMA transfer apparatus 2 (step S16). The DMA transfer device 2 sets the transfer address “b” notified from the information processing device 3, receives the second image data from the camera 1 by the buffer memory 12 (step S 17), and stores it in the buffer memory 12. The second image data is transferred to the transfer address “b” (step S18).

次に、情報処理装置3の制御部21は、バッファ参照テーブル24を参照して、領域RBの次に画像データを受信する受信バッファを領域RAに決定し(ステップS19)、転送アドレスとして領域RAの先頭アドレス「a」をDMA転送装置2へ通知する(ステップS20)。DMA転送装置2は、情報処理装置3から通知された転送アドレス「a」を設定し、カメラ1からの第3の画像データをバッファメモリ12で受信し(ステップS21)、バッファメモリ12に格納した第3の画像データを転送アドレス「b」へ転送する(ステップS22)。   Next, the control unit 21 of the information processing device 3 refers to the buffer reference table 24 to determine a reception buffer for receiving image data next to the region RB as the region RA (step S19), and uses the region RA as a transfer address. Is notified to the DMA transfer apparatus 2 (step S20). The DMA transfer device 2 sets the transfer address “a” notified from the information processing device 3, receives the third image data from the camera 1 by the buffer memory 12 (step S 21), and stores it in the buffer memory 12. The third image data is transferred to the transfer address “b” (step S22).

上記ステップS11〜S22の処理によれば、図4の(1)に示すように、バッファ参照テーブル24の状態が遷移する。すなわち、2つの受信バッファを設定する場合、情報処理装置3の制御部21は、2つの受信バッファにはDMA転送装置2から交互に画像データが書き込まれるようにメモリを管理する。   According to the processing in steps S11 to S22, the state of the buffer reference table 24 changes as shown in (1) of FIG. That is, when two reception buffers are set, the control unit 21 of the information processing device 3 manages the memory so that image data is alternately written from the DMA transfer device 2 to the two reception buffers.

さらに、情報処理装置3の制御部21は、画像処理部23から画像取得要求を受信した場合(ステップS23)、バッファ参照テーブル24を参照して、処理対象となる画像データを記憶している受信バッファを領域RAに決定する。処理対象となる画像データを記憶している受信バッファが先頭アドレス「a」の領域RAであると判断した場合、制御部21は、バッファ参照テーブル24において、処理対象の画像データを保持している受信バッファの先頭アドレス「a」と保持バッファの先頭アドレス「c」とを交換する(ステップS24、S25)。受信バッファと保持バッファとを入れ替えると、制御部21は、保持バッファに変更した領域RAに記憶した画像データを処理対象の画像データとして画像処理部23へ通知する(ステップS26)。   Further, when receiving an image acquisition request from the image processing unit 23 (step S23), the control unit 21 of the information processing device 3 refers to the buffer reference table 24 and stores image data to be processed. The buffer is determined as the area RA. When it is determined that the reception buffer storing the image data to be processed is the area RA having the head address “a”, the control unit 21 holds the image data to be processed in the buffer reference table 24. The start address “a” of the reception buffer and the start address “c” of the holding buffer are exchanged (steps S24 and S25). When the reception buffer and the holding buffer are switched, the control unit 21 notifies the image processing unit 23 of the image data stored in the area RA changed to the holding buffer as the image data to be processed (step S26).

すなわち、制御部21は、画像処理部23からの画像要求に応じて、処理対象の画像データを保持した先頭アドレス「a」の領域RAを保持バッファに設定変更し(ステップS24)、先頭アドレス「c」の領域RCを受信バッファに設定変更する(ステップS25)。上記ステップS24〜25の処理によれば、図4の(2)に示すように、バッファ参照テーブル24の状態が遷移する。すなわち、受信バッファであった領域RAを保持バッファに変更し、保持バッファであった領域RCを受信バッファに変更する(入替える)ようにメモリを管理する。   That is, in response to an image request from the image processing unit 23, the control unit 21 changes the setting of the area RA of the head address “a” that holds the image data to be processed in the holding buffer (step S 24). The setting of the area RC of “c” is changed to the reception buffer (step S25). According to the processing in steps S24 to S25, the state of the buffer reference table 24 changes as shown in (2) of FIG. That is, the memory is managed so that the area RA that has been a reception buffer is changed to a holding buffer, and the area RC that has been a holding buffer is changed (replaced) to a reception buffer.

また、バッファ参照テーブル24を更新した後(受信バッファと保持バッファとを入れ替えた後)、情報処理装置3の制御部21は、バッファ参照テーブル24を参照して、次に画像データを受信する受信バッファを先頭アドレスが「b」の領域RBに決定し(ステップS27)、転送アドレスとして領域RBの先頭アドレス「b」をDMA転送装置2へ通知する(ステップS28)。DMA転送装置2は、情報処理装置3から通知された転送アドレス「b」を設定し、カメラ1からの第4の画像データをバッファメモリ12で受信し(ステップS29)、バッファメモリ12に格納した第4の画像データを転送アドレス「b」へ転送する(ステップS30)。   In addition, after updating the buffer reference table 24 (after switching the reception buffer and the holding buffer), the control unit 21 of the information processing device 3 refers to the buffer reference table 24 and receives the next image data. The buffer is determined as the area RB having the head address “b” (step S27), and the head address “b” of the area RB is notified to the DMA transfer apparatus 2 as the transfer address (step S28). The DMA transfer device 2 sets the transfer address “b” notified from the information processing device 3, receives the fourth image data from the camera 1 by the buffer memory 12 (step S 29), and stores it in the buffer memory 12. The fourth image data is transferred to the transfer address “b” (step S30).

次に、情報処理装置3の制御部21は、バッファ参照テーブル24を参照して、領域RBの次に画像データを受信する受信バッファを領域RCに決定し(ステップS31)、転送アドレスとして領域RCの先頭アドレス「c」をDMA転送装置2へ通知する(ステップS32)。DMA転送装置2は、情報処理装置3から通知された転送アドレス「c」を設定し、カメラ1からの第5の画像データをバッファメモリ12で受信し(ステップS33)、バッファメモリ12に格納した第5の画像データを転送アドレス「c」へ転送する(ステップS34)。   Next, the control unit 21 of the information processing device 3 refers to the buffer reference table 24 to determine the reception buffer that receives the image data next to the region RB as the region RC (step S31), and uses the region RC as a transfer address. Is notified to the DMA transfer apparatus 2 (step S32). The DMA transfer device 2 sets the transfer address “c” notified from the information processing device 3, receives the fifth image data from the camera 1 by the buffer memory 12 (step S33), and stores it in the buffer memory 12 The fifth image data is transferred to the transfer address “c” (step S34).

上記ステップS27〜S34の処理によれば、受信バッファと保持バッファとを入れ替えた後のバッファ参照テーブル24は、図4の(3)に示すように、状態が遷移する。すなわち、情報処理装置3の制御部21は、受信バッファと保持バッファとを入れ替えた後も、2つの受信バッファにDMA転送装置2から交互に画像データが書き込まれるようにメモリを管理する。   According to the processing in steps S27 to S34, the state of the buffer reference table 24 after the reception buffer and the holding buffer are exchanged changes as shown in (3) of FIG. That is, the control unit 21 of the information processing device 3 manages the memory so that the image data is alternately written from the DMA transfer device 2 to the two reception buffers even after the reception buffer and the holding buffer are switched.

上記のような処理によれば、DMA転送装置が情報処理装置内のメモリに画像を連続して書き込む画像処理システムにおいて、情報処理装置の画像処理部が画像データにアクセスする場合、処理対象とする画像データの物理的なコピー処理を行わず、仮想的に受信(転送)バッファと保持バッファとのアドレスを交換し、画像データを保持するようにしたものである。これにより、情報処理装置は、画像処理部が処理対象とする画像データの物理的なコピー処理を行わずに当該画像データを保持でき、その結果として処理を高速化することができる。   According to the above processing, in the image processing system in which the DMA transfer device continuously writes images to the memory in the information processing device, when the image processing unit of the information processing device accesses the image data, it is a processing target. Image data is held by virtually exchanging addresses between the reception (transfer) buffer and the holding buffer without performing physical copy processing of the image data. Thereby, the information processing apparatus can hold the image data without performing physical copy processing of the image data to be processed by the image processing unit, and as a result, the processing speed can be increased.

次に、情報処理装置3におけるメモリ管理処理について説明する。
DMA転送装置2からの画像転送を許可する場合、メモリ管理部25としての情報処理装置3の制御部21は、バッファ参照テーブル24を参照して、次に画像データが転送されるべき受信バッファを決定し、当該受信バッファのアドレスを示す情報として転送アドレスをDMA転送装置2へ通知する。(ステップS51)。DMA転送装置2は、情報処理装置から通知された転送アドレスに対してカメラ1から取得した画像データを書き込む。DMA転送装置2からの画像データの転送(書込み)がなかった場合(ステップS52,NO)、ステップS52へ戻る。
Next, a memory management process in the information processing apparatus 3 will be described.
When the image transfer from the DMA transfer device 2 is permitted, the control unit 21 of the information processing device 3 as the memory management unit 25 refers to the buffer reference table 24 and determines a reception buffer to which image data is to be transferred next. The transfer address is notified to the DMA transfer apparatus 2 as information indicating the address of the reception buffer. (Step S51). The DMA transfer device 2 writes the image data acquired from the camera 1 to the transfer address notified from the information processing device. If there is no transfer (writing) of image data from the DMA transfer device 2 (step S52, NO), the process returns to step S52.

また、画像処理部23から画像取得要求を受けた場合(ステップS53、YES)、制御部21は、画像処理の対象とする画像データを記憶している受信バッファを決定し、当該受信バッファのアドレスを保持バッファのアドレスに更新する(ステップS54)。これとともに、制御部21は、受信バッファを保持バッファに変更する前の保持バッファのアドレスを受信バッファのアドレスに更新する(ステップS55)。   When an image acquisition request is received from the image processing unit 23 (step S53, YES), the control unit 21 determines a reception buffer that stores image data to be subjected to image processing, and the address of the reception buffer. Is updated to the address of the holding buffer (step S54). At the same time, the control unit 21 updates the address of the holding buffer before changing the receiving buffer to the holding buffer with the address of the receiving buffer (step S55).

すなわち、制御部21は、画像処理部23から画像取得要求を受けた場合(ステップS53、YES)、バッファ参照テーブル24において、処理対象の画像データを記憶している受信バッファのアドレスと保持バッファのアドレスとを入れ替える。受信バッファと保持バッファとを入れ替えた後、制御部21は、上記ステップS51へ戻り、新たに設定された受信バッファを順番に使用してDMA転送装置2からの画像データの転送(書込み)を受け入れる。   That is, when the control unit 21 receives an image acquisition request from the image processing unit 23 (step S53, YES), in the buffer reference table 24, the address of the reception buffer storing the image data to be processed and the holding buffer Swap addresses. After switching the reception buffer and the holding buffer, the control unit 21 returns to step S51 and accepts transfer (writing) of image data from the DMA transfer apparatus 2 using the newly set reception buffer in order. .

上記のようなメモリ管理処理によれば、画像処理の対象とする画像データを記憶している受信バッファは、物理的な画像コピー処理を行わすに、論理的に保持バッファに変更でき、保持バッファに指定されていたバッファ領域は、論理的に受信バッファに変更できる。この結果として、情報処理装置3では、画像処理などの処理を高速化できる。   According to the memory management process as described above, the reception buffer storing the image data to be subjected to image processing can be logically changed to a holding buffer to perform a physical image copy process. Can be logically changed to a receive buffer. As a result, the information processing apparatus 3 can speed up processing such as image processing.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

RA…バッファ領域、RB…バッファ領域、RC…バッファ領域、1…カメラ、2…DMA転送装置、3…情報処理装置、11…制御部、11a…転送アドレステーブル、12…バッファメモリ、21…制御部、22…外部メモリ、23…画像処理部、24…バッファ参照テーブル、25…メモリ管理部。   RA ... buffer area, RB ... buffer area, RC ... buffer area, 1 ... camera, 2 ... DMA transfer device, 3 ... information processing device, 11 ... control unit, 11a ... transfer address table, 12 ... buffer memory, 21 ... control , 22 ... external memory, 23 ... image processing unit, 24 ... buffer reference table, 25 ... memory management unit.

Claims (5)

複数の画像データを保持する複数のバッファ領域を有するメモリと、
複数のバッファ領域を画像データが書き込まれる受信バッファと画像データを保持する保持バッファとに割り当てるテーブルと、
前記受信バッファに書き込まれた画像データを保持する場合、前記保持すべき画像データが書き込まれた受信バッファと保持バッファとを入れ替える変更手段と、
前記変更手段により受信バッファと保持バッファとを入れ替えた場合、変更後の受信バッファを示す情報を画像転送元へ通知する通知手段と、
を具備することを特徴とする情報処理装置。
A memory having a plurality of buffer areas for holding a plurality of image data;
A table for allocating a plurality of buffer areas to a reception buffer to which image data is written and a holding buffer to hold image data;
When holding the image data written in the reception buffer, changing means for replacing the reception buffer and the holding buffer in which the image data to be held is written;
A notification means for notifying the image transfer source of information indicating the changed reception buffer when the reception buffer and the holding buffer are switched by the changing means;
An information processing apparatus comprising:
保持バッファに保持した画像データに画像処理を施す画像処理部を有し、
前記変更手段は、前記画像処理部が前記受信バッファに書き込まれた画像データを処理対象とする場合、前記処理対象とする画像データが書き込まれた受信バッファと保持バッファとを入れ替える、
ことを特徴とする前記請求項1に記載の情報処理装置。
An image processing unit that performs image processing on the image data held in the holding buffer;
When the image processing unit sets the image data written in the reception buffer as a processing target, the changing unit switches the reception buffer and the holding buffer in which the image data to be processed is written,
The information processing apparatus according to claim 1, wherein:
前記テーブルは、前記受信バッファのアドレスと前記保持バッファのアドレスを保持し、
前記変更手段は、前記テーブルにおいて前記処理対象の画像データを記憶した受信バッファのアドレスと保持バッファのアドレスとを入れ替える、
ことを特徴とする前記請求項1又は2の何れかに記載の情報処理装置。
The table holds the address of the reception buffer and the address of the holding buffer,
The changing means replaces the address of the reception buffer that stores the image data to be processed and the address of the holding buffer in the table.
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
前記受信バッファは、前記画像転送元としてのDMA転送装置により画像データが書き込まれるバッファ領域である、
ことを特徴とする前記請求項1乃至3の何れか1項に記載の情報処理装置。
The reception buffer is a buffer area in which image data is written by a DMA transfer device as the image transfer source.
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
複数のバッファ領域を有するメモリに用いられるメモリ管理方法であって、
複数のバッファ領域を画像データが書き込まれる受信バッファと画像データを保持する保持バッファとに割り当て、
前記受信バッファに書き込まれた画像データを保持する場合、前記保持すべき画像データが書き込まれた受信バッファと保持バッファとを入れ替え、
前記受信バッファと前記保持バッファとを入れ替えた場合、変更後の受信バッファを示す情報を画像転送元へ通知する、
ことを特徴とするメモリ管理方法。
A memory management method used for a memory having a plurality of buffer areas,
A plurality of buffer areas are allocated to a reception buffer to which image data is written and a holding buffer to hold image data.
When holding the image data written in the reception buffer, replace the reception buffer and the holding buffer in which the image data to be held is written,
When the reception buffer and the holding buffer are switched, information indicating the changed reception buffer is notified to the image transfer source.
And a memory management method.
JP2011206166A 2011-09-21 2011-09-21 Information processor and memory management method Pending JP2013069056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011206166A JP2013069056A (en) 2011-09-21 2011-09-21 Information processor and memory management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011206166A JP2013069056A (en) 2011-09-21 2011-09-21 Information processor and memory management method

Publications (1)

Publication Number Publication Date
JP2013069056A true JP2013069056A (en) 2013-04-18

Family

ID=48474716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011206166A Pending JP2013069056A (en) 2011-09-21 2011-09-21 Information processor and memory management method

Country Status (1)

Country Link
JP (1) JP2013069056A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020169963A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and image inspection method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09277617A (en) * 1996-04-10 1997-10-28 Fujitsu Ltd Data processing method of printer and device thereof
JP2000172456A (en) * 1998-09-29 2000-06-23 Seiko Epson Corp Print system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09277617A (en) * 1996-04-10 1997-10-28 Fujitsu Ltd Data processing method of printer and device thereof
JP2000172456A (en) * 1998-09-29 2000-06-23 Seiko Epson Corp Print system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020169963A (en) * 2019-04-05 2020-10-15 株式会社キーエンス Image inspection system and image inspection method
JP7306858B2 (en) 2019-04-05 2023-07-11 株式会社キーエンス Image inspection system and image inspection method

Similar Documents

Publication Publication Date Title
JP5411530B2 (en) Parallel processor system
US10534714B2 (en) Allocating cache memory on a per data object basis
JP5769093B2 (en) Direct memory access controller, method and computer program
JP2014059874A (en) Method and device for processing consecutively photographed image data
US20110231599A1 (en) Storage apparatus and storage system
JP2018190277A (en) Memory access controller and control method thereof
JP2016181058A (en) Semiconductor memory device
JP2007034392A (en) Information processor and data processing method
JP2019046238A (en) Memory system
JP2009020555A (en) Swapping device
JP5209535B2 (en) USB host controller and control method of USB host controller
JP2013069056A (en) Information processor and memory management method
US9015385B2 (en) Data storage device and method of controlling data storage device
EP3046035A1 (en) Request response method and device based on a node controller
JP2014179066A (en) Storage control device, storage system, and storage control method
JP2014219941A (en) Image data processing apparatus, image processing apparatus, and image data transfer method
JP2016100846A (en) Control system, its controller, and display device
JP2019020989A (en) Recording apparatus
JP6380084B2 (en) Information processing apparatus and information processing program
JP2007172250A (en) Image memory management device, image memory management method, and program
JP2014225089A (en) Arithmetic unit
US20180253378A1 (en) Data access control apparatus
JP2022125786A (en) Information processing device, information processing program, and information processing method
JP2017111484A (en) Store merge device, information processing device, store control method, and computer program
JP6320652B2 (en) Data processing apparatus, data processing method, and data processing program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131212

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131226

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140307

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141202

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150407