WO2011004511A1 - アドレス変換装置 - Google Patents

アドレス変換装置 Download PDF

Info

Publication number
WO2011004511A1
WO2011004511A1 PCT/JP2010/000019 JP2010000019W WO2011004511A1 WO 2011004511 A1 WO2011004511 A1 WO 2011004511A1 JP 2010000019 W JP2010000019 W JP 2010000019W WO 2011004511 A1 WO2011004511 A1 WO 2011004511A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
translation
logical
tlb
physical
Prior art date
Application number
PCT/JP2010/000019
Other languages
English (en)
French (fr)
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 パナソニック株式会社
Publication of WO2011004511A1 publication Critical patent/WO2011004511A1/ja
Priority to US13/329,912 priority Critical patent/US20120089811A1/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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/652Page size control

Definitions

  • the present invention relates to an address translation device, and more particularly to a technology for address translation using TLB (Translation Look-aside Buffer).
  • TLB Translation Look-aside Buffer
  • TLB is used as an address conversion mechanism for converting a logical address used by a program on a computer into a physical address.
  • the size of the address space that can be converted by one entry stored in the TLB, that is, the block length is fixed. Therefore, even when consecutive logical addresses and corresponding continuous physical addresses are stored in the TLB, a number of consecutive TLB entries are required, and the TLB entries are used redundantly.
  • the number of addresses stored in the TLB increases, the time for searching for an address to be converted becomes longer, and improvement of the address conversion speed is hindered. Therefore, it is desirable to reduce the number of addresses stored in the TLB.
  • the user designates the number of effective bits to be converted into each layer of the TLB so that the TLB is hierarchized and the address space becomes narrower from the upper layer to the lower layer.
  • An address translation device that can be used is disclosed (for example, see Patent Document 1). According to this, when a larger continuous physical address space corresponds to a continuous logical address space, the TLB is stored in the TLB by using a higher layer TLB having a larger effective bit number. The number of addresses can be reduced.
  • the user knows the number of effective bits to be address translated. Further, since the number of effective bits differs for each application, it is difficult to dynamically change the TLB allocated for each application. That is, a TLB used by a certain application is not always usable by another application, and there is a possibility that the usage efficiency of the TLB may be reduced.
  • the present invention has been made in view of such a point, and an object of the present invention is to cache the address conversion table in the TLB efficiently without the user specifying the number of effective bits to be converted.
  • the TLB and the address translation table are referred to, and the number of consecutive logical addresses and consecutive physical addresses stored in the TLB are counted.
  • the number of continuous addresses is stored in association with a pair of logical address and physical address, and it is determined whether the conversion target address is included in the range of the continuous address number from the logical address stored in the TLB.
  • An address translation control unit that, when included in the range, adds a difference between the logical address and the translation target address to a physical address that forms a pair with the logical address, and calculates a translated physical address
  • the number of consecutive addresses indicating the size of the address space is set for each pair of logical address and physical address stored in the TLB, and a TLB hit occurs when the address to be translated is included in the address space.
  • the size of the address space can be set dynamically without the user specifying the number of bits to be converted. Further, when the addresses are continuous, the addresses can be efficiently stored in the TLB.
  • consecutive lower and upper n bits stored in the TLB form a pair of logical addresses and physical addresses that are consecutive. Counts the number of addresses, rounds the number of consecutive addresses to 2 n ⁇ 1 and stores it in association with a pair of logical address and physical address, and converts the address to be translated and the logical address stored in the TLB to the lower n bits If these match, the lower-order n bits of the physical address paired with the logical address are replaced with the lower-order n bits of the translation target address, and an address translation control unit that calculates the translated physical address; It shall be equipped with.
  • the number of consecutive addresses indicating the size of the address space is set for each pair of logical address and physical address stored in the TLB, and a TLB hit occurs when the address to be translated is included in the address space.
  • the size of the address space can be set dynamically without the user specifying the number of bits to be converted.
  • the remaining addresses excluding the conversion target address and the lower n bits of the logical address are compared, and when they match, the lower n bits of the physical address are replaced. Thereby, the number of bits to be compared and converted can be reduced, and the speed of address conversion can be improved.
  • the address translation control unit increments or decrements the reference based on the paired logical address and physical address stored in the TLB, and the address obtained by the increment or decrement is included in the address translation table. In this case, the number of consecutive addresses is counted up.
  • the address translation control unit increments the first reference with the logical address and physical address of the pair stored in the TLB as the first and second references, and the increment.
  • the address conversion table includes the address
  • the number of consecutive addresses is counted up, while the second reference is decremented, and when the decremented address is included in the address conversion table, the number of consecutive addresses is counted up.
  • the paired logical address and physical address stored in the TLB are replaced with the start or end address of the continuous address space between the first reference and the second reference. According to this, since continuous addresses can be covered from the head or the tail, the addresses can be more efficiently stored in the TLB.
  • the address translation control unit counts the number of consecutive addresses and stores them in the TLB at idle time when address translation is not requested. According to this, the number of consecutive addresses can be stored in the TLB without impairing the performance of address translation using the TLB.
  • the address conversion table can be efficiently cached in the TLB without the user being aware of the number of bits to be converted.
  • FIG. 1 is a configuration diagram of an address translation apparatus according to the first embodiment.
  • FIG. 2 is a diagram for explaining an example of the conversion process of the address stored in the TLB.
  • FIG. 3 is a diagram for explaining another example of the conversion process of the address stored in the TLB.
  • FIG. 4 is a diagram for explaining still another example of the process of converting the address stored in the TLB.
  • FIG. 5 is a block diagram showing a schematic configuration of the semiconductor device according to the second embodiment.
  • FIG. 1 is a configuration diagram of an address translation apparatus 10 according to the first embodiment.
  • the address translation control unit 20 refers to the external address translation table 30 and stores a paired logical address and physical address in the TLB 50. Furthermore, the number of consecutive addresses indicating the number of logical addresses and physical addresses that form a pair is stored in the TLB 50 in association with the pair of logical addresses and physical addresses.
  • the address conversion control unit 20 refers to the TLB 50 and converts, for example, a logical address (translation target address) requested from a program on a computer into a physical address (translation physical address) corresponding to the conversion target address.
  • the address translation control unit 20 refers to the address translation table 30, stores the logical address and the corresponding physical address in the TLB 50, and counts the number of consecutive addresses based on these addresses. Specifically, when the logical address and physical address obtained by incrementing these criteria are included in the address conversion table 30, the number of consecutive addresses is incremented. This is repeated until the address whose reference is incremented is not included in the address conversion table 30.
  • the reference logical address 0x00004 and physical address 0x00124 are stored in the TLB 50, and the number of consecutive addresses is counted from zero. Since the logical address 0x00005 and the physical address 0x00125 with the reference incremented are included in the address conversion table 30, the number of consecutive addresses is incremented. Further, since the logical address 0x00006 and the physical address 0x00126 with the incremented reference are included in the address conversion table 30, the number of consecutive addresses is incremented. This is repeated until the address whose reference is incremented is not included in the address conversion table 30. Then, since the incremented logical address 0x00009 and physical address 0x00129 are not included in the address conversion table 30, the reference increment is finished and the number of consecutive addresses becomes 4.
  • the address translation control unit 20 determines whether or not the translation target address is included in the range of the continuous address number associated with the logical address from the logical address stored in the TLB 50. If included, it becomes a TLB hit, and the difference between the conversion target address and the logical address is added to the physical address.
  • the address translation control unit 20 adds the difference 3 between the translation target address 0x00007 and the logical address 0x00004 to the physical address 0x000124 to calculate the translation physical address 0x000127.
  • the continuous address number indicating the continuous address space can be dynamically set without the user being aware of the number of bits to be converted. Further, when the addresses are continuous, the addresses can be efficiently stored in the TLB 50.
  • the address translation control unit 20 increments the number of consecutive addresses when the address translation table 30 includes a logical address and a physical address decremented by the reference. This is repeated until the address decremented by the reference is not included in the address conversion table 30.
  • the address translation control unit 20 stores the logical address 0x00008 and the physical address 0x00128 in the TLB 50, and counts the number of consecutive addresses from zero. Since the logical address 0x00007 and the physical address 0x00127 decremented by the reference are included in the address conversion table 30, the number of consecutive addresses is incremented. Further, since the logical address 0x00006 and the physical address 0x00126 that have been decremented by the reference are included in the address conversion table 30, the number of consecutive addresses is incremented. This is repeated until the address decremented by the reference is not included in the address conversion table 30. Then, since the decremented logical address 0x00003 and the physical address 0x00123 are not included in the address translation table 30, the standard decrement is completed and the number of consecutive addresses becomes 4.
  • the conversion target address is 0x00007. Since the number of consecutive addresses associated with the logical address 0x00008 is 4, the conversion target address 0x00007 is included in the range of the logical addresses 0x00008 to 0x00004, resulting in a TLB hit. Therefore, the address translation control unit 20 adds ⁇ 1, which is the difference between the translation target address 0x00007 and the logical address 0x00008, to the physical address 0x000128 to calculate the translation physical address 0x000127.
  • the continuous address number indicating the continuous address space can be dynamically set without the user being aware of the number of bits to be converted. Further, when the addresses are continuous, the addresses can be efficiently stored in the TLB 50.
  • the address translation control unit 20 increments the number of consecutive addresses when the logical address and the physical address incremented by the reference are included in the address translation table 30. This is repeated until the address whose reference is incremented is not included in the address conversion table 30.
  • the address conversion control unit 20 stores 0x00005 and 0x00125 instead of 0x00004 and 0x00124 in the logical address and the physical address, respectively.
  • the number of consecutive addresses is counted from 0. Since the logical address 0x00006 and the physical address 0x00126 with incremented reference are included in the address conversion table 30, the number of consecutive addresses is incremented. This is repeated until the address whose reference is incremented is not included in the address conversion table 30. Then, since the incremented logical address 0x00009 and physical address 0x00129 are not included in the address translation table 30, the reference increment is completed and the number of consecutive addresses becomes 3.
  • the reference is returned to the logical address 0x00005 and the physical address 0x00125, and the logical address 0x00004 and the physical address 0x00124 that have been decremented are included in the address conversion table 30, so the number of consecutive addresses is incremented. This is repeated until the address decremented by the reference is not included in the address conversion table 30. Then, since the logical address 0x00003 and the physical address 0x00123 decremented by the reference are not included in the address conversion table 30, the decrement of the reference is finished and the number of continuous addresses becomes 4.
  • the logical address 0x00005 and the physical address 0x00125 stored in the TLB 50 are overwritten with the logical address 0x00004 and the physical address 0x00124. Since the address conversion process is the same as that in the first or second example, a description thereof will be omitted.
  • addresses can be stored in the TLB 50 more efficiently.
  • the logical address 0x00005 and the physical address 0x00125 stored in the TLB 50 may be overwritten with the logical address 0x00008 and the physical address 0x00128.
  • the address translation control unit 20 increments the number of consecutive addresses when the logical address and the physical address incremented by the reference are included in the address translation table 30. This is repeated until the address whose reference is incremented is not included in the address conversion table 30, and the number of consecutive addresses is rounded to 2 n -1. Note that all the lower n bits of the paired logical address and physical address have the same logical value.
  • the address translation control unit 20 stores the logical address 0x00004 and the physical address 0x00124 in the TLB 50, and counts the number of consecutive addresses from zero. Since the logical address 0x00005 and the physical address 0x00125 with the reference incremented are included in the address conversion table 30, the number of consecutive addresses is incremented. Furthermore, since the logical address 0x00006 and the physical address 0x00126 with incremented reference are included in the address conversion table 30, the number of consecutive addresses is incremented. This is repeated until the address whose reference is incremented is not included in the address conversion table 30.
  • the address translation control unit 20 compares the translation target address with the logical address stored in the TLB 50 except for the lower n bits. If they match, the lower n bits of the compared addresses are replaced.
  • the conversion target address is 0x00006. Since the number of consecutive addresses associated with the logical address 0x00004 is 3, the lower 2 bits are excluded. That is, the address translation control unit 20 compares the bit excluding the lower 2 bits “10” of the translation target address 0x00006 and the bit excluding the lower 2 bits “00” of the logical address 0x00004. As a result, the bits match, resulting in a TLB hit. Then, the lower 2 bits “00” of the physical address 0x00124 are replaced with the lower 2 bits “10” of the conversion target address 0x00006 to calculate the converted physical address 0x00126.
  • the speed of address conversion processing can be improved. Note that the number of consecutive addresses may be counted by decrementing the reference.
  • the address translation control unit 20 counts the number of consecutive addresses and stores it in the TLB 50 when the address translation request is not requested. As a result, the number of consecutive addresses can be counted without impairing the performance of address translation.
  • the address translation control unit 20 refers to the address translation table 30 and collectively reads a pair of a logical address and a physical address corresponding to a predetermined address space and temporarily reads them. You may make it preserve
  • the number of consecutive addresses may be counted from 1. In this case, when the number of consecutive addresses is 1, only the logical address and physical address forming a pair stored in the TLB 50 become an address space, and when the number of consecutive addresses is 2 or more, the address space is continuous according to the number. It becomes.
  • the number related to the increment or decrement of the reference may not be 1. For example, it may be 2.
  • a flag indicating whether or not there is a continuous address may be stored as information other than the logical address, the physical address, and the number of continuous addresses.
  • the logical address stored in the TLB 50 and the lower n bits of the physical address must all be the same logical value, but the other examples are not necessary.
  • FIG. 5 is a block diagram showing a schematic configuration of the semiconductor device 40 according to the second embodiment.
  • the integrated circuit 44 inputs / outputs data to / from the external memory 47 via the input / output bus 46.
  • the address translation device 10 and the DMA transfer control device 10A refer to the address translation table 30 held in the external memory 47 and store the logical address and the physical address in the TLB 50 of the address translation device 10 and the DMA transfer control device 10A. Count the number of consecutive addresses.
  • the memory controller 45 controls the address translation device 10 and the DMA transfer control device 10A.
  • the address translator 10 and the DMA transfer controller 10A are the address translator shown in FIG. Since DMA transfer basically uses continuous addresses, the address conversion table can be cached in the TLB 50 more efficiently.
  • the address translation table can be efficiently cached in the TLB 50 by the address translation device 10 and the DMA transfer control device 10A. Therefore, TLB hit misses are reduced. Thereby, even if the address conversion table 30 is held in the external memory 47 having a low transfer rate, it is possible to suppress a decrease in the speed of the address conversion process due to a TLB hit miss.
  • the address conversion device is useful for a memory device such as a personal computer because the address conversion table can be efficiently cached without the user being aware of the number of bits to be converted.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 アドレス変換装置(10)は、TLB(50)と、アドレス変換テーブル(30)を参照して、TLB(50)に格納された対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントし、当該連続アドレス数を論理アドレスおよび物理アドレスの対に対応付けて格納するとともに、変換対象アドレスがTLB(50)に格納された論理アドレスから連続アドレス数の範囲に含まれるか否かを判定し、変換対象アドレスがその範囲に含まれる場合、当該論理アドレスと変換対象アドレスとの差分を、当該論理アドレスと対をなす物理アドレスに加算して、変換物理アドレスを算出するアドレス変換制御部(20)と、を備えている。

Description

アドレス変換装置
 本発明はアドレス変換装置に関し、特に、TLB(Translation Look-aside Buffer)を用いてアドレス変換する技術に関するものである。
 一般に、コンピュータ上でプログラムが使用する論理アドレスを物理アドレスに変換するためのアドレス変換機構としてTLBが用いられている。TLBに格納された1エントリによって変換可能なアドレス空間の広さ、すなわちブロック長は固定的である。そのため、連続した論理アドレスとこれに対応する連続した物理アドレスとをTLBに格納する場合でも連続する数分のTLBエントリが必要となり、TLBエントリが冗長的に使用される。TLBに格納するアドレス数が多くなると、変換するアドレスを検索する時間が長くなり、アドレス変換速度の向上が妨げられる。したがって、TLBに格納するアドレス数を少なくすることが望ましい。
 そこで、アドレス数を削減する手段の一つとして、TLBを階層化して、上位層から下位層に向かってアドレス空間が狭くなるように、TLBの各層にアドレス変換すべき有効ビット数をユーザが指定できるアドレス変換装置が開示されている(例えば、特許文献1参照)。これによれば、連続した論理アドレス空間に対し、より大きな連続した物理アドレス空間が対応しているときは有効ビット数がより大きく設定された上位層のTLBを使用することにより、TLBに格納するアドレス数を削減することができる。
特開平4-360252号公報
 従来のアドレス変換装置では、アドレス変換すべき有効ビット数をユーザが把握していることが前提である。また、有効ビット数はアプリケーション毎に異なるため、アプリケーション毎に割り当てられるTLBを動的に変更するのは困難である。すなわち、あるアプリケーションが使用するTLBを、他のアプリケーションが使用できるとは限らず、TLBの使用効率が低下するおそれがある。
 本発明は、かかる点に鑑みてなされたものであり、アドレス変換すべき有効ビット数をユーザが指定しなくても効率よくTLBにアドレス変換テーブルをキャッシュすることを課題とする。
 上述した課題を解決するため、本発明によって次のような手段を講じた。すなわち、論理アドレスを物理アドレスに変換するアドレス変換装置として、TLBと、アドレス変換テーブルを参照して、TLBに格納された対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントし、当該連続アドレス数を論理アドレスおよび物理アドレスの対に対応付けて格納するとともに、変換対象アドレスがTLBに格納された論理アドレスから連続アドレス数の範囲に含まれるか否かを判定し、変換対象アドレスが当該範囲に含まれる場合、当該論理アドレスと変換対象アドレスとの差分を、当該論理アドレスと対をなす物理アドレスに加算して、変換物理アドレスを算出するアドレス変換制御部と、を備えているものとする。
 これによると、TLBに格納された論理アドレスおよび物理アドレスの対毎にアドレス空間の広さを示す連続アドレス数が設定され、変換対象アドレスがアドレス空間に含まれる場合にTLBヒットとなる。これにより、アドレス変換すべきビット数をユーザが指定しなくても、アドレス空間の広さを動的に設定することができる。また、アドレスが連続する場合に、アドレスをTLBに効率良く格納することができる。
 また、論理アドレスを物理アドレスに変換するアドレス変換装置として、アドレス変換テーブルを参照して、TLBに格納された下位nビットが全て同じ論理値である対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントし、当該連続アドレス数を2-1に丸めて論理アドレスおよび物理アドレスの対に対応付けて格納するとともに、変換対象アドレスとTLBに格納された論理アドレスとを、下位nビットを除いて比較し、これらが一致する場合、当該論理アドレスと対をなす物理アドレスの下位nビットを変換対象アドレスの下位nビットに置換して、変換物理アドレスを算出するアドレス変換制御部と、を備えているものとする。
 これによると、TLBに格納された論理アドレスおよび物理アドレスの対毎にアドレス空間の広さを示す連続アドレス数が設定され、変換対象アドレスがアドレス空間に含まれる場合にTLBヒットとなる。これにより、アドレス変換すべきビット数をユーザが指定しなくても、アドレス空間の広さを動的に設定することができる。さらに、アドレス変換の際に変換対象アドレスおよび論理アドレスの下位nビットを除いた残りを比較して、これらが一致する場合に、物理アドレスの下位nビットが置き換えられる。これにより、比較対象および変換対象のビット数が減少し、アドレス変換の速度を向上させることができる。
 具体的には、アドレス変換制御部は、TLBに格納された対をなす論理アドレスおよび物理アドレスを基準にして当該基準をインクリメント又はデクリメントし、当該インクリメント又はデクリメントしたアドレスが、アドレス変換テーブルに含まれる場合、連続アドレス数をカウントアップする。
 具体的には、アドレス変換制御部は、アドレス変換制御部は、TLBに格納された対をなす論理アドレスおよび物理アドレスを第1および第2の基準にして第1の基準をインクリメントし、当該インクリメントしたアドレスがアドレス変換テーブルに含まれる場合、連続アドレス数をカウントアップする一方、第2の基準をデクリメントし、当該デクリメントしたアドレスがアドレス変換テーブルに含まれる場合、連続アドレス数をカウントアップし、前記TLBに格納された対をなす論理アドレスおよび物理アドレスを前記第1の基準と前記第2の基準との間における連続アドレス空間の先頭または末尾のアドレスに置き換える。これによると、連続するアドレスを先頭または末尾から網羅することができるから、アドレスをTLBにさらに効率良く格納することができる。
 好ましくは、アドレス変換制御部は、アドレス変換が要求されていないアイドル時に、連続アドレス数をカウントしてTLBに格納するものとする。これによると、TLBを用いたアドレス変換のパフォーマンスを損なうことなく連続アドレス数をTLBに格納することができる。
 本発明によると、アドレス変換すべきビット数をユーザが意識しなくても効率よくTLBにアドレス変換テーブルをキャッシュすることができる。
図1は、第1の実施形態に係るアドレス変換装置の構成図である。 図2は、TLBに格納されたアドレスの変換処理の例を説明する図である。 図3は、TLBに格納されたアドレスの変換処理の別の例を説明する図である。 図4は、TLBに格納されたアドレスの変換処理のさらに別の例を説明する図である。 図5は、第2の実施形態に係る半導体装置の概略構成を示すブロック図である。
 以下、本発明を実施するための形態について、図面を参照しながら説明する。
 <第1の実施形態>
 図1は、第1の実施形態に係るアドレス変換装置10の構成図である。アドレス変換装置10において、アドレス変換制御部20は、外部のアドレス変換テーブル30を参照して、対をなす論理アドレスおよび物理アドレスをTLB50に格納する。さらに、対をなす論理アドレスおよび物理アドレスに連続するアドレスの数を示す連続アドレス数を、論理アドレスおよび物理アドレスの対に対応付けてTLB50に格納する。また、アドレス変換制御部20はTLB50を参照し、例えばコンピュータ上でプログラムから要求される論理アドレス(変換対象アドレス)を、変換対象アドレスに対応する物理アドレス(変換物理アドレス)に変換する。
 以下、論理アドレス、物理アドレスおよび連続アドレス数のTLB50への格納処理と、その格納処理に応じたアドレス変換処理とを説明する。
  -第1の例-
 アドレス変換制御部20は、アドレス変換テーブル30を参照し、論理アドレスおよび対応する物理アドレスをTLB50に格納し、これらアドレスを基準にして連続アドレス数をカウントする。具体的には、これら基準をインクリメントした論理アドレスおよび物理アドレスがアドレス変換テーブル30に含まれる場合には、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。
 例えば、図2に示すように、基準となる論理アドレス0x00004および物理アドレス0x00124をTLB50に格納し、連続アドレス数を0からカウントする。基準をインクリメントした論理アドレス0x00005および物理アドレス0x00125は、アドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。さらに基準をインクリメントした論理アドレス0x00006および物理アドレス0x00126は、アドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。すると、インクリメントした論理アドレス0x00009および物理アドレス0x00129はアドレス変換テーブル30に含まれないため、基準のインクリメントを終了して連続アドレス数は4となる。
 次に、アドレス変換制御部20によるアドレス変換処理について説明する。アドレス変換制御部20は、変換対象アドレスがTLB50に格納された論理アドレスからその論理アドレスに対応付けられた連続アドレス数の範囲に含まれるか否かを判定する。含まれる場合には、TLBヒットとなり、変換対象アドレスと論理アドレスとの差分を物理アドレスに加算する。
 例えば、変換対象アドレスを0x00007とする。論理アドレス0x00004に対応付けられた連続アドレス数は4であるため、変換対象アドレス0x00007は、論理アドレス0x00004から0x00008の範囲に含まれておりTLBヒットとなる。したがって、アドレス変換制御部20は、変換対象アドレス0x00007と論理アドレス0x00004との差分である3を、物理アドレス0x000124に加算して、変換物理アドレス0x000127を算出する。
 以上により、アドレス変換すべきビット数をユーザが意識しなくても、連続するアドレス空間を示す連続アドレス数を動的に設定することができる。また、アドレスが連続する場合にアドレスをTLB50に効率良く格納することができる。
  -第2の例-
 アドレス変換制御部20は、基準をデクリメントした論理アドレスおよび物理アドレスがアドレス変換テーブル30に含まれる場合には、連続アドレス数をインクリメントする。これを、基準をデクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。
 例えば、図3に示すように、アドレス変換制御部20は、論理アドレス0x00008および物理アドレス0x00128をTLB50に格納し、連続アドレス数を0からカウントする。基準をデクリメントした論理アドレス0x00007および物理アドレス0x00127はアドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。さらに基準をデクリメントした論理アドレス0x00006および物理アドレス0x00126は、アドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。これを、基準をデクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。すると、デクリメントした論理アドレス0x00003および物理アドレス0x00123はアドレス変換テーブル30に含まれないため、基準のデクリメントを終了して連続アドレス数は4となる。
 次に、アドレス変換制御部20によるアドレス変換処理について説明する。例えば、変換対象アドレスを0x00007とする。論理アドレス0x00008に対応付けられた連続アドレス数は4であるため、変換対象アドレス0x00007は、論理アドレス0x00008から0x00004の範囲に含まれておりTLBヒットとなる。したがって、アドレス変換制御部20は、変換対象アドレス0x00007と論理アドレス0x00008との差分である-1を、物理アドレス0x000128に加算して、変換物理アドレス0x000127を算出する。
 以上により、アドレス変換すべきビット数をユーザが意識しなくても、連続するアドレス空間を示す連続アドレス数を動的に設定することができる。また、アドレスが連続する場合にアドレスをTLB50に効率良く格納することができる。
  -第3の例-
 アドレス変換制御部20は、基準をインクリメントした論理アドレスおよび物理アドレスがアドレス変換テーブル30に含まれる場合には、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。
 また、これら基準を元に戻して、基準をデクリメントした論理アドレスおよび物理アドレスがアドレス変換テーブル30に含まれる場合には、連続アドレス数をインクリメントする。これを、基準をデクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。 
 例えば、図2において、アドレス変換制御部20は、論理アドレスおよび物理アドレスにそれぞれ0x00004、0x00124ではなく0x00005、0x00125を格納したとする。連続アドレス数は0からカウントする。基準をインクリメントした論理アドレス0x00006および物理アドレス0x00126はアドレス変換テーブル30に含まれているため、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。すると、インクリメントした論理アドレス0x00009および物理アドレス0x00129はアドレス変換テーブル30に含まれないため、基準のインクリメントを終了して連続アドレス数は3となる。
 その後、基準を論理アドレス0x00005および物理アドレス0x00125に戻し、基準をデクリメントした論理アドレス0x00004および物理アドレス0x00124はアドレス変換テーブル30に含まれているため、連続アドレス数をインクリメントする。これを、基準をデクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。すると、基準をデクリメントした論理アドレス0x00003および物理アドレス0x00123はアドレス変換テーブル30に含まれないため、基準のデクリメントを終了して連続アドレス数は4となる。これとともに、TLB50に格納した論理アドレス0x00005および物理アドレス0x00125を論理アドレス0x00004および物理アドレス0x00124で上書きする。アドレス変換処理については、上記第1または第2の例と同様であるため省略する。
  以上により、連続するアドレスを先頭アドレスから網羅できるため、アドレスをTLB50にさらに効率良く格納することができる。なお、デクリメントを行った後でインクリメントしてもよい。この場合、TLB50に格納した論理アドレス0x00005および物理アドレス0x00125を論理アドレス0x00008および物理アドレス0x00128で上書きすればよい。
  -第4の例-
 アドレス変換制御部20は、基準をインクリメントした論理アドレスおよび物理アドレスがアドレス変換テーブル30に含まれる場合には、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返し、連続アドレス数を2-1に丸める。なお、対をなす論理アドレスおよび物理アドレスの下位nビットは全て同一の論理値である。
 例えば、図4に示すように、アドレス変換制御部20は、論理アドレス0x00004および物理アドレス0x00124をTLB50に格納し、連続アドレス数を0からカウントする。基準をインクリメントした論理アドレス0x00005および物理アドレス0x00125は、アドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。さらに、基準をインクリメントした論理アドレス0x00006および物理アドレス0x00126は、アドレス変換テーブル30に含まれるため、連続アドレス数をインクリメントする。これを、基準をインクリメントしたアドレスがアドレス変換テーブル30に含まれなくなるまで繰り返す。すると、インクリメントした論理アドレス0x00009および物理アドレス0x00129はアドレス変換テーブル30に含まれないため、基準のインクリメントを終了して連続アドレス数は4となるが、n=2のときの2-1に該当する3に丸める。
 次に、アドレス変換制御部20によるアドレス変換処理について説明する。アドレス変換制御部20は、変換対象アドレスとTLB50に格納された論理アドレスとを、下位nビットを除いて比較する。そして、それらが一致する場合に、比較したアドレスの下位nビットを置き換える。
 例えば、変換対象アドレスを0x00006とする。論理アドレス0x00004に対応付けられた連続アドレス数は3であるため、下位2ビットを除外する。すなわち、アドレス変換制御部20は、変換対象アドレス0x00006の下位2ビット「10」を除外したビットと論理アドレス0x00004の下位2ビット「00」を除外したビットとを比較する。その結果、それらのビットは一致するため、TLBヒットとなる。そして、物理アドレス0x00124の下位2ビット「00」を変換対象アドレス0x00006の下位2ビット「10」で置き換えて変換物理アドレス0x00126を算出する。
 以上により、アドレス変換の際に、比較対象および変換対象のビット数が減少するため、アドレス変換処理の速度を向上させることができる。なお、基準をデクリメントして連続アドレス数をカウントしてもよい。
 上記各例において、アドレス変換制御部20はアドレス変換要求されていないアイドル時に、連続アドレス数をカウントしてTLB50に格納することが好ましい。これにより、アドレス変換のパフォーマンスを損なうことなく連続アドレス数をカウントすることができる。
 また、アドレス変換制御部20は、連続アドレス数をカウントする際に、アドレス変換テーブル30を参照して、所定のアドレス空間に対応する論理アドレスおよび物理アドレスの対を一括して読み込んで一時的に保存するようにしてもよい。この場合、一時保存した対をなすアドレスから、連続アドレス数をカウントすればよい。
 また、連続アドレス数を1からカウントするようにしてもよい。この場合、連続アドレス数が1のときは、TLB50に格納された対をなす論理アドレスおよび物理アドレスのみがアドレス空間となり、連続アドレス数が2以上のときは、その数に応じて連続するアドレス空間となる。
 また、基準のインクリメントやデクリメントに係る数は1でなくてもよい。例えば、2でもよい。
 また、TLB50には、論理アドレス、物理アドレスおよび連続アドレス数以外の情報として例えば、連続するアドレスが存在するか否かを示すフラグを格納してもよい。
 また、上記第4の例については、TLB50に格納された論理アドレスおよび物理アドレスの下位nビットが全て同一の論理値である必要があるが、他の例ついてはその必要がない。
 <第2の実施形態>
 図5は、第2の実施形態に係る半導体装置40の概略構成を示すブロック図である。集積回路44は入出力バス46を介して外部メモリ47とデータの入出力を行う。アドレス変換装置10およびDMA転送制御装置10Aは、外部メモリ47に保持されたアドレス変換テーブル30を参照して、アドレス変換装置10およびDMA転送制御装置10AのTLB50に論理アドレスおよび物理アドレスを格納するとともに、連続アドレス数をカウントする。メモリコントローラ45は、アドレス変換装置10およびDMA転送制御装置10Aを制御する。なお、アドレス変換装置10およびDMA転送制御装置10Aは図1に示したアドレス変換装置である。DMA転送では基本的に連続したアドレスが使われるため、アドレス変換テーブルをTLB50へより効率良くキャッシュすることができる。
 本実施形態によると、アドレス変換装置10およびDMA転送制御装置10Aによってアドレス変換テーブルをTLB50に効率良くキャッシュすることができる。したがって、TLBヒットミスが減少する。これにより、転送速度の遅い外部メモリ47にアドレス変換テーブル30を保持しても、TLBヒットミスによるアドレス変換処理の速度低下を抑制することができる。
 本発明に係るアドレス変換装置は、アドレス変換すべきビット数をユーザが意識することなくアドレス変換テーブルを効率よくキャッシュすることができるため、パソコン等のメモリ装置に有用である。
 10  アドレス変換装置
 10A DMA転送制御装置
 20  アドレス変換制御部
 30  アドレス変換テーブル
 40  半導体装置
 47  外部メモリ
 50  TLB(Translation Look-aside Buffer)

Claims (10)

  1.  論理アドレスを物理アドレスに変換するアドレス変換装置であって、
     TLB(Translation Look-aside Buffer)と、
     アドレス変換テーブルを参照して、前記TLBに格納された対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントし、当該連続アドレス数を前記論理アドレスおよび物理アドレスの対に対応付けて格納するとともに、変換対象アドレスが前記TLBに格納された論理アドレスから連続アドレス数の範囲に含まれるか否かを判定し、前記変換対象アドレスが前記範囲に含まれる場合、当該論理アドレスと前記変換対象アドレスとの差分を、当該論理アドレスと対をなす物理アドレスに加算して、変換物理アドレスを算出するアドレス変換制御部と、を備えている
    ことを特徴とするアドレス変換装置。
  2.  論理アドレスを物理アドレスに変換するアドレス変換装置であって、
     TLB(Translation Look-aside Buffer)と、
     アドレス変換テーブルを参照して、前記TLBに格納された下位nビットが全て同じ論理値である対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントし、当該連続アドレス数を2-1に丸めて前記論理アドレスおよび物理アドレスの対に対応付けて格納するとともに、変換対象アドレスと前記TLBに格納された論理アドレスとを、下位nビットを除いて比較し、これらが一致する場合、当該論理アドレスと対をなす物理アドレスの下位nビットを前記変換対象アドレスの下位nビットに置換して、変換物理アドレスを算出するアドレス変換制御部と、を備えている
    ことを特徴とするアドレス変換装置。
  3.  請求項1および2のうち何れか1つのアドレス変換装置において、
     前記アドレス変換制御部は、前記TLBに格納された対をなす論理アドレスおよび物理アドレスを基準にして当該基準をインクリメントし、当該インクリメントしたアドレスが前記アドレス変換テーブルに含まれる場合、前記連続アドレス数をカウントアップする
    ことを特徴とするアドレス変換装置。
  4.  請求項1および2のうち何れか1つのアドレス変換装置において、
     前記アドレス変換制御部は、前記TLBに格納された対をなす論理アドレスおよび物理アドレスを基準にして当該基準をデクリメントし、当該デクリメントしたアドレスが前記アドレス変換テーブルに含まれる場合、前記連続アドレス数をカウントアップする
    ことを特徴とするアドレス変換装置。
  5.  請求項1および2のうち何れか1つのアドレス変換装置において、
     前記アドレス変換制御部は、前記TLBに格納された対をなす論理アドレスおよび物理アドレスを第1の基準および第2の基準にして前記第1の基準をインクリメントし、当該インクリメントしたアドレスが前記アドレス変換テーブルに含まれる場合、前記連続アドレス数をカウントアップする一方、前記第2の基準をデクリメントし、当該デクリメントしたアドレスが前記アドレス変換テーブルに含まれる場合、前記連続アドレス数をカウントアップし、前記TLBに格納された対をなす論理アドレスおよび物理アドレスを前記第1の基準と前記第2の基準との間における連続アドレス空間の先頭または末尾のアドレスに置き換える
    ことを特徴とするアドレス変換装置。
  6.  請求項1および2のうち何れか1つのアドレス変換装置において、
     前記アドレス変換制御部は、アドレス変換が要求されていないアイドル時に、前記連続アドレス数をカウントして前記TLBに格納する
    ことを特徴とするアドレス変換装置。
  7.  請求項1および2のうち何れか1つのアドレス変換装置において、
     当該アドレス変換装置は、DMA転送制御装置である
    ことを特徴とするアドレス変換装置。
  8.  請求項1および2のうち何れか1つのアドレス変換装置と、
     アドレス変換テーブルを保持する外部メモリと、を備え、
     前記アドレス変換装置は、前記外部メモリにおけるアドレス変換テーブルを参照して、連続アドレス数をカウントして前記アドレス変換装置におけるTLBに格納する
    ことを特徴とする半導体装置。
  9.  論理アドレスを物理アドレスに変換するアドレス変換方法であって、
     アドレス変換テーブルを参照して、TLB(Translation Look-aside Buffer)に格納された対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントするステップと、
     前記連続アドレス数を前記論理アドレスおよび物理アドレスの対に対応付けるステップと、
     変換対象アドレスが前記TLBに格納された論理アドレスから連続アドレス数の範囲に含まれるか否かを判定するステップと、
     前記変換対象アドレスが前記範囲に含まれる場合、前記TLBに格納された論理アドレスと前記変換対象アドレスとの差分を、当該論理アドレスと対をなす物理アドレスに加算して、変換物理アドレスを算出するステップと、を備えている
    ことを特徴とするアドレス変換方法。
  10.  論理アドレスを物理アドレスに変換するアドレス変換方法であって、
     アドレス変換テーブルを参照して、TLB(Translation Look-aside Buffer)に格納された下位nビットが全て同じ論理値である対をなす論理アドレスおよび物理アドレスに連続する連続アドレス数をカウントするステップと、
     前記連続アドレス数を2-1に丸めて前記論理アドレスおよび物理アドレスの対に対応付けるステップと、
     変換対象アドレスと前記TLBに格納された前記論理アドレスとを、下位nビットを除いて比較するステップと、
     前記比較結果が一致を示す場合、当該論理アドレスと対をなす物理アドレスの下位nビットを前記変換対象アドレスの下位nビットに置換して、変換物理アドレスを算出するステップと、を備えている
    ことを特徴とするアドレス変換方法。
PCT/JP2010/000019 2009-07-08 2010-01-05 アドレス変換装置 WO2011004511A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/329,912 US20120089811A1 (en) 2009-07-08 2011-12-19 Address conversion apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009162135A JP2011018182A (ja) 2009-07-08 2009-07-08 アドレス変換装置
JP2009-162135 2009-07-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/329,912 Continuation US20120089811A1 (en) 2009-07-08 2011-12-19 Address conversion apparatus

Publications (1)

Publication Number Publication Date
WO2011004511A1 true WO2011004511A1 (ja) 2011-01-13

Family

ID=43428945

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/000019 WO2011004511A1 (ja) 2009-07-08 2010-01-05 アドレス変換装置

Country Status (3)

Country Link
US (1) US20120089811A1 (ja)
JP (1) JP2011018182A (ja)
WO (1) WO2011004511A1 (ja)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5647252B2 (ja) * 2009-09-25 2014-12-24 カムレッシュ ガンディー メモリ管理装置及び仮想メモリ領域を提供する方法
EP3104559A1 (en) * 2013-10-10 2016-12-14 Cloudistics, Inc. Adaptive overlay networking
US9405703B2 (en) * 2014-06-04 2016-08-02 Advanced Micro Devices, Inc. Translation lookaside buffer
US9684606B2 (en) 2014-11-14 2017-06-20 Cavium, Inc. Translation lookaside buffer invalidation suppression
US9697137B2 (en) * 2014-11-14 2017-07-04 Cavium, Inc. Filtering translation lookaside buffer invalidations
US10216644B2 (en) * 2016-11-04 2019-02-26 Toshiba Memory Corporation Memory system and method
US11176091B2 (en) * 2017-09-29 2021-11-16 Intel Corporation Techniques for dynamic multi-storage format database access
US10725930B2 (en) * 2018-08-27 2020-07-28 Micron Technology, Inc. Logical to physical memory address mapping tree
JP2020113187A (ja) 2019-01-16 2020-07-27 キオクシア株式会社 メモリシステム
KR20210011216A (ko) 2019-07-22 2021-02-01 에스케이하이닉스 주식회사 메모리 시스템의 메타 데이터 관리 방법 및 장치
KR20210011176A (ko) * 2019-07-22 2021-02-01 에스케이하이닉스 주식회사 메모리 시스템의 액세스 동작 방법 및 장치
US11119940B2 (en) * 2019-08-26 2021-09-14 Micron Technology, Inc. Sequential-write-based partitions in a logical-to-physical table cache
US11422945B2 (en) * 2020-03-20 2022-08-23 Micron Technology, Inc. Generating, maintaining, or utilizing a compressed logical-to-physical table based on sequential writes

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001501758A (ja) * 1996-09-30 2001-02-06 シーラス ロジック,インコーポレイテッド 連続するメモリのバッファを獲得し、ページテーブルを構築する方法
US20040117594A1 (en) * 2002-12-13 2004-06-17 Vanderspek Julius Memory management method
US20040215918A1 (en) * 2003-04-24 2004-10-28 International Business Machines Corporation Method, apparatus and computer program product for dynamically minimizing translation lookaside buffer entries across contiguous memory
WO2006106428A2 (en) * 2005-04-07 2006-10-12 Ati Technologies, Inc Method and apparatus for fragment processing in a vitual memory system
JP2008533620A (ja) * 2005-03-17 2008-08-21 クゥアルコム・インコーポレイテッド 変換索引緩衝器のエントリを最適化する方法およびシステム
JP2009020881A (ja) * 2007-07-12 2009-01-29 Qnx Software Systems Gmbh & Co Kg 可変のページサイズのメモリ編成を実装する処理システム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3264319B2 (ja) * 1997-06-30 2002-03-11 日本電気株式会社 バスブリッジ
AU3536499A (en) * 1998-05-01 1999-11-23 Matsushita Electric Industrial Co., Ltd. Data processing device and method
GB2405231B (en) * 2003-08-20 2006-05-24 Agilent Technologies Inc Master slave arrangement
JP2006293929A (ja) * 2005-04-14 2006-10-26 Matsushita Electric Ind Co Ltd データ伝送装置
US20070016721A1 (en) * 2005-07-18 2007-01-18 Wyse Technology Inc. Flash file system power-up by using sequential sector allocation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001501758A (ja) * 1996-09-30 2001-02-06 シーラス ロジック,インコーポレイテッド 連続するメモリのバッファを獲得し、ページテーブルを構築する方法
US20040117594A1 (en) * 2002-12-13 2004-06-17 Vanderspek Julius Memory management method
US20040215918A1 (en) * 2003-04-24 2004-10-28 International Business Machines Corporation Method, apparatus and computer program product for dynamically minimizing translation lookaside buffer entries across contiguous memory
JP2008533620A (ja) * 2005-03-17 2008-08-21 クゥアルコム・インコーポレイテッド 変換索引緩衝器のエントリを最適化する方法およびシステム
WO2006106428A2 (en) * 2005-04-07 2006-10-12 Ati Technologies, Inc Method and apparatus for fragment processing in a vitual memory system
JP2009020881A (ja) * 2007-07-12 2009-01-29 Qnx Software Systems Gmbh & Co Kg 可変のページサイズのメモリ編成を実装する処理システム

Also Published As

Publication number Publication date
US20120089811A1 (en) 2012-04-12
JP2011018182A (ja) 2011-01-27

Similar Documents

Publication Publication Date Title
WO2011004511A1 (ja) アドレス変換装置
KR101844521B1 (ko) 크로스-페이지 프리페칭 방법, 장치, 및 시스템
KR102036769B1 (ko) 데이터 캐싱 방법, 캐시 및 컴퓨터 시스템
CN106326140B (zh) 数据拷贝方法、直接内存访问控制器及计算机系统
US10073788B2 (en) Information processing device and method executed by an information processing device
EP4220415A2 (en) Method and apparatus for compressing addresses
US20200117462A1 (en) Memory integrated circuit and pre-fetch method thereof
JP7340326B2 (ja) メンテナンス動作の実行
US8335908B2 (en) Data processing apparatus for storing address translations
US20190155740A1 (en) Semiconductor device and cache memory control method for reducing power consumption
JP5541361B2 (ja) 記憶装置、解放優先順位決定方法およびプログラム
US10997078B2 (en) Method, apparatus, and non-transitory readable medium for accessing non-volatile memory
US7895410B1 (en) Method and apparatus for facilitating adaptive page sizes
EP3023878B1 (en) Memory physical address query method and apparatus
WO2015043379A1 (zh) 一种内存访问方法和设备
EP3371702B1 (en) Systems and methods for implementing error correcting code in a memory
JP6159478B2 (ja) データ書き込み方法及びメモリシステム
WO2023035654A1 (zh) 偏移预取方法、执行偏移预取的装置、计算设备和介质
TW201642123A (zh) 具有草稿式記憶體的電子裝置與草稿式記憶體的管理方法
KR102329924B1 (ko) 전자 장치 및 이의 메모리 관리 방법
JP5428617B2 (ja) プロセッサ及び演算処理方法
KR20190059221A (ko) 메모리 어드레스 변환
US20110066812A1 (en) Transfer request block cache system and method
US20200117460A1 (en) Memory integrated circuit and pre-fetch address determining method thereof
US20120084513A1 (en) Circuit and method for determining memory access, cache controller, and electronic device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10796825

Country of ref document: EP

Kind code of ref document: A1