[go: up one dir, main page]

JP2011034370A - Memory controller - Google Patents

Memory controller Download PDF

Info

Publication number
JP2011034370A
JP2011034370A JP2009180330A JP2009180330A JP2011034370A JP 2011034370 A JP2011034370 A JP 2011034370A JP 2009180330 A JP2009180330 A JP 2009180330A JP 2009180330 A JP2009180330 A JP 2009180330A JP 2011034370 A JP2011034370 A JP 2011034370A
Authority
JP
Japan
Prior art keywords
data
block
memory
map information
compressed
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
JP2009180330A
Other languages
Japanese (ja)
Other versions
JP5526641B2 (en
Inventor
Hidetoshi Matsumura
秀敏 松村
Yasushi Sukama
康 洲鎌
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009180330A priority Critical patent/JP5526641B2/en
Publication of JP2011034370A publication Critical patent/JP2011034370A/en
Application granted granted Critical
Publication of JP5526641B2 publication Critical patent/JP5526641B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System (AREA)

Abstract

【課題】動画像のデコード・エンコード処理または三次元グラフィックス描画処理で使用されるのに適した機能を有するメモリコントローラを提供する。
【解決手段】入力された画像データは、圧縮処理される。圧縮処理の結果、データ量が少なくなった場合には、圧縮データを、少なくならなかった場合には、非圧縮のデータをメモリに格納する。データが圧縮されなかったとした場合にデータを所定サイズで分割して格納する領域ブロックをメモリ内に設け、圧縮された場合、されなかった場合のいずれの場合にも、データを領域ブロックの先頭アドレスから格納する。データの格納先頭アドレスと、データ量および、データが圧縮データか非圧縮データかを示す情報は、マップ情報として、別途格納しておく。
【選択図】図1
A memory controller having a function suitable for use in a moving image decoding / encoding process or a three-dimensional graphics drawing process is provided.
Input image data is subjected to compression processing. If the amount of data decreases as a result of the compression process, the compressed data is stored in the memory. If not, the uncompressed data is stored in the memory. If the data is not compressed, an area block is provided in the memory to divide and store the data by a predetermined size. If the data is compressed or not, the data is stored at the start address of the area block. Store from. The storage start address of data, the amount of data, and information indicating whether the data is compressed data or non-compressed data are stored separately as map information.
[Selection] Figure 1

Description

本発明は、メモリへのアクセスを制御するメモリコントローラに関する。   The present invention relates to a memory controller that controls access to a memory.

MPEGのエンコーダ・デコーダのフレームメモリは、デコード・エンコード処理機能を有するLSIに外付けされるか、または同一パッケージに封入されるSDRAM/DDR−SDRAM等で実現されるのが一般的である。   A frame memory of an MPEG encoder / decoder is generally realized by an SDRAM / DDR-SDRAM or the like externally attached to an LSI having a decoding / encoding processing function or enclosed in the same package.

ハイビジョン放送、大容量光ディスクなどの普及により、動画像の符号化、復号においてHDTV画像(High Definition TV:1920x1080)を扱うことが一般的になってきている。今後、更に大画面のUHDTV画像(Ultra High Definition TV:7680x4320、3840x2160)を使用することが検討されており、MPEGのデコーダ・エンコーダの更なる処理性能向上が望まれている。同様に三次元グラフィックス描画処理においても表示デバイスの高解像度化、描画画像の高品位化により高品質の描画処理が求められている。このような傾向は、デコーダ・エンコーダ機能または三次元グラフィックス描画機能を有するLSIと外付けSDRAM間に要求される帯域も増大する事を意味する。この帯域を増加する手段としては、SDRAM素子数の増加、採用SDRAMのビット幅(LSIピン数)増加、クロック周波数の向上等が考えられるが、その結果として、システム全体の高価格化、消費電力の増大等が引き起こされるため、何らかの手段でSDRAMに対する要求帯域を削減する技術が求められている。この問題に対処する方法として、MPEGなどの画像の符号化・復号とは別に、SDRAMに画像データを圧縮して格納することが考えられる。画像データを圧縮して格納しておくと、画像データをSDRAMから読み出したり、SDRAMに格納する場合に転送するデータ量が減少するので、1回のアクセスで転送するデータ量を少なくすることができ、SDRAMに対する要求帯域を削減することができる。   With the widespread use of high-definition broadcasting, large-capacity optical discs, etc., it has become common to handle HDTV images (High Definition TV: 1920x1080) in encoding and decoding of moving images. In the future, the use of UHDTV images with a larger screen (Ultra High Definition TV: 7680x4320, 3840x2160) is being studied, and further improvement in the processing performance of the MPEG decoder / encoder is desired. Similarly, in 3D graphics drawing processing, high-quality drawing processing is required due to higher resolution of display devices and higher quality of drawn images. This tendency means that the bandwidth required between the LSI having the decoder / encoder function or the three-dimensional graphics drawing function and the external SDRAM is also increased. As means for increasing this bandwidth, an increase in the number of SDRAM elements, an increase in the bit width (number of LSI pins) of the adopted SDRAM, an improvement in clock frequency, etc. can be considered. Therefore, a technique for reducing the required bandwidth for SDRAM by some means is required. As a method for coping with this problem, it is conceivable to store the compressed image data in the SDRAM separately from the encoding / decoding of the image such as MPEG. If the image data is compressed and stored, the amount of data transferred when the image data is read from the SDRAM or stored in the SDRAM decreases, so the amount of data transferred in one access can be reduced. The required bandwidth for the SDRAM can be reduced.

従来技術としては、以下のような技術があった。例えば、復号結果画像を非可逆な手段(たとえば、間引き)で圧縮する技術や、可逆圧縮方式を用いて、フレームメモリ用の圧縮/展開を行なう技術などがある。   As the prior art, there are the following techniques. For example, there are a technique for compressing a decoding result image by irreversible means (for example, thinning), a technique for performing compression / decompression for a frame memory using a reversible compression method, and the like.

更には、可逆圧縮を用いており、参照対象となるI/Pピクチャに対しては、任意のブロックに対するアクセスが可能な手段を提供するものなどがあった。
したがって、動画像のデコード・エンコード処理または、三次元グラフィックス描画処理を行うLSIで使用するメモリコントローラは、以下のような機能を持つことが望ましい。
・メモリのデータの圧縮方法が可逆性を備える
・データへのアクセスがランダムアクセス性を備える
・保存・圧縮対象となる主データ以外に必要となる管理情報がなるべく小さい
・いかなるデータ、アクセスにおいてもメモリ使用量、メモリ帯域を非圧縮状態より低く抑えることができる。
Furthermore, lossless compression is used, and for an I / P picture to be referred to, there is provided a means capable of accessing an arbitrary block.
Therefore, it is desirable that a memory controller used in an LSI that performs moving image decoding / encoding processing or three-dimensional graphics rendering processing has the following functions.
-Memory data compression method has reversibility-Data access has random accessibility-Storage-Management information required other than main data to be compressed is as small as possible-Memory for any data and access The usage amount and the memory bandwidth can be kept lower than the uncompressed state.

特開2007−266970号公報JP 2007-266970 A 特開2008−227888号公報JP 2008-227888 A 特開平10−224805号公報JP-A-10-224805 特開平11−234492号公報Japanese Patent Laid-Open No. 11-234492 特開平10−136179号公報Japanese Patent Laid-Open No. 10-136179

本発明の課題は、メモリに要求される帯域を削減することのできるメモリコントローラを提供することである。   An object of the present invention is to provide a memory controller capable of reducing a bandwidth required for a memory.

本発明のメモリコントローラは、メモリへのアクセスを制御するメモリコントローラにおいて、入力データをブロックに分割し、圧縮する圧縮部と、該圧縮されたデータの該ブロックが、非圧縮の場合に比べ、データ量が少なくなった場合には、圧縮されたデータのブロックを、少なくならなかった場合には、非圧縮データのブロックを、該非圧縮のデータのブロックを格納可能なように、各領域ブロックに分割されたメモリの格納領域の先頭アドレスから、メモリに格納させる格納部と、該メモリに格納されたデータのブロックに対応する格納領域に、データ量、データが圧縮データか非圧縮データかを示す情報からなるマップ情報を別途格納するマップ情報格納部とを備える。   The memory controller according to the present invention is a memory controller that controls access to a memory. The memory controller divides input data into blocks and compresses the compressed data, and the compressed data is compared with the case where the compressed data is not compressed. If the amount decreases, the compressed data block is divided into blocks, and if not, the uncompressed data block is divided into area blocks so that the uncompressed data block can be stored. Information indicating the amount of data and whether the data is compressed or uncompressed data in the storage unit to be stored in the memory and the storage area corresponding to the block of data stored in the memory from the start address of the storage area of the recorded memory A map information storage unit for separately storing map information consisting of

開示の装置によれば、メモリに要求される帯域を削減することのできるメモリコントローラを提供することができる。   According to the disclosed apparatus, it is possible to provide a memory controller capable of reducing the bandwidth required for the memory.

本実施形態に従ったメモリコントローラを示すブロック図である。It is a block diagram which shows the memory controller according to this embodiment. 書き込み制御部による一つの書き込みリクエストの処理のフローである。It is a flow of processing of one write request by the write control unit. 読み出し制御部による一つの読み出しリクエストの処理フローである。It is a processing flow of one read request by the read control unit. 本実施形態によるメモリコントローラをH.264のデコーダのメモリコントローラとして適用した例を示す図である。It is a figure which shows the example which applied the memory controller by this embodiment as a memory controller of the decoder of H.264. 本実施形態に従った書き込み処理および読み出し処理の動作を説明する図(その1)である。It is FIG. (1) explaining operation | movement of the write-in process according to this embodiment, and a read-out process. 本実施形態に従った書き込み処理および読み出し処理の動作を説明する図(その2)である。It is FIG. (2) explaining operation | movement of the write-in process according to this embodiment, and a read-out process. 本実施形態に従った書き込み処理および読み出し処理の動作を説明する図(その3)である。It is FIG. (3) explaining operation | movement of the write-in process according to this embodiment, and a read-out process. 上記実施形態のマップ情報メモリ、SDRAMのマップ情報のデータ構造を説明する図(その1)である。FIG. 3 is a diagram (part 1) illustrating a data structure of map information of the map information memory and the SDRAM of the embodiment. 上記実施形態のマップ情報メモリ、SDRAMのマップ情報のデータ構造を説明する図(その2)である。FIG. 6 is a diagram (part 2) illustrating a data structure of map information of the map information memory and the SDRAM of the embodiment. 上記実施形態のマップ情報メモリ、SDRAMのマップ情報のデータ構造を説明する図(その3)である。FIG. 6 is a third diagram illustrating the data structure of map information in the map information memory and the SDRAM according to the embodiment.

本発明の実施形態に従ったメモリコントローラは、以下の構成を備える。
・メモリ内に確保される各領域ブロックがどの方式(2つ以上から選択可能。うちひとつは非圧縮、他は可逆圧縮)で記憶されたかどうか、及び、どの程度のデータサイズに圧縮できたかを示すマップ情報を保持する機能。ここで、メモリ内は、データを所定のデータサイズで分割したデータのブロックを格納する領域ブロックに分割されているとする。また、データサイズは、メモリへの書き込み時および読み出し時のメモリアクセスにおけるアクセス単位(ユニット)が何個分かで示す。ここで、メモリに格納されるデータの圧縮方法は限定しないこととする。各領域ブロックに格納されるデータが非圧縮と可逆圧縮の2通りあるのは、データの圧縮方法によっては、データに処理を行った場合、データ量が圧縮されず、かえって、増加する場合があることによる。データの圧縮処理を行って、実際に、データの量が圧縮された場合にのみ、データを圧縮された状態で格納し、データ量が圧縮されなかった場合には、非圧縮のデータを格納するようにすることを意図している。
A memory controller according to an embodiment of the present invention has the following configuration.
・ Whether each area block reserved in the memory is stored by which method (two or more can be selected, one of which is uncompressed, the other is lossless compression), and how much data size can be compressed A function that holds map information. Here, it is assumed that the memory is divided into area blocks for storing blocks of data obtained by dividing data by a predetermined data size. The data size indicates the number of access units (units) in memory access at the time of writing to and reading from the memory. Here, the compression method of the data stored in the memory is not limited. There are two types of data stored in each area block: uncompressed and lossless compression. Depending on the data compression method, the amount of data may not be compressed and may increase instead. It depends. Compress data and store data in a compressed state only when the amount of data is actually compressed, and store uncompressed data when the amount of data is not compressed Is intended to be

・書き込み時、データのブロック毎に前記可逆圧縮方式で圧縮することにより、非圧縮時よりもデータ量が少ないデータとなるかどうかを判定し、少なくなるデータのブロックは、圧縮したデータを、メモリ内の領域ブロック内の定められた位置に書き込み、データ量が多くなるデータのブロックは、非圧縮のデータを領域ブロックにそのまま書き込み、ブロック毎の方式選択結果(どの方式を使ったか)及び圧縮後のデータサイズをマップ情報保持機能に送る書き込み機能。ここで、分割されたデータ(データのブロック)が、圧縮された場合には、圧縮されたデータを、メモリ内の領域ブロックの先頭から格納する。圧縮されたデータは、非圧縮のデータよりデータ量が少なくなっているので、領域ブロックには、圧縮されたデータが格納されている部分と、空き領域となっている部分とが生じる。次の分割されたデータを格納する場合には、前の領域ブロックの空き領域につめて格納するのではなく、次の領域ブロックの先頭から格納する。したがって、メモリ内は、圧縮されたデータが格納される場合には、圧縮データが格納されている部分と空き領域となっている部分が交互に生じる状態となる。なお、マップ情報は、マップ情報の内容により、データ量が大きくなってしまうことがある。マップ情報は、メモリの領域ブロックに対応して、データ領域が分割されたものとする。メモリ内のどの領域ブロックのデータを読み出すかに対応して、どのデータ領域からマップ情報を読み込んだら良いかが分かるようにする。以上のようにすると、マップ情報は、圧縮/非圧縮の別と、データ量の情報のみでよくなり、マップ情報のデータ量が少なくてすむ。 ・ When writing, compress each block of data with the lossless compression method to determine whether the amount of data will be smaller than when uncompressed. For data blocks that are written to a specified position in the area block and the amount of data is large, uncompressed data is written to the area block as it is, the method selection result for each block (which method was used) and after compression Write function that sends the data size of the map to the map information holding function. Here, when the divided data (block of data) is compressed, the compressed data is stored from the head of the area block in the memory. Since the compressed data has a smaller data amount than the non-compressed data, the area block includes a part where the compressed data is stored and a part which is a free area. When storing the next divided data, the data is not stored in the empty area of the previous area block but stored from the head of the next area block. Therefore, in the memory, when compressed data is stored, a portion where the compressed data is stored and a portion which is an empty area are alternately generated. Note that the map information may have a large data amount depending on the content of the map information. In the map information, it is assumed that the data area is divided corresponding to the area block of the memory. Corresponding to which area block data in the memory is read, it is made to know from which data area the map information should be read. As described above, the map information only needs to be information on the data amount, whether it is compression or non-compression, and the data amount of the map information can be reduced.

・読み出し時、マップ情報保持機能からアクセス対象となる領域を含むブロックのマップ情報を取り出し、非圧縮領域ブロックはブロック内の全データをそのまま、圧縮ブロックはブロック内の定められた位置(書き込み時に圧縮データを書き込んだ位置)及び定められたサイズのデータのみを読み出し、圧縮データから元のデータを復元する読み込み機能。 -When reading, the map information of the block including the area to be accessed is extracted from the map information holding function. The uncompressed area block retains all the data in the block as it is, and the compressed block is defined in the block (compressed when writing). Read function that reads only the data of the specified position) and the specified size and restores the original data from the compressed data.

・前記の可逆圧縮方法は分割したデータ内の情報のみを用いた圧縮手法とする(隣接するデータの情報を用いないことで圧縮率は低下するが、格納後に読み出す際のランダムアクセス性に優れる)。 The above lossless compression method uses a compression method that uses only the information in the divided data (the compression ratio is reduced by not using the information of adjacent data, but the random accessibility when reading after storage is excellent) .

・以下の条件を備える事(いかなるアクセスに対しても無圧縮時より帯域を消費しないための条件)
・・メモリコントローラの制御対象となるメモリの最小アクセス単位(以下ユニットと記載)を複数個まとめたものをデータのブロックとする(これはビット幅×最小バースト長になる。たとえば16bit DDR2−SDRAMでは16×4=64bit)。
・・このメモリコントローラに対する1つの読み出し/書き込みリクエストは、1つ以上の領域ブロックへのアクセスになり、各領域ブロックへのアクセスはひとつ以上のユニットへのアクセスになる。全てのユニットに格納されているデータが無圧縮であった場合に、領域ブロックへのアクセスでアクセスされるユニット数の全アクセスリクエスト中での最小値をm(ここでは、1ブロックのサイズが一定ではなく、ブロックごとに異なる場合も考慮してこのように記載している。最小値mというのは、もっとも小さいブロックのユニット数である。1ブロックを構成するユニットの個数が一定の場合には、1ブロックのユニット数がmとなる)、ユニットのビット数をnビットすると、ブロックの圧縮結果はm×nビット以下(非圧縮時のデータサイズ以下)である事。この意味は、以下の通りである。読み出し/書き込みリクエストの単位をユニットと呼び、無圧縮の場合の領域ブロック内のデータを読むときのユニット数をmとし、ユニットのビット数をnビットとする。すると、無圧縮の場合の領域データの量は、m×nビットとなる。そして、圧縮結果のデータの量が、m×nビット以下となる場合には、圧縮結果が、無圧縮の場合よりもデータ量が小さくなっていることを意味する。mとnは、メモリコントローラの設計の際に決定されるので、m×nビットは予め分かる量である。したがって、圧縮結果が、予め分かるm×nビットよりも小さくなる場合には、データ量が小さくできたことになるので、圧縮結果のデータをメモリに格納するようにするというものである。この条件を満たすことで、メモリへのアクセスの帯域が絶対に増加しないということを確保する効果がある。
-Prepare the following conditions (conditions for consuming no bandwidth from uncompressed for any access)
..A data block is composed of a plurality of minimum access units (hereinafter referred to as units) of a memory to be controlled by the memory controller (this is a bit width × minimum burst length. For example, in a 16-bit DDR2-SDRAM 16 × 4 = 64bit).
A single read / write request to this memory controller is an access to one or more area blocks, and an access to each area block is an access to one or more units. When the data stored in all units is uncompressed, the minimum value in all access requests for the number of units accessed by accessing the area block is m (here, the size of one block is constant) The minimum value m is the number of units of the smallest block.If the number of units constituting one block is constant, the minimum value m is described. If the number of units in a block is m) and the number of bits in a unit is n bits, the compression result of the block is m × n bits or less (the data size at the time of non-compression). This meaning is as follows. The unit of the read / write request is called a unit, and the number of units when reading data in the area block in the case of no compression is m, and the number of bits of the unit is n bits. Then, the amount of area data in the case of no compression is m × n bits. When the amount of compressed data is mxn bits or less, it means that the compressed data is smaller in data amount than in the case of no compression. Since m and n are determined at the time of designing the memory controller, m × n bits is an amount that can be understood in advance. Accordingly, when the compression result is smaller than m × n bits that can be understood in advance, the data amount can be reduced, and the data of the compression result is stored in the memory. Satisfying this condition has the effect of ensuring that the bandwidth for accessing the memory never increases.

以上の構成によれば、保存するデータのブロック毎に可逆圧縮、非圧縮のいずれかを選択することが可能になる。つまり、可逆性を備えた圧縮を行い、メモリ帯域を低減させたメモリコントローラを提供できる。また、主データ以外に必要となる管理情報(マップ情報)は、もしただひとつの可逆圧縮方法しか用いず、圧縮後のデータサイズ情報を用いない場合は、圧縮後のデータサイズが一定となるのでデータサイズに関する情報を持つ必要が無くなり、圧縮か非圧縮かを示す1ビットとなる。したがって、1ピクチャで必要となるデータ量は1ピクチャ内のブロック数に等しくなる。これは従来技術で必要とされる追加情報(ポインタテーブル)よりも小さなものとなる。   According to the above configuration, it is possible to select either lossless compression or non-compression for each block of data to be stored. That is, it is possible to provide a memory controller that performs compression with reversibility and reduces the memory bandwidth. Further, the management information (map information) required other than the main data uses only one lossless compression method, and when the compressed data size information is not used, the compressed data size is constant. Therefore, it is not necessary to have information on the data size, and it becomes 1 bit indicating whether compression or non-compression. Therefore, the amount of data required for one picture is equal to the number of blocks in one picture. This is smaller than the additional information (pointer table) required in the prior art.

また、圧縮時は、いかなる場合においてもメモリ上に占める各ブロックのデータ量は非圧縮時以下となるので、いかなるデータ、アクセスにおいてもメモリ使用量を非圧縮状態より低く抑えることができる。   Further, at the time of compression, the data amount of each block occupying the memory in any case is equal to or less than that at the time of non-compression, so that the memory usage amount can be kept lower than the uncompressed state in any data and access.

また、分割されたデータの各ブロックは他のブロックの情報を用いずに圧縮されているために、1つのブロックにアクセスする場合に、他のブロックにアクセスする必要が無いので、各ブロックを個別にアクセスでき、画像内の任意の位置に対するアクセスを可能としている。   In addition, since each block of the divided data is compressed without using information of other blocks, there is no need to access other blocks when accessing one block. Can access any position in the image.

更に、データのブロックが非圧縮の時は必ず、1ブロックを構成するk個のユニットへのアクセスが発生する。また、圧縮される時は、k個以下のユニットへのアクセスとなる(k個よりも少ないユニットへのアクセスとすることが可能かは、圧縮方式、またはマップ情報の使用法に依存する)。つまり、いかなるデータ、アクセスにおいても、非圧縮時に比べデータ量が少なくなっているので、アクセス時のデータ転送量が減少し、メモリ帯域を非圧縮状態より低く抑えることができる。   Further, whenever a block of data is uncompressed, access to k units constituting one block occurs. Further, when compressed, access is made to k or less units (whether access to fewer than k units is possible depends on the compression method or the usage of map information). In other words, since any data and access has a smaller amount of data than when uncompressed, the amount of data transferred during access is reduced, and the memory bandwidth can be kept lower than in the uncompressed state.

図1は、本実施形態に従ったメモリコントローラを示すブロック図である。図2は、書き込み制御部による一つの書き込みリクエストの処理のフローであり、図3は、読み出し制御部による一つの読み出しリクエストの処理フローである。   FIG. 1 is a block diagram showing a memory controller according to the present embodiment. FIG. 2 is a processing flow of one write request by the write control unit, and FIG. 3 is a processing flow of one read request by the read control unit.

本実施形態では、分割されたデータのブロック内のユニット数を元ブロックのユニット数より小さいユニットに圧縮しており、ブロックのデータが圧縮される場合は常にブロック内の先頭ユニットから記録している。   In this embodiment, the number of units in the block of divided data is compressed to a unit smaller than the number of units in the original block, and when the block data is compressed, it is always recorded from the head unit in the block. .

また、マップ情報は、メモリコントローラ内の独立したメモリ(マップ情報メモリ)に置かれているが、「ブロック毎の圧縮」の対象となる領域をメモリコントローラの制御対象となるメモリの一部とし、マップ情報自身をメモリ上に置くことも可能である。   In addition, the map information is placed in an independent memory (map information memory) in the memory controller, but the area targeted for “compression for each block” is a part of the memory to be controlled by the memory controller, It is also possible to place the map information itself on the memory.

更に、マップ情報として、本実施形態では圧縮、非圧縮の情報のほかに圧縮後のユニット数も保持しているが、マップ情報を小さくする為に圧縮、非圧縮の情報のみを保持する実施形態も考えられる。   Further, as map information, in this embodiment, the number of units after compression is also held in addition to the compression and non-compression information, but only the compression and non-compression information is held to reduce the map information. Is also possible.

また、本実施形態では、使用される可逆圧縮方法については規定していない。可逆で、自ブロックのデータ以外は参照しないで圧縮を行う方法であれば、どのような可逆圧縮方式でも用いる事ができる。   In this embodiment, the lossless compression method used is not defined. Any reversible compression method can be used as long as it is reversible and compression is performed without referring to data other than its own block.

図1において、LSIの他の処理ブロックから入力されたデータは、メモリコントローラ10の書き込み部11を介して、メモリへ送られる。書き込み部11においては、入力されたデータを、圧縮処理部13において、圧縮する。非圧縮のデータと圧縮されたデータとは、セレクタ14に入力される。圧縮処理部13の圧縮の結果、データ量がどのくらいになったかの情報が書き込み制御部15に入力される。書き込み制御部15は、圧縮の結果、データ量が小さくなった場合には、セレクタ14に指示して、圧縮データをセレクタ14から出力させ、メモリに送る。圧縮の結果、データ量が小さくならなかった場合には、非圧縮のデータを、セレクタ14から出力させ、メモリに送る。データ量(ユニット数)の指示は、書き込み制御部15からメモリに出力される書き込み制御信号によって伝達される。書き込み制御部15は、マップ情報メモリ19に、データサイズ、データが圧縮データか非圧縮データかの情報などを格納する。   In FIG. 1, data input from another processing block of the LSI is sent to the memory via the writing unit 11 of the memory controller 10. In the writing unit 11, the input data is compressed in the compression processing unit 13. Uncompressed data and compressed data are input to the selector 14. Information indicating how much data amount has been obtained as a result of compression by the compression processing unit 13 is input to the write control unit 15. When the amount of data decreases as a result of compression, the write control unit 15 instructs the selector 14 to output the compressed data from the selector 14 and sends it to the memory. If the amount of data does not decrease as a result of compression, uncompressed data is output from the selector 14 and sent to the memory. An instruction for the amount of data (number of units) is transmitted by a write control signal output from the write control unit 15 to the memory. The write control unit 15 stores the data size, information on whether the data is compressed data or non-compressed data, and the like in the map information memory 19.

メモリからデータを読み出す場合には、メモリコントローラ10の読み出し部12を介して読み出す。読み出し部12では、マップ情報メモリから、データ量などを読み出し、読み出し制御信号により、読み出すデータの先頭アドレスとデータ量(ユニット数)を指定して読み出しを行う。そしてメモリから読み出されたデータを展開処理部17で展開する。展開されたデータと、読み出したそのままのデータとがセレクタ18に入力される。読み出し制御部16は、マップ情報メモリから、読み出したデータが圧縮されたものか、非圧縮のものかのデータを取得する。読み出したデータが、圧縮されたものである場合には、セレクタ18から、展開されたデータを出力させる。読み出したデータが、非圧縮のものである場合には、セレクタ18から非展開のデータを出力させる。セレクタ18から出力されたデータは、LSI内の他の処理ブロックに送られる。   When data is read from the memory, the data is read via the reading unit 12 of the memory controller 10. The reading unit 12 reads the data amount and the like from the map information memory, and performs reading by designating the head address and the data amount (number of units) of the data to be read by a read control signal. Then, the data read from the memory is expanded by the expansion processing unit 17. The expanded data and the read data are input to the selector 18. The read control unit 16 acquires data indicating whether the read data is compressed or uncompressed from the map information memory. If the read data is compressed, the selector 18 outputs the decompressed data. If the read data is non-compressed data, non-decompressed data is output from the selector 18. The data output from the selector 18 is sent to other processing blocks in the LSI.

なお、マップ情報メモリ内で、領域ブロックごとにマップ情報の格納領域を予め決めておき、対応する格納領域に、データ量と、圧縮/非圧縮情報のみを格納するようにする。このような場合、マップ情報メモリのどの領域のマップ情報を読むかということと、メモリのどの領域ブロックのデータにアクセスするかということが一対一に対応する。そして、マップ情報メモリの領域から、メモリの領域ブロックの先頭アドレスが分かるようにしておく。   In the map information memory, a map information storage area is predetermined for each area block, and only the data amount and the compressed / uncompressed information are stored in the corresponding storage area. In such a case, there is a one-to-one correspondence between which area of the map information memory the map information is read and which area block of the memory is accessed. Then, the start address of the area block of the memory is made known from the area of the map information memory.

図2の書き込みリクエスト処理においては、ステップS10において、処理対象データをブロックに分割する。ここで、ブロックの大きさは、メモリへのアクセス単位であるユニットの整数倍の大きさとする。ステップS11のループを、全ブロックについて処理が終わるまで繰り返す。ステップS12において、ブロックは圧縮可能か、すなわち、圧縮処理によってデータ量が減少するか否かを判断する。ステップS12の判断がYesの場合には、ステップS13において、ブロックの圧縮結果を、ブロック内の先頭ユニットからメモリに格納する。ブロックの先頭ユニットを書き込むメモリのアドレスは、ブロックが非圧縮であるとした場合に格納可能なようにメモリの格納領域を分割した領域の先頭アドレスである。ステップS14において、マップ情報メモリの、書き込んだブロック用の領域に、圧縮データである旨のビット(例えば、1を圧縮、0を非圧縮とする)と、圧縮後のユニット数を書き込む。なお、ここで、マップ情報メモリのビットを、例えば、01を1ユニットに圧縮、10を1ユニットに圧縮、00を非圧縮とすることにより、圧縮/非圧縮の別と、圧縮後のユニット数をいっぺんに表すことが出来る。   In the write request process of FIG. 2, the process target data is divided into blocks in step S10. Here, the block size is assumed to be an integral multiple of a unit which is a unit for accessing the memory. The loop of step S11 is repeated until the processing is completed for all blocks. In step S12, it is determined whether the block can be compressed, that is, whether the data amount is reduced by the compression process. If the determination in step S12 is yes, in step S13, the block compression result is stored in the memory from the head unit in the block. The address of the memory to which the head unit of the block is written is the head address of an area obtained by dividing the memory storage area so that it can be stored when the block is uncompressed. In step S14, a bit indicating that the data is compressed (for example, 1 is compressed and 0 is uncompressed) and the number of units after compression are written in the area for the written block in the map information memory. Here, the bit of the map information memory, for example, 01 is compressed to 1 unit, 10 is compressed to 1 unit, and 00 is uncompressed, so that the number of units after compression and non-compression Can be expressed together.

ステップS12の判断がNoの場合には、ステップS15において、非圧縮データのブロックを、メモリの分割領域である領域ブロックの全領域に書き込む。ステップS16において、マップ情報メモリの、書き込んだブロック用の領域に、0(非圧縮を示すビット)を書き込む。   If the determination in step S12 is No, in step S15, the block of uncompressed data is written in all areas of the area block that is a divided area of the memory. In step S16, 0 (bit indicating non-compression) is written in the area for the written block in the map information memory.

図3の読み出しリクエスト処理においては、ステップS20において、読み出す対象のデータに対応する領域ブロックの位置を取得する。そして、ステップS21のループを、全ての領域ブロックについて処理し終わるまで繰り返す。ステップS22において、マップ情報メモリの、読み出し対象のブロックの領域に対応するビットの値が1か否か、すなわち、当該領域ブロックのデータが圧縮されたものか否かを判断する。ステップS22の判断がYesの場合には、ステップS23において、マップ情報メモリから圧縮後のユニット数を読み出す。なお、ここで、マップ情報メモリのビットを、例えば、01を1ユニットに圧縮、10を2ユニットに圧縮、00を非圧縮とする。ステップS24において、圧縮結果を領域ブロックの先頭ユニットから、圧縮後のユニットの数だけ順に読み出す。これは、読み出し制御部からの読み出し制御信号によって制御される。ステップS25において、圧縮結果を展開し、ブロック情報を再生する。ステップS22の判断がNoの場合には、ステップS26において、非圧縮データをメモリの領域ブロックの全領域から読み出す。   In the read request process of FIG. 3, in step S20, the position of the area block corresponding to the data to be read is acquired. Then, the loop of step S21 is repeated until all the area blocks have been processed. In step S22, it is determined whether or not the value of the bit corresponding to the area of the block to be read in the map information memory is 1, that is, whether or not the data of the area block is compressed. If the determination in step S22 is Yes, the number of units after compression is read from the map information memory in step S23. Here, the bit of the map information memory, for example, 01 is compressed to 1 unit, 10 is compressed to 2 units, and 00 is uncompressed. In step S24, the compression results are sequentially read from the head unit of the area block by the number of units after compression. This is controlled by a read control signal from the read control unit. In step S25, the compression result is expanded and the block information is reproduced. If the determination in step S22 is No, in step S26, uncompressed data is read from all areas of the memory area block.

図4は、本実施形態によるメモリコントローラをH.264のデコーダのメモリコントローラとして適用した例を示す図である。
他の動画像符号化方式、またはエンコーダ、または三次元グラフィックス描画回路への適用でも基本的な構成は変わらない。
FIG. 4 is a diagram showing an example in which the memory controller according to the present embodiment is applied as a memory controller of an H.264 decoder.
The basic configuration does not change even when applied to other moving image coding systems, encoders, or three-dimensional graphics drawing circuits.

図4において、図1と同じ構成要素には同じ参照符号を付し、説明を省略する。
動画像復号部22は、動画像を復号したデータをメモリコントローラ10の書き込み部11を介して、SDRAM21に書き込んだり、SDRAM21から、動画像復号に必要な参照画を、読み出し部12を介して読み出したりする。また、読み出し部12の出力は、画像出力部23に送られて、出力画像とされることもある。
4, the same components as those in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted.
The moving image decoding unit 22 writes data obtained by decoding the moving image to the SDRAM 21 via the writing unit 11 of the memory controller 10, and reads a reference image necessary for moving image decoding from the SDRAM 21 via the reading unit 12. Or Further, the output of the reading unit 12 may be sent to the image output unit 23 to be an output image.

マップ情報管理部20は、書き込み用マップ情報メモリ、参照用マップ情報メモリ、出力用マップ情報メモリを備える。書き込み用マップ情報メモリは、フレームメモリに書き込まれるデータのデータ量や、データが圧縮データか非圧縮データかを示す情報をSDRAM21のマップ情報に書き込む。また、書き込まれたデータの一部のマップ情報のみを格納し出力マップ情報メモリ、または参照用マップ情報メモリに転送する場合もある。参照マップ情報メモリは、動画像復号において参照される画像のデータを特定し、SDRAM21内、または書き込み用マップ情報メモリから受け取った対応するブロックのマップ情報から、データ量や、データが圧縮されたデータか非圧縮のデータかを示す情報を取得する。出力用マップ情報メモリは、出力画像を得るためのデータを特定し、SDRAM21内、または書き込み用マップ情報メモリから受け取ったマップ情報から、データ量や、データが圧縮データか非圧縮データかを示す情報を取得する。H.264、MPEG−2などの動画像符号化方式に対応したエンコーダ、デコーダにおいてはフレームメモリに書き込んだデータが直後に参照および表示に用いられるとは限らないため、書き込み用マップ情報メモリはバッファとして動作し、メモリの内容はSDRAM21に書き込み後に破棄される。一方三次元グラフィックス描画回路においては、書き込んだデータが直後に表示および場合によっては参照にも用いられるため、書き込み用マップ情報の内容が出力用マップ情報メモリ及び必要であれば参照用マップ情報メモリに渡される。また、書き込み用マップ情報メモリと参照用マップ情報メモリの2つの機能を併せ持つキャッシュメモリ、または3つのメモリの機能を併せ持ったキャッシュメモリとして実装されることも考えられる。参照用マップ情報メモリと出力用マップ情報メモリが、マップ情報を参照して得たデータのデータ量(ユニット数)、データが圧縮データか非圧縮データかを示す情報は、読み出し制御部16に渡される。   The map information management unit 20 includes a writing map information memory, a reference map information memory, and an output map information memory. The write map information memory writes the data amount of data to be written into the frame memory and information indicating whether the data is compressed data or non-compressed data into the map information of the SDRAM 21. In some cases, only some map information of the written data is stored and transferred to the output map information memory or the reference map information memory. The reference map information memory specifies image data to be referred to in the moving picture decoding, and the data amount or the data in which the data is compressed from the map information of the corresponding block received from the SDRAM 21 or the map information memory for writing. Acquires information indicating whether the data is uncompressed or uncompressed. The output map information memory specifies data for obtaining an output image, and information indicating whether the data is compressed data or non-compressed data from the map information received from the SDRAM 21 or from the write map information memory. To get. In encoders and decoders corresponding to moving picture coding systems such as H.264 and MPEG-2, the data written in the frame memory is not always used for reference and display immediately afterwards, so the writing map information memory is a buffer. The contents of the memory are discarded after being written in the SDRAM 21. On the other hand, in the 3D graphics drawing circuit, since the written data is used immediately after display and in some cases for reference, the contents of the writing map information are the output map information memory and, if necessary, the reference map information memory. Passed to. Further, it may be implemented as a cache memory having two functions of a write map information memory and a reference map information memory, or a cache memory having three memory functions. The reference map information memory and the output map information memory pass the data amount (number of units) obtained by referring to the map information and information indicating whether the data is compressed data or non-compressed data to the read control unit 16. It is.

図4では、本実施形態による「ブロック毎の圧縮」の対象となる領域をメモリコントローラの制御対象となるSDRAM21の一部(図中点線より下のフレームメモリが置かれている側)とし、マップ情報自身をSDRAM21上に置いている。この場合、マップ情報は圧縮対象となる復号結果画像データよりも十分に小さいので、1リクエスト毎に該当箇所のマップ情報をSDRAM21との間でやり取りするのではなく、ある程度のデータ量にまとめられてやり取りされることが望ましい。この要求は以下のように実現することができる。   In FIG. 4, the area to be subjected to “compression for each block” according to the present embodiment is a part of the SDRAM 21 to be controlled by the memory controller (the side on which the frame memory below the dotted line is placed), and the map Information itself is placed on the SDRAM 21. In this case, since the map information is sufficiently smaller than the decoding result image data to be compressed, the map information of the corresponding part is not exchanged with the SDRAM 21 for each request, but is collected into a certain amount of data. It is desirable to communicate. This requirement can be realized as follows.

デコーダ・エンコーダ機能において復号結果書き込み時・画像出力時のマップ情報の生成・参照は、画面の上方から規則的な順序で行われる。よって小容量の書き込み用マップ情報メモリ・出力用マップ情報メモリによってバッファリングされながらマップ情報は生成・参照される。   In the decoder / encoder function, the generation and reference of map information at the time of decoding result writing and image output is performed in a regular order from the top of the screen. Therefore, map information is generated and referenced while being buffered by a small-capacity writing map information memory and output map information memory.

これに対してデコーダ・エンコーダ機能における画像参照アクセス及び三次元グラフィックス描画はランダムアクセス性を持つため、用いるべきマップ情報のSDRAMからの取り出し方については以下に述べるような手法が考えられる。
1.MPEG−2、VC−1等、またはH.264のエンコーダ等で参照画像の枚数が比較的少ない枚数に固定されている場合は、その枚数分の画像の全ブロックのマップ情報を保持する参照用マップ情報メモリをもち、1ピクチャ処理毎にこの参照用マップ情報メモリの内容を書き換える。
2.H.264のデコーダ等で参照画像となりうる画像が多く、全画像の枚数のマップ情報を保持するとメモリ量が多くなる場合は、1ピクチャ処理毎に、参照される可能性が高い(リファレンスインデックスが小さい)画像のマップ情報のみを取り出し、そうでないものは画像参照リクエスト毎にSDRAMから取り出す。
3.H.264では1ピクチャ処理中にリファレンスインデックスリストを切り替える事が可能である。よって、1、2に述べた参照用マップ情報メモリの内容の処理をスライス処理毎に行う。
4.規格、エンコーダ仕様、または運用規定でベクトルの水平方向の大きさが制限されている場合は、1,2で保持するマップ情報の容量は、現在処理中のマクロブロックから参照可能なブロックのマップ情報を保持可能なサイズであればよい。この場合、マクロブロックライン処理毎に新たに参照可能となるブロックのマップ情報をSDRAMから取り出して、参照不可能となったブロックのマップ情報が置かれていた場所に上書きする。
5.三次元グラフィックス描画では、アクセス対象が描画領域全てとなるため、描画領域の全ブロックのマップ情報を保持するマップ領域を持つか、SDRAMに全描画領域のマップ情報を保持し、SDRAM内のマップ領域はキャッシュとして描画領域の一部のみを保持する。
On the other hand, since the image reference access and 3D graphics drawing in the decoder / encoder function have random accessibility, the following method can be considered as a method of extracting map information to be used from the SDRAM.
1. When the number of reference images is fixed to a relatively small number by an MPEG-2, VC-1, etc. or H.264 encoder, etc., it is a reference for holding map information of all blocks of that number of images. It has a map information memory, and the contents of this reference map information memory are rewritten every one picture process.
2. If there are many images that can be used as reference images by an H.264 decoder or the like, and if the amount of memory increases when map information for the number of all images is stored, there is a high possibility that reference will be made every time one picture is processed. Only the map information of the (small) image is extracted, and the other is extracted from the SDRAM for each image reference request.
3. In H.264, it is possible to switch the reference index list during one picture processing. Therefore, the processing of the contents of the reference map information memory described in 1 and 2 is performed for each slice processing.
4). If the horizontal size of the vector is limited by the standard, encoder specification, or operation rule, the map information capacity held in 1 and 2 is the map information of the block that can be referred to from the currently processed macroblock. Any size can be used as long as it can be held. In this case, the map information of the block that can be newly referred to every macro block line processing is taken out from the SDRAM and overwritten at the place where the map information of the block that cannot be referred to is placed.
5). In 3D graphics drawing, since the access target is the entire drawing area, there is a map area that holds the map information of all blocks in the drawing area, or the map information of all the drawing areas is held in the SDRAM, and the map in the SDRAM The area holds only a part of the drawing area as a cache.

これらの方法を実施するためには、マップ情報管理部20はSDRAM上に置かれたフレームメモリの枚数と同枚数のピクチャに対応したマップ情報を管理する。この管理のために、デコーダ・エンコーダ機能においては現在、動画像復号部で処理中の画像、参照される画像、出力部で出力中の画像が、それぞれフレームメモリ中のどのピクチャであるかという情報を必要とする。この情報は動画像復号部から与えられる。三次元グラフィックス描画処理においては全て描画中のフレームに対する処理であるため、フレームを区別する為の情報は必要ない。   In order to implement these methods, the map information management unit 20 manages map information corresponding to the same number of pictures as the number of frame memories placed on the SDRAM. For this management, in the decoder / encoder function, information on which picture in the frame memory each of the image currently being processed by the moving image decoding unit, the image to be referred to, and the image being output by the output unit is. Need. This information is given from the moving picture decoding unit. In the three-dimensional graphics drawing process, all the processing is for the frame being drawn, and therefore information for distinguishing the frames is not necessary.

図5〜図7は、本実施形態に従った書き込み処理および読み出し処理の動作を説明する図である。
図6は、書き込み処理を説明する図であり、図7は、読み出し処理を説明する図である。図5に示されるように、図6、7においては、点線で囲まれたボックスをユニットとし、1ユニットはメモリアクセスに固有のnビットからなっているとする。また、実線のボックスは、ブロックを示すとし、ここでは、4つのユニットからなっているとする。また、右下がりの斜線で示される領域は、圧縮データを示し、交差する斜線で示される領域は、非圧縮データを示すものとする。
5 to 7 are diagrams for explaining the operation of the writing process and the reading process according to the present embodiment.
FIG. 6 is a diagram for explaining the writing process, and FIG. 7 is a diagram for explaining the reading process. As shown in FIG. 5, in FIGS. 6 and 7, it is assumed that a box surrounded by a dotted line is a unit, and one unit is composed of n bits unique to memory access. A solid line box indicates a block, and here, it is assumed that the unit is composed of four units. In addition, the area indicated by the slanting line at the lower right indicates the compressed data, and the area indicated by the crossing oblique line indicates the non-compressed data.

図6、7および以下の説明では、以下が成り立っているとする。
・どのようなリクエストでも、非圧縮状態で1ブロック中で最低2個のユニットへのアクセスが発生する(m=2)。非圧縮状態では、1ブロックが4ユニットで構成される。
・圧縮結果のデータはすべて2個のユニット以内に収まっている。
6 and 7 and the following description, it is assumed that the following holds.
-For any request, access to at least two units in one block occurs in an uncompressed state (m = 2). In the uncompressed state, one block is composed of four units.
・ All the compressed data is within 2 units.

非圧縮状態で4ユニット分あったデータが、圧縮の結果2ユニット以下になる場合には、データの量が半分以下になっているので、1ブロックのデータを読み込む場合に必要となるデータの転送量が減少し、メモリ帯域が小さくてすむようになる。   When the data for 4 units in the uncompressed state becomes 2 units or less as a result of compression, the amount of data is less than half, so the data transfer required for reading 1 block of data The amount is reduced and the memory bandwidth is reduced.

図6に、書き込み部によって、1つの書き込みリクエストがどのように処理され、メモリ内容がどのように書き換えられるかを示す。また、図7では同様に読み込み部による1つの読み込みリクエストの処理の様子を示す。   FIG. 6 shows how one write request is processed and how the memory contents are rewritten by the writing unit. Similarly, FIG. 7 shows a state of processing one read request by the reading unit.

図6の書き込みリクエスト処理について説明する。
(1)の太枠は、このリクエストをすべて非圧縮で書き込んだ場合に書き換えられるユニットの領域を示す。
(2)上段左端のブロックでは、ブロックは圧縮され、先頭から2ユニットの領域に圧縮データが書き込まれている。
(3)次に、上段中央のブロックには全ユニットに非圧縮データが書き込まれる。
(4)上段右端のブロックでは、ブロックは圧縮され、先頭から1ユニットの領域に圧縮データが書き込まれている。
(5)同様に残りのブロックについても書き込み処理が行われる。
The write request process in FIG. 6 will be described.
A thick frame in (1) indicates a unit area that is rewritten when all the requests are written without compression.
(2) In the upper leftmost block, the block is compressed, and the compressed data is written in the area of 2 units from the beginning.
(3) Next, uncompressed data is written to all units in the upper middle block.
(4) In the upper right block, the block is compressed, and the compressed data is written in an area of one unit from the top.
(5) Similarly, the writing process is performed on the remaining blocks.

以上のように、メモリの書き込み領域である領域ブロックは、データが圧縮されないとした場合に、データを分割して格納することができるように、メモリの格納領域を分割したものである。そして、データを分割したブロックが圧縮された場合には、対応する領域ブロックの先頭から格納し、圧縮データ分だけ、その領域ブロックに書き込む。当該ブロックが圧縮されたデータであるので、領域ブロックに格納しても全領域を占有せず、データが格納されている部分と、空き領域となっている部分とが生じる。次のブロックを格納する場合には、当該ブロックが圧縮されているかいないかにかかわらず、次の領域ブロックの先頭のアドレスから格納する。   As described above, the area block that is the writing area of the memory is obtained by dividing the storage area of the memory so that the data can be divided and stored when the data is not compressed. When the block into which the data is divided is compressed, it is stored from the head of the corresponding area block, and only the compressed data is written into the area block. Since the block is compressed data, even if it is stored in the area block, the entire area is not occupied, and a part where data is stored and a part which is a free area are generated. When the next block is stored, it is stored from the head address of the next area block regardless of whether the block is compressed or not.

図7の読み込みリクエスト処理について説明する。
(1)の太枠は、このリクエストで読み込むデータが全て非圧縮の場合に読み込まれるユニットの領域を示す。
(2)(1)の太枠内の上段左側のブロックでは、マップ情報から非圧縮であることが判り、必要なユニットa、bのみを読み出している。
(3)次に、(1)の太枠内の上段右側のブロックは、マップ情報から1ユニットに圧縮されたブロックであることが判る。そこでユニットcのデータの読み出し、展開を行い、その中からこの読み出しリクエストで必要とするユニットc−1、c−2に相当するデータのみを取り出す。
(4)、(5)についても、(1)、(2)と同様にブロックごとの読み出し処理を行う。
The read request process in FIG. 7 will be described.
A thick frame in (1) indicates a unit area to be read when all data read by this request is uncompressed.
(2) In the upper left block in the thick frame of (1), it is known from the map information that there is no compression, and only necessary units a and b are read out.
(3) Next, it can be seen that the upper right block in the thick frame in (1) is a block compressed to one unit from the map information. Therefore, the data of the unit c is read and expanded, and only the data corresponding to the units c-1 and c-2 necessary for this read request is taken out from the data.
As for (4) and (5), similarly to (1) and (2), read processing is performed for each block.

すなわち、(4)では、太枠内左下のブロックは、マップ情報からデータが2ユニットに圧縮されていることが分かるので、展開してから、ユニットd、eに相当するデータを取り出す。
(5)では、太枠内左下のブロックは、マップ情報からデータが非圧縮であることが分かるので、直接、ユニットf、gを読み出す。
That is, in (4), since the block at the lower left in the thick frame shows that the data is compressed into 2 units from the map information, the data corresponding to the units d and e are taken out after being expanded.
In (5), since the block at the lower left in the thick frame indicates that the data is uncompressed from the map information, the units f and g are directly read out.

以上の動作により、読み出しリクエスト対象の太枠内のデータが全て読み出される。
以上のようにして、書き込み、読み出しを行う。
With the above operation, all the data within the thick frame subject to the read request is read.
Writing and reading are performed as described above.

図8〜図10は、上記実施形態のマップ情報メモリ、SDRAMのマップ情報のデータ構造を説明する図である。なお、図9では、参照用マップ情報メモリのみを示すが、書き込み用マップ情報メモリと、出力用マップ情報メモリも同様の構成であるので、特に図示しない。
・1ブロックは4ユニットから構成される
・非圧縮状態で、1ブロックへのどんなアクセスも2ユニット以下になることはない。
・ブロックの圧縮結果は2ユニットに収まるようになっている。(2ユニットに収まらなかった場合は非圧縮で書きこむ)
とした際の実施形態に対応している。
8 to 10 are diagrams for explaining the data structure of the map information of the map information memory and SDRAM of the above embodiment. In FIG. 9, only the reference map information memory is shown, but the write map information memory and the output map information memory have the same configuration and are not particularly shown.
• One block is composed of 4 units. • In an uncompressed state, no access to one block can be less than 2 units.
-The compression result of the block is to fit in 2 units. (If it does not fit in 2 units, write in uncompressed)
This corresponds to the embodiment described above.

メモリ上のあるブロックに書き込まれるデータは以下の状態を取りうる。
非圧縮
2ユニットに圧縮される
1ユニットに圧縮される。
Data written to a block on the memory can take the following states.
Compressed into 1 unit that is compressed into 2 uncompressed units.

よって、各ブロックに対応するマップ情報は上記の3状態を表現できる2ビットから構成される。図1の場合で、メモリ上にはn個のブロックが存在するとすると、マップ情報メモリ内のデータの構成は図8のようになる。   Therefore, the map information corresponding to each block is composed of 2 bits that can express the above three states. In the case of FIG. 1, if there are n blocks on the memory, the data configuration in the map information memory is as shown in FIG.

メモリに書き込まれるデータはブロックに分割されるが、このブロックを格納するメモリ領域も領域ブロックに分割される。マップ情報メモリでは、図8に示されるように、マップ情報格納領域をブロックに分け、メモリ上の領域ブロックの数nと同じ数だけのマップ情報格納領域のブロックを用意する。メモリ上のどの領域ブロックにデータを書き込んだか、あるいは、どの領域ブロックからデータ読みに出すかにしたがって、どのブロックのマップ情報にアクセスしたらよいかが対応付けられている。1ブロックのマップ情報は、2ビットで、例えば、00が非圧縮、01が1ユニットに圧縮、10が2ユニットに圧縮されたデータであることを示す。   Data to be written in the memory is divided into blocks, and the memory area for storing this block is also divided into area blocks. In the map information memory, as shown in FIG. 8, the map information storage area is divided into blocks, and as many blocks of the map information storage area as the number n of area blocks on the memory are prepared. Depending on which area block on the memory the data has been written to or from which area block the data is read, which block information should be accessed is associated. The map information of one block is 2 bits, and indicates that, for example, 00 is uncompressed, 01 is compressed to 1 unit, and 10 is data compressed to 2 units.

次に、図4のH.264デコーダへの適用例の場合のマップ情報メモリのデータ構造と、マップ情報管理部の動作を以下に示す。こちらの例でも、1ブロックが4ユニットからなり、非圧縮状態で、1ブロックへのどんなアクセスも2ユニット以下にならず、圧縮結果は、2ユニットに収まるとする。   Next, the data structure of the map information memory and the operation of the map information management unit in the case of application to the H.264 decoder of FIG. 4 are shown below. Also in this example, it is assumed that one block is composed of 4 units, and in the uncompressed state, any access to one block does not become 2 units or less, and the compression result fits in 2 units.

SDRAM上のフレームメモリにはエンコーダ・デコーダ動作から規定される枚数(以下ではj枚とする)分の画像を保持するとする。また、1枚の画像はn個のブロックから構成さているとする。また、前述のように1ブロックは4ユニット、1ブロックのマップ情報は2ビットとする。よって画像一枚分のマップ情報はn個のマップ情報から構成されたn×2ビットのデータである。   Assume that the frame memory on the SDRAM holds the number of images (hereinafter referred to as j) defined by the encoder / decoder operation. Further, it is assumed that one image is composed of n blocks. As described above, one block is 4 units, and one block of map information is 2 bits. Therefore, the map information for one image is n × 2 bit data composed of n pieces of map information.

書き込み用マップ情報メモリは1エントリを1ブロックのマップ情報(2ビット分)とするFIFOとし、SDRAMアクセスの観点から効率が良いとされる量のデータを保持するのに十分な情報量、x個のブロックに対するマップ情報をバッファリングしているとする。このxは一般にnよりも非常に小さい。書き込み用マップ情報メモリにはエンコード・デコード処理が進むごとにマップ情報がFIFO内に蓄積され、ある閾値を超えた時点でSDRAMに転送される。   The map information memory for writing is a FIFO in which one entry is one block of map information (2 bits), and the amount of information sufficient to hold an amount of data that is considered efficient from the viewpoint of SDRAM access, x Suppose you are buffering map information for a block. This x is generally much smaller than n. Each time the encoding / decoding process proceeds in the map information memory for writing, the map information is accumulated in the FIFO and transferred to the SDRAM when a certain threshold value is exceeded.

画像出力用マップ情報メモリも同様に1エントリを1ブロックのマップ情報とするFIFOとし、y個のマップ情報をバッファリングしているとする。このyも一般にnよりも非常に小さい。   Similarly, it is assumed that the map information memory for image output is a FIFO in which one entry is one block of map information, and y pieces of map information are buffered. This y is also generally much smaller than n.

また、参照用マップ情報メモリでは、特に参照される可能性の高い2枚の参照画像に対応したマップ情報を保持するものとする。よって以下の図に示すように画面2枚分のマップ情報を保持するのに十分な容量、2×n×2ビットを保持する。
また、SDRAM上のマップ情報にはフレームメモリに保持されるj枚分のマップ情報を保持しているので、j×n×2ビット分である。
The reference map information memory holds map information corresponding to two reference images that are particularly likely to be referenced. Therefore, as shown in the following figure, a capacity of 2 × n × 2 bits sufficient to hold map information for two screens is held.
Since the map information on the SDRAM holds j pieces of map information held in the frame memory, it is j × n × 2 bits.

図9に示されるように、マップ情報は、参照画像1用マップ情報と参照画像2用マップ情報が存在する。それぞれのマップ情報は、メモリ上の領域ブロックに対応して、画面1枚分をブロックに分けている。図9では、画面1枚をn個のブロックに分けている。参照画像2用マップ情報も同様に、n個のブロックに分けられている。マップ情報の各ブロックは、メモリ上の各領域ブロックに対応しており、メモリ上のどの領域ブロックにアクセスするかに従って、マップ情報のどのブロックにアクセスしたらよいかが指定される。   As shown in FIG. 9, the map information includes reference image 1 map information and reference image 2 map information. Each map information divides one screen into blocks corresponding to the area blocks on the memory. In FIG. 9, one screen is divided into n blocks. Similarly, the reference image 2 map information is divided into n blocks. Each block of the map information corresponds to each area block on the memory, and which block of the map information should be accessed is specified according to which area block on the memory is accessed.

このH.264デコーダは画像1枚のデコード処理を開始する前にその画像で最も参照される可能性が高い2枚の画像を選択し、これら2×n×2ビットの情報をSDRAMから読み出し、参照用マップ情報メモリに書き込む。その後、デコード処理を開始する。   This H. The H.264 decoder selects the two images most likely to be referenced in the image before starting the decoding process for one image, reads out these 2 × n × 2 bit information from the SDRAM, and reads the reference map. Write to information memory. Thereafter, the decoding process is started.

メモリコントローラの読み出し部の読み出し制御部は、動画像復号部からのリクエストに応じて必要なマップ情報を取得しようとする。必要なマップ情報が参照用マップ情報メモリ上に存在する(動画像復号部が参照しようとしている画像が先ほど読み込んだマップ情報の2枚の画像のどちらかであった)場合にはそのデータを用いる。存在しない場合には、必要なマップ情報をSDRAMから読み込んで参照する。   The read control unit of the read unit of the memory controller tries to acquire necessary map information in response to a request from the moving image decoding unit. If the necessary map information exists in the reference map information memory (the image that the moving image decoding unit is to refer to was one of the two images of the map information read earlier), that data is used. . If it does not exist, necessary map information is read from the SDRAM and referenced.

図10に示されるように、SDRAMには、フレームメモリ中に格納されたj枚の画像に対応したj枚分のマップ情報が保持される。ここでは、画像バンク1用マップ情報から画像バンクj用マップ情報が設けられる。各マップ情報は、画面1枚のメモリ内のデータがいくつの領域ブロックに分けられているかに対応して、同じ数だけのブロックに分けられる。ここでは、画面1枚分の領域ブロックとマップ情報のブロックの数はnとしている。メモリ上のどの領域ブロックにアクセスするかにしたがって、マップ情報のどのブロックにアクセスしたらよいかが指定される。   As shown in FIG. 10, the SDRAM holds j pieces of map information corresponding to j images stored in the frame memory. Here, map information for image bank j is provided from map information for image bank 1. Each map information is divided into the same number of blocks corresponding to how many area blocks the data in the memory of one screen is divided into. Here, the number of area blocks and map information blocks for one screen is n. Depending on which area block on the memory is accessed, which block of the map information should be accessed is specified.

なお、上記実施形態では、圧縮後のデータ量が2ユニット以下となるときをデータ量が少なくなるものとして説明したが、必ずしもこれに限定されず、圧縮後のデータ量が、1ビットでも少なくなれば、圧縮後のデータを領域ブロックに格納するようにしても良い。   In the above embodiment, the case where the data amount after compression is 2 units or less has been described as the data amount being reduced. However, the present invention is not necessarily limited to this, and the data amount after compression can be reduced even by 1 bit. For example, the compressed data may be stored in the area block.

10 メモリコントローラ
11 書き込み部
12 読み出し部
13 圧縮処理部
14、18 セレクタ
15 書き込み制御部
16 読み出し制御部
17 展開処理部
20 マップ情報管理部
21 SDRAM
22 動画復号部
23 画像出力部
DESCRIPTION OF SYMBOLS 10 Memory controller 11 Write part 12 Read part 13 Compression process part 14, 18 Selector 15 Write control part 16 Read control part 17 Expansion | development process part 20 Map information management part 21 SDRAM
22 Video decoding unit 23 Image output unit

Claims (5)

メモリへのアクセスを制御するメモリコントローラにおいて、
入力データをブロックに分割し、圧縮する圧縮部と、
該圧縮されたデータの該ブロックが、非圧縮の場合に比べ、データ量が少なくなった場合には、圧縮されたデータのブロックを、少なくならなかった場合には、非圧縮データのブロックを、該非圧縮のデータのブロックを格納可能なように、各領域ブロックに分割されたメモリの格納領域の先頭アドレスから、メモリに格納させる格納部と、
該メモリに格納されたデータのブロックに対応する格納領域に、データ量、データが圧縮データか非圧縮データかを示す情報からなるマップ情報を別途格納するマップ情報格納部と、
を備えることを特徴とするメモリコントローラ。
In the memory controller that controls access to the memory,
A compression unit that divides input data into blocks and compresses them;
When the data amount of the compressed data block is smaller than that of the non-compressed case, the compressed data block is reduced. When the compressed data block is not reduced, the uncompressed data block is changed. A storage unit for storing in the memory from the start address of the storage area of the memory divided into each area block so that the block of uncompressed data can be stored;
A map information storage unit that separately stores map information including information indicating whether the data amount is compressed data or non-compressed data in a storage area corresponding to a block of data stored in the memory;
A memory controller comprising:
前記メモリから読み込んだ前記データのブロックを展開する展開部と、
前記マップ情報を参照し、メモリから読み込んだデータのブロックが、圧縮されたデータである場合には、前記展開部によって展開されたデータを、非圧縮のデータの場合には、読み込んだデータそのままを選択して出力する出力部と、
を更に備えることを特徴とする請求項1に記載のメモリコントローラ。
A decompression unit for decompressing the block of data read from the memory;
If the block of data read from the memory with reference to the map information is compressed data, the data expanded by the expansion unit is used. If the block is uncompressed data, the read data is left as it is. An output section to select and output;
The memory controller according to claim 1, further comprising:
前記圧縮部は、前記データのブロック内のみを参照する可逆な圧縮方法を用いてデータのブロックを圧縮することを特徴とする請求項1に記載のメモリコントローラ。   The memory controller according to claim 1, wherein the compression unit compresses a block of data using a reversible compression method that refers to only the block of data. 前記データのブロックは、メモリへの最小アクセス単位の整数倍の大きさであることを特徴とする請求項1に記載のメモリコントローラ。   2. The memory controller according to claim 1, wherein the block of data has a size that is an integral multiple of a minimum access unit to the memory. メモリに対する1つの読み出し/書き込みアクセスリクエストは、1つ以上のデータのブロックへのアクセスからなり、各データのブロックへのアクセスはひとつ以上の前記最小アクセス単位へのアクセスとなり、全ての該最小アクセス単位に格納されているデータが無圧縮であった場合に、該データのブロックへのアクセスでアクセスされる該最小アクセス単位数の全アクセスリクエスト中での最小値をm、該最小アクセス単位のビット数をnビットとした場合、該データのブロックの圧縮結果がm×nビット以下となった場合、圧縮によりデータ量が少なくなったと判断することを特徴とする請求項4に記載のメモリコントローラ。   One read / write access request to the memory consists of access to one or more blocks of data, access to each block of data becomes access to one or more of the minimum access units, and all the minimum access units M is the minimum value in all access requests of the minimum number of access units accessed by accessing the block of data when the data stored in is uncompressed, and the number of bits of the minimum access unit 5. The memory controller according to claim 4, wherein when n is n bits, it is determined that the amount of data has been reduced by compression when the compression result of the block of data is not more than m × n bits.
JP2009180330A 2009-08-03 2009-08-03 Memory controller Expired - Fee Related JP5526641B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009180330A JP5526641B2 (en) 2009-08-03 2009-08-03 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009180330A JP5526641B2 (en) 2009-08-03 2009-08-03 Memory controller

Publications (2)

Publication Number Publication Date
JP2011034370A true JP2011034370A (en) 2011-02-17
JP5526641B2 JP5526641B2 (en) 2014-06-18

Family

ID=43763372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009180330A Expired - Fee Related JP5526641B2 (en) 2009-08-03 2009-08-03 Memory controller

Country Status (1)

Country Link
JP (1) JP5526641B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013102958A1 (en) * 2012-01-06 2013-07-11 三菱電機株式会社 Memory access control device
JP2013161447A (en) * 2012-02-08 2013-08-19 Toshiba Corp Controller, data storage device and program
WO2015128955A1 (en) * 2014-02-26 2015-09-03 株式会社日立製作所 Storage device, device having storage device, and storage control method
JP2016181212A (en) * 2015-03-25 2016-10-13 株式会社メガチップス Semiconductor memory, memory control device, storage device, host device, data processing system, data writing device, data writing program, control program, data writing method
JP2020102102A (en) * 2018-12-25 2020-07-02 ルネサスエレクトロニクス株式会社 Semiconductor device and method for controlling access to data
JP2022177671A (en) * 2021-05-18 2022-12-01 国立大学法人 筑波大学 Information processing device and storage control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006099774A (en) * 2004-09-28 2006-04-13 Sony Computer Entertainment Inc Data processing method and device, processing system, computer processing system, and computer network
JP2006524858A (en) * 2003-04-16 2006-11-02 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing apparatus using compression on data stored in memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006524858A (en) * 2003-04-16 2006-11-02 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing apparatus using compression on data stored in memory
JP2006099774A (en) * 2004-09-28 2006-04-13 Sony Computer Entertainment Inc Data processing method and device, processing system, computer processing system, and computer network

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013102958A1 (en) * 2012-01-06 2013-07-11 三菱電機株式会社 Memory access control device
JP2013161447A (en) * 2012-02-08 2013-08-19 Toshiba Corp Controller, data storage device and program
WO2015128955A1 (en) * 2014-02-26 2015-09-03 株式会社日立製作所 Storage device, device having storage device, and storage control method
JPWO2015128955A1 (en) * 2014-02-26 2017-03-30 株式会社日立製作所 Storage device, apparatus having storage device, and storage control method
US10444992B2 (en) 2014-02-26 2019-10-15 Hitachi, Ltd. Storage device, apparatus having storage device, and storage control method
JP2016181212A (en) * 2015-03-25 2016-10-13 株式会社メガチップス Semiconductor memory, memory control device, storage device, host device, data processing system, data writing device, data writing program, control program, data writing method
JP2020102102A (en) * 2018-12-25 2020-07-02 ルネサスエレクトロニクス株式会社 Semiconductor device and method for controlling access to data
CN111382088A (en) * 2018-12-25 2020-07-07 瑞萨电子株式会社 Semiconductor device and method for controlling data access
US11687261B2 (en) 2018-12-25 2023-06-27 Renesas Electronics Corporation Semiconductor device and a method for controlling accessing data
CN111382088B (en) * 2018-12-25 2023-11-21 瑞萨电子株式会社 Semiconductor device and method for controlling data access
JP2022177671A (en) * 2021-05-18 2022-12-01 国立大学法人 筑波大学 Information processing device and storage control method
JP7680017B2 (en) 2021-05-18 2025-05-20 国立大学法人 筑波大学 Information processing device and storage control method

Also Published As

Publication number Publication date
JP5526641B2 (en) 2014-06-18

Similar Documents

Publication Publication Date Title
CN103888777B (en) Moving picture compression decompressing device
CN103828372B (en) Method for temporarily storing read pointer of buffer device, buffer controller and buffer device
JP5526641B2 (en) Memory controller
CN102547283A (en) Video transcoding in a system-on-chip
JP5156655B2 (en) Image processing device
CN101208954A (en) Video decoder with variable compression ratio and buffer for storing and retrieving reference frame data
KR20050090516A (en) Video decoding system
CN101594535A (en) Image processing apparatus
US20120147023A1 (en) Caching apparatus and method for video motion estimation and compensation
JP4973886B2 (en) Moving picture decoding apparatus, decoded picture recording apparatus, method and program thereof
JP2009098822A (en) Data processing apparatus and shared memory access method
US20070047655A1 (en) Transpose buffering for video processing
CA2185753C (en) Digital image decoding apparatus
JP6679290B2 (en) Semiconductor device
CN100356780C (en) Image storing method for compressing video frequency signal decode
US5701158A (en) Digital image decoding apparatus
EP3185127B1 (en) Semiconductor device, data processing system, and semiconductor device control method
CN104581175A (en) Image processing device and method
US9990900B2 (en) Image processing device and method thereof
JP2004343553A (en) Image decoding display device
JPH06282643A (en) Picture synthesizing effect device
JP2009130599A (en) Video decoding device
JP2004120027A (en) Image processing device
JPH04326654A (en) Picture data compression expansion device
JP3890338B2 (en) Image signal processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120405

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130705

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130716

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130917

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: 20140318

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140331

R150 Certificate of patent or registration of utility model

Ref document number: 5526641

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees