Apparatus and method for maintaining cache/main memory consistency utilizing a dual port FIFO buffer
First Claim
1. Apparatus coupled to a first agent that is coupled to a system bus, the apparatus temporarily storing data received from the first agent before the data is written to a system memory means that is also coupled to the system bus, comprising:
- buffer storage means, said buffer storage means including,a first storage means for storing a unit of data having a predetermined number of bits, the first storage means having an output coupled to the system bus;
a second storage means for storing a system memory means command for indicating a system memory means write operation for a unit of data stored within the first storage means, the system memory means command selectively specifying a full word memory means write operation or a partial word memory means write operation, the second storage means having an output;
a third storage means for storing a system memory means address at which a stored unit of data is to be written in accordance with a system memory means command that is stored within the second storage means, the third storage means having an output coupled to the system bus;
the apparatus further including,buffer means having an input coupled to said output of said second storage means and an output coupled to the system bus;
detecting means, having an input coupled to the system bus and an output, for detecting from the system bus an occurrence of a write access by a second agent to the system memory means; and
logic means, having an input coupled to the output of the detecting means and an output coupled to said buffer means, the logic means being responsive to the detecting means detecting an occurrence of a write access by the second agent to the system memory means and further being responsive to the first storage means having a unit of data stored therein, during an occurrence of the write access by the second agent, for causing the output of said buffer means to change from a first condition, wherein a full word write system memory means command is transmitted over the system bus to the system memory means without regard for the system memory means command that is stored within the second storage means, to a second condition wherein the system memory means command that is stored in the second storage means is transmitted through said buffer means to the system bus and to the system memory means.
6 Assignments
0 Petitions
Accused Products
Abstract
An apparatus and method for maintaining cache/main memory consistency in a data processing system including a write-through cache (14). For write operations of less than a word in length, the write data stored within a FIFO memory device 18 associated with a first bus agent reflects the result of a read/modify/write type of access wherein a byte or half word has been merged by a local processor 12 with a cache word. Memory control lines driven to a system bus 20 indicate to a memory controller 22 that a write operation is to be accomplished as a word write, thereby eliminating the additional time required to achieve a read/modify/write memory controller cycle. To prevent the occurrence of a problem wherein another bus agent, such as another CPU or an I/O device, writes to a system memory 24 during an interval of time that the word of data is temporarily buffered within the FIFO there is provided circuitry for detecting an external write made to the system memory. Circuitry is provided for changing the memory command lines to indicate, instead of a word write, a byte write or a half-word write operation. This causes the memory controller to operate only upon the portion of data word that was modified by the local processor and to perform a conventional read/modify/write type of cycle to merge the byte or half word with a word from main memory.
-
Citations
12 Claims
-
1. Apparatus coupled to a first agent that is coupled to a system bus, the apparatus temporarily storing data received from the first agent before the data is written to a system memory means that is also coupled to the system bus, comprising:
buffer storage means, said buffer storage means including, a first storage means for storing a unit of data having a predetermined number of bits, the first storage means having an output coupled to the system bus; a second storage means for storing a system memory means command for indicating a system memory means write operation for a unit of data stored within the first storage means, the system memory means command selectively specifying a full word memory means write operation or a partial word memory means write operation, the second storage means having an output; a third storage means for storing a system memory means address at which a stored unit of data is to be written in accordance with a system memory means command that is stored within the second storage means, the third storage means having an output coupled to the system bus; the apparatus further including, buffer means having an input coupled to said output of said second storage means and an output coupled to the system bus; detecting means, having an input coupled to the system bus and an output, for detecting from the system bus an occurrence of a write access by a second agent to the system memory means; and logic means, having an input coupled to the output of the detecting means and an output coupled to said buffer means, the logic means being responsive to the detecting means detecting an occurrence of a write access by the second agent to the system memory means and further being responsive to the first storage means having a unit of data stored therein, during an occurrence of the write access by the second agent, for causing the output of said buffer means to change from a first condition, wherein a full word write system memory means command is transmitted over the system bus to the system memory means without regard for the system memory means command that is stored within the second storage means, to a second condition wherein the system memory means command that is stored in the second storage means is transmitted through said buffer means to the system bus and to the system memory means. - View Dependent Claims (2, 3, 4)
-
5. A method of providing data from a first agent to a system bus for storage within a system memory means, comprising the steps of:
-
receiving, from a data processing means coupled to the first agent, at least one unit of data; storing the at least one unit of data in a storage means; and providing a stored unit of data to the system bus for storage within the system memory means, wherein the step of providing includes the steps of, determining if the storage means has at least one unit of data stored therein; detecting from the system bus an occurrence of a write access by a second agent to the system memory means; and if the occurrence of a write access is not detected, providing the stored unit of data to the system memory means over the system bus while indicating to the system memory means over the system bus that the entire unit of data is to be written to the system memory means, and, if the occurrence of a write access is detected, providing the stored unit of data to the system memory means over the system bus while indicating to the system memory means over the system bus that only a portion of the unit of data is to be written to the system memory means, wherein the step of receiving includes the steps of reading a unit of data from a cache memory means coupled to the first agent, the unit of data read from the cache memory means being comprised of a plurality of bytes of data; merging at least one byte of data with the unit of data read from the cache memory means; and storing the unit of data having the at least one merged byte into the cache memory means at a predetermined address, the step of storing the unit of data into the cache memory means also including the steps of, storing the unit of data having the at least one merged byte into the storage means, storing an address associated with the unit of data having the at least one merged byte into the storage means, and storing a memory command into the storage means, the memory command indicating that the unit of data stored within the storage means has at least one byte merged therein. - View Dependent Claims (6, 7, 8, 9)
-
-
10. Write-through cache apparatus associated with a first system bus agent, comprising:
-
read/write cache memory means coupled through a system bus to a main system memory for storing data also residing in the main system memory, the data having a width of at least a data word, wherein a data word is comprised of a plurality of bytes, said cache memory means being coupled to a data processor means for receiving data therefrom and for providing data thereto; dual port memory means for storing at least one data word, said dual port memory means having a first port coupled to said cache memory means for simultaneously receiving and storing a data word written by the data processor to said cache memory means, said dual port memory means having a second port coupled to the system bus for providing at least one stored data word thereto for storage within the main system memory; means coupled to the system bus for generating main system memory commands and for providing the commands over the system bus to the main system memory, a first command indicating that all bytes of a data word are to be stored within the main system memory and a second command indicating that only one or more bytes, but not all bytes, of the data word are to be stored within the main system memory; and means coupled to the system bus for detecting from the system bus an occurrence of a write access by a second system bus agent to the main system memory, the detecting means further being coupled to and responsive to said dual port memory means having at least one data word stored therein, during an occurrence of the write access by the second system bus agent, for causing an output of the generating means to generate the second command instead of the first command, wherein said dual port memory means includes storage means for storing a main system memory address associated with each stored word and further includes storage means for storing a memory command associated with each stored data word, the memory command storage means having an output coupled to the generating means for providing the memory command to the main system memory. - View Dependent Claims (11, 12)
-
Specification