WO2009110446A1 - Memory mapping method, memory system - Google Patents

Memory mapping method, memory system Download PDF

Info

Publication number
WO2009110446A1
WO2009110446A1 PCT/JP2009/053923 JP2009053923W WO2009110446A1 WO 2009110446 A1 WO2009110446 A1 WO 2009110446A1 JP 2009053923 W JP2009053923 W JP 2009053923W WO 2009110446 A1 WO2009110446 A1 WO 2009110446A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
address
address conversion
color
areas
Prior art date
Application number
PCT/JP2009/053923
Other languages
French (fr)
Japanese (ja)
Inventor
一久 石坂
孝 宮崎
Original Assignee
日本電気株式会社
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 日本電気株式会社 filed Critical 日本電気株式会社
Priority to JP2010501904A priority Critical patent/JP5293974B2/en
Publication of WO2009110446A1 publication Critical patent/WO2009110446A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • G06F12/1045Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB] associated with a data cache

Abstract

Provided is a memory mapping method in which pages of a specific size, which serve as units for mapping logical addresses and physical addresses, each represent storage positions of a cache in a cache memory, wherein the pages are identified by means of a color ID. One memory address is mapped to areas (3-0, 3-1, 3-N-1) of a physical address space (2); different address conversions (4-0, 4-1, 4-N-1) are implemented for access to memory (1) from each of the areas (3-0, 3-1, 3-N-1), and different color IDs are used to access the addresses in memory (1) for each of the areas (3-0, 3-1, 3-N-1).

Description

メモリマッピング方法、メモリシステムMemory mapping method and memory system
 本発明はコンピュータシステムにおけるメモリシステム及びメモリマッピング方法に関し、特にメモリをアドレス空間にマップするメモリシステム及びメモリマッピング方法に関する。 The present invention relates to a memory system and a memory mapping method in a computer system, and more particularly to a memory system and a memory mapping method for mapping a memory to an address space.
 プロセッサ、キャッシュメモリ及び主メモリ(以下、主メモリを単にメモリと呼ぶ)を備えるコンピュータシステムにおいて、メモリに記憶されるデータを一時保持するキャッシュメモリ(以下、キャッシュメモリをキャッシュと呼ぶ)を有効に利用して動作速度の遅いメモリによるレイテンシ(latency)を隠蔽する方法は、アプリケーションソフトウェアの性能向上に重要であることが知られている。 In a computer system including a processor, a cache memory, and a main memory (hereinafter, the main memory is simply referred to as a memory), a cache memory that temporarily stores data stored in the memory (hereinafter, the cache memory is referred to as a cache) is effectively used. Thus, it is known that a method of concealing latency due to a memory having a low operation speed is important for improving the performance of application software.
 物理インデックスキャッシュでは、物理アドレスによってデータがキャッシュ上に格納されるときの位置(インデックス)が決められる。OSによる論理アドレスと物理アドレスのマッピングはページと呼ばれる単位(4KBがよく用いられる)で行われ、キャッシュ上で同じ位置に格納されるページは同じカラー番号(カラーID)で表現される。 In the physical index cache, the position (index) when data is stored on the cache is determined by the physical address. Mapping of logical addresses and physical addresses by the OS is performed in units called pages (4 KB is often used), and pages stored at the same position on the cache are represented by the same color number (color ID).
 図1に、物理アドレス空間とキャッシュの関係の例を示す。 Figure 1 shows an example of the relationship between the physical address space and the cache.
 図1の物理アドレス空間中のカッコ外の番号はページ番号を表わし、カッコ内の番号はカラー番号を表す。ページ番号は、
   ページ番号 = アドレス / ページサイズ
 であり、
   カラー番号 = ページ番号 % カラー数
 である。ただし、/ は整数除算を表わし % は剰余演算(reminder operation)を表す。又、カラー数は、物理アドレス空間でとり得るカラー番号の個数である。
The numbers outside the parentheses in the physical address space of FIG. 1 represent page numbers, and the numbers within the parentheses represent color numbers. The page number is
Page number = address / page size and
Color number = Page number% Number of colors. Where / represents integer division and% represents the remainder operation. The number of colors is the number of color numbers that can be taken in the physical address space.
図1はカラー数が8の場合の例であるが、カラー番号はキャッシュ上の格納位置を示している。図1のキャッシュ中の番号はカラー番号を示しており、物理アドレス空間上のページはキャッシュ上の同じカラー番号を持つ場所に格納される。 FIG. 1 shows an example in which the number of colors is 8, but the color number indicates the storage position on the cache. The numbers in the cache in FIG. 1 indicate color numbers, and the pages in the physical address space are stored in locations having the same color number on the cache.
 非特許文献1に記載されているように、このような物理インデックスキャッシュの特徴を利用して、OSによるプロセスの論理アドレスと物理アドレスのマッピング時に、キャッシュの利用効率を高めることが可能であることが知られている。 As described in Non-Patent Document 1, it is possible to improve the use efficiency of the cache when mapping the logical address and the physical address of the process by the OS by using such a characteristic of the physical index cache. It has been known.
 キャッシュの利用効率を悪化させる現象として、プロセス間のキャッシュ競合がある。これは、図2に示すように、複数のプロセスがアクセスするデータがキャッシュ上の同じ位置に格納される場合に、お互いにデータをキャッシュ上から追い出しあう現象である。このようなキャッシュ競合を削減する方法として、プロセス毎に利用可能なカラー番号を分け、それぞれのプロセスの論理ページには利用可能カラー番号を持つ物理ページのみをマッピングすることで、プロセス毎にキャッシュ上の同じ位置を利用させないようにする方法がある。  Cache competition between processes is a phenomenon that deteriorates the efficiency of cache usage. As shown in FIG. 2, when data accessed by a plurality of processes is stored at the same location on the cache, the data is driven out of the cache. As a method of reducing such cache contention, separate the color numbers that can be used for each process and map only the physical pages that have the usable color numbers to the logical pages of each process. There is a way to avoid using the same position.
 図3に、2つのプロセスA、B間のキャッシュ競合を削減するための論理アドレスと物理アドレスのマッピングを示す。プロセスAの論理ページはカラー番号0,1,2,3を持つページにのみマップされ、プロセスBの論理ページはカラー番号4,5を持つページにのみマップされている。従って、図4に示すように、2つのプロセスはキャッシュ上の同じ位置を利用しない。 Fig. 3 shows the mapping between logical addresses and physical addresses for reducing cache contention between the two processes A and B. The logical page of process A is mapped only to pages with color numbers 0, 1, 2, 3 and the logical page of process B is mapped only to pages with color numbers 4, 5. Thus, as shown in FIG. 4, the two processes do not utilize the same location on the cache.
 特許文献1はリアルタイムタスクとその他のタスクでカラー番号を分けることによって、リアルタイムタスクがキャッシュ競合によって性能が下がらないようにする方法を開示している。 Patent Document 1 discloses a method for preventing the performance of a real-time task from degrading due to cache contention by separating color numbers between the real-time task and other tasks.
 特許文献2は、このようなメモリサイズ制限の問題を解決する方法としてフリーカラーリング(Free Coloring)手法を開示している。図5はFree Coloring手法を説明するための図面である。 Patent Document 2 discloses a free coloring method as a method for solving such a memory size limitation problem. FIG. 5 is a drawing for explaining the Free Coloring method.
 図5に示すようにFree Coloringでは、CPUバスのアドレス幅を、メモリバスのアドレス幅に対してカラー数分だけ増やす。 As shown in FIG. 5, in Free Coloring, the CPU bus address width is increased by the number of colors with respect to the memory bus address width.
 図5において、増加分のbit(図中のc)はキャッシュにアクセスするときにカラーを指定する位置に加えられる。 In FIG. 5, the increment bit (c in the figure) is added to the position where the color is designated when accessing the cache.
 一方、メモリにアクセスする際はこの増加分のbitが削除される。このようにすることで、物理アドレス空間とメモリの対応関係(マッピング)は図6の様に、複数の物理アドレス空間上のページがメモリ上の1つのページに対応するようになる。ここでは、このメモリ上の同一のページに対応する物理空間上のページをグループと呼ぶ。 On the other hand, when accessing the memory, this increased bit is deleted. By doing so, the correspondence relationship (mapping) between the physical address space and the memory is such that a page in a plurality of physical address spaces corresponds to one page in the memory as shown in FIG. Here, a page on the physical space corresponding to the same page on the memory is called a group.
 グループ内にはカラー数だけのページが存在し、それらはすべて異なるカラーを持つため、任意のカラーでメモリ上のページにアクセスすることが可能となる。従って、カラー指定のためにプロセスが利用可能なメモリサイズの制限を緩和できる。 There are as many pages as the number of colors in the group, and they all have different colors, so it is possible to access pages in memory with any color. Therefore, the limitation on the memory size that can be used by the process for color designation can be relaxed.
 特許文献3は、メモリを複数の区分に分け、区分間でキャッシュを共有するものであって、異なる区分のメモリが同一の物理アドレスを有し、キャッシュのタグにPID(パーティション識別部)という拡張ビットを付して異なる区分のメモリ位置を区別している。 Patent Document 3 divides a memory into a plurality of sections and shares a cache among the sections. The memories in different sections have the same physical address, and the cache tag is an extension called PID (partition identification unit). Bits are used to distinguish different memory locations.
 又、特許文献4は、キャッシュがメモリアクセスに対して発生する競合ミスの確率を低くするようにキャッシュ上のセットを特定するインデックスを決定するようにしている。
特開2000-339220号公報 特表平09-507599号公報 特開2001-282617号公報 特開平09-223069号公報 Kessler他著「Page Placement Algorithms for Large Real-Indexed Caches」 ACM Transactions on Computer Systems, 1992, Vol. 4, No. 10, pp.338-359
Further, in Patent Document 4, an index for specifying a set on the cache is determined so as to reduce the probability of a contention miss occurring in the cache with respect to memory access.
JP 2000-339220 A Japanese Translation of National Publication No. 09-507599 JP 2001-282617 A Japanese Patent Application Laid-Open No. 09-223069 Kessler et al. "Page Placement Algorithms for Large Real-Indexed Caches" ACM Transactions on Computer Systems, 1992, Vol. 4, No. 10, pp.338-359
 しかしながら、論理ページと物理ページのマッピングによってプロセスのキャッシュ利用を制御する特許文献1では、プロセスに割り当て可能なページを制限するために、プロセスが利用可能なメモリサイズが小さくなることである。図7に、8カラーの場合に利用可能なカラーの集合(カラー集合)が{0,1}に制限されたプロセスの例を示す。図の左側が物理アドレス空間であり、図の右側にプロセスの論理アドレス空間にマップ可能なページを示す。図7に示されているように、このプロセスは最大で全メモリサイズの25%しか利用できないという問題がある。 However, in Patent Document 1 that controls the cache usage of a process by mapping logical pages and physical pages, the memory size that can be used by the process is reduced in order to limit the pages that can be allocated to the process. FIG. 7 shows an example of a process in which the set of colors (color set) that can be used in the case of 8 colors is limited to {0, 1}. The left side of the figure is the physical address space, and the right side of the figure shows pages that can be mapped to the process logical address space. As shown in FIG. 7, this process has the problem that only a maximum of 25% of the total memory size is available.
 又、特許文献2のようにグループ内の全てのページが同一のメモリ上のページに対応することは、同時にはグループ内のページ内の1つしか利用することができないことを意味し、CPUバス上の物理アドレス空間をとびとびに利用しなければならないことになる。ここではこの様な制限を「アドレスの連続性が失われる」と呼ぶことにする。 Also, as in Patent Document 2, all pages in a group corresponding to pages in the same memory means that only one of the pages in the group can be used at the same time, and the CPU bus The upper physical address space must be used at once. Here, such a restriction is referred to as “address continuity is lost”.
 特許文献2に係るFree Coloringでは、このようにアドレスの連続性が失われるため、アドレスに連続性があることを前提とした既存のOSに組み込むことが困難であるという問題がある。 In Free Coloring according to Patent Document 2, since the continuity of the address is lost in this way, there is a problem that it is difficult to incorporate it into an existing OS on the assumption that the address has continuity.
 又、連続する複数の物理ページをまとめて1つのページテーブルエントリで大きな論理ページにマップするラージページでは、まとめられたページの全てにアクセスされる可能性がある。従ってアドレスの連続性が失われた場合は、ラージページの使用が困難になるという問題もある。 In addition, in a large page in which a plurality of continuous physical pages are combined and mapped to a large logical page with one page table entry, all the combined pages may be accessed. Accordingly, when the continuity of the address is lost, there is a problem that it becomes difficult to use the large page.
 特許文献3では、キャッシュのタグにPIDという拡張ビットを付して異なる区分のメモリ位置を区別しているが、メモリ上の同一位置からキャッシュ上の異なるカラーにはアクセスできないという問題がある。 In Patent Document 3, an extension bit called PID is attached to a tag of a cache to distinguish different memory locations, but there is a problem that different colors on the cache cannot be accessed from the same location on the memory.
 特許文献4も、キャッシュがメモリアクセスに対して発生する競合ミスの確率を低くするようにキャッシュ上のセットを特定するインデックスを決定するようにしているが、メモリをマップした物理アドレス空間上に複数の領域を有さず、メモリ上の同一位置からキャッシュ上の異なるカラーにはアクセスできないという問題がある。 In Patent Document 4, an index for specifying a set on the cache is determined so as to reduce the probability of a contention miss that occurs in the cache with respect to memory access, but there are a plurality of indexes in the physical address space to which the memory is mapped. There is a problem that different colors on the cache cannot be accessed from the same position on the memory.
 本発明の典型的(exemplary)な目的は、OSの論理アドレスと物理アドレスのマッピングによってプロセスのキャッシュ利用を制御する方式において、アドレスの連続性を失うことなく、プロセスが利用可能なメモリサイズを増やすことができるメモリマッピング方法及びメモリシステムを提供することにある。 An exemplary object of the present invention is to increase the memory size that can be used by a process without losing address continuity in a method of controlling the cache usage of a process by mapping the logical address and physical address of an OS. A memory mapping method and a memory system are provided.
 本発明に係る典型的(exemplary)なメモリマッピング方法は、メモリと、前記メモリに記憶されるデータを一時保持し、物理アドレスによって前記データの格納位置が決まるキャッシュメモリと、を備え、前記格納位置を、論理アドレスと前記物理アドレスとのマッピングの単位となる一定サイズのページ毎に、カラーIDで識別するメモリシステムでの、前記メモリの物理アドレス空間へのマッピング方法において、
 前記メモリの一のアドレスを前記物理アドレス空間の複数の領域にマップし、
 前記複数の領域のそれぞれから前記メモリへのアクセスに対して、それぞれ異なるアドレス変換を行い、
 前記メモリ上の前記一のアドレスに対して、前記複数の領域のそれぞれから異なるカラーIDでアクセスする、
 ことを特徴とする。
An exemplary memory mapping method according to the present invention includes: a memory; and a cache memory that temporarily holds data stored in the memory and determines a storage position of the data by a physical address. In a method of mapping the physical address space of the memory in a memory system that identifies each page of a certain size, which is a unit of mapping between a logical address and the physical address, by a color ID,
Mapping one address of the memory to a plurality of areas of the physical address space;
For each access to the memory from each of the plurality of areas, different address conversion is performed,
Accessing the one address on the memory with a different color ID from each of the plurality of areas;
It is characterized by that.
 本発明に係る典型的(exemplary)なメモリシステムは、メモリと、前記メモリに記憶されるデータを一時保持し、物理アドレスによって前記データの格納位置が決まるキャッシュメモリと、物理アドレス空間上の複数の領域のそれぞれから前記メモリへのアクセスに対して、それぞれ異なるアドレス変換を行うアドレス変換部と、を備え、
前記格納位置を、論理アドレスと前記物理アドレスとのマッピングの単位となる一定サイズのページ毎に、カラーIDで識別し、
前記メモリ上の一のアドレスを前記複数の領域にマップし、前記複数の領域のそれぞれから前記メモリへのアクセスに対して、前記アドレス変換部でそれぞれ異なるアドレス変換を行い、前記複数の領域のそれぞれから異なるカラーIDで前記一のアドレスにアクセスすることを特徴とする。
An exemplary memory system according to the present invention includes a memory, a cache memory that temporarily stores data stored in the memory, a storage location of the data is determined by a physical address, and a plurality of physical address spaces. An address conversion unit that performs different address conversion for each access to the memory from each of the areas, and
The storage location is identified by a color ID for each page of a certain size, which is a unit of mapping between logical addresses and physical addresses,
One address on the memory is mapped to the plurality of areas, and each address conversion unit performs different address conversion for access to the memory from each of the plurality of areas, and each of the plurality of areas The one address is accessed with a different color ID.
 本発明による典型的(exemplary)な効果は、メモリ上の一のアドレスを物理アドレス空間上の複数の領域にマップし、これらの領域のそれぞれからメモリへのアクセスに対して異なるアドレス変換を行うことで、これらの領域のそれぞれから異なるカラーIDでアクセスすることにより、アドレスの連続性を失うことなく、かつプロセスが利用可能なメモリサイズを減少させることなく、OSの論理ページと物理ページのマッピングによってプロセスのキャッシュ利用を制御することができるメモリマッピング方法及びメモリシステムを得ることができることである。 The exemplary effect of the present invention is that one address on the memory is mapped to multiple areas on the physical address space and each of these areas performs a different address translation for access to the memory. By accessing each of these areas with a different color ID, the mapping between the OS logical page and the physical page is performed without losing the continuity of the address and without reducing the memory size available to the process. It is possible to obtain a memory mapping method and a memory system capable of controlling the cache usage of a process.
物理インデックスキャッシュと物理アドレス空間の関係を説明するための図である。It is a figure for demonstrating the relationship between a physical index cache and a physical address space. プロセス間キャッシュ競合を説明するための図である。It is a figure for demonstrating the cache competition between processes. OSの論理アドレスと物理アドレスの変換によるキャッシュ制御を説明するための図である。It is a figure for demonstrating the cache control by conversion of the logical address and physical address of OS. OSの論理アドレスと物理アドレスの変換によるキャッシュ制御によるプロセス間キャッシュ制御を説明するための図である。It is a figure for demonstrating the cache control between processes by the cache control by conversion of the logical address and physical address of OS. 特許文献2に係るFree Coloring手法を説明するための図である。It is a figure for demonstrating the Free * Coloring method which concerns on patent document 2. FIG. 特許文献2に係るFree Coloring手法によるメモリマップを説明するための図である。It is a figure for demonstrating the memory map by the Free * Coloring method which concerns on patent document 2. FIG. 特許文献1に係るキャッシュ制御のために生じるメモリサイズ制限を説明するための図である。10 is a diagram for explaining a memory size limitation that occurs for cache control according to Patent Document 1. FIG. 本発明の概要を示す図である。It is a figure which shows the outline | summary of this invention. 本発明の第1の実施の形態の構成を示す図である。It is a figure which shows the structure of the 1st Embodiment of this invention. 本発明の第1の実施の形態の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるメモリマッピングを示す図である。It is a figure which shows the memory mapping in the 1st Embodiment of this invention. 本発明の第1の実施の形態の構成を示す図である。It is a figure which shows the structure of the 1st Embodiment of this invention. 本発明の第1の実施の形態の別の構成を示す図である。It is a figure which shows another structure of the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるページの対応関係を示す図である。It is a figure which shows the correspondence of the page in the 1st Embodiment of this invention. 本発明の第1の実施の形態に対応する別の実施の形態におけるメモリマッピングを示す図である。It is a figure which shows the memory mapping in another embodiment corresponding to the 1st Embodiment of this invention. 本発明の第2の実施の形態の構成を示す図である。It is a figure which shows the structure of the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるメモリマッピングを示す図である。It is a figure which shows the memory mapping in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるページの対応関係を示す図である。It is a figure which shows the correspondence of the page in the 2nd Embodiment of this invention. 本発明の第3の実施の形態の構成を示す図である。It is a figure which shows the structure of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の構成を示す図である。It is a figure which shows the structure of the 3rd Embodiment of this invention. 本発明の第4の実施の形態の構成を示す図である。It is a figure which shows the structure of the 4th Embodiment of this invention. 本発明の第4の実施の形態の構成を示す図である。It is a figure which shows the structure of the 4th Embodiment of this invention. 本発明の第4の実施の形態のアドレス変換表の例を示す図である。It is a figure which shows the example of the address conversion table | surface of the 4th Embodiment of this invention. 本発明の第4の実施の形態のアドレス変換表の例を示す図である。It is a figure which shows the example of the address conversion table | surface of the 4th Embodiment of this invention.
符号の説明Explanation of symbols
 1 メモリ
 2 物理アドレス空間
 3-0、3-1、3-N-1 領域
 4-0、4-1、4-N-1 アドレス変換
 15 CPU
 16 キャッシュ
 17 アドレス変換部
 18 メモリ
 19 物理アドレス空間
 25 CPU
 26 キャッシュ
 27 アドレス変換部
 28 メモリ
 29 物理アドレス
 35 CPU
 36 キャッシュ
 37 アドレス変換部
 37a 第1アドレス変換部
 37b 第2アドレス変換部
 38 メモリ
 45 CPU
 46 キャッシュ
 47 アドレス変換部
 47a アドレス変換変更部
 48 メモリ
 49 物理アドレス
 50 アドレス変換表
1 Memory 2 Physical address space 3-0, 3-1, 3-N-1 area 4-0, 4-1, 4-N-1 Address conversion 15 CPU
16 cache 17 address conversion unit 18 memory 19 physical address space 25 CPU
26 cache 27 address conversion unit 28 memory 29 physical address 35 CPU
36 cache 37 address conversion unit 37a first address conversion unit 37b second address conversion unit 38 memory 45 CPU
46 cache 47 address conversion unit 47a address conversion change unit 48 memory 49 physical address 50 address conversion table
 次に、本発明を実施するための典型的(exemplary)な実施の形態について図面を参照して詳細に説明する。ここで、図8は本発明の概要を示す図である。 Next, exemplary embodiments for carrying out the present invention will be described in detail with reference to the drawings. Here, FIG. 8 is a diagram showing an outline of the present invention.
 図8に示すメモリマッピング方法は、メモリ11を物理アドレス空間12上の複数の領域13-0~13-N-1にマップし、それぞれの領域からメモリへのアクセスに対して異なるアドレス変換14-0~14-N-1を行うことで、それぞれの領域からメモリ上の同一アドレスに異なるカラーでアクセスする。 In the memory mapping method shown in FIG. 8, the memory 11 is mapped to a plurality of areas 13-0 to 13-N-1 on the physical address space 12, and different address conversion 14- is performed for each area access to the memory. By performing 0 to 14-N-1, the same address on the memory is accessed from each area with different colors.
 複数の領域を用いることによって、メモリ上の同一アドレスに異なるカラーでアクセスできるため、カラー指定されたプロセスに対して、OSがプロセスに割り当て可能な物理ページが増加する。 By using a plurality of areas, it is possible to access the same address on the memory with different colors, so that the number of physical pages that can be allocated to the process by the OS increases for the color-designated process.
 また各領域内ではアドレスの連続性が保たれる。
[第1の実施の形態]
 図9は本発明の第1の実施の形態の構成を示す図である。本実施の形態は、CPU15、キャッシュ16、アドレス変換部17、メモリ18及びメモリ18を複数の領域にマップした物理アドレス空間19によって構成される。キャッシュ16はメモリ18に記憶されるデータを一時保持する。キャッシュ16はキャッシュメモリ、メモリ18は主メモリである。物理アドレス空間19は、メモリ18をマップした領域をカラー数と等しい数だけ持つ。
Address continuity is maintained in each area.
[First Embodiment]
FIG. 9 is a diagram showing the configuration of the first exemplary embodiment of the present invention. The present embodiment is configured by a physical address space 19 in which the CPU 15, the cache 16, the address conversion unit 17, the memory 18, and the memory 18 are mapped to a plurality of areas. The cache 16 temporarily holds data stored in the memory 18. The cache 16 is a cache memory, and the memory 18 is a main memory. The physical address space 19 has a number of areas mapped to the memory 18 equal to the number of colors.
 又、アドレス変換部17は、領域毎に1カラーずつずれるようにアドレスにオフセットを加えるようにアドレス変換を行う。 In addition, the address conversion unit 17 performs address conversion so as to add an offset to the address so as to shift by one color for each area.
 すなわち、本実施の形態のアドレス変換においては、領域数とカラー数をNとするときに、メモリ上のアドレスyに対応する領域i上のアドレスを xi,yとしたときのカラーの集合{Color(xi,y): i=0,1,..,N-1}に対して、以下の式1が成り立つ。 That is, in the address conversion of the present embodiment, when the number of areas and the number of colors are N, the set of colors when the address on the area i corresponding to the address y on the memory is x i, y { Color (x i, y ): For i = 0,1, .., N−1}, the following Expression 1 is established.
     {Color(xi,y): i=0,1,..,N-1} = {0,1,...,N-1}      (式1)
なお、Color(x)はアドレスxのカラーを表わし、以下の式で表される。
{Color (x i, y ): i = 0,1, .., N-1} = {0,1, ..., N-1} (Formula 1)
Note that Color (x) represents the color at address x and is represented by the following equation.
     Color(x) = (x / ページサイズ) % カラー数
ただし、/ は整数除算を表わし % は剰余を表す。また、カラー数は、
     カラー数 = キャッシュサイズ / Way 数 / ページサイズ
である。
Color (x) = (x / page size)% Number of colors, where / represents integer division and% represents remainder. The number of colors is
Number of colors = cache size / number of ways / page size.
 式1を満たすようなアドレス変換が存在することを説明するために、具体的な例を用いて説明する。ただし、これは、本実施の形態のアドレス変換が、この具体的な例に限られることを示すものではない。 In order to explain the existence of address translation that satisfies Equation 1, a specific example will be used. However, this does not indicate that the address conversion of the present embodiment is limited to this specific example.
 式1を満たすようなアドレス変換の例は、領域i上のアドレスxiに対して以下の変換式fi(xi)を適用することである。ここで、baseiは領域iの先頭アドレスである。 An example of address conversion that satisfies Expression 1 is to apply the following conversion expression f i (x i ) to the address x i on the region i. Here, base i is the start address of area i.
     fi(xi) = xi- basei + ページサイズ * i
 このアドレス変換の場合、メモリ上のyに対応する領域i上のアドレスxi,yは、
     y = f(xi,y) = xi,y - basei+ ページサイズ * i
であるから、xi,y= y + basei - ページサイズ * i
である。従って、
     Color(xi,y) = Color(y + basei - ページサイズ * i)
であるから、例えば全ての領域に対して Color(basei) = C (Cは定数)となるように先頭アドレスを選べば、
     Color(xi,y) = (Color(y) + C + i) % カラー数
となり、式1が成り立つことが分かる。
f i (x i ) = x i -base i + page size * i
In the case of this address conversion, the address x i, y on the area i corresponding to y on the memory is
y = f (x i, y ) = x i, y -base i + page size * i
X i, y = y + base i -page size * i
It is. Therefore,
Color (x i, y ) = Color (y + base i -page size * i)
So, for example, if you select the top address so that Color (base i ) = C (C is a constant) for all areas,
Color (x i, y ) = (Color (y) + C + i)% It becomes the number of colors, and it can be seen that Equation 1 holds.
 次に本発明の第1の実施の形態の動作を説明する。図10は、本発明の第1の実施の形態の動作を示す図であって、領域i上のアドレスxiを通してメモリ上のアドレスyにアクセスする場合の動作を示している。 Next, the operation of the first embodiment of the present invention will be described. FIG. 10 is a diagram showing the operation of the first exemplary embodiment of the present invention, and shows the operation when the address y on the memory is accessed through the address x i on the area i.
 この場合のメモリアクセスは以下のような順序で行われる。なお、MMU (Memory Management Unit)による論理アドレスと物理アドレスの変換までの動作は明らかであるため、物理アドレスへの変換後から説明する。また、アドレス変換部での領域iに対する変換をfiとする。 Memory access in this case is performed in the following order. Since the operation up to the conversion of the logical address and the physical address by the MMU (Memory Management Unit) is clear, it will be described after the conversion to the physical address. Also, let f i be the conversion for the region i in the address conversion unit.
 手順としては、図10に示したように、
(1)CPU15が物理アドレスxiを発行する(ステップS11)
(2)キャッシュ16がアドレスxiでアクセスされる(ステップS12)。この時のカラーはColor(xi)である。
(3)キャッシュミス等でメモリ18にアクセスが起こるとき、物理アドレス xiが発行される(ステップS13)
(4)アドレス変換部17によりアドレスy = f(xi)に変更される(ステップS14)
(5)メモリ18に対してアドレスyが発行される(ステップS15)
である。
As a procedure, as shown in FIG.
(1) The CPU 15 issues a physical address x i (step S11).
(2) The cache 16 is accessed with the address x i (step S12). The color at this time is Color (xi).
(3) When the memory 18 is accessed due to a cache miss or the like, the physical address x i is issued (step S13).
(4) The address conversion unit 17 changes the address to y = f i (x i ) (step S14).
(5) The address y is issued to the memory 18 (step S15).
It is.
 次に、具体的な例を用いて本実施形態を説明する。 Next, this embodiment will be described using a specific example.
 図11は本発明の第1の実施の形態におけるメモリマップを示す。本実施の形態は、メモリサイズが256MB(アドレス0x00000000から0x0fffffff)、ページサイズが4KB、カラー数と領域数が4の場合の例である。本実施の形態では、図11に示すように、メモリは物理アドレス空間上の4つの領域にマップされており、それぞれの開始アドレス(basei)は、領域0は0x00000000、領域1は0x10000000、領域2は0x20000000、領域3は0x3000000である。 FIG. 11 shows a memory map in the first embodiment of the present invention. In this embodiment, the memory size is 256 MB (addresses 0x00000000 to 0x0fffffff), the page size is 4 KB, the number of colors and the number of areas are four. In the present embodiment, as shown in FIG. 11, the memory is mapped to four areas on the physical address space, and each start address (base i ) is 0x00000000 for area 0, 0x10000000 for area 1 and area 2 is 0x20000000 and area 3 is 0x3000000.
 又、本実施の形態の以下のアドレス変換式を適用することでアドレス変換を行う。 Also, address conversion is performed by applying the following address conversion formula of this embodiment.
     fi(x) = x - ページサイズ * i ? basei * i + sizei
             (basei ≦ x < basei + ページサイズ * i)
     fi(x) = x - ページサイズ * i ? basei
             (basei + ページサイズ * i ≦ x < basei + sizei)
ここで、sizeiはメモリのサイズを表す。
f i (x) = x-page size * i? base i * i + size i
(base i ≤ x <base i + page size * i)
f i (x) = x-page size * i? base i
(base i + page size * i ≤ x <base i + size i )
Here, size i represents the size of the memory.
 図12に本発明の第1の実施の形態の構成を示す。本実施の形態では、アドレス変換はキャッシュ16とバスの間で行われる。本実施の形態の別の構成として、図13に示すように、バスとメモリ18の間でアドレス変換を行っても良い。 FIG. 12 shows the configuration of the first embodiment of the present invention. In the present embodiment, address translation is performed between the cache 16 and the bus. As another configuration of the present embodiment, address conversion may be performed between the bus and the memory 18 as shown in FIG.
 次に本実施の形態の動作を説明するため、図11の領域2上の0x20006000番地にアクセスする場合を例に説明する。 Next, in order to explain the operation of the present embodiment, a case of accessing address 0x20006000 in area 2 in FIG. 11 will be described as an example.
 手順としては、
(1)CPUがアドレス0x20006000を発行する
(2)キャッシュがアドレス0x20006000でアクセスされる。この時のカラーは (0x20006000 / 4KB) % 4 = 1 である
(3)キャッシュミス等によりメモリにアクセスが発生する場合、物理アドレス0x20006000が発行される
(4)アドレス変換部によりアドレス (0x20006000 - 4KB * 2 - 0x20000000) = 0x00004000 に変換される
(5)メモリにアドレス0x00004000が発行されるである。
As a procedure,
(1) The CPU issues address 0x20006000 (2) The cache is accessed at address 0x20006000. The color at this time is (0x20006000 / 4KB)% 4 = 1 (3) When the memory is accessed due to a cache miss etc., the physical address 0x20006000 is issued (4) The address is converted by the address translation unit (0x20006000-4KB * 2-0x20000000) = 0x00004000 converted (5) Address 0x00004000 is issued to the memory.
 本実施の形態における各領域とメモリの対応関係を図14に示す。図中括弧外の数字はページ番号(すなわちアドレス/ページサイズ)を表わし、括弧内の数字はカラー番号(すなわちページ番号%カラー数)を表す。 FIG. 14 shows the correspondence between each area and memory in this embodiment. The numbers outside the parentheses in the figure represent page numbers (that is, addresses / page sizes), and the numbers within the parentheses represent color numbers (that is, page number% color number).
 図14に示されているように、アドレス変換により各領域でカラーが1ずつずらされており、4つの領域を利用することで、メモリ上のページに対して任意のカラーでアクセスできることが分かる。 As shown in FIG. 14, the color is shifted by 1 in each area by address conversion, and it can be seen that a page in the memory can be accessed in any color by using the four areas.
 例えば、メモリ上のページ0x00000をマップした領域0上のページは0x00000でカラーは0であるのに対して、領域1上のページは0x10001でカラーは1、領域2上のページは0x20002でカラーは2、領域3上のページは0x30003でカラーは3である。つまり、メモリ上のページ0x00000にアクセス可能なカラーの集合は {0,1,2,3}であり、全カラーを含んでいる。従って、利用可能カラー集合がどのようなプロセスでも、メモリ上のページ0x00000を利用することができる。 For example, the page on area 0 to which page 0x00000 on the memory is mapped is 0x00000 and the color is 0, whereas the page on area 1 is 0x10001, the color is 1, the page on area 2 is 0x20002, and the color is 2. The page on area 3 is 0x30003 and the color is 3. That is, the set of colors that can access page 0x00000 in memory is {0,1,2,3}, which includes all colors. Therefore, the page 0x00000 on the memory can be used by any process having the available color set.
 例えば、利用可能カラーの集合が{0}に設定されたプロセスの場合、1つの領域しか利用できない場合の利用可能な最大メモリサイズは256MB/4=64MBで、全体の25%である。これに対して本実施の形態の場合では利用可能なメモリサイズは256MBと、全メモリの100%に増加している。 For example, in the case of a process in which the set of available colors is set to {0}, the maximum usable memory size when only one area can be used is 256MB / 4 = 64MB, which is 25% of the total. On the other hand, in the case of the present embodiment, the available memory size is 256 MB, which is increased to 100% of the total memory.
 次に、本発明の第1の実施の形態に対応する別の実施の形態について説明する。図15の本実施の形態におけるメモリマップに示すように、各領域の開始アドレスをずらすことによって、アドレス変換を簡略化している。 Next, another embodiment corresponding to the first embodiment of the present invention will be described. As shown in the memory map in the present embodiment in FIG. 15, the address conversion is simplified by shifting the start address of each area.
 本実施の形態は、メモリサイズが256MB(アドレス0x00000000から0x0fffffff)、カラー数と領域数が4の場合の例である。本実施の形態では、図15に示すように、メモリは物理アドレス空間上の4つの領域にマップされており、それぞれの開始アドレス(basei)は、領域0は0x00000000、領域1は0x10001000、領域2は0x20002000、領域3は0x30003000である。また、本実施の形態のアドレス変換式を以下に示す。 The present embodiment is an example in which the memory size is 256 MB (addresses 0x00000000 to 0x0fffffff), the number of colors and the number of areas are four. In the present embodiment, as shown in FIG. 15, the memory is mapped to four areas on the physical address space, and each start address (base i ) is 0x00000000 for area 0, 0x10001000 for area 1 and area 2 is 0x20002000 and area 3 is 0x30003000. The address conversion formula of this embodiment is shown below.
     fi(x) = x - basei * i
 本実施の形態における各領域とメモリの対応関係は図14に示した第1の実施の形態の対応関係と同じである。
f i (x) = x-base i * i
The correspondence between each area and the memory in the present embodiment is the same as the correspondence in the first embodiment shown in FIG.
 以上説明したように、OSによる論理アドレスと物理アドレスのマッピングによるキャッシュ制御によってプロセスが利用可能なカラー集合をもつ場合に、Color(xi)がその集合に含まれず、領域i中のxiを含むページをこのプロセスに割り当てることができない場合であっても、本発明の第1の実施の形態によれば、メモリ上のアドレスyにアクセスするために複数の領域を利用することが可能である。 As described above, when a process has a color set that can be used by cache control based on mapping between logical addresses and physical addresses by the OS, Color (x i ) is not included in the set, and x i in the region i is Even if the page to be included cannot be allocated to this process, according to the first embodiment of the present invention, it is possible to use a plurality of areas for accessing the address y on the memory. .
 これは、式1から分かるように、アドレスyに対応する物理アドレス空間上のアドレスのカラー集合{Color(xi,y: i=0,1,...n-1) は全てのカラーを含む。従って、Color(xi,y)にプロセスが利用可能なカラーとなるような領域iが必ず存在するため、そのようなxi,yを含むページをプロセスに割り当てることで、プロセスはメモリ上のアドレスyを利用することができる。すなわち、プロセスが利用可能なカラーの集合に関わらず、プロセスに任意のページを割り当てることが可能になり、キャッシュ制御を行うためにプロセスの利用可能なメモリサイズが減少するという問題を解決できる。 As can be seen from Equation 1, the color set {Color (x i, y : i = 0,1, ... n-1) of the address in the physical address space corresponding to the address y represents all colors. Including. Therefore, since there is always an area i in the Color (x i, y ) that can be used by the process, by assigning a page containing such x i, y to the process, the process will be in memory. Address y can be used. In other words, regardless of the set of colors that can be used by the process, an arbitrary page can be allocated to the process, and the problem that the memory size that can be used by the process decreases due to cache control can be solved.
 また、変換式から分かるように、各領域中の全てのアドレスは異なるメモリ上のアドレスに対応しているため、物理アドレス空間上のアドレスの連続性が失われないという効果も奏する。
[第2の実施の形態]
 次に、本発明の第2の実施の形態を実施するための最良の形態について図面に基づいて詳細に説明する。図16は本発明の第2の実施の形態の構成を示す図である。
Further, as can be seen from the conversion formula, since all addresses in each area correspond to addresses in different memories, there is an effect that the continuity of addresses in the physical address space is not lost.
[Second Embodiment]
Next, the best mode for carrying out the second embodiment of the present invention will be described in detail with reference to the drawings. FIG. 16 is a diagram showing the configuration of the second exemplary embodiment of the present invention.
 本実施の形態は、CPU25、キャッシュ26、アドレス変換部27、メモリ28及びメモリ28を複数の領域にマップした物理アドレス空間29から構成される。 This embodiment includes a CPU 25, a cache 26, an address conversion unit 27, a memory 28, and a physical address space 29 in which the memory 28 is mapped into a plurality of areas.
 本実施の形態の物理アドレス空間29は、メモリ28をマップした領域数がカラー数より少ない。 In the physical address space 29 of the present embodiment, the number of areas to which the memory 28 is mapped is less than the number of colors.
 本実施の形態のアドレス変換部27は、 それぞれの領域毎に0以上でカラー数より小さい異なる定数Ci(iは領域を表す番号)だけカラーをずらすようにアドレスにオフセットを加えることでアドレス変換をする。 The address conversion unit 27 according to the present embodiment adds an offset to the address so that the color is shifted by a different constant C i (i is a number representing the area) that is greater than or equal to 0 and smaller than the number of colors for each area. do.
すなわち、本発明のアドレス変換の特徴は、カラー数をN、領域数をMとすると、メモリ上のアドレスyに対応する領域i上のアドレスをxi,yとしたときのカラーの集合{Color(xi,y): i=0,1,..,M-1}に対して以下の式2が成り立つことである。
     {Color(xi,y): i=0,1,...,M-1} = {(Cy + Ci) % N: i=0,1,...,M-1}     (式2)
         ここで、
             M < N、
             Ciは全てのiに対して異なる0以上N-1以下の定数、
             Cyはyによって異なる0からN-1までの定数
         である。
That is, the feature of an address conversion of the present invention, when the number of colors N, the number of regions is M, a set of color when the address on the area i corresponding to the address y in the memory x i, and y {Color (x i, y ): The following equation 2 holds for i = 0,1, .., M−1}.
{Color (x i, y ): i = 0,1, ..., M-1} = {(Cy + C i )% N: i = 0,1, ..., M-1} (expression 2)
here,
M <N,
C i is a constant different from 0 to N-1 that is different for all i,
Cy is a constant from 0 to N-1 depending on y.
 すなわち、カラーの集合{Color(xi,y): i=0,1,...,M-1}がM個の異なるカラーを含んでいることを意味している。なお、第1の実施の形態は、式2においてN=Mの場合である。 That is, the color set {Color (x i, y ): i = 0, 1,..., M−1} means that M different colors are included. Note that the first embodiment is a case where N = M in Equation 2.
 次に、本発明の第2の実施の形態の具体的な動作について説明する。本実施の形態は、メモリサイズが256MB(アドレス0x00000000から0x0fffffff)、カラー数が4で領域数が2の場合の例である。本実施の形態では、図17に示すように、メモリは物理アドレス空間上の2つの領域にマップされており、それぞれの開始アドレス(basei)は、領域0は0x00000000、領域1は0x10000000である。 Next, a specific operation of the second exemplary embodiment of the present invention will be described. The present embodiment is an example in which the memory size is 256 MB (addresses 0x00000000 to 0x0fffffff), the number of colors is 4, and the number of areas is 2. In the present embodiment, as shown in FIG. 17, the memory is mapped into two areas on the physical address space, and the start addresses (base i ) of the area 0 are 0x00000000 and the area 1 is 0x10000000. .
 また、本実施の形態では領域毎に2カラーずらすように、以下のようなアドレス変換式が用いられている。
     fi(x) = x - ページサイズ * 2 * i - basei * i + sizei
             (basei ≦ x < basei + ページサイズ * 2 * i)
     fi(x) = x - ページサイズ * 2 * i - basei
             (basei + ページサイズ * 2 * i ≦ x < basei + sizei)
ここで、sizeiはメモリのサイズを表す。
In the present embodiment, the following address conversion formula is used so as to shift two colors for each area.
f i (x) = x-page size * 2 * i-base i * i + size i
(base i ≤ x <base i + page size * 2 * i)
f i (x) = x-page size * 2 * i-base i
(base i + page size * 2 * i ≤ x <base i + size i )
Here, size i represents the size of the memory.
 この実施の形態における各領域とメモリの対応関係を図18に示す。 FIG. 18 shows the correspondence between each area and the memory in this embodiment.
 図18に示されているように、アドレス変換により各領域でカラーが2ずつずらされており、4つの領域を利用することで、メモリ上のページに対して2カラーでアクセスできることが分かる。 As shown in FIG. 18, the color is shifted by 2 in each area by address conversion, and it can be seen that a page on the memory can be accessed in 2 colors by using the 4 areas.
 例えば、メモリ上のページ0x00000をマップした領域0上のページは0x00000でカラーは0であるのに対して、領域1上のページは0x10001でカラーは2である。従って、利用可能カラー集合に0を含むプロセスのみならず、2を含むプロセスもメモリ上のページ0x00000を利用することができる。 For example, the page on area 0 to which page 0x00000 on the memory is mapped is 0x00000 and the color is 0, while the page on area 1 is 0x10001 and the color is 2. Therefore, not only the process including 0 in the usable color set but also the process including 2 can use the page 0x00000 in the memory.
 又、利用可能カラーの集合が{0}に設定されたプロセスの場合、1つの領域しか利用できない場合の利用可能な最大メモリサイズは256MB/4=64MBで、全体の25%である。これに対して本実施の形態による複数の領域を利用する場合は128MBであり、メモリの 50%が利用可能である。 Also, in the case of a process in which the set of available colors is set to {0}, the maximum usable memory size when only one area can be used is 256MB / 4 = 64MB, which is 25% of the total. On the other hand, when using a plurality of areas according to the present embodiment, it is 128 MB, and 50% of the memory can be used.
 以上説明したように、本実施の形態では、メモリ上のアドレスyに対応するための物理アドレス空間上のアドレスのカラー集合がM色のカラーを含むため、アドレスyにM色のカラーでアクセスできる。従って、利用できるカラーが制限されたプロセスに対して、メモリ上のアドレスyに対応するときのカラー集合 {Color(xi,y):i=0,...,M-1}中に、利用可能なカラーが含まれる場合は、このプロセスにyを含むページを割り当てることが可能になり、プロセスに割り当て可能なページを増加させることができるという効果を奏する。 As described above, in this embodiment, since the color set of addresses on the physical address space corresponding to the address y on the memory includes M colors, the address y can be accessed with M colors. . Therefore, for a process with a limited available color, in the color set {Color (x i, y ): i = 0, ..., M-1} corresponding to the address y in memory, When an available color is included, a page including y can be allocated to the process, and the number of pages that can be allocated to the process can be increased.
 又、本実施の形態では、領域数がカラー数より小さいため、本発明の第1の実施の形態に比べて物理アドレス空間中のメモリをマップした領域の数を小さくできるという効果がある。 In addition, in this embodiment, since the number of areas is smaller than the number of colors, there is an effect that the number of areas mapped to the memory in the physical address space can be reduced as compared with the first embodiment of the present invention.
 第1及び第2の実施の形態の別形態として、メモリを物理アドレス空間上にマップした複数の領域のうち、いくつかの領域のサイズ又は全ての領域のサイズは、メモリのサイズよりも小さくてよい。この場合、メモリ上の特定のアドレスにアクセスするときのカラー集合が小さくなるためプロセスに割り当て可能なメモリサイズを増加する効果は小さくなるが、物理アドレス空間上にメモリが占める領域が小さくなるという効果がある。 As another form of the first and second embodiments, among the plurality of areas in which the memory is mapped on the physical address space, the size of some areas or the size of all areas is smaller than the size of the memory. Good. In this case, since the color set for accessing a specific address on the memory is small, the effect of increasing the memory size that can be allocated to the process is small, but the area occupied by the memory in the physical address space is small. There is.
 第1及び第2の実施の形態の更なる別形態として、メモリを物理アドレス空間上にマップした複数の領域の数が、カラー数より多くても良い。領域のサイズがメモリサイズより小さい場合は、メモリ上の特定のアドレスにアクセスするときのカラー集合が小さくなるが、領域数を増やすことによってカラー集合を大きくするという効果がある。
[第3の実施の形態]
 次に、本発明の第3の実施の形態について図面を参照しながら詳細に説明する。ここで、図19は、本発明の第3の実施の形態の構成を示す図である。
As yet another form of the first and second embodiments, the number of the plurality of areas in which the memory is mapped on the physical address space may be larger than the number of colors. When the size of the area is smaller than the memory size, the color set for accessing a specific address on the memory becomes small, but there is an effect of increasing the color set by increasing the number of areas.
[Third Embodiment]
Next, a third embodiment of the present invention will be described in detail with reference to the drawings. Here, FIG. 19 is a diagram showing the configuration of the third exemplary embodiment of the present invention.
 本実施の形態は、CPU35、キャッシュ36、複数のアドレス変換部37、メモリ38及びメモリを複数の領域にマップした物理アドレス空間からなる。 This embodiment includes a CPU 35, a cache 36, a plurality of address conversion units 37, a memory 38, and a physical address space in which the memory is mapped to a plurality of areas.
 本実施の形態は、複数のアドレス変換部37が連続してアドレス変換を行い、物理アドレス空間上にマップされた複数の領域から異なるカラーでメモリにアクセスすることを特徴とする。 The present embodiment is characterized in that a plurality of address conversion units 37 continuously perform address conversion and access the memory in different colors from a plurality of areas mapped on the physical address space.
 本実施の形態の動作を図20を用いて説明する。図20は、本発明の第3の実施の形態の動作を示す図である。なお、以下の説明ではアドレス変換部の数をnとし、領域i上のアドレスxiにアクセスがあった場合について説明する。 The operation of this embodiment will be described with reference to FIG. FIG. 20 is a diagram illustrating the operation of the third exemplary embodiment of the present invention. In the following description, it is assumed that the number of address conversion units is n and the address xi on the area i is accessed.
 手順としては、図20に示したように、
(1)CPUが物理アドレスxiを発行する(ステップS21)
(2)キャッシュがアドレスxiでアクセスされる。この時のカラーはColor(xi)である(ステップS22)
(3)キャッシュミス等でメモリにアクセスが起こるとき、物理アドレスxiが発行される(ステップS23)
(4)アドレス変換部0によりアドレスyi,0 = fi,0(xi)に変更される(ステップS24)
(5)以下同様にアドレス変換部kにより、アドレスyi,k = fi,k(yi,k-1)に変換される(ステップS25)
(6)最後にアドレス変換部n-1により場合、アドレスy = fi,n-1(yi,n-2)に変換される(ステップS26)
(7)メモリに対してアドレスyが発行される(ステップS27)
 である。
As a procedure, as shown in FIG.
(1) The CPU issues a physical address x i (step S21).
(2) The cache is accessed at address x i . The color at this time is Color (x i ) (step S22).
(3) When the memory is accessed due to a cache miss or the like, the physical address x i is issued (step S23).
(4) The address conversion unit 0 changes the address y i, 0 = f i, 0 (x i ) (step S24).
(5) Similarly, the address conversion unit k converts the address y i, k = f i, k (y i, k−1 ) (step S25).
(6) Finally, when the address conversion unit n-1 converts the address y = f i, n-1 (y i, n-2 ) (step S26).
(7) The address y is issued to the memory (step S27).
It is.
 次に、本発明の第3の実施の形態の具体的な動作について説明する。 Next, a specific operation of the third exemplary embodiment of the present invention will be described.
 本実施の形態は、メモリサイズが256MB(アドレス0x00000000から0x0fffffff)、カラー数が4で領域数が4の場合の例である。本実施の形態では、第1の実施の形態と同様に図15に示すように、メモリは物理空間上の4つの領域にマップされており、それぞれの開始アドレス(basei)は、領域0は0x00000000、領域1は0x10001000、領域2は0x20002000、領域3は0x30003000である。 In this embodiment, the memory size is 256 MB (addresses 0x00000000 to 0x0fffffff), the number of colors is 4, and the number of areas is 4. In this embodiment, as shown in FIG. 15, the memory is mapped to four areas on the physical space as in the first embodiment, and the start address (base i ) of each area is 0x00000000, region 1 is 0x10001000, region 2 is 0x20002000, and region 3 is 0x30003000.
 本実施の形態の形態を図21に示す。本実施の形態は2つのアドレス変換部を備える。
第1アドレス変換部37aは、キャッシュとバスの間にあり、アドレス変換式は以下である。
     fi(x) = x - ページサイズ * I
 第2アドレス変換部37bは、バスのアドレスデコーダである。ここでアドレスデコーダとは、アドレスの上位4ビットが、0x0, 0x1, 0x2, 0x3の場合にメモリへのアクセスであることを伝える信号を出し、アドレスの下位28ビットをメモリへのアドレス信号とするという動作をするものとする。
A mode of the present embodiment is shown in FIG. This embodiment includes two address conversion units.
The first address conversion unit 37a is located between the cache and the bus, and the address conversion formula is as follows.
f i (x) = x-page size * I
The second address conversion unit 37b is a bus address decoder. Here, the address decoder outputs a signal indicating that the memory is accessed when the upper 4 bits of the address are 0x0, 0x1, 0x2, and 0x3, and uses the lower 28 bits of the address as an address signal to the memory. It shall operate as follows.
 本実施の形態の動作を説明するため、物理アドレス空間上の0x20006000番地にアクセスする場合の動作を説明する。 In order to explain the operation of this embodiment, the operation when accessing address 0x20006000 in the physical address space will be described.
 手順としては、
(1)CPU35がアドレス0x20006000を発行する
(2)キャッシュ36がアドレス0x20006000でアクセスされる。この時のカラーは (0x20006000 / 4KB) % 4 = 1 である
(3)キャッシュミス等によりメモリにアクセスが発生する場合、物理アドレス0x20006000が発行される
(4)第1アドレス変換部37aによりアドレス (0x20006000 - 4KB * 2) = 0x20004000 に変換される
(5)第2アドレス変換部(アドレスデコーダ)37bにより、アドレス0x20004000の上位4ビットがメモリへのアクセスを示すビットであることが判定され、メモリ38へのアクセスであることを示す信号が出される。またアドレスの下位28ビット0x0004000がメモリに発行するアドレスとされる
(6)メモリ38にアドレス0x0004000が発行される
 である。
As a procedure,
(1) The CPU 35 issues an address 0x20006000 (2) The cache 36 is accessed at the address 0x20006000. The color at this time is (0x20006000 / 4KB)% 4 = 1 (3) When the memory is accessed due to a cache miss or the like, the physical address 0x20006000 is issued (4) The address ( 0x20006000-4KB * 2) = 0x20004000 (5) The second address conversion unit (address decoder) 37b determines that the upper 4 bits of the address 0x20004000 are bits indicating access to the memory, and the memory 38 A signal indicating that it is an access to is issued. The lower 28 bits 0x0004000 of the address are used as an address to be issued to the memory. (6) The address 0x0004000 is issued to the memory 38.
 本実施の形態における各領域とメモリの対応関係は図14に示した第1の実施の形態の対応関係と同じである。 The correspondence relationship between each area and the memory in the present embodiment is the same as the correspondence relationship in the first embodiment shown in FIG.
 以上説明したように、本実施の形態により、利用できるカラーが制限されたプロセスにおいて利用可能なメモリサイズが増加することは、第1及び第2の実施の形態から明らかである。 As described above, according to the present embodiment, it is apparent from the first and second embodiments that the usable memory size increases in the process in which the usable colors are limited.
 本実施の形態によれば、システム中に既に存在する他の目的のための構成要素が、本発明のためのアドレス変換の一部として利用できる場合に、アドレス変換の一部をその構成要素を用いて行うことによって、新たに追加するアドレス変換部を簡略化できることである。 According to this embodiment, when a component for another purpose already existing in the system can be used as a part of the address translation for the present invention, a part of the address translation is replaced with the component. By using this, it is possible to simplify a newly added address conversion unit.
 なお、本実施の形態の別形態として、複数のアドレス変換部のうちいくつかは複数の領域に対して共通していても良い。
[第4の実施の形態]
 次に、本発明の第4の実施の形態について詳細に説明する。
As another form of the present embodiment, some of the plurality of address conversion units may be common to a plurality of areas.
[Fourth Embodiment]
Next, a fourth embodiment of the present invention will be described in detail.
 本実施の形態の構成を図22に示す。図22は、本発明の第4の実施の形態の構成を示す図である。 The configuration of this embodiment is shown in FIG. FIG. 22 is a diagram showing the configuration of the fourth exemplary embodiment of the present invention.
 本実施の形態は、CPU45、キャッシュ46、アドレス変換部47、アドレス変換変更部47a、メモリ48及びメモリ48を複数の領域にマップした物理アドレス空間49からなる。 The present embodiment includes a CPU 45, a cache 46, an address conversion unit 47, an address conversion change unit 47a, a memory 48, and a physical address space 49 in which the memory 48 is mapped into a plurality of areas.
 本実施の形態は、アドレス変換部47がソフトウェアからアドレス変換を変更するためのアドレス変換変更部47aを備えていることを特徴とする。ここで、アドレス変換を変更するとは、変更前のアドレス変換では物理空間上のアドレスxに対応するメモリ上のアドレスがf(x)とするとき、変更後では対応するメモリ上のアドレスがf(x)とは異なるf'(x)となることを意味する。 This embodiment is characterized in that the address conversion unit 47 includes an address conversion change unit 47a for changing address conversion from software. Here, changing the address translation means that the address on the memory corresponding to the address x in the physical space is f (x) in the address translation before the change, and the address on the corresponding memory is f (x) after the change. x) is different from f ′ (x).
 本実施の形態におけるメモリアクセス時の動作は、これまでの説明から明らかであるので、ここではアドレス変換を変更することによる効果について説明する。なお、以下の説明では、変更前の領域iに対するアドレス変換をfiとする。 Since the operation at the time of memory access in the present embodiment is clear from the description so far, the effect of changing the address translation will be described here. In the following description, the address translation for the area i before the change to f i.
 この場合にメモリ上のアドレスyにアクセスするための物理アドレス空間上のアドレスをxiとすると、
y = fi(xi)
である。従って、領域iを用いることによって、メモリ上のアドレスyを、カラー Color(xi)でアクセスすることができる。これに対して、アドレス変換変更部を用いることによって、領域iに対するアドレス変換をf'iに変更した場合の、メモリ上のアドレスyにアクセスするためのアドレスをx'iとすると、y = f'i(x'i)
であり、このときのカラーはColor(x'i)である。従って、
Color(xi) != Color(x'i)
となるf'iを選ぶことによって、領域iを通してメモリ上のアドレスyにアクセスする時のカラーを変更することができる。なお、「!=」はノットイコール演算子を示し、左辺と右辺が等しくないことを表す。
In this case, if the address in the physical address space for accessing the address y on the memory is x i ,
y = f i (x i )
It is. Therefore, by using the area i, the address y on the memory can be accessed with the color Color (x i ). On the other hand, if the address conversion for the area i is changed to f ′ i by using the address conversion change unit, the address for accessing the address y on the memory is x ′ i , y = f ' i (x' i )
And the color at this time is Color (x ′ i ). Therefore,
Color (x i )! = Color (x ' i )
By selecting f ′ i , the color when accessing the address y on the memory through the region i can be changed. Note that “! =” Indicates a not equal operator, which indicates that the left side and the right side are not equal.
 メモリをマップした物理空間上の領域のサイズがメモリサイズより小さい場合や、領域数がカラー数より少ない場合は、メモリ上のアドレスにアクセス可能なカラー数が少なくなる。このような場合でも、本実施の形態では、各領域を通してアクセスするときのカラーを変更することができるので、変更前のアドレス変換ではアクセスできなかったカラーでメモリをアクセスすることができる。従って、メモリ上のアドレスにアクセス可能なカラーが増加するという効果が得られる。 If the size of the area on the physical space to which the memory is mapped is smaller than the memory size, or if the number of areas is less than the number of colors, the number of colors that can access the address on the memory is reduced. Even in such a case, in this embodiment, since the color when accessing through each area can be changed, the memory can be accessed with a color that cannot be accessed by the address conversion before the change. Therefore, the effect that the color which can access the address on the memory increases can be obtained.
 次に本発明の第4の実施の形態についてより具体的に説明する。本実施の形態の構成を図23に示す。本実施の形態は、CPU45、キャッシュ46、アドレス変換部47、アドレス変換表50、物理アドレス空間49及びメモリ48から構成される。本実施の形態はメモリサイズが256MBの例である。 Next, the fourth embodiment of the present invention will be described more specifically. The configuration of this embodiment is shown in FIG. This embodiment includes a CPU 45, a cache 46, an address conversion unit 47, an address conversion table 50, a physical address space 49, and a memory 48. In this embodiment, the memory size is 256 MB.
 本実施の形態は、アドレス変換部47がアドレス変換表50を用いて、物理アドレス空間49上のアドレスをメモリ48上のアドレスに変換することと、物理アドレス空間49上のメモリをマップした範囲のサイズがメモリサイズと同じであることを特徴とする。 In this embodiment, the address conversion unit 47 uses the address conversion table 50 to convert the address on the physical address space 49 into the address on the memory 48, and the range in which the memory on the physical address space 49 is mapped. The size is the same as the memory size.
 まず、アドレス変換表50について説明する。アドレス変換表50は、物理アドレス空間49上のアドレスとそのアドレスが変換されるメモリ48上のアドレスを記憶するための表である。 First, the address conversion table 50 will be described. The address conversion table 50 is a table for storing addresses on the physical address space 49 and addresses on the memory 48 to which the addresses are converted.
 アドレス変換部47は、アドレス変換を行う際に、アドレス変換表50を検索し、物理アドレス空間49上のアドレスが見つかれば、対応するメモリ空間上のアドレスを変換結果として抽出するという動作をする。 The address conversion unit 47 searches the address conversion table 50 when performing address conversion, and if an address on the physical address space 49 is found, extracts an address on the corresponding memory space as a conversion result.
 アドレスが見つからない場合は、エラーを返すといった動作や、デフォルトの変換を行って変換結果とするといった動作をすることができる。なお、本実施の形態では、アドレス変換表50はページサイズ単位でアドレスの対応関係を記録するが、これはアドレス変換表50が記録する単位をページサイズに限るものではない。 If the address is not found, an operation such as returning an error, or performing a default conversion to obtain a conversion result can be performed. In the present embodiment, the address conversion table 50 records the address correspondence in units of page size, but this does not limit the unit recorded by the address conversion table 50 to the page size.
 アドレス変換表50は、主メモリ上に記憶されても良いし、専用のメモリを持っても良い。また物理アドレスと論理アドレスの変換に使われるページテーブルの TLB(Translation Look-aside Buffer)ように高速なメモリでキャッシュされても良い。 The address conversion table 50 may be stored on the main memory or may have a dedicated memory. Alternatively, it may be cached with a high-speed memory such as a page table used for conversion between a physical address and a logical address.
 次に本実施の形態の動作を説明するため、物理アドレス空間上の0x00000010番地(ページ番号は0x00000)にアクセスする場合を例に説明する。これの例ではカラー数は4とする。また、利用するアドレス変換表は図23に記載のものである。 Next, in order to explain the operation of the present embodiment, a case where the address 0x00000010 (page number is 0x00000) in the physical address space will be described as an example. In this example, the number of colors is four. Further, the address conversion table used is as shown in FIG.
 手順としては、
(1)CPU45がアドレス0x00000010を発行する
(2)キャッシュ46がアドレス0x00000010でアクセスされる。この時のカラーは (0x00000010 / 4KB) % 4 = 0 である。
(3)キャッシュミス等によりメモリ48にアクセスが発生する場合、物理アドレス0x00000010が発行される。
(4)アドレス変換部47は、アドレス変換表を検索して、物理アドレス空間49上のページ0x00000に対応するメモリ48上のアドレスが0x00003であることを得る。
(5)メモリ48にアドレス0x00003010が発行される。
As a procedure,
(1) The CPU 45 issues an address 0x00000010. (2) The cache 46 is accessed at the address 0x00000010. The color at this time is (0x00000010 / 4KB)% 4 = 0.
(3) When the memory 48 is accessed due to a cache miss or the like, the physical address 0x00000010 is issued.
(4) The address conversion unit 47 searches the address conversion table to obtain that the address on the memory 48 corresponding to the page 0x00000 on the physical address space 49 is 0x00003.
(5) The address 0x00003010 is issued to the memory 48.
 次に、アドレス変換表を用いたアドレス変換によって、メモリ上のアドレスに対して異なるカラーでアクセスする例を、図24に示すアドレス変換表の例を用いて説明する。 Next, an example of accessing addresses in the memory in different colors by address conversion using the address conversion table will be described using the example of the address conversion table shown in FIG.
 図24のアドレス変換表は、物理アドレス空間上のページ 0x00000(カラー0)と 0x00001(カラー1)がメモリ上のページ 0x00000 に対応するように記録されている。従って、メモリ上のページ0x00000に対してカラー0または1でアクセスすることが可能である。 In the address conversion table of FIG. 24, pages 0x00000 (color 0) and 0x00001 (color 1) on the physical address space are recorded so as to correspond to pages 0x00000 on the memory. Therefore, it is possible to access page 0x00000 on the memory with color 0 or 1.
 これによって、本実施の形態が、OSによる論理アドレスと物理アドレスの変換を利用したキャッシュ制御を行う際のプロセスが利用可能なメモリサイズの制限を緩和する効果を持つ。 Thus, the present embodiment has an effect of relaxing the restriction on the memory size that can be used by the process when performing cache control using the conversion of the logical address and the physical address by the OS.
 本実施の形態では、アドレス変換表に記録する対応関係を変更することによって、物理アドレス空間上のアドレスが変換されるメモリ上のアドレスを変更することが可能である。すなわち、アドレス変換表50は、アドレス変換を変更するためのアドレス変換変更部47aである。従って、本実施の形態のアドレス変換部47はアドレス変換変更部47aを備えている。 In this embodiment, it is possible to change the address on the memory to which the address on the physical address space is converted by changing the correspondence recorded in the address conversion table. That is, the address conversion table 50 is an address conversion change unit 47a for changing address conversion. Therefore, the address conversion unit 47 of this embodiment includes an address conversion change unit 47a.
 次に、本実施の形態の物理アドレス空間について説明する。前述のように本実施の形態では、物理アドレス空間上のメモリをマップする範囲のサイズは、メモリサイズと同じであるという特徴を持つ。これは、アドレス変換表の記録内容を変更することによって、ある物理ページが対応するメモリ上のページを変更することができるため、物理アドレス空間上のメモリをマップした範囲のサイズをメモリのサイズより大きくすることなく、メモリ上の全ページにアクセスすることができるからである。 Next, the physical address space of this embodiment will be described. As described above, this embodiment has a feature that the size of the range for mapping the memory in the physical address space is the same as the memory size. This is because the page on the memory to which a certain physical page corresponds can be changed by changing the recorded contents of the address conversion table. Therefore, the size of the range where the memory in the physical address space is mapped is larger than the size of the memory. This is because all pages on the memory can be accessed without increasing the size.
 例えば、図24に示したアドレス変換表の場合では、メモリ上のページ0x00000に対応する物理アドレス空間上のページが2ページある。従って、このアドレス変換表の内容では、物理アドレス空間上のメモリをマップした範囲のサイズがメモリサイズと同じ場合は、メモリ上にアクセスできないページが存在する。 For example, in the case of the address conversion table shown in FIG. 24, there are two pages on the physical address space corresponding to page 0x00000 on the memory. Therefore, in the contents of this address conversion table, if the size of the range in which the memory in the physical address space is mapped is the same as the memory size, there are pages that cannot be accessed on the memory.
 しかし、アドレス変換表は記録内容を変更可能であるため、メモリ上のページ 0x00000に対応していた2つの物理アドレス空間上のページのどちらかの対応先をアクセスできなかったページに変更することによって、アクセスを可能にできる。 However, since the recorded contents of the address conversion table can be changed, by changing the correspondence destination of one of the two pages in the physical address space corresponding to page 0x00000 on the memory to the page that could not be accessed. Can enable access.
 例えば、メモリ上のアクセスできなかったページが0x00010であった場合には、図25に示すようにアドレス変換表を変更することによって、そのページにアクセスすることが可能となる。従って、本実施の形態では、物理アドレス空間上のメモリをマップする範囲のサイズをメモリサイズと同じサイズに抑えながら、メモリ上の同一アドレスに複数のカラーでアクセスすることを可能にするという効果がある。 For example, when the page that could not be accessed on the memory is 0x00010, it is possible to access the page by changing the address conversion table as shown in FIG. Therefore, the present embodiment has an effect that it is possible to access the same address on the memory with a plurality of colors while keeping the size of the range for mapping the memory on the physical address space to the same size as the memory size. is there.
 本実施の形態では、アドレス変換表を用いることで、ページサイズ単位でアドレスの対応を決定している。従って、本実施の形態は、領域サイズがページサイズで、領域数がページ数の場合である第1の本発明の最良の実施の形態の別形態に対応する実施の形態でもある。 In this embodiment, address correspondence is determined in page size units by using an address conversion table. Therefore, the present embodiment is also an embodiment corresponding to another form of the first embodiment of the present invention in which the region size is the page size and the number of regions is the number of pages.
以上、本発明の代表的な実施形態について説明したが、本発明は、本願の請求の範囲によって規定される、その精神または主要な特徴から逸脱することなく、他の種々の形で実施することができる。そのため、前述した各実施形態は単なる例示にすぎず、限定的に解釈されるべきではない。本発明の範囲は特許請求の範囲によって示すものであって、明細書や要約書の記載には拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更はすべて本発明の範囲内のものである。 While typical embodiments of the present invention have been described above, the present invention can be carried out in various other forms without departing from the spirit or main features defined by the claims of the present application. Can do. Therefore, each embodiment mentioned above is only an illustration, and should not be interpreted limitedly. The scope of the present invention is indicated by the claims, and is not restricted by the description or the abstract. Further, all modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.
本願は、2008年3月4日に出願された特願2008-053342号に基づき、優先権の利益を主張するものである。そして、特願2008-053342号の内容は本願の明細書の内容に含まれる。 This application claims the benefit of priority based on Japanese Patent Application No. 2008-053342 filed on Mar. 4, 2008. The contents of Japanese Patent Application No. 2008-0533342 are included in the contents of the specification of the present application.
 本発明によれば、キャッシュメモリ及び論理アドレスと物理アドレスの変換を行うプロセッサを備えたコンピュータにおいて、アプリケーションソフトを動かす際のキャッシュミスペナルティによる動作速度の低下を抑止するという用途に利用することができる。 According to the present invention, in a computer having a cache memory and a processor that converts a logical address and a physical address, it can be used for a purpose of suppressing a decrease in operation speed due to a cache miss penalty when operating application software. .

Claims (23)

  1.  メモリと、前記メモリに記憶されるデータを一時保持し、物理アドレスによって前記データの格納位置が決まるキャッシュメモリと、を備え、前記格納位置を、論理アドレスと前記物理アドレスとのマッピングの単位となる一定サイズのページ毎に、カラーIDで識別するメモリシステムでの、前記メモリの物理アドレス空間へのマッピング方法において、
     前記メモリの一のアドレスを前記物理アドレス空間の複数の領域にマップし、
     前記複数の領域のそれぞれから前記メモリへのアクセスに対して、それぞれ異なるアドレス変換を行い、
     前記メモリ上の前記一のアドレスに対して、前記複数の領域のそれぞれから異なるカラーIDでアクセスする、
     ことを特徴とするメモリマッピング方法。
    A memory and a cache memory that temporarily holds data stored in the memory, and the storage location of the data is determined by a physical address, and the storage location is a unit of mapping between the logical address and the physical address In a memory system that identifies each page of a certain size by a color ID, a mapping method to the physical address space of the memory,
    Mapping one address of the memory to a plurality of areas of the physical address space;
    For each access to the memory from each of the plurality of areas, different address conversion is performed,
    Accessing the one address on the memory with a different color ID from each of the plurality of areas;
    And a memory mapping method.
  2.  前記アドレス変換は、前記キャッシュメモリとメモリバスとの間に備わるアドレス変換部によって行われること、を特徴とする請求項1に記載のメモリマッピング方法。 The memory mapping method according to claim 1, wherein the address conversion is performed by an address conversion unit provided between the cache memory and a memory bus.
  3.  前記アドレス変換は、メモリバスと前記メモリとの間に備わるアドレス変換部によって行われること、を特徴とする請求項1に記載のメモリマッピング方法。 The memory mapping method according to claim 1, wherein the address conversion is performed by an address conversion unit provided between a memory bus and the memory.
  4.  前記アドレス変換は、前記領域毎に異なるオフセットを前記領域のアドレスに加えることで行われることを特徴とする請求項1乃至3のいずれか1項に記載のメモリマッピング方法。 4. The memory mapping method according to claim 1, wherein the address conversion is performed by adding an offset different for each area to the address of the area.
  5.  前記物理アドレス空間上でとり得る前記カラーIDの個数をカラー数とし、
     前記マッピングは、前記物理アドレス空間上で前記カラー数と同数の領域に前記メモリをマップし、
     前記アドレス変換は、前記複数の領域のそれぞれで前記カラーIDを1ずつずらすようにアドレス変換を行うこと、を特徴とする請求項1乃至4のいずれか1項に記載のメモリマッピング方法。
    The number of color IDs that can be taken on the physical address space is the number of colors,
    The mapping maps the memory to the same number of areas as the number of colors on the physical address space;
    5. The memory mapping method according to claim 1, wherein the address conversion is performed so that the color ID is shifted by one in each of the plurality of areas. 6.
  6.  前記マッピングは、前記物理アドレス空間上の前記複数の領域に、該領域毎に先頭ページの前記カラーIDが異なるように前記メモリをマップすること、を特徴とする請求項1乃至4のいずれか1項に記載のメモリマッピング方法。 5. The memory according to claim 1, wherein the mapping maps the memory to the plurality of regions on the physical address space so that the color ID of the first page is different for each region. The memory mapping method according to item.
  7.  前記マッピングは、前記物理アドレス空間上の前記カラー数よりも少ない数の領域に前記メモリをマップし、
     前記アドレス変換は、前記複数の領域のそれぞれで前記カラーIDを1ずつずらすようにアドレス変換を行うこと、を特徴とする請求項1乃至4のいずれか1項に記載のメモリマッピング方法。
    The mapping maps the memory to a number of areas less than the number of colors on the physical address space;
    5. The memory mapping method according to claim 1, wherein the address conversion is performed so that the color ID is shifted by one in each of the plurality of areas. 6.
  8.  前記アドレス変換は、複数の前記アドレス変換部によって行われること、を特徴とする請求項1乃至7のいずれか1項に記載のメモリマッピング方法。 The memory mapping method according to any one of claims 1 to 7, wherein the address conversion is performed by a plurality of the address conversion units.
  9.  前記マッピングは、前記複数の領域のそれぞれのサイズが前記メモリのサイズよりも小さい場合は、前記複数の領域の個数を前記カラー数よりも大きくすること、を特徴とする請求項1乃至8のいずれか1項に記載のメモリマッピング方法。 9. The mapping according to claim 1, wherein when the size of each of the plurality of areas is smaller than the size of the memory, the number of the plurality of areas is made larger than the number of colors. 2. The memory mapping method according to claim 1.
  10.  前記アドレス変換は、前記アドレス変換の方法を変更すること、を更に備えることを特徴とする請求項1乃至9のいずれか1項に記載のメモリマッピング方法。 10. The memory mapping method according to claim 1, wherein the address conversion further includes changing the address conversion method.
  11.  前記アドレス変換は、前記物理アドレス空間上のアドレスとメモリ空間上のアドレスとを対応させるアドレス変換表に基づいて行われ、
     前記アドレス変換表は内容を変更することが可能であること、を特徴とする請求項1乃至10のいずれか1項に記載のメモリマッピング方法。
    The address conversion is performed based on an address conversion table that associates an address on the physical address space with an address on the memory space;
    The memory mapping method according to claim 1, wherein the address conversion table can change contents.
  12.  物理アドレス空間上のメモリをマップした前記領域のサイズが前記メモリのサイズと等しいこと、を特徴とする請求項11に記載のメモリマッピング方法。 The memory mapping method according to claim 11, wherein the size of the area to which the memory in the physical address space is mapped is equal to the size of the memory.
  13.  メモリと、前記メモリに記憶されるデータを一時保持し、物理アドレスによって前記データの格納位置が決まるキャッシュメモリと、物理アドレス空間上の複数の領域のそれぞれから前記メモリへのアクセスに対して、それぞれ異なるアドレス変換を行うアドレス変換部と、を備え、
    前記格納位置を、論理アドレスと前記物理アドレスとのマッピングの単位となる一定サイズのページ毎に、カラーIDで識別し、
    前記メモリ上の一のアドレスを前記複数の領域にマップし、前記複数の領域のそれぞれから前記メモリへのアクセスに対して、前記アドレス変換部でそれぞれ異なるアドレス変換を行い、前記複数の領域のそれぞれから異なるカラーIDで前記一のアドレスにアクセスすることを特徴とするメモリシステム。
    A memory, a cache memory that temporarily stores data stored in the memory, and a storage location of the data is determined by a physical address; and access to the memory from each of a plurality of areas on a physical address space, respectively An address conversion unit that performs different address conversion,
    The storage location is identified by a color ID for each page of a certain size, which is a unit of mapping between logical addresses and physical addresses,
    One address on the memory is mapped to the plurality of areas, and each address conversion unit performs different address conversion for access to the memory from each of the plurality of areas, and each of the plurality of areas To access the one address with a different color ID.
  14.  前記キャッシュメモリとメモリバスとの間に前記アドレス変換部を備えること、を特徴とする請求項13に記載のメモリシステム。 The memory system according to claim 13, further comprising the address conversion unit between the cache memory and a memory bus.
  15.  メモリバスと前記メモリとの間に前記アドレス変換部を備えること、を特徴とする請求項13に記載のメモリシステム。 The memory system according to claim 13, further comprising the address conversion unit between a memory bus and the memory.
  16.  前記アドレス変換部は、前記領域毎に異なるオフセットを前記領域のアドレスに加えることによってアドレス変換を行うこと、を特徴とする請求項13乃至15のいずれか1項に記載のメモリシステム。 16. The memory system according to claim 13, wherein the address conversion unit performs address conversion by adding an offset different for each region to the address of the region.
  17.  前記物理アドレス空間上でとり得る前記カラーIDの個数をカラー数とし、
     前記物理アドレス空間上で前記カラー数と同数の領域に前記メモリをマップし、
     前記アドレス変換部は、前記複数の領域のそれぞれで前記カラーIDを1ずつずらすようにアドレス変換を行うこと、を特徴とする請求項13乃至16のいずれか1項に記載のメモリシステム。
    The number of color IDs that can be taken on the physical address space is the number of colors,
    Map the memory to the same number of colors as the number of colors on the physical address space;
    The memory system according to claim 13, wherein the address conversion unit performs address conversion so that the color ID is shifted by one in each of the plurality of regions.
  18.  前記物理アドレス空間上の前記複数の領域に、該領域毎に先頭ページの前記カラーIDが異なるように前記メモリをマップしたこと、を特徴とする請求項13乃至16のいずれか1項に記載のメモリシステム。 17. The memory according to claim 13, wherein the memory is mapped to the plurality of areas on the physical address space so that the color ID of the first page is different for each of the areas. Memory system.
  19.  前記物理アドレス空間上の前記カラー数よりも少ない数の領域に前記メモリをマップし、
     前記アドレス変換部は、前記複数の領域のそれぞれで前記カラーIDを1ずつずらすようにアドレス変換を行うこと、を特徴とする請求項13乃至16のいずれか1項に記載のメモリシステム。
    Mapping the memory to a number of areas less than the number of colors on the physical address space;
    The memory system according to claim 13, wherein the address conversion unit performs address conversion so that the color ID is shifted by one in each of the plurality of regions.
  20.  前記アドレス変換部を複数備えること、を特徴とする請求項13乃至19のいずれか1項に記載のメモリシステム。 The memory system according to claim 13, comprising a plurality of the address conversion units.
  21.  前記複数の領域のそれぞれのサイズが前記メモリのサイズよりも小さい場合は、前記複数の領域の個数を前記カラー数よりも大きくすること、を特徴とする請求項13乃至20のいずれか1項に記載のメモリシステム。 21. The method according to claim 13, wherein when the size of each of the plurality of regions is smaller than the size of the memory, the number of the plurality of regions is set larger than the number of colors. The described memory system.
  22.  前記アドレス変換部は、前記アドレス変換の方法を変更するための変換式を備えること、を特徴とする請求項13乃至21記載のメモリシステム。 22. The memory system according to claim 13, wherein the address conversion unit includes a conversion formula for changing the address conversion method.
  23.  前記アドレス変換部は、
     物理アドレス空間上のアドレスとメモリ空間上のアドレスとを対応させるアドレス変換表を備え、
     前記アドレス変換表は内容を変更することが可能であって、
     前記アドレス変換表を用いてアドレス変換を行うことを特徴とする請求項13乃至22記載のメモリシステム。
     
     
     
     
     
    The address conversion unit
    An address conversion table that associates addresses on the physical address space with addresses on the memory space,
    The address conversion table can change the contents,
    23. The memory system according to claim 13, wherein address conversion is performed using the address conversion table.




PCT/JP2009/053923 2008-03-04 2009-03-03 Memory mapping method, memory system WO2009110446A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010501904A JP5293974B2 (en) 2008-03-04 2009-03-03 Memory mapping method and memory system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-053342 2008-03-04
JP2008053342 2008-03-04

Publications (1)

Publication Number Publication Date
WO2009110446A1 true WO2009110446A1 (en) 2009-09-11

Family

ID=41056001

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/053923 WO2009110446A1 (en) 2008-03-04 2009-03-03 Memory mapping method, memory system

Country Status (2)

Country Link
JP (1) JP5293974B2 (en)
WO (1) WO2009110446A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516826A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Method and device for correspondence of large virtual pages and large physical pages

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991199A (en) * 1995-09-28 1997-04-04 Mazda Motor Corp Device access method in hierarchical storage system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0659980A (en) * 1992-08-05 1994-03-04 Matsushita Electric Ind Co Ltd Cache device
DE19538961C2 (en) * 1994-10-22 1997-03-20 Gmd Gmbh Storage device for storing data
US5752261A (en) * 1996-11-07 1998-05-12 Ncr Corporation Method and apparatus for detecting thrashing in a cache memory
EP0919927A3 (en) * 1997-11-26 2000-05-24 Compaq Computer Corporation Dynamic memory allocation technique for maintaining an even distribution of cache page addresses within an address space
JP2000339220A (en) * 1999-05-27 2000-12-08 Nippon Telegr & Teleph Corp <Ntt> Cache block reserving method and computer system with cache block reserving function
JP2004206424A (en) * 2002-12-25 2004-07-22 Hitachi Ltd Data processing device and data transfer method for data processing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991199A (en) * 1995-09-28 1997-04-04 Mazda Motor Corp Device access method in hierarchical storage system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516826A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Method and device for correspondence of large virtual pages and large physical pages

Also Published As

Publication number Publication date
JP5293974B2 (en) 2013-09-18
JPWO2009110446A1 (en) 2011-07-14

Similar Documents

Publication Publication Date Title
US10706101B2 (en) Bucketized hash tables with remap entries
KR102144491B1 (en) Memory management for a hierarchical memory system
KR100335300B1 (en) Method and system for dynamically partitioning a shared cache
US5864876A (en) DMA device with local page table
JP6764359B2 (en) Deduplication DRAM memory module and its memory deduplication method
US8095736B2 (en) Methods and systems for dynamic cache partitioning for distributed applications operating on multiprocessor architectures
JP6088951B2 (en) Cache memory system and processor system
US9612975B2 (en) Page cache device and method for efficient mapping
US9990299B2 (en) Cache system and method
US20160294693A1 (en) Routing Lookup Method and Device, and Construction Method for B-tree Structure
JP5039334B2 (en) Cache memory control method and apparatus
US20140317337A1 (en) Metadata management and support for phase change memory with switch (pcms)
CN104169892A (en) Concurrently accessed set associative overflow cache
KR20160040665A (en) Memory physical address query method and apparatus
US20220147449A1 (en) Method for establishing hierarchical look-up tables and/or inquiring memory address according to hierarchical look-up tables
JP2009015509A (en) Cache memory device
WO2010024071A1 (en) Cache memory, cache memory system, and method and program for using the cache memory
JP5293974B2 (en) Memory mapping method and memory system
US8874827B2 (en) Page merging for buffer efficiency in hybrid memory systems
CN107506139A (en) A kind of write request towards phase transition storage optimizes device
JP5196249B2 (en) Memory system, method and program for using cache memory
JP2004038806A (en) Address translation device and method and double hierarchy address translation device
JP2008511882A (en) Virtual address cache and method for sharing data using unique task identifiers
US20110066785A1 (en) Memory Management System and Method Thereof
CN110362509B (en) Unified address conversion method and unified address space

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09717639

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010501904

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09717639

Country of ref document: EP

Kind code of ref document: A1