JP2017058738A - Information processing apparatus and image forming apparatus - Google Patents

Information processing apparatus and image forming apparatus Download PDF

Info

Publication number
JP2017058738A
JP2017058738A JP2015180603A JP2015180603A JP2017058738A JP 2017058738 A JP2017058738 A JP 2017058738A JP 2015180603 A JP2015180603 A JP 2015180603A JP 2015180603 A JP2015180603 A JP 2015180603A JP 2017058738 A JP2017058738 A JP 2017058738A
Authority
JP
Japan
Prior art keywords
core
data
cache
partial data
external memory
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.)
Granted
Application number
JP2015180603A
Other languages
Japanese (ja)
Other versions
JP6701650B2 (en
Inventor
俊治 綱島
Toshiharu Tsunashima
俊治 綱島
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2015180603A priority Critical patent/JP6701650B2/en
Publication of JP2017058738A publication Critical patent/JP2017058738A/en
Application granted granted Critical
Publication of JP6701650B2 publication Critical patent/JP6701650B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce a time to pre-load data stored in an external memory in an information processing apparatus comprising a plurality of cores.SOLUTION: An image forming apparatus comprises: a core 101 and a core 102; an L2 cache memory 121; and a main storage device 30 (external memory) that stores data. The core 101 includes request means that requests first partial data being part of data stored in the external memory, and the core 102 includes second request means that requests second partial data different from the first partial data.SELECTED DRAWING: Figure 5

Description

本発明は、情報処理装置および画像形成装置に関する。   The present invention relates to an information processing apparatus and an image forming apparatus.

画像処理装置等の情報処理装置において、外部メモリから読み出したデータを用いた処理が行われる。しかし、メモリアクセス中はコアの処理はストール(待機)するため、外部メモリへのアクセスが頻繁になると処理の高速化を阻害する要因となる。例えば特許文献1には、外部メモリのデータをプロセッサ内部のキャッシュメモリにあらかじめコピー(プリロード)しておき、プロセッサのコアはキャッシュメモリからデータを読み出して処理を行う技術が記載されている。   In an information processing apparatus such as an image processing apparatus, processing using data read from an external memory is performed. However, since the core process stalls (waits) during memory access, frequent access to the external memory is a factor that hinders the speeding up of the process. For example, Patent Document 1 describes a technique in which data in an external memory is copied (preloaded) in advance into a cache memory inside the processor, and the core of the processor reads the data from the cache memory and performs processing.

特開2011−223145号公報JP 2011-223145 A

近年プロセッサのコアはマルチコア化している。マルチコアは並列的に処理を行うことで高速化を図るものであるが、外部メモリに記憶されているデータをプリロードする時間を短縮することはできなかった。   In recent years, processor cores have become multi-core. The multi-core is intended to increase the speed by performing processing in parallel, but the time for preloading the data stored in the external memory cannot be shortened.

本発明は、複数コアを有する情報処理装置において、外部メモリに記憶されているデータをプリロードする時間を短縮する技術を提供する。   The present invention provides a technique for shortening the time for preloading data stored in an external memory in an information processing apparatus having a plurality of cores.

本発明は、第1コアと、前記第1コアと並列処理を行う第2コアと、前記第1コアおよび前記第2コアで共用されるキャッシュメモリと、データを記憶した外部メモリとを有し、前記第1コアは、前記データの一部である第1部分データを要求する第1要求手段を有し、前記第2コアは、前記データのうち前記第1部分データと異なる一部である第2部分データを要求する第2要求手段を有し、前記キャッシュメモリは、前記第1要求手段からの要求および前記第2要求手段からの要求に応じて、前記第1部分データおよび前記第2部分データを前記外部メモリから読み出す読み出し手段を有し、前記第1コアおよび前記第2コアは、それぞれ、前記キャッシュメモリに記憶されている前記第1部分データおよび前記第2部分データの少なくとも一部を用いた処理を行う情報処理装置を提供する。   The present invention includes a first core, a second core that performs parallel processing with the first core, a cache memory that is shared by the first core and the second core, and an external memory that stores data. The first core includes first request means for requesting first partial data which is a part of the data, and the second core is a part of the data different from the first partial data. Second cache requesting means for requesting second partial data, the cache memory responding to a request from the first requesting means and a request from the second requesting means; Read means for reading out partial data from the external memory, and the first core and the second core respectively have a smaller amount of the first partial data and the second partial data stored in the cache memory. Also provides an information processing apparatus for performing processing using a part.

この情報処理装置は、前記第1コアおよび前記第2コアを含むN個のコアと、前記データを、各々アドレスが連続した部分のみから構成されるN個の部分データに等分し、各部分データを前記N個のコアのいずれかに割り当てる割り当て手段とを有してもよい。   The information processing apparatus equally divides the N cores including the first core and the second core, and the data into N partial data each including only a portion where addresses are continuous, And allocating means for allocating data to any of the N cores.

この情報処理装置は、前記第1コアおよび前記第2コアを含むN個のコアと、前記データを、各々アドレスが不連続な部分を含むN個の部分データに等分し、各部分データを前記N個のコアのいずれかに割り当てる割り当て手段とを有してもよい。   The information processing apparatus equally divides the N cores including the first core and the second core and the data into N partial data each including a portion where addresses are discontinuous, And assigning means for assigning to any of the N cores.

前記外部メモリはDRAMを含み、前記N個の部分データの各々は、アドレスが連続した部分を含み、前記アドレスが連続した部分のデータサイズは、前記読み出し手段が前記DRAMからデータを読み出す際の1回当たりのデータ読み出し量以下であってもよい。   The external memory includes a DRAM, and each of the N partial data includes a portion where addresses are continuous, and the data size of the portion where the addresses are continuous is 1 when the reading means reads data from the DRAM. It may be less than the amount of data read per round.

前記第1コアおよび前記第2コアにおける処理は、画素に対応するインデックスを画素値に変換する処理であり、前記データは、前記インデックスを前記画素値に変換するためのテーブルであってもよい。   The processing in the first core and the second core may be processing for converting an index corresponding to a pixel into a pixel value, and the data may be a table for converting the index into the pixel value.

また、本発明は、第1コアと、前記第1コアと並列処理を行う第2コアと、前記第1コア専用の第1キャッシュメモリと、前記第2コア専用の第2キャッシュメモリと、前記第1コアおよび前記第2コアで共用されるキャッシュメモリと、データを記憶した外部メモリとを有し、前記第1コアは、前記データの一部である第1部分データを要求する第1要求手段を有し、前記第2コアは、前記データのうち前記第1部分データと異なる一部である第2部分データを要求する第2要求手段を有し、前記第1キャッシュメモリは、前記第1要求手段からの要求に応じて、前記第1部分データを前記外部メモリから取得する第1取得手段を有し、前記第2キャッシュメモリは、前記第2要求手段からの要求に応じて、前記第2部分データを前記外部メモリから取得する第2取得手段を有し、前記第1コアは、前記第1キャッシュメモリに記憶されている前記第1部分データを用いた処理を行い、前記第2コアは、前記第2キャッシュメモリに記憶されている前記第2部分データを用いた処理を行う情報処理装置を提供する。   The present invention also provides a first core, a second core that performs parallel processing with the first core, a first cache memory dedicated to the first core, a second cache memory dedicated to the second core, A cache memory shared by the first core and the second core; and an external memory storing data, wherein the first core requests a first partial data which is a part of the data. And the second core has second request means for requesting second partial data which is a part of the data different from the first partial data, and the first cache memory In response to a request from one requesting means, the first partial data is obtained from the external memory, and the second cache memory is configured to obtain the first partial data in response to a request from the second requesting means. 2nd partial data to the external Second acquisition means for acquiring from the memory, wherein the first core performs processing using the first partial data stored in the first cache memory, and the second core Provided is an information processing apparatus that performs processing using the second partial data stored in a memory.

さらに、本発明は、上記いずれかの情報処理装置と、前記第1コアおよび前記第2コアで処理された結果に応じて画像を形成する画像形成手段とを有する画像形成装置を提供する。   Furthermore, the present invention provides an image forming apparatus including any one of the information processing apparatuses described above and an image forming unit that forms an image according to a result processed by the first core and the second core.

請求項1に係る情報処理装置によれば、外部メモリに記憶されているデータ全体を第1コアおよび第2コアそれぞれがプリロードする場合と比較して、外部メモリに記憶されているデータをプリロードする時間を短縮することができる。
請求項2に係る情報処理装置によれば、外部メモリに記憶されているデータ全体を第1コアおよび第2コアそれぞれがプリロードする場合と比較して、各コアからのデータ要求の回数を1/Nに低減することができる。
請求項3に係る情報処理装置によれば、データを単純にN等分する場合と比較して、外部メモリからのデータの読み出し時間を短縮することができる。
請求項4に係る情報処理装置によれば、アドレスが連続した部分のデータサイズが細切れである場合と比較して、外部メモリへのアクセス回数を低減することができる。
請求項5に係る情報処理装置によれば、インデックスを画素値に変換する画像処理に用いるテーブルをプリロードする時間を短縮することができる。
請求項6に係る情報処理装置によれば、外部メモリに記憶されているデータ全体を第1コアおよび第2コアそれぞれがプリロードする場合と比較して、外部メモリに記憶されているデータをプリロードする時間を短縮することができる。
請求項7に係る画像形成装置によれば、外部メモリに記憶されているデータ全体を第1コアおよび第2コアそれぞれがプリロードする場合と比較して、外部メモリに記憶されているデータをプリロードする時間を短縮することができる。
According to the information processing apparatus of the first aspect, the data stored in the external memory is preloaded as compared with the case where each of the first core and the second core preloads the entire data stored in the external memory. Time can be shortened.
According to the information processing apparatus of the second aspect, the number of data requests from each core is reduced to 1 / compared to the case where each of the first core and the second core preloads the entire data stored in the external memory. N can be reduced.
According to the information processing apparatus of the third aspect, it is possible to shorten the time for reading data from the external memory as compared with the case where the data is simply divided into N equal parts.
According to the information processing apparatus of the fourth aspect, it is possible to reduce the number of accesses to the external memory as compared with the case where the data size of the portion where the addresses are continuous is small.
According to the information processing apparatus of the fifth aspect, it is possible to shorten the time for preloading a table used for image processing for converting an index into a pixel value.
According to the information processing apparatus of the sixth aspect, the data stored in the external memory is preloaded as compared with the case where each of the first core and the second core preloads the entire data stored in the external memory. Time can be shortened.
According to the image forming apparatus of the seventh aspect, the data stored in the external memory is preloaded as compared with the case where each of the first core and the second core preloads the entire data stored in the external memory. Time can be shortened.

関連技術に係るCPU90のキャッシュメモリ構成を例示する図The figure which illustrates the cache memory structure of CPU90 which concerns on related technology 単一のコアによるプリロード処理を例示するシーケンスチャートSequence chart illustrating preload processing with a single core 複数のコアによるプリロード処理を例示するシーケンスチャートSequence chart illustrating preload processing with multiple cores 一実施形態に係る画像形成装置1の構成を例示する図1 is a diagram illustrating a configuration of an image forming apparatus 1 according to an embodiment. データのプリロードに関する画像形成装置1の機能構成を例示する図The figure which illustrates the function structure of the image forming apparatus 1 regarding the preload of data 画像形成装置1における画像処理を例示するフローチャートFlowchart illustrating image processing in image forming apparatus 1 LUTの分割の概要を示す模式図Schematic diagram showing the outline of LUT division LUTの分割の具体例を示す図The figure which shows the specific example of the division | segmentation of LUT LUTの分割の別の具体例を示す図The figure which shows another specific example of the division | segmentation of LUT 画像形成装置1におけるプリロード処理を例示するシーケンスチャートSequence chart illustrating preload processing in image forming apparatus 1 変形例に係るLUTの分割の概要を示す模式図The schematic diagram which shows the outline | summary of the division | segmentation of LUT which concerns on a modification

1.概要
まず一例として以下の画像処理を考える。入力画像の画素値からインデックス値が算出される。ルックアップテーブルから、インデックス値で指示されるエントリ値が取得される。取得されたエントリ値から出力画素値が算出される。このような画像処理を高速化する方法の一つに、いわゆるマルチコアのCPUを用い、異なる領域(例えば奇数行と偶数行)の画素をそれぞれ別のコアで並列処理させる方法がある。
1. Outline First, consider the following image processing as an example. An index value is calculated from the pixel value of the input image. The entry value indicated by the index value is acquired from the lookup table. An output pixel value is calculated from the acquired entry value. One method for speeding up such image processing is to use a so-called multi-core CPU and process pixels in different regions (for example, odd rows and even rows) in parallel with different cores.

具体的に、各コアは、(1)入力画素の読み込み、(2)インデックス値の算出、(3)ルックアップテーブルからエントリ値の読み込み、(4)出力画素値の算出、および(5)出力画素値の記憶、という処理を行う。このうち処理(1)、(3)、および(5)は外部メモリへのアクセスを伴う。外部メモリとは、CPUと異なるチップに形成されたメモリをいい、例えばコンピュータの主記憶装置(メインメモリ)がこれに該当する。外部メモリにアクセスしているときはコアの命令実行はストール(待機状態となる)する。外部メモリへのアクセスは相対的に遅いため、外部メモリへのアクセスが頻繁に発生すると、それは高速化を阻む要因となる。   Specifically, each core (1) reads an input pixel, (2) calculates an index value, (3) reads an entry value from a lookup table, (4) calculates an output pixel value, and (5) outputs A process of storing pixel values is performed. Of these, processes (1), (3), and (5) involve access to an external memory. The external memory is a memory formed on a chip different from the CPU, and corresponds to a main storage device (main memory) of a computer, for example. When accessing the external memory, the instruction execution of the core stalls (becomes a standby state). Since access to the external memory is relatively slow, frequent access to the external memory is a factor that hinders speeding up.

この問題に対処するため、外部メモリに記憶されているルックアップテーブルを、画像処理に先立ってキャッシュメモリにコピーすなわちプリロードする技術が知られている。LUT(Look Up Table)をキャッシュメモリにプリロードすることによって処理(3)における外部メモリへのアクセスをなくすことができる。   In order to cope with this problem, a technique is known in which a lookup table stored in an external memory is copied, that is, preloaded to a cache memory prior to image processing. By preloading the LUT (Look Up Table) into the cache memory, access to the external memory in the process (3) can be eliminated.

図1は、関連技術に係るCPU90のキャッシュメモリ構成を例示する図である。CPU90は、複数のコア、この例ではコア901〜904の4つのコアを有する。ここで、プロセッサの「コア」とは、プロセッサのうち命令の実行および演算を行う部分をいう。CPU90は、さらに、キャッシュメモリ911〜914およびキャッシュメモリ921を有する。キャッシュメモリ911〜914は一次キャッシュ(いわゆるL1キャッシュ)であり、それぞれ、コア901〜904に専用のものである。キャッシュメモリ921は二次キャッシュ(いわゆるL2キャッシュ)である。キャッシュメモリ921はコア901〜904で共用される。なお一般にはL1キャッシュまで含めて「コア」という場合があるが、ここでは「コア」にL1キャッシュは含まれない。   FIG. 1 is a diagram illustrating a cache memory configuration of a CPU 90 according to related technology. The CPU 90 has a plurality of cores, in this example, four cores 901 to 904. Here, the “core” of the processor refers to a portion of the processor that executes instructions and performs operations. The CPU 90 further includes cache memories 911 to 914 and a cache memory 921. The cache memories 911 to 914 are primary caches (so-called L1 caches) and are dedicated to the cores 901 to 904, respectively. The cache memory 921 is a secondary cache (so-called L2 cache). The cache memory 921 is shared by the cores 901 to 904. In general, the L1 cache may be included and referred to as “core”, but here the “core” does not include the L1 cache.

一次キャッシュとはコアから最優先にアクセスされるキャッシュメモリをいい、二次キャッシュとは一次キャッシュの次の優先順位でアクセスされるキャッシュメモリをいう。一次キャッシュは、二次キャッシュよりも高速でかつ容量が小さい。メインメモリ(外部メモリ)へのアクセス要求が発生すると、コアはまずアクセス先のアドレスのデータが一次キャッシュに格納されているか調べる。アクセス先のアドレスのデータ(以下単に「アクセス先のデータ」という)が一次キャッシュに格納されていた場合、コアは一次キャッシュからデータを読み出す。アクセス先のデータがキャッシュメモリに格納されていることを「ヒット」といい、ヒットが発生する割合を「ヒット率」という。アクセス先のデータが一次キャッシュに格納されていなかった場合、コアは、アクセス先のデータが二次キャッシュに格納されていないか調べる。アクセス先のデータが二次キャッシュに格納されていた場合、コアは二次キャッシュからデータを読み出す。アクセス先のデータが二次キャッシュに格納されていなかった場合、コアは外部メモリである主記憶装置30からデータを読み出す。   The primary cache is a cache memory that is accessed with the highest priority from the core, and the secondary cache is a cache memory that is accessed with the next priority of the primary cache. The primary cache is faster and has a smaller capacity than the secondary cache. When an access request to the main memory (external memory) occurs, the core first checks whether the data at the access destination address is stored in the primary cache. When data at an access destination address (hereinafter simply referred to as “access destination data”) is stored in the primary cache, the core reads data from the primary cache. The fact that the access destination data is stored in the cache memory is called “hit”, and the rate at which hits occur is called “hit rate”. If the access destination data is not stored in the primary cache, the core checks whether the access destination data is stored in the secondary cache. When the access destination data is stored in the secondary cache, the core reads the data from the secondary cache. When the access destination data is not stored in the secondary cache, the core reads the data from the main memory 30 which is an external memory.

コアは、メモリ空間上のアドレスからデータを読み出す際、まずそのコア専用のL1キャッシュに対して読み出し要求を行う。L1キャッシュは、指定されたアドレスのデータがL1キャッシュ内に記憶されているか確認する。指定されたアドレスのデータがL1キャッシュ内に記憶されている場合、L1キャッシュは、指定されたアドレスのデータを要求元のコアに出力する。指定されたアドレスのデータがL1キャッシュ内に記憶されていない場合、L1キャッシュは、L2キャッシュに対して読み出し要求を行う。L2キャッシュは、指定されたアドレスのデータがL2キャッシュ内に記憶されているか確認する。指定されたアドレスのデータがL2キャッシュ内に記憶されている場合、L2キャッシュは、指定されたアドレスのデータを要求元のL1キャッシュに出力する。指定されたアドレスのデータがL2キャッシュ内に記憶されていない場合、L2キャッシュは、主記憶装置30に対して読み出し要求を行う。データの読み出し要求を受けると、主記憶装置30は、要求されたデータをL2キャッシュに出力する。L2キャッシュは、主記憶装置30から読み出されたデータを自身で記憶し、さらに、そのデータの要求元であるL1キャッシュに出力する。   When reading data from an address in the memory space, the core first makes a read request to the L1 cache dedicated to the core. The L1 cache checks whether the data at the designated address is stored in the L1 cache. When the data at the designated address is stored in the L1 cache, the L1 cache outputs the data at the designated address to the requesting core. If the data at the designated address is not stored in the L1 cache, the L1 cache issues a read request to the L2 cache. The L2 cache checks whether the data at the designated address is stored in the L2 cache. When the data at the designated address is stored in the L2 cache, the L2 cache outputs the data at the designated address to the L1 cache as the request source. When the data at the designated address is not stored in the L2 cache, the L2 cache issues a read request to the main storage device 30. Upon receiving a data read request, the main storage device 30 outputs the requested data to the L2 cache. The L2 cache stores the data read from the main storage device 30 by itself, and outputs it to the L1 cache that is the request source of the data.

次に、図1のCPU90を用いたLUTのプリロードについて説明する。マルチコアによるLUTのプリロードの説明に先立ち、まずは単一のコアによるLUTのプリロードについて説明する。ここでは、LUTのデータサイズが、L1キャッシュ(1つ)の記憶容量よりは大きく、かつL2キャッシュの記憶容量よりは小さい例を説明する。   Next, LUT preloading using the CPU 90 of FIG. 1 will be described. Prior to description of LUT preloading by multi-core, first, LUT preloading by a single core will be described. Here, an example will be described in which the data size of the LUT is larger than the storage capacity of one L1 cache and smaller than the storage capacity of the L2 cache.

図2は、単一のコア(コア#1。例えば図1のコア901)によるLUTの関連技術に係るプリロード処理を例示するシーケンスチャートである。以下においては、LUTのデータのうちアドレスkのデータ(エントリ値)をP[k]と表す。また、コア#1に対応するL1キャッシュをL1キャッシュ#1(図面においてはL1#1)と表す。この例で、図2のフローの開始前においては、L1キャッシュおよびL2キャッシュにはLUTのデータは記憶されていない。   FIG. 2 is a sequence chart illustrating a preload process according to a related technology of the LUT using a single core (core # 1, for example, the core 901 in FIG. 1). In the following, data (entry value) at address k out of LUT data is represented as P [k]. Further, the L1 cache corresponding to the core # 1 is represented as L1 cache # 1 (L1 # 1 in the drawing). In this example, LUT data is not stored in the L1 cache and the L2 cache before the start of the flow of FIG.

まず、コア#1は、L1キャッシュ#1に対し、P[0]の読み出しを要求する(ステップS801)。L1キャッシュ#1は、L2キャッシュに対し、P[0]の読み出しを要求する(ステップS802)。L2キャッシュは、外部メモリ(主記憶装置30)に対してP[0]の読み出しを要求する(ステップS803)。外部メモリは、記憶しているデータのうちP[0]をL2キャッシュに出力する(ステップS804)。L2キャッシュは、P[0]をL1キャッシュ#1に出力する(ステップS805)。L1キャッシュ#1は、P[0]をコア#1に出力する(ステップS806)。   First, the core # 1 requests the L1 cache # 1 to read P [0] (step S801). The L1 cache # 1 requests the L2 cache to read P [0] (step S802). The L2 cache requests the external memory (main storage device 30) to read P [0] (step S803). The external memory outputs P [0] of the stored data to the L2 cache (step S804). The L2 cache outputs P [0] to the L1 cache # 1 (step S805). The L1 cache # 1 outputs P [0] to the core # 1 (step S806).

次に、コア#1は、L1キャッシュ#1に対し、P[1]の読み出しを要求する(ステップS807)。L1キャッシュ#1は、L2キャッシュに対し、P[1]の読み出しを要求する(ステップS808)。L2キャッシュは、外部メモリに対してP[1]の読み出しを要求する(ステップS809)。外部メモリは、記憶しているデータのうちP[1]をL2キャッシュに出力する(ステップS810)。L2キャッシュは、P[1]をL1キャッシュ#1に出力する(ステップS811)。L1キャッシュ#1は、P[1]をコア#1に出力する(ステップS812)。   Next, the core # 1 requests the L1 cache # 1 to read P [1] (step S807). The L1 cache # 1 requests the L2 cache to read P [1] (step S808). The L2 cache requests the external memory to read P [1] (step S809). The external memory outputs P [1] of the stored data to the L2 cache (step S810). The L2 cache outputs P [1] to the L1 cache # 1 (step S811). The L1 cache # 1 outputs P [1] to the core # 1 (step S812).

P[2]以降のデータについても同様に処理される。このように、LUTのデータを順次プリロードすることにより、L2キャッシュにLUTのデータが記憶される。   The same processing is performed for data after P [2]. Thus, the LUT data is stored in the L2 cache by sequentially preloading the LUT data.

図3は、複数のコア(コア#1およびコア#2。例えば図1のコア901およびコア902)によるLUTの関連技術に係るプリロード処理を例示するシーケンスチャートである。この例では、複数のコアの各々において、それぞれ並列的にプリロードが行われる。コア#2に対応するL1キャッシュをL1キャッシュ#2(図面においてはL1#2)と表す。この例で、図3のフローの開始前においては、L1キャッシュおよびL2キャッシュにはLUTのデータは記憶されていない。   FIG. 3 is a sequence chart illustrating a preload process according to a related technology of LUT by a plurality of cores (core # 1 and core # 2, for example, core 901 and core 902 in FIG. 1). In this example, preloading is performed in parallel in each of the plurality of cores. The L1 cache corresponding to the core # 2 is represented as L1 cache # 2 (L1 # 2 in the drawing). In this example, LUT data is not stored in the L1 cache and the L2 cache before the start of the flow of FIG.

まず、コア#1は、L1キャッシュ#1に対し、P[0]の読み出しを要求する(ステップS901)。L1キャッシュ#1は、L2キャッシュに対し、P[0]の読み出しを要求する(ステップS902)。L2キャッシュは、外部メモリ(主記憶装置30)に対してP[0]の読み出しを要求する(ステップS903)。外部メモリは、記憶しているデータのうちP[0]をL2キャッシュに出力する(ステップS906)。   First, the core # 1 requests the L1 cache # 1 to read P [0] (step S901). The L1 cache # 1 requests the L2 cache to read P [0] (step S902). The L2 cache requests the external memory (main storage device 30) to read P [0] (step S903). The external memory outputs P [0] of the stored data to the L2 cache (step S906).

コア#2は、L1キャッシュ#2に対し、P[0]の読み出しを要求する(ステップS904)。L1キャッシュ#2は、L2キャッシュに対し、P[0]の読み出しを要求する(ステップS905)。コア#2によるステップS904〜S905の処理は、コア#1によるステップS901〜S902の処理と並列で行われるが、ここでは便宜上、ステップS904〜S905の処理がステップS901〜S902の処理の後で行われるように記載している。   Core # 2 requests the L1 cache # 2 to read P [0] (step S904). The L1 cache # 2 requests the L2 cache to read P [0] (step S905). The processing of steps S904 to S905 by the core # 2 is performed in parallel with the processing of steps S901 to S902 by the core # 1, but here, for convenience, the processing of steps S904 to S905 is performed after the processing of steps S901 to S902. It is described as

L2キャッシュは、P[0]をL1キャッシュ#1に出力する(ステップS907)。L1キャッシュ#1は、P[0]をコア#1に出力する(ステップS908)。さらに、L2キャッシュは、P[0]をL1キャッシュ#2に出力する(ステップS909)。L1キャッシュ#2は、P[0]をコア#2に出力する(ステップS910)。以上で、P[0]のプリロードが完了する。   The L2 cache outputs P [0] to the L1 cache # 1 (step S907). The L1 cache # 1 outputs P [0] to the core # 1 (step S908). Further, the L2 cache outputs P [0] to the L1 cache # 2 (step S909). The L1 cache # 2 outputs P [0] to the core # 2 (step S910). The preloading of P [0] is thus completed.

次に、コア#1は、L1キャッシュ#1に対し、P[1]の読み出しを要求する(ステップS911)。L1キャッシュ#1は、L2キャッシュに対し、P[1]の読み出しを要求する(ステップS912)。L2キャッシュは、外部メモリ(主記憶装置30)に対してP[1]の読み出しを要求する(ステップS913)。外部メモリは、記憶しているデータのうちP[1]をL2キャッシュに出力する(ステップS916)。   Next, the core # 1 requests the L1 cache # 1 to read P [1] (step S911). The L1 cache # 1 requests the L2 cache to read P [1] (step S912). The L2 cache requests the external memory (main storage device 30) to read P [1] (step S913). The external memory outputs P [1] of the stored data to the L2 cache (step S916).

コア#2は、L1キャッシュ#2に対し、P[1]の読み出しを要求する(ステップS914)。L1キャッシュ#2は、L2キャッシュに対し、P[1]の読み出しを要求する(ステップS915)。コア#2によるステップS914〜S915の処理は、コア#1によるステップS911〜S912の処理と並列で行われるが、ここでは便宜上、ステップS914〜S915の処理がステップS911〜S912の処理の後で行われるように記載している。   Core # 2 requests the L1 cache # 2 to read P [1] (step S914). The L1 cache # 2 requests the L2 cache to read P [1] (step S915). The processing of steps S914 to S915 by the core # 2 is performed in parallel with the processing of steps S911 to S912 by the core # 1, but for the sake of convenience, the processing of steps S914 to S915 is performed after the processing of steps S911 to S912. It is described as

L2キャッシュは、P[1]をL1キャッシュ#1に出力する(ステップS917)。L1キャッシュ#1は、P[1]をコア#1に出力する(ステップS918)。さらに、L2キャッシュは、P[1]をL1キャッシュ#2に出力する(ステップS919)。L1キャッシュ#2は、P[1]をコア#2に出力する(ステップS920)。以上で、P[1]のプリロードが完了する。   The L2 cache outputs P [1] to the L1 cache # 1 (step S917). The L1 cache # 1 outputs P [1] to the core # 1 (step S918). Further, the L2 cache outputs P [1] to the L1 cache # 2 (step S919). The L1 cache # 2 outputs P [1] to the core # 2 (step S920). Thus, the preloading of P [1] is completed.

図3の処理を図2の処理と対比すると、マルチコアを使用しているにもかかわらず、P[0]およびP[1]をプリロードするのに要する時間は図2の処理と変わらない。これは、図3の処理ではデータのプリロードに関しマルチコアの性能を発揮できていないことを意味する。本実施形態は、プリロードに要する時間を短縮する技術を提供する。   When the process of FIG. 3 is compared with the process of FIG. 2, the time required to preload P [0] and P [1] is the same as the process of FIG. This means that the processing of FIG. 3 does not exhibit multicore performance regarding data preloading. This embodiment provides a technique for reducing the time required for preloading.

2.構成
図4は、一実施形態に係る画像形成装置1の構成を例示する図である。画像形成装置1は、画像を形成する機能を有する情報処理装置の一例であり、例えばいわゆる複合機である。画像形成装置1は、CPU10、メモリコントローラー20、主記憶装置(メインメモリ)30、IOコントローラー40、補助記憶装置41、画像読み取りユニット42、画像形成ユニット43、および通信ユニット44を有する。
2. Configuration FIG. 4 is a diagram illustrating a configuration of the image forming apparatus 1 according to an embodiment. The image forming apparatus 1 is an example of an information processing apparatus having a function of forming an image, and is a so-called multifunction machine, for example. The image forming apparatus 1 includes a CPU 10, a memory controller 20, a main storage device (main memory) 30, an IO controller 40, an auxiliary storage device 41, an image reading unit 42, an image forming unit 43, and a communication unit 44.

CPU10は、画像形成装置1の各部を制御する制御装置であり、各々異なる処理を実行するN個のコア(Nは2以上の自然数)を含む処理手段の一例である。この例ではN=4である。CPU10は、コア101〜104、キャッシュメモリ111〜114、およびキャッシュメモリ121〜122を有する。キャッシュメモリ111〜114は一次キャッシュ(L1キャッシュ)であり、それぞれコア101〜104に専用のものである。キャッシュメモリ121〜122は二次キャッシュ(L2キャッシュ)である。キャッシュメモリ121はコア101および102で共用され、キャッシュメモリ122はコア103および104で共用される。   The CPU 10 is a control device that controls each unit of the image forming apparatus 1 and is an example of a processing unit including N cores (N is a natural number of 2 or more) that executes different processes. In this example, N = 4. The CPU 10 includes cores 101 to 104, cache memories 111 to 114, and cache memories 121 to 122. The cache memories 111 to 114 are primary caches (L1 caches) and are dedicated to the cores 101 to 104, respectively. The cache memories 121 to 122 are secondary caches (L2 caches). The cache memory 121 is shared by the cores 101 and 102, and the cache memory 122 is shared by the cores 103 and 104.

メモリコントローラー20は、主記憶装置30に対するデータの読み書きを制御する。主記憶装置30は主記憶装置であり、例えばDRAM(Dynamic Random Access Memory)を含む。主記憶装置30は、CPU10がプログラムを実行する際のワークエリアとして機能し、種々のデータを記憶する記憶手段の一例である。   The memory controller 20 controls reading and writing of data with respect to the main storage device 30. The main storage device 30 is a main storage device, and includes, for example, a DRAM (Dynamic Random Access Memory). The main storage device 30 functions as a work area when the CPU 10 executes a program and is an example of a storage unit that stores various data.

IOコントローラー40は、周辺装置をCPU10に接続して制御する装置である。この例で、IOコントローラー40には、補助記憶装置41、画像読み取りユニット42、画像形成ユニット43、および通信ユニット44が接続されている。補助記憶装置41はデータおよびプログラムを記憶する不揮発性の記憶装置であり、例えばHDD(Hard Disk Drive)を含む。画像読み取りユニット42は、原稿を光学的に読み取る装置であり、例えばいわゆるスキャナーを含む。画像形成ユニット43は、媒体(例えば紙)に画像を形成する装置であり、例えば電子写真技術またはインクジェット技術により画像形成を行う。通信ユニット44は、他の機器と通信を行うインターフェースである。   The IO controller 40 is a device that controls peripheral devices connected to the CPU 10. In this example, an auxiliary storage device 41, an image reading unit 42, an image forming unit 43, and a communication unit 44 are connected to the IO controller 40. The auxiliary storage device 41 is a non-volatile storage device that stores data and programs, and includes, for example, an HDD (Hard Disk Drive). The image reading unit 42 is a device that optically reads a document, and includes, for example, a so-called scanner. The image forming unit 43 is an apparatus that forms an image on a medium (for example, paper), and performs image formation by, for example, an electrophotographic technique or an ink jet technique. The communication unit 44 is an interface that communicates with other devices.

図5は、外部メモリからのデータのプリロードに関する画像形成装置1の機能構成を例示する図である。補助記憶装置41は、画像形成装置1のOS(Operating System)を機能させるためのプログラム(以下「OSプログラム」という)を記憶している。CPU10がOSプログラムを実行することにより、画像形成装置1にOS50が実装される。   FIG. 5 is a diagram illustrating a functional configuration of the image forming apparatus 1 relating to preloading of data from the external memory. The auxiliary storage device 41 stores a program for causing an OS (Operating System) of the image forming apparatus 1 to function (hereinafter referred to as “OS program”). When the CPU 10 executes the OS program, the OS 50 is mounted on the image forming apparatus 1.

OS50は、割り当て手段51を有する。割り当て手段51は、プリロードの対象となるデータ(この例ではLUT)を、N個のデータに分割する。分割されたデータを「部分データ」という。さらに、割り当て手段51は、各部分データをN個のコアのいずれかに割り当てる。コア101〜コア104は、それぞれ要求手段を有する。例えばコア101の要求手段(第1要求手段の一例)は、N個の部分データのうち1つ(第1部分データの一例)の読み出しをキャッシュメモリに要求する。また、コア102の要求手段(第2要求手段の一例)は、N個の部分データのうち別の1つ(第2部分データの一例)の読み出しをキャッシュメモリに要求する。なお図5ではL1キャッシュは図示を省略している。   The OS 50 has an assigning unit 51. The allocating unit 51 divides data to be preloaded (LUT in this example) into N pieces of data. The divided data is called “partial data”. Furthermore, the assigning means 51 assigns each partial data to one of the N cores. Each of the cores 101 to 104 has a request unit. For example, the request unit (an example of the first request unit) of the core 101 requests the cache memory to read one of the N pieces of partial data (an example of the first partial data). Further, the request unit (an example of the second request unit) of the core 102 requests the cache memory to read another one of the N pieces of partial data (an example of the second partial data). In FIG. 5, the L1 cache is not shown.

キャッシュメモリ121は読み出し手段1211を有する。読み出し手段1211は、コアからの要求に応じて主記憶装置30からデータを読み出す。読み出し手段1211により、キャッシュメモリ121には、コア101〜コア104により要求された部分データが記憶される。なお、コア101〜コア104の要求手段は、OSの機能の一部である。すなわち、OSプログラムを実行している各コアが、要求手段の一例である。また、キャッシュメモリ121はデータの読み出しを制御するコントローラー(図示略)を有している。このコントローラーが読み出し手段の一例である。   The cache memory 121 has a reading unit 1211. The reading unit 1211 reads data from the main storage device 30 in response to a request from the core. The read unit 1211 stores the partial data requested by the cores 101 to 104 in the cache memory 121. Note that the requesting means of the cores 101 to 104 are part of the functions of the OS. That is, each core executing the OS program is an example of a request unit. The cache memory 121 also has a controller (not shown) that controls reading of data. This controller is an example of a reading unit.

3.動作
図6は、画像形成装置1における画像処理を例示するフローチャートである。図6のフローは、例えば、アプリケーションプログラムによりLUTのプリロードが指示されたことを契機として開始される。以下の説明においてOS50等のソフトウェアを処理の主体として記載することがあるが、これは、そのソフトウェアを実行しているCPU10が他のハードウェア資源と共働して処理を実行することを意味する。
3. Operation FIG. 6 is a flowchart illustrating image processing in the image forming apparatus 1. The flow in FIG. 6 is started when an LUT preload is instructed by an application program, for example. In the following description, software such as the OS 50 may be described as the subject of processing, which means that the CPU 10 executing the software executes processing in cooperation with other hardware resources. .

ステップS100において、OS50は、複数のスレッドを生成する。ここで、「スレッド」とは、プログラムにおける処理のことをいう。これらのスレッドは、LUTを分割した部分データを複数のコアに割り当てる処理、各コアに部分データの読み出しを要求させる処理、入力画像を分割し、分割された画像を各コアに割り当てる処理、および各コアに、割り当てられた部分画像のインデックス値を出力画素値に変換させる処理を含む。   In step S100, the OS 50 generates a plurality of threads. Here, “thread” means processing in a program. These threads are a process of assigning partial data obtained by dividing the LUT to a plurality of cores, a process of requesting each core to read out partial data, a process of dividing an input image and assigning the divided image to each core, and The processing includes causing the core to convert the index value of the assigned partial image into an output pixel value.

図7は、LUTの分割の概要を示す模式図である。図4の例ではN=4なので、LUTは4つの部分データに分割される。この例では、LUTは4等分される。すなわち、4つの部分データはデータサイズが等しく、かつ他の部分データと重複していない。   FIG. 7 is a schematic diagram showing an outline of LUT division. In the example of FIG. 4, since N = 4, the LUT is divided into four partial data. In this example, the LUT is divided into four equal parts. That is, the four partial data have the same data size and do not overlap with other partial data.

図8は、LUTの分割の具体例を示す図である。この例で、LUTは、P[0]〜P[K−1]のk個のエントリ値を含んでいる。LUTは、それぞれアドレスが連続した部分のみから構成される4つの部分データ(以下「部分データ#1〜#4」という)に分割される。例えば、部分データ#1はP[0]〜P[K/4−1]のK/4個のエントリ値を含んでおり、部分データ#2はP[K/4]〜P[2K/4−1]のK/4個のエントリ値を含んでおり、部分データ#3はP[2K/4]〜P[3K/4−1]のK/4個のエントリ値を含んでおり、部分データ#4はP[3K/4]〜P[K−1]のK/4個のエントリ値を含んでいる。   FIG. 8 is a diagram illustrating a specific example of LUT division. In this example, the LUT includes k entry values P [0] to P [K-1]. The LUT is divided into four partial data (hereinafter referred to as “partial data # 1 to # 4”) each consisting of only a portion having consecutive addresses. For example, partial data # 1 includes K / 4 entry values P [0] to P [K / 4-1], and partial data # 2 includes P [K / 4] to P [2K / 4. -1] includes K / 4 entry values, and partial data # 3 includes P [2K / 4] to P [3K / 4-1] K / 4 entry values, Data # 4 includes K / 4 entry values P [3K / 4] to P [K-1].

図9は、LUTの分割の他の具体例を示す図である。この例で、LUTは、各々アドレスが不連続な部分を含む4つの部分データに分割される。例えば、部分データ#1は、P[0]〜P[15]、P[64]〜P[79]、…、P[K−64]〜P[K−49]の合計K/4個のエントリ値を含んでいる。部分データ#2は、P[16]〜P[31]、P[80]〜P[95]、…、P[K−48]〜P[K−33]の合計K/4個のエントリ値を含んでいる。部分データ#3は、P[32]〜P[47]、P[96]〜P[111]、…、P[K−32]〜P[K−17]の合計K/4個のエントリ値を含んでいる。部分データ#4は、P[48]〜P[63]、P[112]〜P[127]、…、P[K−16]〜P[K−1]の合計K/4個のエントリ値を含んでいる。   FIG. 9 is a diagram illustrating another specific example of LUT division. In this example, the LUT is divided into four partial data each including a portion where the addresses are discontinuous. For example, the partial data # 1 includes P [0] to P [15], P [64] to P [79], ..., P [K-64] to P [K-49], a total of K / 4 pieces. Contains the entry value. Partial data # 2 is a total of K / 4 entry values of P [16] to P [31], P [80] to P [95], ..., P [K-48] to P [K-33]. Is included. Partial data # 3 is a total of K / 4 entry values of P [32] to P [47], P [96] to P [111], ..., P [K-32] to P [K-17]. Is included. Partial data # 4 is a total of K / 4 entry values of P [48] to P [63], P [112] to P [127], ..., P [K-16] to P [K-1]. Is included.

この例で、各部分データは、アドレスが連続した16個のエントリ値のセットを複数、含んでいる。エントリ値16個分のデータサイズは、キャッシュラインサイズに等しい。キャッシュラインサイズとは、L2キャッシュと外部メモリとの間の1回あたりの最大データ転送量(データ読み出し量)をいう。例えばDRAMにおいては、メモリセルが「バンク」と呼ばれるブロックに区分されており、異なるバンクに属するメモリセルにアクセスするには、アクセスするバンクを切り替える処理が必要である。外部メモリがDRAMを含んでいる場合において図8で例示した連続するK/4個のエントリ値が複数のバンクにまたがって記憶されているときは、外部メモリ(DRAM)は、複数のコアから並列的に発生するアクセスに対して、バンクを切り替えながらエントリ値を読み出さなければならない。   In this example, each partial data includes a plurality of sets of 16 entry values with consecutive addresses. The data size for 16 entry values is equal to the cache line size. The cache line size refers to the maximum data transfer amount (data read amount) per time between the L2 cache and the external memory. For example, in a DRAM, memory cells are divided into blocks called “banks”, and in order to access memory cells belonging to different banks, it is necessary to switch the bank to be accessed. When the external memory includes a DRAM and the consecutive K / 4 entry values illustrated in FIG. 8 are stored across a plurality of banks, the external memory (DRAM) is connected in parallel from a plurality of cores. For an access that occurs automatically, the entry value must be read while switching the bank.

いま、外部メモリを構成するDRAMが4つのバンクを含んでいる例を考える。図8の例では、まず、コア101からの要求によりP[0]〜P[15]が、コア102からの要求によりP[K/4]〜P[K/4+15]が、コア103からの要求によりP[2K/4]〜P[2K/4+15]が、コア104からの要求によりP[3K/4]〜P[3K/4+15]が、それぞれ読み出される。しかし、これらのエントリ値はそれぞれ異なるバンクに記憶されているので、DRAMは並列的にバンクを切り替えながらデータを読み出さなければならない。そのた、バンク切り替えの分だけデータ読み出しに時間がかかる。   Consider an example in which a DRAM constituting an external memory includes four banks. In the example of FIG. 8, first, P [0] to P [15] are requested from the core 101, and P [K / 4] to P [K / 4 + 15] are requested from the core 103 according to the request from the core 102. P [2K / 4] to P [2K / 4 + 15] are read by the request, and P [3K / 4] to P [3K / 4 + 15] are read by the request from the core 104, respectively. However, since these entry values are stored in different banks, the DRAM must read data while switching the banks in parallel. In addition, it takes time to read data by the amount of bank switching.

これに対し図9の例では、まず、コア101からの要求によりP[0]〜P[15]が、コア102からの要求によりP[16]〜P[31]が、コア103からの要求によりP[32]〜P[47]が、コア104からの要求によりP[48]〜P[63]が、それぞれ読み出される。これらのデータは同一のバンクに記憶されているので、DRAMはバンクを切り替えることなく高速にデータを読み出すことができる。   In contrast, in the example of FIG. 9, first, P [0] to P [15] are requested by the request from the core 101, and P [16] to P [31] are requested from the core 103 by the request from the core 102. Thus, P [32] to P [47] are read out, and P [48] to P [63] are read out according to the request from the core 104, respectively. Since these data are stored in the same bank, the DRAM can read the data at high speed without switching the bank.

再び図6を参照する。ステップS101、S111、S121、およびS141において、コア101〜コア104は、それぞれ自身に割り当てられた部分データをプリロードする。すなわち、コア101は部分データ#1を、コア102は部分データ#2を、コア103は部分データ#3を、コア104は部分データ#4を、それぞれプリロードする。各コアにおけるプリロードは並列的に行われる。その結果、L2キャッシュにはLUTがコピーされる。   Refer to FIG. 6 again. In steps S101, S111, S121, and S141, the cores 101 to 104 preload partial data assigned to the cores 101 to 104, respectively. That is, the core 101 preloads partial data # 1, the core 102 preloads partial data # 2, the core 103 preloads partial data # 3, and the core 104 preloads partial data # 4. Preloading in each core is performed in parallel. As a result, the LUT is copied to the L2 cache.

以下、コア101〜コア104において処理が並列的に行われるが、ここではコア101の処理だけ説明する。コア102〜104の処理(ステップS111〜S116,S121〜S126,S141〜S146)については、コア101の処理と同様なので説明を省略する。ステップS102において、コア101は、対象画素のデータを外部メモリから読み出す。ステップS103において、コア101は、対象画素のデータから、インデックス値を算出する。ステップS104において、コア101は、L2キャッシュに記憶されているLUTを用いて、算出されたインデックス値に対応するエントリ値を取得する。ステップS105において、コア101は、エントリ値から出力画素値を算出する。ステップS106において、コア101は、出力画素値を外部メモリに書き込む。   Hereinafter, processing is performed in parallel in the cores 101 to 104, but only the processing of the core 101 will be described here. The processing of the cores 102 to 104 (steps S111 to S116, S121 to S126, S141 to S146) is the same as the processing of the core 101, and thus the description thereof is omitted. In step S102, the core 101 reads the data of the target pixel from the external memory. In step S103, the core 101 calculates an index value from the data of the target pixel. In step S104, the core 101 acquires an entry value corresponding to the calculated index value using the LUT stored in the L2 cache. In step S105, the core 101 calculates an output pixel value from the entry value. In step S106, the core 101 writes the output pixel value in the external memory.

ステップS107において、OS50は、全てのスレッドが完了するまで待機する。コア101〜コア104に割り当てられたスレッドが全て完了した場合、OS50は、図6のフローを終了する。   In step S107, the OS 50 waits until all threads are completed. When all the threads assigned to the cores 101 to 104 are completed, the OS 50 ends the flow of FIG.

図10は、画像形成装置1におけるプリロード処理を例示するシーケンスチャートである。ここでは説明を簡単にするため、コア#1およびコア#2(例えばコア101およびコア102)の2つのコアの処理のみ図示している。   FIG. 10 is a sequence chart illustrating the preload process in the image forming apparatus 1. Here, in order to simplify the description, only the processing of two cores, core # 1 and core # 2 (for example, core 101 and core 102) is illustrated.

まず、コア#1は、L1キャッシュ#1に対し、P[0]の読み出しを要求する(ステップS201)。L1キャッシュ#1は、L2キャッシュに対し、P[0]の読み出しを要求する(ステップS202)。L2キャッシュは、外部メモリ(主記憶装置30)に対してP[0]の読み出しを要求する(ステップS203)。   First, the core # 1 requests the L1 cache # 1 to read P [0] (step S201). The L1 cache # 1 requests the L2 cache to read P [0] (step S202). The L2 cache requests the external memory (main storage device 30) to read P [0] (step S203).

ステップS201〜S203の処理と並列的に以下の処理が行われる。コア#2は、L1キャッシュ#2に対し、P[1]の読み出しを要求する(ステップS204)。L1キャッシュ#2は、L2キャッシュに対し、P[1]の読み出しを要求する(ステップS205)。L2キャッシュは、外部メモリ(主記憶装置30)に対してP[1]の読み出しを要求する(ステップS206)。   The following processing is performed in parallel with the processing of steps S201 to S203. The core # 2 requests the L1 cache # 2 to read P [1] (step S204). The L1 cache # 2 requests the L2 cache to read P [1] (step S205). The L2 cache requests the external memory (main storage device 30) to read P [1] (step S206).

外部メモリは、コア#1からの要求に応じて、記憶しているデータのうちP[0]をL2キャッシュに出力する(ステップS207)。L2キャッシュは、P[0]をL1キャッシュ#1に出力する(ステップS208)。L1キャッシュ#1は、P[0]をコア#1に出力する(ステップS209)。   The external memory outputs P [0] of the stored data to the L2 cache in response to a request from the core # 1 (step S207). The L2 cache outputs P [0] to the L1 cache # 1 (step S208). The L1 cache # 1 outputs P [0] to the core # 1 (step S209).

ステップS207〜S209の処理と並列的に以下の処理が行われる。外部メモリは、コア#2からの要求に応じて、記憶しているデータのうちP[1]をL2キャッシュに出力する(ステップS210)。L2キャッシュは、P[1]をL1キャッシュ#1に出力する(ステップS211)。L1キャッシュ#1は、P[1]をコア#1に出力する(ステップS212)。以上で、P[0]およびP[1]のプリロードが完了する。   The following processing is performed in parallel with the processing of steps S207 to S209. The external memory outputs P [1] of the stored data to the L2 cache in response to a request from the core # 2 (step S210). The L2 cache outputs P [1] to the L1 cache # 1 (step S211). The L1 cache # 1 outputs P [1] to the core # 1 (step S212). Thus, preloading of P [0] and P [1] is completed.

図3のフローと対比すると、図10のフローではP[0]およびP[1]のプリロードが完了するまでの時間が短縮されていることがわかる。   In contrast to the flow of FIG. 3, it can be seen that the time until the preloading of P [0] and P [1] is completed is shortened in the flow of FIG.

4.変形例
本発明は上述の実施形態に限定されず、種々の変形実施が可能である。以下、変形例をいくつか説明する。以下の変形例のうち2つ以上のものが組み合わせて用いられてもよい。
4). Modifications The present invention is not limited to the above-described embodiments, and various modifications can be made. Hereinafter, some modifications will be described. Two or more of the following modifications may be used in combination.

4−1.変形例1
図11は、変形例1に係るLUTの分割方法の概要を示す図である。LUTの分割方法は実施形態で説明した例に限定されない。この例では、4つの分割データのデータサイズは等しくなく、また互いに一部が重複している。さらに、4つの分割データを合わせても主記憶装置30に記憶されているLUTは完全に再現されず、一部のエントリ値が欠落している。これは以下の場合に有効である。例えば、アプリケーションプログラム等のソフトウェアコンポーネントが、LUTのうち、対象画像を画像処理する際に用いられる部分を特定する。OS50は、こうして特定された部分をカバーするようにLUTを分割する。
4-1. Modification 1
FIG. 11 is a diagram showing an outline of the LUT dividing method according to the first modification. The LUT dividing method is not limited to the example described in the embodiment. In this example, the data sizes of the four divided data are not equal, and some of them overlap each other. Further, even if the four pieces of divided data are combined, the LUT stored in the main storage device 30 is not completely reproduced, and some entry values are missing. This is effective in the following cases. For example, a software component such as an application program specifies a portion of the LUT that is used when image processing is performed on the target image. The OS 50 divides the LUT so as to cover the part thus specified.

4−2.変形例2
変形例1においてさらに、アプリケーションプログラム等のソフトウェアコンポーネントは、LUTのうち画像処理で用いられる部分が、コア毎に特定されてもよい。この場合、OS50は、コア毎に用いられる部分を含むようにLUTを分割する。図11の例で、部分データ#1は対象画像のうちコア101が担当する領域の画像処理に用いられるエントリ値をカバーしている。同様に、部分データ#2は対象画像のうちコア102が担当する領域の、部分データ#3は対象画像のうちコア103が担当する領域の、部分データ#4は対象画像のうちコア104が担当する領域の、画像処理に用いられるエントリ値をカバーしている。各部分データのサイズがL1キャッシュの容量よりも小さければ、各コアは必要なエントリ値をL1キャッシュから直に読み取ることができ、処理がより高速化される。
4-2. Modification 2
Further, in the first modification, in the software component such as an application program, a part used in image processing in the LUT may be specified for each core. In this case, the OS 50 divides the LUT so as to include a portion used for each core. In the example of FIG. 11, the partial data # 1 covers entry values used for image processing of an area handled by the core 101 in the target image. Similarly, partial data # 2 is an area of the target image that is handled by the core 102, partial data # 3 is an area of the target image that is handled by the core 103, and partial data # 4 is an area of the target image that is handled by the core 104. The entry value used for image processing of the area to be covered is covered. If the size of each partial data is smaller than the capacity of the L1 cache, each core can read the required entry value directly from the L1 cache, and the processing is further accelerated.

4−3.変形例3
主記憶装置30に記憶されるデータおよびこれを用いた処理は実施形態で例示したものに限定されない。主記憶装置30に記憶されるデータは、例えば各コアで実行されるコード(命令)であってもよい。この場合、コアは、指定されるアドレスに記憶されているコードを読み出し、読み出したコードを実行する。このコードキャッシュメモリにプリロードされる。
4-3. Modification 3
Data stored in the main storage device 30 and processing using the same are not limited to those exemplified in the embodiment. The data stored in the main storage device 30 may be, for example, a code (instruction) executed in each core. In this case, the core reads the code stored at the designated address and executes the read code. The code cache memory is preloaded.

4−4.他の変形例
CPU10の構成は図2に例示したものに限定されない。コアの数やキャッシュメモリの階層構造はあくまで例示である。CPU10は、少なくとも、第2キャッシュメモリを共用する2つのコアを有して入ればよい。CPU10は、L2キャッシュの下層にL3キャッシュを有していてもよい。
4-4. Other Modifications The configuration of the CPU 10 is not limited to that illustrated in FIG. The number of cores and the hierarchical structure of the cache memory are merely examples. The CPU 10 may have at least two cores sharing the second cache memory. The CPU 10 may have an L3 cache below the L2 cache.

また、CPU10は、物理的に1つのチップに複数のコアおよびキャッシュメモリを搭載したものに限定されない。複数のCPUチップで1つのキャッシュメモリを共用する情報処理装置に対し、本発明が適用されてもよい。   Further, the CPU 10 is not limited to one in which a plurality of cores and a cache memory are physically mounted on one chip. The present invention may be applied to an information processing apparatus in which a plurality of CPU chips share one cache memory.

さらに、実施形態における「複数のコア」は物理的に異なる複数のコアに限定されない。物理的に1つのコアが、時分割で論理的に(擬似的に)複数のコアとして用いられてもよい。   Furthermore, the “plurality of cores” in the embodiments is not limited to a plurality of physically different cores. One physical core may be used as a plurality of cores in a logical (pseudo) manner in a time division manner.

また、CPU10は、物理的に1つのチップに複数のコアおよびキャッシュメモリを搭載したものに限定されない。複数のCPUチップで1つのキャッシュメモリを共用する情報処理装置に対し、本発明が適用されてもよい。   Further, the CPU 10 is not limited to one in which a plurality of cores and a cache memory are physically mounted on one chip. The present invention may be applied to an information processing apparatus in which a plurality of CPU chips share one cache memory.

本発明に係る情報処理装置は、図2に例示した画像形成装置1に限定されない。CPU10を用いて複数の処理を並列実行するものであれば、情報処理装置はどのような装置であってもよい。例えば、情報処理装置は、パーソナルコンピュータ、スマートフォン、またはタブレット端末であってもよい。   The information processing apparatus according to the present invention is not limited to the image forming apparatus 1 illustrated in FIG. As long as a plurality of processes are executed in parallel using the CPU 10, the information processing apparatus may be any apparatus. For example, the information processing apparatus may be a personal computer, a smartphone, or a tablet terminal.

1…画像形成装置、10…CPU、20…メモリコントローラー、30…主記憶装置、40…IOコントローラー、41…補助記憶装置、42…画像読み取りユニット、43…画像形成ユニット、44…通信ユニット、50…OS、51…割り当て手段、90…CPU、101〜104…コア、111〜114…キャッシュメモリ(L1)、121…キャッシュメモリ(L2)、901〜904…コア、911〜914…キャッシュメモリ(L1)、921…キャッシュメモリ(L2) DESCRIPTION OF SYMBOLS 1 ... Image forming apparatus, 10 ... CPU, 20 ... Memory controller, 30 ... Main storage device, 40 ... IO controller, 41 ... Auxiliary storage device, 42 ... Image reading unit, 43 ... Image forming unit, 44 ... Communication unit, 50 ... OS, 51 ... Allocation means, 90 ... CPU, 101-104 ... Core, 111-114 ... Cache memory (L1), 121 ... Cache memory (L2), 901-904 ... Core, 911-914 ... Cache memory (L1) ), 921... Cache memory (L2)

Claims (7)

第1コアと、
前記第1コアと並列処理を行う第2コアと、
前記第1コアおよび前記第2コアで共用されるキャッシュメモリと、
データを記憶した外部メモリと
を有し、
前記第1コアは、
前記データの一部である第1部分データを要求する第1要求手段を有し、
前記第2コアは、
前記データのうち前記第1部分データと異なる一部である第2部分データを要求する第2要求手段を有し、
前記キャッシュメモリは、
前記第1要求手段からの要求および前記第2要求手段からの要求に応じて、前記第1部分データおよび前記第2部分データを前記外部メモリから読み出す読み出し手段を有し、
前記第1コアおよび前記第2コアは、それぞれ、前記キャッシュメモリに記憶されている前記第1部分データおよび前記第2部分データの少なくとも一部を用いた処理を行う
情報処理装置。
A first core;
A second core that performs parallel processing with the first core;
A cache memory shared by the first core and the second core;
And an external memory storing data,
The first core is
First request means for requesting first partial data which is a part of the data;
The second core is
Second request means for requesting second partial data that is a part of the data different from the first partial data;
The cache memory is
In response to a request from the first requesting unit and a request from the second requesting unit, the reading unit reads out the first partial data and the second partial data from the external memory,
Each of the first core and the second core performs processing using at least a part of the first partial data and the second partial data stored in the cache memory, respectively.
前記第1コアおよび前記第2コアを含むN個のコアと、
前記データを、各々アドレスが連続した部分のみから構成されるN個の部分データに等分し、各部分データを前記N個のコアのいずれかに割り当てる割り当て手段と
を有する請求項1に記載の情報処理装置。
N cores including the first core and the second core;
2. The allocation unit according to claim 1, further comprising: an assigning unit that equally divides the data into N pieces of partial data each consisting of only a portion having consecutive addresses, and assigns each piece of partial data to one of the N cores. Information processing device.
前記第1コアおよび前記第2コアを含むN個のコアと、
前記データを、各々アドレスが不連続な部分を含むN個の部分データに等分し、各部分データを前記N個のコアのいずれかに割り当てる割り当て手段と
を有する請求項1に記載の情報処理装置。
N cores including the first core and the second core;
2. The information processing according to claim 1, further comprising: an assigning unit that equally divides the data into N pieces of partial data each including a portion in which addresses are discontinuous, and assigns each piece of partial data to one of the N cores. apparatus.
前記外部メモリはDRAMを含み、
前記N個の部分データの各々は、アドレスが連続した部分を含み、
前記アドレスが連続した部分のデータサイズは、前記読み出し手段が前記DRAMからデータを読み出す際の1回当たりのデータ読み出し量以下である
ことを特徴とする請求項2または3に記載の情報処理装置。
The external memory includes a DRAM;
Each of the N partial data includes a portion where addresses are continuous,
4. The information processing apparatus according to claim 2, wherein a data size of a portion where the addresses are continuous is equal to or less than a data read amount per time when the reading unit reads data from the DRAM.
前記第1コアおよび前記第2コアにおける処理は、画素に対応するインデックスを画素値に変換する処理であり、
前記データは、前記インデックスを前記画素値に変換するためのテーブルである
ことを特徴とする請求項1ないし4のいずれか一項に記載の情報処理装置。
The processing in the first core and the second core is processing for converting an index corresponding to a pixel into a pixel value,
The information processing apparatus according to any one of claims 1 to 4, wherein the data is a table for converting the index into the pixel value.
第1コアと、
前記第1コアと並列処理を行う第2コアと、
前記第1コア専用の第1キャッシュメモリと、
前記第2コア専用の第2キャッシュメモリと、
前記第1コアおよび前記第2コアで共用されるキャッシュメモリと、
データを記憶した外部メモリと
を有し、
前記第1コアは、
前記データの一部である第1部分データを要求する第1要求手段を有し、
前記第2コアは、
前記データのうち前記第1部分データと異なる一部である第2部分データを要求する第2要求手段を有し、
前記第1キャッシュメモリは、
前記第1要求手段からの要求に応じて、前記第1部分データを前記外部メモリから取得する第1取得手段を有し、
前記第2キャッシュメモリは、
前記第2要求手段からの要求に応じて、前記第2部分データを前記外部メモリから取得する第2取得手段を有し、
前記第1コアは、前記第1キャッシュメモリに記憶されている前記第1部分データを用いた処理を行い、
前記第2コアは、前記第2キャッシュメモリに記憶されている前記第2部分データを用いた処理を行う
情報処理装置。
A first core;
A second core that performs parallel processing with the first core;
A first cache memory dedicated to the first core;
A second cache memory dedicated to the second core;
A cache memory shared by the first core and the second core;
And an external memory storing data,
The first core is
First request means for requesting first partial data which is a part of the data;
The second core is
Second request means for requesting second partial data that is a part of the data different from the first partial data;
The first cache memory is
In response to a request from the first request means, the first acquisition means for acquiring the first partial data from the external memory;
The second cache memory is
In response to a request from the second request means, the second acquisition means for acquiring the second partial data from the external memory;
The first core performs processing using the first partial data stored in the first cache memory,
The second core performs processing using the second partial data stored in the second cache memory.
請求項1ないし6のいずれか一項に記載の情報処理装置と、
前記第1コアおよび前記第2コアで処理された結果に応じて画像を形成する画像形成手段と
を有する画像形成装置。
An information processing apparatus according to any one of claims 1 to 6,
An image forming apparatus comprising: an image forming unit that forms an image according to a result processed by the first core and the second core.
JP2015180603A 2015-09-14 2015-09-14 Information processing apparatus and image forming apparatus Active JP6701650B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015180603A JP6701650B2 (en) 2015-09-14 2015-09-14 Information processing apparatus and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015180603A JP6701650B2 (en) 2015-09-14 2015-09-14 Information processing apparatus and image forming apparatus

Publications (2)

Publication Number Publication Date
JP2017058738A true JP2017058738A (en) 2017-03-23
JP6701650B2 JP6701650B2 (en) 2020-05-27

Family

ID=58391592

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015180603A Active JP6701650B2 (en) 2015-09-14 2015-09-14 Information processing apparatus and image forming apparatus

Country Status (1)

Country Link
JP (1) JP6701650B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102021108857A1 (en) 2020-04-15 2021-10-21 Denso Corporation MULTIPROCESSOR SYSTEM
JP7000748B2 (en) 2017-09-04 2022-01-19 富士フイルムビジネスイノベーション株式会社 Image processing equipment, semiconductor equipment and programs

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844678A (en) * 1994-07-29 1996-02-16 Canon Inc Device and system for processing image
JPH11259318A (en) * 1998-03-13 1999-09-24 Hitachi Ltd Dispatch system
JP2000293709A (en) * 1999-02-03 2000-10-20 Toshiba Corp Device, system and method for processing picture
JP2003179923A (en) * 2001-12-12 2003-06-27 Nec Corp Decoding system for dynamic image compression coded signal and method for decoding, and program for decoding
JP2005078264A (en) * 2003-08-29 2005-03-24 Matsushita Electric Ind Co Ltd Computer system, compiler device and operating system
JP2005286625A (en) * 2004-03-29 2005-10-13 Canon Inc Image processing apparatus and method thereof
WO2014132608A1 (en) * 2013-02-26 2014-09-04 日本電気株式会社 Parallel processing device, parallel processing method, and parallel processing program storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844678A (en) * 1994-07-29 1996-02-16 Canon Inc Device and system for processing image
JPH11259318A (en) * 1998-03-13 1999-09-24 Hitachi Ltd Dispatch system
JP2000293709A (en) * 1999-02-03 2000-10-20 Toshiba Corp Device, system and method for processing picture
US20030174132A1 (en) * 1999-02-03 2003-09-18 Kabushiki Kaisha Toshiba Image processing unit, image processing system using the same, and image processing method
JP2003179923A (en) * 2001-12-12 2003-06-27 Nec Corp Decoding system for dynamic image compression coded signal and method for decoding, and program for decoding
JP2005078264A (en) * 2003-08-29 2005-03-24 Matsushita Electric Ind Co Ltd Computer system, compiler device and operating system
US20050071572A1 (en) * 2003-08-29 2005-03-31 Kiyoshi Nakashima Computer system, compiler apparatus, and operating system
JP2005286625A (en) * 2004-03-29 2005-10-13 Canon Inc Image processing apparatus and method thereof
WO2014132608A1 (en) * 2013-02-26 2014-09-04 日本電気株式会社 Parallel processing device, parallel processing method, and parallel processing program storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7000748B2 (en) 2017-09-04 2022-01-19 富士フイルムビジネスイノベーション株式会社 Image processing equipment, semiconductor equipment and programs
DE102021108857A1 (en) 2020-04-15 2021-10-21 Denso Corporation MULTIPROCESSOR SYSTEM

Also Published As

Publication number Publication date
JP6701650B2 (en) 2020-05-27

Similar Documents

Publication Publication Date Title
TWI512466B (en) Efficient memory virtualization in multi-threaded processing units
JP6069031B2 (en) Computer and memory management method
TWI525437B (en) Efficient memory virtualization in multi-threaded processing units
TWI750176B (en) Electronic device performing software training on memory channel, memory channel training method thereof and system thereof
US20140359225A1 (en) Multi-core processor and multi-core processor system
JP6244949B2 (en) Information processing apparatus, control method, and control program
JP5706754B2 (en) Data processing apparatus and data processing method
JP2009020696A (en) Information proceing apparatus and system
JP6701650B2 (en) Information processing apparatus and image forming apparatus
CN113312182B (en) Cloud computing node, file processing method and device
JP2015158894A (en) Image forming apparatus, data transfer control method for image forming processing, and data transfer control program for image forming processing
CN107250995B (en) Memory management device
US10216634B2 (en) Cache directory processing method for multi-core processor system, and directory controller
CN107368431B (en) Memory access method, cross switch and computer system
JP5254710B2 (en) Data transfer device, data transfer method and processor
JP2018132948A (en) Loading program, loading method, and information processing device
JP2016024578A (en) Information processing apparatus, control method thereof, and control program thereof
JP4703753B2 (en) Information processing apparatus, semiconductor memory device, and program
JP2008090455A (en) Multiprocessor signal processor
JP2009020695A (en) Information processing apparatus and system
JP7225904B2 (en) Vector operation processing device, array variable initialization method by vector operation processing device, and array variable initialization program by vector operation processing device
CN112783823A (en) Code sharing system and code sharing method
JP2010026969A (en) Data processor
JP2008210280A (en) Semiconductor device and dma controller
JP7346883B2 (en) Vector processor device and generation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180717

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190328

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190910

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191018

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200407

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200420

R150 Certificate of patent or registration of utility model

Ref document number: 6701650

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350