WO2025112410A1 - 数据处理方法和装置、电子设备以及存储介质 - Google Patents
数据处理方法和装置、电子设备以及存储介质 Download PDFInfo
- Publication number
- WO2025112410A1 WO2025112410A1 PCT/CN2024/097159 CN2024097159W WO2025112410A1 WO 2025112410 A1 WO2025112410 A1 WO 2025112410A1 CN 2024097159 W CN2024097159 W CN 2024097159W WO 2025112410 A1 WO2025112410 A1 WO 2025112410A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cache
- data
- response
- memory
- write
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0895—Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0804—Addressing 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
- G06F12/0831—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
- G06F12/0831—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
- G06F12/0833—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means in combination with broadcast means (e.g. for invalidation or updating)
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/084—Multiuser, multiprocessor or multiprocessing cache systems with a shared cache
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0891—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/18—Automatic repetition systems, e.g. Van Duuren systems
- H04L1/1829—Arrangements specially adapted for the receiver end
- H04L1/1861—Physical mapping arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/78—Architectures of general purpose stored program computers comprising a single central processing unit
- G06F15/7807—System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
- G06F2212/1024—Latency reduction
Definitions
- Embodiments of the present disclosure relate to a data processing method, a data processing device, an electronic device, and a storage medium.
- the Network-on-a-Chip (NOC) system is a necessary bus system for realizing mutual communication between components in large-scale integrated circuits.
- a system-on-chip (SOC) contains many types of subsystems, such as CPU, GPU, memory, IO devices, etc., and each type of subsystem may have multiple entities that need to communicate with each other (data signals and control signals) to work together.
- the NOC system provides a high-bandwidth transaction exchange network to connect the components on the chip. Through this network, efficient data transmission can be achieved between the subsystems.
- the caches corresponding to different subsystems operate on the cached data of the same address, consistency problems will arise. In order to solve this problem, many technologies have emerged to maintain data consistency.
- At least one embodiment of the present disclosure provides a data processing method, the data processing method comprising: in response to receiving a write request from a first cache to write first data back to a memory, a cache consistency node writes the first data to the memory or discards the first data, wherein the write request carries the first data, the cache consistency node is configured to maintain the consistency of data stored in multiple caches, the multiple caches include the first cache, and after the cache consistency node writes the first data to the memory or discards the first data, the cache consistency node sends a request to the cache consistency node to the memory.
- the first cache returns a write response signal to directly end the processing operation of the write request.
- the cache consistency node in response to receiving a write request from the first cache to write the first data back to the memory, the cache consistency node writes the first data to the memory or discards the first data, including: in response to receiving the write request from the first cache to write the first data back to the memory, the cache consistency node determines whether the first cache is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node side; and in response to determining that the first cache is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node side, the cache consistency node writes the first data to the memory.
- the cache consistency node after the cache consistency node writes the first data to the memory or discards the first data, the cache consistency node returns a write response signal to the first cache to directly end the processing operation of the write request, including: after the cache consistency node writes the first data to the memory, the memory returns a write response to the cache consistency node indicating that the first data has been written to the memory; and in response to receiving the write response from the memory indicating that the first data has been written to the memory, the cache consistency node returns the write response signal to the first cache indicating that the first data has been written back to the memory to directly end the processing operation of the write request.
- the data processing method also includes: after the cache consistency node writes the first data into the memory, the cache consistency node sets the data state of the first cache to an invalid state, a shared state or an exclusive state, wherein the invalid state indicates that the first cache does not cache the first data, the shared state indicates that the first cache and other caches both cache the first data, and the exclusive state indicates that the first data is cached only in the first cache.
- the data processing method also includes: in response to receiving a read request for the first data from a second cache and the cache consistency node side recording that the first data is in an exclusive state or a shared state in the first cache, the cache consistency node initiates a monitoring signal to the first cache; in response to the first cache receiving the monitoring signal after issuing the write request, the first cache returns a monitoring response carrying the first data to the cache consistency node in response to the monitoring signal.
- the data processing The processing method also includes: in response to receiving the monitoring response, the cache consistency node returns the first data to the second cache; and after receiving the first data, the second cache returns a message to the cache consistency node indicating that the first data has been received to end the read request.
- the cache consistency node in response to receiving the monitoring response, returns the first data to the second cache, including: in response to receiving the monitoring response, the cache consistency node returns the first data to the second cache, and sets the data state of the second cache to an exclusive state, wherein the exclusive state indicates that the first data is cached only in the second cache.
- the cache consistency node after the cache consistency node writes the first data into the memory or discards the first data, the cache consistency node returns a write response signal to the first cache to directly end the processing operation of the write request, including: after receiving the message, the cache consistency node discards the first data written by the write request on the cache consistency node side, and returns the write response signal to the first cache to directly end the processing operation of the write request.
- the cache consistency node after receiving the message, discards the first data written by the write request to the cache consistency node side, including: in response to determining that the first data written by the write request to the cache consistency node side is invalid data after receiving the message, the cache consistency node discards the first data written by the write request to the cache consistency node side.
- At least one embodiment of the present disclosure also provides an electronic device, comprising multiple caches and cache consistency nodes, the multiple caches including a first cache, and the cache consistency node is configured to write the first data to the memory or discard the first data in response to receiving a write request from the first cache to write the first data back to the memory, and after the cache consistency node writes the first data to the memory or discards the first data, return a write response signal to the first cache to directly end the processing operation of the write request, wherein the write request carries the first data, and the cache consistency node is configured to maintain the consistency of the data stored in the multiple caches.
- the cache consistency node is further configured to: in response to receiving the write request from the first cache to write the first data back to the memory, determine whether the first cache is consistent with the current unique record on the cache consistency node side; The cache that occupies the first data is the same as the cache that currently exclusively occupies the first data recorded on the cache consistency node side, and in response to determining that the first cache is the same as the cache that currently exclusively occupies the first data, the first data is written into the memory.
- the memory is configured to: after the cache consistency node writes the first data to the memory, return a write response to the cache consistency node indicating that the first data has been written to the memory, and the cache consistency node is further configured to: in response to receiving the write response from the memory indicating that the first data has been written to the memory, return the write response signal to the first cache indicating that the first data has been written back to the memory to directly end the processing operation of the write request.
- the cache consistency node is further configured to: in response to receiving a read request for the first data from the second cache and the cache consistency node side recording that the first data is in an exclusive state or a shared state in the first cache, initiate a monitoring signal to the first cache, and the first cache is configured to: in response to the first cache receiving the monitoring signal after issuing the write request, return a monitoring response carrying the first data to the cache consistency node.
- At least one embodiment of the present disclosure also provides a data processing device, which includes a memory and a processor, wherein the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the method described in any of the above embodiments.
- At least one embodiment of the present disclosure further provides a non-transitory storage medium that non-transitorily stores computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the method described in any of the above embodiments is implemented.
- FIG. 1 shows a schematic diagram of an electronic device.
- FIG. 2A shows a schematic diagram of an electronic device performing data reading.
- FIG. 2B shows a schematic diagram of an electronic device performing data write-back.
- FIG. 3A shows a schematic diagram of a data processing method provided by at least one embodiment of the present disclosure. picture.
- FIG. 3B shows a schematic diagram of data write-back performed by an electronic device provided by at least one embodiment of the present disclosure.
- FIG4 shows a schematic diagram of read-write operations of an electronic device when a read-write conflict occurs, provided by at least one embodiment of the present disclosure.
- FIG5 shows a schematic diagram of an electronic device provided by at least one embodiment of the present disclosure.
- FIG6 shows a schematic diagram of a data processing device provided by at least one embodiment of the present disclosure.
- FIG. 7 shows a schematic diagram of a non-transitory storage medium provided by at least one embodiment of the present disclosure.
- a directory-based consistency protocol In order to keep the data with the same address in each cache consistent, a directory-based consistency protocol was developed. This protocol can track the status of data in the cache.
- the directory storage structure can be the same as the cache. It is implemented by using a static random access memory (SRAM).
- SRAM static random access memory
- the directory storage structure can also be implemented by using other forms of memory, as long as directory storage can be implemented.
- Fig. 1 shows a schematic diagram of an electronic device (or electronic system) 100.
- the electronic device 100 may include a plurality of caches (hereinafter referred to as "cache") 1-n, processors (or processor cores) 1-n, an interconnection network, cache coherence nodes 1-n, memories 1-n, directories 1-n, etc.
- each of the caches 1 to n is configured to store data storage information corresponding to at least one piece of data information.
- the caches 1 to n may include one or more sub-caches, respectively.
- cache consistency nodes 1-n can help track the cache data status in caches 1-n respectively, and the cache data status includes, for example, that there is only a single copy of the cache data in cache 1-n, that there are multiple copies of the cache data, or that the data only exists in the main memory.
- Cache consistency nodes 1-n will track the status of caches 1-n of processors 1-n (for example, each processor in FIG. 1 may include one or more sub-processors), and store the tracked status information (or directory information) in directories 1-n.
- a cache consistency node discovers a consistency transaction while listening to the bus, it will query the tracked status information in directories 1-n and issue corresponding probes to complete consistency maintenance.
- directories 1-n are configured to store directory information corresponding to data information stored in caches 1-n to maintain cache consistency.
- the directory includes multiple storage groups, each of which can store multiple directory information. For example, when directory information needs to be stored in the directory, the directory puts the directory information into the corresponding storage group according to the mapping relationship.
- an interconnection network (such as a network on chip (NOC)) in the system is directly coupled to caches 1 to n, and is also directly coupled to cache coherence nodes 1 to n.
- the interconnection network is a public communication trunk for information transmission, for example, the interconnection network can be a transmission line bundle composed of electronic components such as wires.
- cache consistency nodes 1 to n are configured to connect directories 1 to n to the Internet respectively, and cache consistency nodes 1 to n are configured to connect memories 1 to n to the Internet respectively, thereby maintaining the consistency of all data stored in caches 1 to n.
- NUMA non-uniform memory access architecture
- processors or processor cores
- memory devices belong to different nodes, so a directory consistency-based design sets up a static random access memory (SRAM) structure directory near each memory controller.
- SRAM static random access memory
- each node has its own local memory.
- FIG2A is a schematic diagram showing a data reading process of an electronic device.
- FIG2B is a schematic diagram showing a Schematic diagram of data writeback of an electronic device.
- master device 0 may correspond to any one of caches 1 to n in FIG1
- slave device may correspond to any one of cache coherence nodes 1 to n in FIG1
- MEM may correspond to any one of memories 1 to n in FIG1.
- RdE exclusive request
- the slave device needs to manage data consistency between the multiple master devices.
- the slave device side in the system may adopt a cache coherence protocol based on a directory, and the directory records which master device caches the data and the current state of the data in the corresponding master device.
- the slave device when the slave device receives an exclusive request RdE, and the directory corresponding to the current slave device side is in an invalid state I, such as represented by Dir@I in Figure 2A (see Table 1 below, for example, the invalid state I indicates that no master device currently caches this data (for example, the data corresponding to the address accessed by the request)), the slave device sends a read request Rdmem to the memory and receives the data response rddat returned by the memory to the slave device, thereby directly reading the main memory (for example, memory) data, and returns an exclusive data response DatRspE to the master device 0 as the requester (see Table 5 below), and sets the corresponding directory on the slave device side to E:Master0 (for example, represented by Dir@E:Master0 in Figure 2A), thereby recording that the master device 0 caches this data and is in an exclusive state (E: Exclusive).
- the master device 0 After receiving the exclusive data response DatRspE, the master device 0 sends a message ACK
- the master device generally caches more data, and there is an overflow scenario in the master device, and the overflowed data needs to be written back to the slave device from the master device.
- the master device 0 initiates a write-back request to the slave device (FIG2B only uses WBI as an example for illustration, but is not limited to this write-back request), and sends the data to be written back to the memory to the slave device through the signal WrDat, and the slave device side confirms that the write-back data has been received and returns a write response WrRap to the master device 0.
- the master device 0 After receiving the write response WrRap, the master device 0 sends a message (or write response) ACK to the slave device. For example, as shown in FIG2B, after the slave device receives the message ACK sent by the master device 0, the directory state corresponding to the slave device side is set to Dir@I from Dir@E:Master0. For example, after receiving the message ACK, the slave device side sends a write request Rdmem to the memory to write the data to be written back to the memory, and receives the data write response WrRap returned by the memory to the slave device to end the write-back request.
- both read and write transactions need to carry ACK messages, which will prolong the life cycle of the transaction in the slave device, that is, the time of occupying the slave device buffer (for example, cache or other storage area that can be used to implement the directory) will be longer, reducing the turnover rate of the slave device buffer. And waste of resources, and ACK message transmission requires a certain amount of power consumption.
- a data processing method provided by the present disclosure includes: in response to receiving a write request from a first cache to write first data back to a memory, a cache consistency node writes the first data to the memory or discards the first data, wherein the write request carries the first data, and the cache consistency node is configured to maintain the consistency of data stored in multiple caches, and the multiple caches include the first cache; and after the cache consistency node writes the first data to the memory or discards the first data, the cache consistency node returns a write response signal to the first cache to directly end the processing operation of the write request.
- scenario identification is performed by comparing the write-back transaction and the directory.
- the master device After receiving the write response, the master device directly ends the write transaction processing, and there is no need to send an ACK message to the slave device, thereby reducing the number of ACK messages, reducing the protocol's demand for ACK messages, reducing the power consumption and delay as well as bandwidth occupancy caused by the transmission of ACK messages, and optimizing the turnover rate of the buffer on the master device side. Under the same performance, the number of buffers required on the master device side is smaller, saving area and power consumption.
- At least some embodiments of the present disclosure also provide an electronic device, which includes multiple caches and a cache consistency node.
- the multiple caches include a first cache, and the cache consistency node is configured to write the first data to the memory or discard the first data in response to receiving a write request from the first cache to write the first data back to the memory, and after the cache consistency node writes the first data to the memory or discards the first data, return a write response signal to the first cache to directly end the processing operation of the write request, wherein the write request carries the first data, and the cache consistency node is configured to maintain the consistency of the data stored in the multiple caches.
- the first cache can be any cache among multiple caches, and the first data can be, for example, data corresponding to any accessed address, that is, the "first" (and “second”, etc.) here is only used to identify the cache or data as the description object, rather than specifically referring to a specific cache or data.
- Fig. 3A shows a schematic flow chart of a data processing method provided by at least one embodiment of the present disclosure. As shown in Fig. 3A, in some embodiments of the present disclosure, the data processing method includes the following steps S101-S102.
- Step S101 in response to receiving a write request from a first cache to write first data back to a memory, a cache consistency node writes the first data to the memory or discards the first data, wherein the write request carries the first data, and the cache consistency node is configured to maintain consistency of data stored in multiple caches, and the multiple caches include the first cache.
- Step S102 After the cache coherence node writes the first data into the memory or discards the first data, the cache coherence node returns a write response signal to the first cache to directly end the processing operation of the write request.
- 3B shows a schematic diagram of data writeback of an electronic device provided by at least one embodiment of the present disclosure.
- the cache consistency node in response to receiving a write request from a first cache (or "master device 0") to write first data back to the memory, the cache consistency node (or “slave device”) writes the first data to the memory MEM.
- the write request carries the first data
- the cache consistency node is configured to maintain the consistency of data stored in multiple caches, including the first cache.
- the cache consistency node returns a write response signal WrRsp to the first cache to directly end the processing operation of the write request.
- FIG4 shows a schematic diagram of read and write operations of an electronic device provided by at least one embodiment of the present disclosure when there is a read-write conflict.
- the cache consistency node in response to receiving a write request from a first cache (or "master device 0") to write first data back to the memory, the cache consistency node (or “slave device”) discards the first data.
- the write request carries the first data
- the cache consistency node is configured to maintain the consistency of data stored in multiple caches, including the first cache.
- the cache consistency node returns a write response signal WrRsp to the first cache to directly end the processing operation of the write request.
- first cache e.g., master device 0
- second cache e.g., master device 1
- cache consistency node e.g., a slave device
- memory e.g., MEM
- the master device (or cache) specified by the protocol of the embodiment of the present disclosure has multiple states, as shown in Table 1:
- the cache state may be the state of the first cache, and the main memory may be the memory MEM.
- the first cache may include the M state, the E state, the S state, and the I state.
- the M state indicates that the first cache exclusively occupies the corresponding data, and the data has been modified;
- the E state indicates that the first cache exclusively occupies the corresponding data, and the data has not been modified;
- the S state indicates that the first cache shares the corresponding data with other master devices;
- the I state indicates that the first cache does not cache the corresponding data.
- the other caches are all in the I state where the modified data is not cached; when the first cache is in the E state, the other caches are all in the I state where the data is not cached; when the first cache is in the S state, there are other caches in the S state that share the data; when the first cache is in the I state, the other caches can be in any one of the M state, the E state, the S state, and the I state.
- the state of the master device (eg, the first cache) is not limited to the four states listed above, and the master device may have other different states according to different needs.
- Table 2 shows the request types that can be issued by the master device as specified in the protocol of the present disclosure, as well as the corresponding cache state transitions and slave device response messages.
- the master device is the first cache as an example.
- the request type may be a request type initiated by the first cache to the slave device.
- the read request types that may be initiated by the first cache may include RdE (obtaining an exclusive data copy), RdD (obtaining a data copy in a non-I state, i.e., caching this data copy), RdS (obtaining a shared data copy), RdI (obtaining a data snapshot, not caching this data copy), and RdEE (obtaining data exclusive rights, not obtaining data).
- RdE obtaining an exclusive data copy
- RdD obtaining a data copy in a non-I state, i.e., caching this data copy
- RdS obtaining a shared data copy
- RdI obtaining a data snapshot, not caching this data copy
- RdEE obtaining data exclusive rights, not obtaining data
- the cache state when the read request type initiated by the first cache to the slave device is RdE, the cache state (or cache data state) when the first cache initiates the request can be I state, S state or E state; when the RdE request ends, the cache state of the first cache can be E state (in this case, the slave device returns a response DatRspE (see Table 6 below) to the first cache, so that the slave device obtains a response of an exclusive data copy) or M state (in this case, the slave device returns a response DatRspM (see Table 6 below), so that the slave device obtains a response of a modified data copy).
- the slave device returns a response DatRspE (see Table 6 below) to the first cache, so that the slave device obtains a response of an exclusive data copy) or M state (in this case, the slave device returns a response DatRspM (see Table 6 below), so that the slave device obtains a response of a modified data copy).
- the cache state of the first cache when initiating the request may be in the I state; when the RdD request ends, the cache state of the first cache may be in the S state (in this case, the slave device returns a response DatRspS to the first cache (see Table 6 below), so that the slave device obtains a response of a copy of the shared data), the E state (in this case, the slave device returns a response DatRspE to the first cache), or the M state (in this case, the slave device returns a response DatRspM to the first cache).
- the cache state of the first cache when initiating the request may be in the I state; when the RdS request ends, the cache state of the first cache may be in the S state (in this case, the slave device returns a response DatRspS to the first cache (see Table 6 below), so that the slave device obtains a response of a copy of the shared data), the E state (in this case, the slave device returns a response DatRspE to the first cache), or the M state (in this case, the slave device returns a response DatRspM to the first cache).
- the cache state may be in the S state (in this case, the slave device returns a response DatRspS to the first cache).
- the cache state of the first cache when initiating the request may be in the I state; when the RdI request ends, the cache state of the first cache may be in the I state (in this case, the slave device returns a response DatRspI (see Table 6 below) to the first cache, so that the slave device obtains a response of a data copy).
- the cache state of the first cache when initiating the request may be in the I state or the S state; when the RdEE request ends, the cache state of the first cache may be in the E state (in this case, the slave device returns a response RspE (see Table 6 below), so that the slave device obtains a response of exclusive rights).
- the write request types that can be initiated by the first cache may include WBI (write the cached data copy back to the main memory, and set the cache to invalid I state), WBS (write the cached data copy back to the main memory, and set the cache to shared S state), and WBE (write the cached data copy back to the main memory, and set the cache to exclusive E state).
- WBI write the cached data copy back to the main memory, and set the cache to invalid I state
- WBS write the cached data copy back to the main memory, and set the cache to shared S state
- WBE write the cached data copy back to the main memory, and set the cache to exclusive E state.
- the embodiments of the present disclosure are not limited to this, and the first cache may also initiate other different write request types as needed.
- the cache state of the first cache when initiating the request may be M state; when the write request WBI ends, the cache state of the first cache may be I state (in this case, the slave device returns a response WrRsp to the first cache).
- the cache state of the first cache when initiating the request may be M state; when the write request WBS ends, the cache state of the first cache may be I state (in this case, the slave device returns a response WrRsp to the first cache) or S state (in this case, the slave device returns a response WrRsp to the first cache).
- the cache state of the first cache when initiating the request may be M state; when the write request WBE ends, the cache state of the first cache may be I state (in this case, the slave device returns a response WrRsp to the first cache), S state (in this case, the slave device returns a response WrRsp to the first cache) or E state (in this case, the slave device returns a response WrRsp to the first cache).
- the first cache write request is not limited to WBI, and the write request may also be WBS or WBE shown in Table 2.
- the first cache may initiate a write request WBI to the slave device.
- the cache consistency node writes the first data to the memory MEM (as shown in FIG. 3B ) or discards the first data (as shown in FIG. 4 ).
- the cache consistency node After the first data is written into the memory MEM or the first data is discarded, the cache consistency node returns a write response signal WrRsp to the first cache to directly end the processing operation of the write request.
- the first cache can initiate a write request WBS to the slave device.
- the cache consistency node writes the first data to the memory MEM (as shown in FIG. 3B) or discards the first data (as shown in FIG. 4).
- the cache consistency node returns a write response signal WrRsp to the first cache to directly end the processing operation of the write request.
- the first cache can initiate a write request WBE to the slave device.
- the cache consistency node In response to receiving the write request WBE from the first cache to write the first data back to the memory MEM, the cache consistency node writes the first data to the memory MEM (as shown in FIG. 3B) or discards the first data (as shown in FIG. 4). For example, after the cache coherence node writes the first data into the memory MEM or discards the first data, the cache coherence node returns a write response signal WrRsp to the first cache to directly end the processing operation of the write request.
- the cache consistency node determines whether the first cache is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node side, and in response to determining that the first cache is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node side, the cache consistency node writes the first data to the memory MEM.
- the slave device determines whether master device 0 is the same as the cache currently exclusive to the first data recorded on the slave device side.
- the memory returns a write response to the cache coherence node indicating that the first data has been written into the memory, and in response to receiving a write response from the memory indicating that the first data has been written into the memory, the cache coherence node returns an indication to the first cache.
- a write response signal indicating that the first data has been written back to the memory directly ends the processing operation of the write request.
- the memory MEM returns a write response WrRsp indicating that the first data has been written into the memory MEM to the slave device, and in response to receiving the write response WrRsp indicating that the first data has been written into the memory MEM from the memory MEM, the slave device returns a write response signal WrRsp indicating that the first data has been written back into the memory MEM to the master device 0 to directly terminate the processing operation of the write request.
- the master device 0 does not need to send a message to the slave device and directly terminates the processing operation of the write request.
- the cache coherence node sets the data state of the first cache to an invalid state, a shared state, or an exclusive state.
- the invalid state indicates that the first cache does not cache the first data
- the shared state indicates that the first cache and other caches cache the first data
- the exclusive state indicates that only the first cache caches the first data.
- the slave device changes the data state of the first cache (e.g., master device 0) among the multiple caches to an invalid state (I state), a shared state (S state), or an exclusive state (e.g., E state).
- I state an invalid state
- S state shared state
- E state an exclusive state
- the invalid state indicates that the first cache does not cache the first data
- the shared state indicates that the first cache and other caches cache the first data
- the exclusive state indicates that only the first cache caches the first data.
- the cache state of the first cache may be in the I state.
- the cache state of the first cache may be in the I state (for example, after the first cache writes the data back to the memory MEM, the data cached in the first cache is replaced by other data) or the S state (for example, after the first cache writes the data back to the memory MEM, the data cached in the first cache is not replaced by other data).
- the cache state of the first cache may be in the I state (for example, after the first cache writes the data back to the memory MEM, the data cached in the first cache is replaced by other data), the S state (for example, the data written back to the memory MEM by the first cache is shared by other caches) or the E state (for example, the data written back to the memory MEM by the first cache is not shared by other caches, and after the first cache writes the data back to the memory MEM, the data cached in the first cache is not replaced by other data).
- the cache coherence node in response to receiving a read request for the first data from the second cache (or “master device 1”) and the cache coherence node side (e.g., a directory corresponding to the slave device) recording that the first data is in an exclusive state or a shared state in the first cache (or “master device 0”), the cache coherence node sends a request to the master device 1 to read the first data.
- the first cache initiates a monitoring signal (e.g., ExpI); in response to the first cache receiving the monitoring signal after issuing a write request, the first cache returns a monitoring response (e.g., ExpRspIDat) carrying the first data to the cache consistency node in response to the monitoring signal.
- a monitoring signal e.g., ExpI
- Table 3 shows the monitoring signal types and their descriptions specified in the protocol of the present disclosure.
- the detection signal Exp* is used to monitor the cache status and data at the master device and set the monitored master device to a corresponding status.
- Table 4 shows the monitoring response types specified in the protocol of the present disclosure, that is, the monitoring responses that the master device may return to the slave device when being monitored by the detection signal Exp*.
- Table 5 shows the non-monitoring response transaction types and their descriptions specified in the protocol of the present disclosure.
- Table 6 is a state transition table of monitoring transactions on the master device side and monitoring response actions specified in the protocol of the present disclosure, which defines the target state that the master device side cache may be converted to after being monitored, and sends the corresponding monitoring response message.
- the first cache when the first cache receives the detection signal ExpI, if the current cache state of the first cache is I, S, E, or M, the state of the first cache after processing the monitoring signal is I, and the first cache returns a detection response ExpRspI (for example, when the current state of the first cache is I) or ExpRspIDat (for example, when the current state of the first cache is S, E, or M) to the cache consistency node.
- ExpRspI for example, when the current state of the first cache is I
- ExpRspIDat for example, when the current state of the first cache is S, E, or M
- the first cache receives the detection signal ExpS, if the current cache state of the first cache is I, then the state of the first cache after processing the monitoring signal is I, and the first cache returns a detection response ExpRspI to the cache consistency node; when the first cache receives the detection signal ExpS, if the current cache state of the first cache is S, then the state of the first cache after processing the monitoring signal is S, and the first cache returns a detection response ExpRspS to the cache consistency node; when the first cache receives the detection signal ExpS, If the current cache state of the first cache is E or M, the state of the first cache after processing the monitoring signal is S, and the first cache returns a detection response ExpRspS (for example, when the first cache executes a write request WBS or WBE) or ExpRspSDat (for example, when the first cache executes a write request WBI) to the cache consistency node.
- ExpRspS for example, when the first cache executes a write request
- the first cache when the first cache receives the detection signal ExpE, if the current cache state of the first cache is I, then the state of the first cache after processing the monitoring signal is I, and the first cache returns a detection response ExpRspI to the cache consistency node; when the first cache receives the detection signal ExpE, if the current cache state of the first cache is S, then the state of the first cache after processing the monitoring signal is S, and the first cache returns a detection response ExpRspS to the cache consistency node; when the first cache receives the detection signal ExpE, if the current cache state of the first cache is E or M, then the state of the first cache after processing the monitoring signal is E or M, and the first cache returns a detection response ExpRspE (for example, when the first cache executes a write request WBS or WBE) or ExpRspEDat (for example, when the first cache executes a write request WBI) to the cache consistency node.
- ExpRspE for example, when the
- Table 7 shows the situation where the monitoring transaction specified in the protocol of the present invention is processed on the master device side and there is a conflict, that is, when the monitoring transaction reaches the master device, the master device has currently initiated a read transaction (or read request) Rd* or a write transaction (or write request) WB* for the cache line of the same address.
- Table 8 is the protocol definition of the present disclosure that after a slave device receives a read or write request from a master device, it may need to perform a state transition based on the directory state (including triggering a monitoring command, returning a response command to the master device, or reading and writing memory data).
- the cache consistency node in response to receiving a read request RdE from the second cache for the first data and the first data being in the I state in the directory corresponding to the cache consistency node, the cache consistency node directly reads the first data from the memory and returns the first data to the second cache.
- the cache consistency node side in response to receiving a read request RdE from the second cache for the first data and the cache consistency node side (for example, from the directory corresponding to the device) records that the first data is in the S state or the exclusive state E in the directory corresponding to the cache consistency node, the cache consistency node initiates a monitoring signal ExpI to the first cache (monitoring the target cache, obtaining the latest data copy, and setting its cached data to an invalid state).
- the cache coherence node in response to receiving the monitoring response, returns the first data to the second cache, and after receiving the first data, the second cache returns a message indicating that the first data has been received to the cache coherence node to end the read request.
- the slave device in response to receiving the monitoring response ExpRspIDat, returns the first data to the master device 1 in response to the monitoring response ExpRspIDat (e.g., through the response signal DatRspM), and the master device 1 returns the data on the slave device side to the master device 1.
- the state is set to an exclusive state (for example, the slave device records Dir@E:Master1), and the exclusive state (or Dir@E:Master1) indicates that the first data is cached only in the master device 1. For example, after receiving the first data, the master device 1 returns a message ACK to the slave device indicating that the first data has been received to end the read request RdE.
- an exclusive state for example, the slave device records Dir@E:Master1
- Dir@E:Master1 indicates that the first data is cached only in the master device 1.
- the master device 1 After receiving the first data, the master device 1 returns a message ACK to the slave device indicating that the first data has been received to end the read request RdE.
- the cache coherence node discards the first data written by the write request to the cache coherence node side, and returns a write response signal to the first cache to directly end the processing operation of the write request.
- the slave device receives the message ACK from the master device 1
- the read request RdE previously issued by the master device is processed, and the write request WB* previously issued by the master device 0 on the slave device side, which is in a blocked state (it is in a blocked state after the slave device processes the read request initiated by the master device 1 (that is, since the slave device can only process one transaction with the same address at the same time, the write request WB* initiated by the master device 0 is always in a blocked state before the RdE processing of the master device 1 is completed)) is awakened to continue processing.
- the slave device determines that the first data written by the write request to the slave device side is invalid data, the slave device discards the first data written by the write request to the slave device side, and returns a write response signal WrRsp to the master device 0 to directly end the processing operation of the write request. For example, after receiving the write response signal WrRsp, the slave device directly ends the corresponding write transaction processing, and there is no need to send a message ACK to the slave device.
- the cache consistency node in response to receiving a read request RdD, RdS or RdI from the second cache for the first data and the cache consistency node side (for example, from the directory corresponding to the device) records that the first data is in the exclusive state E in the directory corresponding to the cache consistency node, the cache consistency node initiates a monitoring signal ExpS to the first cache (monitoring the target cache, obtaining the latest data copy, and setting its cached data to an invalid or shared state).
- the cache coherence node in response to receiving the monitoring response, returns the first data to the second cache, and after receiving the first data, the second cache returns an indication to the cache coherence node that it has received the first data.
- the slave device in response to receiving the monitoring response ExpRspIDat, returns the first data to the master device 1 in response to the monitoring response ExpRspIDat (for example, through the response signal DatRspM), and sets the data state of the master device 1 on the slave device side to an exclusive state (for example, the slave device side records Dir@E:Master1), and the exclusive state (or Dir@E:Master1) indicates that only the master device 1 has the first data cached.
- the master device 1 after receiving the first data, the master device 1 returns a message ACK to the slave device indicating that the first data has been received to end the read request (for example, RdD or RdS).
- the cache consistency node discards the first data written by the write request to the cache consistency node side, and returns a write response signal to the first cache to directly end the processing operation of the write request. For example, as shown in FIG4, after the slave device receives the message ACK from the master device 1, the read request RdD, RdS or RdI previously issued by the master device is processed, and the write request WB* previously issued by the master device 0 in the blocked state on the slave device side is awakened to continue processing.
- the cache consistency node in response to receiving a read request RdEE for the first data from the second cache and the first data is in the I state in the directory corresponding to the cache consistency node, the cache consistency node returns a response RspE (no data monitoring response, the monitored cache is set to the E state or the M state) to the second cache to end the read request RdEE.
- RspE no data monitoring response, the monitored cache is set to the E state or the M state
- the cache consistency node in response to receiving a read request RdEE for the first data from the second cache and the cache consistency node side (for example, the directory corresponding to the slave device) records that the first data is in the S state or the exclusive state E in the directory corresponding to the cache consistency node, the cache consistency node initiates a monitoring signal ExpE to the first cache (monitoring the target cache, obtaining the latest data copy, and not changing its cache data state).
- the cache coherence node in response to receiving the monitoring response, returns the first data to the second cache, and after receiving the first data, the second cache returns a message indicating that the first data has been received to the cache coherence node to end the read request.
- the slave device in response to receiving the monitoring response ExpRspIDat, returns the first data to the master device 1 in response to the monitoring response ExpRspIDat (e.g., through the response signal DatRspM).
- the master device After receiving the first data, the master device The device 1 returns a message ACK to the slave device indicating that the first data has been received, so as to end the read request RdEE.
- the cache consistency node discards the first data written by the write request to the cache consistency node side, and returns a write response signal to the first cache to directly end the processing operation of the write request. For example, as shown in Figure 4, after the slave device receives the message ACK from the master device 1, the read request RdEE previously issued by the master device is processed, and the write request WB* previously issued by the master device 0 in the blocked state on the slave device side is awakened to continue processing.
- the slave device side since the slave device side records that the master device 0 is no longer in the state of monopolizing the first data, and the write request is initiated by the master device 0, the data in the write transaction of the master device 0 is already expired and invalid data, so the slave device determines that this write transaction or write operation should be invalid data due to the conflict, and directly discards the data that has been written to the slave device by the master device 0. For example, the slave device determines that the first data written by the write request to the slave device side is invalid data, the slave device discards the first data written by the write request to the slave device side, and returns a write response signal WrRsp to the master device 0 to directly end the processing operation of the write request. For example, after receiving the write response signal WrRsp, the slave device directly ends the corresponding write transaction processing without sending the message ACK.
- a write request e.g., WBI, WBS, or WBE
- the detection signal will not be triggered, and the cache consistency node returns a response WrRsp to the second cache.
- the data that the cache consistency node records needs to be written by the second cache is in an exclusive state and points to the second cache that initiated the write request WBI, the data is written to the memory, otherwise the data is discarded.
- Table 9 is a state transition table specified by the protocol of the present disclosure after the slave device receives a response from the master device.
- the cache coherence node needs to read the memory data.
- the cache coherence node After the cache coherence node reads the memory data, the data is sent to the second cache, and the status of the read request transaction table entry corresponding to the read request of the second cache is set to a waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the data has been successfully received.
- a waiting confirmation state for example, WaitACK
- ACK confirmation signal
- the cache coherence node receives a request type of a read request RdI from the second cache (for example, the cache coherence node creates a read request transaction table entry in response to receiving the read request RdI from the second cache, and records the status related to the current read request transaction), then after receiving the response signal ExpRspIDat sent by the first cache to the cache coherence node, the cache coherence node sends a response signal DatRspI carrying data to the second cache, and sets the status of the read request transaction table entry corresponding to the read request RdI of the second cache to a waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the data has been successfully received.
- a waiting confirmation state for example, WaitACK
- the cache coherence node sends a response signal ExpRspIDat to the cache coherence node, and the request type received by the cache coherence node from the second cache is a read request RdS (for example, after the cache coherence node creates a read request transaction processing table entry in response to receiving the read request RdS from the second cache, and records the status related to the current read request transaction), then after receiving the response signal ExpRspIDat sent by the first cache to the cache coherence node, the cache coherence node sends a response signal DatRspS carrying data to the second cache, and sets the status of the read request transaction processing table entry corresponding to the read request RdS of the second cache to a waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the data has been successfully received.
- a waiting confirmation state for example, WaitACK
- the cache coherence node sends a response signal ExpRspIDat to the cache coherence node, and the cache coherence node receives a request type of a read request RdD from the second cache (for example, after the cache coherence node responds to receiving the read request RdD from the second cache, it creates a read request transaction processing entry, recording the status related to the current read request transaction), then after receiving the response signal ExpRspIDat sent by the first cache to the cache consistency node, the cache consistency node sends a response signal DatRspE (recording that the second cache exclusively owns the data) or DatRspM (recording that the second cache exclusively owns the modified data) carrying data to the second cache, and sets the status of the read request transaction processing entry corresponding to the read request RdD of the second cache to the waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the data has been successfully received.
- the cache coherence node sends a response signal ExpRspIDat to the cache coherence node, and the request type received by the cache coherence node from the second cache is a read request RdE (for example, after the cache coherence node responds to receiving the read request RdE from the second cache, it creates a read request transaction processing table entry to record the status related to the current read request transaction), then after receiving the response signal ExpRspIDat sent by the first cache to the cache coherence node, the cache coherence node sends a response signal DatRspE (recording that the second cache exclusively owns this data) or DatRspM (recording that the second cache exclusively owns this modified data) carrying data to the second cache, and sets the status of the read request transaction processing table entry corresponding to the read request RdE of the second cache to a waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the
- the first cache sends a response signal ExpRspSDat to the cache coherence node, and the request type received by the cache coherence node from the second cache is a read request RdS or RdD (for example, after the cache coherence node responds to receiving the read request RdS or RdD from the second cache, it creates a read request transaction processing table entry to record the status related to the current read request transaction), then after receiving the response signal ExpRspSDat sent by the first cache to the cache coherence node, the cache coherence node sends a response signal DatRspS carrying data to the second cache (recording that the second cache shares this data), and sets the status of the read request transaction processing table entry corresponding to the read request RdS or RdD of the second cache to a waiting confirmation state (for example, WaitACK), waiting for the second cache to send a confirmation signal (ACK) confirming that the data has been successfully received.
- a waiting confirmation state for example, WaitACK
- the first cache sends a response signal ExpRspEDat to the cache coherence node, and the request type received by the cache coherence node from the second cache is a read request RdI (for example, after the cache coherence node responds to receiving the read request RdI from the second cache, it creates a read request transaction processing table entry and records the status related to the current read request transaction), then after receiving the response signal ExpRspEDat sent by the first cache to the cache coherence node, the cache coherence node sends a response signal DatRspI carrying data to the second cache (recording that the second cache obtains a copy of this data), and sets the status of the read request transaction processing table entry corresponding to the read request RdI of the second cache to a waiting for confirmation state.
- the second buffer enters a state (eg, WaitACK) and waits for the second buffer to send an acknowledgment signal (ACK) confirming that the data has been successfully received.
- the first cache sends a response signal ACK to the cache coherence node, and the request type received by the cache coherence node from the second cache is a read request Rd* (for example, after the cache coherence node responds to receiving the read request Rd* from the second cache, it creates a read request transaction processing table entry or a write request transaction processing table entry to record the status related to the current read request transaction), then after receiving the response signal ACK sent by the first cache to the cache coherence node, the cache coherence node sets the status of the read request transaction processing table entry to the end state to confirm that the data reading has been successfully completed.
- scenario identification is performed by comparing the write-back transaction and the directory.
- the master device After receiving the write response, the master device directly ends the write transaction processing, and there is no need to send an ACK message to the slave device, thereby reducing the number of ACK messages, reducing the protocol's demand for ACK messages, reducing the power consumption and delay as well as bandwidth occupancy caused by the transmission of ACK messages, and optimizing the turnover rate of the buffer on the master device side. Under the same performance, the number of buffers required on the master device side is smaller, saving area and power consumption.
- FIG5 shows a schematic diagram of an electronic device 60 provided by at least one embodiment of the present disclosure.
- the electronic device 60 includes a cache consistency node 605, a first cache 606, and a second cache 607.
- the cache consistency node 605 is configured to write the first data to the memory or discard the first data in response to receiving a write request from the first cache 606 to write the first data back to the memory, and after the cache consistency node 605 writes the first data to the memory or discards the first data, return a write response signal to the first cache 606 to directly end the processing operation of the write request.
- the write request carries the first data
- the cache consistency node 605 is configured to maintain the consistency of the data stored in multiple caches.
- the cache included in the electronic device 60 of the present disclosure is not limited to the two caches (the first cache 606 and the second cache 607) shown in FIG5, and the number of electronic devices 60 can be set to any number as needed.
- the cache consistency node 605 is also configured to: in response to receiving a write request from the first cache 606 to write the first data back to the memory, determine whether the first cache 606 is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node 605 side, and in response to determining that the first cache 606 is the same as the cache that currently exclusively owns the first data recorded on the cache consistency node 605 side, write the first data to the memory.
- the memory is configured to: after the cache consistency node 605 writes the first data into the memory, return a write response indicating that the first data has been written into the memory to the cache consistency node 605.
- the cache consistency node 605 is further configured to: in response to receiving an indication from the memory that the first data has been written into the memory The write response of the memory returns a write response signal indicating that the first data has been written back to the memory to the first cache 606 to directly end the processing operation of the write request.
- the cache coherence node 605 is further configured to: after the cache coherence node 605 writes the first data into the memory, set the data state of the first cache 606 to an invalid state, a shared state, or an exclusive state.
- the invalid state indicates that the first cache 606 does not cache the first data
- the shared state indicates that the first cache 606 and other caches cache the first data
- the exclusive state indicates that only the first cache 606 caches the first data.
- the cache coherence node 605 is further configured to: in response to receiving a read request for the first data from the second cache 607 and the cache coherence node 605 recording that the first data is in an exclusive state or a shared state in the first cache 606, initiate a monitoring signal to the first cache 606.
- the first cache 606 is configured to: in response to the first cache 606 receiving a monitoring signal after issuing a write request, return a monitoring response carrying the first data to the cache coherence node 605.
- the cache coherence node 605 is further configured to: in response to receiving the monitoring response, return the first data to the second cache 607.
- the second cache 607 is further configured to: return a message indicating that the first data has been received to the cache coherence node 605 to end the read request.
- the cache coherence node 605 is further configured to: in response to receiving the monitoring response, return the first data to the second cache 607 and set the data state of the second cache 607 to an exclusive state.
- the exclusive state indicates that only the second cache 607 caches the first data.
- the cache coherence node 605 is further configured to: after receiving the message, discard the first data written by the write request to the cache coherence node 605 side, and return a write response signal to the first cache 606 to directly end the processing operation of the write request.
- the cache consistency node 605 is further configured to: in response to determining that the first data written by the write request to the cache consistency node 605 side is invalid data after receiving the message, discard the first data written by the write request to the cache consistency node 605 side.
- scenario identification is performed by comparing the write-back transaction and the directory.
- the master device After receiving the write response, the master device directly ends the write transaction processing without sending an ACK message to the slave device, thereby reducing the number of ACK messages, reducing the protocol's demand for ACK messages, reducing the power consumption and delay as well as bandwidth occupancy caused by the transmission of ACK messages, and optimizing the turnover rate of the buffer on the master device side. Under the same performance, the master device side requires fewer buffers, saving area and power consumption.
- At least some embodiments of the present disclosure further provide a data processing device, the data processing device comprising
- the computer-readable medium includes a memory and a processor.
- the memory is configured to store computer-executable instructions
- the processor is configured to execute computer-executable instructions.
- the data processing method provided by at least one embodiment of the present disclosure is implemented.
- FIG6 shows a schematic diagram of a data processing device 500 provided by at least one embodiment of the present disclosure.
- the electronic device 500 includes a processor 501 and a memory 502 , and the processor 501 and the memory 502 may be interconnected via a bus 503 .
- the processor 501 can perform various actions and processes according to the program or code stored in the memory 502.
- the processor 501 can be an integrated circuit chip with signal processing capabilities.
- the processor 501 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods and steps disclosed in the embodiments of the present disclosure.
- the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can be an X86 architecture or an ARM architecture, etc.
- the memory 502 is used to store computer executable instructions in a non-temporary manner, and the processor 501 is used to execute the computer executable instructions.
- the processor 501 is used to execute the computer executable instructions.
- memory 502 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
- Nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- Volatile memory may be a random access memory (RAM), which is used as an external cache.
- RAM random access memory
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- DDRSDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronously linked dynamic random access memory
- DRRAM direct memory bus random access memory
- the scene recognition is performed, and the master device directly ends the write transaction processing after receiving the write response, and does not need to send an ACK message to the slave device, thereby reducing the number of ACK messages and reducing the need for ACK messages in the protocol.
- the requirements are reduced, the power consumption, delay and bandwidth occupancy caused by ACK message transmission are reduced, and the turnover rate of the buffer on the master device side is optimized. Under the same performance, the number of buffers required on the master device side is smaller, saving area and power consumption.
- At least one embodiment of the present disclosure further provides a non-transitory storage medium that non-transitorily stores computer executable instructions. For example, when the computer executable instructions are executed by a processor, the data processing method provided by at least one embodiment of the present disclosure is implemented.
- Fig. 7 is a schematic diagram of a non-transitory storage medium provided by some embodiments of the present disclosure. As shown in Fig. 7, the non-transitory storage medium 600 can non-transitorily store computer executable instructions 610, which implement the data processing method provided by any embodiment of the present disclosure when executed by a computer.
- non-transitory storage medium in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
- each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains at least one executable instruction for realizing the specified logical function.
- the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each box in the block diagram and/or flowchart, and the combination of boxes in the block diagram and/or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
- various example embodiments of the present disclosure may be implemented in hardware or dedicated circuits, software, firmware, logic, or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device.
- firmware or software that may be executed by a controller, microprocessor, or other computing device.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
Claims (15)
- 一种数据处理方法,包括:响应于收到第一缓存要将第一数据写回内存的写请求,缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃,其中,所述写请求携带所述第一数据,所述缓存一致性节点配置为维护由多个缓存中存储的数据的一致性,所述多个缓存包括所述第一缓存,以及在所述缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃之后,所述缓存一致性节点向所述第一缓存返回写响应信号以直接结束对所述写请求的处理操作。
- 根据权利要求1所述的数据处理方法,所述响应于收到第一缓存要将第一数据写回内存的写请求,缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃,包括:响应于收到所述第一缓存要将所述第一数据写回所述内存的所述写请求,所述缓存一致性节点确定所述第一缓存是否与所述缓存一致性节点侧记录的当前独占所述第一数据的缓存相同,以及响应于确定所述第一缓存与所述缓存一致性节点侧记录的当前独占所述第一数据的缓存相同,所述缓存一致性节点将所述第一数据写入所述内存。
- 根据权利要求1或2所述的数据处理方法,所述在所述缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃之后,所述缓存一致性节点向所述第一缓存返回写响应信号以直接结束对所述写请求的处理操作,包括:在所述缓存一致性节点将所述第一数据写入内存之后,所述内存向所述缓存一致性节点返回指示所述第一数据已经被写入所述内存的写响应,以及响应于从所述内存收到指示所述第一数据已经被写入所述内存的所述写响应,所述缓存一致性节点向所述第一缓存返回指示所述第一数据已经被写回所述内存的所述写响应信号以直接结束对所述写请求的处理操作。
- 根据权利要求1-3中的任一项所述的数据处理方法,还包括:在所述缓存一致性节点将所述第一数据写入所述内存之后,所述缓存一致性节点将所述第一缓存的数据状态置为无效态、共享态或独占态,其中,所述无效态表示所述第一缓存没有缓存所述第一数据,所述共享态表示所述第一缓存与其他缓存均缓存有所述第一数据,所述独占态表示仅所述第一缓存中缓存有所述第一数据。
- 根据权利要求1-4中的任一项所述的数据处理方法,还包括:响应于收到第二缓存对所述第一数据的读请求且所述缓存一致性节点侧记录所述第一数据在所述第一缓存中处于独占状态或共享状态,所述缓存一致性节点向所述第一缓存发起监测信号;响应于所述第一缓存在发出所述写请求之后收到所述监测信号,所述第一缓存响应于所述监测信号向所述缓存一致性节点返回携带所述第一数据的监测响应。
- 根据权利要求5所述的数据处理方法,还包括:响应于收到所述监测响应,所述缓存一致性节点将所述第一数据返回给所述第二缓存,以及在收到所述第一数据之后,所述第二缓存向所述缓存一致性节点返回指示已经收到所述第一数据的报文以结束所述读请求。
- 根据权利要求6所述的数据处理方法,所述响应于收到所述监测响应,所述缓存一致性节点将所述第一数据返回给所述第二缓存,包括:响应于收到所述监测响应,所述缓存一致性节点将所述第一数据返回给所述第二缓存,并且将所述第二缓存的数据状态置为独占态,所述独占态表示仅所述第二缓存中缓存有所述第一数据。
- 根据权利要求6所述的数据处理方法,所述在所述缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃之后,所述缓存一致性节点向所述第一缓存返回写响应信号以直接结束对所述写请求的处理操作,包括:在收到所述报文之后,所述缓存一致性节点丢弃所述写请求写入所述缓 存一致性节点侧的所述第一数据,并且向所述第一缓存返回所述写响应信号以直接结束对所述写请求的处理操作。
- 根据权利要求8所述的数据处理方法,所述在收到所述报文之后,所述缓存一致性节点丢弃所述写请求写入所述缓存一致性节点侧的所述第一数据,包括:响应于在收到所述报文之后确定所述写请求写入所述缓存一致性节点侧的所述第一数据为无效数据,所述缓存一致性节点丢弃所述写请求写入所述缓存一致性节点侧的所述第一数据。
- 一种电子设备,包括:多个缓存,包括第一缓存;以及缓存一致性节点,配置为响应于收到所述第一缓存要将第一数据写回内存的写请求,将所述第一数据写入内存或将所述第一数据丢弃,以及在所述缓存一致性节点将所述第一数据写入内存或将所述第一数据丢弃之后,向所述第一缓存返回写响应信号以直接结束对所述写请求的处理操作,其中,所述写请求携带所述第一数据,所述缓存一致性节点配置为维护由所述多个缓存中存储的数据的一致性。
- 根据权利要求10所述的电子设备,其中,所述缓存一致性节点还配置为:响应于收到所述第一缓存要将所述第一数据写回所述内存的所述写请求,确定所述第一缓存是否与所述缓存一致性节点侧记录的当前独占所述第一数据的缓存相同,以及响应于确定所述第一缓存与所述缓存一致性节点侧记录的当前独占所述第一数据的缓存相同,将所述第一数据写入所述内存。
- 根据权利要求10或11所述的电子设备,其中,所述内存配置为:在所述缓存一致性节点将所述第一数据写入内存之后,向所述缓存一致性节点返回指示所述第一数据已经被写入所述内存的写响应,并且所述缓存一致性节点还配置为:响应于从所述内存收到指示所述第一数 据已经被写入所述内存的所述写响应,向所述第一缓存返回指示所述第一数据已经被写回所述内存的所述写响应信号以直接结束对所述写请求的处理操作。
- 根据权利要求10-12中的任一项所述的电子设备,其中,所述缓存一致性节点还配置为:响应于收到第二缓存对所述第一数据的读请求且所述缓存一致性节点侧记录所述第一数据在所述第一缓存中处于独占状态或共享状态,向所述第一缓存发起监测信号,并且所述第一缓存配置为:响应于所述第一缓存在发出所述写请求之后收到所述监测信号,向所述缓存一致性节点返回携带所述第一数据的监测响应。
- 一种数据处理装置,包括:存储器,配置为存储计算机可执行指令;以及处理器,配置为执行所述计算机可执行指令,其中,所述计算机可执行指令被所述处理器执行时实现根据权利要求1-9中任一项所述的方法。
- 一种非暂时性存储介质,非暂时性地存储计算机可执行指令,其中,当所述计算机可执行指令由处理器执行时,实现根据权利要求1-9中任一项所述的方法。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020257005683A KR20250083449A (ko) | 2023-11-27 | 2024-06-04 | 데이터 처리 방법 및 장치, 전자 디바이스, 및 저장 매체 |
| EP24837279.9A EP4589930A4 (en) | 2023-11-27 | 2024-06-04 | DATA PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIA |
| JP2025504111A JP2026500592A (ja) | 2023-11-27 | 2024-06-04 | データ処理方法、装置、電子機器及び記憶媒体 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311598492.4A CN117560422B (zh) | 2023-11-27 | 2023-11-27 | 数据处理方法和装置、电子设备以及存储介质 |
| CN202311598492.4 | 2023-11-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025112410A1 true WO2025112410A1 (zh) | 2025-06-05 |
Family
ID=89814463
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/097159 Pending WO2025112410A1 (zh) | 2023-11-27 | 2024-06-04 | 数据处理方法和装置、电子设备以及存储介质 |
Country Status (5)
| Country | Link |
|---|---|
| EP (1) | EP4589930A4 (zh) |
| JP (1) | JP2026500592A (zh) |
| KR (1) | KR20250083449A (zh) |
| CN (1) | CN117560422B (zh) |
| WO (1) | WO2025112410A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117560422B (zh) * | 2023-11-27 | 2025-09-30 | 海光信息技术股份有限公司 | 数据处理方法和装置、电子设备以及存储介质 |
| CN118051685B (zh) * | 2024-03-15 | 2025-02-18 | 海光信息技术股份有限公司 | 数据处理方法和装置、电子设备和存储介质 |
| CN118519957B (zh) * | 2024-06-07 | 2025-02-18 | 北京开源芯片研究院 | 一种数据处理方法、装置、电子设备及可读存储介质 |
| CN119135686B (zh) * | 2024-09-27 | 2025-11-18 | 山东云海国创云计算装备产业创新中心有限公司 | 一种服务器,片上网络系统及一种报文处理设备和方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104991868A (zh) * | 2015-06-09 | 2015-10-21 | 浪潮(北京)电子信息产业有限公司 | 一种多核处理器系统和缓存一致性处理方法 |
| US20180157590A1 (en) * | 2016-12-02 | 2018-06-07 | Arm Limited | Filtering coherency protocol transactions |
| CN114116531A (zh) * | 2022-01-28 | 2022-03-01 | 苏州浪潮智能科技有限公司 | 一种缓存一致性写回的方法、装置、设备及介质 |
| CN116089116A (zh) * | 2022-12-16 | 2023-05-09 | 成都海光集成电路设计有限公司 | 数据处理方法及装置 |
| CN117560422A (zh) * | 2023-11-27 | 2024-02-13 | 海光信息技术股份有限公司 | 数据处理方法和装置、电子设备以及存储介质 |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0816885B2 (ja) * | 1993-04-27 | 1996-02-21 | 工業技術院長 | キャッシュメモリ制御方法 |
| US8205045B2 (en) * | 2008-07-07 | 2012-06-19 | Intel Corporation | Satisfying memory ordering requirements between partial writes and non-snoop accesses |
| US8996812B2 (en) * | 2009-06-19 | 2015-03-31 | International Business Machines Corporation | Write-back coherency data cache for resolving read/write conflicts |
| US8782347B2 (en) * | 2009-06-26 | 2014-07-15 | Intel Corporation | Controllably exiting an unknown state of a cache coherency directory |
| US8327228B2 (en) * | 2009-09-30 | 2012-12-04 | Intel Corporation | Home agent data and memory management |
| US8949547B2 (en) * | 2011-08-08 | 2015-02-03 | Arm Limited | Coherency controller and method for data hazard handling for copending data access requests |
| CN102591800B (zh) * | 2011-12-31 | 2015-01-07 | 龙芯中科技术有限公司 | 一种弱一致性存储模型的数据访存系统和方法 |
| US20140040561A1 (en) * | 2012-07-31 | 2014-02-06 | Futurewei Technologies, Inc. | Handling cache write-back and cache eviction for cache coherence |
| US10268583B2 (en) * | 2012-10-22 | 2019-04-23 | Intel Corporation | High performance interconnect coherence protocol resolving conflict based on home transaction identifier different from requester transaction identifier |
| US10489298B2 (en) * | 2015-07-28 | 2019-11-26 | Hewlett Packard Enterprise Development Lp | Hardware flush assist |
| JP6631317B2 (ja) * | 2016-02-26 | 2020-01-15 | 富士通株式会社 | 演算処理装置、情報処理装置および情報処理装置の制御方法 |
| US10489323B2 (en) * | 2016-12-20 | 2019-11-26 | Arm Limited | Data processing system for a home node to authorize a master to bypass the home node to directly send data to a slave |
| US10621103B2 (en) * | 2017-12-05 | 2020-04-14 | Arm Limited | Apparatus and method for handling write operations |
| US11803470B2 (en) * | 2020-09-25 | 2023-10-31 | Advanced Micro Devices, Inc. | Multi-level cache coherency protocol for cache line evictions |
-
2023
- 2023-11-27 CN CN202311598492.4A patent/CN117560422B/zh active Active
-
2024
- 2024-06-04 KR KR1020257005683A patent/KR20250083449A/ko active Pending
- 2024-06-04 WO PCT/CN2024/097159 patent/WO2025112410A1/zh active Pending
- 2024-06-04 EP EP24837279.9A patent/EP4589930A4/en active Pending
- 2024-06-04 JP JP2025504111A patent/JP2026500592A/ja active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104991868A (zh) * | 2015-06-09 | 2015-10-21 | 浪潮(北京)电子信息产业有限公司 | 一种多核处理器系统和缓存一致性处理方法 |
| US20180157590A1 (en) * | 2016-12-02 | 2018-06-07 | Arm Limited | Filtering coherency protocol transactions |
| CN114116531A (zh) * | 2022-01-28 | 2022-03-01 | 苏州浪潮智能科技有限公司 | 一种缓存一致性写回的方法、装置、设备及介质 |
| CN116089116A (zh) * | 2022-12-16 | 2023-05-09 | 成都海光集成电路设计有限公司 | 数据处理方法及装置 |
| CN117560422A (zh) * | 2023-11-27 | 2024-02-13 | 海光信息技术股份有限公司 | 数据处理方法和装置、电子设备以及存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4589930A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4589930A4 (en) | 2025-12-17 |
| JP2026500592A (ja) | 2026-01-08 |
| CN117560422A (zh) | 2024-02-13 |
| KR20250083449A (ko) | 2025-06-10 |
| EP4589930A1 (en) | 2025-07-23 |
| CN117560422B (zh) | 2025-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2025112410A1 (zh) | 数据处理方法和装置、电子设备以及存储介质 | |
| US12061562B2 (en) | Computer memory expansion device and method of operation | |
| US11741034B2 (en) | Memory device including direct memory access engine, system including the memory device, and method of operating the memory device | |
| TWI318737B (en) | Method and apparatus for predicting early write-back of owned cache blocks, and multiprocessor computer system | |
| CN113918101B (zh) | 一种写数据高速缓存的方法、系统、设备和存储介质 | |
| CN106844048B (zh) | 基于硬件特性的分布式共享内存方法及系统 | |
| CN106527974A (zh) | 一种写数据的方法、设备及系统 | |
| CN117707999A (zh) | 数据处理方法和装置、电子设备和存储介质 | |
| WO2021082877A1 (zh) | 访问固态硬盘的方法及装置 | |
| CN116679886A (zh) | 数据处理方法及装置、电子设备、缓存和存储介质 | |
| US12561271B2 (en) | Computing systems having congestion monitors therein and methods of controlling operation of same | |
| CN114238165B (zh) | 数据处理方法、数据处理装置以及存储介质 | |
| US20170199819A1 (en) | Cache Directory Processing Method for Multi-Core Processor System, and Directory Controller | |
| US20030189944A1 (en) | Distributed shared memory system and data-maintenance method of same | |
| CN120336205A (zh) | 内存页面迁移方法、cxl内存扩展设备及计算设备 | |
| CN119440881A (zh) | 一种多核一致性处理方法、系统、设备及存储介质 | |
| CN114356839B (zh) | 处理写操作的方法、设备、处理器及设备可读存储介质 | |
| CN109597776B (zh) | 一种数据操作方法、内存控制器以及多处理器系统 | |
| CN112612726B (zh) | 基于缓存一致性的数据存储方法、装置、处理芯片及服务器 | |
| US11054993B2 (en) | Mass storage system having peer-to-peer data movements between a cache and a backend store | |
| CN110309224A (zh) | 一种数据复制方法及装置 | |
| CN114238170A (zh) | 数据处理方法、数据处理装置和存储介质 | |
| CN114550805A (zh) | 半导体装置 | |
| CN119690692B (zh) | 数据处理方法及装置 | |
| US12517829B1 (en) | Processing writes to multiple targets in a directory-based cache coherent electronic system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2025504111 Country of ref document: JP Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2025504111 Country of ref document: JP |
|
| ENP | Entry into the national phase |
Ref document number: 2024837279 Country of ref document: EP Effective date: 20250122 |
|
| WWP | Wipo information: published in national office |
Ref document number: 1020257005683 Country of ref document: KR |
|
| WWP | Wipo information: published in national office |
Ref document number: 2024837279 Country of ref document: EP |