WO2014206220A1 - 数据写入方法及内存系统 - Google Patents

数据写入方法及内存系统 Download PDF

Info

Publication number
WO2014206220A1
WO2014206220A1 PCT/CN2014/080073 CN2014080073W WO2014206220A1 WO 2014206220 A1 WO2014206220 A1 WO 2014206220A1 CN 2014080073 W CN2014080073 W CN 2014080073W WO 2014206220 A1 WO2014206220 A1 WO 2014206220A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
written
cache line
data block
changed
Prior art date
Application number
PCT/CN2014/080073
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 EP14818249.6A priority Critical patent/EP2998867B1/en
Priority to JP2016522212A priority patent/JP6159478B2/ja
Priority to RU2016102771A priority patent/RU2621611C1/ru
Priority to KR1020157036978A priority patent/KR101785189B1/ko
Priority to BR112015031803A priority patent/BR112015031803A2/pt
Priority to AU2014301874A priority patent/AU2014301874B2/en
Publication of WO2014206220A1 publication Critical patent/WO2014206220A1/zh
Priority to US14/982,353 priority patent/US20160110286A1/en

Links

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/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • 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/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • 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
    • 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/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • 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/0893Caches characterised by their organisation or structure
    • G06F12/0897Caches characterised by their organisation or structure with two or more cache hierarchy levels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/109Address translation for multiple virtual address spaces, e.g. segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/28Using a specific disk cache architecture
    • G06F2212/283Plural cache memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/657Virtual address space management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present invention relate to computer technologies, and in particular, to a data writing method and a memory system.
  • the current memory system basically includes a memory controller (MC), a memory device, etc., and the data interaction between the MC and the memory device through a Double Data Rate (DDR) protocol, and the MC uses a burst (Burst) Write the data to the memory device, the data block size of one burst write is the memory data bus width, and the data interaction between the cache (Cache) and the memory system is in the cache line (Cache Line).
  • the size of the data read and write at one time is the size of a Cache Line of the last Cache ( Last Level Cache , LLC ) of the Cache. Therefore, the MC needs multiple consecutive burst writes to write a Cache Line data to the memory device. The number of consecutive burst writes is called Burst Length (BL).
  • BL is generally equal to 8
  • a Cache Line is divided into multiple data blocks by using a data block size of one burst to be granular.
  • the size of a Cache Line of the LLC is 64 Bytes and the width of the memory data bus is 64 bits
  • the MC needs to write 8 times in a burst of 4 consecutive clock cycles when burst data is written on the data bus.
  • many data blocks are not changed.
  • there are some times of burst writes and invalid data is written to the memory device. Lead to valid data
  • the write speed is slow, and the writing of a large amount of invalid data increases the power consumption of the memory system, thereby reducing the performance of the memory system.
  • the MC when the MC writes data to the memory device, it writes a total of 4 bursts in two consecutive clock cycles, and there is no burst write data in the next two clock cycles, thereby the first half of the data of a Cache Line. Or the second half of the data is written to the memory device.
  • the first two clock cycles there is no way to distinguish whether the data on the data block is changed, or there are some times of burst writing and writing invalid data to the memory device, resulting in valid data.
  • the write speed is slow, and the writing of a large amount of invalid data increases the power consumption of the memory system, thereby reducing the performance of the memory system.
  • the embodiment of the invention provides a data writing method and a memory system. By distinguishing whether data on a data block in the Cache Line changes, only the changed data block is written, thereby realizing fast writing of valid data. Into, reduce the power consumption of the memory system, improve the performance of the memory system.
  • an embodiment of the present invention provides a data writing method, which is applicable to a memory system including at least a memory controller and a memory device, including:
  • the memory controller receives the change information sent by the cache, where the change information is an indication that the cache divides the first to-be-written cache line Cache Line of the last-level cache LLC into at least one data block. Information as to whether data on each of the data blocks has changed;
  • the memory controller does not send, to the memory device, a column address and each corresponding to the non-changing data block, according to the change information, for each non-changing data block that is not changed by the data indicated by the change information. Transmitting data corresponding to the non-changing data block; transmitting, to the memory device, a column address corresponding to each of the changed data blocks and each of the changed data blocks, for each changed data block that is changed by the change information; Data; performing data of burst length for each of the changed data blocks according to data corresponding to the block, The burst length is equal to the number of data blocks of the at least one data block.
  • the change data block that is changed in the data that is indicated by the change information is sent, and the column address corresponding to each change data block is sent to the memory device.
  • the data corresponding to each of the change data blocks includes:
  • the memory controller sends, to the memory device, a column address corresponding to each of the changed data blocks, and each And the data corresponding to the change data block; the data of the burst length is written to each of the change data blocks, and the data device includes: the memory device according to each of the column addresses and each of the change data blocks Corresponding data, performing data writing of the burst length on each changed data block of the first to-be-written Cache Line.
  • the changing, by the change information, the change data block that is generated by the data change sending, to the memory device, a column address corresponding to each of the change data blocks and The data corresponding to each of the change data blocks includes:
  • the changed data blocks of the first Cache Line to be written are smaller than the burst length, the changed data blocks of the first Cache Line to be written, and at least one memory device, And a sum of the changed data block of the at least one second Cache Line to be written and the changed data block of the first Cache Line to be written is less than or equal to the burst length; and the data corresponding to the block, for each of the changes
  • the data block is subjected to burst length data writing, including: the memory device according to each column address of the first to-be-written Cache Line, and each column address of the at least one second to-be-written Cache Line,
  • the change data block of the first to-be-written Cache Line and the change data block of the at least one second to-be-written Cache Line perform data writing of the burst length, and the second to be written
  • the Cache Line is the Cache Line to be written except the first Cache Line to be written in the LLC.
  • the third in the first aspect In a possible implementation manner, the first to-be-written Cache Line and the at least one second to-be-written Cache Line belong to the same row of the same storage group Bank, and the LLC does not read the same row. command.
  • the column address corresponding to the changed data block and the data corresponding to each of the changed data blocks, and the burst length data is written to each of the changed data blocks, including:
  • the memory device is provided with a column address buffer of the burst length and a column decoder of the number of burst lengths, and for each of the changed data blocks, a separate column address buffer and column decoding are used.
  • the device performs data writing.
  • an embodiment of the present invention provides a memory system, including at least a memory controller and a memory device, including:
  • the memory controller is configured to receive the change information sent by the cache, where the change information is generated after the cache divides the first to-be-written cache line Cache Line of the last-level cache LLC into at least one data block.
  • Information indicating whether data on each of the data blocks changes according to the change information, not sending each of the non-changing data blocks that are not changed by the data indicated by the change information to the memory device a column address corresponding to the change data block and data corresponding to each of the non-change data blocks; and, for each change data block in which the data change is indicated by the change information, sending, to the memory device, a column corresponding to each of the change data blocks Addressing data corresponding to each of the changed data blocks; data corresponding to the data block, performing burst length data writing on each of the changed data blocks, the burst length and the data block of the at least one data block The number is equal.
  • the memory controller is configured to: if the number of the changed data blocks of the first to-be-written cache line and the burst length phase address and each location Describe the data corresponding to the change data block;
  • the memory device is configured to use, according to each of the column addresses, a number corresponding to each of the changed data blocks According to the data data of the burst length, the change data block of the first to-be-written Cache Line is performed.
  • the memory controller is configured to: if the number of the changed data blocks of the first to-be-written Cache Line is less than a burst length, Each change data block to be written to the Cache Line, and the column address and data corresponding to the change data block of the at least one second Cache Line to be written are sent to the memory device, and the at least one second Cache Line to be written And a sum of the changed data block and the number of changed data blocks of the first to-be-written Cache Line is less than or equal to the burst length;
  • the memory device is configured to: according to each column address of the first to-be-written Cache Line, and each column address of the at least one second to-be-written Cache Line, to each of the first to-be-written Cache Lines And changing data blocks, and the change data blocks of the at least one second to-be-written cache line, performing data writing of the burst length, where the second to-be-written cache line is in the LLC The first to be written to the Cache outside the Cache Line; Line.
  • the first to-be-written Cache Line and the at least one second to-be-written Cache Line The same row belonging to the same storage group Bank, and there is no read command for the same row in the LLC.
  • the first, the second, or the third possible implementation manner of the second aspect in a fourth possible implementation manner of the second aspect, use a separate column address buffer and a column decoder for data writing.
  • the memory controller sends the column address and the data to the memory device only according to the change information sent by the cache, and only the data block whose data on the data block changes, so that the memory device The data is written to each change data block, and the data block whose data has not changed is not written, thereby realizing fast writing of effective data, reducing the power consumption of the memory system, and improving the performance of the memory system.
  • FIG. 1 is a flow chart of a data writing method of the present invention
  • FIG. 2 is a schematic diagram of the operation of the LLC in the data writing method of the present invention.
  • FIG. 3 is a schematic diagram of the operation of the memory controller in the data writing method of the present invention.
  • FIG. 4 is a schematic diagram of operation of a memory device in a data writing method according to the present invention.
  • FIG. 5 is a timing diagram of a write command merge in the data writing method of the present invention.
  • FIG. 6 is a schematic structural view of a memory system of the present invention.
  • FIG. 1 is a flowchart of Embodiment 1 of a data writing method according to the present invention.
  • This embodiment is applicable to a scenario of writing data to a memory system including at least a memory controller and a memory device. Specifically, the embodiment includes the following steps:
  • the memory system receives the change information sent by the cache, and the change information is that the cache divides the first to-be-written cache line Cache Line of the last-level cache LLC into at least one data block, and the generated indication is on each data block. Information on whether the data has changed.
  • Cache Cache is located in the central processing unit (CPU) and large capacity Between the memory systems, there is a higher access speed.
  • the cache divides the first to-be-written cache strip Cache Line of the last-level cache LLC into at least one data block, adding an identifier bit for each data block, and using the identifier bit to represent the data on the data block. Whether a change occurs, a Cache Line requires multiple identifier bits, and multiple identifier bits of each Cache Line constitute change information indicating whether the data on each data block of the Cache Line changes.
  • a Cache Line is divided into a plurality of data blocks, and a flag bit identified by 0 or 1 is added for each data block, where 0 indicates that the data on the data block has not changed. That is, the value of the data block does not change; 1 indicates that the data on the data block changes, that is, the value of the data block changes, and the identification bits of each Cache Line constitute a Changed Block Vector (CBV) of the Cache Line, That is, change information.
  • CBV Changed Block Vector
  • FIG. 2 is a schematic diagram of the operation of the LLC in the data writing method of the present invention.
  • the original data (old data) in the Cache Line is read first, and the data to be written (new data) Comparing, if the data on one data block has not changed, the identification bit of the data block is identified as 0; otherwise, if a change occurs, the identification bit of the data block is identified as 1.
  • the CBV information corresponding to the Cache Line is transmitted to the memory controller of the memory system, and the memory controller receives the CBV information, that is, receives the corresponding change information.
  • the upper Cache executes 1 to write data to a certain Cache Line of the LLC
  • the original data D1 of the data block is read, and D1 and the data D2 to be written are first passed through the comparator.
  • the comparison results are recorded in the CBV.
  • the upper Cache reads the data of other data blocks in the Cache Line and compares it with the new data to be written into the data blocks, and records the comparison result of each data block in the CBV, thereby obtaining the Cache Line.
  • CBV information ie change information.
  • the memory controller changes, according to the change information, that no change occurs in the data indicated by the change information.
  • the data corresponding to the data block is sent to the memory device for each changed data block in which the data change occurs, and the data corresponding to each changed data block and the data corresponding to each changed data block are transmitted to the memory device.
  • FIG. 3 is a schematic diagram of the operation of the memory controller in the data writing method of the present invention.
  • the memory controller of the memory system includes a request queue (Tansaction Queue) and a command queue (Command Queue).
  • the LLC writeback request is first placed in the request queue, and the memory controller translates the writeback request into a specific command that operates the memory device and places the command in the command queue.
  • the memory controller determines whether it is necessary to write to each data block of the first Cache Line to be written according to the change information of the first Cache Line to be written.
  • the write is not performed by using the burst write, and the change data block of the data on the data block is changed by the address bus and the data bus, etc.
  • One shot sends the column address and data corresponding to a data block to the memory controller.
  • the data frequency of the data bus is twice the data bus clock frequency, so each beat is half a clock cycle.
  • the memory device performs burst length data writing on each changed data block according to a column address corresponding to each changed data block and data corresponding to each changed data block, and the burst length is equal to the number of data blocks of at least one data block.
  • the number of data blocks into which the first Cache Line to be written is divided is the number of consecutive burst writes.
  • the memory device writes burst length data for each changed data block according to the received column address and data.
  • the memory device of this embodiment includes multiple column address buffers and column decoders, compared to only one column address buffer and one column decoder in a memory device in the prior art.
  • FIG. 4 is a schematic diagram of the operation of the memory device in the data writing method of the present invention.
  • the memory device includes a row address buffer, a row decoder, a column address buffer, and a burst length. a number of column decoders, a Sense Amplifier Array (SA), and a Memory Array, a Data in Buffer, etc.
  • SA Sense Amplifier Array
  • the data block is changed, and the memory device uses a separate column address buffer to write data to the column decoder.
  • the memory controller sends the column address and the data to the memory device only according to the change information sent by the cache, and only the data block whose data on the data block changes, so that the memory device changes each other.
  • the data block performs data writing, and does not write data blocks whose data has not changed, thereby realizing fast writing of effective data, reducing the power consumption of the memory system, and improving the performance of the memory system.
  • the memory controller determines, according to the change information, whether the data block needs to be written, and the change data block that is changed by the change information, if the first to be written to the Cache Line
  • the number of the changed data blocks is equal to the burst length
  • the memory controller sends the column address corresponding to each changed data block and the data corresponding to each changed data block to the memory device.
  • the memory device writes burst length data for each change data block to be written to the Cache Line according to each column address.
  • the cache divides the first Cache Line to be written into the LLC into at least one data block, and performs a burst write for each data block, and the number of the obtained data blocks is the number of burst writes, that is, the burst Hair length.
  • the number of changed data blocks is equal to the burst length, that is, the data on each data block obtained by the partitioning changes, and the change information received by the memory controller is each data indicating the Cache line. The data on the block has changed.
  • the memory controller sends the column address and data corresponding to the data block to the memory device, and the memory device stores the plurality of column addresses to be stored in different In the column address buffer, and parallel decoding by different column decoders, select different columns in the SAA, and write data to the selected columns, and finally write the data in the SAA back to the storage array, thereby Writes to each data block of the first Cache Line to be written.
  • the memory controller sends 8 column addresses to the memory device and Corresponding data, the memory device is provided with 8 column address buffers and column decoders, and each column address buffer stores a column address.
  • the column decoder corresponding to each column address is decoded in parallel.
  • the memory controller determines, according to the change information, whether the data block needs to be written, and the change data block that is changed by the change information, if the first to be written to the Cache Line
  • the number of the changed data blocks is less than the burst length, and the changed data blocks of the first Cache Line to be written, and the column address and data corresponding to the at least one second changed data block to be written to the Cache Line are sent to the memory device.
  • the sum of the changed data block of the at least one second Cache Line to be written and the changed data block of the first Cache Line to be written is less than or equal to the burst length.
  • the memory device records, according to each column address of the first Cache Line to be written, and each column address of the at least one second Cache Line to be written, the change data block of the first Cache Line to be written, and at least one The second change data block to be written into the Cache Line performs data write of the burst length, and the second Cache Line to be written is the Cache Line to be written in the LLC except the first Cache Line to be written.
  • the cache divides the first Cache Line to be written into the LLC into at least one data block, and performs a burst write for each data block, and the number of the obtained data blocks is the number of burst writes, that is, Burst length.
  • the number of changed data blocks is smaller than the burst length, only the data on the partial data blocks in the divided data blocks is changed.
  • the write command merges, and the write command merges to complete multiple write requests in a fixed burst length clock cycle, thereby avoiding waste of clock cycles and reducing memory. The power consumption of the system, thereby improving the performance of the memory system.
  • the write back request of the LLC to the memory controller to write the Cache Line size data is first stored in the request queue, and the memory controller converts the write back requests into write commands for operating the memory device, and each The write command is placed in the command queue.
  • the memory device sends the first write command to be written to the Cache Line
  • the command queue selects from the command queue.
  • the write command corresponding to the at least one second Cache line to be written, the sum of the number of changed data blocks of each second Cache Line to be written and the number of changed data blocks of the first Cache line to be written is less than or equal to the burst length.
  • each beat memory controller sends the corresponding column address and data of a change data block to be written to the Cache Line to the memory device, when the first to be written After the column address and data corresponding to the change data block of the Cache Line are sent, each subsequent beat continues to send the column address and data corresponding to a change data block of the second cache line to be written to the memory device, and the process is repeated until the write Enter BL data blocks, or find a write command that can be merged in the command queue, that is, the number of written data blocks is smaller than BL.
  • the write command corresponding to the first Cache Line to be written and the at least one second to be written are required in the data writing process.
  • the write command corresponding to the Cache Line is combined by the write command, the number of the changed data blocks of each of the second Cache Lines to be written corresponding to the mergeable write command and the number of the changed data blocks of the first Cache Line to be written are satisfied.
  • each write command needs to satisfy the following conditions: the first to-be-written Cache Line and the at least one second Cache Line to be written belong to the same row of the same storage group Bank, and in the LLC There are no read commands for the same line. That is, the write command corresponding to the first Cache Line to be written and the write command corresponding to each of the second Cache Lines to be written are writes to the same row of the same storage group Bank, and each of the second Cache Lines to be written corresponds to There is no read request for this same line in the write command.
  • the memory device also includes a Row Test to test whether each write command is a data write to the same row of the same bank group Bank.
  • the command information in the memory controller's command queue is shown in Table 1 below: The three write commands operate on the same bank, the write command Writel, the write command Write3 writes the row Rowl, and the write command Write2 writes the row Row2.
  • FIG. 5 is a timing diagram of a write command merge in the data writing method of the present invention.
  • the memory controller sends the Writel and column address columns coll, col2, col3, and col4, and the next 4 beats, namely T2 and T3.
  • Write3 and column addresses col3, col4, col5, and col6 are sent on the rising and falling edges of the clock cycle.
  • send Write2 and the corresponding column address At time T5, the burst data Dn appears on the data bus, and the burst writes 8 times, so that the Cache Line corresponding to the Writel and the Cache Line corresponding to the Write3 are written to the memory device.
  • coll represents the column address corresponding to the first data block of the 8 data blocks of the Cache Line corresponding to Writel
  • D1 represents the data corresponding to the first data block, and so on.
  • the number of change data of the Cache Line corresponding to the Cache Line and the Write2 corresponding to the two write commands Writel of the merged writel and Write3 is BL and the BL is taken as an example.
  • the present invention is described in detail. However, the present invention is not limited thereto. In other possible implementations, the combination of multiple write commands may also be used, for example, the corresponding Cache Line of the Cache Line and Write3 corresponding to Writel.
  • the number of change data is less than BL, other mergeable write commands can be selected from the command queue.
  • FIG. 6 is a schematic structural diagram of a memory system according to the present invention, and is an apparatus embodiment corresponding to the embodiment of FIG. 1 of the present invention.
  • the memory system 100 provided in this embodiment includes at least a memory controller 10 and a memory device 11.
  • the memory controller 10 is configured to receive the change information sent by the cache, where the change information is an indication that the cache divides the first to-be-written cache line Cache Line of the last-level cache LLC into at least one data block.
  • the information of whether the data on each data block changes; according to the change information, for each non-changing data block indicating that the data change does not occur, the column address corresponding to each non-changing data block and each non-change are not sent to the memory device.
  • the memory controller 10 is configured to: if the first data block to be written into the change data block of the Cache Line corresponds to the changed data block.
  • the memory device 11 is configured to perform burst length data writing on each changed data block of the first Cache Line to be written according to each column address.
  • the memory controller 10 is configured to: if the number of the changed data blocks to be written into the Cache Line is less than the burst length, the first change data block to be written into the Cache Line, and at least one second to be written.
  • the column address and data corresponding to the change data block of the Cache Line are sent to the memory device 11, and the sum of the change data block of the at least one second Cache Line to be written and the change data block of the first Cache Line to be written is less than or equal to the burst. Length
  • the memory device 11 is configured to: according to each column address of the first to-be-written Cache Line, and at least one column address of the second Cache Line to be written, each change data block to be written to the Cache Line, and at least one The second change data block to be written into the Cache Line performs data write of the burst length, and the second Cache Line to be written is the Cache Line to be written except the first Cache Line to be written in the LLC.
  • first to-be-written Cache Line and the at least one second to-be-written Cache Line belong to the same row of the same storage group Bank, and there is no read command for the same row in the LLC.
  • the memory device 11 is provided with a burst length number of column address buffers and burst lengths.
  • the number of column decoders, for each change data block, uses a separate column address buffer and column decoder for data writing.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

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)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本发明实施例提供一种数据写入方法及内存系统,该方法适用于至少包括内存控制器与内存设备的内存系统,该方法包括:内存控制器接收高速缓存发送的变化信息,变化信息为高速缓存将最后一级缓存LLC的第一待写入高速缓存条Cache Line划分为至少一个数据块后,生成的指示各数据块上的数据是否发生变化的信息,内存控制器根据变化信息,对于数据发生变化的各变化数据块,向内存设备发送对应的列地址和数据,使内存设备对各变化数据块进行数据写入;对于数据未发生变化的数据块,不进行写入,从而实现对有效数据的快速写入,降低内存系统的能耗、提高内存系统的性能的目的。

Description

数据写入方法及内存系统 本申请要求于 2013 年 6 月 29 日提交中国专利局、 申请号为 201310270239.6、发明名称为 "数据写入方法及内存系统" 的中国专利申请的 优先权, 上述专利申请的全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及计算机技术, 尤其涉及一种数据写入方法及内存 系统。
背景技术
当前的内存系统基本包括内存控制器 (Memory Controller, MC ) 、 内存设备等, MC与内存设备之间通过双倍数据频率( Double Data Rate , DDR ) 协议进行数据交互, MC釆用突发 (Burst ) 写的方式将数据写入 内存设备, 一次突发写的数据块大小为内存数据总线宽度, 而高速緩存 ( Cache ) 与内存系统之间的数据交互以高速緩存条 ( Cache Line ) 为单 位, 一次读写的数据大小为 Cache的最后一级 Cache ( Last Level Cache , LLC ) 的一个 Cache Line的大小。 因此, MC需要多次连续的突发写才 能将一个 Cache Line的数据写入内存设备中, 其中, 连续突发写的次数 称之为突发长度 ( Burst Length, BL ) 。
DDR3协议中, BL—般等于 8 , 以一次突发写的数据块大小为粒度, 将一个 Cache Line划分多个数据块。 例如, 若 LLC的一个 Cache Line 的大小为 64Byte , 内存数据总线宽度为 64bit, 则在数据总线上出现突发 写的数据时, MC需要在连续的 4个时钟周期上,突发写 8次才能将 LLC 的一个 Cache Line的数据写入内存设备。然而,实际上, LLC的一个 Cache Line数据写入内存设备时, 很多数据块并没有改变, 写入过程中, 会存 在某些次的突发写并向内存设备中写入无效数据的情况, 导致有效数据 的写入速度緩慢, 且大量无效数据的写入使得内存系统能耗增大, 从而 降低了内存系统的性能。
DDR3协议支持的 BC4技术中, MC向内存设备写数据时, 连续的 2 个时钟周期共突发写 4次, 之后的 2个时钟周期没有突发写数据, 从而 将一个 Cache Line的前一半数据或者后一半数据写入内存设备。 该过程 中, 前两个时钟周期内, 不区分数据块上的数据是否改变的写入方式, 也存在某些次的突发写并向内存设备中写入无效数据的情况, 导致有效 数据的写入速度緩慢, 且大量无效数据的写入使得内存系统能耗增大, 从而降低了内存系统的性能。
发明内容
本发明实施例提供一种数据写入方法及内存系统, 通过区分 Cache Line中的数据块上的数据是否发生变化, 仅对发生变化的数据块进行写 入, 从而实现有对有效数据的快速写入, 降低内存系统的能耗、 提高内 存系统的性能的目的。
第一个方面, 本发明实施例提供一种数据写入方法, 适用于至少包 括内存控制器与内存设备的内存系统, 包括:
所述内存控制器接收高速緩存发送的变化信息, 所述变化信息为所 述高速緩存将最后一级緩存 LLC的第一待写入高速緩存条 Cache Line划 分为至少一个数据块后, 生成的指示各所述数据块上的数据是否发生变 化的信息;
所述内存控制器根据所述变化信息, 对于所述变化信息指示的未发 生数据变化的各非变化数据块, 不向所述内存设备发送各所述非变化数 据块对应的列地址和各所述非变化数据块对应的数据; 对于所述变化信 息指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变 化数据块对应的列地址和各所述变化数据块对应的数据; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 所述 突发长度与所述至少一个数据块的数据块数量相等。
在第一个方面的第一种可能的实现方式中, 所述对于所述变化信息 指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变化 数据块对应的列地址和各所述变化数据块对应的数据, 包括:
若所述第一待写入 Cache Line的所述变化数据块的数量与所述突发 长度相等, 则所述内存控制器向所述内存设备发送各所述变化数据块对 应的列地址和各所述变化数据块对应的数据; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 包括: 所述内存设备根据各所述列地址和各所述变化数据块对应的数据, 对所述第一待写入 Cache Line的各变化数据块进行所述突发长度的数据 写入。
在第一个方面的第二种可能的实现方式中, 所述对于所述变化信息 指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变化 数据块对应的列地址和各所述变化数据块对应的数据, 包括:
若所述第一待写入 Cache Line的所述变化数据块的数量小于所述突 发长度, 则将所述第一待写入 Cache Line的各变化数据块, 以及至少一 内存设备, 所述至少一个第二待写入 Cache Line的变化数据块与所述第 一待写入 Cache Line的变化数据块的数量之和小于等于所述突发长度; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 包括: 所述内存设备根据所述第一待写入 Cache Line的各列地址, 以及所 述至少一个第二待写入 Cache Line的各列地址,对所述第一待写入 Cache Line的各变化数据块, 以及所述至少一个第二待写入 Cache Line的各变 化数据块, 进行所述突发长度的数据写入, 所述第二待写入 Cache Line 为所述 LLC中除所述第一待写入 Cache Line之外的待写入 Cache Line。
结合第一个方面的第二种可能的实现方式, 在第一个方面的第三种 可能的实现方式中, 所述第一待写入 Cache Line与所述至少一个第二待 写入 Cache Line属于同一个存储组 Bank的相同行, 且所述 LLC中没有 对所述相同行的读命令。
结合第一个方面、 第一个方面的第一种至第三种中任一种可能的实 现方式, 在第一个方面的第四种可能的实现方式中, 所述内存设备根据 各所述变化数据块对应的列地址和各所述变化数据块对应的数据, 对各 所述变化数据块进行突发长度的数据写入, 包括:
所述内存设备上设置有所述突发长度数量的列地址緩存与所述突发 长度数量的列译码器, 对于每一所述变化数据块, 釆用独立的列地址緩 存与列译码器进行数据写入。
第二个方面, 本发明实施例提供一种内存系统, 至少包括内存控制 器与内存设备, 包括:
所述内存控制器用于接收高速緩存发送的变化信息, 所述变化信息 为所述高速緩存将最后一级緩存 LLC 的第一待写入高速緩存条 Cache Line划分为至少一个数据块后, 生成的指示各所述数据块上的数据是否 发生变化的信息; 根据所述变化信息, 对于所述变化信息指示的未发生 数据变化的各非变化数据块, 不向所述内存设备发送各所述非变化数据 块对应的列地址和各所述非变化数据块对应的数据; 对于所述变化信息 指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变化 数据块对应的列地址和各所述变化数据块对应的数据; 化数据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 所述突发长度与所述至少一个数据块的数据块数量相等。
在第二个方面的第一种可能的实现方式中, 所述内存控制器用于若 所述第一待写入 Cache Line的所述变化数据块的数量与所述突发长度相 地址和各所述变化数据块对应的数据;
所述内存设备用于根据各所述列地址和各所述变化数据块对应的数 据, 对所述第一待写入 Cache Line的各变化数据块进行所述突发长度的 数据写入。
在第二个方面的第二种可能的实现方式中, 所述内存控制器用于若 所述第一待写入 Cache Line的所述变化数据块的数量小于突发长度, 则 将所述第一待写入 Cache Line的各变化数据块, 以及至少一个第二待写 入 Cache Line的变化数据块对应的列地址与数据发送至所述内存设备, 所述至少一个第二待写入 Cache Line 的变化数据块与所述第一待写入 Cache Line的变化数据块的数量之和小于等于所述突发长度;
所述内存设备用于根据所述第一待写入 Cache Line的各列地址, 以 及所述至少一个第二待写入 Cache Line的各列地址, 对所述第一待写入 Cache Line的各变化数据块, 以及所述至少一个第二待写入 Cache Line 的各变化数据块,进行所述突发长度的数据写入,所述第二待写入 Cache Line为所述 LLC 中除所述第一待写入 Cache Line之外的待写入 Cache ; Line。
结合第二个方面的第二种可能的实现方式, 在第二个方面的第三种 可能的实现方式中, 所述第一待写入 Cache Line与所述至少一个第二待 写入 Cache Line属于同一个存储组 Bank的相同行, 且所述 LLC中没有 对所述相同行的读命令。
结合第二个方面、 第二个方面的第一种、 第二种或第三种可能的实 现方式, 在第二个方面的第四种可能的实现方式中, 所述内存设备上设 置有所述突发长度数量的列地址緩存与所述突发长度数量的列译码器, 对于每一所述变化数据块, 釆用独立的列地址緩存与列译码器进行数据 写入。
本发明实施例提供的数据写入方法及内存系统, 内存控制器根据高 速緩存发送的变化信息, 仅对数据块上的数据发生变化的数据块, 向内 存设备发送列地址和数据, 使内存设备对各变化数据块进行数据写入, 对数据未发生变化的数据块, 不进行写入, 从而实现有效数据的快速写 入, 降低内存系统的能耗、 提高内存系统的性能的目的。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人 员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他 的附图。
图 1为本发明数据写入方法的流程图;
图 2为本发明数据写入方法中的 LLC工作示意图;
图 3为本发明数据写入方法中的内存控制器工作示意图;
图 4为本发明数据写入方法中的内存设备的工作示意图;
图 5为本发明数据写入方法中写命令合并的时序图;
图 6为本发明内存系统的结构示意图。
具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1 为本发明数据写入方法实施例一的流程图。 本实施例适用于向至少 包括内存控制器与内存设备的内存系统写入数据的场景。 具体的, 本实施例 包括以下步骤:
101、 内存系统接收高速緩存发送的变化信息, 变化信息为高速緩存将最 后一级緩存 LLC的第一待写入高速緩存条 Cache Line划分为至少一个数据块 后, 生成的指示各数据块上的数据是否发生变化的信息。
高速緩存 Cache位于中央处理器(central processing unit, CPU )与大容 量的内存系统之间, 有较高的存取速度。 本步骤中, 高速緩存将最后一级緩 存 LLC的第一待写入高速緩存条 Cache Line划分为至少一个数据块, 为每一 个数据块增加一个标识位, 用标识位表示该数据块上的数据是否发生变化, 一个 Cache Line需要多个标识位, 每个 Cache Line的多个标识位组成指示该 Cache Line的各数据块上的数据是否发生变化的变化信息。例如, 以内存数据 线总线宽度为粒度, 将一个 Cache Line划分为多个数据块, 为每一个数据块 增加一个用 0或 1标识的标识位, 0表示该数据块上的数据未发生变化, 即数 据块的值没有改变; 1表示该数据块上的数据发生变化, 即数据块的值发生了 变化, 各个 Cache Line的标识位组成该 Cache Line的改变块向量 ( Changed Block Vector, CBV ) , 即变化信息。 具体的, 假设一个 Cache Line大小为 64 字节, 内存数据总线宽度为 64比特, 则可以将一个 Cache Line划分为 8个数 据块, 突发长度 BL=8, 即一个 CBV的大小为 8比特。
图 2为本发明数据写入方法中的 LLC工作示意图。 如图 2所示, 当高速 緩存的上一级 Cache向 LLC的一个 Cache Line写回数据时, 先读出该 Cache Line中原来的数据 ( old data ) , 并与要写入的数据 ( new data )比较, 如果一 个数据块上的数据没有改变, 则将该数据块的标识位标识为 0; 否则, 若发生 了变化, 则将该数据块的标识位标识为 1。 当 LLC将该 Cache Line的数据写 入内存系统时, 同时该 Cache Line对应的 CBV信息传递给内存系统的内存控 制器, 内存控制器接收该 CBV信息, 即接收对应的变化信息。 以标签为 Tagl 的数据块为例, 上一级 Cache执行①向 LLC的某一 Cache Line写数据时, 读 取该数据块原来的数据 D1 , 先将 D1与待写入的数据 D2通过比较器比较, 将比较结果记录在 CBV中。 同理, 上一级 Cache读出该 Cache Line中其他数 据块的数据并与待写入该些数据块的新数据做比较, 将各数据块的比较结果 记录在 CBV中, 从而得到该 Cache Line的 CBV信息, 即变化信息。 当 LLC 执行②向内存系统写回时, 即向内存系统发送写回请求以写入数据的时候, 同时执行③, 将待写入 Cache Line的变化信息也发送给内存系统。
102、 内存控制器根据变化信息, 对于变化信息指示的未发生数据变化的 化数据块对应的数据; 对于变化信息指示的发生数据变化的各变化数据块, 向内存设备发送各变化数据块对应的列地址和各变化数据块对应的数据。
本步骤中, 内存系统的内存控制器根据接收到的变化信息, 判断是否需 要对第一待写入 Cache Line 的各个数据块进行写入。 具体的, 请参见图 3. 图 3为本发明数据写入方法中的内存控制器工作示意图。请参照图 3 , 内 存系统的内存控制器包括请求队列( Tansaction Queue )和命令队列( Command Queue )等。 LLC的写回请求首先被放到请求队列中, 内存控制器将写回请求 转换成操作内存设备的具体命令, 并将命令存放到命令队列中。 内存控制器 根据第一待写入 Cache Line的变化信息, 判断是否需要对第一待写入 Cache Line 的各个数据块进行写入。 具体的, 对于数据块上的数据未发生变化的非 变化数据块, 不釆用突发写进行写入, 对于数据块上的数据发生变化的变化 数据块, 通过地址总线和数据总线等, 每一拍向内存控制器发送一个数据块 对应的列地址和数据。 其中, 由于 DDR技术在一个时钟周期的上升沿和下降 沿都传输数据, 数据总线的数据频率是数据总线时钟频率的两倍, 因此, 每 一拍即半个时钟周期。
103、 内存设备根据各变化数据块对应的列地址和各变化数据块对应的数 据, 对各变化数据块进行突发长度的数据写入, 突发长度与至少一个数据块 的数据块数量相等。
一般来说, 将第一待写入 Cache Line划分为的数据块的数量即为连续突 发写的次数。 本步骤中, 内存设备根据接收到的各列地址和数据, 对各变化 数据块进行突发长度的数据写入。
可选的, 相对于现有技术中一个内存设备中只有一个列地址緩存和一个 列译码器, 本实施例的内存设备包括多个列地址緩存和列译码器。 图 4 为本 发明数据写入方法中的内存设备的工作示意图。 请参照图 4, 本实施例中, 内 存设备上包括行地址緩存 ( row address buffer )、行地址译码器( row decoder )、 突发长度数量的列地址緩存 ( column address buffer ) 、 突发长度数量的列地 址译码器 ( column decoder )、 传感放大阵歹 'J ( Sense Amplifier Array, SAA ) , 以及存储阵列 ( Memory Array ) 、 写入数据緩存 ( Data in buffer )等, 对每一 变化数据块, 内存设备釆用独立的列地址緩存与列译码器进行数据写入。 每 次写入数据时, 对于内存控制器发送的多个列地址, 存放在不同的列地址緩 存中, 并通过不同的列译码器并向译码, 选中 SAA中的不同的列, 并向这些 被选中的列中写入数据, 最后将 SAA中的数据写回存储阵列中。
本发明实施例提供的数据写入方法, 内存控制器根据高速緩存发送的变 化信息, 仅对数据块上的数据发生变化的数据块, 向内存设备发送列地址和 数据, 使内存设备对各变化数据块进行数据写入, 对数据未发生变化的数据 块, 不进行写入, 从而实现有效数据的快速写入, 降低内存系统的能耗、 提 高内存系统的性能的目的。
可选的, 上述实施例一中, 内存控制器根据变化信息, 判断是否需要对 各数据块进行写入, 对于变化信息指示的发生数据变化的各变化数据块, 若 第一待写入 Cache Line的变化数据块的数量与突发长度相等, 则内存控制器 向内存设备发送各变化数据块对应的列地址和各变化数据块对应的数据。 相 应的, 内存设备根据各列地址, 对第一待写入 Cache Line的各变化数据块进 行突发长度的数据写入。
具体的, 高速緩存将 LLC的第一待写入 Cache Line划分为至少一个数据 块, 对每一个数据块进行一次突发写, 划分所得的数据块的数量即为突发写 的次数, 即突发长度。 本实施例中, 若变化数据块的数量与突发长度相等, 即划分所得的每个数据块上的数据都发生了变化, 内存控制器接收到的变化 信息为指示该 Cache line的每个数据块上的数据都发生了变化。 此时, 对于第 一待写入 Cache Line的每个数据块, 内存控制器都向内存设备发送该数据块 对应的列地址和数据, 内存设备将接收到的多个列地址, 存放到不同的列地 址緩存中, 并通过不同的列译码器并行译码, 选中 SAA中的不同的列, 并向 这些被选中的列中写入数据, 最后将 SAA中的数据写回存储阵列中, 从而对 第一待写入 Cache Line的各个数据块进行写入。例如,将第一待写入 Cache line 以内存数据总线宽度为粒度划分为 8个数据块, 该 8个数据块上的数据都发 生了变化, 则内存控制器向内存设备发送 8个列地址和对应的数据, 内存设 备上设置有 8个列地址緩存和列译码器, 每个列地址緩存存放一个列地址, 各列地址对应的列译码器并行译码。
可选的, 上述实施例一中, 内存控制器根据变化信息, 判断是否需要对 各数据块进行写入, 对于变化信息指示的发生数据变化的各变化数据块, 若 第一待写入 Cache Line的变化数据块的数量小于突发长度, 则将第一待写入 Cache Line的各变化数据块, 以及至少一个第二待写入 Cache Line的变化数 据块对应的列地址与数据发送至内存设备。 其中, 至少一个第二待写入 Cache Line的变化数据块与第一待写入 Cache Line的变化数据块之和小于等于突发 长度。 相应的, 内存设备根据第一待写入 Cache Line的各列地址, 以及至少 一个第二待写入 Cache Line的各列地址, 对第一待写入 Cache Line的各变化 数据块, 以及至少一个第二待写入 Cache Line的各变化数据块, 进行突发长 度的数据写入, 第二待写入 Cache Line为 LLC中除第一待写入 Cache Line之 夕卜的待写入 Cache Line。
一般来说, 高速緩存将 LLC的第一待写入 Cache Line划分为至少一个数 据块, 对每一个数据块进行一次突发写, 划分所得的数据块的数量即为突发 写的次数, 即突发长度。 本实施例中, 若变化数据块的数量小于突发长度, 即划分所得的各数据块中只有部分数据块上的数据发生了变化。 此时, 内存 控制器在进行命令调度时, 进行写命令合并, 通过写命令合并的方式, 在一 个固定突发长度的时钟周期内, 完成多个写请求, 从而避免时钟周期的浪费, 降低内存系统的能耗, 从而提高内存系统的性能。
具体的, LLC向内存控制器发送的各请求写入 Cache Line大小数据的写 回请求首先存储在请求队列中, 内存控制器将该些写回请求转换成操作内存 设备的写命令, 并将各写命令存放到命令队列中。 内存设备发送第一待写入 Cache Line的写命令时, 若内存控制器根据第一待写入 Cache Line的变化信 息, 发现该 Cache Line的变化数据块小于突发长度, 则从命令队列中选择至 少一个第二待写入 Cache line对应的写命令,各第二待写入 Cache Line的变化 数据块的数量与第一待写入 Cache line 的变化数据块的数量之和小于等于突 发长度。 在 BL次的突发长度中, 每一拍内存控制器将第一待写入 Cache Line 的一个变化数据块的对应的列地址和数据发送至内存设备, 当第一待写入 Cache Line的变化数据块对应的列地址和数据发送完毕后,后续每一拍继续向 内存设备发送第二待写入 Cache Line的一个变化数据块对应的列地址和数据, 重复该过程, 直到写入 BL个数据块, 或者在命令队列中找不到可以合并的写 命令, 即写入的数据块的个数小于 BL。
需要说明的是, 上述若第一待写入 Cache Line的变化数据块的数量小于 突发长度, 数据写入过程中需要对第一待写入 Cache Line对应的写命令与至 少一个第二待写入 Cache Line对应的写命令进行写命令合并时, 除了满足可 合并的写命令对应的各第二待写入 Cache Line的变化数据块的数量与第一待 写入 Cache Line的变化数据块的数量之和小于等于突发长度的条件外, 各写 命令还需满足以下条件:第一待写入 Cache Line与至少一个第二待写入 Cache Line属于同一个存储组 Bank的相同行, 且 LLC中没有对相同行的读命令。 即第一待写入 Cache Line对应的写命令与各第二待写入 Cache Line对应的写 命令是对同一个存储组 Bank的相同行的写入, 且各个第二待写入 Cache Line 对应的写命令中不存在对该相同行的读请求。 此时, 请参照图 4, 内存设备中 还包括一个行测试(Row Test ) , 用于测试各个写命令是否是对相同存储组 Bank的相同行的数据写入。
具体的, 假设 LLC的一个 Cache Line的大小为 64Byte, 内存数据总线宽 度为 64比特, 突发长度 BL=8。 内存控制器的命令队列中的命令信息如下表 1 所示: 三个写命令操作的是同一 Bank, 写命令 Writel、 写命令 Write3写的是 行 Rowl , 写命令 Write2写的是行 Row2。
表 1
W R
C BV
rite ow
W R
ritel owl
W R
rite2 ow2
W R rite3 owl
由表 1可知, Writel和 Write3写的是同一行, 且 CBV, 即变化信息显示 Write 1对应的 Cache Line的变化数据块的数量与 Write3的对应的 Cache Line 的变化数据块的数量之和为 8 (如表 1中阴影部分所示)。 因此, 可对 Writel 和 Write3进行写命令合并, 内存控制器在完成 Writel和 Write3的调度后,再 调度 Write2。 具体的, 请参照图 5。
图 5为本发明数据写入方法中写命令合并的时序图。 如图 5所示, 前 4 拍, 即 TO和 T1时钟周期的上升沿和下降沿, 内存控制器发送 Writel和列地 址列 coll , col2、 col3和 col4, 接下来的 4拍, 即 T2和 T3时钟周期的上升沿 和下降沿发送 Write3和列地址 col3、 col4、 col5和 col6。 然后, 再发送 Write2 及对应的列地址。 在 T5时刻, 数据总线上出现突发写的数据 Dn, 突发写 8 次,从而将 Writel对应的 Cache Line和 Write3对应的 Cache Line的变化数据 块写入到内存设备中。 其中, coll表示 Writel对应的 Cache Line的 8个数据 块中第一个数据块对应的列地址, D1表示该第一个数据块对应的数据 ... ...以 此类推。
需要说明的是, 上述实施例中是以 Writel和 Write3两个写命令合并、 该 可合并的两个写命令 Writel对应的 Cache Line和 Write2的对应的 Cache Line 的变化数据的数量和为 BL为例对本发明进行详细阐述, 然而, 本发明并不以 此为限, 在其他可能的实施方式中, 也可以是多个写命令的合并, 例如, 当 Writel对应的 Cache Line和 Write3的对应的 Cache Line的变化数据的数量和 小于 BL时, 可从命令队列中选择其他可合并的写命令。 另外, 若命令队列中 所有可合并的写命令对应的 Cache Line的变化数据块之和小于 BL, 此时, 依 旧进行 BL次的突发写, 该 BL次突发写的某几个时钟周期或时钟周期的某几 拍空闲。另夕卜,图 5中,仅示出了动态随机存取存储器( Dynamic Random Access Memory, DRAM ) 的 3个内存时钟( internal CK ) , 而实际上共有 8个。
图 6为本发明内存系统的结构示意图, 是与本发明图 1 实施例对应的装 置实施例, 具体实现过程在此不再赘述。 具体的, 本实施例提供的内存系统 100至少包括内存控制器 10与内存设备 11。 具体的, 内存控制器 10用于接收高速緩存发送的变化信息, 变化信息为 高速緩存将最后一级緩存 LLC的第一待写入高速緩存条 Cache Line划分为至 少一个数据块后, 生成的指示各数据块上的数据是否发生变化的信息; 根据 变化信息, 对于变化信息指示的未发生数据变化的各非变化数据块, 不向内 存设备发送各非变化数据块对应的列地址和各非变化数据块对应的数据; 对 于变化信息指示的发生数据变化的各变化数据块, 向内存设备发送各变化数 据块对应的列地址和各变化数据块对应的数据; 数据, 对各变化数据块进行突发长度的数据写入, 突发长度与至少一个数据 块的数据块数量相等。
进一步的, 内存控制器 10用于若第一待写入 Cache Line的变化数据块的 变化数据块对应的数据。
内存设备 11用于根据各列地址, 对第一待写入 Cache Line的各变化数据 块进行突发长度的数据写入。
进一步的, 内存控制器 10用于若第一待写入 Cache Line的变化数据块的 数量小于突发长度, 则将第一待写入 Cache Line的各变化数据块, 以及至少 一个第二待写入 Cache Line的变化数据块对应的列地址与数据发送至内存设 备 11 ,至少一个第二待写入 Cache Line的变化数据块与第一待写入 Cache Line 的变化数据块之和小于等于突发长度;
内存设备 11用于根据第一待写入 Cache Line的各列地址, 以及至少一个 第二待写入 Cache Line的各列地址, 对第一待写入 Cache Line的各变化数据 块, 以及至少一个第二待写入 Cache Line的各变化数据块, 进行突发长度的 数据写入, 第二待写入 Cache Line为 LLC中除第一待写入 Cache Line之外的 待写入 Cache Line。
进一步的, 第一待写入 Cache Line与至少一个第二待写入 Cache Line属 于同一个存储组 Bank的相同行, 且 LLC中没有对相同行的读命令。
进一步的, 内存设备 11上设置有突发长度数量的列地址緩存与突发长度 数量的列译码器, 对于每一变化数据块, 釆用独立的列地址緩存与列译码器 进行数据写入。
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算机可 读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步骤; 而 前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码 的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权利 要求 书
1、 一种数据写入方法, 适用于至少包括内存控制器与内存设备的内 存系统, 其特征在于, 包括:
所述内存控制器接收高速緩存发送的变化信息, 所述变化信息为所 述高速緩存将最后一级緩存 LLC的第一待写入高速緩存条 Cache Line划 分为至少一个数据块后, 生成的指示各所述数据块上的数据是否发生变 化的信息;
所述内存控制器根据所述变化信息, 对于所述变化信息指示的未发 生数据变化的各非变化数据块, 不向所述内存设备发送各所述非变化数 据块对应的列地址和各所述非变化数据块对应的数据; 对于所述变化信 息指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变 化数据块对应的列地址和各所述变化数据块对应的数据; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 所述 突发长度与所述至少一个数据块的数据块数量相等。
2、 根据权利要求 1所述的方法, 其特征在于, 所述对于所述变化信 息指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变 化数据块对应的列地址和各所述变化数据块对应的数据, 包括:
若所述第一待写入 Cache Line的所述变化数据块的数量与所述突发 长度相等, 则所述内存控制器向所述内存设备发送各所述变化数据块对 应的列地址和各所述变化数据块对应的数据; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 包括: 所述内存设备根据各所述列地址和各所述变化数据块对应的数据, 对所述第一待写入 Cache Line的各变化数据块进行所述突发长度的数据 写入。
3、 根据权利要求 1所述的方法, 其特征在于, 所述对于所述变化信 息指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变 化数据块对应的列地址和各所述变化数据块对应的数据, 包括:
若所述第一待写入 Cache Line的所述变化数据块的数量小于所述突 发长度, 则将所述第一待写入 Cache Line的各变化数据块, 以及至少一 内存设备, 所述至少一个第二待写入 Cache Line的变化数据块与所述第 一待写入 Cache Line的变化数据块的数量之和小于等于所述突发长度; 据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 包括: 所述内存设备根据所述第一待写入 Cache Line的各列地址, 以及所 述至少一个第二待写入 Cache Line的各列地址,对所述第一待写入 Cache Line的各变化数据块, 以及所述至少一个第二待写入 Cache Line的各变 化数据块, 进行所述突发长度的数据写入, 所述第二待写入 Cache Line 为所述 LLC中除所述第一待写入 Cache Line之外的待写入 Cache Line。
4、根据权利要求 3所述的方法,其特征在于, 所述第一待写入 Cache Line与所述至少一个第二待写入 Cache Line属于同一个存储组 Bank的相 同行, 且所述 LLC中没有对所述相同行的读命令。
5、 根据权利要求 1~4任一项所述的方法, 其特征在于, 所述内存设 备根据各所述变化数据块对应的列地址和各所述变化数据块对应的数 据, 对各所述变化数据块进行突发长度的数据写入, 包括:
所述内存设备上设置有所述突发长度数量的列地址緩存与所述突发 长度数量的列译码器, 对于每一所述变化数据块, 釆用独立的列地址緩 存与列译码器进行数据写入。
6、 一种内存系统, 至少包括内存控制器与内存设备, 其特征在于, 包括:
所述内存控制器用于接收高速緩存发送的变化信息, 所述变化信息 为所述高速緩存将最后一级緩存 LLC 的第一待写入高速緩存条 Cache Line 划分为至少一个数据块后, 生成的指示各所述数据块上的数据是否 发生变化的信息; 根据所述变化信息, 对于所述变化信息指示的未发生 数据变化的各非变化数据块, 不向所述内存设备发送各所述非变化数据 块对应的列地址和各所述非变化数据块对应的数据; 对于所述变化信息 指示的发生数据变化的各变化数据块, 向所述内存设备发送各所述变化 数据块对应的列地址和各所述变化数据块对应的数据; 化数据块对应的数据, 对各所述变化数据块进行突发长度的数据写入, 所述突发长度与所述至少一个数据块的数据块数量相等。
7、 根据权利要求 6所述的内存系统, 其特征在于, 所述内存控制器 用于若所述第一待写入 Cache Line的所述变化数据块的数量与所述突发 长度相等, 则所述内存控制器向所述内存设备发送各所述变化数据块对 应的列地址和各所述变化数据块对应的数据;
所述内存设备用于根据各所述列地址和各所述变化数据块对应的数 据, 对所述第一待写入 Cache Line的各变化数据块进行所述突发长度的 数据写入。
8、 根据权利要求 6所述的内存系统, 其特征在于, 所述内存控制器 用于若所述第一待写入 Cache Line的所述变化数据块的数量小于突发长 度, 则将所述第一待写入 Cache Line的各变化数据块, 以及至少一个第 二待写入 Cache Line的变化数据块对应的列地址与数据发送至所述内存 设备, 所述至少一个第二待写入 Cache Line的变化数据块与所述第一待 写入 Cache Line的变化数据块的数量之和小于等于所述突发长度;
所述内存设备用于根据所述第一待写入 Cache Line的各列地址, 以 及所述至少一个第二待写入 Cache Line的各列地址, 对所述第一待写入 Cache Line 的各变化数据块, 以及所述至少一个第二待写入 Cache Line 的各变化数据块, 进行所述突发长度的数据写入, 所述第二待写入 Cache Line为所述 LLC 中除所述第一待写入 Cache Line之外的待写入 Cache ; Line。
9、 根据权利要求 8所述的内存系统, 其特征在于, 所述第一待写入 Cache Line 与所述至少一个第二待写入 Cache Line 属于同一个存储组 Bank的相同行, 且所述 LLC中没有对所述相同行的读命令。
10、 根据权利要求 6~9 任一项所述的内存系统, 其特征在于, 所述 内存设备上设置有所述突发长度数量的列地址緩存与所述突发长度数量 的列译码器, 对于每一所述变化数据块, 釆用独立的列地址緩存与列译 码器进行数据写入。
PCT/CN2014/080073 2013-06-29 2014-06-17 数据写入方法及内存系统 WO2014206220A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
EP14818249.6A EP2998867B1 (en) 2013-06-29 2014-06-17 Data writing method and memory system
JP2016522212A JP6159478B2 (ja) 2013-06-29 2014-06-17 データ書き込み方法及びメモリシステム
RU2016102771A RU2621611C1 (ru) 2013-06-29 2014-06-17 Способ записи данных и система памяти
KR1020157036978A KR101785189B1 (ko) 2013-06-29 2014-06-17 데이터 기입 방법 및 메모리 시스템
BR112015031803A BR112015031803A2 (pt) 2013-06-29 2014-06-17 método de gravação de dados e sistema de memória
AU2014301874A AU2014301874B2 (en) 2013-06-29 2014-06-17 Data writing method and memory system
US14/982,353 US20160110286A1 (en) 2013-06-29 2015-12-29 Data writing method and memory system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310270239.6 2013-06-29
CN201310270239.6A CN104252420B (zh) 2013-06-29 2013-06-29 数据写入方法及内存系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/982,353 Continuation US20160110286A1 (en) 2013-06-29 2015-12-29 Data writing method and memory system

Publications (1)

Publication Number Publication Date
WO2014206220A1 true WO2014206220A1 (zh) 2014-12-31

Family

ID=52141031

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080073 WO2014206220A1 (zh) 2013-06-29 2014-06-17 数据写入方法及内存系统

Country Status (9)

Country Link
US (1) US20160110286A1 (zh)
EP (1) EP2998867B1 (zh)
JP (1) JP6159478B2 (zh)
KR (1) KR101785189B1 (zh)
CN (2) CN104252420B (zh)
AU (1) AU2014301874B2 (zh)
BR (1) BR112015031803A2 (zh)
RU (1) RU2621611C1 (zh)
WO (1) WO2014206220A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214244A (zh) * 2016-08-05 2021-01-12 中科寒武纪科技股份有限公司 一种运算装置及其操作方法
CN109324982B (zh) * 2017-07-31 2023-06-27 上海华为技术有限公司 一种数据处理方法以及数据处理装置
US20210200695A1 (en) * 2019-12-27 2021-07-01 Advanced Micro Devices, Inc. Staging memory access requests
CN113918508A (zh) * 2021-12-15 2022-01-11 苏州浪潮智能科技有限公司 一种缓存加速方法、装置、设备及可读存储介质
WO2023115319A1 (zh) * 2021-12-21 2023-06-29 华为技术有限公司 一种数据存储方法、存储装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012850A (zh) * 2010-12-09 2011-04-13 首都师范大学 基于硬件监视和微包协议的关键数据恢复方法
CN102662992A (zh) * 2012-03-14 2012-09-12 北京搜狐新媒体信息技术有限公司 一种海量小文件的存储、访问方法及装置
CN102725741A (zh) * 2011-12-31 2012-10-10 华为技术有限公司 高速缓冲存储器控制方法、装置和系统
CN102999441A (zh) * 2012-11-15 2013-03-27 清华大学 一种细粒度内存访问的方法

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02113353A (ja) * 1988-10-24 1990-04-25 Hitachi Ltd 半導体メモリ
JPH03164849A (ja) * 1989-11-22 1991-07-16 Matsushita Electric Ind Co Ltd マイクロプロセッサおよびマイクロプロセッサシステム
RU2010318C1 (ru) * 1991-10-28 1994-03-30 Институт точной механики и вычислительной техники им.С.А.Лебедева РАН Устройство управления памятью
JPH05282208A (ja) * 1992-04-03 1993-10-29 Hitachi Ltd キャッシュメモリ制御方式
US5459842A (en) * 1992-06-26 1995-10-17 International Business Machines Corporation System for combining data from multiple CPU write requests via buffers and using read-modify-write operation to write the combined data to the memory
EP0683457A1 (en) * 1994-05-20 1995-11-22 Advanced Micro Devices, Inc. A computer system including a snoop control circuit
JP3204295B2 (ja) * 1997-03-31 2001-09-04 日本電気株式会社 キャッシュメモリシステム
US6658533B1 (en) * 2000-09-21 2003-12-02 Intel Corporation Method and apparatus for write cache flush and fill mechanisms
JP2004246754A (ja) * 2003-02-17 2004-09-02 Renesas Technology Corp 半導体記憶装置およびその制御装置
KR100826757B1 (ko) * 2003-11-18 2008-04-30 마쯔시다덴기산교 가부시키가이샤 캐시 메모리 및 그 제어 방법
EP1607869B1 (en) * 2004-06-16 2008-10-08 Freescale Semiconductors, Inc. Data cache system
KR100575004B1 (ko) * 2005-01-15 2006-04-28 삼성전자주식회사 버스트 동작이 가능한 에스램 메모리 장치
KR101443231B1 (ko) * 2007-11-27 2014-09-19 삼성전자주식회사 라이트-백 동작시 라이트-백 데이터의 버스트 길이를조절할 수 있는 캐시 메모리와 이를 포함하는 시스템
US8001331B2 (en) * 2008-04-17 2011-08-16 Arm Limited Efficiency of cache memory operations
US8700840B2 (en) * 2009-01-05 2014-04-15 SanDisk Technologies, Inc. Nonvolatile memory with write cache having flush/eviction methods
US8464002B2 (en) * 2009-10-14 2013-06-11 Board Of Regents Of The University Of Texas System Burst-based cache dead block prediction
US8924652B2 (en) * 2009-11-23 2014-12-30 Marvell Israel (M.I.S.L.) Ltd. Simultaneous eviction and cleaning operations in a cache
CN102135941B (zh) * 2010-08-26 2013-09-11 华为技术有限公司 从缓存写数据到内存的方法和装置
RU2487398C1 (ru) * 2011-12-13 2013-07-10 Общество с ограниченной ответственностью "ЛАН-ПРОЕКТ" Способ формирования виртуальной памяти и устройство для его реализации
CN110275840B (zh) * 2014-02-23 2024-03-15 拉姆伯斯公司 在存储器接口上的分布式过程执行和文件系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012850A (zh) * 2010-12-09 2011-04-13 首都师范大学 基于硬件监视和微包协议的关键数据恢复方法
CN102725741A (zh) * 2011-12-31 2012-10-10 华为技术有限公司 高速缓冲存储器控制方法、装置和系统
CN102662992A (zh) * 2012-03-14 2012-09-12 北京搜狐新媒体信息技术有限公司 一种海量小文件的存储、访问方法及装置
CN102999441A (zh) * 2012-11-15 2013-03-27 清华大学 一种细粒度内存访问的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2998867A4 *

Also Published As

Publication number Publication date
CN107577614B (zh) 2020-10-16
AU2014301874A1 (en) 2016-01-21
EP2998867B1 (en) 2019-09-18
BR112015031803A2 (pt) 2017-07-25
AU2014301874B2 (en) 2017-05-04
EP2998867A4 (en) 2016-07-06
JP6159478B2 (ja) 2017-07-05
KR101785189B1 (ko) 2017-10-12
KR20160014053A (ko) 2016-02-05
EP2998867A1 (en) 2016-03-23
JP2016524251A (ja) 2016-08-12
CN107577614A (zh) 2018-01-12
US20160110286A1 (en) 2016-04-21
RU2621611C1 (ru) 2017-06-06
CN104252420B (zh) 2017-08-29
CN104252420A (zh) 2014-12-31

Similar Documents

Publication Publication Date Title
JP7162102B2 (ja) メモリアクセス技術およびコンピュータシステム
JP5426036B2 (ja) 複数のプロセッサのメモリ共有化のためのメモリアクセス装置、及びそのアクセス方法
JP4866646B2 (ja) メモリーに送るコマンドの選択方法、メモリーコントローラー、コンピュータシステム
US11650765B2 (en) Apparatus and method for performing persistent write operations using a persistent write command
WO2014206220A1 (zh) 数据写入方法及内存系统
JP2021503642A (ja) 不揮発性メモリの書込みクレジットの管理
JP5351145B2 (ja) メモリ制御装置、メモリシステム、半導体集積回路およびメモリ制御方法
US9411519B2 (en) Implementing enhanced performance flash memory devices
WO2013168479A1 (ja) Ssd(ソリッドステートドライブ)装置
WO2012109882A1 (zh) 数据读取的方法和存储器控制器
WO2011157067A1 (zh) 同步动态随机存储控制器读取数据的方法和装置
WO2021056541A1 (zh) 处理数据的方法和设备
CN102779098B (zh) 混合缓存的协同式自适应预取方法、装置和系统
US20100262763A1 (en) Data access method employed in multi-channel flash memory system and data access apparatus thereof
JP2016033818A (ja) データ処理方法、装置、およびシステム
WO2019000456A1 (zh) 传输数据掩码的方法、内存控制器、内存芯片和计算机系统
TWI761655B (zh) 頁面大小感知調度方法和非暫時性電腦可讀記錄媒體
US20070121398A1 (en) Memory controller capable of handling precharge-to-precharge restrictions
KR102028666B1 (ko) 비식별 요청을 처리하는 저장 장치 및 그것의 동작 방법
US8521951B2 (en) Content addressable memory augmented memory
US11232024B2 (en) Predictive caching in device for media seek in playback or scrolling
WO2016201981A1 (zh) 数据缓存处理方法及装置
JP2016154031A (ja) Ssd(ソリッドステートドライブ)装置

Legal Events

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

Ref document number: 14818249

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2014818249

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2016522212

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20157036978

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112015031803

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2014301874

Country of ref document: AU

Date of ref document: 20140617

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2016102771

Country of ref document: RU

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 112015031803

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20151217