WO2010032433A1 - バッファメモリ装置、メモリシステム及びデータ読出方法 - Google Patents

バッファメモリ装置、メモリシステム及びデータ読出方法 Download PDF

Info

Publication number
WO2010032433A1
WO2010032433A1 PCT/JP2009/004595 JP2009004595W WO2010032433A1 WO 2010032433 A1 WO2010032433 A1 WO 2010032433A1 JP 2009004595 W JP2009004595 W JP 2009004595W WO 2010032433 A1 WO2010032433 A1 WO 2010032433A1
Authority
WO
WIPO (PCT)
Prior art keywords
attribute
data
read
memory
buffer memory
Prior art date
Application number
PCT/JP2009/004595
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 パナソニック株式会社
Priority to JP2010529624A priority Critical patent/JPWO2010032433A1/ja
Priority to CN2009801365185A priority patent/CN102160041A/zh
Publication of WO2010032433A1 publication Critical patent/WO2010032433A1/ja
Priority to US13/050,090 priority patent/US20110167223A1/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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0879Burst mode

Definitions

  • the present invention relates to a buffer memory device, a memory system, and a data reading method, and more particularly to a buffer memory device, a memory system, and a data reading method for holding burst-read data when burst-reading data held in a main memory.
  • a buffer memory device a memory system
  • a data reading method for holding burst-read data when burst-reading data held in a main memory.
  • a small-capacity and high-speed cache memory such as SRAM (Static Random Access Memory) has been used.
  • SRAM Static Random Access Memory
  • FIG. 27 is a diagram showing an outline of a conventional memory access method. As shown in the figure, in the technique described in Patent Document 1, the main memory 620 is divided into a cacheable area 621 and an uncacheable area 622.
  • the burst read data is stored in a general-purpose register 612 included in the processor 610.
  • the burst read data is stored in the cache memory 611.
  • memory access can be further speeded up by burst reading data corresponding to an address that is likely to be accessed.
  • the burst-read data is stored in the general-purpose register 612 provided in the CPU, as described above.
  • the general-purpose register 612 includes the cache memory 611 and the like. It is very inefficient. Further, in the uncacheable area 622, there is a read-sensitive area in which the value of data held just by reading changes. When the data held in the uncacheable area 622 is read in bursts, the read sensitive area is accessed and the data is rewritten.
  • the burst-read data is stored in the cache memory 611 as described above, whereby the contents of the cache memory 611 are rewritten. As a result, data originally stored in the cache memory 611 for speeding up memory access is erased, so that speeding up of memory access cannot be achieved.
  • the present invention has been made to solve the above-described problem, and performs buffer read without causing a problem due to data rewriting, thereby speeding up memory access and a memory system. It is another object of the present invention to provide a data reading method.
  • a buffer memory device includes a main memory or a peripheral device including a plurality of areas belonging to either a cacheable attribute or an uncacheable attribute in response to a read request from a processor.
  • a buffer memory device for reading data an attribute acquisition unit that acquires an attribute of an area indicated by a read address included in the read request, and an attribute acquired by the attribute acquisition unit is the uncacheable attribute,
  • an attribute determination unit that determines whether or not the data to be burst transferred is a first attribute, and the attribute acquired by the attribute acquisition unit by the attribute determination unit is the first attribute If it is determined that the data including the data held in the area indicated by the read address is Includes a data reading unit for reading, and a first buffer memory for holding the data burst read by said data reading unit.
  • the data is burst read from the area holding the data to be burst transferred in the uncacheable area. It is possible to prevent unexpected rewriting of data in other areas. Further, since the burst read data can be held in the buffer memory in advance, the memory access speed can be increased. Further, by storing the data that has been burst read in a buffer memory different from the cache memory, it is possible to increase the area in which the data can be held without using the cache memory.
  • the attribute determination unit is the second attribute indicating that the attribute acquired by the attribute acquisition unit is the uncacheable attribute and that data to be burst transferred is not held, or the first attribute
  • the data reading unit further determines whether the attribute is an attribute, and when the attribute determination unit determines that the attribute acquired by the attribute acquisition unit is the second attribute, an area indicated by the read address Only the data held in the memory may be read out.
  • the buffer memory device may further include that the address of the main memory or the peripheral device and the attributes of the area indicated by the address are the first attribute, the second attribute, and the cacheable attribute.
  • a table holding unit that holds a table that associates attribute information indicating which of the third attributes is indicated, and the attribute acquisition unit refers to the table held in the table holding unit, You may acquire the attribute of the area
  • the relationship between the area indicated by the address of the main memory or the peripheral device and the attribute can be easily managed, and the attribute can be acquired simply by referring to the table.
  • the configuration can be simplified.
  • the buffer memory device may further include a cache memory, and the attribute determination unit may determine whether the attribute acquired by the attribute acquisition unit is any of the first attribute, the second attribute, and the third attribute. And when the attribute determination unit determines that the attribute acquired by the attribute acquisition unit is the third attribute, the data reading unit stores the data in the area indicated by the read address.
  • the data including the data held is burst read, and the cache memory holds the first data including the data held in the area indicated by the read address among the data burst read by the data reading unit
  • the first buffer memory excludes the first data from the data burst-read by the data reading unit. It may hold two data.
  • the data can be held in the buffer memory in advance, so that the memory access can be further speeded up.
  • the buffer memory device further sets the address of the main memory or the peripheral device and the attribute of the area indicated by the address to any one of the first attribute, the second attribute, and the third attribute.
  • An attribute setting unit that generates the table by setting may be provided, and the table holding unit may hold the table generated by the attribute setting unit.
  • the data reading unit further stores data held in an area indicated by the read address Is already held in the first buffer memory. If the data is already held in the first buffer memory, the data is read from the first buffer memory, and the data is read from the first buffer memory. If the data is not held in one buffer memory, the data including the data may be burst read.
  • the attribute acquisition unit further acquires an attribute of an area indicated by a write address included in a write request from the processor, and the buffer memory device is further acquired by the attribute acquisition unit by the attribute determination unit.
  • a second buffer memory that holds write data corresponding to the write request for writing to the main memory or the peripheral device when the attribute of the area indicated by the write address is the first attribute
  • a memory access information acquisition unit that acquires memory access information indicating the nature of the memory access request that is the read request or the write request from the processor, and the memory access information acquired by the memory access information acquisition unit
  • the property or the attribute acquired by the attribute acquisition unit A condition determination unit that determines whether or not a predetermined condition is satisfied, and a write held in the second buffer memory when the condition determination unit determines that the property indicated by the memory access information satisfies the condition And a controller that sweeps data to the main memory or the peripheral device.
  • the data can be merged when data is written, and the merged data can be burst-written to the main memory or the peripheral device, thereby improving the data transfer efficiency.
  • the memory access information acquisition unit acquires, as the memory access information, processor information indicating a logical processor and a physical processor that issued the memory access request, and the condition determination unit includes a physical processor indicated by the processor information. Satisfy the condition when write data corresponding to a write request previously issued by the same logical processor as the logical processor indicated by the processor information is held in the second buffer memory. If the condition determining unit determines that the condition is satisfied, the control unit may sweep the data held in the second buffer memory that satisfies the condition to the main memory or the peripheral device. Good.
  • the condition determining unit determines whether the memory access information includes command information for sweeping data held in the second buffer memory to the main memory or the peripheral device, and When the condition determination unit determines that the command information is included in the memory access information, the control unit stores data held in the second buffer memory indicated by the command information in the main memory or the peripheral device May be swept out.
  • the data held in the buffer memory can be easily swept out to the main memory or the peripheral device, and the data in the main memory or the peripheral device can be updated to the latest data.
  • the memory access information acquisition unit further acquires processor information indicating the processor that issued the memory access request as the memory access information
  • the condition determination unit further includes an attribute indicated by the attribute information: It is determined whether the attribute is the first attribute, and the control unit further determines the processor information when the condition determination unit determines that the attribute acquired by the attribute acquisition unit is the first attribute.
  • the data held in the second buffer memory corresponding to the processor indicated by may be swept out to the main memory or the peripheral device.
  • the second buffer memory further holds a write address corresponding to the write data
  • the memory access information acquisition unit further includes the memory access information when the memory access request includes a read request as the memory access information.
  • the read address included in the read request is acquired, the condition determination unit determines whether a write address that matches the read address is held in the second buffer memory, and the control unit If the condition determination unit determines that a write address that matches the read address is held in the second buffer memory, the data held in the second buffer memory before the write data corresponding to the write address is stored. You may sweep to the main memory or the peripheral device.
  • the data in the area can be updated to the latest data, thereby preventing the processor from reading out the old data.
  • the memory access information acquisition unit further acquires a first write address included in the write request when the memory access request includes a write request, and the condition determination unit determines that the first write address is
  • the controller determines whether or not the second write address included in the write request input immediately before is continuous, and the controller determines that the first write address and the second write address are continuous by the condition determination unit. When the determination is made, data held in the second buffer memory before the write data corresponding to the second write address may be swept out to the main memory or the peripheral device.
  • the condition determination unit further determines whether or not the data amount of the data held in the second buffer memory has reached a predetermined threshold value, and the control unit further determines that the data amount is
  • the condition determination unit determines that the threshold value has been reached, the data held in the second buffer memory may be swept out to the main memory or the peripheral device.
  • the buffer memory device further determines whether a write address included in a write request from the processor matches an address corresponding to data held in the first buffer memory, and If the addresses match, an invalidation unit for invalidating data held in the first buffer memory may be provided.
  • the present invention can also be realized as a memory system.
  • the memory system of the present invention includes a processor and a main memory or a peripheral device including a plurality of areas belonging to either a cacheable attribute or an uncacheable attribute.
  • a memory system that reads data from the main memory or the peripheral device in response to a read request from the processor, and acquires an attribute of an area indicated by a read address included in the read request from the processor Attribute determination for determining whether the attribute acquired by the acquisition unit and the attribute acquisition unit is the uncacheable attribute and is a first attribute indicating that data to be burst transferred is held Attribute acquired by the attribute acquisition unit by the attribute determination unit and the attribute determination unit
  • a data reading unit that burst-reads data including data held in the area indicated by the read address when it is determined to be the first attribute, and a buffer memory that holds data burst-read by the data reading unit And when the attribute determination unit determines that the attribute acquired by the attribute acquisition unit is the first attribute, the data reading unit
  • the memory system may further include a plurality of caches, and a cache closest to the main memory or the peripheral device among the plurality of caches may include the buffer memory.
  • the present invention can be realized not only as a buffer memory device and a memory system, but also as a method using a processing unit constituting the memory system as a step. Moreover, you may implement
  • a communication network such as the Internet.
  • the memory access can be speeded up by performing the burst read without causing a problem due to the rewriting of data.
  • FIG. 1 is a block diagram illustrating a schematic configuration of a system including a processor, a main memory, and a cache memory according to the first embodiment.
  • FIG. 2 is a diagram showing attributes set in the address space of the first embodiment.
  • FIG. 3 is a block diagram showing a configuration of the buffer memory device according to the first embodiment.
  • FIG. 4 is a diagram illustrating an example of a region attribute table according to the first embodiment.
  • FIG. 5 is a diagram illustrating details of the buffer memory and the cache memory according to the first embodiment.
  • FIG. 6 is a flowchart showing the operation of the buffer memory device of the first embodiment.
  • FIG. 7 is a flowchart showing details of transfer processing when the attribute is a burstable attribute in the first embodiment.
  • FIG. 1 is a block diagram illustrating a schematic configuration of a system including a processor, a main memory, and a cache memory according to the first embodiment.
  • FIG. 2 is a diagram showing attributes set in the address space of the first embodiment.
  • FIG. 8 is a flowchart showing details of the transfer process when the attribute is the burst impossible attribute in the first embodiment.
  • FIG. 9 is a flowchart showing details of transfer processing when the attribute is a cacheable attribute in the first embodiment.
  • FIG. 10 is a block diagram showing a configuration of the buffer memory device according to the second embodiment.
  • FIG. 11 is a flowchart showing details of the transfer process when the attribute is a cacheable attribute in the second embodiment.
  • FIG. 12 is a block diagram illustrating a configuration of the memory system according to the third embodiment.
  • FIG. 13 is a diagram illustrating an example of an address conversion table according to the third embodiment.
  • FIG. 14 is a block diagram showing a configuration of the buffer memory device according to the fourth embodiment.
  • FIG. 15 is a diagram illustrating an example of memory access information according to the fourth embodiment.
  • FIG. 16 is a diagram showing an outline of a buffer memory included in the buffer memory device of the fourth embodiment.
  • FIG. 17 is a diagram illustrating a determination table illustrating an example of a plurality of determination conditions according to the fourth embodiment.
  • FIG. 18 is a block diagram illustrating a detailed configuration of the determination unit according to the fourth embodiment.
  • FIG. 19 is a flowchart showing the operation of the buffer memory device according to the fourth embodiment.
  • FIG. 20 is a flowchart showing a write process of the buffer memory device according to the fourth embodiment.
  • FIG. 21 is a flowchart illustrating attribute determination processing of the buffer memory device according to the fourth embodiment.
  • FIG. 22 is a flowchart showing command determination processing of the buffer memory device according to the fourth embodiment.
  • FIG. 23 is a flowchart showing read address determination processing of the buffer memory device according to the fourth embodiment.
  • FIG. 24 is a flowchart showing a write address determination process of the buffer memory device according to the fourth embodiment.
  • FIG. 25 is a flowchart illustrating a buffer amount determination process of the buffer memory device according to the fourth embodiment.
  • FIG. 26 is a flowchart illustrating processor determination processing of the buffer memory device according to the fourth embodiment.
  • FIG. 27 is a diagram showing an outline of a conventional memory access method.
  • FIG. 1 is a block diagram showing a schematic configuration of a system including a processor, a main memory, and a cache memory according to the present embodiment.
  • the system according to the present embodiment includes a processor 10, a main memory 20, an L1 (level 1) cache 30, and an L2 (level 2) cache 40.
  • the buffer memory device of the present embodiment is provided, for example, between the processor 10 and the main memory 20 in the system as shown in FIG. Specifically, the buffer memory included in the buffer memory device is provided in the L2 cache 40.
  • the processor 10 outputs a memory access request to the main memory 20.
  • the memory access request is, for example, a read request for reading data or a write request for writing data.
  • the read request includes a read address indicating a data read destination area
  • the write request includes a write address indicating a data write destination area.
  • the main memory 20 includes a plurality of areas belonging to either a cacheable attribute or an uncacheable attribute, and a large-capacity main memory such as an SDRAM (Synchronous Dynamic Random Access Memory) that stores a program or data in the area. It is.
  • SDRAM Serial Dynamic Random Access Memory
  • data is read from the main memory 20 or data is written to the main memory 20.
  • the L1 cache 30 and the L2 cache 40 are cache memories such as SRAMs that store a part of data read by the processor 10 from the main memory 20 and a part of data to be written to the main memory 20.
  • the L1 cache 30 and the L2 cache 40 are cache memories that have a smaller capacity than the main memory 20 but can operate at high speed.
  • the L1 cache 30 is a cache memory having a higher priority that is arranged closer to the processor 10 than the L2 cache 40, and is usually smaller in capacity than the L2 cache 40 but can operate at high speed.
  • the L1 cache 30 acquires the memory access request output from the processor 10 and determines whether data corresponding to the address included in the acquired memory access request has already been stored (hit) or not stored (miss). To do. For example, when a read request hits, the L1 cache 30 reads data corresponding to the read address included in the read request from the L1 cache 30 and outputs the read data to the processor 10. The data corresponding to the read address is data stored in the area indicated by the read address. When the write request is hit, the L1 cache 30 writes the data output from the processor 10 simultaneously with the write request into the L1 cache 30.
  • the L1 cache 30 When the read request misses, the L1 cache 30 reads data corresponding to the read request from the L2 cache 40 or the main memory 20 and outputs the read data to the processor 10. When the write request misses, the L1 cache 30 performs refill processing, updates the tag address, and writes the data output from the processor 10 simultaneously with the write request.
  • the L2 cache 40 acquires the memory access request output from the processor 10 and determines whether the acquired memory access request has hit or missed. When the read request is hit, the L2 cache 40 reads data corresponding to the read address included in the read request from the inside of the L2 cache 40, and outputs the read data to the processor 10 via the L1 cache 30. When the write request is hit, the data output from the processor 10 at the same time as the write request is written into the L2 cache 40 via the L1 cache 30.
  • the L2 cache 40 When the read request is missed, the L2 cache 40 reads data corresponding to the read request from the main memory 20 and outputs the read data to the processor 10 via the L1 cache 30. When the write request misses, the L2 cache 40 performs refill processing, updates the tag address via the L1 cache 30, and writes the data output from the processor 10 simultaneously with the write request.
  • processing for providing coherency among the main memory 20, the L1 cache 30, and the L2 cache 40 is performed.
  • data written to the cache memory according to the write request is written to the main memory 20 by a write-through process or a write-back process.
  • the processor 10 may write data to the main memory 20 without refilling and updating the L1 cache 30. The same applies to the L2 cache 40.
  • FIG. 1 shows a configuration in which the L1 cache 30 is provided outside the processor 10, the processor 10 may include the L1 cache 30.
  • data may be transferred not only to the main memory 20 but also to other peripheral devices such as an IO device.
  • the peripheral device is a device that transfers data to and from the processor 10, and is, for example, a keyboard, a mouse, a display, or a floppy (registered trademark) disk drive.
  • FIG. 2 is a diagram showing attributes set in the address space of the present embodiment.
  • the area of the address space is allocated to the main memory 20 and other peripheral devices.
  • the main memory 20 includes a cacheable area 21 and an uncacheable area 22.
  • the cacheable area 21 is an area belonging to a cacheable attribute indicating that data to be cached can be held in a cache memory such as the L1 cache 30 and the L2 cache 40.
  • the uncacheable area 22 is an area belonging to an uncacheable attribute indicating that data that should not be cached can be held in a cache memory such as the L1 cache 30 and the L2 cache 40.
  • the uncacheable area 22 includes a burstable area 23 and a burst impossible area 24.
  • the burstable area 23 is an area that belongs to the burstable attribute indicating that data that should not be cached in the cache memory and that should be burst transferred can be held. Burst transfer is a batch transfer of data, such as burst read and burst write. The burstable area 23 is an area that is not read-sensitive, for example.
  • the non-burstable area 24 is an area that belongs to a non-burstable attribute indicating that it should not be cached in the cache memory and that data to be burst transferred cannot be held.
  • the burst impossible area 24 is, for example, a read sensitive area.
  • one of three exclusive attributes is set for each area.
  • FIG. 3 is a block diagram showing a configuration of the buffer memory device according to the present embodiment.
  • the buffer memory device 100 shown in the figure is provided in the same chip as the L2 cache 40 shown in FIG. 1, and executes data transfer processing between the processor 10 and the main memory 20.
  • the processor 10 includes the L1 cache 30, and the L1 cache 30 is not illustrated.
  • the buffer memory device 100 includes an attribute acquisition unit 110, an attribute determination unit 120, a data reading unit 130, a buffer memory 140, a cache memory 150, a table holding unit 160, and an attribute setting unit. 170.
  • the buffer memory device 100 reads data corresponding to the read request output from the processor 10 from the main memory 20, the buffer memory 140 or the cache memory 150, and transfers the read data to the processor 10.
  • the attribute acquisition unit 110 acquires the attribute of the area indicated by the address included in the read request (hereinafter also referred to as the read address). Specifically, the attribute acquisition unit 110 acquires the attribute of the area indicated by the read address by referring to the area attribute table 161 held in the table holding unit 160.
  • a cacheable attribute indicates that the area belongs to the cacheable area 21.
  • the burstable attribute indicates that the area belongs to the burstable area 23 of the uncacheable area 22.
  • the non-burstable attribute indicates that the area belongs to the non-burstable area 24 of the uncacheable area 22.
  • the attribute determination unit 120 determines whether the attribute acquired by the attribute acquisition unit 110 is a cacheable attribute, a burstable attribute, or a burst impossible attribute.
  • the data reading unit 130 reads data corresponding to the read request from the main memory 20, the buffer memory 140, or the cache memory 150 according to the determination result of the attribute determination unit 120.
  • the data reading unit 130 includes a first data reading unit 131, a second data reading unit 132, and a third data reading unit 133.
  • the first data reading unit 131 stores the data held in the area indicated by the read address. Perform a read. Further, the first data reading unit 131 determines whether the read request has hit or missed.
  • the first data reading unit 131 reads data corresponding to the read address (hereinafter also referred to as read data) from the buffer memory 140 and outputs the read data to the processor 10.
  • the first data reading unit 131 burst-reads data including the read data from the main memory 20 and stores the burst-read data (hereinafter also referred to as burst read data) in the buffer memory 140. To do. Then, only the read data among the stored burst read data is output to the processor 10.
  • the burst read data stored in the buffer memory 140 and the read data output to the processor 10 may be executed in parallel.
  • the burst read data is, for example, read data and data that is highly likely to be used together with the read data. In general, it is data corresponding to an address continuous to the read address.
  • the sizes of the read data and the burst read data are determined based on the data bus width between the processor 10, the main memory 20 and the buffer memory device 100, the memory size of the buffer memory 140, or an instruction from the processor 10, or the like. Is done.
  • the size of read data is 4 bytes
  • the size of burst read data is 64 bytes.
  • the case where the data corresponding to the read address is already held in the buffer memory 140 is “read request hit”, and the data corresponding to the read address is buffered.
  • a case where it is not held in the memory 140 is referred to as “read request missed”.
  • the second data reading unit 132 performs data reading when the attribute determining unit 120 determines that the attribute of the area indicated by the address included in the read request is a non-burstable attribute. Specifically, the second data reading unit 132 reads only the data (read data) corresponding to the read address from the main memory 20 and outputs the read data to the processor 10.
  • the third data reading unit 133 performs data reading when the attribute determining unit 120 determines that the attribute of the area indicated by the address included in the read request is a cacheable attribute. Further, the third data reading unit 133 determines whether the read request has hit or missed.
  • the third data reading unit 133 reads data (read data) corresponding to the read address from the cache memory 150 and outputs the read data to the processor 10.
  • the third data reading unit 133 reads the read data from the main memory 20 and stores the read data read in the cache memory 150. Then, the stored read data is transferred to the processor 10. Note that the storage of the read data read from the main memory 20 in the cache memory 150 and the output to the processor 10 may be executed in parallel.
  • the buffer memory 140 is a storage unit such as a memory that holds data (burst read data) burst-read from the main memory 20 by the first data reading unit 131.
  • the buffer memory 140 stores burst read data and addresses corresponding to each data in association with each other.
  • the cache memory 150 is a cache memory that holds data read from the main memory 20 by the third data reading unit 133.
  • Cache memory 150 includes a tag area for storing addresses and a data area for storing data.
  • the cache memory 150 corresponds to the L2 cache 40 of FIG.
  • the table holding unit 160 is a storage unit such as a memory that holds a region attribute table 161 in which an address of a main memory is associated with a region attribute.
  • the area attribute table 161 is generated and changed by the attribute setting unit 170.
  • FIG. 4 is a diagram illustrating an example of the region attribute table 161 according to the present embodiment.
  • the area attribute table 161 is a table in which the physical address of the main memory 20 is associated with the attribute of the area indicated by the physical address. “Cashable” in the figure indicates a cacheable attribute, “burst ready” indicates a burstable attribute, and “burst impossible” indicates a burst impossible attribute.
  • the attribute acquisition unit 110 refers to the area attribute table 161 and sets the burst impossible attribute as the attribute of the area indicated by the read address. get.
  • the attribute setting unit 170 sets the attribute corresponding to the address of the main memory 20 to any one of the cacheable attribute, the burstable attribute, and the burst impossible attribute. These attributes are set according to characteristics of data stored in the main memory 20 based on instructions from the processor 10.
  • the attribute setting unit 170 sets a read-sensitive area in the uncacheable area as a non-burstable attribute.
  • the attribute setting part 170 sets an attribute to each address according to the availability of data.
  • the attribute setting unit 170 sets a cacheable attribute to an address indicating an area that stores data that is continuously read and is likely to be used many times.
  • a burstable attribute is set to an address indicating an area storing data that is read continuously but is likely to be used only once.
  • a burst impossible attribute is set to an address indicating an area where other data is stored.
  • each attribute is set arbitrarily or as necessary to an address indicating an area where data is not stored.
  • FIG. 5 is a diagram showing details of the buffer memory 140 and the cache memory 150 of the present embodiment.
  • the buffer memory 140 stores the address (physical address) of the main memory 20 and the data read by the first data reading unit 131 from the area indicated by the address in association with each other.
  • the buffer memory 140 can hold a plurality (for example, 8) of data having a predetermined number of bytes (for example, 64 bytes).
  • the buffer memory 140 is used only for reading data from the main memory 20. That is, it is not used for writing data into the main memory 20.
  • the buffer memory 140 is a PFB (Prefetch Buffer) that holds data that is highly likely to be read in advance.
  • PFB Prefetch Buffer
  • the cache memory 150 is, for example, a 4-way set associative cache memory as shown in FIG.
  • the cache memory 150 has four ways having the same configuration, and each way has a plurality of (for example, 1024) cache entries.
  • One cache entry has a valid flag V, a tag, line data, and a dirty flag D.
  • the valid flag V is a flag indicating whether or not the data of the cache entry is valid.
  • a tag is a copy of a tag address.
  • the line data is a copy of a predetermined number of bytes of data (for example, 64 bytes of data) in the block specified by the tag address and the set index.
  • the dirty flag D is a flag indicating whether or not the cached data needs to be written back to the main memory.
  • the buffer memory 140 stores addresses and data in association with each other in the same manner as the relationship between the cache memory tag and data.
  • the number of ways the cache memory 150 has is not limited to four.
  • the number of cache entries that one way has and the number of bytes of line data that one cache entry has may be any value.
  • the cache memory 150 may be another type of cache memory. For example, a direct map method or a full associative method may be used.
  • the buffer memory device 100 reads data to be burst read from the uncacheable area 22 of the main memory 20 including the cacheable area 21 and the uncacheable area 22.
  • a buffer memory 140 that holds data that is burst read from the non-burstable area 24 that is held is provided.
  • the data corresponding to the read request and the data that is likely to be read after that are burst read, so that the memory access can be speeded up.
  • the buffer memory device 100 illustrated in FIG. 3 also includes a processing unit that performs a write process of write data corresponding to a write request.
  • the attribute acquisition unit 110 acquires the attribute of the area indicated by the write address included in the write request in the same manner as the read request.
  • the attribute determination unit 120 determines whether the attribute acquired by the attribute acquisition unit 110 is a cacheable attribute, a burstable attribute, or a non-burstable attribute. Then, a data writing unit (not shown) writes write data to the cache memory 150 or the main memory 20 based on the determination result.
  • write data is written to the cache memory 150 when the attribute is a cacheable attribute. If the attribute is an uncacheable attribute, write data is written to the main memory 20. At this time, at the time of writing to the cache memory 150, it is determined whether the write request hits or misses, and if it hits, the write data is written to the cache memory 150, and if missed, it is written to the main memory 20. Write data.
  • the buffer memory device 100 can also write write data in response to a write request from the processor 10.
  • the data reading unit 130 determines whether the write address matches the address corresponding to the data held in the buffer memory 140. If the write address matches, the data read unit 130 holds the data in the buffer memory 140. You may invalidate existing data. For example, the data is invalidated by setting a flag indicating that the corresponding data is invalid, or by deleting the corresponding data from the buffer memory 140.
  • FIG. 6 is a flowchart showing the operation of the buffer memory device 100 of the present embodiment.
  • the buffer memory device 100 acquires the read request from the processor 10 and executes the read process according to the present embodiment.
  • the attribute acquisition unit 110 acquires the attribute of the area indicated by the read address by referring to the area attribute table 161 (S101). Then, the attribute determination unit 120 determines whether the attribute acquired by the attribute acquisition unit 110 is a cacheable attribute, a burstable attribute, or a burst impossible attribute (S102).
  • the first data reading unit 131 executes the first transfer process (S103). ).
  • the first transfer process is a process executed when the attribute is a burst enable attribute.
  • the data is burst read from the main memory 20, and the burst read data is transferred to the buffer memory 140. It is a process to store in.
  • FIG. 7 is a flowchart showing details of transfer processing when the attribute is a burstable attribute in the present embodiment.
  • the first data reading unit 131 determines whether the read request has hit or missed (S201). When the read request is missed (No in S201), the first data reading unit 131 burst-reads the burst read data including the read data from the main memory 20 (S202). Then, the first data reading unit 131 stores the read burst read data in the buffer memory 140 (S203). Further, the first data reading unit 131 reads the read data from the buffer memory 140 (S204), and outputs the read data to the processor 10 (S205). At this time, the burst read data stored in the buffer memory 140 and the read data output to the processor 10 may be simultaneously executed.
  • the first data reading unit 131 reads the read data corresponding to the read request from the buffer memory 140 (S204). Then, the first data reading unit 131 outputs the read data that has been read to the processor 10 (S205).
  • the second data reading unit 132 performs the second transfer. Processing is executed (S104).
  • the second transfer process is a process that is executed when the attribute is a non-burstable attribute, and is a process of reading data from the main memory 20 and transferring the read data to the processor 10.
  • FIG. 8 is a flowchart showing details of the transfer process when the attribute is a burst impossible attribute in the present embodiment.
  • the second data reading unit 132 reads the read data from the main memory 20 (S301). Then, the second data reading unit 132 outputs the read data that has been read to the processor 10 (S302).
  • the third data reading unit 133 executes the third transfer process. (S105).
  • the third transfer process is a process executed when the attribute is a cacheable attribute.
  • the data is read from the main memory 20 and the read data is stored in the cache memory 150. It is processing.
  • FIG. 9 is a flowchart showing details of transfer processing when the attribute is a cacheable attribute in the present embodiment.
  • the third data reading unit 133 determines whether the read request has been hit or missed (S401). When the read request is missed (No in S401), the third data reading unit 133 reads the read data from the main memory 20 (S402). Then, the third data reading unit 133 stores the read data that has been read in the cache memory 150 (S403). Further, the third data reading unit 133 reads the read data from the cache memory 150 (S404), and outputs the read data to the processor 10 (S405). At this time, the storage of the read data in the cache memory 150 and the output to the processor 10 may be executed simultaneously.
  • the third data reading unit 133 reads the read data corresponding to the read request from the cache memory 150 (S404). Then, the third data reading unit 133 outputs the read data that has been read to the processor 10 (S405).
  • the buffer memory device 100 determines which attribute area the area indicated by the read address is, and executes data reading according to the determination result.
  • the buffer memory device 100 has a burst that holds data to be burst read out of the uncacheable area 22 of the main memory 20 including the cacheable area 21 and the uncacheable area 22.
  • a buffer memory 140 that holds data that has been burst read from the impossible area 24 is provided. Then, it is determined which attribute area the area indicated by the read address is, and data is read according to the determination result. At this time, if the attribute is a burstable attribute, the data burst-read from the main memory 20 is stored in the buffer memory 140.
  • the cache memory can hold data that is expected to be used frequently. Furthermore, by setting an area that disables burst reading in the main memory 20, it is possible to prevent problems caused by reading more data than necessary, and by setting an area that enables burst reading, Memory access can be speeded up.
  • the buffer memory device When the attribute of the area indicated by the address included in the read request is a cacheable attribute, the buffer memory device according to the present embodiment burst-reads data including data corresponding to the read request. Thereby, the memory access can be further speeded up.
  • FIG. 10 is a block diagram showing the configuration of the buffer memory device of the present embodiment.
  • the buffer memory device 200 shown in the figure is different from the buffer memory device 100 of FIG. 3 in that a data reading unit 230 is provided instead of the data reading unit 130.
  • symbol is attached
  • the data reading unit 230 reads data corresponding to the read request from the main memory 20, the buffer memory 140, or the cache memory 150 in accordance with the determination result of the attribute determination unit 120.
  • the data reading unit 230 includes a first data reading unit 131, a second data reading unit 132, and a third data reading unit 233.
  • the third data reading unit 233 executes data reading when the attribute determining unit 120 determines that the attribute of the area corresponding to the address included in the read request is a cacheable attribute. Further, the third data reading unit 233 determines whether the read request has hit or missed.
  • the third data reading unit 233 reads data corresponding to the read address from the cache memory 150 or the buffer memory 140 and outputs the read data to the processor 10.
  • the third data reading unit 233 burst-reads the data including the read data from the main memory 20 and stores the burst-read data (burst read data) in the cache memory 150 and the buffer memory 140. To do.
  • the data including the read data among the burst read data is stored in the cache memory 150, and the remaining data of the burst read data excluding the data held in the cache memory 150 is stored in the buffer memory 140. Then, read data of the stored burst read data is read from the cache memory 150 and the read data read is output to the processor 10.
  • the burst read data stored in the cache memory 150 and the buffer memory 140 and the read data output to the processor 10 may be executed in parallel.
  • the third data reading unit 233 burst-reads 128-byte data including the read data. Then, the third data reading unit 233 stores 64 bytes of the read data among the 128 bytes of burst read data in the cache memory 150 and stores the remaining 64 bytes of data in the buffer memory 140.
  • the buffer memory device 200 when it is determined that the attribute of the area indicated by the read address is the cacheable attribute, stores data including data corresponding to the read address. Burst read is performed, and the burst read data is stored in the cache memory 150 and the buffer memory 140.
  • the buffer memory device 200 according to the present embodiment is compared with the operation of the buffer memory device 100 according to the first embodiment when the attribute is determined to be a cacheable attribute (S105 in FIG. 6, FIG. 9). Is different. Therefore, below, it demonstrates focusing on a different point and may abbreviate
  • the buffer memory device 200 acquires a read request from the processor 10 to execute the read process of the present embodiment.
  • the attribute acquisition unit 110 refers to the area attribute table 161 to acquire the attribute of the area indicated by the read address (S101). Then, the attribute determination unit 120 determines whether the attribute acquired by the attribute acquisition unit 110 is a cacheable attribute, a burstable attribute, or a burst impossible attribute (S102).
  • the attribute determining unit 120 determines that the attribute of the area indicated by the read address is a burstable attribute (“uncacheable (burst possible)” in S102)
  • the first transfer process is executed (S103: details) FIG. 7).
  • the second transfer process is executed (S104: FIG. 8 for details).
  • the third data reading unit 233 executes a third transfer process (S105).
  • the third transfer process is a process executed when the attribute is a cacheable attribute.
  • the data is read from the main memory 20 and the read data is stored in the cache memory 150. It is processing.
  • FIG. 11 is a flowchart showing details of transfer processing when the attribute is a cacheable attribute in the present embodiment.
  • the third data reading unit 233 determines whether the read request has hit or missed (S501). When the read request is missed (No in S501), the third data reading unit 233 burst-reads data including the read data (burst read data) from the main memory 20 (S502). Then, the third data reading unit 233 stores the burst read data in the cache memory 150 and the buffer memory 140 (S503). Further, the third data reading unit 233 reads the read data from the cache memory 150 (S504), and outputs the read data to the processor 10 (S505). At this time, the storage of the burst read data in the cache memory 150 and the output of the read data to the processor 10 may be performed simultaneously.
  • the third data reading unit 233 reads the read data corresponding to the read request from the cache memory 150 or the buffer memory 140 (S504). Then, the third data reading unit 233 outputs the read data that has been read to the processor 10 (S505).
  • the buffer memory device 200 when it is determined that the attribute of the area indicated by the read address is the cacheable attribute, stores the data including the data corresponding to the read address in the cache memory 150. And burst read to the buffer memory 140.
  • the buffer memory 140 can be used even when the processor 10 outputs a read request for the cacheable area. That is, by performing a burst read of more data than the data corresponding to the read request and storing the burst read data in the buffer memory 140, the memory access at the time of reading can be speeded up.
  • an MMU Memory Management Unit
  • OS Operating System
  • FIG. 12 is a block diagram showing the configuration of the memory system of the present embodiment.
  • the memory system 300 shown in the figure includes processors 310a and 310b, a main memory 320, and an L2 cache 330.
  • the memory system 300 of this embodiment is a system including a multiprocessor including a processor 310a and a processor 310b.
  • the processor 310a is a CPU that includes an L1 cache 311 and a TLB (Translation Lookaside Buffer) 312 and outputs a memory access request (read request or write request) to the main memory 320. Further, the processor 310a manages the main memory 320 by using an MMU and an OS that are built in or externally provided.
  • TLB Translation Lookaside Buffer
  • the processor 310a manages an address conversion table in which a physical address and a logical address of the main memory 320 are associated with each other. Further, the attribute of the area indicated by the physical address of the main memory 320 is set, and the set attribute and the physical address are associated with each other and stored in the TLB 312 that holds the address conversion table.
  • the processor 310a corresponds to the attribute setting unit 170 of the first and second embodiments.
  • the processor 310b is a processor having the same configuration as the processor 310a.
  • the processors 310a and 310b may be two physically different processors, or two virtual processors obtained by virtually dividing one processor by an OS.
  • the L1 cache 311 and the TLB 312 may be provided for each processor.
  • the L1 cache 311 and the TLB 312 may be provided between the processor 310a and the L2 cache 330.
  • the L1 cache 311 acquires a memory access request issued by the processor 310a, and determines whether the acquired memory access request (read request or write request) has hit or missed.
  • the L1 cache 311 corresponds to the L1 cache 30 of the first and second embodiments.
  • the L1 cache 311 When the read request is hit, the L1 cache 311 reads data corresponding to the read address included in the read request from the inside of the L1 cache 311 and outputs the read data to the processor 310a. When the write request is hit, the L1 cache 311 writes the data output from the processor 310a simultaneously with the write request into the L1 cache 311.
  • the L1 cache 311 When the read request misses, the L1 cache 311 reads data corresponding to the read request from the L2 cache 330 or the main memory 320, and outputs the read data to the processor 310a. When the write request misses, the L1 cache 311 writes the data output from the processor 310a simultaneously with the write request to the L2 cache 330 or the main memory 320.
  • the TLB 312 is a cache memory that stores the address conversion table 313.
  • the TLB 312 corresponds to the table holding unit 160 of the first and second embodiments.
  • the address conversion table 313 is a table in which a logical address, a physical address, and an attribute of an area indicated by the physical address are associated with each other.
  • the address conversion table 313 corresponds to the area attribute table 161 of the first and second embodiments.
  • FIG. 13 is a diagram illustrating an example of an address conversion table according to the present embodiment.
  • the address conversion table 313 is a table in which logical addresses, physical addresses, access permission attributes, and memory attributes are associated with each other.
  • the logical address is an address virtually set by the processor 310a and is also called a virtual address.
  • the physical address is an address indicating an actual writing or reading area of the main memory 320 and is also referred to as a real address.
  • the memory attribute indicates whether the area is a cacheable area, a burstable area, or a non-burstable area.
  • logical address C indicates an area indicated by “physical address 3” in the main memory 320, and the area is “user mode” and “burst impossible area”. It shows that there is. Therefore, data cannot be burst read from the area indicated by “logical address C”.
  • the main memory 320 is a storage unit such as an SDRAM that stores programs or data. Data reading from the main memory 320 or data writing to the main memory 320 is executed in response to a memory access request (read request or write request) output from the processors 310a and 310b.
  • the main memory 320 corresponds to the main memory 20 of the first and second embodiments.
  • the L2 cache 330 acquires the memory access request output from the processors 310a and 310b, and determines whether the acquired memory access request has hit or missed.
  • the L2 cache 330 corresponds to the L2 cache 40 (cache memory 150) of the first and second embodiments.
  • the memory access request input to the L2 cache 330 is issued by the processor 310a.
  • the memory access request may be issued by another processor (such as the processor 310b) or DMAC (Direct Memory Access Controller).
  • the L2 cache 330 When the read request is hit, the L2 cache 330 reads data corresponding to the read address included in the read request from the inside of the L2 cache 330, and outputs the read data to the processor 310a or the like. When the write request is hit, the L2 cache 330 writes the data output from the processor 310a simultaneously with the write request into the L2 cache 330.
  • the L1 cache 311 When the read request misses, the L1 cache 311 reads data corresponding to the read request from the L2 cache 330 or the main memory 320, and outputs the read data to the processor 310a. When the write request misses, the L1 cache 311 writes the data output from the processor 310a simultaneously with the write request to the L2 cache 330 or the main memory 320.
  • the L2 cache 330 includes queues 331a and 331b, attribute determination units 332a and 332b, selectors 333a and 333b, a PFB 334, a cache memory 335, and a memory interface 336.
  • the queue 331a is a first-in first-out memory (FIFO memory: First In First Out) that temporarily holds a memory access request output from the processor 310a.
  • the held memory access request includes the attribute of the area indicated by the address as well as the address.
  • the queue 331b has the same configuration as the queue 331a and is a FIFO memory that temporarily holds a memory access request output from the processor 310b.
  • queues 331a and 331b correspond to the attribute acquisition unit 110 of the first and second embodiments.
  • the attribute determination unit 332a reads the memory access request held in the queue 331a, and determines whether the attribute included in the read memory access request is a cacheable attribute, a burstable attribute, or a non-burstable attribute. . Then, according to the determination result, the attribute determination unit 332a outputs a memory access request to the PFB 334 and the cache memory 335 or to the memory interface 336 via the selector 333a or 333b and the memory interface 336.
  • the attribute determination unit 332a when it is determined that the attribute is a cacheable attribute or a burstable attribute, the attribute determination unit 332a sends a memory access request to the PFB 334 and the cache memory 335 via the selector 333a and the memory interface 336. Output. When it is determined that the attribute is a non-burstable attribute, the attribute determination unit 332a outputs a memory access request to the main memory 320 via the selector 333b and the memory interface 336.
  • the attribute determination unit 332b has the same configuration as the attribute determination unit 332a, reads a memory access request held in the queue 331b, and determines an attribute included in the read memory access request.
  • attribute determination units 332a and 332b correspond to the attribute determination unit 120 of the first and second embodiments.
  • the selectors 333a and 333b arbitrate which of the plurality of memory access requests input from the two queues 331a and 331b via the attribute determination unit 332a or 332b, and the arbitrated memory access request via the memory interface 336. , PFB 334, cache memory 335, and main memory 320 are selected.
  • the PFB 334 is a buffer memory that stores the address of the main memory 320 and the data read from the area indicated by the address in association with each other.
  • the PFB 334 is used for prefetch processing that holds in advance data that is likely to be read by the processor 310a or the like in response to a read request output from the processor 310a or the like.
  • the PFB 334 corresponds to the buffer memory 140 of the first and second embodiments.
  • the cache memory 335 is a cache memory that holds data read from the main memory 320.
  • the cache memory 335 corresponds to the cache memory 150 of the first and second embodiments.
  • the memory interface 336 determines whether the read request hits or misses, and executes reading of data from the main memory 320, the PFB 334, or the cache memory 335 according to the determination result.
  • the memory interface 336 corresponds to the data reading unit 130 (230) of the first and second embodiments.
  • the memory interface 336 reads data from the main memory 320 and outputs the read data to the processor 310a.
  • the memory interface 336 determines whether the read request hits or misses. If the read request is hit, the corresponding read data is read from the PFB 334 and output to the processor 310a. When the read request is missed, the data including the corresponding read data is burst read from the main memory 320, and the burst read data is written to the PFB 334. Then, read data is read from the PFB 334 and output to the processor 310a.
  • the memory interface 336 determines whether the read request hits or misses. When the read request is hit, the corresponding read data is read from the cache memory 335 and output to the processor 310a. If the read request misses, data including the corresponding read data is read from the main memory 320 and the read data is written to the cache memory 335. Then, the data is read from the cache memory 335 and output to the processor 310a. At this time, as in the second embodiment, data may be burst read from the main memory 320 and stored in the cache memory 335 and the PFB 334.
  • a read request issued from the processor 310a or the like is stored in the queue 331a or the like.
  • the read request includes an attribute obtained by referring to the address conversion table 313 (S101).
  • the attribute determination unit 332a determines whether the attribute included in the read request is a cacheable attribute, a burstable attribute, or a non-burstable attribute (S102). The determination result is output to the memory interface 336 via the selector 333a and the like.
  • the memory interface 336 executes the first transfer process (S103).
  • the memory interface 336 determines whether the read request has hit or missed (S201). When the read request is missed (No in S201), the memory interface 336 performs burst read of the burst read data including the read data from the main memory 320 (S202). Then, the memory interface 336 stores the read burst read data in the PFB 334 (S203). Further, the memory interface 336 reads the read data from the PFB 334 (S204), and outputs the read data to the processor 310a (S205).
  • the memory interface 336 reads the read data from the PFB 334 (S204), and outputs the read data to the processor 310a (S205).
  • the memory interface 336 executes the second transfer process. (S104).
  • the memory interface 336 reads the read data from the main memory 320 (S301). Then, the memory interface 336 outputs the read data that has been read to the processor 310a (S302).
  • the memory interface 336 executes a third transfer process (S105).
  • the memory interface 336 determines whether the read request has hit or missed (S401). When the read request is missed (No in S401), the memory interface 336 reads the read data from the main memory 320 (S402). Then, the memory interface 336 stores the read data read out in the cache memory 335 (S403). Further, the memory interface 336 reads the read data from the cache memory 335 (S404), and outputs the read data to the processor 310a (S405).
  • the memory interface 336 reads the read data from the cache memory 335 (S404), and outputs the read data to the processor 310a (S405).
  • the memory interface 336 stores the main memory Data including read data from 320 may be burst read (flow chart shown in FIG. 11). At this time, the read burst read data is stored in the cache memory 335 and the PFB 334.
  • the attribute is set by the MMU in the processor, and the set attribute is stored in the address conversion table held in the TLB.
  • an address conversion table provided conventionally can be used, and a new attribute storage buffer is not required, and the configuration can be simplified.
  • the buffer memory device temporarily holds data to be written to the main memory output from the processor, and burst-writes the held data when a predetermined condition is satisfied.
  • the data bus can be used effectively and data can be transferred efficiently.
  • FIG. 14 is a block diagram showing the configuration of the buffer memory device of the present embodiment.
  • the buffer memory device 400 shown in the figure transfers data between the plurality of processors 10a, 10b, and 10c and the main memory 20 in accordance with a memory access request issued by each of the plurality of processors 10a, 10b, and 10c.
  • the plurality of processors 10a, 10b, and 10c are referred to as the processor 10 when it is not necessary to distinguish between them.
  • the buffer memory device 400 is provided in the same chip as the L2 cache 40 shown in FIG.
  • the L1 cache 30 shown in FIG. 1 is provided in each of the plurality of processors 10a, 10b, and 10c, and is not shown in FIG.
  • the L1 cache 30 may be provided between the plurality of processors 10a, 10b, and 10c and the buffer memory device 400, and may be shared by the plurality of processors 10a, 10b, and 10c.
  • the buffer memory device 400 includes a memory access information acquisition unit 410, a determination unit 420, a control unit 430, a data transfer unit 440, STB (Store Buffer) 450a, 450b, and 450c, a cache, A memory 460 and a PFB 470 are provided.
  • STBs 450a, 450b, and 450c are referred to as STB450 unless it is necessary to distinguish between them.
  • the memory access information acquisition unit 410 acquires a memory access request from the processor 10, and acquires memory access information indicating the nature of the memory access request issued by the processor 10 from the acquired memory access request.
  • the memory access information is information included in the memory access request and information accompanying it, and includes command information, address information, attribute information, processor information, and the like.
  • the command information is information indicating whether the memory access request is a write request or a read request, and other commands related to data transfer.
  • the address information is information indicating a write address indicating a data write area or a read address indicating a data read area.
  • the attribute information is information indicating whether the attribute of the area indicated by the write address or the read address is a cacheable attribute, a burst enable attribute, or a burst disable attribute.
  • the processor information is information indicating a thread that has issued a memory access request, a logical processor (LP), and a physical processor (PP).
  • the memory access information acquisition unit 410 holds a table in which the address of the main memory 20 is associated with the attribute of the area indicated by the address, and acquires the attribute information by referring to the address information and the table. May be.
  • FIG. 15 is a diagram illustrating an example of memory access information according to the present embodiment.
  • memory access information 501 and 502 are shown.
  • the memory access information 501 indicates that the memory access request is a write request issued by the logical processor “LP1” of the physical processor “PP1”, and data is written to an area belonging to the burstable attribute indicated by “write address 1”. It shows that it includes a write command. Further, it is indicated that the write request includes an “All Sync” command.
  • the memory access information 502 indicates that the memory access request is a read request issued by the logical processor “LP1” of the physical processor “PP1”, and data is read from the area belonging to the burstable attribute indicated by “read address 1”.
  • the read command shown is included. Further, it is indicated that the read request includes a “Self Sync” command.
  • the determination unit 420 determines whether or not the property indicated by the memory access information acquired by the memory access information acquisition unit 410 satisfies a predetermined condition. Specifically, the determination unit 420 uses the command information, attribute information, address information, processor information, and the like acquired as memory access information, and the buffer amount information acquired from the STB 450 via the control unit 430 to determine the condition. Make a decision. Details of the conditions and the processing of the determination unit 420 will be described later.
  • the buffer amount information is information indicating the amount of data held in each STB 450.
  • control unit 430 stores data held in the STB corresponding to the condition among the plurality of STBs 450a, 450b, and 450c. To sweep out. Specifically, control unit 430 outputs a sweep command to STB 450. The sweep command is output to the STB that is the target of the data sweep, and the STB that has received the sweep command outputs the stored data to the main memory 20.
  • control unit 430 controls the data transfer unit 440 by outputting control information to the data transfer unit 440.
  • control information includes at least attribute information, and the control unit 430 determines a write data write destination, a read data read destination, and the like according to the attribute of the area indicated by the address.
  • control unit 430 outputs a buffer amount, which is the amount of data held in each of the plurality of STBs 450a, 450b, and 450c, to the determination unit 420.
  • the data transfer unit 440 transfers data between the processor 10 and the main memory 20 under the control of the control unit 430. Specifically, when a write request is output from the processor 10, write data output from the processor 10 for writing to the main memory 20 is written to any of the STB 450, the cache memory 460, and the main memory 20. When a read request is output from the processor 10, the read data is read from any one of the cache memory 460, the PFB 470, and the main memory 20, and the read read data is output to the processor 10. Which memory is used is determined by the control unit 430 according to the attribute of the area indicated by the address.
  • the data transfer unit 440 includes a first data transfer unit 441, a second data transfer unit 442, and a third data transfer unit 443.
  • the first data transfer unit 441 transfers data when the area indicated by the address belongs to the burstable attribute.
  • the first data transfer unit 441 writes the write data corresponding to the write request in the STB 450.
  • Which of the plurality of STBs 450a, 450b, and 450c is to be written is determined by the processor information included in the control information. Specifically, write data is written to the STB corresponding to the processor that issued the write request.
  • the first data transfer unit 441 determines whether or not read data corresponding to the read request is held in the PFB 470. That is, it is determined whether the read request has hit or missed. When the read request is hit, the first data transfer unit 441 reads the corresponding read data from the PFB 470 and outputs the read data to the processor 10. When the read request is missed, the first data transfer unit 441 performs burst read from the main memory 20 including the read data corresponding to the read request, and writes the burst read data in the PFB 470. Then, read data corresponding to the read request is read from the PFB 470, and the read data read is output to the processor 10. Note that the read data corresponding to the read request may be output to the processor 10 simultaneously with the burst read data read from the main memory 20 being written into the PFB 470.
  • the second data transfer unit 442 transfers data when the area indicated by the address belongs to the burst impossible attribute.
  • the second data transfer unit 442 writes write data corresponding to the write request in the main memory 20.
  • the second data transfer unit 442 reads the read data corresponding to the read request from the main memory 20 and outputs the read read data to the processor 10.
  • the third data transfer unit 443 transfers data when the area indicated by the address belongs to the cacheable attribute.
  • the write data write destination differs depending on whether the third data transfer unit 443 performs the write back process or the write through process.
  • the third data transfer unit 443 determines whether the write request hits or misses. When the write request hits, write data is written into the cache memory 460. If the write request is missed, the third data transfer unit 443 performs refill processing on the cache memory 460 and writes the address (tag address) and write data included in the write request to the cache memory 460. In any case, the write data written to the cache memory 460 is written to the main memory 20 at an arbitrary timing. If the write request is missed, the write data may be directly written to the main memory 20 without writing the write data to the cache memory 460.
  • the third data transfer unit 443 determines whether the write request hits or misses. When the write request is hit, the third data transfer unit 443 writes the write address and the write data in the STB 450. The write data written to the STB 450 is transferred from the STB 450 to the cache memory 460 and the main memory 20 according to the control of the control unit 430 when the determination unit 420 determines that the nature of the subsequent memory access request satisfies the condition. Burst write.
  • the third data transfer unit 443 writes the write address and write data in the STB 450.
  • the write data and the write address written to the STB 450 are burst-written from the STB 450 to the cache memory 460 and the main memory 20 when the determination unit 420 determines that the nature of the subsequent memory access request satisfies the condition.
  • the third data transfer unit 443 determines whether the read request hits or misses. When the read request is hit, the third data transfer unit 443 reads the read data from the cache memory 460 and outputs the read data to the processor 10.
  • the third data transfer unit 443 reads the read data from the main memory 20 and writes the read data and the read address to the cache memory 460. Then, the third data transfer unit 443 reads the read data from the cache memory 460 and outputs the read data to the processor 10. Note that the read data read from the main memory 20 may be output to the processor 10 at the same time as it is written to the cache memory 460.
  • Each of the STBs 450a, 450b, and 450c is a store buffer (STB) that corresponds to the plurality of processors 10a, 10b, and 10c and holds write data corresponding to a write request issued by the corresponding processor.
  • the STB 450 is a buffer memory that temporarily holds write data in order to merge write data output from the plurality of processors 10.
  • the STB 450 is provided for each physical processor.
  • the STB 450 can hold data of up to 128 bytes. Data held in the STB 450 is burst-written to the main memory 20 based on control from the control unit 430. When the write request is an access to an area belonging to the cacheable attribute and the write-through process is performed, the data held in the STB 450 is burst-written to the main memory 20 and the cache memory 460.
  • FIG. 16 is a diagram showing an outline of the STB 450 provided in the buffer memory device 400 of the present embodiment.
  • STBs 450a, 450b, and 450c are provided corresponding to physical processors (processors 10a (PP0), 10b (PP1), and 10c (PP2)), respectively. That is, the STB 450a holds buffer control information such as a write address output from the processor 10a and write data.
  • the STB 450b holds buffer control information such as a write address output from the processor 10b and write information.
  • the STB 450c holds buffer control information such as a write address output from the processor 10c and write data.
  • the buffer control information is information included in the write request, and is information for managing data written to the STB 450. That is, the buffer control information includes at least a write address and information indicating a physical processor and a logical processor that output corresponding write data.
  • the STB provided for each physical processor has two areas capable of holding 64-byte data. For example, these two areas may be associated with each thread.
  • the cache memory 460 is, for example, a 4-way set associative cache memory, similar to the cache memory 150 of the first embodiment.
  • the PFB 470 corresponds to the buffer memory 140 of the first embodiment, and is a buffer memory that stores the address of the main memory 20 and the data read by the first data transfer unit 441 from the area indicated by the address in association with each other. is there.
  • FIG. 17 is a diagram illustrating a determination table showing an example of a plurality of determination conditions according to the present embodiment.
  • an attribute determination condition (“Uncache”)
  • a command determination condition (“All Sync” and “Self Sync”)
  • an address determination condition (“RAW Hazard” and “Another Line Access”
  • the buffer amount determination condition (“Slot Full”) and the processor determination condition (“same LP, different PP”) are shown.
  • the attribute determination condition is a condition for sweeping out data from the STB 450 and determining an STB to be swept out according to the attribute of the area indicated by the address included in the memory access request using the attribute information.
  • the “Uncache” condition shown in FIG. 17 is an example of an attribute determination condition.
  • the determination unit 420 determines whether or not the attribute of the area indicated by the address included in the memory access request is a burst impossible attribute.
  • the control unit 430 holds the data from the STB that holds data corresponding to the memory access request issued by the same logical processor that issued the memory access request. The stored data is swept out to the main memory 20.
  • the control unit 430 may use a virtual processor corresponding to a thread instead of a logical processor as a reference for determining the STB to be swept out.
  • the command determination condition is a condition for sweeping out data from the STB 450 and determining the STB to be swept out according to the command included in the memory access request using the command information.
  • the “All Sync” condition and the “Self Sync” condition shown in FIG. 17 are examples of command determination conditions.
  • the determination unit 420 determines whether or not the “All Sync” command is included in the memory access request.
  • the “All Sync” command is a command for sweeping out all data held in all STBs 450 to the main memory 20.
  • the control unit 430 sweeps out all the data held in all the STBs 450 to the main memory 20.
  • the determination unit 420 determines whether or not the “Self Sync” command is included in the memory access request.
  • the “Self Sync” command is a command for sweeping only the data output from the processor that issued the command from the STB 450 to the main memory 20.
  • the control unit 430 transmits data corresponding to the memory access request issued by the same logical processor as the logical processor that issued the memory access request. The stored data is swept out to the main memory 20 from the STB that holds.
  • the control unit 430 may use a virtual processor corresponding to a thread instead of a logical processor as a reference for determining the STB to be swept out.
  • the address determination condition is a condition for sweeping out data from the STB 450 and determining the STB to be swept out according to the address included in the memory access request using the address information.
  • the “RAW Hazard” condition and the “Another Line Access” condition shown in FIG. 17 are examples of address determination conditions.
  • the determination unit 420 determines whether or not a write address that matches the read address included in the read request is held in at least one of the plurality of STBs 450.
  • the control unit 430 holds all the data up to the Hazard line, that is, the write data corresponding to the write address before the write data. The data is swept out to the main memory 20.
  • the determination unit 420 determines whether the write address included in the write request is related to the write address included in the write request input immediately before. Specifically, it is determined whether or not the two write addresses are consecutive addresses. At this time, it is assumed that the two write requests are issued by the same physical processor. When it is determined that the two write addresses are not consecutive addresses, the control unit 430 sweeps the data held in the STB 450 before the write data corresponding to the write request input immediately before to the main memory 20.
  • the buffer amount determination condition is a condition for sweeping out data from the STB 450 and determining an STB to be swept out according to the data amount held in the STB 450 using the buffer amount information.
  • the “Slot Full” condition shown in FIG. 17 is an example of a buffer amount determination condition.
  • the determination unit 420 determines whether or not the buffer amount that is the data amount held in the STB 450 is full (128 bytes). When it is determined that the buffer amount is 128 bytes, the control unit 430 sweeps the data of the STB to the main memory 20.
  • the processor determination condition is a condition for sweeping out data from the STB 450 and determining an STB to be swept out according to which logical processor and physical processor issued a memory access request using the processor information. .
  • the “same LP, different PP” condition shown in FIG. 17 is an example of a processor determination condition.
  • the logical processor that issued the memory access request is the same as the logical processor that issued the write request corresponding to the write data held in the STB 450. Further, it is determined whether or not the physical processor that has issued the memory access request is different from the physical processor that has issued the write request. That is, write data corresponding to a write request previously issued by a physical processor different from the physical processor indicated by the processor information and the same logical processor indicated by the logical processor indicated by the processor information is stored in at least one STB. The determination unit 420 determines whether or not it is held.
  • control unit 430 sweeps out data corresponding to the write request previously issued by the logical processor from the STB 450. It may be determined whether the threads are the same instead of the logical processor.
  • data is swept from the STB 450 when each condition is satisfied. Note that it is not necessary to determine all of the above conditions.
  • a new condition may be added to the above condition, or the above condition and the new condition may be replaced.
  • the “Slot Full” condition is a condition for determining whether or not the buffer amount is full.
  • a predetermined buffer amount such as half the maximum value of the buffer amount that can be held in the STB. It may be a condition for determining whether or not. For example, although the maximum value of the data amount that can be held in the STB 450 is 128 bytes, whether or not the buffer amount has reached 64 bytes when the data bus width between the STB 450 and the main memory 20 is 64 bytes. May be determined.
  • FIG. 18 is a block diagram illustrating a detailed configuration of the determination unit 420 according to the present embodiment.
  • the determination unit 420 includes an attribute determination unit 421, a processor determination unit 422, a command determination unit 423, an address determination unit 424, a buffer amount determination unit 425, and a determination result output unit 426. Prepare.
  • the attribute determination unit 421 acquires attribute information from the memory access information acquired by the memory access information acquisition unit 410, and the attributes of the area indicated by the address included in the memory access request include a cacheable attribute, a burstable attribute, and a burst Determine which of the impossible attributes. Then, the attribute determination unit 421 outputs the obtained determination result to the determination result output unit 426.
  • the processor determination unit 422 acquires the processor information from the memory access information acquired by the memory access information acquisition unit 410, and the processor that has issued the memory access request selects any one of the plurality of logical processors and physical processors. Determine if it is a physical processor. Then, the processor determination unit 422 outputs the obtained determination result to the determination result output unit 426.
  • the command determination unit 423 acquires command information from the memory access information acquired by the memory access information acquisition unit 410, and determines whether or not a predetermined command is included in the memory access request. Further, when a predetermined command is included in the memory access request, the command determination unit 423 determines the type of the predetermined command. Then, the command determination unit 423 outputs the obtained determination result to the determination result output unit 426.
  • the predetermined command is, for example, an instruction for sweeping data from the STB 450 regardless of other conditions.
  • the address determination unit 424 acquires address information from the memory access information acquired by the memory access information acquisition unit 410, and determines whether the address included in the memory access request is already held in the STB 450. Further, the address determination unit 424 determines whether the address included in the memory access request is related to the address included in the immediately previous memory access request. Specifically, it is determined whether or not two addresses are continuous. Then, the address determination unit 424 outputs the obtained determination result to the determination result output unit 426.
  • the buffer amount determination unit 425 acquires the buffer amount from the STB 450 via the control unit 430, and determines for each STB whether or not the buffer amount has reached a predetermined threshold value. Then, the buffer amount determination unit 425 outputs the obtained determination result to the determination result output unit 426.
  • the predetermined threshold is, for example, the maximum value of the STB 450 or the data bus width between the buffer memory device 400 and the main memory 20.
  • the determination result output unit 426 determines whether or not the condition shown in FIG. 17 is satisfied based on the determination result input from each determination unit, and outputs the obtained determination result to the control unit 430. Specifically, when it is determined that the condition shown in FIG. 17 is satisfied, the determination result output unit 426 outputs sweep information indicating which data of which STB is swept to the main memory 20 to the control unit 430.
  • the buffer memory device 400 includes a plurality of STBs 450 that temporarily hold write data output from the plurality of processors 10, and the STB 450 has a predetermined condition when a predetermined condition is satisfied.
  • the held data is burst-written to the main memory 20. That is, in order to merge a plurality of write data having a small size, the STB 450 is temporarily held, and the large size data obtained by merging is burst-written to the main memory 20. At this time, whether or not data can be swept out from the STB 450 is determined based on conditions for guaranteeing the order of data among a plurality of processors.
  • FIG. 19 is a flowchart showing the operation of the buffer memory device 400 of the present embodiment.
  • the buffer memory device 400 executes the data transfer process according to the present embodiment by acquiring a memory access request from the processor 10.
  • the memory access information acquisition unit 410 acquires memory access information from the memory access request (S601). Then, the acquired memory access information is output to the determination unit 420. Moreover, the determination part 420 acquires buffer amount information from STB450 via the control part 430 as needed.
  • the determination unit 420 determines whether to sweep data from the STB 450 using the input memory access information and the acquired buffer amount information (S602). Details of this sweep-out determination process will be described later.
  • the command determination unit 423 determines whether the memory access request is a write request or a read request (S603).
  • the data transfer unit 440 performs a write process of write data output from the processor 10 (S604). If the memory access request is a read request (“read” in S603), the data transfer unit 440 executes a read data read process for the processor 10 (S605).
  • the memory access request determination process (S603) is completed after the sweep determination process (S602). ),
  • the write process (S604) or the read process (S605) may be executed.
  • FIG. 20 is a flowchart showing the writing process of the buffer memory device 400 of the present embodiment.
  • the attribute determination unit 421 determines the attribute of the area indicated by the write address included in the write request (S611). Specifically, the attribute determination unit 421 determines whether the attribute of the area indicated by the write address is a burstable attribute, a burst impossible attribute, or a cacheable attribute.
  • the first data transfer unit 441 uses the write data output from the processor 10 as STB450. (S612). Specifically, the first data transfer unit 441 writes the write data to the STB (STB 450a) corresponding to the physical processor (for example, the processor 10a) that issued the write request based on the control from the control unit 430.
  • the second data transfer unit 442 uses the write data output from the processor 10 as the main data Write to the memory 20 (S613).
  • the third data transfer unit 443 determines whether the write request has hit or missed (S614). . If the write request is missed (No in S614), the third data transfer unit 443 performs refill processing on the cache memory 460 and updates the tag address (S615).
  • the control unit 430 determines whether the write process based on the write request is a write-back process or a write-through process.
  • the write data write destination is changed (S617).
  • the third data transfer unit 443 writes the write data to the cache memory 460 (S617).
  • the third data transfer unit 443 writes the write data and the write address in the STB 450 (S618).
  • the write data output from the processor 10 is written into the main memory 20, the STB 450, or the cache memory 460.
  • the data written in the STB 450 and the cache memory 460 is written in the main memory 20 by a sweep-out determination process executed when a subsequent memory access request is input.
  • the attribute determination process (S611) is not performed after the memory access request determination process (S603) is completed. Each writing process may be executed.
  • the read process (S605) is executed according to the flowcharts shown in FIGS. 6 to 9, for example.
  • the attribute acquisition process (S101) and the attribute determination process are performed after the memory access request determination process (S603) is completed. Each reading process may be executed without performing (S102).
  • the conditions indicated by the determination table shown in FIG. 17 may be determined in any order. However, when the condition is satisfied, such as the “All Sync” condition, the data stored in all the buffers is swept out, so that it is not necessary to determine other conditions after that. desirable.
  • FIG. 21 is a flowchart showing the attribute determination process of the buffer memory device 400 of the present embodiment. This figure shows the sweep determination process based on the “Uncache” condition of FIG.
  • the attribute determination unit 421 determines whether or not the attribute of the area indicated by the address included in the memory access request is a burst impossible attribute (S701). If the attribute of the area indicated by the address is not a burst impossible attribute (No in S701), another determination process is executed.
  • the control unit 430 When it is determined that the attribute of the area indicated by the address included in the memory access request is a non-burstable attribute (Yes in S701), the control unit 430 is issued by the same logical processor as the logical processor that issued the memory access request. The stored data is swept out from the STB holding the data corresponding to the memory access request to the main memory 20 (S702). Note that the control unit 430 uses the determination result of the processor determination unit 422 to specify the STB to be swept out of the plurality of STBs 450, thereby executing data sweeping. When the sweeping is completed, another determination process is executed.
  • FIG. 22 is a flowchart showing command determination processing of the buffer memory device 400 of the present embodiment. This figure shows the sweep determination processing based on the “All Sync” condition and the “Self Sync” condition of FIG.
  • the command determination unit 423 determines whether the command included in the memory access request includes a “Sync” command that is an instruction to sweep data regardless of other conditions. It is determined whether or not (S801). When the “Sync” command is not included in the memory access request (No in S801), another determination process is executed.
  • the command determination unit 423 determines whether the “Sync” command is an “All Sync” command or a “Self Sync” command (S802). ).
  • the control unit 430 sweeps out all data from all STBs 450 (S803).
  • the control unit 430 When the “Sync” command is a “Self Sync” command (“Self Sync” in S802), the control unit 430 responds to a memory access request issued by the same logical processor as the logical processor that issued the memory access request. The retained data is swept out from the STB retaining the data to the main memory 20 (S804). Note that the control unit 430 uses the determination result of the processor determination unit 422 to specify the STB to be discharged out of the plurality of STBs 450, thereby executing data sweeping.
  • FIG. 23 is a flowchart showing a read address determination process of the buffer memory device 400 of the present embodiment. This figure shows the sweep-out determination process based on the “RAW Hazard” condition of FIG.
  • the “RAW Hazard” condition is a condition determined when the buffer memory device 400 receives a read request. That is, it is executed when the command determination unit 423 determines that the memory access request is a read request.
  • the address determination unit 424 determines whether or not the read address included in the read request matches the write address held in the STB 450 (S901). When it is determined that the read address does not match the write address held in the STB 450 (No in S901), another determination process is executed.
  • the control unit 430 displays all the data up to the Hazard line, that is, before the write data corresponding to the matched write address. All the stored data is swept from the STB 450 (S902). When the data sweeping is completed, another determination process is executed.
  • FIG. 24 is a flowchart showing the write address determination process of the buffer memory device 400 of the present embodiment. This figure shows a sweep-out determination process based on the “Another Line Access” condition of FIG.
  • the “Another Line Access” condition is a condition that is determined when the buffer memory device 400 receives a write request. That is, it is executed when the command determination unit 423 determines that the memory access request is a write request.
  • the address determination unit 424 determines whether or not the write address included in the write request is continuous with the write address included in the write request input immediately before (S1001). When two addresses are consecutive (No in S1001), another determination process is executed.
  • control unit 430 includes write data corresponding to the write request input immediately before and sweeps out all previous data from the STB 450 (S1002).
  • S1002 the control unit 430 includes write data corresponding to the write request input immediately before and sweeps out all previous data from the STB 450 (S1002).
  • FIG. 25 is a flowchart showing a buffer amount determination process of the buffer memory device 400 of the present embodiment. This figure shows the sweep-out determination process based on the “Slot Full” condition of FIG.
  • the “Slot Full” condition is a condition that is determined based on the buffer amount information obtained from the STB 450, not the memory access information, unlike the other conditions. Therefore, the determination may be made not only when the buffer memory device 400 receives a memory access request but also at an arbitrary timing or when data is written in the STB 450.
  • the buffer amount determination unit 425 acquires buffer amount information from the STB 450 via the control unit 430, and determines whether the buffer amount is full for each STB (S1101). When the buffer amount is not full (No in S1101), when the buffer memory device 400 receives a memory access request, another determination process is executed.
  • control unit 430 sweeps out data from the STB whose buffer amount is full among the plurality of STBs 450 (S1102).
  • the data sweeping is completed, another determination process is executed.
  • FIG. 26 is a flowchart showing the processor determination process of the buffer memory device 400 of the present embodiment. This figure shows the sweep determination process based on the “same LP, different PP” condition of FIG.
  • the processor determination unit 422 is a physical processor that is different from the physical processor that issued the memory access request, and is the same logical processor as the logical processor that issued the memory access request. It is determined whether write data corresponding to a previously issued memory access request is held in the STB 450 (S1201). If the write data is not held in the STB 450 (No in S1201), another determination process is executed.
  • the write data corresponding to the write request is held in the STB 450. That is, the input small-size write data is merged by the STB 450 and becomes large-size data. The data is burst-written to the main memory 20 when any of the above-described conditions is satisfied.
  • the data is swept out to the main memory 20 each time each determination condition is satisfied. However, after all the determination conditions are determined, the data corresponding to the satisfied condition are collected in the main memory 20. It may be swept out.
  • the buffer memory device 400 includes the STB 450 corresponding to each of the plurality of processors 10, and merges and holds the write data output from the processor 10 in each STB 450. Then, when a predetermined condition is satisfied, the data merged from the STB 450 is burst-written to the main memory 20.
  • the buffer memory device and the memory system of the present invention have been described based on the embodiments.
  • the present invention is not limited to these embodiments. Unless it deviates from the meaning of this invention, the form which carried out the various deformation
  • the issuer of the memory access request may be a processor such as a CPU and any master such as a DMAC.
  • the L2 cache 40 includes the buffer memory 140, the PFB 334, or the PFB 470 of each embodiment has been described.
  • the L1 cache 30 may include the buffer memory 140, the PFB 334, or the PFB 470.
  • the memory system may not include the L2 cache 40.
  • the present invention may be applied to a memory system provided with a cache of level 3 cache or higher.
  • the cache of the maximum level that is, the cache closest to the main memory 20 includes the buffer memory 140, the PFB 334, or the PFB 470 of each embodiment.
  • the present invention can be realized not only as a buffer memory device, a memory system, and a data reading method, but also as a program for causing a computer to execute the data reading method of the present embodiment. Further, it may be realized as a computer-readable recording medium such as a CD-ROM for recording the program. Furthermore, it may be realized as information, data, or a signal indicating the program. These programs, information, data, and signals may be distributed via a communication network such as the Internet.
  • the constituent elements constituting the buffer memory device may be constituted by one system LSI (Large Scale Integration).
  • the system LSI is an ultra-multifunctional LSI manufactured by integrating a plurality of components on a single chip.
  • the system LSI is a computer system including a microprocessor, a ROM, a RAM, and the like. .
  • the buffer memory device and the memory system of the present invention can be used for a system that transfers data between a processor such as a CPU and a main memory, and can be used for a computer, for example.

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)からのリード要求に応じて、キャッシャブル領域とアンキャッシャブル領域とからなるメインメモリ(20)からデータを読み出すバッファメモリ装置(100)であって、リード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得部(110)と、属性取得部(110)によって取得された属性が、バースト可属性であるか否かを判定する属性判定部(120)と、属性取得部(110)によって取得された属性がバースト可属性であると判定された場合、リードアドレスが示す領域に保持されているデータを含むデータをバーストリードするデータ読出部(130)と、データ読出部(130)によってバーストリードされたデータを保持するバッファメモリ(140)とを備える。

Description

バッファメモリ装置、メモリシステム及びデータ読出方法
 本発明は、バッファメモリ装置、メモリシステム及びデータ読出方法に関し、特に、メインメモリに保持されたデータをバーストリードする際に、バーストリードされたデータを保持するバッファメモリ装置、メモリシステム及びデータ読出方法に関する。
 近年、マイクロプロセッサからメインメモリへのメモリアクセスを高速化させるために、例えば、SRAM(Static Random Access Memory)などからなる小容量で高速で動作可能なキャッシュメモリが利用されている。例えば、キャッシュメモリをマイクロプロセッサの内部、又は、その近傍に配置し、メインメモリに保持されたデータの一部をキャッシュメモリに記憶させておくことで、メモリアクセスを高速化させることができる。
 従来、メモリアクセスをさらに高速化させるために、リード要求に応じて、当該リード要求に含まれるアドレスに連続するアドレスへは、プロセッサからアクセスされる可能性が高いと想定し、該当するアドレスに対応するデータをバーストリードする技術が示されている(特許文献1参照)。
 図27は、従来のメモリアクセス方法の概略を示す図である。同図に示すように、特許文献1に記載されている技術では、メインメモリ620は、キャッシャブル領域621とアンキャッシャブル領域622とに分けられる。
 CPU(Central Processing Unit)などのプロセッサ610から、アンキャッシャブル領域622に対するリード要求があった場合、バーストリードされたデータは、プロセッサ610が備える汎用レジスタ612に格納される。また、キャッシャブル領域621に対するリード要求があった場合、バーストリードされたデータはキャッシュメモリ611に格納される。
 以上のようにして、特許文献1に記載のメモリアクセス方法では、アクセスされる可能性が高いアドレスに対応するデータをバーストリードすることで、メモリアクセスをさらに高速化することができる。
特開2004-240520号公報
 しかしながら、上記従来技術によれば、以下のような課題がある。
 まず、アンキャッシャブル領域622に対するリード要求があった場合は、上述のように、バーストリードされたデータは、CPUが備える汎用レジスタ612に格納されるが、汎用レジスタ612は、キャッシュメモリ611などと比べて非常に効率が悪い。また、アンキャッシャブル領域622の中には、リードするだけで保持していたデータの値が変わってしまうようなリードセンシティブな領域がある。アンキャッシャブル領域622に保持されるデータをバーストリードした場合、リードセンシティブな領域にまでアクセスしてしまい、データを書き換えてしまうという不具合が生じる。
 さらに、キャッシャブル領域621に対するリード要求があった場合は、上述のように、バーストリードされたデータは、キャッシュメモリ611に格納されるが、これにより、キャッシュメモリ611の内容が書き換えられてしまう。これにより、本来、メモリアクセスを高速化するためにキャッシュメモリ611に格納していたデータが消えてしまうため、メモリアクセスの高速化が達成されなくなる。
 そこで、本発明は、上記課題を解決するためになされたものであって、データの書き換えによる不具合などを生じさせることなくバーストリードを行うことで、メモリアクセスを高速化するバッファメモリ装置、メモリシステム及びデータ読出方法を提供することを目的とする。
 上記課題を解決するために、本発明のバッファメモリ装置は、プロセッサからのリード要求に応じて、キャッシャブル属性とアンキャッシャブル属性とのいずれかに属する複数の領域からなるメインメモリ又は周辺デバイスからデータを読み出すバッファメモリ装置であって、前記リード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得部と、前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されることを示す第1属性であるか否かを判定する属性判定部と、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードするデータ読出部と、前記データ読出部によってバーストリードされたデータを保持する第1バッファメモリとを備える。
 これにより、メインメモリ又は周辺デバイスのアドレスが示す領域の属性を判定することで、アンキャッシャブル領域の中のバースト転送すべきデータを保持する領域からデータをバーストリードするので、メインメモリ又は周辺デバイスの他の領域のデータの想定外の書き換えなどが発生してしまうことを防ぐことができる。さらに、バーストリードしたデータをバッファメモリに予め保持させておくことができるので、メモリアクセスの高速化を達成することができる。さらに、キャッシュメモリとは異なるバッファメモリにバーストリードしたデータを格納することで、キャッシュメモリを使用することなく、データを保持することができる領域を多くすることができる。
 また、前記属性判定部は、前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されないことを示す第2属性であるか、前記第1属性であるかを判定し、前記データ読出部は、さらに、前記属性判定部によって、前記属性取得部によって取得された属性が前記第2属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータのみを読み出してもよい。
 これにより、バーストリードすべきでない領域からデータをバーストリードしてしまうことを防ぐことができるので、想定外のデータの書き換えなどが発生してしまうことを防ぐことができる。
 また、前記バッファメモリ装置は、さらに、前記メインメモリ又は前記周辺デバイスのアドレスと、当該アドレスが示す領域の属性が、前記第1属性、前記第2属性、及び、前記キャッシャブル属性であることを示す第3属性のいずれであるかを示す属性情報とを対応付けたテーブルを保持するテーブル保持部を備え、前記属性取得部は、前記テーブル保持部に保持されたテーブルを参照することで、前記リードアドレスが示す領域の属性を取得してもよい。
 これにより、メインメモリ又は周辺デバイスのアドレスが示す領域と、属性との関係を容易に管理することができ、テーブルを参照するだけで属性を取得することができるので、本発明のバッファメモリ装置の構成を簡単化することができる。
 また、前記バッファメモリ装置は、さらに、キャッシュメモリを備え、前記属性判定部は、前記属性取得部によって取得された属性が、前記第1属性、前記第2属性、及び、前記第3属性のいずれであるかを判定し、前記データ読出部は、さらに、前記属性判定部によって、前記属性取得部によって取得された属性が前記第3属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードし、前記キャッシュメモリは、前記データ読出部によってバーストリードされたデータのうち、前記リードアドレスが示す領域に保持されているデータを含む第1データを保持し、前記第1バッファメモリは、前記データ読出部によってバーストリードされたデータのうち、前記第1データを除く第2データを保持してもよい。
 これにより、本来キャッシュメモリのみを利用していた場合に、さらに、バッファメモリにも予めデータを保持させておくことができるので、メモリアクセスをさらに高速化することができる。
 また、前記バッファメモリ装置は、さらに、前記メインメモリ又は前記周辺デバイスのアドレスと、当該アドレスが示す領域の属性を、前記第1属性、前記第2属性、及び、前記第3属性のいずれかに設定することで前記テーブルを生成する属性設定部を備え、前記テーブル保持部は、前記属性設定部によって生成されたテーブルを保持してもよい。
 これにより、必要に応じて属性を変更することなどもできる。
 また、前記データ読出部は、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、さらに、前記リードアドレスが示す領域に保持されているデータが前記第1バッファメモリに既に保持されているか否かを判断し、当該データが前記第1バッファメモリに既に保持されている場合、前記第1バッファメモリから当該データを読み出し、当該データが前記第1バッファメモリに保持されていない場合、当該データを含むデータをバーストリードしてもよい。
 これにより、バッファメモリをキャッシュメモリと同じように動作させることができ、メモリアクセスを高速化することができる。
 また、前記属性取得部は、さらに、前記プロセッサからのライト要求に含まれるライトアドレスが示す領域の属性を取得し、前記バッファメモリ装置は、さらに、前記属性判定部によって、前記属性取得部によって取得された属性のうち、前記ライトアドレスが示す領域の属性が前記第1属性である場合に、前記メインメモリ又は前記周辺デバイスに書き込むための前記ライト要求に対応するライトデータを保持する第2バッファメモリと、前記プロセッサからの前記リード要求又は前記ライト要求であるメモリアクセス要求の性質を示すメモリアクセス情報を取得するメモリアクセス情報取得部と、前記メモリアクセス情報取得部によって取得されたメモリアクセス情報が示す性質、又は、前記属性取得部によって取得された属性が、予め定められた条件を満たすか否かを判定する条件判定部と、前記メモリアクセス情報が示す性質が前記条件を満たすと前記条件判定部によって判定された場合、前記第2バッファメモリに保持されたライトデータを前記メインメモリ又は前記周辺デバイスに掃き出す制御部とを備えてもよい。
 これにより、バッファメモリを利用することで、データの書き込み時にデータをマージし、マージしたデータをメインメモリ又は周辺デバイスにバーストライトすることができ、データの転送効率を向上させることができる。
 また、前記メモリアクセス情報取得部は、前記メモリアクセス情報として、前記メモリアクセス要求を発行した論理プロセッサ及び物理プロセッサを示すプロセッサ情報を取得し、前記条件判定部は、前記プロセッサ情報が示す物理プロセッサとは異なる物理プロセッサで、かつ、前記プロセッサ情報が示す論理プロセッサと同じ論理プロセッサで以前に発行されたライト要求に対応するライトデータが前記第2バッファメモリに保持されている場合に、前記条件を満たすと判定し、前記制御部は、前記条件を満たすと前記条件判定部によって判定された場合、前記条件を満たす第2バッファメモリに保持されているデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、以前に発行されているライト要求に対応するデータをメインメモリ又は周辺デバイスに書き込むことで、データのコヒーレンシを保つことができる。なぜなら、メモリアクセス要求が、同じ論理プロセッサであるが、異なる物理プロセッサで発行された場合、異なるバッファメモリに同じ論理プロセッサから出力されたデータを保持してしまう恐れがあるが、この場合、各バッファメモリ間でのデータのコヒーレンシが保てなくなるためである。バッファメモリに保持されていたデータをメインメモリ又は周辺デバイスに掃き出すことで、バッファメモリ間でのデータのコヒーレンシの問題を無くすことができる。
 また、前記条件判定部は、前記メモリアクセス情報に、前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出すためのコマンド情報が含まれているか否かを判定し、前記制御部は、前記メモリアクセス情報に前記コマンド情報が含まれていると前記条件判定部によって判定された場合、前記コマンド情報が示す第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、プロセッサからの指示に基づいて、容易にバッファメモリに保持されているデータをメインメモリ又は周辺デバイスに掃き出すことができ、メインメモリ又は周辺デバイスのデータを最新のデータに更新することができる。
 また、前記メモリアクセス情報取得部は、さらに、前記メモリアクセス情報として、前記メモリアクセス要求を発行したプロセッサを示すプロセッサ情報を取得し、前記条件判定部は、さらに、前記属性情報が示す属性が、前記第1属性であるか否かを判定し、前記制御部は、さらに、前記属性取得部によって取得された属性が前記第1属性であると前記条件判定部によって判定された場合、前記プロセッサ情報が示すプロセッサに対応する第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、プロセッサが発行したライト要求の順序を保つことができる。よって、データのコヒーレンシを保つことができる。
 また、前記第2バッファメモリは、さらに、前記ライトデータに対応するライトアドレスを保持し、前記メモリアクセス情報取得部は、さらに、前記メモリアクセス要求がリード要求を含む場合に、前記メモリアクセス情報として、当該リード要求に含まれるリードアドレスを取得し、前記条件判定部は、前記リードアドレスに一致するライトアドレスが前記第2バッファメモリに保持されているか否かを判定し、前記制御部は、前記リードアドレスに一致するライトアドレスが前記第2バッファメモリに保持されていると前記条件判定部によって判定された場合、前記ライトアドレスに対応するライトデータ以前に前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、常に、リードアドレスが示す領域からデータを読み出す前に、当該領域のデータを最新のデータに更新することができるので、古いデータをプロセッサが読み出してしまうことを防ぐことができる。
 また、前記メモリアクセス情報取得部は、さらに、前記メモリアクセス要求がライト要求を含む場合に、当該ライト要求に含まれる第1ライトアドレスを取得し、前記条件判定部は、前記第1ライトアドレスが、直前に入力されたライト要求に含まれる第2ライトアドレスに連続するか否かを判定し、前記制御部は、前記第1ライトアドレスと前記第2ライトアドレスとが連続すると前記条件判定部によって判定された場合、前記第2ライトアドレスに対応するライトデータ以前に前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、通常、プロセッサは一連の処理を行う場合は、連続するアドレスが示す連続領域へアクセスすることが多いので、アドレスが連続しない場合には当該一連の処理とは異なる処理が始まったと推定することができる。このため、当該一連の処理に関わるデータをメインメモリ又は周辺デバイスに掃き出す。これにより、バッファメモリに他の処理に関わるデータを保持させることができ、バッファメモリを効率良く利用することができる。
 また、前記条件判定部は、さらに、前記第2バッファメモリに保持されているデータのデータ量が所定の閾値に達したか否かを判定し、前記制御部は、さらに、前記データ量が前記閾値に達したと前記条件判定部によって判定された場合、前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出してもよい。
 これにより、バッファメモリに保持されているデータ量が適当な量になった場合に、データを掃き出すことができる。例えば、データ量が、バッファメモリに保持できるデータの最大値、又は、バッファメモリとメインメモリ又は周辺デバイスとのデータバス幅に一致したときに、データを掃き出すことができる。
 また、前記バッファメモリ装置は、さらに、前記プロセッサからのライト要求に含まれるライトアドレスが、前記第1バッファメモリに保持されているデータに対応するアドレスと一致するか否かを判断し、前記ライトアドレスが一致する場合、前記第1バッファメモリに保持されているデータを無効化する無効化部を備えてもよい。
 これにより、バッファメモリに保持されたデータと、メインメモリ又は周辺デバイスに保持された対応するデータとが一致していない場合に、プロセッサがバッファメモリからデータを読み出すことを防ぐことができる。
 また、本発明は、メモリシステムとしても実現することができ、本発明のメモリシステムは、プロセッサと、キャッシャブル属性及びアンキャッシャブル属性のいずれかに属する複数の領域からなるメインメモリ又は周辺デバイスとを備え、前記プロセッサからのリード要求に応じて、前記メインメモリ又は前記周辺デバイスからデータを読み出すメモリシステムであって、前記プロセッサからのリード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得部と、前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されることを示す第1属性であるか否かを判定する属性判定部と、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードするデータ読出部と、前記データ読出部によってバーストリードされたデータを保持するバッファメモリとを備え、前記データ読出部は、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、さらに、前記リードアドレスが示す領域に保持されているデータが前記バッファメモリに既に保持されているか否かを判断し、当該データが前記バッファメモリに既に保持されている場合、前記バッファメモリから当該データを読み出し、当該データが前記バッファメモリに保持されていない場合、当該データを含むデータをバーストリードする。
 また、前記メモリシステムは、さらに、複数のキャッシュを備え、前記複数のキャッシュのうち、前記メインメモリ又は前記周辺デバイスに最も近いキャッシュは、前記バッファメモリを備えてもよい。
 なお、本発明は、バッファメモリ装置及びメモリシステムとして実現できるだけではなく、当該メモリシステムを構成する処理部をステップとする方法として実現することもできる。また、これらステップをコンピュータに実行させるプログラムとして実現してもよい。さらに、当該プログラムを記録したコンピュータ読み取り可能なCD-ROM(Compact Disc-Read Only Memory)などの記録媒体、並びに、当該プログラムを示す情報、データ又は信号として実現してもよい。そして、それらプログラム、情報、データ及び信号は、インターネットなどの通信ネットワークを介して配信してもよい。
 本発明のバッファメモリ装置、メモリシステム及びデータ読出方法によれば、データの書き換えによる不具合などを生じさせることとなくバーストリードを行うことで、メモリアクセスを高速化することができる。
図1は、実施の形態1のプロセッサ、メインメモリ及びキャッシュメモリを含むシステムの概略構成を示すブロック図である。 図2は、実施の形態1のアドレス空間に設定された属性を示す図である。 図3は、実施の形態1のバッファメモリ装置の構成を示すブロック図である。 図4は、実施の形態1の領域属性テーブルの一例を示す図である。 図5は、実施の形態1のバッファメモリとキャッシュメモリとの詳細を示す図である。 図6は、実施の形態1のバッファメモリ装置の動作を示すフローチャートである。 図7は、実施の形態1において、属性がバースト可属性である場合の転送処理の詳細を示すフローチャートである。 図8は、実施の形態1において、属性がバースト不可属性である場合の転送処理の詳細を示すフローチャートである。 図9は、実施の形態1において、属性がキャッシャブル属性である場合の転送処理の詳細を示すフローチャートである。 図10は、実施の形態2のバッファメモリ装置の構成を示すブロック図である。 図11は、実施の形態2において、属性がキャッシャブル属性である場合の転送処理の詳細を示すフローチャートである。 図12は、実施の形態3のメモリシステムの構成を示すブロック図である。 図13は、実施の形態3のアドレス変換テーブルの一例を示す図である。 図14は、実施の形態4のバッファメモリ装置の構成を示すブロック図である。 図15は、実施の形態4のメモリアクセス情報の一例を示す図である。 図16は、実施の形態4のバッファメモリ装置が備えるバッファメモリの概略を示す図である。 図17は、実施の形態4の複数の判定条件の一例を示す判定テーブルを示す図である。 図18は、実施の形態4の判定部の詳細な構成を示すブロック図である。 図19は、実施の形態4のバッファメモリ装置の動作を示すフローチャートである。 図20は、実施の形態4のバッファメモリ装置の書き込み処理を示すフローチャートである。 図21は、実施の形態4のバッファメモリ装置の属性判定処理を示すフローチャートである。 図22は、実施の形態4のバッファメモリ装置のコマンド判定処理を示すフローチャートである。 図23は、実施の形態4のバッファメモリ装置のリードアドレス判定処理を示すフローチャートである。 図24は、実施の形態4のバッファメモリ装置のライトアドレス判定処理を示すフローチャートである。 図25は、実施の形態4のバッファメモリ装置のバッファ量判定処理を示すフローチャートである。 図26は、実施の形態4のバッファメモリ装置のプロセッサ判定処理を示すフローチャートである。 図27は、従来のメモリアクセス方法の概略を示す図である。
 以下では、本発明について、実施の形態に基づいて、図面を用いて詳細に説明する。
 (実施の形態1)
 まず、本実施の形態のバッファメモリ装置が備えられる一般的なメモリシステムについて説明する。
 図1は、本実施の形態のプロセッサ、メインメモリ及びキャッシュメモリを含むシステムの概略構成を示すブロック図である。同図に示すように、本実施の形態のシステムは、プロセッサ10と、メインメモリ20と、L1(レベル1)キャッシュ30と、L2(レベル2)キャッシュ40とを備える。
 本実施の形態のバッファメモリ装置は、図1に示すようなシステムにおいて、例えば、プロセッサ10とメインメモリ20との間に備えられる。具体的には、バッファメモリ装置が備えるバッファメモリは、L2キャッシュ40に備えられる。
 プロセッサ10は、メインメモリ20にメモリアクセス要求を出力する。メモリアクセス要求は、例えば、データを読み出すためのリード要求、又は、データを書き込むためのライト要求である。リード要求は、データの読み出し先の領域を示すリードアドレスを含んでおり、ライト要求は、データの書き込み先の領域を示すライトアドレスを含んでいる。
 メインメモリ20は、キャッシャブル属性とアンキャッシャブル属性とのいずれかに属する複数の領域からなり、当該領域にプログラム又はデータなどを記憶するSDRAM(Synchronous Dynamic Random Access Memory)などの大容量のメインメモリである。プロセッサ10から出力されるメモリアクセス要求(リード要求又はライト要求)に応じて、メインメモリ20からのデータの読み出し、又は、メインメモリ20へデータの書き込みが実行される。
 L1キャッシュ30とL2キャッシュ40とは、プロセッサ10がメインメモリ20から読み出したデータの一部、及び、メインメモリ20に書き込むデータの一部を記憶するSRAMなどのキャッシュメモリである。L1キャッシュ30とL2キャッシュ40とは、メインメモリ20に比べて、容量は小さいが、高速で動作可能なキャッシュメモリである。また、L1キャッシュ30は、L2キャッシュ40よりプロセッサ10の近くに配置される優先度の高いキャッシュメモリであり、通常、L2キャッシュ40よりも小容量であるが高速で動作可能である。
 L1キャッシュ30は、プロセッサ10から出力されるメモリアクセス要求を取得し、取得したメモリアクセス要求に含まれるアドレスに対応するデータを既に格納しているか(ヒット)格納していないか(ミス)を判定する。例えば、リード要求がヒットした場合、L1キャッシュ30は、当該リード要求に含まれるリードアドレスに対応するデータをL1キャッシュ30内部から読み出し、読み出したデータをプロセッサ10に出力する。なお、リードアドレスに対応するデータとは、リードアドレスが示す領域に記憶されているデータである。ライト要求がヒットした場合、L1キャッシュ30は、当該ライト要求と同時にプロセッサ10から出力されるデータを、L1キャッシュ30内部に書き込む。
 リード要求がミスした場合、L1キャッシュ30は、L2キャッシュ40又はメインメモリ20から当該リード要求に対応するデータを読み出し、読み出したデータをプロセッサ10に出力する。ライト要求がミスした場合、L1キャッシュ30は、リフィル処理を行い、タグアドレスを更新し、当該ライト要求と同時にプロセッサ10から出力されるデータを書き込む。
 L2キャッシュ40は、プロセッサ10から出力されるメモリアクセス要求を取得し、取得したメモリアクセス要求がヒットしたかミスしたかを判定する。リード要求がヒットした場合、L2キャッシュ40は、当該リード要求に含まれるリードアドレスに対応するデータをL2キャッシュ40内部から読み出し、L1キャッシュ30を介して、読み出したデータをプロセッサ10に出力する。ライト要求がヒットした場合、L1キャッシュ30を介して、当該ライト要求と同時にプロセッサ10から出力されるデータをL2キャッシュ40内部に書き込む。
 リード要求がミスした場合、L2キャッシュ40は、メインメモリ20から当該リード要求に対応するデータを読み出し、L1キャッシュ30を介して、読み出したデータをプロセッサ10に出力する。ライト要求がミスした場合、L2キャッシュ40は、リフィル処理を行い、L1キャッシュ30を介して、タグアドレスを更新し、当該ライト要求と同時にプロセッサ10から出力されるデータを書き込む。
 なお、図1に示すシステムでは、メインメモリ20と、L1キャッシュ30と、L2キャッシュ40とのコヒーレンシを持たせるための処理が行われている。例えば、ライト要求に従ってキャッシュメモリに書き込まれたデータは、ライトスルー処理又はライトバック処理によって、メインメモリ20に書き込まれる。
 また、ライト要求がミスした場合、プロセッサ10は、L1キャッシュ30をリフィル及び更新することなく、メインメモリ20にデータを書き込んでもよい。L2キャッシュ40についても同様である。
 なお、図1では、L1キャッシュ30がプロセッサ10の外部に備えられる構成を示したが、プロセッサ10が、L1キャッシュ30を備えてもよい。
 また、メインメモリ20に限らず、IOデバイスなどのその他の周辺デバイスとの間でデータを転送してもよい。周辺デバイスとは、プロセッサ10との間でデータの転送を行う機器であり、例えば、キーボード、マウス、ディスプレイ、又は、フロッピー(登録商標)ディスクドライブなどである。
 次に、本実施の形態のメインメモリ20について説明する。
 図2は、本実施の形態のアドレス空間に設定された属性を示す図である。アドレス空間の領域は、メインメモリ20、及び、その他の周辺デバイスなどに割り当てられる。同図に示すように、メインメモリ20は、キャッシャブル領域21とアンキャッシャブル領域22とから構成される。
 キャッシャブル領域21は、L1キャッシュ30及びL2キャッシュ40などのキャッシュメモリにキャッシュすべきデータを保持することができることを示すキャッシャブル属性に属する領域である。
 アンキャッシャブル領域22は、L1キャッシュ30及びL2キャッシュ40などのキャッシュメモリにキャッシュすべきでないデータを保持することができることを示すアンキャッシャブル属性に属する領域である。アンキャッシャブル領域22は、バースト可領域23とバースト不可領域24とから構成される。
 バースト可領域23は、キャッシュメモリにキャッシュすべきでなく、かつ、バースト転送すべきデータを保持することができることを示すバースト可属性に属する領域である。バースト転送は、データを一括して転送することであり、バーストリード及びバーストライトなどである。バースト可領域23は、例えば、リードセンシティブでない領域である。
 バースト不可領域24は、キャッシュメモリにキャッシュすべきでなく、かつ、バースト転送すべきデータを保持することができないことを示すバースト不可属性に属する領域である。バースト不可領域24は、例えば、リードセンシティブな領域である。
 以上のように、本実施の形態のメインメモリ20には、領域ごとに、3つの排他的な属性のいずれか1つが設定されている。
 続いて、本実施の形態のバッファメモリ装置の構成について説明する。
 図3は、本実施の形態のバッファメモリ装置の構成を示すブロック図である。同図のバッファメモリ装置100は、図1に示すL2キャッシュ40と同一のチップに備えられるとし、プロセッサ10とメインメモリ20との間でデータの転送処理を実行する。なお、図3では、プロセッサ10がL1キャッシュ30を備えるものとし、L1キャッシュ30は図示していない。
 図3に示すように、バッファメモリ装置100は、属性取得部110と、属性判定部120と、データ読出部130と、バッファメモリ140と、キャッシュメモリ150と、テーブル保持部160と、属性設定部170とを備える。バッファメモリ装置100は、プロセッサ10から出力されるリード要求に対応するデータを、メインメモリ20、バッファメモリ140又はキャッシュメモリ150から読み出し、読み出したデータをプロセッサ10に転送する。
 属性取得部110は、リード要求に含まれるアドレス(以下、リードアドレスとも記載する)が示す領域の属性を取得する。具体的には、属性取得部110は、テーブル保持部160に保持される領域属性テーブル161を参照することで、リードアドレスが示す領域の属性を取得する。
 ここで、領域の属性には、上述のようにキャッシャブル属性、バースト可属性、及び、バースト不可属性の3つの属性がある。キャッシャブル属性は、領域がキャッシャブル領域21に属することを示す。バースト可属性は、領域がアンキャッシャブル領域22のバースト可領域23に属することを示す。バースト不可属性は、領域がアンキャッシャブル領域22のバースト不可領域24に属することを示す。
 属性判定部120は、属性取得部110で取得された属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する。
 データ読出部130は、属性判定部120の判定結果に応じて、メインメモリ20、バッファメモリ140又はキャッシュメモリ150から、リード要求に対応するデータを読み出す。ここでは、データ読出部130は、第1データ読出部131と、第2データ読出部132と、第3データ読出部133とを備える。
 第1データ読出部131は、属性判定部120によって、リード要求に含まれるアドレスが示す領域の属性がバースト可属性であると判定された場合に、リードアドレスが示す領域に保持されているデータの読み出しを実行する。さらに、第1データ読出部131は、リード要求がヒットしたかミスしたかを判定する。
 リード要求がヒットした場合、第1データ読出部131は、バッファメモリ140から、リードアドレスに対応するデータ(以下、リードデータとも記載する)を読み出し、読み出したデータをプロセッサ10に出力する。リード要求がミスした場合、第1データ読出部131は、メインメモリ20から、リードデータを含むデータをバーストリードし、バーストリードしたデータ(以下、バーストリードデータとも記載する)をバッファメモリ140に格納する。そして、格納したバーストリードデータのうち、リードデータのみをプロセッサ10に出力する。なお、バーストリードデータのバッファメモリ140への格納と、リードデータのプロセッサ10への出力とは、並列して実行されてもよい。
 ここで、バーストリードデータは、例えば、リードデータと、当該リードデータと共に使用される可能性の高いデータとである。一般的には、リードアドレスに連続するアドレスに対応するデータなどである。なお、リードデータ及びバーストリードデータのサイズは、プロセッサ10、メインメモリ20及びバッファメモリ装置100などの間のデータバス幅、バッファメモリ140のメモリサイズ、又は、プロセッサ10からの指示などに基づいて決定される。ここでは、一例として、リードデータのサイズは4バイトとし、バーストリードデータのサイズは64バイトとする。
 なお、本実施の形態では、キャッシュメモリの場合と同様に、リードアドレスに対応するデータがバッファメモリ140に既に保持されている場合を“リード要求がヒットした”、リードアドレスに対応するデータがバッファメモリ140に保持されていない場合を“リード要求がミスした”という。
 第2データ読出部132は、属性判定部120によって、リード要求に含まれるアドレスが示す領域の属性がバースト不可属性であると判定された場合に、データの読み出しを実行する。具体的には、第2データ読出部132は、リードアドレスに対応するデータ(リードデータ)のみを、メインメモリ20から読み出し、読み出したリードデータをプロセッサ10に出力する。
 第3データ読出部133は、属性判定部120によって、リード要求に含まれるアドレスが示す領域の属性がキャッシャブル属性であると判定された場合に、データの読み出しを実行する。さらに、第3データ読出部133は、リード要求がヒットしたかミスしたかを判定する。
 具体的には、リード要求がヒットした場合、第3データ読出部133は、キャッシュメモリ150から、リードアドレスに対応するデータ(リードデータ)を読み出し、読み出したリードデータをプロセッサ10に出力する。リード要求がミスした場合、第3データ読出部133は、メインメモリ20からリードデータを読み出し、読み出したリードデータをキャッシュメモリ150に格納する。そして、格納したリードデータをプロセッサ10に転送する。なお、メインメモリ20から読み出したリードデータのキャッシュメモリ150への格納と、プロセッサ10への出力とは、並列して実行されてもよい。
 バッファメモリ140は、第1データ読出部131によって、メインメモリ20からバーストリードされたデータ(バーストリードデータ)を保持するメモリなどの記憶部である。バッファメモリ140は、バーストリードデータと、各データに対応するアドレスとを対応付けて記憶する。
 キャッシュメモリ150は、第3データ読出部133によって、メインメモリ20から読み出されたデータを保持するキャッシュメモリである。キャッシュメモリ150は、アドレスを記憶するタグ領域と、データを記憶するデータ領域とを含む。本実施の形態では、キャッシュメモリ150は、図1のL2キャッシュ40に相当する。
 テーブル保持部160は、メインメモリのアドレスと、領域の属性とを対応付けた領域属性テーブル161を保持するメモリなどの記憶部である。領域属性テーブル161は、属性設定部170によって生成及び変更される。
 ここで、図4を参照する。図4は、本実施の形態の領域属性テーブル161の一例を示す図である。同図に示すように、領域属性テーブル161は、メインメモリ20の物理アドレスと、当該物理アドレスが示す領域の属性とを対応付けたテーブルである。同図の“キャッシャブル”は、キャッシャブル属性を示し、“バースト可”は、バースト可属性を示し、“バースト不可”は、バースト不可属性を示す。例えば、図4の例では、リードアドレスが“物理アドレス3”である場合、属性取得部110は、領域属性テーブル161を参照することで、当該リードアドレスが示す領域の属性として、バースト不可属性を取得する。
 図3に戻ると、属性設定部170は、メインメモリ20のアドレスに対応する属性を、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれか1つに設定する。これらの属性は、プロセッサ10からの指示に基づいて、メインメモリ20に記憶されているデータの特性などに応じて設定される。
 例えば、属性設定部170は、アンキャッシャブル領域のうちリードセンシティブな領域をバースト不可属性に設定する。または、属性設定部170は、データの利用可能性に応じて各アドレスに属性を設定する。具体的には、属性設定部170は、連続的に読み出され、かつ、何度も利用される可能性が高いデータを記憶している領域を示すアドレスには、キャッシャブル属性を設定する。連続的に読み出されるが、一度しか利用されない可能性が高いデータを記憶している領域を示すアドレスには、バースト可属性を設定する。その他のデータを記憶している領域を示すアドレスには、バースト不可属性を設定する。また、データを記憶していない領域を示すアドレスには、任意に、又は、必要に応じて、それぞれの属性を設定する。
 ここで、本実施の形態のバッファメモリ140とキャッシュメモリ150との構成について説明する。図5は、本実施の形態のバッファメモリ140とキャッシュメモリ150との詳細を示す図である。
 同図に示すように、バッファメモリ140は、メインメモリ20のアドレス(物理アドレス)と、当該アドレスが示す領域から第1データ読出部131によって読み出されたデータとを対応付けて記憶する。バッファメモリ140は、所定バイト数(例えば64バイト)のデータを複数個(例えば、8個)保持することができる。なお、本実施の形態では、バッファメモリ140は、メインメモリ20からのデータの読み出しにのみ利用される。すなわち、メインメモリ20へのデータの書き込みには利用されない。バッファメモリ140は、読み出される可能性が高いデータを予め保持しておくPFB(Prefetch Buffer)である。
 キャッシュメモリ150は、例えば、同図に示すような4ウェイ・セット・アソシエイティブ方式のキャッシュメモリである。キャッシュメモリ150は、同じ構成を有する4つのウェイを有し、各ウェイは、複数個(例えば、1024個)のキャッシュエントリを有する。1つのキャッシュエントリは、バリッドフラグVと、タグと、ラインデータと、ダーティフラグDとを有する。
 バリッドフラグVは、当該キャッシュエントリのデータが有効であるか否かを示すフラグである。タグは、タグアドレスのコピーである。ラインデータは、タグアドレス及びセットインデックスにより特定されるブロック中の所定バイト数のデータ(例えば、64バイトのデータ)のコピーである。ダーティフラグDは、キャッシュされたデータをメインメモリに書き戻す必要があるか否かを示すフラグである。
 以上に示すように、本実施の形態のバッファメモリ140は、キャッシュメモリのタグとデータとの関係と同じように、アドレスとデータとを対応付けて記憶する。
 なお、キャッシュメモリ150が有するウェイの数は4個に限らない。1つのウェイが有するキャッシュエントリの個数、及び、1つのキャッシュエントリが有するラインデータのバイト数もいかなる値でもよい。また、キャッシュメモリ150は、他の方式のキャッシュメモリでもよい。例えば、ダイレクト・マップ方式、又は、フル・アソシエイティブ方式でもよい。
 以上の構成に示すように、本実施の形態のバッファメモリ装置100は、キャッシャブル領域21とアンキャッシャブル領域22とからなるメインメモリ20のアンキャッシャブル領域22のうち、バーストリードすべきデータを保持するバースト不可領域24からバーストリードされたデータを保持するバッファメモリ140を備える。
 これにより、リード要求に応じて、当該リード要求に対応するデータと、その後に読み出される可能性の高いデータとをバーストリードするので、メモリアクセスを高速化することができる。
 なお、図3に示すバッファメモリ装置100は、ライト要求に対応するライトデータの書き込み処理を行う処理部をも備えるものとする。
 例えば、属性取得部110は、リード要求と同様にライト要求に含まれるライトアドレスが示す領域の属性を取得する。属性判定部120は、属性取得部110で取得された属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する。そして、データ書込部(図示せず)が、判定結果に基づいて、キャッシュメモリ150、又は、メインメモリ20へライトデータを書き込む。
 具体的には、属性がキャッシャブル属性である場合に、キャッシュメモリ150へライトデータを書き込む。また、属性がアンキャッシャブル属性である場合に、メインメモリ20へライトデータを書き込む。このとき、キャッシュメモリ150への書き込みの際には、ライト要求がヒットするかミスするかを判定し、ヒットした場合にキャッシュメモリ150へライトデータを書き込み、ミスした場合にはメインメモリ20へライトデータを書き込む。
 以上のように、本実施の形態のバッファメモリ装置100は、プロセッサ10からのライト要求に応じて、ライトデータの書き込みも行うことができる。
 なお、このとき、データ読出部130は、ライトアドレスがバッファメモリ140に保持されているデータに対応するアドレスと一致するか否かを判断し、ライトアドレスが一致する場合、バッファメモリ140に保持されているデータを無効化してもよい。例えば、対応するデータに無効であることを示すフラグを立てることで、又は、対応するデータをバッファメモリ140から消去することで、データを無効化する。
 これにより、メインメモリ20とバッファメモリ140との間でデータのコヒーレンシを確保することができる。すなわち、最新のデータがメインメモリ20にのみ書き込まれていて、バッファメモリ140に書き込まれたデータが古くなった場合に、バッファメモリ140から古いデータを読み出すことを防ぐことができる。
 次に、本実施の形態のバッファメモリ装置100の動作について図6~図9を用いて説明する。図6は、本実施の形態のバッファメモリ装置100の動作を示すフローチャートである。
 まず、バッファメモリ装置100は、プロセッサ10からリード要求を取得することで、本実施の形態のリード処理を実行する。
 属性取得部110は、領域属性テーブル161を参照することで、リードアドレスが示す領域の属性を取得する(S101)。そして、属性判定部120は、属性取得部110によって取得された属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する(S102)。
 リードアドレスが示す領域の属性が、バースト可属性であると判定された場合(S102で“アンキャッシャブル(バースト可)”)、第1データ読出部131は、第1転送処理を実行する(S103)。第1転送処理は、属性がバースト可属性である場合に実行される処理であり、プロセッサ10にデータを転送する際に、メインメモリ20からデータをバーストリードし、バーストリードしたデータをバッファメモリ140に格納する処理である。
 ここで、図7を参照する。図7は、本実施の形態において、属性がバースト可属性である場合の転送処理の詳細を示すフローチャートである。
 第1データ読出部131は、リード要求がヒットしたかミスしたかを判断する(S201)。リード要求がミスした場合(S201でNo)、第1データ読出部131は、メインメモリ20から、リードデータを含むバーストリードデータをバーストリードする(S202)。そして、第1データ読出部131は、読み出したバーストリードデータをバッファメモリ140に格納する(S203)。さらに、第1データ読出部131は、バッファメモリ140からリードデータを読み出し(S204)、読み出したリードデータをプロセッサ10に出力する(S205)。なお、このとき、バーストリードデータのバッファメモリ140への格納と、リードデータのプロセッサ10への出力とは、同時に実行してもよい。
 リード要求がヒットした場合(S201でYes)、第1データ読出部131は、バッファメモリ140から、リード要求に対応するリードデータを読み出す(S204)。そして、第1データ読出部131は、読み出したリードデータをプロセッサ10に出力する(S205)。
 図6に戻ると、リードアドレスが示す領域の属性が、バースト不可属性であると判定された場合(S102で“アンキャッシャブル(バースト不可)”)、第2データ読出部132は、第2転送処理を実行する(S104)。第2転送処理は、属性がバースト不可属性である場合に実行される処理であり、メインメモリ20からデータを読み出し、読み出したデータをプロセッサ10に転送する処理である。
 ここで、図8を参照する。図8は、本実施の形態において、属性がバースト不可属性である場合の転送処理の詳細を示すフローチャートである。
 第2データ読出部132は、メインメモリ20から、リードデータを読み出す(S301)。そして、第2データ読出部132は、読み出したリードデータをプロセッサ10に出力する(S302)。
 再び図6に戻ると、リードアドレスが示す領域の属性が、キャッシャブル属性であると判定された場合(S102で“キャッシャブル”)、第3データ読出部133は、第3転送処理を実行する(S105)。第3転送処理は、属性がキャッシャブル属性である場合に実行される処理であり、プロセッサ10にデータを転送する際に、メインメモリ20からデータを読み出し、読み出したデータをキャッシュメモリ150に格納する処理である。
 ここで、図9を参照する。図9は、本実施の形態において、属性がキャッシャブル属性である場合の転送処理の詳細を示すフローチャートである。
 第3データ読出部133は、リード要求がヒットしたかミスしたかを判断する(S401)。リード要求がミスした場合(S401でNo)、第3データ読出部133は、メインメモリ20から、リードデータを読み出す(S402)。そして、第3データ読出部133は、読み出したリードデータをキャッシュメモリ150に格納する(S403)。さらに、第3データ読出部133は、キャッシュメモリ150からリードデータを読み出し(S404)、読み出したリードデータをプロセッサ10に出力する(S405)。なお、このとき、リードデータのキャッシュメモリ150への格納と、プロセッサ10への出力とは、同時に実行してもよい。
 リード要求がヒットした場合(S401でYes)、第3データ読出部133は、キャッシュメモリ150から、リード要求に対応するリードデータを読み出す(S404)。そして、第3データ読出部133は、読み出したリードデータをプロセッサ10に出力する(S405)。
 以上のようにして、本実施の形態のバッファメモリ装置100は、リードアドレスが示す領域がいずれの属性の領域であるかを判定し、判定結果に応じてデータの読み出しを実行する。
 以上のように、本実施の形態のバッファメモリ装置100は、キャッシャブル領域21とアンキャッシャブル領域22とからなるメインメモリ20のアンキャッシャブル領域22のうち、バーストリードすべきデータを保持するバースト不可領域24からバーストリードされたデータを保持するバッファメモリ140を備える。そして、リードアドレスが示す領域がいずれの属性の領域であるかを判定し、判定結果に応じてデータの読み出しを実行する。このとき、属性がバースト可属性である場合には、メインメモリ20からバーストリードしたデータをバッファメモリ140に格納する。
 これにより、リード専用のバッファメモリ140を使用することで、キャッシュメモリを使用することを防ぐことができるので、キャッシュメモリには使用頻度の高いと予想されるデータを保持させておくことができる。さらに、メインメモリ20にバーストリードを不可にする領域を設定することで、必要以上のデータを読み出すことで生じる不具合を防ぐことができ、さらに、バーストリードを可能にする領域を設定することで、メモリアクセスを高速化することができる。
 (実施の形態2)
 本実施の形態のバッファメモリ装置は、リード要求に含まれるアドレスが示す領域の属性がキャッシャブル属性である場合に、当該リード要求に対応するデータを含むデータをバーストリードする。これにより、さらに、メモリアクセスを高速化させることができる。
 図10は、本実施の形態のバッファメモリ装置の構成を示すブロック図である。同図に示すバッファメモリ装置200は、図3のバッファメモリ装置100と比べて、データ読出部130の代わりにデータ読出部230を備える点が異なっている。なお、実施の形態1と同じ構成要素については、同じ符号を付し、以下では、異なる点を中心に説明し、同じ点の説明を省略する場合がある。
 データ読出部230は、属性判定部120の判定結果に応じて、メインメモリ20、バッファメモリ140又はキャッシュメモリ150から、リード要求に対応するデータを読み出す。ここでは、データ読出部230は、第1データ読出部131と、第2データ読出部132と、第3データ読出部233とを備える。
 第3データ読出部233は、属性判定部120によって、リード要求に含まれるアドレスに対応する領域の属性がキャッシャブル属性であると判定された場合に、データの読み出しを実行する。さらに、第3データ読出部233は、リード要求がヒットしたかミスしたかを判定する。
 具体的には、リード要求がヒットした場合、第3データ読出部233は、キャッシュメモリ150又はバッファメモリ140から、リードアドレスに対応するデータを読み出し、読み出したデータをプロセッサ10に出力する。リード要求がミスした場合、第3データ読出部233は、メインメモリ20からリードデータを含むデータをバーストリードし、バーストリードされたデータ(バーストリードデータ)をキャッシュメモリ150とバッファメモリ140とに格納する。
 例えば、バーストリードデータのうちリードデータを含むデータをキャッシュメモリ150に格納し、キャッシュメモリ150に保持されたデータを除く、バーストリードデータの残りのデータをバッファメモリ140に格納する。そして、格納したバーストリードデータのうちリードデータをキャッシュメモリ150から読み出し、読み出したリードデータをプロセッサ10に出力する。なお、バーストリードデータのキャッシュメモリ150及びバッファメモリ140への格納と、リードデータのプロセッサ10への出力とは、並列して実行されてもよい。
 例えば、プロセッサ10から64バイトのリードデータのリード要求がされた場合、第3データ読出部233は、当該リードデータを含む128バイトのデータをバーストリードする。そして、第3データ読出部233は、128バイトのバーストリードデータのうち、64バイトの当該リードデータをキャッシュメモリ150に格納するとともに、残りの64バイトのデータをバッファメモリ140に格納する。
 以上の構成に示すように、本実施の形態のバッファメモリ装置200は、リードアドレスが示す領域の属性がキャッシャブル属性であると判定された場合に、当該リードアドレスに対応するデータを含むデータをバーストリードし、バーストリードされたデータをキャッシュメモリ150とバッファメモリ140とに格納する。
 これにより、キャッシュ時にも、リード要求に応じて、当該リード要求に対応するデータと、その後に読み出される可能性の高いデータとをバーストリードするので、メモリアクセスをより高速化することができる。
 続いて、本実施の形態のバッファメモリ装置200の動作について説明する。本実施の形態のバッファメモリ装置200は、実施の形態1のバッファメモリ装置100の動作と比較して、属性がキャッシャブル属性であると判定された場合の処理(図6のS105、図9)が異なる。したがって、以下では、異なる点を中心に説明し、同じ点は説明を省略する場合がある。
 まず、バッファメモリ装置200は、実施の形態1と同様に、プロセッサ10からリード要求を取得することで、本実施の形態のリード処理が実行される。
 図6に示すように、属性取得部110は、領域属性テーブル161を参照することで、リードアドレスが示す領域の属性を取得する(S101)。そして、属性判定部120は、属性取得部110によって取得された属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する(S102)。
 属性判定部120によって、リードアドレスが示す領域の属性がバースト可属性であると判定された場合(S102で“アンキャッシャブル(バースト可)”)、第1転送処理を実行する(S103:詳細は図7)。リードアドレスが示す領域の属性がバースト不可属性であると判定された場合(S102で“アンキャッシャブル(バースト不可)”)、第2転送処理を実行する(S104:詳細は図8)。
 リードアドレスが示す領域の属性が、キャッシャブル属性であると判定された場合(S102で“キャッシャブル”)、第3データ読出部233は、第3転送処理を実行する(S105)。第3転送処理は、属性がキャッシャブル属性である場合に実行される処理であり、プロセッサ10にデータを転送する際に、メインメモリ20からデータを読み出し、読み出したデータをキャッシュメモリ150に格納する処理である。
 ここで、図11を参照する。図11は、本実施の形態において、属性がキャッシャブル属性である場合の転送処理の詳細を示すフローチャートである。
 第3データ読出部233は、リード要求がヒットしたかミスしたかを判断する(S501)。リード要求がミスした場合(S501でNo)、第3データ読出部233は、メインメモリ20から、リードデータ含むデータ(バーストリードデータ)をバーストリードする(S502)。そして、第3データ読出部233は、バーストリードデータをキャッシュメモリ150とバッファメモリ140とに格納する(S503)。さらに、第3データ読出部233は、キャッシュメモリ150からリードデータを読み出し(S504)、読み出したリードデータをプロセッサ10に出力する(S505)。なお、このとき、バーストリードデータのキャッシュメモリ150への格納と、リードデータのプロセッサ10への出力とは、同時に実行してもよい。
 リード要求がヒットした場合(S501でYes)、第3データ読出部233は、キャッシュメモリ150又はバッファメモリ140から、リード要求に対応するリードデータを読み出す(S504)。そして、第3データ読出部233は、読み出したリードデータをプロセッサ10に出力する(S505)。
 以上のように、本実施の形態のバッファメモリ装置200は、リードアドレスが示す領域の属性がキャッシャブル属性であると判定された場合に、当該リードアドレスに対応するデータを含むデータをキャッシュメモリ150とバッファメモリ140とにバーストリードする。
 これにより、プロセッサ10からキャッシャブル領域に対するリード要求が出力された場合にもバッファメモリ140を利用することができる。すなわち、リード要求に対応するデータより多くのデータをバーストリードし、バーストリードされたデータをバッファメモリ140に格納しておくことで、リード時のメモリアクセスを高速化することができる。
 (実施の形態3)
 本実施の形態のメモリシステムは、メインメモリを管理するMMU(Memory Management Unit)、又は、OS(Operating System)がメインメモリの領域の属性を設定する。
 図12は、本実施の形態のメモリシステムの構成を示すブロック図である。同図のメモリシステム300は、プロセッサ310a及び310bと、メインメモリ320と、L2キャッシュ330とを備える。なお、本実施の形態のメモリシステム300は、プロセッサ310aとプロセッサ310bとを含むマルチプロセッサを備えるシステムである。
 プロセッサ310aは、プロセッサ310aは、L1キャッシュ311と、TLB(Translation Lookaside Buffer)312とを備え、メインメモリ320にメモリアクセス要求(リード要求又はライト要求)を出力するCPUなどである。さらに、プロセッサ310aは、内蔵された又は外部に備えられたMMUとOSとを用いて、メインメモリ320の管理を行う。
 具体的には、プロセッサ310aは、メインメモリ320の物理アドレスと論理アドレスとを対応付けたアドレス変換テーブルの管理を行う。さらに、メインメモリ320の物理アドレスが示す領域の属性を設定し、設定した属性と物理アドレスとを対応付けて、アドレス変換テーブルを保持するTLB312に記憶させる。なお、プロセッサ310aは、実施の形態1及び2の属性設定部170に相当する。
 プロセッサ310bは、プロセッサ310aと同じ構成のプロセッサである。なお、プロセッサ310a及び310bは、物理的に異なる2つのプロセッサでもよく、1つのプロセッサをOSにより仮想的に分割された2つの仮想プロセッサでもよい。
 また、L1キャッシュ311とTLB312とは、プロセッサごとに備えられてもよい。または、L1キャッシュ311とTLB312とは、プロセッサ310aとL2キャッシュ330との間に備えられてもよい。
 L1キャッシュ311は、プロセッサ310aが発行するメモリアクセス要求を取得し、取得したメモリアクセス要求(リード要求又はライト要求)がヒットしたかミスしたかを判定する。L1キャッシュ311は、実施の形態1及び2のL1キャッシュ30に相当する。
 リード要求がヒットした場合、L1キャッシュ311は、当該リード要求に含まれるリードアドレスに対応するデータをL1キャッシュ311内部から読み出し、読み出したデータをプロセッサ310aに出力する。ライト要求がヒットした場合、L1キャッシュ311は、当該ライト要求と同時にプロセッサ310aから出力されるデータをL1キャッシュ311内部に書き込む。
 リード要求がミスした場合、L1キャッシュ311は、L2キャッシュ330又はメインメモリ320から当該リード要求に対応するデータを読み出し、読み出したデータをプロセッサ310aに出力する。ライト要求がミスした場合、L1キャッシュ311は、L2キャッシュ330又はメインメモリ320に、当該ライト要求と同時にプロセッサ310aから出力されるデータを書き込む。
 TLB312は、アドレス変換テーブル313を記憶するキャッシュメモリである。なお、TLB312は、実施の形態1及び2のテーブル保持部160に相当する。
 アドレス変換テーブル313は、論理アドレスと物理アドレスと当該物理アドレスが示す領域の属性とを対応付けたテーブルである。なお、アドレス変換テーブル313は、実施の形態1及び2の領域属性テーブル161に相当する。
 ここで、図13を参照する。図13は、本実施の形態のアドレス変換テーブルの一例を示す図である。同図に示すように、アドレス変換テーブル313は、論理アドレスと、物理アドレスと、アクセス許可属性と、メモリ属性とを対応付けたテーブルである。
 論理アドレスは、プロセッサ310aが仮想的に設定したアドレスであり、仮想アドレスともいう。物理アドレスは、メインメモリ320の実際の書き込み又は読み出し領域を示すアドレスであり、実アドレスともいう。アクセス許可属性は、OSなどの管理部のみがアクセス可能な領域であることを示す“特権モード”と、一般的なプログラムなどでもアクセス可能な領域であることを示す“ユーザモード”との2つの属性のいずれであるかを示す。メモリ属性は、領域が、キャッシャブル領域、バースト可領域、及び、バースト不可領域のいずれであるかを示す。
 図13の例では、例えば、“論理アドレスC”は、メインメモリ320内の“物理アドレス3”が示す領域を示し、当該領域は、“ユーザモード”であり、かつ、“バースト不可領域”であることを示している。よって、“論理アドレスC”が示す領域からは、データをバーストリードすることができない。
 図12に戻ると、メインメモリ320は、プログラム又はデータなどを記憶するSDRAMなどの記憶部である。プロセッサ310a及び310bなどから出力されるメモリアクセス要求(リード要求又はライト要求)に応じて、メインメモリ320からのデータの読み出し、又は、メインメモリ320へのデータの書き込みが実行される。メインメモリ320は、実施の形態1及び2のメインメモリ20に相当する。
 L2キャッシュ330は、プロセッサ310a及び310bから出力されるメモリアクセス要求を取得し、取得したメモリアクセス要求がヒットしたかミスしたかを判定する。L2キャッシュ330は、実施の形態1及び2のL2キャッシュ40(キャッシュメモリ150)に相当する。
 なお、以下では、簡単のため、L2キャッシュ330に入力されるメモリアクセス要求は、プロセッサ310aが発行したと仮定する。ただし、メモリアクセス要求は、他のプロセッサ(プロセッサ310bなど)、又は、DMAC(Direct Memory Access Controller)などで発行されたものでもよい。
 リード要求がヒットした場合、L2キャッシュ330は、当該リード要求に含まれるリードアドレスに対応するデータをL2キャッシュ330内部から読み出し、読み出したデータをプロセッサ310aなどに出力する。ライト要求がヒットした場合、L2キャッシュ330は、当該ライト要求と同時にプロセッサ310aから出力されるデータをL2キャッシュ330内部に書き込む。
 リード要求がミスした場合、L1キャッシュ311は、L2キャッシュ330又はメインメモリ320から当該リード要求に対応するデータを読み出し、読み出したデータをプロセッサ310aに出力する。ライト要求がミスした場合、L1キャッシュ311は、L2キャッシュ330又はメインメモリ320に、当該ライト要求と同時にプロセッサ310aから出力されるデータを書き込む。
 L2キャッシュ330は、キュー331a及び331bと、属性判定部332a及び332bと、セレクタ333a及び333bと、PFB334と、キャッシュメモリ335と、メモリインタフェース336とを備える。
 キュー331aは、プロセッサ310aから出力されるメモリアクセス要求を一時的に保持する先入れ先出し方式のメモリ(FIFOメモリ:First In First Out)である。なお、保持されるメモリアクセス要求には、アドレスと共に、当該アドレスが示す領域の属性も含まれている。
 キュー331bは、キュー331aと同じ構成であり、プロセッサ310bから出力されるメモリアクセス要求を一時的に保持するFIFOメモリである。
 なお、キュー331a及び331bは、実施の形態1及び2の属性取得部110に相当する。
 属性判定部332aは、キュー331aに保持されたメモリアクセス要求を読み出し、読み出したメモリアクセス要求に含まれる属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する。そして、判定結果に従って、属性判定部332aは、セレクタ333a又は333bとメモリインタフェース336とを介して、PFB334とキャッシュメモリ335とに、又は、メモリインタフェース336にメモリアクセス要求を出力する。
 具体的には、属性がキャッシャブル属性又はバースト可属性であると判定された場合、属性判定部332aは、セレクタ333aとメモリインタフェース336とを介して、PFB334とキャッシュメモリ335とにメモリアクセス要求を出力する。属性がバースト不可属性であると判定された場合、属性判定部332aは、セレクタ333bとメモリインタフェース336とを介して、メインメモリ320にメモリアクセス要求を出力する。
 属性判定部332bは、属性判定部332aと同じ構成であり、キュー331bに保持されたメモリアクセス要求を読み出し、読み出したメモリアクセス要求に含まれる属性を判定する。
 なお、属性判定部332a及び332bは、実施の形態1及び2の属性判定部120に相当する。
 セレクタ333a及び333bは、2つのキュー331a及び331bから、属性判定部332a又は332bを介して入力される複数のメモリアクセス要求のどれを調停し、調停したメモリアクセス要求を、メモリインタフェース336を介して、PFB334、キャッシュメモリ335及びメインメモリ320のいずれに出力するかを選択する。
 PFB334は、メインメモリ320のアドレスと、当該アドレスが示す領域から読み出されたデータとを対応付けて記憶するバッファメモリである。PFB334は、プロセッサ310aなどから出力されるリード要求に応じて、プロセッサ310aなどが読み出す可能性が高いデータを予め保持するプリフェッチ処理に利用される。なお、PFB334は、実施の形態1及び2のバッファメモリ140に相当する。
 キャッシュメモリ335は、メインメモリ320から読み出されたデータを保持するキャッシュメモリである。キャッシュメモリ335は、実施の形態1及び2のキャッシュメモリ150に相当する。
 メモリインタフェース336は、リード要求がヒットするかミスするかを判定し、判定結果に応じてメインメモリ320、PFB334、又は、キャッシュメモリ335からのデータの読み出しを実行する。メモリインタフェース336は、実施の形態1及び2のデータ読出部130(230)に相当する。
 例えば、メモリインタフェース336は、リード要求に含まれるリードアドレスが示す領域の属性がバースト不可属性である場合、メインメモリ320からデータを読み出し、読み出したデータをプロセッサ310aに出力する。
 また、メモリインタフェース336は、リード要求に含まれるリードアドレスが示す領域の属性がバースト可属性である場合、当該リード要求がヒットするかミスするかを判定する。リード要求がヒットした場合は、対応するリードデータをPFB334から読み出し、プロセッサ310aに出力する。リード要求がミスした場合は、対応するリードデータを含むデータをメインメモリ320からバーストリードし、バーストリードしたデータをPFB334に書き込む。そして、PFB334からリードデータを読み出し、プロセッサ310aに出力する。
 さらに、メモリインタフェース336は、リード要求に含まれるリードアドレスが示す領域の属性がキャッシャブル属性である場合、当該リード要求がヒットするかミスするかを判定する。リード要求がヒットした場合は、対応するリードデータをキャッシュメモリ335から読み出し、プロセッサ310aに出力する。リード要求がミスした場合は、対応するリードデータを含むデータをメインメモリ320から読み出し、読み出したデータをキャッシュメモリ335に書き込む。そして、キャッシュメモリ335からデータを読み出し、プロセッサ310aに出力する。なお、このとき、実施の形態2と同様に、メインメモリ320からデータをバーストリードし、キャッシュメモリ335とPFB334とに格納してもよい。
 続いて、本実施の形態のメモリシステム300の動作について説明する。本実施のメモリシステム300の動作は、実施の形態1又は2と同様であるため、ここでは、図6~図9のフローチャートに基づいて簡単に説明する。
 まず、プロセッサ310aなどから出されたリード要求が、キュー331aなどに格納される。このとき、リード要求には、アドレス変換テーブル313を参照することで得られる属性が含まれている(S101)。
 属性判定部332aは、リード要求に含まれる属性が、キャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する(S102)。判定結果は、セレクタ333aなどを介して、メモリインタフェース336に出力される。
 リード要求に含まれる属性が、バースト可属性であると判定された場合(S102で“アンキャッシャブル(バースト可)”)、メモリインタフェース336は、第1転送処理を実行する(S103)。
 図7に示すように、メモリインタフェース336は、リード要求がヒットしたかミスしたかを判断する(S201)。リード要求がミスした場合(S201でNo)、メモリインタフェース336は、メインメモリ320から、リードデータを含むバーストリードデータをバーストリードする(S202)。そして、メモリインタフェース336は、読み出したバーストリードデータをPFB334に格納する(S203)。さらに、メモリインタフェース336は、PFB334からリードデータを読み出し(S204)、読み出したリードデータをプロセッサ310aに出力する(S205)。
 リード要求がヒットした場合(S201でYes)、メモリインタフェース336は、PFB334からリードデータを読み出し(S204)、読み出したリードデータをプロセッサ310aに出力する(S205)。
 図6に戻ると、リード要求に含まれる属性が、バースト不可属性であると判定された場合(S102で“アンキャッシャブル(バースト不可)”)、メモリインタフェース336は、第2転送処理を実行する(S104)。
 図8に示すように、メモリインタフェース336は、メインメモリ320からリードデータを読み出す(S301)。そして、メモリインタフェース336は、読み出したリードデータをプロセッサ310aに出力する(S302)。
 再び図6に戻ると、リード要求に含まれる属性が、キャッシャブル属性であると判定された場合(S102で“キャッシャブル”)、メモリインタフェース336は、第3転送処理を実行する(S105)。
 図9に示すように、メモリインタフェース336は、リード要求がヒットしたかミスしたかを判断する(S401)。リード要求がミスした場合(S401でNo)、メモリインタフェース336は、メインメモリ320から、リードデータを読み出す(S402)。そして、メモリインタフェース336は、読み出したリードデータをキャッシュメモリ335に格納する(S403)。さらに、メモリインタフェース336は、キャッシュメモリ335からリードデータを読み出し(S404)、読み出したリードデータをプロセッサ310aに出力する(S405)。
 リード要求がヒットした場合(S401でYes)、メモリインタフェース336は、キャッシュメモリ335からリードデータを読み出し(S404)、読み出したリードデータをプロセッサ310aに出力する(S405)。
 なお、リード要求に含まれる属性が、キャッシャブル属性であると判定された場合(S102で“キャッシャブル”)、かつ、リード要求がミスした場合(S401でNo)、メモリインタフェース336は、メインメモリ320からリードデータを含むデータをバーストリードしてもよい(図11に示すフローチャート)。このとき、読み出したバーストリードデータは、キャッシュメモリ335とPFB334とに格納される。
 以上のように、本実施の形態のメモリシステム300では、プロセッサ内のMMUなどによって属性を設定し、設定した属性をTLBに保持されるアドレス変換テーブルに記憶させる。これにより、従来から備えられているアドレス変換テーブルを利用することができ、新たに属性記憶用のバッファなどを必要とせず、構成を簡素化することができる。
 (実施の形態4)
 本実施の形態のバッファメモリ装置は、プロセッサから出力されたメインメモリへ書き込むためのデータを一時的に保持し、所定の条件が満たされた場合に、保持したデータをバーストライトする。これにより、データバスを有効に利用することができ、効率よくデータを転送することができる。
 図14は、本実施の形態のバッファメモリ装置の構成を示すブロック図である。同図のバッファメモリ装置400は、複数のプロセッサ10a、10b及び10cのそれぞれが発行するメモリアクセス要求に従って、複数のプロセッサ10a、10b及び10cとメインメモリ20との間でデータを転送する。以下では、複数のプロセッサ10a、10b及び10cを特に区別して説明する必要がない場合は、プロセッサ10と記載する。
 なお、バッファメモリ装置400は、図1に示すL2キャッシュ40と同一のチップに備えられるとする。また、図1で示したL1キャッシュ30は、複数のプロセッサ10a、10b及び10cのそれぞれに備えられるものとし、図14には図示していない。ただし、L1キャッシュ30は、複数のプロセッサ10a、10b及び10cとバッファメモリ装置400との間に備えられ、複数のプロセッサ10a、10b及び10cで共有されてもよい。
 図14に示すように、バッファメモリ装置400は、メモリアクセス情報取得部410と、判定部420と、制御部430と、データ転送部440と、STB(Store Buffer)450a、450b及び450cと、キャッシュメモリ460と、PFB470とを備える。なお、以下では、STB450a、450b及び450cを特に区別して説明する必要がない場合は、STB450と記載する。
 メモリアクセス情報取得部410は、プロセッサ10からメモリアクセス要求を取得し、取得したメモリアクセス要求から、プロセッサ10で発行されたメモリアクセス要求の性質を示すメモリアクセス情報を取得する。メモリアクセス情報は、メモリアクセス要求に含まれている情報及びそれに付随する情報であり、コマンド情報と、アドレス情報と、属性情報と、プロセッサ情報となどを含む。
 コマンド情報は、メモリアクセス要求がライト要求であるかリード要求であるかと、データ転送に関わる他のコマンドなどとを示す情報である。アドレス情報は、データを書き込む領域を示すライトアドレス、又は、データを読み出す領域を示すリードアドレスを示す情報である。属性情報は、ライトアドレス又はリードアドレスが示す領域の属性が、キャッシャブル属性、バースト可属性及びバースト不可属性のいずれであるかを示す情報である。プロセッサ情報は、メモリアクセス要求を発行したスレッド、論理プロセッサ(LP:Logical Processor)及び物理プロセッサ(PP:Physical Processor)を示す情報である。
 なお、属性情報は、メモリアクセス要求に含まれていなくてもよい。この場合、メモリアクセス情報取得部410は、メインメモリ20のアドレスと当該アドレスが示す領域の属性とを対応付けたテーブルを保持し、アドレス情報と当該テーブルとを参照することで、属性情報を取得してもよい。
 ここで、図15を参照する。図15は、本実施の形態のメモリアクセス情報の一例を示す図である。同図には、メモリアクセス情報501及び502が示されている。
 メモリアクセス情報501は、メモリアクセス要求が、物理プロセッサ“PP1”の論理プロセッサ“LP1”で発行されたライト要求であり、“ライトアドレス1”が示すバースト可属性に属する領域にデータを書き込むことを示すライトコマンドを含んでいることを示している。また、当該ライト要求には、“All Sync”コマンドが含まれていることを示している。
 メモリアクセス情報502は、メモリアクセス要求が、物理プロセッサ“PP1”の論理プロセッサ“LP1”で発行されたリード要求であり、“リードアドレス1”が示すバースト可属性に属する領域からデータを読み出すことを示すリードコマンドを含んでいることを示している。また、当該リード要求には、“Self Sync”コマンドが含まれていることを示している。
 なお、“All Sync”及び“Self Sync”コマンドについては後述する。
 図14に戻ると、判定部420は、メモリアクセス情報取得部410で取得されたメモリアクセス情報が示す性質が、予め定められた条件を満たすか否かを判定する。具体的には、判定部420は、メモリアクセス情報として取得したコマンド情報、属性情報、アドレス情報及びプロセッサ情報などと、制御部430を介してSTB450から取得したバッファ量情報とを用いて、条件の判定を行う。条件と、判定部420の処理との詳細は、後述する。なお、バッファ量情報は、STB450のそれぞれに保持されたデータの量を示す情報である。
 制御部430は、メモリアクセス情報が示す性質が条件を満たすと判定部420によって判定された場合、複数のSTB450a、450b及び450cのうち、当該条件に対応するSTBに保持されているデータをメインメモリに掃き出す。具体的には、制御部430は、STB450に掃き出し命令を出力する。掃き出し命令は、データを掃き出す対象となるSTBに出力され、掃き出し命令を受け取ったSTBは、保持しているデータをメインメモリ20に出力する。
 また、制御部430は、制御情報をデータ転送部440に出力することで、データ転送部440を制御する。例えば、制御情報は少なくとも属性情報を含み、制御部430は、アドレスが示す領域の属性に応じて、ライトデータの書き込み先、及び、リードデータの読み出し先などを決定する。
 さらに、制御部430は、複数のSTB450a、450b及び450cのそれぞれに保持されているデータの量であるバッファ量を判定部420に出力する。
 データ転送部440は、制御部430の制御によって、プロセッサ10とメインメモリ20との間でデータを転送する。具体的には、プロセッサ10からライト要求が出力された場合、メインメモリ20に書き込むためにプロセッサ10から出力されるライトデータを、STB450、キャッシュメモリ460及びメインメモリ20のいずれかに書き込む。また、プロセッサ10からリード要求が出力された場合、キャッシュメモリ460、PFB470及びメインメモリ20のいずれかからリードデータを読み出し、読み出したリードデータをプロセッサ10に出力する。どのメモリを利用するかは、アドレスが示す領域の属性に応じて、制御部430によって決定される。
 図14に示すように、データ転送部440は、第1データ転送部441と、第2データ転送部442と、第3データ転送部443とを備える。
 第1データ転送部441は、アドレスが示す領域がバースト可属性に属する場合に、データの転送を行う。ライト要求が入力された場合は、第1データ転送部441は、当該ライト要求に対応するライトデータをSTB450に書き込む。複数のSTB450a、450b及び450cのいずれに書き込むかは、制御情報に含まれるプロセッサ情報によって決定される。具体的には、ライト要求を発行したプロセッサに対応するSTBにライトデータを書き込む。
 リード要求が入力された場合は、第1データ転送部441は、当該リード要求に対応するリードデータがPFB470に保持されているか否かを判定する。すなわち、当該リード要求がヒットしたかミスしたかを判定する。当該リード要求がヒットした場合、第1データ転送部441は、対応するリードデータをPFB470から読み出し、読み出したリードデータをプロセッサ10に出力する。当該リード要求がミスした場合、第1データ転送部441は、当該リード要求に対応するリードデータを含むデータをメインメモリ20からバーストリードし、バーストリードしたデータをPFB470に書き込む。そして、リード要求に対応するリードデータをPFB470から読み出し、読み出したリードデータをプロセッサ10に出力する。なお、メインメモリ20から読み出したバーストリードデータをPFB470に書き込むのと同時に、リード要求に対応するリードデータをプロセッサ10に出力してもよい。
 第2データ転送部442は、アドレスが示す領域がバースト不可属性に属する場合に、データの転送を行う。ライト要求が入力された場合は、第2データ転送部442は、当該ライト要求に対応するライトデータをメインメモリ20に書き込む。リード要求が入力された場合は、第2データ転送部442は、当該リード要求に対応するリードデータをメインメモリ20から読み出し、読み出したリードデータをプロセッサ10に出力する。
 第3データ転送部443は、アドレスが示す領域がキャッシャブル属性に属する場合に、データの転送を行う。
 ライト要求が入力された場合、第3データ転送部443がライトバック処理とライトスルー処理のいずれを行うかによって、ライトデータの書き込み先が異なる。
 ライトバック処理を行う場合、第3データ転送部443は、当該ライト要求がヒットするかミスするかを判定する。当該ライト要求がヒットした場合、キャッシュメモリ460にライトデータを書き込む。当該ライト要求がミスした場合、第3データ転送部443は、キャッシュメモリ460に対してリフィル処理を行い、ライト要求に含まれるアドレス(タグアドレス)とライトデータとをキャッシュメモリ460に書き込む。いずれの場合も、キャッシュメモリ460に書き込まれたライトデータは、任意のタイミングでメインメモリ20に書き込まれる。なお、ライト要求がミスした場合は、キャッシュメモリ460にライトデータを書き込むことなく、直接メインメモリ20にライトデータを書き込んでもよい。
 ライトスルー処理を行う場合、第3データ転送部443は、当該ライト要求がヒットするかミスするかを判定する。当該ライト要求がヒットした場合、第3データ転送部443は、STB450にライトアドレスとライトデータとを書き込む。STB450に書き込まれたライトデータは、後続のメモリアクセス要求の性質が、条件が満たすと判定部420によって判定された場合に、制御部430の制御に従って、STB450からキャッシュメモリ460とメインメモリ20とにバーストライトされる。
 当該ライト要求がミスした場合も同様に、第3データ転送部443は、STB450にライトアドレスとライトデータとを書き込む。STB450に書き込まれたライトデータとライトアドレスとが、後続のメモリアクセス要求の性質が、条件が満たすと判定部420によって判定された場合に、STB450からキャッシュメモリ460とメインメモリ20とにバーストライトされる。
 リード要求が入力された場合、第3データ転送部443は、当該リード要求がヒットするかミスするかを判定する。当該リード要求がヒットした場合、第3データ転送部443は、キャッシュメモリ460からリードデータを読み出し、読み出したリードデータをプロセッサ10に出力する。
 当該リード要求がミスした場合は、第3データ転送部443は、メインメモリ20からリードデータを読み出し、読み出したリードデータとリードアドレスとをキャッシュメモリ460に書き込む。そして、第3データ転送部443は、キャッシュメモリ460からリードデータを読み出し、読み出したリードデータをプロセッサ10に出力する。なお、メインメモリ20から読み出したリードデータをキャッシュメモリ460に書き込むのと同時に、プロセッサ10に出力してもよい。
 STB450a、450b及び450cのそれぞれは、複数のプロセッサ10a、10b及び10cに対応し、対応するプロセッサによって発行されたライト要求に対応するライトデータを保持するストアバッファ(STB)である。STB450は、複数のプロセッサ10から出力されるライトデータをマージするために、一時的にライトデータを保持するバッファメモリである。
 本実施の形態では、STB450は、物理プロセッサごとに備えられる。また、一例として、STB450は、最大で128バイトのデータを保持することができる。STB450に保持されているデータは、制御部430からの制御に基づいて、メインメモリ20にバーストライトされる。また、ライト要求がキャッシャブル属性に属する領域へのアクセスであり、かつ、ライトスルー処理を行う場合、STB450に保持されているデータは、メインメモリ20とキャッシュメモリ460とにバーストライトされる。
 ここで、図16を参照する。図16は、本実施の形態のバッファメモリ装置400が備えるSTB450の概略を示す図である。
 同図に示すように、STB450a、450b及び450cはそれぞれ、物理プロセッサ(プロセッサ10a(PP0)、10b(PP1)及び10c(PP2))に対応して備えられる。すなわち、STB450aは、プロセッサ10aから出力されたライトアドレスなどのバッファ制御情報とライトデータとを保持する。STB450bは、プロセッサ10bから出力されたライトアドレスなどのバッファ制御情報とライト情報とを保持する。STB450cは、プロセッサ10cから出力されたライトアドレスなどのバッファ制御情報とライトデータとを保持する。
 バッファ制御情報は、ライト要求に含まれる情報であり、STB450に書き込まれるデータを管理するための情報である。すなわち、バッファ制御情報は、少なくともライトアドレスを含み、対応するライトデータを出力した物理プロセッサ及び論理プロセッサなどを示す情報を含んでいる。
 図16に示す例では、物理プロセッサごとに備えられたSTBは、64バイトのデータを保持することができる領域を2つ備えている。例えば、この2つの領域をスレッドごとに対応付けてもよい。
 キャッシュメモリ460は、例えば、実施の形態1のキャッシュメモリ150と同様に、4ウェイ・セット・アソシエイティブ方式のキャッシュメモリである。
 PFB470は、実施の形態1のバッファメモリ140に相当し、メインメモリ20のアドレスと、当該アドレスが示す領域から第1データ転送部441によって読み出されたデータとを対応付けて記憶するバッファメモリである。
 ここで、判定部420が判定処理に用いる条件について説明する。
 図17は、本実施の形態の複数の判定条件の一例を示す判定テーブルを示す図である。同図には、一例として、属性判定条件(“Uncache”)と、コマンド判定条件(“All Sync”と“Self Sync”)と、アドレス判定条件(“RAW Hazard”と“Another Line Access”)と、バッファ量判定条件(“Slot Full”)と、プロセッサ判定条件(“同LP、異PP”)とが示されている。
 属性判定条件は、属性情報を用いて、メモリアクセス要求に含まれるアドレスが示す領域の属性に従って、STB450からのデータの掃き出し、及び、掃き出し対象となるSTBを決定するための条件である。図17に示す“Uncache”条件は、属性判定条件の一例である。
 “Uncache”条件では、メモリアクセス要求に含まれるアドレスが示す領域の属性が、バースト不可属性であるか否かが、判定部420によって判定される。バースト不可属性であると判定された場合、制御部430は、当該メモリアクセス要求を発行した論理プロセッサと同じ論理プロセッサで発行されたメモリアクセス要求に対応するデータを保持しているSTBから、保持しているデータをメインメモリ20に掃き出す。なお、制御部430は、掃き出し対象のSTBを判定する基準として、論理プロセッサではなく、スレッドに対応する仮想プロセッサを用いてもよい。
 コマンド判定条件は、コマンド情報を用いて、メモリアクセス要求に含まれるコマンドに従って、STB450からのデータの掃き出し、及び、掃き出し対象となるSTBを決定するための条件である。図17に示す“All Sync”条件と“Self Sync”条件とは、コマンド判定条件の一例である。
 “All Sync”条件では、メモリアクセス要求に“All Sync”コマンドが含まれるか否かが、判定部420によって判定される。“All Sync”コマンドは、全てのSTB450に保持される全てのデータをメインメモリ20に掃き出すためのコマンドである。“All Sync”コマンドが含まれる場合(例えば、図15のメモリアクセス情報501)、制御部430は、全てのSTB450に保持された全てのデータをメインメモリ20に掃き出す。
 “Self Sync”条件では、メモリアクセス要求に“Self Sync”コマンドが含まれるか否かが、判定部420によって判定される。“Self Sync”コマンドは、当該コマンドを発行したプロセッサが出力したデータのみをSTB450からメインメモリ20に掃き出すためのコマンドである。“Self Sync”コマンドが含まれる場合(例えば、図15のメモリアクセス情報502)、制御部430は、当該メモリアクセス要求を発行した論理プロセッサと同じ論理プロセッサで発行されたメモリアクセス要求に対応するデータを保持しているSTBから、保持しているデータをメインメモリ20に掃き出す。なお、制御部430は、掃き出し対象のSTBを判定する基準として、論理プロセッサではなく、スレッドに対応する仮想プロセッサを用いてもよい。
 アドレス判定条件は、アドレス情報を用いて、メモリアクセス要求に含まれるアドレスに従って、STB450からのデータの掃き出し、及び、掃き出し対象となるSTBを決定するための条件である。図17に示す“RAW Hazard”条件と“Another Line Access”条件とは、アドレス判定条件の一例である。
 “RAW Hazard”条件では、リード要求に含まれるリードアドレスに一致するライトアドレスが、複数のSTB450の少なくとも1つに保持されているか否かが、判定部420によって判定される。リードアドレスに一致するライトアドレスがSTB450のいずれかに保持されている場合に、制御部430は、Hazardラインまでのデータを全て、すなわち、当該ライトアドレスに対応するライトデータ以前にSTB450に保持されたデータをメインメモリ20に掃き出す。
 “Another Line Access”条件では、ライト要求に含まれるライトアドレスが、直前に入力されたライト要求に含まれていたライトアドレスと関連するか否かが、判定部420によって判定される。具体的には、当該2つのライトアドレスが連続するアドレスであるか否かが判定される。なお、このとき、2つのライト要求は共に、同じ物理プロセッサで発行されたものとする。2つのライトアドレスが連続するアドレスでないと判定された場合、制御部430は、直前に入力されたライト要求に対応するライトデータ以前にSTB450に保持されたデータをメインメモリ20に掃き出す。
 バッファ量判定条件は、バッファ量情報を用いて、STB450に保持されたデータ量に従って、STB450からのデータの掃き出し、及び、掃き出し対象となるSTBを決定するための条件である。図17に示す“Slot Full”条件は、バッファ量判定条件の一例である。
 “Slot Full”条件では、STB450に保持されたデータ量であるバッファ量がフルであるか(128バイト)否かが、判定部420によって判定される。バッファ量が128バイトであると判定された場合、制御部430は、当該STBのデータをメインメモリ20に掃き出す。
 プロセッサ判定条件は、プロセッサ情報を用いて、どの論理プロセッサと物理プロセッサとがメモリアクセス要求を発行したかに従って、STB450からのデータの掃き出し、及び、掃き出し対象となるSTBを決定するための条件である。図17に示す“同LP、異PP”条件は、プロセッサ判定条件の一例である。
 “同LP、異PP”条件では、メモリアクセス要求を発行した論理プロセッサが、STB450に保持されたライトデータに対応するライト要求を発行した論理プロセッサと同じであるか否かが判定される。さらに、当該メモリアクセス要求を発行した物理プロセッサが、当該ライト要求を発行した物理プロセッサと異なるか否かが判定される。つまり、プロセッサ情報が示す物理プロセッサとは異なる物理プロセッサで、かつ、プロセッサ情報が示す論理プロセッサが示す論理プロセッサと同じ論理プロセッサで以前に発行されたライト要求に対応するライトデータが少なくとも1つのSTBに保持されているか否かが、判定部420によって判定される。論理プロセッサが同じであり、物理プロセッサが異なると判定された場合、制御部430は、当該論理プロセッサが以前に発行したライト要求に対応するデータをSTB450から掃き出す。なお、論理プロセッサではなく、スレッドが同じであるか否かが判定されてもよい。
 以上のように、本実施の形態では、それぞれの条件を満たす場合にSTB450からデータが掃き出される。なお、上述の条件全てを判定する必要はない。また、上述の条件に新たな条件を加えてもよく、または、上述の条件と新たな条件とを置き換えてもよい。
 例えば、“Slot Full”条件は、バッファ量がフルであるか否かを判定する条件であるが、この条件の代わりに、所定のバッファ量(STBに保持できるバッファ量の最大値の半分など)に達したか否かを判定する条件でもよい。例えば、STB450に保持できるデータ量の最大値は128バイトであるが、STB450とメインメモリ20との間のデータバス幅が64バイトである場合などに、バッファ量が64バイトに達したか否かを判定してもよい。
 ここで、図18を参照する。図18は、本実施の形態の判定部420の詳細な構成を示すブロック図である。同図に示すように、判定部420は、属性判定部421と、プロセッサ判定部422と、コマンド判定部423と、アドレス判定部424と、バッファ量判定部425と、判定結果出力部426とを備える。
 属性判定部421は、メモリアクセス情報取得部410で取得されたメモリアクセス情報から属性情報を取得し、メモリアクセス要求に含まれるアドレスが示す領域の属性がキャッシャブル属性、バースト可属性、及び、バースト不可属性のいずれであるかを判定する。そして、属性判定部421は、得られた判定結果を判定結果出力部426に出力する。
 プロセッサ判定部422は、メモリアクセス情報取得部410で取得されたメモリアクセス情報からプロセッサ情報を取得し、メモリアクセス要求を発行したプロセッサが、複数の論理プロセッサ及び物理プロセッサのうち、いずれの論理プロセッサ及び物理プロセッサであるかを判定する。そして、プロセッサ判定部422は、得られた判定結果を判定結果出力部426に出力する。
 コマンド判定部423は、メモリアクセス情報取得部410で取得されたメモリアクセス情報からコマンド情報を取得し、メモリアクセス要求に所定のコマンドが含まれるか否かを判定する。さらに、コマンド判定部423は、メモリアクセス要求に所定のコマンドが含まれていた場合、当該所定のコマンドの種別を判定する。そして、コマンド判定部423は、得られた判定結果を判定結果出力部426に出力する。
 なお、所定のコマンドとは、例えば、他の条件に関わらずSTB450からデータを掃き出す命令である。一例として、上述したような“All Sync”コマンド及び“Self Sync”コマンドがある。
 アドレス判定部424は、メモリアクセス情報取得部410で取得されたメモリアクセス情報からアドレス情報を取得し、メモリアクセス要求に含まれるアドレスが、STB450に既に保持されているか否かを判定する。さらに、アドレス判定部424は、当該メモリアクセス要求に含まれるアドレスが、直前のメモリアクセス要求に含まれていたアドレスに関連するか否かを判定する。具体的には、2つのアドレスが連続しているか否かを判定する。そして、アドレス判定部424は、得られた判定結果を判定結果出力部426に出力する。
 バッファ量判定部425は、制御部430を介して、STB450からバッファ量を取得し、バッファ量が所定の閾値に達したか否かをSTBごとに判定する。そして、バッファ量判定部425は、得られた判定結果を判定結果出力部426に出力する。なお、所定の閾値は、例えば、STB450の最大値、又は、バッファメモリ装置400とメインメモリ20との間のデータバス幅などである。
 判定結果出力部426は、各判定部から入力される判定結果を基にして、図17に示す条件を満たすか否かを判定し、得られた判定結果を制御部430に出力する。具体的には、判定結果出力部426は、図17に示す条件を満たすと判定された場合、どのSTBのどのデータをメインメモリ20に掃き出すのかを示す掃き出し情報を制御部430に出力する。
 以上の構成により、本実施の形態のバッファメモリ装置400は、複数のプロセッサ10から出力されたライトデータを一時的に保持する複数のSTB450を備え、所定の条件が満たされた場合に、STB450に保持されたデータをメインメモリ20にバーストライトする。つまり、小さいサイズの複数のライトデータをマージするために、一時的にSTB450に保持し、マージすることで得られた大きいサイズのデータをメインメモリ20にバーストライトする。このとき、複数のプロセッサ間でのデータの順序の保証を行うための条件に基づいて、STB450からのデータの掃き出しの可否を決定する。
 これにより、データのコヒーレンシを保ちつつ、データの転送効率を向上させることができる。
 続いて、本実施の形態のバッファメモリ装置400の動作について、図19~図26を用いて説明する。図19は、本実施の形態のバッファメモリ装置400の動作を示すフローチャートである。
 まず、本実施の形態のバッファメモリ装置400は、プロセッサ10からメモリアクセス要求を取得することで、本実施の形態のデータ転送処理を実行する。
 メモリアクセス情報取得部410は、メモリアクセス要求からメモリアクセス情報を取得する(S601)。そして、取得したメモリアクセス情報を判定部420に出力する。また、必要に応じて、判定部420は、制御部430を介してSTB450からバッファ量情報を取得する。
 判定部420は、入力されるメモリアクセス情報と、取得したバッファ量情報とを用いて、STB450からデータを掃き出すか否かを判定する(S602)。この掃き出し判定処理の詳細については後述する。
 続いて、コマンド判定部423が、メモリアクセス要求がライト要求であるかリード要求であるかを判定する(S603)。メモリアクセス要求がライト要求である場合(S603で“ライト”)、データ転送部440は、プロセッサ10から出力されるライトデータの書き込み処理を行う(S604)。メモリアクセス要求がリード要求である場合(S603で“リード”)、データ転送部440は、プロセッサ10へのリードデータの読み出し処理を実行する(S605)。
 なお、掃き出し判定処理(S602)で、メモリアクセス要求がライト要求であるかリード要求であるかが判定されている場合は、掃き出し判定処理(S602)の終了後に、メモリアクセス要求の判定処理(S603)をすることなく、書き込み処理(S604)、又は、読み出し処理(S605)が実行されてもよい。
 以下では、まず、書き込み処理(S604)の詳細について説明する。
 図20は、本実施の形態のバッファメモリ装置400の書き込み処理を示すフローチャートである。
 メモリアクセス要求がライト要求である場合、まず、属性判定部421は、当該ライト要求に含まれるライトアドレスが示す領域の属性を判定する(S611)。具体的には、属性判定部421は、ライトアドレスが示す領域の属性が、バースト可属性、バースト不可属性、及び、キャッシャブル属性のいずれであるかを判定する。
 ライトアドレスが示す領域の属性がバースト可属性であると判定された場合(S611で“アンキャッシャブル(バースト可)”)、第1データ転送部441は、プロセッサ10から出力されたライトデータをSTB450に書き込む(S612)。具体的には、第1データ転送部441は、制御部430からの制御に基づいて、ライト要求を発行した物理プロセッサ(例えば、プロセッサ10a)に対応するSTB(STB450a)にライトデータを書き込む。
 ライトアドレスが示す領域の属性がバースト不可属性であると判定された場合(S611で“アンキャッシャブル(バースト不可)”)、第2データ転送部442は、プロセッサ10から出力されたライトデータをメインメモリ20に書き込む(S613)。
 ライトアドレスが示す領域の属性がキャッシャブル属性であると判定された場合(S611で“キャッシャブル”)、第3データ転送部443は、ライト要求がヒットしたかミスしたかを判定する(S614)。ライト要求がミスした場合(S614でNo)、第3データ転送部443は、キャッシュメモリ460に対してリフィル処理を行い、タグアドレスを更新する(S615)。
 タグアドレスの更新後、又は、ライト要求がヒットした場合(S614でYes)、制御部430は、当該ライト要求に基づく書き込み処理が、ライトバック処理であるかライトスルー処理であるかに応じて、ライトデータの書き込み先を変更する(S617)。ライトバック処理の場合(S616で“ライトバック”)、第3データ転送部443は、キャッシュメモリ460にライトデータを書き込む(S617)。ライトスルー処理の場合(S616で“ライトスルー”)、第3データ転送部443は、STB450にライトデータとライトアドレスとを書き込む(S618)。
 以上のようにして、プロセッサ10から出力されたライトデータは、メインメモリ20、STB450又はキャッシュメモリ460に書き込まれる。なお、STB450及びキャッシュメモリ460に書き込まれたデータは、後続のメモリアクセス要求が入力された場合などに実行される掃き出し判定処理によって、メインメモリ20に書き込まれる。
 なお、掃き出し判定処理(S602)で、ライトアドレスが示す領域の属性が判定されている場合は、メモリアクセス要求の判定処理(S603)の終了後に、属性の判定処理(S611)をすることなく、それぞれの書き込み処理を実行してもよい。
 次に、読み出し処理(S605)について説明する。読み出し処理(S605)は、例えば、図6~図9に示すフローチャートに従って実行される。
 なお、掃き出し判定処理(S602)で、リードアドレスが示す領域の属性が判定されている場合は、メモリアクセス要求の判定処理(S603)の終了後に、属性の取得処理(S101)及び属性の判定処理(S102)をすることなく、それぞれの読み出し処理を実行してもよい。
 次に、掃き出し判定処理(S602)の詳細について図21~図26を用いて説明する。掃き出し判定処理では、図17に示す判定テーブルが示す条件をどの順に判定してもよい。ただし、“All Sync”条件のように、条件が満たされた場合に、全てのバッファに保持されたデータを掃き出すなど、その後に他の条件を判定する必要がなくなるものを優先的に行うのが望ましい。
 図21は、本実施の形態のバッファメモリ装置400の属性判定処理を示すフローチャートである。同図は、図17の“Uncache”条件に基づいた掃き出し判定処理を示す。
 メモリアクセス情報が判定部420に入力されると、属性判定部421は、メモリアクセス要求に含まれるアドレスが示す領域の属性がバースト不可属性であるか否かを判定する(S701)。当該アドレスが示す領域の属性がバースト不可属性ではない場合(S701でNo)、他の判定処理が実行される。
 メモリアクセス要求に含まれるアドレスが示す領域の属性がバースト不可属性であると判定された場合(S701でYes)、制御部430は、当該メモリアクセス要求を発行した論理プロセッサと同じ論理プロセッサで発行されたメモリアクセス要求に対応するデータを保持しているSTBから、保持しているデータをメインメモリ20に掃き出す(S702)。なお、制御部430は、プロセッサ判定部422の判定結果を用いて、複数のSTB450のうち、掃き出し対象となるSTBを特定することで、データの掃き出しを実行する。当該掃き出しが終了すると、他の判定処理が実行される。
 図22は、本実施の形態のバッファメモリ装置400のコマンド判定処理を示すフローチャートである。同図は、図17の“All Sync”条件と“Self Sync”条件とに基づいた掃き出し判定処理を示す。
 メモリアクセス情報が判定部420に入力されると、コマンド判定部423は、メモリアクセス要求に含まれるコマンドに、他の条件に関わらずデータを掃き出す旨の命令である“Sync”コマンドが含まれるか否かを判定する(S801)。メモリアクセス要求に“Sync”コマンドが含まれない場合(S801でNo)、他の判定処理が実行される。
 メモリアクセス要求に“Sync”コマンドが含まれる場合(S801でYes)、コマンド判定部423は、“Sync”コマンドが“All Sync”コマンドであるか“Self Sync”コマンドであるかを判定する(S802)。“Sync”コマンドが“All Sync”コマンドである場合(S802で“All Sync”)、制御部430は、全てのSTB450から、全てのデータを掃き出す(S803)。
 “Sync”コマンドが“Self Sync”コマンドである場合(S802で“Self Sync”)、制御部430は、当該メモリアクセス要求を発行した論理プロセッサと同じ論理プロセッサで発行されたメモリアクセス要求に対応するデータを保持しているSTBから、保持しているデータをメインメモリ20に掃き出す(S804)。なお、制御部430は、プロセッサ判定部422の判定結果を用いて、複数のSTB450のうち、吐き出し対象となるSTBを特定することで、データの掃き出しを実行する。
 データの掃き出しが終了すると、他の判定処理が実行される。
 図23は、本実施の形態のバッファメモリ装置400のリードアドレス判定処理を示すフローチャートである。同図は、図17の“RAW Hazard”条件に基づいた掃き出し判定処理を示す。なお、“RAW Hazard”条件は、バッファメモリ装置400がリード要求を受け取った場合に判定される条件である。すなわち、コマンド判定部423が、メモリアクセス要求がリード要求であると判定した場合に実行される。
 アドレス判定部424は、当該リード要求に含まれるリードアドレスが、STB450に保持されているライトアドレスに一致するか否かを判定する(S901)。当該リードアドレスがSTB450に保持されているライトアドレスに一致しないと判定された場合(S901でNo)、他の判定処理が実行される。
 リードアドレスがSTB450に保持されているライトアドレスに一致すると判定された場合(S901でYes)、制御部430は、Hazardラインまでのデータを全て、すなわち、一致したライトアドレスに対応するライトデータ以前に保持された全てのデータをSTB450から掃き出す(S902)。データの掃き出しが終了すると、他の判定処理が実行される。
 図24は、本実施の形態のバッファメモリ装置400のライトアドレス判定処理を示すフローチャートである。同図は、図17の“Another Line Access”条件に基づいた掃き出し判定処理を示す。なお、“Another Line Access”条件は、バッファメモリ装置400がライト要求を受け取った場合に判定される条件である。すなわち、コマンド判定部423が、メモリアクセス要求がライト要求であると判定した場合に実行される。
 アドレス判定部424は、当該ライト要求に含まれるライトアドレスが、直前に入力されたライト要求に含まれるライトアドレスに連続するか否かを判定する(S1001)。2つのアドレスが連続する場合(S1001でNo)、他の判定処理が実行される。
 2つのアドレスが連続しない場合(S1001でYes)、制御部430は、直前に入力されたライト要求に対応するライトデータを含み、それ以前のデータを全てSTB450から掃き出す(S1002)。データの掃き出しが終了すると、他の判定処理が実行される。
 図25は、本実施の形態のバッファメモリ装置400のバッファ量判定処理を示すフローチャートである。同図は、図17の“Slot Full”条件に基づいた掃き出し判定処理を示す。
 “Slot Full”条件は、他の条件と異なり、メモリアクセス情報ではなく、STB450から得られるバッファ量情報に基づいて判定される条件である。したがって、バッファメモリ装置400がメモリアクセス要求を受け取った場合に限らず、任意のタイミングで、又は、STB450にデータを書き込んだ場合などに判定されてもよい。
 バッファ量判定部425は、制御部430を介して、STB450からバッファ量情報を取得し、STBごとに、バッファ量がフルであるか否かを判定する(S1101)。バッファ量がフルでない場合(S1101でNo)、バッファメモリ装置400がメモリアクセス要求を受け取った場合に、他の判定処理が実行される。
 バッファ量がフルである場合(S1101でYes)、制御部430は、複数のSTB450のうち、バッファ量がフルとなったSTBからデータを掃き出す(S1102)。データの掃き出しが終了すると、他の判定処理が実行される。
 図26は、本実施の形態のバッファメモリ装置400のプロセッサ判定処理を示すフローチャートである。同図は、図17の“同LP、異PP”条件に基づいた掃き出し判定処理を示す。
 メモリアクセス情報が判定部420に入力されると、プロセッサ判定部422は、メモリアクセス要求を発行した物理プロセッサとは異なる物理プロセッサで、かつ、当該メモリアクセス要求を発行した論理プロセッサと同じ論理プロセッサで以前に発行されたメモリアクセス要求に対応するライトデータが、STB450に保持されているか否かを判定する(S1201)。当該ライトデータがSTB450に保持されていない場合(S1201でNo)、他の判定処理が実行される。
 同じ論理プロセッサ、かつ、異なる物理プロセッサから出力されたライトデータがSTB450に保持されている場合(S1201でYes)、当該ライトデータを保持していたSTBから、データを掃き出す(S1202)。データの掃き出しが終了すると、他の判定処理が実行される。
 以上の図21~図26に示す判定処理が全て終了すると、掃き出し判定処理(図19のS602)は終了する。
 以上の掃き出し判定処理に示した条件が満たされない場合は、ライト要求に対応するライトデータは、STB450に保持される。すなわち、入力される小さいサイズのライトデータは、STB450でマージされ、大きなサイズのデータとなる。そして、当該データは、上述のいずれかの条件が満たされた時点で、メインメモリ20にバーストライトされる。
 なお、以上の説明では、各判定条件が満たされるごとに、データをメインメモリ20に掃き出したが、全ての判定条件が判定された後に、満たした条件に対応するデータをまとめてメインメモリ20に掃き出してもよい。
 以上のように、本実施の形態のバッファメモリ装置400は、複数のプロセッサ10のそれぞれに対応するSTB450を備え、各STB450にプロセッサ10から出力されるライトデータをマージして、保持させる。そして、所定の条件を満たした場合に、STB450からマージしたデータをメインメモリ20にバーストライトする。
 これにより、小さなサイズのライトデータをマージすることで得られる大きなデータをメインメモリ20にバーストライトすることができるので、小さなサイズのデータを個々に書き込む場合に比べて、データの転送効率を向上させることができる。また、STB450からデータを読み出す条件を備えることで、複数のプロセッサから出力されるライトデータのコヒーレンシを保つことができる。特に、メモリアクセス要求が、同じ論理プロセッサであるが、異なる物理プロセッサで発行された場合にSTB450に保持されたデータを掃き出すことで、複数のプロセッサが実行するマルチスレッド、又は、マルチプロセッサを利用したメモリシステムの場合でも、データのコヒーレンシを保つことができる。
 以上、本発明のバッファメモリ装置及びメモリシステムについて、実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではない。本発明の趣旨を逸脱しない限り、当業者が思いつく各種変形を当該実施の形態に施したものや、異なる実施の形態における構成要素を組み合わせて構築される形態も、本発明の範囲内に含まれる。
 また、各実施の形態において、メモリアクセス要求の発行元は、CPUなどのプロセッサ、及び、DMACなどいかなるマスタであってもよい。
 また、各実施の形態では、L2キャッシュ40が各実施の形態のバッファメモリ140、PFB334又はPFB470を備える構成について説明したが、L1キャッシュ30が当該バッファメモリ140、PFB334又はPFB470を備えてもよい。このとき、メモリシステムは、L2キャッシュ40を備えなくてもよい。
 また、レベル3キャッシュ以上のキャッシュを備えるメモリシステムに、本発明を適用してもよい。この場合、最大レベルのキャッシュ、すなわち、メインメモリ20に最も近いキャッシュが各実施の形態のバッファメモリ140、PFB334又はPFB470を備えることが好ましい。
 なお、本発明は、上述したように、バッファメモリ装置、メモリシステム及びデータ読出方法として実現できるだけではなく、本実施の形態のデータ読出方法をコンピュータに実行させるためのプログラムとして実現してもよい。また、当該プログラムを記録するコンピュータ読み取り可能なCD-ROMなどの記録媒体として実現してもよい。さらに、当該プログラムを示す情報、データ又は信号として実現してもよい。そして、これらプログラム、情報、データ及び信号は、インターネットなどの通信ネットワークを介して配信されてもよい。
 また、本発明は、バッファメモリ装置を構成する構成要素の一部又は全部を、1個のシステムLSI(Large Scale Integration)から構成してもよい。システムLSIは、複数の構成部を1個のチップ上に集積して製造された超多機能LSIであり、具体的には、マイクロプロセッサ、ROM及びRAMなどを含んで構成されるコンピュータシステムである。
 本発明のバッファメモリ装置及びメモリシステムは、CPUなどのプロセッサとメインメモリとの間でデータの転送を行うシステムに利用することができ、例えば、コンピュータなどに利用することができる。
10、10a、10b、10c、310a、310b、610 プロセッサ
20、320、620 メインメモリ
21、621 キャッシャブル領域
22、622 アンキャッシャブル領域
23 バースト可領域
24 バースト不可領域
30、311 L1キャッシュ
40、330 L2キャッシュ
100、200、400 バッファメモリ装置
110 属性取得部
120、332a、332b、421 属性判定部
130、230 データ読出部
131 第1データ読出部
132 第2データ読出部
133、233 第3データ読出部
140 バッファメモリ
150、335、460、611 キャッシュメモリ
160 テーブル保持部
161 領域属性テーブル
170 属性設定部
300 メモリシステム
312 TLB
313 アドレス変換テーブル
331a、331b キュー
333a、333b セレクタ
334、470 PFB
336 メモリインタフェース
410 メモリアクセス情報取得部
420 判定部
422 プロセッサ判定部
423 コマンド判定部
424 アドレス判定部
425 バッファ量判定部
426 判定結果出力部
430 制御部
440 データ転送部
441 第1データ転送部
442 第2データ転送部
443 第3データ転送部
450、450a、450b、450c STB
501、502 メモリアクセス情報
612 汎用レジスタ

Claims (17)

  1.  プロセッサからのリード要求に応じて、キャッシャブル属性とアンキャッシャブル属性とのいずれかに属する複数の領域からなるメインメモリ又は周辺デバイスからデータを読み出すバッファメモリ装置であって、
     前記リード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得部と、
     前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されることを示す第1属性であるか否かを判定する属性判定部と、
     前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードするデータ読出部と、
     前記データ読出部によってバーストリードされたデータを保持する第1バッファメモリとを備える
     バッファメモリ装置。
  2.  前記属性判定部は、前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されないことを示す第2属性であるか、前記第1属性であるかを判定し、
     前記データ読出部は、さらに、前記属性判定部によって、前記属性取得部によって取得された属性が前記第2属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータのみを読み出す
     請求項1記載のバッファメモリ装置。
  3.  前記バッファメモリ装置は、さらに、
     前記メインメモリ又は前記周辺デバイスのアドレスと、当該アドレスが示す領域の属性が、前記第1属性、前記第2属性、及び、前記キャッシャブル属性であることを示す第3属性のいずれであるかを示す属性情報とを対応付けたテーブルを保持するテーブル保持部を備え、
     前記属性取得部は、前記テーブル保持部に保持されたテーブルを参照することで、前記リードアドレスが示す領域の属性を取得する
     請求項2記載のバッファメモリ装置。
  4.  前記バッファメモリ装置は、さらに、
     キャッシュメモリを備え、
     前記属性判定部は、前記属性取得部によって取得された属性が、前記第1属性、前記第2属性、及び、前記第3属性のいずれであるかを判定し、
     前記データ読出部は、さらに、前記属性判定部によって、前記属性取得部によって取得された属性が前記第3属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードし、
     前記キャッシュメモリは、前記データ読出部によってバーストリードされたデータのうち、前記リードアドレスが示す領域に保持されているデータを含む第1データを保持し、
     前記第1バッファメモリは、前記データ読出部によってバーストリードされたデータのうち、前記第1データを除く第2データを保持する
     請求項3記載のバッファメモリ装置。
  5.  前記バッファメモリ装置は、さらに、
     前記メインメモリ又は前記周辺デバイスのアドレスと、当該アドレスが示す領域の属性を、前記第1属性、前記第2属性、及び、前記第3属性のいずれかに設定することで前記テーブルを生成する属性設定部を備え、
     前記テーブル保持部は、前記属性設定部によって生成されたテーブルを保持する
     請求項3記載のバッファメモリ装置。
  6.  前記データ読出部は、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、さらに、前記リードアドレスが示す領域に保持されているデータが前記第1バッファメモリに既に保持されているか否かを判断し、当該データが前記第1バッファメモリに既に保持されている場合、前記第1バッファメモリから当該データを読み出し、当該データが前記第1バッファメモリに保持されていない場合、当該データを含むデータをバーストリードする
     請求項1記載のバッファメモリ装置。
  7.  前記属性取得部は、さらに、前記プロセッサからのライト要求に含まれるライトアドレスが示す領域の属性を取得し、
     前記バッファメモリ装置は、さらに、
     前記属性判定部によって、前記属性取得部によって取得された属性のうち、前記ライトアドレスが示す領域の属性が前記第1属性である場合に、前記メインメモリ又は前記周辺デバイスに書き込むための前記ライト要求に対応するライトデータを保持する第2バッファメモリと、
     前記プロセッサからの前記リード要求又は前記ライト要求であるメモリアクセス要求の性質を示すメモリアクセス情報を取得するメモリアクセス情報取得部と、
     前記メモリアクセス情報取得部によって取得されたメモリアクセス情報が示す性質、又は、前記属性取得部によって取得された属性が、予め定められた条件を満たすか否かを判定する条件判定部と、
     前記メモリアクセス情報が示す性質が前記条件を満たすと前記条件判定部によって判定された場合、前記第2バッファメモリに保持されたライトデータを前記メインメモリ又は前記周辺デバイスに掃き出す制御部とを備える
     請求項1記載のバッファメモリ装置。
  8.  前記メモリアクセス情報取得部は、前記メモリアクセス情報として、前記メモリアクセス要求を発行した論理プロセッサ及び物理プロセッサを示すプロセッサ情報を取得し、
     前記条件判定部は、前記プロセッサ情報が示す物理プロセッサとは異なる物理プロセッサで、かつ、前記プロセッサ情報が示す論理プロセッサと同じ論理プロセッサで以前に発行されたライト要求に対応するライトデータが前記第2バッファメモリに保持されている場合に、前記条件を満たすと判定し、
     前記制御部は、前記条件を満たすと前記条件判定部によって判定された場合、前記条件を満たす第2バッファメモリに保持されているデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  9.  前記条件判定部は、前記メモリアクセス情報に、前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出すためのコマンド情報が含まれているか否かを判定し、
     前記制御部は、前記メモリアクセス情報に前記コマンド情報が含まれていると前記条件判定部によって判定された場合、前記コマンド情報が示す第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  10.  前記メモリアクセス情報取得部は、さらに、前記メモリアクセス情報として、前記メモリアクセス要求を発行したプロセッサを示すプロセッサ情報を取得し、
     前記条件判定部は、さらに、前記属性情報が示す属性が、前記第1属性であるか否かを判定し、
     前記制御部は、さらに、前記属性取得部によって取得された属性が前記第1属性であると前記条件判定部によって判定された場合、前記プロセッサ情報が示すプロセッサに対応する第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  11.  前記第2バッファメモリは、さらに、前記ライトデータに対応するライトアドレスを保持し、
     前記メモリアクセス情報取得部は、さらに、前記メモリアクセス要求がリード要求を含む場合に、前記メモリアクセス情報として、当該リード要求に含まれるリードアドレスを取得し、
     前記条件判定部は、前記リードアドレスに一致するライトアドレスが前記第2バッファメモリに保持されているか否かを判定し、
     前記制御部は、前記リードアドレスに一致するライトアドレスが前記第2バッファメモリに保持されていると前記条件判定部によって判定された場合、前記ライトアドレスに対応するライトデータ以前に前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  12.  前記メモリアクセス情報取得部は、さらに、前記メモリアクセス要求がライト要求を含む場合に、当該ライト要求に含まれる第1ライトアドレスを取得し、
     前記条件判定部は、前記第1ライトアドレスが、直前に入力されたライト要求に含まれる第2ライトアドレスに連続するか否かを判定し、
     前記制御部は、前記第1ライトアドレスと前記第2ライトアドレスとが連続すると前記条件判定部によって判定された場合、前記第2ライトアドレスに対応するライトデータ以前に前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  13.  前記条件判定部は、さらに、前記第2バッファメモリに保持されているデータのデータ量が所定の閾値に達したか否かを判定し、
     前記制御部は、さらに、前記データ量が前記閾値に達したと前記条件判定部によって判定された場合、前記第2バッファメモリに保持されたデータを前記メインメモリ又は前記周辺デバイスに掃き出す
     請求項7記載のバッファメモリ装置。
  14.  前記バッファメモリ装置は、さらに、
     前記プロセッサからのライト要求に含まれるライトアドレスが、前記第1バッファメモリに保持されているデータに対応するアドレスと一致するか否かを判断し、前記ライトアドレスが一致する場合、前記第1バッファメモリに保持されているデータを無効化する無効化部を備える
     請求項1記載のバッファメモリ装置。
  15.  プロセッサと、キャッシャブル属性及びアンキャッシャブル属性のいずれかに属する複数の領域からなるメインメモリ又は周辺デバイスとを備え、前記プロセッサからのリード要求に応じて、前記メインメモリ又は前記周辺デバイスからデータを読み出すメモリシステムであって、
     前記プロセッサからのリード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得部と、
     前記属性取得部によって取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されることを示す第1属性であるか否かを判定する属性判定部と、
     前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータを含むデータをバーストリードするデータ読出部と、
     前記データ読出部によってバーストリードされたデータを保持するバッファメモリとを備え、
     前記データ読出部は、前記属性判定部によって、前記属性取得部によって取得された属性が前記第1属性であると判定された場合、さらに、前記リードアドレスが示す領域に保持されているデータが前記バッファメモリに既に保持されているか否かを判断し、当該データが前記バッファメモリに既に保持されている場合、前記バッファメモリから当該データを読み出し、当該データが前記バッファメモリに保持されていない場合、当該データを含むデータをバーストリードする
     メモリシステム。
  16.  前記メモリシステムは、さらに、複数のキャッシュを備え、
     前記複数のキャッシュのうち、前記メインメモリ又は前記周辺デバイスに最も近いキャッシュは、前記バッファメモリを備える
     請求項15記載のメモリシステム。
  17.  プロセッサからのリード要求に応じて、キャッシャブル属性とアンキャッシャブル属性とのいずれかに属する複数の領域からなるメインメモリ又は周辺デバイスからデータを読み出すデータ読出方法であって、
     前記プロセッサからのリード要求に含まれるリードアドレスが示す領域の属性を取得する属性取得ステップと、
     前記属性取得ステップで取得された属性が、前記アンキャッシャブル属性であり、かつ、バースト転送すべきデータが保持されることを示す第1属性であるか否かを判定する属性判定ステップと、
     前記属性判定ステップで、前記属性取得ステップで取得された属性が前記第1属性であると判定された場合、前記リードアドレスが示す領域に保持されているデータが前記バッファメモリに既に保持されているか否かを判断する判断ステップと、
     前記判断ステップで、当該データがバッファメモリに既に保持されていると判断された場合、前記バッファメモリから当該データを読み出し、当該データが前記バッファメモリに保持されていないと判断された場合、当該データを含むデータをバーストリードし、バーストリードしたデータを前記バッファメモリに格納するデータ読出ステップとを含む
     データ読出方法。
PCT/JP2009/004595 2008-09-18 2009-09-15 バッファメモリ装置、メモリシステム及びデータ読出方法 WO2010032433A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010529624A JPWO2010032433A1 (ja) 2008-09-18 2009-09-15 バッファメモリ装置、メモリシステム及びデータ読出方法
CN2009801365185A CN102160041A (zh) 2008-09-18 2009-09-15 缓冲存储器装置、存储器***以及数据读出方法
US13/050,090 US20110167223A1 (en) 2008-09-18 2011-03-17 Buffer memory device, memory system, and data reading method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-239927 2008-09-18
JP2008239927 2008-09-18

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/050,090 Continuation US20110167223A1 (en) 2008-09-18 2011-03-17 Buffer memory device, memory system, and data reading method

Publications (1)

Publication Number Publication Date
WO2010032433A1 true WO2010032433A1 (ja) 2010-03-25

Family

ID=42039282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/004595 WO2010032433A1 (ja) 2008-09-18 2009-09-15 バッファメモリ装置、メモリシステム及びデータ読出方法

Country Status (5)

Country Link
US (1) US20110167223A1 (ja)
JP (1) JPWO2010032433A1 (ja)
CN (1) CN102160041A (ja)
TW (1) TW201015579A (ja)
WO (1) WO2010032433A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014112360A (ja) * 2012-11-12 2014-06-19 Fujitsu Ltd 演算処理装置及び演算処理装置の制御方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10019381B2 (en) 2012-05-01 2018-07-10 Nvidia Corporation Cache control to reduce transaction roll back
WO2014106871A1 (en) 2013-01-07 2014-07-10 Hitachi, Ltd. Storage system which realizes asynchronous remote copy using cache memory composed of flash memory, and control method thereof
US10366244B2 (en) 2015-06-09 2019-07-30 International Business Machines Corporation Performing an operation on sensitive data
JP6424330B2 (ja) * 2015-10-13 2018-11-21 株式会社アクセル 情報処理装置、及び情報処理方法
US10120808B2 (en) * 2016-04-22 2018-11-06 Arm Limited Apparatus having cache memory disposed in a memory transaction path between interconnect circuitry and a non-volatile memory, and corresponding method
CN113515474A (zh) * 2021-07-30 2021-10-19 上海阵量智能科技有限公司 数据处理装置、方法、计算机设备和存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1992005489A1 (en) * 1990-09-18 1992-04-02 Fujitsu Limited Method of nonsynchronous access to shared memory
JPH05282205A (ja) * 1992-03-31 1993-10-29 Nec Corp 情報処理装置
JPH06348593A (ja) * 1993-06-03 1994-12-22 Sumitomo Electric Ind Ltd データ転送制御装置
JPH09282228A (ja) * 1996-04-10 1997-10-31 Hitachi Ltd 主記憶制御装置
JPH10187532A (ja) * 1996-12-19 1998-07-21 Nec Corp 2次キャッシュ装置
JPH1124994A (ja) * 1997-06-06 1999-01-29 Texas Instr Inc <Ti> マイクロプロセッサ
JP2002189629A (ja) * 2000-08-23 2002-07-05 Nintendo Co Ltd 機能拡張型メモリコントローラを備えるグラフィックス処理システム
JP2004240520A (ja) * 2003-02-04 2004-08-26 Renesas Technology Corp ノンキャッシュ領域内高速メモリアクセス方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3820078A (en) * 1972-10-05 1974-06-25 Honeywell Inf Systems Multi-level storage system having a buffer store with variable mapping modes
US4195342A (en) * 1977-12-22 1980-03-25 Honeywell Information Systems Inc. Multi-configurable cache store system
US6108755A (en) * 1990-09-18 2000-08-22 Fujitsu Limited Asynchronous access system to a shared storage
JPH09505679A (ja) * 1993-07-07 1997-06-03 トーシバ・アメリカ・エレクトロニック・コンポーネンツ・インコーポレーテッド 選択フラッシュ機能を具備するメモリーバッファ
US6173368B1 (en) * 1995-12-18 2001-01-09 Texas Instruments Incorporated Class categorized storage circuit for storing non-cacheable data until receipt of a corresponding terminate signal
EP0782079A1 (en) * 1995-12-18 1997-07-02 Texas Instruments Incorporated Burst access in data processing systems
US5911151A (en) * 1996-04-10 1999-06-08 Motorola, Inc. Optimizing block-sized operand movement utilizing standard instructions
JP4024247B2 (ja) * 2002-09-30 2007-12-19 株式会社ルネサステクノロジ 半導体データプロセッサ

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1992005489A1 (en) * 1990-09-18 1992-04-02 Fujitsu Limited Method of nonsynchronous access to shared memory
JPH05282205A (ja) * 1992-03-31 1993-10-29 Nec Corp 情報処理装置
JPH06348593A (ja) * 1993-06-03 1994-12-22 Sumitomo Electric Ind Ltd データ転送制御装置
JPH09282228A (ja) * 1996-04-10 1997-10-31 Hitachi Ltd 主記憶制御装置
JPH10187532A (ja) * 1996-12-19 1998-07-21 Nec Corp 2次キャッシュ装置
JPH1124994A (ja) * 1997-06-06 1999-01-29 Texas Instr Inc <Ti> マイクロプロセッサ
JP2002189629A (ja) * 2000-08-23 2002-07-05 Nintendo Co Ltd 機能拡張型メモリコントローラを備えるグラフィックス処理システム
JP2004240520A (ja) * 2003-02-04 2004-08-26 Renesas Technology Corp ノンキャッシュ領域内高速メモリアクセス方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014112360A (ja) * 2012-11-12 2014-06-19 Fujitsu Ltd 演算処理装置及び演算処理装置の制御方法

Also Published As

Publication number Publication date
TW201015579A (en) 2010-04-16
JPWO2010032433A1 (ja) 2012-02-02
US20110167223A1 (en) 2011-07-07
CN102160041A (zh) 2011-08-17

Similar Documents

Publication Publication Date Title
JP5536658B2 (ja) バッファメモリ装置、メモリシステム及びデータ転送方法
KR102273622B1 (ko) 거대한 페이지들을 지원하는 메모리 관리
KR101379596B1 (ko) Tlb 프리페칭
US8782348B2 (en) Microprocessor cache line evict array
US9489239B2 (en) Systems and methods to manage tiered cache data storage
US8195881B2 (en) System, method and processor for accessing data after a translation lookaside buffer miss
JP7340326B2 (ja) メンテナンス動作の実行
JP2000250813A (ja) I/oキャッシュ・メモリにおけるデータ管理方法
TWI393050B (zh) 促進多重處理器介面之板內建快取記憶體系統之記憶體裝置及方法及使用其之電腦系統
WO2010032433A1 (ja) バッファメモリ装置、メモリシステム及びデータ読出方法
US8621152B1 (en) Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access
US11341042B2 (en) Storage apparatus configured to manage a conversion table according to a request from a host
US10564871B2 (en) Memory system having multiple different type memories with various data granularities
KR20210058877A (ko) 외부 메모리 기반 변환 색인 버퍼
WO2024066195A1 (zh) 缓存管理方法及装置、缓存装置、电子装置和介质
KR102482516B1 (ko) 메모리 어드레스 변환
US20080307169A1 (en) Method, Apparatus, System and Program Product Supporting Improved Access Latency for a Sectored Directory
EP2790107A1 (en) Processing unit and method for controlling processing unit
JP7139719B2 (ja) 情報処理装置、演算処理装置及び情報処理装置の制御方法
US7949833B1 (en) Transparent level 2 cache controller
US9442856B2 (en) Data processing apparatus and method for handling performance of a cache maintenance operation
US10713165B2 (en) Adaptive computer cache architecture
JP2004326175A (ja) プロセッサ、キャッシュシステム及びキャッシュメモリ
JP7311959B2 (ja) 複数のデータ・タイプのためのデータ・ストレージ
US20220374360A1 (en) Memory device and method for accessing memory device

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980136518.5

Country of ref document: CN

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

Ref document number: 09814278

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010529624

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

Country of ref document: EP

Kind code of ref document: A1