JP2021026303A - Data transfer unit - Google Patents

Data transfer unit Download PDF

Info

Publication number
JP2021026303A
JP2021026303A JP2019141359A JP2019141359A JP2021026303A JP 2021026303 A JP2021026303 A JP 2021026303A JP 2019141359 A JP2019141359 A JP 2019141359A JP 2019141359 A JP2019141359 A JP 2019141359A JP 2021026303 A JP2021026303 A JP 2021026303A
Authority
JP
Japan
Prior art keywords
access
sram
swap
modules
control
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
JP2019141359A
Other languages
Japanese (ja)
Inventor
智之 川本
Tomoyuki Kawamoto
智之 川本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019141359A priority Critical patent/JP2021026303A/en
Publication of JP2021026303A publication Critical patent/JP2021026303A/en
Pending legal-status Critical Current

Links

Images

Abstract

To solve the problem that a module stall occurs because of competition of memory access and hence a processing speed decreases in a system in which a memory is shared by plural modules for performing double buffering control.SOLUTION: When competition of memory access occurs and when the other SRAM used for double buffering can be accessed, a stall is avoided by performing swap control for switching an access destination.SELECTED DRAWING: Figure 3

Description

本発明は、複数のモジュールでメモリを共有するシステムに関する。 The present invention relates to a system in which a plurality of modules share a memory.

プリンタや複合機では高画質な画像印刷を実現するため、印刷画像に対して様々な画像処理が行われる。例えば、撮影時に発生したノイズの除去や、エッジを際立たせるためのフィルタ処理、カメラで撮ったRGB画像をプリンタで印刷できるようCMYK画像に変換する色空間変換処理、プリンタやスキャナデバイスの特性に合わせたガンマ補正処理等がある。これらの画像処理は高速に処理できるよう、汎用的な演算回路であるCPUではなく、画像処理専用の回路を用いて高速に処理するよう構成される。 In order to realize high-quality image printing in a printer or a multifunction device, various image processings are performed on the printed image. For example, removal of noise generated during shooting, filter processing to make edges stand out, color space conversion processing to convert RGB images taken by a camera into CMYK images so that they can be printed by a printer, according to the characteristics of a printer or scanner device. There is also gamma correction processing. These image processes are configured to be processed at high speed by using a circuit dedicated to image processing instead of a CPU, which is a general-purpose arithmetic circuit, so that these image processes can be processed at high speed.

しかし、これらの画像処理の対象となる画像データは1ページ数百MBと大量のデータを扱うことから、画像処理回路の内部メモリで保持するのは難しくなってきている。そこで、画像データは外部のDRAMに格納しておき、画像処理回路で必要なデータを少しずつ取り出し、画像全体に処理を施していくといった構成が一般的となっている。このような画像処理回路において、フィルタ処理や色空間変換処理を行う画像処理モジュールそれぞれに、画像データの一部を格納するSRAMを搭載すると、流用時の画像サイズ変更などにより、モジュールの作り直しが発生してしまう場合があった。そこで、特許文献1のようにスペック変更によるモジュールの作り直しや、個別にSRAMを搭載することによる回路面積の増加を抑えるため、複数のモジュールでSRAMを共有させる構成が提案されている。 However, since the image data to be processed by these images handles a large amount of data of several hundred MB per page, it is becoming difficult to hold the image data in the internal memory of the image processing circuit. Therefore, it is common to store the image data in an external DRAM, take out the data required by the image processing circuit little by little, and process the entire image. In such an image processing circuit, if an SRAM that stores a part of image data is installed in each image processing module that performs filter processing and color space conversion processing, the module may be recreated due to an image size change at the time of diversion. There was a case that I did. Therefore, as in Patent Document 1, in order to suppress the increase in the circuit area due to the re-creation of the module due to the specification change and the mounting of the SRAM individually, a configuration in which the SRAM is shared by a plurality of modules has been proposed.

特許第5338008号Patent No. 5338008

しかし、SRAMを複数のモジュールで共有する構成では、各モジュールからSRAMに対して同時にアクセスがなされるアクセス競合が発生する場合がある。この競合によってメモリアクセスの許可が得られなかったモジュールはメモリアクセスが待たされ、処理時間が伸びてしまう可能性があった。 However, in a configuration in which the SRAM is shared by a plurality of modules, access contention may occur in which the SRAM is accessed from each module at the same time. Modules for which memory access permission was not obtained due to this conflict waited for memory access, which could increase processing time.

本発明は、このような事情を鑑みてなされたもので、複数のモジュールでSRAMを共有する構成において、SRAMに対するアクセス競合が起きた場合においても、ストールの発生を抑えるデータ転送装置を提供することを目的としている。 The present invention has been made in view of such circumstances, and provides a data transfer device that suppresses the occurrence of stall even when an access conflict with the SRAM occurs in a configuration in which the SRAM is shared by a plurality of modules. It is an object.

本発明のデータ転送装置においては、ダブルバッファリング制御を行う複数のモジュールと、前記複数のモジュールで共有する複数のSRAMと、前記複数のモジュールから前記SRAMへのアクセスを調停する調停手段を備え、前記調停手段は前記SRAMのうち1つのSRAMに対して、前記複数のモジュールから同時にアクセスが発生した際、前記複数のモジュールからアクセスされているSRAMとは別のSRAMに対するアクセスが発生しておらず、書き込み可能な領域がある場合は、前記1つのSRAMへアクセスしている複数のモジュールのうち、一部のモジュールのアクセス先を前記別のSRAMに切り替えるよう制御することを特徴としている。 The data transfer device of the present invention includes a plurality of modules that perform double buffering control, a plurality of SRAMs shared by the plurality of modules, and an arbitration means for arbitrating access to the SRAM from the plurality of modules. When the arbitration means simultaneously accesses one of the SRAMs from the plurality of modules, the arbitration means does not access an SRAM different from the SRAM accessed from the plurality of modules. When there is a writable area, it is characterized in that the access destination of a part of the plurality of modules accessing the one SRAM is controlled to be switched to the other SRAM.

共有SRAMへのアクセス競合が起きた際、アクセス先のSRAMを切り替えることにより、メモリアクセスのストールを低減し、処理速度の低下を抑えることができる。 When an access conflict with the shared SRAM occurs, the memory access stall can be reduced and the decrease in processing speed can be suppressed by switching the access destination SRAM.

実施形態における複合機の構成例を示すブロック図である。It is a block diagram which shows the structural example of the multifunction device in Embodiment. 演算部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the arithmetic unit. バッファの構成例を示すブロック図である。It is a block diagram which shows the configuration example of a buffer. ダブルバッファリング制御の動作を説明する図である。It is a figure explaining the operation of the double buffering control. 第1の実施形態における調停部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the arbitration part in 1st Embodiment. 第1の実施形態におけるスワップ制御部の制御シーケンスを示すブロック図である。It is a block diagram which shows the control sequence of the swap control part in 1st Embodiment. スワップ制御の動作を説明する図である。It is a figure explaining the operation of swap control. 第2の実施形態におけるスワップ制御部の制御シーケンスを示すブロック図である。It is a block diagram which shows the control sequence of the swap control part in 2nd Embodiment. 第2の実施形態におけるスワップ制御の動作を説明する図である。It is a figure explaining the operation of the swap control in the 2nd Embodiment. 第3の実施形態におけるスワップ制御部の制御シーケンスを示すブロック図である。It is a block diagram which shows the control sequence of the swap control part in 3rd Embodiment. アクセス競合時の動作を説明する図である。It is a figure explaining the operation at the time of access conflict.

本発明の実施形態を以下で図を参照しながら説明する。 Embodiments of the present invention will be described below with reference to the figures.

<第1の実施形態>
図1は、複合機の一構成例を示すブロック図である。図1の複合機100は、制御部110、スキャナ120、プリンタ130から構成される。
<First Embodiment>
FIG. 1 is a block diagram showing a configuration example of a multifunction device. The multifunction device 100 of FIG. 1 is composed of a control unit 110, a scanner 120, and a printer 130.

スキャナ120は原稿を読み取り、画像データに変換する光学装置である。具体的には、原稿に光を照射し、その反射光を受光した撮像素子がアナログデータを生成し、A/D変換することで画像データを得る。 The scanner 120 is an optical device that reads a document and converts it into image data. Specifically, an image sensor that irradiates a document with light and receives the reflected light generates analog data and performs A / D conversion to obtain image data.

プリンタ130は印刷画像データに従い、用紙に対してインクを吐出することで、用紙上に画像を形成する印刷装置である。勿論このようなインクジェット方式に限る物ではなく、電子写真方式やその他の印刷方式を用いても良い。 The printer 130 is a printing device that forms an image on paper by ejecting ink onto the paper according to print image data. Of course, the method is not limited to such an inkjet method, and an electrophotographic method or other printing method may be used.

制御部110はスキャナ120やプリンタ130に対する動作の指示や、画像の転送、画像処理を行う制御装置である。この制御部110はCPU111、メモリコントローラ112、DRAM113、スキャナI/F114、プリンタI/F115、演算部116から構成され、それぞれバス117を介して接続される。 The control unit 110 is a control device that gives an operation instruction to the scanner 120 and the printer 130, transfers an image, and performs image processing. The control unit 110 is composed of a CPU 111, a memory controller 112, a DRAM 113, a scanner I / F 114, a printer I / F 115, and a calculation unit 116, and each of them is connected via a bus 117.

CPU111は複合機100を制御するプロセッサである。 The CPU 111 is a processor that controls the multifunction device 100.

バス117は各装置間でデータを転送する際に用いられるバスである。バス117上では同時に複数のデータを転送する事が出来ないため、バス117上でどのデータを転送するかはメモリコントローラ112で制御される。 Bus 117 is a bus used when transferring data between devices. Since a plurality of data cannot be transferred on the bus 117 at the same time, which data is transferred on the bus 117 is controlled by the memory controller 112.

メモリコントローラ112はバス117上で行うデータ転送のリクエストを管理するコントローラである。各装置から送られたリクエストを受信し、順に実行して行く。同時に複数の装置からリクエストを受信した際は優先順位の高いリクエストから実行する。 The memory controller 112 is a controller that manages data transfer requests made on the bus 117. Receives the requests sent from each device and executes them in order. When requests are received from multiple devices at the same time, the request with the highest priority is executed first.

DRAM113は本システム上の主記憶装置である。スキャンや印刷に用いる画像データが記録される。 The DRAM 113 is the main storage device on this system. Image data used for scanning and printing is recorded.

演算部116はスキャン画像や印刷画像に対して画像処理を行う装置である。スキャナ120によって読み取った画像データに対しては、光学素子の特性によってずれてしまった色調を自然な色に修正するγ補正や、文字の輪郭をはっきりさせるためのエッジ強調等が行われる。印刷対象の画像データに対しては、印刷可能なCMYK色空間に変換する色空間変換や、インクで表現する際に適切な階調となる様にγ変換等が行われる。 The calculation unit 116 is a device that performs image processing on a scanned image or a printed image. For the image data read by the scanner 120, γ correction for correcting the color tone shifted due to the characteristics of the optical element to a natural color, edge enhancement for clarifying the outline of characters, and the like are performed. The image data to be printed is subjected to color space conversion that converts it into a printable CMYK color space, γ conversion, etc. so that the gradation becomes appropriate when expressed with ink.

次に、本システムの動作例として、コピー処理を行う際の動作について説明する。ユーザーの操作によってコピー処理が指示されたら、CPU111はコピー処理のプログラム実行を開始する。まず、CPU111はスキャナI/F114を通してスキャナ120を起動し、スキャン処理を開始する。スキャナI/F114はスキャナ120で読み取った画像データをDRAM113に書き込むようメモリコントローラ112に対して転送リクエストを発行する。数ライン分のスキャンデータがDRAM113に書き込まれると、スキャナI/F114はCPU111に対して割り込みを送信する。CPU111はこれを受けてスキャン画像に対する処理を実行するために、演算部116を起動する。演算部116はDRAM113からスキャンされた画像データを読み出し、スキャン画像処理を行い、処理後の画像データをDRAM113に書き戻す。演算部116が処理したデータを全てDRAM113に書き戻したらCPU111に対して割り込みを送信する。CPU111はスキャン画像処理の完了を受けて、印刷処理に向けた制御を開始する。まず、CPU111は印刷用画像データの生成を行うために、再度演算部116を起動する。演算部116はスキャン画像処理が施された画像データをDRAM113から読み出し、読み出した画像データに対してプリント画像処理を行い、処理後の画像データをDRAM113に書き戻す。ここでもスキャン処理と同様に演算部116が処理したデータを全てDRAM113に書き戻したらCPU111に対して割り込みを送信する。CPU111はこれを受けて、印刷を行うためにプリンタI/F115を通してプリンタ130を起動する。プリンタI/F115はDRAM113上のプリント画像処理が施された画像データを読み出し、プリンタ130に送信する事で用紙に対する印刷を行う。以上の処理を原稿全体に対して繰り返し行うことで、コピー処理を完了する。 Next, as an operation example of this system, the operation when performing copy processing will be described. When the copy process is instructed by the user's operation, the CPU 111 starts executing the copy process program. First, the CPU 111 activates the scanner 120 through the scanner I / F 114 and starts the scanning process. The scanner I / F 114 issues a transfer request to the memory controller 112 so as to write the image data read by the scanner 120 to the DRAM 113. When scan data for several lines is written to the DRAM 113, the scanner I / F 114 transmits an interrupt to the CPU 111. In response to this, the CPU 111 activates the calculation unit 116 in order to execute processing on the scanned image. The calculation unit 116 reads the scanned image data from the DRAM 113, performs scan image processing, and writes the processed image data back to the DRAM 113. When all the data processed by the arithmetic unit 116 is written back to the DRAM 113, an interrupt is transmitted to the CPU 111. Upon completion of the scan image processing, the CPU 111 starts control for the printing processing. First, the CPU 111 restarts the calculation unit 116 in order to generate print image data. The calculation unit 116 reads the scanned image processed image data from the DRAM 113, performs print image processing on the read image data, and writes the processed image data back to the DRAM 113. Here, as in the scan process, when all the data processed by the arithmetic unit 116 is written back to the DRAM 113, an interrupt is transmitted to the CPU 111. In response to this, the CPU 111 starts the printer 130 through the printer I / F 115 to perform printing. The printer I / F 115 reads the printed image processed image data on the DRAM 113 and transmits the printed image data to the printer 130 to print on paper. The copy process is completed by repeating the above process for the entire original.

次に、画像処理を行う演算部116について図2を用いて説明する。演算部116はRDMAC201、WDMAC202、バッファ203、IP(1)204〜IP(N)205から構成される。 Next, the calculation unit 116 that performs image processing will be described with reference to FIG. The calculation unit 116 is composed of RDMAC201, WDMAC202, buffer 203, and IP (1) 204 to IP (N) 205.

RDMAC201はDRAM113からデータを読み出すDMACである。CPU111から演算部116が起動されると、RDMAC201はDRAM113の画像データが格納されたアドレスに対してリードアクセスを行い、画像データの一部を取り出しバッファ203へ転送する。 RDMAC 201 is a DMAC that reads data from DRAM 113. When the arithmetic unit 116 is activated from the CPU 111, the RDMAC 201 performs read access to the address where the image data of the DRAM 113 is stored, takes out a part of the image data, and transfers the image data to the buffer 203.

IP(1)〜IP(N)はエッジ強調や色変換、γ変換といった画像処理を行う画像処理回路である。IP(1)はRDMAC201が取得してバッファ203に格納した画像データを読み出し、画像処理を適用してIP(2)に転送する。IP(2)〜IP(N−1)まで順に画像処理を適用し、IP(N)はIP(N−1)から転送された画像データに対して画像処理を適用し、バッファ203へ転送する。このようにIP(1)〜IP(N)で各種画像処理を施すことによって、スキャン、印刷用の画像処理を適用した画像データを生成する。 IP (1) to IP (N) are image processing circuits that perform image processing such as edge enhancement, color conversion, and γ conversion. The IP (1) reads out the image data acquired by the RDMAC 201 and stored in the buffer 203, applies image processing, and transfers the IP (1) to the IP (2). Image processing is applied in order from IP (2) to IP (N-1), and IP (N) applies image processing to the image data transferred from IP (N-1) and transfers it to buffer 203. .. By performing various image processing with IP (1) to IP (N) in this way, image data to which image processing for scanning and printing is applied is generated.

WDMAC202はDRAM113へデータを書き出すDMACである。IP(1)〜IP(N)にて各種画像処理を施した画像データをバッファ203から読み出し、DRAM113へ書き出す。1ページ分の画像データに対する画像処理を終え、DRAM113への書き出しを完了したら、CPU111に対して画像処理の完了を通知する割り込みを上げる。 WDMAC202 is a DMAC that writes data to DRAM 113. The image data subjected to various image processing by IP (1) to IP (N) is read from the buffer 203 and written to the DRAM 113. When the image processing for one page of image data is completed and the writing to the DRAM 113 is completed, an interrupt for notifying the CPU 111 of the completion of the image processing is raised.

バッファ203はWDMAC202、IP(1)204、IP(N)205、RDMAC202からのアクセスに応じて、画像データの保持、送出を行う制御回路である。バッファ203は図3に示すように、調停部301、SRAM(A)302、SRAM(B)303で構成される。受信したアクセスは調停部301で受信し、調停を行ったのち、SRAMへ発行する。ここで、調停部におけるSRAMへのデータの格納方法について図4を用いて説明する。 The buffer 203 is a control circuit that holds and sends out image data in response to access from WDMAC202, IP (1) 204, IP (N) 205, and RDMAC202. As shown in FIG. 3, the buffer 203 is composed of an arbitration unit 301, SRAM (A) 302, and SRAM (B) 303. The received access is received by the arbitration unit 301, arbitrated, and then issued to the SRAM. Here, a method of storing data in the SRAM in the arbitration unit will be described with reference to FIG.

図4(a)はSRAM(A)302、SRAM(B)303にデータが格納されていない空の状態を示している。それぞれのSRAMにIN領域と、OUT領域を割り当てており、IN領域はRDMAC201とIP(1)204が利用する領域、OUT領域はIP(N)とWDMACが利用する領域とし、複数のモジュールでSRAMを共有するよう構成している。これにより、例えば画像処理の中で拡大処理を行う場合はOUT領域を大きく設定するなど、SRAMを新たに設計することなく、共有SRAMの中でそれぞれの画像処理回路に割り当てる領域の設定を変えることができる。本実施例ではIN領域とOUT領域を設定しているが、さらに複数のモジュールでSRAMを共有する場合は、新たに領域を設ける構成としても良い。 FIG. 4A shows an empty state in which data is not stored in SRAMs (A) 302 and SRAM (B) 303. An IN area and an OUT area are assigned to each SRAM. The IN area is an area used by RDMAC201 and IP (1) 204, the OUT area is an area used by IP (N) and WDMAC, and SRAMs are used by a plurality of modules. Is configured to share. As a result, the setting of the area allocated to each image processing circuit in the shared SRAM can be changed without newly designing the SRAM, for example, when the enlargement processing is performed in the image processing, the OUT area is set large. Can be done. In this embodiment, the IN area and the OUT area are set, but when the SRAM is shared by a plurality of modules, a new area may be provided.

まず、RDMAC201からバッファ203へ画像データが送信されると、図4(b)の401ようにSRAM(A)302のIN領域に画像データを格納してゆく。図4(c)の402のようにSRAM(A)302のIN領域に対する画像データの格納が完了したら、図4(d)の404ようにRDMAC201からアクセスするSRAMを切り替えて、SRAM(B)303のIN領域に画像データを格納してゆく。同時に、IP(1)204は図4(d)の403のように画像データが格納されているSRAM(A)302のIN領域から読み出しを開始する。図4(e)の406ようにRDMAC201がSRAM(B)303のIN領域への書き込みを完了し、図4(e)の405のようにIP(1)204がSRAM(A)302のIN領域からの読み出しが完了したら、それぞれアクセス先のSRAMを入れ替える。続けて、図4(f)の407ようにRDMAC201はSRAM(A)302のIN領域へ書き込み、図4(f)の408のようにIP(1)204はSRAM(B)303のIN領域から画像データを読み出す。このように、バッファ203ではRDMAC201とIP(1)204のアクセスするSRAMを切り替えながら、データ転送を行うダブルバッファリング制御を行う。これにより、RDMAC201がDRAM113へアクセスする際にアクセスレイテンシが変動した場合や、IP(1)側で一時的なストールが起きた場合などに、互いに影響を与えることなくデータ転送を続けることが可能となる。また、IP(N)205とWDMAC202についてはSRAMのOUT領域を用いて、同様のダブルバッファリング制御を行う。 First, when the image data is transmitted from the RDMAC 201 to the buffer 203, the image data is stored in the IN area of the SRAM (A) 302 as shown in 401 of FIG. 4 (b). When the storage of the image data in the IN area of the SRAM (A) 302 is completed as shown in 402 of FIG. 4 (c), the SRAM accessed from the RDMAC 201 is switched as shown in 404 of FIG. 4 (d), and the SRAM (B) 303 Image data is stored in the IN area of. At the same time, IP (1) 204 starts reading from the IN area of SRAM (A) 302 in which image data is stored as shown in 403 of FIG. 4 (d). RDMAC 201 completes writing to the IN area of SRAM (B) 303 as shown in 406 of FIG. 4 (e), and IP (1) 204 is the IN area of SRAM (A) 302 as shown in 405 of FIG. 4 (e). When the reading from is completed, the SRAM of each access destination is replaced. Subsequently, RDMAC 201 writes to the IN area of SRAM (A) 302 as shown in 407 of FIG. 4 (f), and IP (1) 204 is written from the IN area of SRAM (B) 303 as shown in 408 of FIG. 4 (f). Read image data. In this way, the buffer 203 performs double buffering control for data transfer while switching between the SRAMs accessed by RDMAC 201 and IP (1) 204. As a result, when the access latency fluctuates when the RDMAC 201 accesses the DRAM 113, or when a temporary stall occurs on the IP (1) side, data transfer can be continued without affecting each other. Become. Further, for IP (N) 205 and WDMAC202, the same double buffering control is performed using the OUT area of the SRAM.

しかし、このように複数のモジュールでSRAMを共有する構成では、SRAM(A)302に対してRDMAC201とIP(N)205が同時にライトアクセスを発行するなど、1つのSRAMに対して同時に複数のアクセスが発生する可能性がある。このようなアクセス競合によって、一方のアクセスが待たされ、データ転送速度の低下を招く可能性があった。本実施例ではこのようなストールの発生を抑える構成を調停部301にて備えている。以下でこの特徴を備える調停部301について詳しく説明する。 However, in such a configuration in which the SRAM is shared by a plurality of modules, the RDMAC 201 and the IP (N) 205 simultaneously issue write access to the SRAM (A) 302, and a plurality of accesses to one SRAM at the same time. May occur. Due to such access conflict, one of the accesses may be waited for and the data transfer speed may be reduced. In this embodiment, the arbitration unit 301 is provided with a configuration for suppressing the occurrence of such a stall. The arbitration unit 301 having this feature will be described in detail below.

図5は調停部301のブロック図を示しており、調停部301はスワップ制御部501、スワップ情報記憶部502から構成される。 FIG. 5 shows a block diagram of the arbitration unit 301, and the arbitration unit 301 is composed of a swap control unit 501 and a swap information storage unit 502.

スワップ制御部501は各モジュールからのSRAMアクセスを監視し、アクセス競合を低減させるよう状況に応じてSRAMアクセスの調停を行う制御回路である。 The swap control unit 501 is a control circuit that monitors SRAM access from each module and arbitrates SRAM access according to the situation so as to reduce access contention.

スワップ情報記憶部502はスワップ制御部501がアクセス競合回避時に生成するスワップ情報を記憶する回路である。 The swap information storage unit 502 is a circuit that stores swap information generated by the swap control unit 501 when avoiding access conflicts.

図6を用いてスワップ制御部501の制御シーケンスについて説明する。まず、スワップ制御部501は各モジュールからSRAMへのアクセスを受信すると、S601にて同じSRAMへのアクセス発生していないか確認する。同じSRAMへのアクセスが発生していない場合はS607に遷移し、受信したSRAMアクセスを実行する。S601にてアクセス競合が起きていた場合には、S602に遷移し、どのようなSRAMアクセスが競合しているか確認する。S602にて競合を起こしているアクセスがリードアクセスのみであった場合、S606に遷移し、Least Recently Used(LRU)アルゴリズム等によりどちらか一方のリードアクセスを選択して実行する。S602にてライトアクセスが競合を起こしている場合や、ライトアクセスとリードアクセスが競合を起こしている場合は、S603へ遷移する。S603では、SRAM競合を起こしているアクセスを同時に実行できるかどうかの判定を行う。同時実行が可能である場合には、S605へ遷移してスワップ制御を行い、不可である場合にはS604に遷移し、一方のアクセスを選択して実行する。 The control sequence of the swap control unit 501 will be described with reference to FIG. First, when the swap control unit 501 receives the access to the SRAM from each module, it confirms in S601 whether or not the access to the same SRAM has occurred. If access to the same SRAM has not occurred, the transition to S607 is performed and the received SRAM access is executed. If an access conflict has occurred in S601, the process transitions to S602 to check what kind of SRAM access is conflicting. When the access causing the conflict in S602 is only the read access, the process proceeds to S606, and one of the read accesses is selected and executed by the Last Recentry Used (LRU) algorithm or the like. If there is a conflict between write access and read access in S602, the process proceeds to S603. In S603, it is determined whether or not the access causing the SRAM conflict can be executed at the same time. If simultaneous execution is possible, transition to S605 to perform swap control, and if not possible, transition to S604, and one of the accesses is selected and executed.

ここで、スワップ制御について図7を用いて説明する。図7(a)はSRAM(A)302のIN領域に対するライトアクセス701とOUT領域に対するライトアクセス702が同時に発生した状態を示している。このとき、SRAM(A)302はどちらか一方のアクセスしか受け付けることができないため、一方のアクセスはストールする事となる。そこで、スワップ制御部501はこのようなアクセス競合が起こったことを検出すると、もう一方のSRAMにアクセスを切り替える事が可能か確認する。具体的には、図7(a)のようにSRAM(B)にアクセスが行われておらず、アクセス先のSRAMを切り替えてもアクセス競合が起きない状態。且つ、ダブルバッファリング制御をしているもう一方のモジュールが対応するアドレス703に対するリードアクセスを完了し、スワップ先のアドレス703に書き込みを行っても上書きによるデータ破壊が起きない状態かを確認する。この条件を満たす場合、図7(b)の様にIN領域へのライトアクセスをSRAM(B)303の同アドレスへのアクセス711に変更し、アクセスしたSRAMの切替えを示すスワップ情報714をスワップ情報記憶部502の対応するアドレス714に記録する。このようなスワップ制御により、アクセス競合が起こった場合においてもライトアクセスの同時実行を可能にする。図7ではIN領域のスワップ制御を行う例を示したが、スワップ制御を行う領域はどちらを選択しても良い。また、リード時は、スワップ制御部301はスワップ情報記憶部502に記録されたスワップ情報を参照し、読み出すアドレスに対してスワップが行われていた場合には、読み出し先のSRAMを切り替えてリードする。これにより、スワップ制御によってライト先を切り替えたデータについても正しく読み出すことができる。 Here, swap control will be described with reference to FIG. FIG. 7A shows a state in which write access 701 for the IN region and write access 702 for the OUT region of the SRAM (A) 302 occur at the same time. At this time, since the SRAM (A) 302 can accept only one of the accesses, the one of the accesses will be stalled. Therefore, when the swap control unit 501 detects that such an access conflict has occurred, it confirms whether it is possible to switch the access to the other SRAM. Specifically, as shown in FIG. 7A, the SRAM (B) is not being accessed, and access conflict does not occur even if the access destination SRAM is switched. In addition, it is confirmed whether the read access to the corresponding address 703 is completed by the other module having double buffering control, and data corruption due to overwriting does not occur even if the swap destination address 703 is written. When this condition is satisfied, the write access to the IN area is changed to the access 711 of the SRAM (B) 303 to the same address as shown in FIG. 7B, and the swap information 714 indicating the switching of the accessed SRAM is changed to the swap information. Record at the corresponding address 714 of the storage unit 502. Such swap control enables simultaneous execution of write access even when access contention occurs. Although FIG. 7 shows an example of performing swap control in the IN area, either of the areas for performing swap control may be selected. At the time of reading, the swap control unit 301 refers to the swap information recorded in the swap information storage unit 502, and if swapping is performed for the read address, the swap destination SRAM is switched and read. .. As a result, it is possible to correctly read the data whose write destination has been switched by the swap control.

上記のように複数のモジュールからメモリアクセスを受ける調停部301において、各モジュールからのアクセスを監視し、同じSRAMに対して複数のモジュールから同時にアクセスが発生した場合には、状況に応じてスワップ制御を行う。これにより、メモリアクセスを待機することによるモジュールのストールを低減させ、処理時間の増加を抑えることが可能となる。 As described above, the arbitration unit 301 that receives memory access from a plurality of modules monitors the access from each module, and when the same SRAM is accessed from a plurality of modules at the same time, swap control is performed according to the situation. I do. As a result, it is possible to reduce module stall due to waiting for memory access and suppress an increase in processing time.

<第2の実施形態>
ダブルバッファリング制御において、リード側とライト側の動作速度に偏りがあった場合に、一方のモジュールがSRAMの切り替えを待機することによって、メモリアクセスを止める期間が発生しメモリのアクセス効率が低下する可能性があった。第2の実施形態の主な目的は、このような場合においてもメモリアクセス効率を向上させる構成を提供することである。
<Second embodiment>
In double buffering control, when the operating speeds on the read side and the write side are biased, one module waits for SRAM switching, which causes a period to stop memory access and reduces memory access efficiency. There was a possibility. A main object of the second embodiment is to provide a configuration for improving memory access efficiency even in such a case.

第2の実施形態ではスワップ制御部501の制御シーケンスのみ第1の実施形態と異なるため、以下ではこの制御シーケンスについて説明する。 In the second embodiment, only the control sequence of the swap control unit 501 is different from the first embodiment. Therefore, this control sequence will be described below.

図8は第2の実施形態におけるスワップ制御部501の制御シーケンスを示しており、進捗チェックS808を設けている。この進捗チェックS808以外については第1の実施形態と同等の制御が行われる。S808ではダブルバッファリング制御を行っているモジュールにおいて、ライト側とリード側の進捗をチェックし、メモリアクセス効率を考慮して、スワップ実行S805か、順次アクセスS804へ遷移する。この進捗チェックについて図9を用いて具体的に説明する。図9ではSRAM(A)302のIN領域に対するライトアクセス901とOUT領域に対するライトアクセス902が同時に発生し、かつ、スワップ先のSRAM(B)303にリードアクセス903が発生している状況を表している。このような状況において、スワップ制御部501はS801にてアクセス競合が起きていると判定し、S802に遷移する。S802では競合状態チェックにてライトアクセスが同時に発生していることからS803に遷移する。さらに、S803では競合しているライトアクセスのスワップ先のSRAM(B)303にリードアクセスが発生していることから、S808へ遷移する。このS808では、ダブルバッファリング制御を行っているモジュールのライト側とリード側の進捗状況を確認する。図9(a)ではSRAM(A)302のOUT領域に対するライトアクセス902の進捗と、SRAM(B)のOUT領域に対するリードアクセス904の進捗をチェックする。図9(a)のようにリードアクセス904がライトアクセス902と比べて十分先行している場合は、リードアクセスが先に完了し、ライト側の動作が完了するまでリードアクセスが行われなくなる。このSRAMの切り替えが行えるまでSRAM(B)303へのリードアクセスが実行できないことから、SRAM(B)の利用率が低下する。そこで、リードアクセスがライトアクセスと比べて十分先行している場合は、図9(b)のように、SRAM(B)303に対するリードアクセス914をストールさせる。さらに、SRAM(A)302にて競合を起こしていたアクセス901をSRAM(B)303にライト911するようスワップ制御を行う。これにより、SRAM(B)303のOUT領域に対するリードアクセスはストールし、完了までの期間は伸びてしまうが、十分にリードが先行していることから、OUT領域に対してアクセスするモジュールのSRAM切り替えが遅れることはない。その一方で、SRAM(A)302に対して競合を起こしていたライトアクセスを同時に実行することができるようになるため、全体としてメモリアクセス効率を向上させることができる。 FIG. 8 shows a control sequence of the swap control unit 501 in the second embodiment, and a progress check S808 is provided. Other than this progress check S808, the same control as in the first embodiment is performed. In S808, in the module performing double buffering control, the progress of the write side and the read side is checked, and in consideration of the memory access efficiency, the swap execution S805 or the sequential access S804 is performed. This progress check will be specifically described with reference to FIG. FIG. 9 shows a situation in which write access 901 for the IN area of SRAM (A) 302 and write access 902 for the OUT area occur at the same time, and read access 903 occurs in the swap destination SRAM (B) 303. There is. In such a situation, the swap control unit 501 determines that an access conflict has occurred in S801, and transitions to S802. In S802, since write access is occurring at the same time in the race condition check, the transition to S803 occurs. Further, in S803, since read access has occurred in the SRAM (B) 303 of the swap destination of the competing write access, the transition to S808 occurs. In this S808, the progress status of the write side and the read side of the module performing the double buffering control is confirmed. In FIG. 9A, the progress of the write access 902 to the OUT area of the SRAM (A) 302 and the progress of the read access 904 to the OUT area of the SRAM (B) are checked. When the read access 904 is sufficiently ahead of the write access 902 as shown in FIG. 9A, the read access is completed first, and the read access is not performed until the operation on the write side is completed. Since read access to the SRAM (B) 303 cannot be executed until the SRAM can be switched, the utilization rate of the SRAM (B) decreases. Therefore, when the read access is sufficiently ahead of the write access, the read access 914 for the SRAM (B) 303 is stalled as shown in FIG. 9B. Further, swap control is performed so that the access 901 that has caused the conflict in the SRAM (A) 302 is written to the SRAM (B) 303. As a result, the read access to the OUT area of the SRAM (B) 303 stalls and the period until completion is extended, but since the read is sufficiently preceded, the SRAM of the module accessing the OUT area is switched. Will not be delayed. On the other hand, since the write access that caused the conflict with the SRAM (A) 302 can be executed at the same time, the memory access efficiency can be improved as a whole.

<第3の実施形態>
第3の実施形態の主な目的は、アクセス競合を低減させるスワップ情報の管理方法を提供することにある。
<Third embodiment>
A main object of the third embodiment is to provide a method of managing swap information that reduces access contention.

第3の実施形態ではスワップ制御部501の制御シーケンスのみ第1の実施形態と異なるため、以下ではこの制御シーケンスについて説明する。 In the third embodiment, only the control sequence of the swap control unit 501 is different from the first embodiment. Therefore, this control sequence will be described below.

図10は第3の実施形態におけるスワップ制御部501の制御シーケンスを示しており、スワップ量チェックS1009を設けている。この進捗チェックS1009以外については第1の実施形態と同等の制御が行われる。S1009ではスワップ情報記憶部502に記録されたスワップ実施済みのアドレス数が所定の量を超えていて、且つ、ダブルバッファリング制御を行っているモジュールのライト側のアクセスがリード側より進んでいる場合、S1008に遷移する。S1008では、ライトアクセスをストールさせる。前述の条件に当てはまらない場合は、S1001のSRAM競合チェックに遷移し、第1の実施形態と同等の制御を行う。このスワップ量チェックについて図11を用いて具体的に説明する。 FIG. 10 shows a control sequence of the swap control unit 501 according to the third embodiment, and provides a swap amount check S1009. Other than this progress check S1009, the same control as in the first embodiment is performed. In S1009, when the number of swapped addresses recorded in the swap information storage unit 502 exceeds a predetermined amount and the access on the write side of the module performing double buffering control is ahead of the read side. , S1008. In S1008, the light access is stalled. If the above conditions are not met, the transition to the SRAM conflict check of S1001 is performed, and the control equivalent to that of the first embodiment is performed. This swap amount check will be specifically described with reference to FIG.

図11はスワップ情報記憶部502にスワップを実施したアドレス情報1103が所定量以上格納されている状態を示している。スワップ制御部501はスワップ非実施の領域に対してはアクセス先として指定されたSRAMにアクセスし、スワップされた領域に対してはアクセス先のSRAMを切り返るよう制御する。そのため、図11に示すようにダブルバッファリング制御をしているモジュールがライトアクセス1101とリードアクセス1102のように同じSRAMに対して行う可能性がある。つまり、スワップ量が多くなるとダブルバッファリング制御を行っているモジュール間でアクセス競合が発生する確率が上がる場合がある。そこで、スワップ量が所定の量を超えた際は、ライト側とリード側の進捗を確認し、リードが先行するよう制御する。そして、スワップした領域に対してリードを行った際、スワップ情報を消去するよう制御する。このように制御することで、スワップしたアドレス領域が多くなった場合に、ライト側とリード側の進捗の差を広げる事無く、スワップ情報を消去することができる。 FIG. 11 shows a state in which the swap information storage unit 502 stores the swapped address information 1103 in a predetermined amount or more. The swap control unit 501 controls to access the SRAM designated as the access destination for the non-swap area, and to switch back to the access destination SRAM for the swapped area. Therefore, as shown in FIG. 11, there is a possibility that the module performing double buffering control performs the write access 1101 and the read access 1102 to the same SRAM. That is, as the swap amount increases, the probability of access contention between modules performing double buffering control may increase. Therefore, when the swap amount exceeds a predetermined amount, the progress of the write side and the read side is confirmed, and control is performed so that the read precedes. Then, when a read is performed on the swapped area, control is performed so that the swap information is deleted. By controlling in this way, when the swapped address area increases, the swap information can be deleted without widening the difference in progress between the write side and the read side.

201 RDMAC
301 調停部
302 SRAM(A)
303 SRAM(B)
201 RDMAC
301 Mediation section 302 SRAM (A)
303 SRAM (B)

Claims (3)

ダブルバッファリング制御を行う複数のモジュールと、
前記複数のモジュールで共有する複数のSRAMと、
前記複数のモジュールから前記SRAMへのアクセスを調停する調停手段を備え、
前記調停手段は前記SRAMのうち1つのSRAMに対して、前記複数のモジュールから同時にアクセスが発生した際、前記複数のモジュールからアクセスされているSRAMとは別のSRAMに対するアクセスが発生しておらず、書き込み可能な領域がある場合は、前記1つのSRAMへアクセスしている複数のモジュールのうち、一部のモジュールのアクセス先を前記別のSRAMに切り替えるよう制御することを特徴とするデータ転送装置。
Multiple modules that perform double buffering control and
With a plurality of SRAMs shared by the plurality of modules,
A arbitration means for arbitrating access to the SRAM from the plurality of modules is provided.
When the arbitration means simultaneously accesses one of the SRAMs from the plurality of modules, the arbitration means does not access an SRAM different from the SRAM accessed from the plurality of modules. When there is a writable area, the data transfer device is characterized in that it controls to switch the access destination of some modules to the other SRAM among the plurality of modules accessing the one SRAM. ..
前記調停手段は、前記SRAMのうち1つのSRAMに対して、前記複数のモジュールから同時にライトアクセスが発生し、別のSRAMに対してリードアクセスが発生している場合、前記モジュールのダブルバッファリング制御において、リード側のアクセスがライト側のアクセスより先行する場合、リード側のアクセスをストールさせ、もう一方のライトアクセスを別のSRAMへのアクセスに切り替えるよう制御することを特徴とする請求項1に記載のデータ転送装置。 When the plurality of modules simultaneously generate write access to one of the SRAMs and read access to another SRAM, the arbitration means controls double buffering of the modules. In claim 1, when the access on the read side precedes the access on the write side, the access on the read side is stalled and the other write access is controlled to be switched to the access to another SRAM. The data transfer device described. 前記調停手段は、
スワップ制御を行うスワップ制御手段と、
前記スワップ制御手段が実行したスワップ情報を記録するスワップ情報記憶手段と、を備え、
前記スワップ制御手段は前記スワップ情報記憶手段に記録されたスワップ情報が所定の量を超えた場合、前記モジュールのダブルバッファリング制御において、リード側のアクセスがライト側のアクセスより先行するよう制御することを特徴とする請求項1または2に記載のデータ転送装置。
The mediation means
Swap control means that performs swap control and
A swap information storage means for recording swap information executed by the swap control means is provided.
When the swap information recorded in the swap information storage means exceeds a predetermined amount, the swap control means controls the double buffering control of the module so that the access on the read side precedes the access on the write side. The data transfer device according to claim 1 or 2.
JP2019141359A 2019-07-31 2019-07-31 Data transfer unit Pending JP2021026303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019141359A JP2021026303A (en) 2019-07-31 2019-07-31 Data transfer unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019141359A JP2021026303A (en) 2019-07-31 2019-07-31 Data transfer unit

Publications (1)

Publication Number Publication Date
JP2021026303A true JP2021026303A (en) 2021-02-22

Family

ID=74663017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019141359A Pending JP2021026303A (en) 2019-07-31 2019-07-31 Data transfer unit

Country Status (1)

Country Link
JP (1) JP2021026303A (en)

Similar Documents

Publication Publication Date Title
JP5411530B2 (en) Parallel processor system
US20180084128A1 (en) Information processing apparatus and method for controlling the same
US20130073773A1 (en) Access control apparatus, image forming apparatus, and access control method
JP5718305B2 (en) Image forming apparatus
JP2000293674A (en) Image processing method, printer, image processing system and recording medium
US6651116B1 (en) Output interface for a raster object memory in a method, system and program
US8526039B2 (en) Image processing apparatus, and control method thereof and program
JP2021026303A (en) Data transfer unit
JP5737871B2 (en) Information processing apparatus, image output apparatus, information processing method, and program
JP2007108996A (en) Memory device and memory control method
JP5646552B2 (en) Image forming apparatus and high-speed duplex printing program thereof
JP3519205B2 (en) DMA controller
JP6233287B2 (en) Memory access device, image processing device
US9197782B2 (en) Image processing device and image processing method
JP4332308B2 (en) Image processing apparatus, program, recording medium on which program is written, and image forming apparatus
JP2007087347A (en) Data transfer unit
JP2010141488A (en) Image processing controller, and printing device
JP2006094400A (en) Image processor and image processing method
JP4314559B2 (en) Printer and printer control method
JP6048236B2 (en) MEMORY ACCESS CONTROL DEVICE, IMAGE FORMING DEVICE, AND MEMORY ACCESS CONTROL METHOD
JP2006277363A (en) Information transfer system, and image forming device
JP3994724B2 (en) Printing system
JP2011013812A (en) Memory system
JP2000099391A (en) Printer, printer controlling method and storage medium
JP5494055B2 (en) Image forming apparatus, control method, program, and recording medium