US6345320B1 - DMA address buffer and cache-memory control system - Google Patents

DMA address buffer and cache-memory control system Download PDF

Info

Publication number
US6345320B1
US6345320B1 US09/164,677 US16467798A US6345320B1 US 6345320 B1 US6345320 B1 US 6345320B1 US 16467798 A US16467798 A US 16467798A US 6345320 B1 US6345320 B1 US 6345320B1
Authority
US
United States
Prior art keywords
cache
memory
control unit
operand
address
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.)
Expired - Fee Related
Application number
US09/164,677
Inventor
Shigeaki Kawamata
Atsushi Yoshioka
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Assigned to FUJITSU LIMITED reassignment FUJITSU LIMITED ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: KAWAMATA, SHIGEAKI, YOSHIOKA, ATSUSHI
Application granted granted Critical
Publication of US6345320B1 publication Critical patent/US6345320B1/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • G06F12/0831Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
    • G06F12/0835Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means for main memory peripheral accesses (e.g. I/O or DMA)
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0844Multiple simultaneous or quasi-simultaneous cache accessing
    • G06F12/0846Cache with multiple tag or data arrays being simultaneously accessible
    • G06F12/0848Partitioned cache, e.g. separate instruction and operand caches

Definitions

  • the present invention generally relates to cache-memory-control systems, and particularly relates to a cache-memory-control system which achieves an enhanced system performance by introducing cache arbitration.
  • FIG. 1 is a schematic diagram of a related-art system.
  • FIG. 1 A configuration of FIG. 1 includes a central-control unit 10 , a cache memory 11 provided in the central-control unit 10 , a main memory 2 , an input/output-control device 3 , and a system bus 4 which connects between these elements.
  • the cache memory 11 stores instructions and data of frequent use and initially stored in the main memory 2 with aim of eliminating a need for the central-control unit 10 to access the main memory 2 each time such instructions and data become necessary.
  • the cache memory 11 is a temporal storage capable of a high-speed operation.
  • a cache-control unit monitors an address used when the input/output-control device 3 accesses the main memory 2 .
  • a bus-snoop function in order to avoid data inconsistency between the cache memory 11 and the main memory 2 .
  • data inconsistency may arise when data is written in the main memory 2 by use of a DMA (direct memory access) mode.
  • a measure generally taken to achieve the bus-snoop function includes invalidating cache data when the DMA-write access is directed to an address encompassed by the cache memory 11 .
  • the bus-snoop function monitors the system bus 4 during a period when the input/output-control device 3 accesses the main memory 2 by use of a DMA mode. During this period, the central-control unit 10 cannot gain access to the cache memory 11 , and has to wait until the access is granted.
  • Japanese Laid-open Patent Applications No. 5-97378 and No. 6-94821 disclose a bus-snoop control unit which is provided with a buffer as a temporal storage of DMA addresses.
  • the cache invalidating operation is performed when a CPU becomes available, thereby avoiding a reduction in a processor-bus performance. If the buffer becomes full, however, the DMA operation has to be stopped, or the cache memory in its entirety has to be invalidated. This results in affecting the system performance.
  • a system includes a main-memory unit, an input/output-control unit which performs a write operation with respect to the main-memory unit by way of direct memory access, and a central-control unit which operates based on information stored in the main-memory unit, the central-control unit including a cache memory which temporarily stores some of the information, and a DMA buffer which temporarily stores a DMA address indicated by the direct memory access.
  • the system as described above is such that the central-control unit invalidates a cache address in the cache memory when the DMA address stored in the DMA buffer matches the cache address.
  • the system as described above is such that the cache memory includes an instruction-cache memory which stores instructions as part of the information, and an operand-cache memory which stores operands as part of the information, and such that the central-control unit includes a cache-invalidation buffer which temporarily stores an operand-write address when an operand is written in the operand-cache memory, and invalidates a cache address in the cache memory when the operand-write address stored in the cache-invalidation buffer matches the cache address.
  • a system includes a main-memory unit, an input/output-control unit which performs a write operation with respect to the main-memory unit by way of direct memory access, a CPU which operates based on information stored in the main-memory unit, a cache memory which temporarily stores some of the information, and avails the some of the information to the CPU when the CPU makes a cache request, a DMA buffer which temporarily stores a DMA address indicated in the direct memory access, and a cache-control unit which gives priority to a cache-invalidation request over the cache request from the CPU when the cache-invalidation request is generated in connection with the direct memory access, and accesses the cache memory at the same speed as the CPU accesses the cache memory, so as to invalidate a cache address in the cache memory when the DMA address stored in the DMA buffer matches the cache address.
  • the system as described above further includes a bus-request-control-and-bus-interface-control unit which generates the cache-invalidation request and stores the DMA address in the DMA buffer upon a bus request when the input/output-control unit issues the bus request in an attempt to perform the write operation with respect to the main-memory unit.
  • the system as described above is such that the bus-request-control-and-bus-interface-control unit put another bus request on a hold when another input/output-control unit makes the another bus request in an attempt to perform a write operation with respect to the main-memory unit while the DMA buffer indicates a busy status.
  • the system as described above is such that the cache memory includes an instruction-cache memory which stores instructions as part of the information, and an operand-cache memory which stores operands as part of the information
  • the cache-control unit includes an instruction-cache-control unit which controls access to the instruction-cache memory, an operand-cache-control unit which controls access to the operand-cache memory, and a cache-invalidation buffer, provided in the operand-cache-control unit, which temporarily stores an operand-write address when an operand is written in the operand-cache memory by a request from the CPU, wherein the instruction-cache-control unit invalidates a cache address in the instruction-cache memory when the operand-write address stored in the cache-invalidation buffer matches the cache address.
  • the system as described above is such that the instruction-cache-control unit and the operand-cache-control unit operate independently of each other when attending to requests from the CPU as the CPU attempts to access the instruction-cache memory and the operand-cache memory.
  • the system having the central-control unit, the main-memory unit, and the input/output-control unit connected via a system bus is provided with the cache memory for temporarily storing data in the central-control unit and the DMA buffer for temporarily storing a DMA address when a DMA-write operation is conducted by the input/output-control unit.
  • the DMA address at which the input/output-control unit accesses the main-memory unit is held in the storage, and an address comparison is made between the DMA address in the storage and cache addresses so as to check if there is an address match.
  • the matched address of the cache memory is invalidated by the central-control unit, so that consistency is maintained between the contents of the cache memory and the contents of the main-memory unit.
  • the cache memory is divided into the instruction-cache memory and the operand-cache memory, and a buffer is provided to store an operand-write address when a write operation is conducted with respect to the operand-cache memory.
  • the central-control unit invalidates a pertinent address of the instruction-cache memory if this address of the instruction-cache memory matches the operand-write address stored in the buffer.
  • This configuration allows the instruction and operand cache-control units to operate independently of each other, while insuring data consistency between the instruction-cache memory and the operand-cache memory as well as between the cache memories and the main-memory unit, thereby enhancing the system performance.
  • FIG. 1 is a schematic block diagram of a related-art system
  • FIG. 2 is a schematic block diagram of a system according to a principle of the present invention.
  • FIG. 3 is a block diagram of a first embodiment of the present invention.
  • FIG. 4 is a block diagram showing a second embodiment of the present invention.
  • FIGS. 5A through 5P are timing charts showing first operations according to the present invention.
  • FIGS. 6A through 6R are timing charts showing second operations according to the present invention.
  • FIGS. 7A through 7S are timing charts showing third operations according to the present invention.
  • FIGS. 8A through 8T are timing charts showing fourth operations according to the present invention.
  • FIG. 2 is a block diagram of a system according to a principle of the present invention.
  • the same elements as those of FIG. 1 are referred to by the same numerals, and a description thereof will be omitted.
  • the central-control unit 10 includes the cache memory 11 , a cache-control unit 12 for controlling operations of the cache memory 11 , and a DMA (direct memory access) buffer 12 a which stores addresses used when the input/output-control device 3 accesses the main memory 2 by use of a DMA mode. Further, the central-control unit 10 includes a CPU (central processing unit) 13 .
  • the central-control unit 10 further includes a processor bus 5 connecting between the cache-control unit 12 and the CPU 13 .
  • the cache-control unit 12 is connected to the system bus 4 , which connects between all the relevant elements. As shown in the figure, the main memory 2 and the input/output-control device 3 are connected to the system bus 4 .
  • an address is stored when the input/output-control device 3 accesses this address of the main memory 2 as part of an write operation, and is compared with addresses encompassed by the cache memory 11 . In this manner, a check is made as to whether the same address is present.
  • the central-control unit 10 invalidates data of the cache memory with respect to a particular address when this particular address matches the address stored in the DMA buffer.
  • the CPU 13 invalidates a pertinent portion of the cache memory 11 . This insures that the contents of the cache memory 11 sustain consistency with the contents of the main memory 2 .
  • the cache memory 11 may be divided into an instruction cache and an operand cache, and a buffer for storing an address used in an operand-write operation may be provided.
  • the central-control unit 10 invalidates a particular address of the instruction cache when this particular address matches the address stored in the abovementioned buffer during the operand-writhe operation.
  • the processor bus 5 is generally ten times as fast as the system bus 4 in terms of operation speed thereof. If the processor bus 5 is suspended when the input/output-control device 3 accesses the main memory 2 , therefore, the CPU 13 has to forsake at least 10 accesses that would have been made to the cache memory 11 each time the input/output-control device 3 accesses the main memory 2 . In order to avoid this, the cache-control unit 12 stores an address to which a write access is made by the input/output-control device 3 , and performs a cache-access operation at the same speed as a cache-access operation made by the CPU 13 .
  • Priority given to this cache access is higher than that given to the cache access by the CPU 13 .
  • the CPU 13 thus has to wait only a time period equivalent to one cache access before being able to access the cache memory 11 next time.
  • a system arbiter (not shown) denies a request from the input/output-control device 3 to access the bus by not returning acknowledgement to the request. This eliminates a need to install more than one buffer and a need to abort a DMA-write operation.
  • the cache-access arbiter and the system-bus arbiter are separately provided, wherein the cache-access arbiter gives priority to the input/output-control device 3 , and the system-bus arbiter denies a request from the input/output-control device 3 to access the bus if such an access is granted once until the cache-control unit 12 returns an acknowledgement. This prevents a decline in the system performance.
  • the buffer temporarily stores a write address when an operand-write operation is performed during the instruction-cache invalidating mode. Based on the write address stored in the buffer, a request for invalidating the instruction cache is made to the cache memory. This request is given higher priority than a request from the CPU to load an instruction.
  • the instruction-cache memory and the operand-cache memory operate independently of each other, thereby eliminating such a waiting period as would be necessary in the related art in which a write operation would have to be delayed until both of the cache memories become available. Further, if the buffer is full, a next operand-access operation is delayed until the buffer becomes available.
  • FIG. 3 is a block diagram of a first embodiment of the present invention.
  • the same elements as those of FIG. 2 are referred to by the same numerals, and a description thereof will be omitted.
  • the input/output-control device 3 and the main memory 2 are connected to the system bus 4 .
  • Other elements shown in FIG. 3 belong to the central-control unit 10 which is also connected to the system bus 4 .
  • the central-control unit 10 includes the cache memory 11 , the cache-control unit 12 for controlling the cache memory 11 , the CPU 13 for attending to overall control of the central-control unit 10 , a system-bus-interface-control unit 14 , and an input/output-control-bus-request-control unit 15 .
  • the cache-control unit 12 includes a cache-access arbiter 20 .
  • the system-bus-interface-control unit 14 is connected to the system bus 4 , and attends to control of a system-bus interface.
  • the system-bus-interface-control unit 14 includes the DMA buffer 12 a.
  • the input/output-control-bus-request-control unit 15 is connected to the system bus 4 and the system-bus-interface-control unit 14 , and exchanges a bus-request signal REQ, an acknowledgement signal ACK, and a buffer-busy signal BFBUSY with the system-bus-interface-control unit 14 .
  • the input/output-control-bus-request-control unit 15 exchanges the bus-request signal REQ and the acknowledgement signal ACK with the system bus 4 .
  • the acknowledgement signal ACK is transmitted each time the input/output-control device 3 accesses the system bus 4 . Further, a cache-invalidation request and a cache-invalidation-request acknowledgement are exchanged between the system-bus-interface-control unit 14 and the cache-control unit 12 .
  • the cache-access arbiter 20 arbitrates between a cache request REQ from the CPU 13 and the cache-invalidation request from the system-bus-interface-control unit 14 when the cache-invalidation request is resulted from a DMA-write operation by the input/output-control device 3 .
  • the system-bus-interface-control unit 14 arbitrates between an access attempted by the CPU 13 and a DMA request made by the input/output-control device 3 , both of which are directed to the main memory 2 . Such an access is attempted by the CPU 13 when the CPU 13 requires a write access to the main memory 2 or when a cache-miss hit occurs. If the access attempted by the CPU 13 is granted, the system-bus-interface-control unit 14 accesses the main memory 2 accordingly. If the request from the input/output-control device 3 is accepted, the system-bus-interface-control unit 14 stores the accessed address in the DMA buffer 12 a , and sends a cache-invalidation request to the cache-control unit 12 .
  • the input/output-control-bus-request-control unit 15 arbitrates between several bus requests issued from different input/output-control devices 3 (only one is shown in FIG. 3 ), and informs the system-bus-interface-control unit 14 of a bus request REQ.
  • this bus request is forwarded to the system-bus-interface-control unit 14 via the input/output-control-bus-request-control unit 15 . If the system-bus-interface-control unit 14 is idle, the system-bus-interface-control unit 14 returns the acknowledgement signal ACK to the input/output-control-bus-request-control unit 15 . If the DMA buffer 12 a already has data stored therein, and the cache-invalidation operation is not yet finished, the acknowledgement signal ACK is not returned. In this case, the input/output-control device 3 does not take a next action.
  • the input/output-control-bus-request-control unit 15 Upon receiving the acknowledgement signal ACK, the input/output-control-bus-request-control unit 15 sends an acknowledgement ACK to the input/output-control device 3 which requested use of the bus. Then, the input/output-control device 3 commences a DMA-access operation thereof. When this DMA-access operation is that of a write access, the system-bus-interface-control unit 14 stores the accessed address in the DMA buffer 12 a.
  • the system-bus-interface-control unit 14 then holds a state indicative of presence of DMA-buffer data, and sends a cache-invalidation request to the cache-control unit 12 .
  • the cache-control unit 12 accepts this request as having the highest priority (if the CPU 13 is using the cache, the request is accepted as soon as a completion of this cache-access operation). If the address stored in the DMA buffer 12 a matches an address covered by the cache memory 11 , the cache-control unit 12 invalidates the data of this address. If there is no match, on the other hand, the cache-control unit 12 does nothing but to send an acknowledgement ACK to the system-bus-interface-control unit 14 .
  • the system-bus-interface-control unit 14 having received the acknowledgement ACK, moves on to another state indicating absence of DMA-buffer data. If a new bus request has been already made by this time by the input/output-control device 3 , the system-bus-interface-control unit 14 can return an acknowledgement ACK to the input/output-control-bus-request-control unit 15 as soon as an entry into this state.
  • the cache-control unit 12 invalidates a corresponding portion of the cache memory 11 . This insures that consistency is maintained between the contents of the cache memory 11 and the contents of the main memory 2 .
  • FIG. 4 is a block diagram showing a second embodiment of the present invention.
  • the same elements as those of FIG. 3 are referred to by the same numerals, and a description thereof will be omitted.
  • the cache memory is divided into an instruction-cache memory 11 A and an operand-cache memory 11 B.
  • two different cache-control units are provided, including an I-cache-control unit 21 and a P-cache-control unit 22 .
  • the I-cache-control unit 21 controls the instruction-cache memory 11 A
  • the P-cache-control unit 22 takes controls of the operand-cache memory 11 B.
  • the P-cache-control unit 22 includes an I-cache-invalidation buffer 12 b and a P-arbiter 12 d .
  • the I-cache-control unit 21 includes an I-arbiter 12 c .
  • the I-arbiter 12 c sends an instruction-request acknowledgement IACK to the CPU 13 , whereas the CPU 13 sends an instruction request IREQ to the I-arbiter 12 c .
  • the P-arbiter 12 d transmits an operand-request acknowledgement PACK to the CPU 13 , whereas the CPU 13 sends an operand request PREQ to the P-arbiter 12 d.
  • An I-cache-invalidation request is transmitted from the I-cache-invalidation buffer 12 b to the I-arbiter 12 c , while the I-arbiter 12 c returns an I-cache-invalidation-request acknowledgement ACK to the I-cache-invalidation buffer 12 b .
  • the I-arbiter 12 c returns an I-cache-invalidation-request acknowledgement ACK to the I-cache-invalidation buffer 12 b .
  • the I-arbiter 12 c arbitrates between a cache request from the CPU 13 and a cache-invalidation request that is issued when the input/output-control device 3 performs a DMA-write operation.
  • the P-arbiter 12 d attends to arbitration between a cache request from the CPU 13 and a cache-invalidation request when the cache-invalidation request entails a DMA-write operation conducted by the input/output-control device 3 .
  • the I-cache-invalidation buffer 12 b stores an address when an operand-write operation is performed with respect to this address. Then, the I-cache-invalidation buffer 12 b sends an I-cache-invalidation request to the I-cache-control unit 21 . Upon receiving the I-cache-invalidation request, the I-arbiter 12 c refers to the instruction-cache memory 11 A to decide if there is an address that is the same as that stored in the I-cache-invalidation buffer 12 b . If the same address is found, a pertinent portion of the instruction-cache memory 11 A will be expunged.
  • the cache memory is divided into the instruction-cache memory and the operand-cache memory, and a particular portion of the instruction-cache memory is invalidated when an address corresponding to this portion matches the address stored in the buffer. This insures consistency between the contents of the cache memory and the contents of the main memory.
  • FIGS. 5A through 5P are timing charts showing first operations according to the present invention. These operations are performed by the system of FIG. 3 .
  • the figures show a central-control-unit-operation clock CLOCK, a system-bus request IOCREQO from an input/output-control device IOCO, a bus acknowledgement IOCACKO sent to the input/output-control device IOCO, a system-bus-write signal WRITE for writing data in the main memory, a system-bus address ADDRESS (an address in the main memory), system-bus data DATA, a response MMOK from the main memory to the system bus, a bus request DMAREQ from the input/output-control-bus-request-control unit 15 to the system-bus-interface-control unit 14 , an acknowledgement DMAACK responding to the bus request DMAREQ, a busy signal BFBUSY indicating a busy status of the DMA-address buffer and putting a request from another IOC on a hold, a DMA buffer DMABR, a cache-invalidation request CMREQ made to the cache-control unit 12 , an acknowledgement CMACK responding to the cache-
  • the system-bus-interface-control unit 14 responds by returning the acknowledgement DMAACK shown in FIG. 5 I.
  • the busy signal BFBUSY changes to HIGH as shown in FIG. 5J, indicating that the DMA buffer 12 a is busy. This will put a next request from another input/output-control device on a hold.
  • FIG. 5L shows a timing at which the system-bus-interface-control unit 14 sends the cache-invalidation request CMREQ to the cache-control unit 12 .
  • the cache-control unit 12 returns the acknowledgement CMACK to the system-bus-interface-control unit 14 as shown in FIG. 5 M.
  • the cache-memory-data bus CACHEDATA indicates that the same address as that stored in the DMA buffer 12 a exists in the cache memory (i. e., there is a hit).
  • the cache-control unit 12 invalidates a pertinent portion of a tag of the cache memory 11 at a timing as shown in FIG. 5 P.
  • a time period tl indicates a cache-read cycle
  • a time period t 2 shows a cache-write cycle.
  • the CPU 13 is denied access to the cache memory 11 (such a period is called a cache-invalidation cycle).
  • FIGS. 6A through 6R are timing charts showing second operations according to the present invention. These operations are performed by the system of FIG. 3 .
  • the same signals as those of FIGS. 5A through 5P are referred to by the same symbols, and a description thereof will be omitted.
  • FIGS. 6A through 6R show a case in which another input/output-control device IOC 1 makes a system-bus request after a request made by the input/output-control device IOCO.
  • FIG. 6D shows a system-bus request IOCREQ 1 made by the input/output-control device IOC 1
  • FIG. 6E illustrates a bus acknowledgement IOCACK 1 sent to the input/output-control device IOC 1 .
  • the busy signal BFBUSY (FIG. L) at a HIGH level notifies the input/output-control device IOC 1 of the busy status of the DMA buffer 12 a .
  • the system-bus request from the input/output-control device IOC 1 is put on a hold. That is, only after the completion of the IOCDMA cycle regarding input/output-control device IOCO and a corresponding cache-invalidation operation with respect to the cache memory, will an IOCDMA cycle of the input/output-control device IOC 1 be started.
  • FIGS. 7A through 7S are timing charts showing third operations according to the present invention.
  • the same signals as those of FIGS. 5A through 5P are referred to by the same symbols, and a description thereof will be omitted.
  • FIGS. 7N through 7P show a cache-access signal CPUREQ from the CPU 13 , a read/write signal CPURW (indicating a read operation when this signal is HIGH), and a cache acknowledgement CPUACK sent to the CPU 13 .
  • the input/output-control device 3 carries out an IOCDMA cycle while the CPU 13 is accessing the cache memory 11 .
  • the cache-invalidation request CMREQ from the system-bus-interface-control unit 14 takes precedence over an access to the cache memory 11 attempted by the CPU 13 .
  • the input/output-control device IOC performs a data-write operation with respect to the main memory 2 during an IOCDMA cycle shown in the figures.
  • the DMA buffer 12 a stores a memory address which was accessed. This is followed by the cache-invalidation request CMREQ sent from the system-bus-interface-control unit 14 to the cache-control unit 12 .
  • the cache-control unit 12 Upon receipt of this request, the cache-control unit 12 prompts the CPU 13 to stop for a predetermined time period.
  • the cache-control unit 12 When the CPU 13 makes a cache-access request as shown in FIG. 7N, the cache-control unit 12 generates the read/write signal RWCPU with respect to the cache memory 11 as shown in FIG. 70, and writes data in or reads data from the cache memory 11 as shown in FIG. 7 P. Notwithstanding these read/write operations, if a match is found between the address stored in the DMA buffer 12 a and any address of the cache memory 11 , a cache-invalidation cycle is instituted. When this happens, the CPU 13 halts an operation thereof for a period t 3 shown in FIG. 7 P. During this period, the cache-control unit 12 writes an invalidation bit WD in a tag area of the cache memory 11 at timings indicated in FIG. 7 S.
  • FIGS. 8A through 8T are timing charts showing fourth operations according to the present invention. The configuration of FIG. 4 is used for these operations.
  • FIGS. 8A through 8E show the central-control-unit-operation clock CLOCK, an instruction address IADD, an instruction request IREQ, an instruction-request acknowledgement IACK, and instruction data IDATA, respectively.
  • FIGS. 8F through 8M show instruction-cache-memory-bus data ICACHEDATA, an instruction-cache-hit signal IHIT, an instruction-cache-memory-write-enable signal ICACHEWE, an operand address PADD, an operand request PREQ, an operand read/write signal PRW (indicating a read operation when this signal is HIGH), an operand-request acknowledgement PACK, and operand-read data PRDATA.
  • FIGS. 8N through 9T show operand-write data PWDATA, operand-cache-memory-bus data PCACHEDATA, an operand-cache-hit signal PHIT, an operand-cache-memory-write-enable signal PCACHEWE, an I-cache-invalidation-address buffer IDLABR, an I-cache-invalidation request IDLREQ, and an I-cache-invalidation-request acknowledgement IDLACK.
  • the I-arbiter 12 c and the CPU 13 exchange the instruction request IREQ and the instruction-request acknowledgement IACK thererbetween so as to read data from the instruction-cache memory 11 A.
  • the operand request PREQ and the operand-request acknowledgement PACK are exchanged between the P-arbiter 12 d and the CPU 13 , so that data is read from the operand-cache memory 11 B.
  • An operand-write operation is initiated along with the operand-cache-memory-write-enable signal PCACHEWE shown in FIG. 8Q.
  • a period t 3 shown at the bottom of the figures indicates an operand-write cycle. Because of the operand-write operation, the contents of the operand-cache memory 11 B is changed.
  • the I-cache-invalidation buffer 12 b sends the I-cache-invalidation request IDELREQ to the I-arbiter 12 c .
  • a period T 4 shown at the bottom of the figures illustrates the I-cache-invalidation cycle. During this cycle, as shown in FIG. 8H, cache-invalidation data is written in a relevant tag portion of the instruction-cache memory 11 A.
  • the present invention can minimize a decline in the cache-access performance of the CPU which is caused by the input/output-control device when it attempts a DMA access, thereby enhancing a system performance. Also, if an update mode for updating DMA data is instituted, data of the cache memory can be updated in the like manner.
  • an arbiter circuit was conventionally provided on the side of the instruction-cache memory, so that an access cannot be made until after both the instruction-cache-control unit and the operand-cache-control unit become available.
  • the present invention allows these cache-control units to operate independently of each other, thereby enhancing the system performance.

Landscapes

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

Abstract

A system includes a main-memory unit, an input/output-control unit which performs a write operation with respect to the main-memory unit by way of direct memory access, and a central-control unit which operates based on information stored in the main-memory unit, the central-control unit including a cache memory which temporarily stores some of the information, and a DMA buffer which temporarily stores a DMA address indicated by the direct memory access.

Description

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to cache-memory-control systems, and particularly relates to a cache-memory-control system which achieves an enhanced system performance by introducing cache arbitration.
2. Description of the Related Art
FIG. 1 is a schematic diagram of a related-art system.
A configuration of FIG. 1 includes a central-control unit 10, a cache memory 11 provided in the central-control unit 10, a main memory 2, an input/output-control device 3, and a system bus 4 which connects between these elements. The cache memory 11 stores instructions and data of frequent use and initially stored in the main memory 2 with aim of eliminating a need for the central-control unit 10 to access the main memory 2 each time such instructions and data become necessary. Namely, the cache memory 11 is a temporal storage capable of a high-speed operation.
In the system as described above, a cache-control unit monitors an address used when the input/output-control device 3 accesses the main memory 2. In general, such a system is provided with a bus-snoop function in order to avoid data inconsistency between the cache memory 11 and the main memory 2. Such data inconsistency may arise when data is written in the main memory 2 by use of a DMA (direct memory access) mode.
A measure generally taken to achieve the bus-snoop function includes invalidating cache data when the DMA-write access is directed to an address encompassed by the cache memory 11. In such a scheme, the bus-snoop function monitors the system bus 4 during a period when the input/output-control device 3 accesses the main memory 2 by use of a DMA mode. During this period, the central-control unit 10 cannot gain access to the cache memory 11, and has to wait until the access is granted.
There are some systems which are provided with a cache memory for instructions and a separate cache memory for operands. In such systems, an operand-write operation, which is initiated upon execution of an instruction by central-control unit, is only reflected by the operand cache. When there is a need to rewrite instructions, on the other hand, the instruction cache is invalidated in an entirety thereof in order to avoid data inconsistency with the main memory. Alternatively, an instruction-cache invalidating mode may be provided to take effect during a write operation, and invalidates a particular set of data in the instruction cache when the write address matches.
In order to overcome problems associated with the first scheme described above, Japanese Laid-open Patent Applications No. 5-97378 and No. 6-94821 disclose a bus-snoop control unit which is provided with a buffer as a temporal storage of DMA addresses. In this scheme, the cache invalidating operation is performed when a CPU becomes available, thereby avoiding a reduction in a processor-bus performance. If the buffer becomes full, however, the DMA operation has to be stopped, or the cache memory in its entirety has to be invalidated. This results in affecting the system performance.
In the case of the systems having both an instruction cache and an operand cache, generally, whole contents of the instruction cache are invalidated in order to avoid data inconsistency between the cache and the main memory. Nullification of all the cache contents inevitably brings down the system performance. In the case in which a only particular set of data in the instruction cache is invalidated when write addresses match during the instruction-cache invalidating mode, there is another problem in that operations for loading instructions are aborted each time the write access is made.
Accordingly, there is a need for a cache-memory-control system which can enhance system performance.
SUMMARY OF THE INVENTION
Accordingly, it is a general object of the present invention to provide a cache-memory-control system which can satisfy the need described above.
It is another and more specific object of the present invention to provide a cache-memory-control system which can enhance system performance.
In order to achieve above object according to the present invention, a system includes a main-memory unit, an input/output-control unit which performs a write operation with respect to the main-memory unit by way of direct memory access, and a central-control unit which operates based on information stored in the main-memory unit, the central-control unit including a cache memory which temporarily stores some of the information, and a DMA buffer which temporarily stores a DMA address indicated by the direct memory access.
According to one aspect of the present invention, the system as described above is such that the central-control unit invalidates a cache address in the cache memory when the DMA address stored in the DMA buffer matches the cache address.
According to another aspect of the present invention, the system as described above is such that the cache memory includes an instruction-cache memory which stores instructions as part of the information, and an operand-cache memory which stores operands as part of the information, and such that the central-control unit includes a cache-invalidation buffer which temporarily stores an operand-write address when an operand is written in the operand-cache memory, and invalidates a cache address in the cache memory when the operand-write address stored in the cache-invalidation buffer matches the cache address.
According to another aspect of the present invention, a system includes a main-memory unit, an input/output-control unit which performs a write operation with respect to the main-memory unit by way of direct memory access, a CPU which operates based on information stored in the main-memory unit, a cache memory which temporarily stores some of the information, and avails the some of the information to the CPU when the CPU makes a cache request, a DMA buffer which temporarily stores a DMA address indicated in the direct memory access, and a cache-control unit which gives priority to a cache-invalidation request over the cache request from the CPU when the cache-invalidation request is generated in connection with the direct memory access, and accesses the cache memory at the same speed as the CPU accesses the cache memory, so as to invalidate a cache address in the cache memory when the DMA address stored in the DMA buffer matches the cache address.
According to another aspect of the present invention, the system as described above further includes a bus-request-control-and-bus-interface-control unit which generates the cache-invalidation request and stores the DMA address in the DMA buffer upon a bus request when the input/output-control unit issues the bus request in an attempt to perform the write operation with respect to the main-memory unit.
According to another aspect of the present invention, the system as described above is such that the bus-request-control-and-bus-interface-control unit put another bus request on a hold when another input/output-control unit makes the another bus request in an attempt to perform a write operation with respect to the main-memory unit while the DMA buffer indicates a busy status.
According to another aspect of the present invention, the system as described above is such that the cache memory includes an instruction-cache memory which stores instructions as part of the information, and an operand-cache memory which stores operands as part of the information, and such that the cache-control unit includes an instruction-cache-control unit which controls access to the instruction-cache memory, an operand-cache-control unit which controls access to the operand-cache memory, and a cache-invalidation buffer, provided in the operand-cache-control unit, which temporarily stores an operand-write address when an operand is written in the operand-cache memory by a request from the CPU, wherein the instruction-cache-control unit invalidates a cache address in the instruction-cache memory when the operand-write address stored in the cache-invalidation buffer matches the cache address.
According to another aspect of the present invention, the system as described above is such that the instruction-cache-control unit and the operand-cache-control unit operate independently of each other when attending to requests from the CPU as the CPU attempts to access the instruction-cache memory and the operand-cache memory.
In the present invention as described above, the system having the central-control unit, the main-memory unit, and the input/output-control unit connected via a system bus is provided with the cache memory for temporarily storing data in the central-control unit and the DMA buffer for temporarily storing a DMA address when a DMA-write operation is conducted by the input/output-control unit. In this configuration, the DMA address at which the input/output-control unit accesses the main-memory unit is held in the storage, and an address comparison is made between the DMA address in the storage and cache addresses so as to check if there is an address match.
If a match is found between the DMA address stored in the DMA buffer and any cache address of the cache memory, the matched address of the cache memory is invalidated by the central-control unit, so that consistency is maintained between the contents of the cache memory and the contents of the main-memory unit.
Further, the cache memory is divided into the instruction-cache memory and the operand-cache memory, and a buffer is provided to store an operand-write address when a write operation is conducted with respect to the operand-cache memory. The central-control unit invalidates a pertinent address of the instruction-cache memory if this address of the instruction-cache memory matches the operand-write address stored in the buffer.
This configuration allows the instruction and operand cache-control units to operate independently of each other, while insuring data consistency between the instruction-cache memory and the operand-cache memory as well as between the cache memories and the main-memory unit, thereby enhancing the system performance.
Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a schematic block diagram of a related-art system;
FIG. 2 is a schematic block diagram of a system according to a principle of the present invention;
FIG. 3 is a block diagram of a first embodiment of the present invention;
FIG. 4 is a block diagram showing a second embodiment of the present invention;
FIGS. 5A through 5P are timing charts showing first operations according to the present invention;
FIGS. 6A through 6R are timing charts showing second operations according to the present invention;
FIGS. 7A through 7S are timing charts showing third operations according to the present invention; and
FIGS. 8A through 8T are timing charts showing fourth operations according to the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
In the following, a principle and embodiments of the present invention will be described with reference to the accompanying drawings.
FIG. 2 is a block diagram of a system according to a principle of the present invention. In FIG. 2, the same elements as those of FIG. 1 are referred to by the same numerals, and a description thereof will be omitted.
The central-control unit 10 includes the cache memory 11, a cache-control unit 12 for controlling operations of the cache memory 11, and a DMA (direct memory access) buffer 12 a which stores addresses used when the input/output-control device 3 accesses the main memory 2 by use of a DMA mode. Further, the central-control unit 10 includes a CPU (central processing unit) 13.
The central-control unit 10 further includes a processor bus 5 connecting between the cache-control unit 12 and the CPU 13. The cache-control unit 12 is connected to the system bus 4, which connects between all the relevant elements. As shown in the figure, the main memory 2 and the input/output-control device 3 are connected to the system bus 4.
In the configuration of FIG. 2 according to the present invention, an address is stored when the input/output-control device 3 accesses this address of the main memory 2 as part of an write operation, and is compared with addresses encompassed by the cache memory 11. In this manner, a check is made as to whether the same address is present.
The central-control unit 10 invalidates data of the cache memory with respect to a particular address when this particular address matches the address stored in the DMA buffer.
In this manner, when the same address as that stored in the DMA buffer 12 a is found in the cache memory 11, the CPU 13 invalidates a pertinent portion of the cache memory 11. This insures that the contents of the cache memory 11 sustain consistency with the contents of the main memory 2.
Further, the cache memory 11 may be divided into an instruction cache and an operand cache, and a buffer for storing an address used in an operand-write operation may be provided. In this configuration, the central-control unit 10 invalidates a particular address of the instruction cache when this particular address matches the address stored in the abovementioned buffer during the operand-writhe operation.
In this manner, a portion of the instruction cache provided separately from the operand cache is invalidated when the corresponding address matches with the address stored in the buffer, thereby insuring consistency between the contents of the cache memory 11 and the contents of the main memory 2.
A description will be provided below in further detail with regard to the operations of the system of FIG. 2.
In FIG. 2, the processor bus 5 is generally ten times as fast as the system bus 4 in terms of operation speed thereof. If the processor bus 5 is suspended when the input/output-control device 3 accesses the main memory 2, therefore, the CPU 13 has to forsake at least 10 accesses that would have been made to the cache memory 11 each time the input/output-control device 3 accesses the main memory 2. In order to avoid this, the cache-control unit 12 stores an address to which a write access is made by the input/output-control device 3, and performs a cache-access operation at the same speed as a cache-access operation made by the CPU 13.
Priority given to this cache access is higher than that given to the cache access by the CPU 13. The CPU 13 thus has to wait only a time period equivalent to one cache access before being able to access the cache memory 11 next time. Further, when there is data stored in the DMA buffer 12 a, a system arbiter (not shown) denies a request from the input/output-control device 3 to access the bus by not returning acknowledgement to the request. This eliminates a need to install more than one buffer and a need to abort a DMA-write operation.
In other words, the cache-access arbiter and the system-bus arbiter are separately provided, wherein the cache-access arbiter gives priority to the input/output-control device 3, and the system-bus arbiter denies a request from the input/output-control device 3 to access the bus if such an access is granted once until the cache-control unit 12 returns an acknowledgement. This prevents a decline in the system performance.
In the case of the system in which the instruction cache and the operand cache are provided, the buffer temporarily stores a write address when an operand-write operation is performed during the instruction-cache invalidating mode. Based on the write address stored in the buffer, a request for invalidating the instruction cache is made to the cache memory. This request is given higher priority than a request from the CPU to load an instruction.
In this manner, the instruction-cache memory and the operand-cache memory operate independently of each other, thereby eliminating such a waiting period as would be necessary in the related art in which a write operation would have to be delayed until both of the cache memories become available. Further, if the buffer is full, a next operand-access operation is delayed until the buffer becomes available.
FIG. 3 is a block diagram of a first embodiment of the present invention. The same elements as those of FIG. 2 are referred to by the same numerals, and a description thereof will be omitted.
In FIG. 3, the input/output-control device 3 and the main memory 2 are connected to the system bus 4. Other elements shown in FIG. 3 belong to the central-control unit 10 which is also connected to the system bus 4.
The central-control unit 10 includes the cache memory 11, the cache-control unit 12 for controlling the cache memory 11, the CPU 13 for attending to overall control of the central-control unit 10, a system-bus-interface-control unit 14, and an input/output-control-bus-request-control unit 15. The cache-control unit 12 includes a cache-access arbiter 20. The system-bus-interface-control unit 14 is connected to the system bus 4, and attends to control of a system-bus interface. The system-bus-interface-control unit 14 includes the DMA buffer 12 a.
The input/output-control-bus-request-control unit 15 is connected to the system bus 4 and the system-bus-interface-control unit 14, and exchanges a bus-request signal REQ, an acknowledgement signal ACK, and a buffer-busy signal BFBUSY with the system-bus-interface-control unit 14. The input/output-control-bus-request-control unit 15 exchanges the bus-request signal REQ and the acknowledgement signal ACK with the system bus 4. The acknowledgement signal ACK is transmitted each time the input/output-control device 3 accesses the system bus 4. Further, a cache-invalidation request and a cache-invalidation-request acknowledgement are exchanged between the system-bus-interface-control unit 14 and the cache-control unit 12.
In what follows, operations of the system shown in FIG. 3 will be described in detail.
The cache-access arbiter 20 arbitrates between a cache request REQ from the CPU 13 and the cache-invalidation request from the system-bus-interface-control unit 14 when the cache-invalidation request is resulted from a DMA-write operation by the input/output-control device 3. The system-bus-interface-control unit 14 arbitrates between an access attempted by the CPU 13 and a DMA request made by the input/output-control device 3, both of which are directed to the main memory 2. Such an access is attempted by the CPU 13 when the CPU 13 requires a write access to the main memory 2 or when a cache-miss hit occurs. If the access attempted by the CPU 13 is granted, the system-bus-interface-control unit 14 accesses the main memory 2 accordingly. If the request from the input/output-control device 3 is accepted, the system-bus-interface-control unit 14 stores the accessed address in the DMA buffer 12 a, and sends a cache-invalidation request to the cache-control unit 12.
The input/output-control-bus-request-control unit 15 arbitrates between several bus requests issued from different input/output-control devices 3 (only one is shown in FIG. 3), and informs the system-bus-interface-control unit 14 of a bus request REQ.
When the input/output-control device 3 issues a bus request REQ, this bus request is forwarded to the system-bus-interface-control unit 14 via the input/output-control-bus-request-control unit 15. If the system-bus-interface-control unit 14 is idle, the system-bus-interface-control unit 14 returns the acknowledgement signal ACK to the input/output-control-bus-request-control unit 15. If the DMA buffer 12 a already has data stored therein, and the cache-invalidation operation is not yet finished, the acknowledgement signal ACK is not returned. In this case, the input/output-control device 3 does not take a next action.
Upon receiving the acknowledgement signal ACK, the input/output-control-bus-request-control unit 15 sends an acknowledgement ACK to the input/output-control device 3 which requested use of the bus. Then, the input/output-control device 3 commences a DMA-access operation thereof. When this DMA-access operation is that of a write access, the system-bus-interface-control unit 14 stores the accessed address in the DMA buffer 12 a.
The system-bus-interface-control unit 14 then holds a state indicative of presence of DMA-buffer data, and sends a cache-invalidation request to the cache-control unit 12. Upon receiving this request, the cache-control unit 12 accepts this request as having the highest priority (if the CPU 13 is using the cache, the request is accepted as soon as a completion of this cache-access operation). If the address stored in the DMA buffer 12 a matches an address covered by the cache memory 11, the cache-control unit 12 invalidates the data of this address. If there is no match, on the other hand, the cache-control unit 12 does nothing but to send an acknowledgement ACK to the system-bus-interface-control unit 14.
The system-bus-interface-control unit 14, having received the acknowledgement ACK, moves on to another state indicating absence of DMA-buffer data. If a new bus request has been already made by this time by the input/output-control device 3, the system-bus-interface-control unit 14 can return an acknowledgement ACK to the input/output-control-bus-request-control unit 15 as soon as an entry into this state.
In this embodiment, if there is a match between the address stored in the DMA buffer 12 a and any address of the cache memory 11, the cache-control unit 12 invalidates a corresponding portion of the cache memory 11. This insures that consistency is maintained between the contents of the cache memory 11 and the contents of the main memory 2.
FIG. 4 is a block diagram showing a second embodiment of the present invention. In FIG. 4, the same elements as those of FIG. 3 are referred to by the same numerals, and a description thereof will be omitted.
In the second embodiment, the cache memory is divided into an instruction-cache memory 11A and an operand-cache memory 11B. Conforming to this division, two different cache-control units are provided, including an I-cache-control unit 21 and a P-cache-control unit 22. The I-cache-control unit 21 controls the instruction-cache memory 11A, and the P-cache-control unit 22 takes controls of the operand-cache memory 11B.
The P-cache-control unit 22 includes an I-cache-invalidation buffer 12 b and a P-arbiter 12 d. The I-cache-control unit 21 includes an I-arbiter 12 c. The I-arbiter 12 c sends an instruction-request acknowledgement IACK to the CPU 13, whereas the CPU 13 sends an instruction request IREQ to the I-arbiter 12 c. Further, the P-arbiter 12 d transmits an operand-request acknowledgement PACK to the CPU 13, whereas the CPU 13 sends an operand request PREQ to the P-arbiter 12 d.
An I-cache-invalidation request is transmitted from the I-cache-invalidation buffer 12 b to the I-arbiter 12 c, while the I-arbiter 12 c returns an I-cache-invalidation-request acknowledgement ACK to the I-cache-invalidation buffer 12 b. In the following, operations of the configuration shown in FIG. 4 will be described in detail.
The I-arbiter 12 c arbitrates between a cache request from the CPU 13 and a cache-invalidation request that is issued when the input/output-control device 3 performs a DMA-write operation. The P-arbiter 12 d attends to arbitration between a cache request from the CPU 13 and a cache-invalidation request when the cache-invalidation request entails a DMA-write operation conducted by the input/output-control device 3.
In this manner, the CPU 13 can attend to access to the instruction-cache memory 11A and access to the operand-cache memory 11B independently of each other. The I-cache-invalidation buffer 12 b stores an address when an operand-write operation is performed with respect to this address. Then, the I-cache-invalidation buffer 12 b sends an I-cache-invalidation request to the I-cache-control unit 21. Upon receiving the I-cache-invalidation request, the I-arbiter 12 c refers to the instruction-cache memory 11A to decide if there is an address that is the same as that stored in the I-cache-invalidation buffer 12 b. If the same address is found, a pertinent portion of the instruction-cache memory 11A will be expunged.
According to the second embodiment, the cache memory is divided into the instruction-cache memory and the operand-cache memory, and a particular portion of the instruction-cache memory is invalidated when an address corresponding to this portion matches the address stored in the buffer. This insures consistency between the contents of the cache memory and the contents of the main memory.
FIGS. 5A through 5P are timing charts showing first operations according to the present invention. These operations are performed by the system of FIG. 3.
The figures show a central-control-unit-operation clock CLOCK, a system-bus request IOCREQO from an input/output-control device IOCO, a bus acknowledgement IOCACKO sent to the input/output-control device IOCO, a system-bus-write signal WRITE for writing data in the main memory, a system-bus address ADDRESS (an address in the main memory), system-bus data DATA, a response MMOK from the main memory to the system bus, a bus request DMAREQ from the input/output-control-bus-request-control unit 15 to the system-bus-interface-control unit 14, an acknowledgement DMAACK responding to the bus request DMAREQ, a busy signal BFBUSY indicating a busy status of the DMA-address buffer and putting a request from another IOC on a hold, a DMA buffer DMABR, a cache-invalidation request CMREQ made to the cache-control unit 12, an acknowledgement CMACK responding to the cache-invalidation request CMREQ, a cache-memory data bus CACHEDATA, a cache-hit signal HIT, and a cache-memory-write-enable signal CACHEWE.
When the input/output-control device IOCO makes a system-bus request (IOCREQO), data is written in the main memory 2 during an IOCDMA cycle shown in the figures. Concurrently with the data-write operation, a corresponding address is stored in the DMA buffer 12 a at an address-latch timing shown in FIG. 5G.
As shown in FIG. 5H, when the input/output-control-bus-request-control unit 15 sends the bus request DMAREQ to the system-bus-interface-control unit 14, the system-bus-interface-control unit 14 responds by returning the acknowledgement DMAACK shown in FIG. 5I. After this, the busy signal BFBUSY changes to HIGH as shown in FIG. 5J, indicating that the DMA buffer 12 a is busy. This will put a next request from another input/output-control device on a hold.
FIG. 5L shows a timing at which the system-bus-interface-control unit 14 sends the cache-invalidation request CMREQ to the cache-control unit 12. In response, the cache-control unit 12 returns the acknowledgement CMACK to the system-bus-interface-control unit 14 as shown in FIG. 5M.
As shown in FIG. 5N, the cache-memory-data bus CACHEDATA indicates that the same address as that stored in the DMA buffer 12 a exists in the cache memory (i. e., there is a hit). In this case, the cache-control unit 12 invalidates a pertinent portion of a tag of the cache memory 11 at a timing as shown in FIG. 5P. In the figures, a time period tl indicates a cache-read cycle, and a time period t2 shows a cache-write cycle. During a combined period tl+t2, the CPU 13 is denied access to the cache memory 11 (such a period is called a cache-invalidation cycle).
FIGS. 6A through 6R are timing charts showing second operations according to the present invention. These operations are performed by the system of FIG. 3. The same signals as those of FIGS. 5A through 5P are referred to by the same symbols, and a description thereof will be omitted.
FIGS. 6A through 6R show a case in which another input/output-control device IOC1 makes a system-bus request after a request made by the input/output-control device IOCO. FIG. 6D shows a system-bus request IOCREQ1 made by the input/output-control device IOC1, and FIG. 6E illustrates a bus acknowledgement IOCACK1 sent to the input/output-control device IOC1. In the case shown in FIGS. 6A through 6R, the busy signal BFBUSY (FIG. L) at a HIGH level notifies the input/output-control device IOC1 of the busy status of the DMA buffer 12 a. As a result, the system-bus request from the input/output-control device IOC1 is put on a hold. That is, only after the completion of the IOCDMA cycle regarding input/output-control device IOCO and a corresponding cache-invalidation operation with respect to the cache memory, will an IOCDMA cycle of the input/output-control device IOC1 be started.
FIGS. 7A through 7S are timing charts showing third operations according to the present invention. In FIGS. 7A through 7S, the same signals as those of FIGS. 5A through 5P are referred to by the same symbols, and a description thereof will be omitted.
FIGS. 7N through 7P show a cache-access signal CPUREQ from the CPU 13, a read/write signal CPURW (indicating a read operation when this signal is HIGH), and a cache acknowledgement CPUACK sent to the CPU 13. In this example, the input/output-control device 3 carries out an IOCDMA cycle while the CPU 13 is accessing the cache memory 11. In this case, the cache-invalidation request CMREQ from the system-bus-interface-control unit 14 takes precedence over an access to the cache memory 11 attempted by the CPU 13.
The input/output-control device IOC performs a data-write operation with respect to the main memory 2 during an IOCDMA cycle shown in the figures. At the end of the IOCDMA cycle, the DMA buffer 12 a stores a memory address which was accessed. This is followed by the cache-invalidation request CMREQ sent from the system-bus-interface-control unit 14 to the cache-control unit 12. Upon receipt of this request, the cache-control unit 12 prompts the CPU 13 to stop for a predetermined time period.
When the CPU 13 makes a cache-access request as shown in FIG. 7N, the cache-control unit 12 generates the read/write signal RWCPU with respect to the cache memory 11 as shown in FIG. 70, and writes data in or reads data from the cache memory 11 as shown in FIG. 7P. Notwithstanding these read/write operations, if a match is found between the address stored in the DMA buffer 12 a and any address of the cache memory 11, a cache-invalidation cycle is instituted. When this happens, the CPU 13 halts an operation thereof for a period t3 shown in FIG. 7P. During this period, the cache-control unit 12 writes an invalidation bit WD in a tag area of the cache memory 11 at timings indicated in FIG. 7S.
FIGS. 8A through 8T are timing charts showing fourth operations according to the present invention. The configuration of FIG. 4 is used for these operations.
FIGS. 8A through 8E show the central-control-unit-operation clock CLOCK, an instruction address IADD, an instruction request IREQ, an instruction-request acknowledgement IACK, and instruction data IDATA, respectively.
FIGS. 8F through 8M show instruction-cache-memory-bus data ICACHEDATA, an instruction-cache-hit signal IHIT, an instruction-cache-memory-write-enable signal ICACHEWE, an operand address PADD, an operand request PREQ, an operand read/write signal PRW (indicating a read operation when this signal is HIGH), an operand-request acknowledgement PACK, and operand-read data PRDATA.
FIGS. 8N through 9T show operand-write data PWDATA, operand-cache-memory-bus data PCACHEDATA, an operand-cache-hit signal PHIT, an operand-cache-memory-write-enable signal PCACHEWE, an I-cache-invalidation-address buffer IDLABR, an I-cache-invalidation request IDLREQ, and an I-cache-invalidation-request acknowledgement IDLACK.
On the side of the I-cache-control unit 21, the I-arbiter 12 c and the CPU 13 exchange the instruction request IREQ and the instruction-request acknowledgement IACK thererbetween so as to read data from the instruction-cache memory 11A.
On the side of the P-cache-control unit 22, the operand request PREQ and the operand-request acknowledgement PACK are exchanged between the P-arbiter 12 d and the CPU 13, so that data is read from the operand-cache memory 11B.
An operand-write operation is initiated along with the operand-cache-memory-write-enable signal PCACHEWE shown in FIG. 8Q. A period t3 shown at the bottom of the figures indicates an operand-write cycle. Because of the operand-write operation, the contents of the operand-cache memory 11B is changed.
This results in a discrepancy between the operand-cache memory 11B and the instruction-cache memory 11A, so that there is a need to invalidate a relevant portion of the instruction-cache memory 11A. To this end, as shown in FIG. 8S, the I-cache-invalidation buffer 12 b sends the I-cache-invalidation request IDELREQ to the I-arbiter 12 c. A period T4 shown at the bottom of the figures illustrates the I-cache-invalidation cycle. During this cycle, as shown in FIG. 8H, cache-invalidation data is written in a relevant tag portion of the instruction-cache memory 11A.
As described above, the present invention can minimize a decline in the cache-access performance of the CPU which is caused by the input/output-control device when it attempts a DMA access, thereby enhancing a system performance. Also, if an update mode for updating DMA data is instituted, data of the cache memory can be updated in the like manner.
In the case where there is a need to invalidate the instruction cache upon writing of an operand, an arbiter circuit was conventionally provided on the side of the instruction-cache memory, so that an access cannot be made until after both the instruction-cache-control unit and the operand-cache-control unit become available. The present invention, on the other hand, allows these cache-control units to operate independently of each other, thereby enhancing the system performance.
Further, the present invention is not limited to these embodiments, but various variations and modifications may be made without departing from the scope of the present invention.

Claims (9)

What is claimed is:
1. A system comprising:
a main-memory unit;
an input/output-control unit which performs a write operation with respect to said main-memory unit by way of direct memory access;
a central-control unit which operates based on information stored in said main-memory unit, said central-control unit including:
a cache memory which temporarily stores some of the information; and
a DMA address buffer which temporarily stores a DMA address indicated by said direct memory access, wherein said central-control unit invalidates a cache address in said cache memory when the DMA address stored in said DMA address buffer matches the cache address.
2. The system as claimed in claim 1, wherein said cache memory includes:
an instruction-cache memory which stores instructions as part of the information; and
an operand-cache memory which stores operands as part of the information,
and wherein said central-control unit includes a cache-invalidation buffer which temporarily stores an operand-write address when an operand is written in said operand-cache memory, and invalidates a cache address in said cache memory when the operand-write address stored in said cache-invalidation buffer matches the cache address.
3. A system comprising:
a main-memory unit;
an input/output-control unit which performs a write operation with respect to said main-memory unit by way of direct memory access;
a CPU which operates based on information stored in said main-memory unit;
a cache memory which temporarily stores some of the information, and avails the some of the information to said CPU when said CPU makes a cache request;
a DMA address buffer which temporarily stores a DMA address indicated in said direct memory access;
a cache-control unit which gives priority to a cache-invalidation request over the cache request from said CPU when the cache-invalidation request is generated in connection with said direct memory access, and accesses said cache memory at the same speed as said CPU accesses said cache memory, so as to invalidate a cache address in said cache memory when the DMA address buffer stored in said DMA buffer matches the cache address.
4. The system as claimed in claim 3, further comprising a bus-request-control-and-bus-interface-control unit which generates the cache-invalidation request and stores the DMA address buffer in said DMA buffer upon a bus request when said input/output-control unit issues the bus request in an attempt to perform said write operation with respect to said main-memory unit.
5. The system as claimed in claim 4, wherein said bus-request-control-and-bus-interface-control unit put another bus request on a hold when another input/output-control unit makes the another bus request in an attempt to perform a write operation with respect to said main-memory unit while said DMA address buffer indicates a busy status.
6. The system as claimed in claim 3, wherein said cache memory includes:
an instruction-cache memory which stores instructions as part of the information; and
an operand-cache memory which stores operands as part of the information,
and wherein said cache-control unit includes:
an instruction-cache-control unit which controls access to said instruction-cache memory;
an operand-cache-control unit which controls access to said operand-cache memory; and
a cache-invalidation buffer, provided in said operand-cache-control unit, which temporarily stores an operand-write address when an operand is written in said operand-cache memory by a request from said CPU,
wherein said instruction-cache-control unit invalidates a cache address in said instruction-cache memory when the operand-write address stored in said cache-invalidation buffer matches the cache address.
7. The system as claimed in claim 6, wherein said instruction-cache-control unit and said operand-cache-control unit operate independently of each other when attending to requests from said CPU as said CPU attempts to access said instruction-cache memory and said operand-cache memory.
8. A device used in a system having a CPU, a ma in-memory unit, and an input/output-control unit, said device comprising:
a cache memory which temporarily stores information stored in the main-memory unit, and avails the information to the CPU when the CPU makes a cache request to access said cache memory;
a DMA address buffer which temporarily stores a DMA address indicated when the input/output-control unit performs a write operation with respect to the main-memory unit by way of direct memory access;
a cache-control unit which gives priority to a cache-invalidation request over the cache request from the CPU when the cache-invalidation request is generated in connection with the direct memory access, and accesses said cache memory at the same speed as does the CPU access said cache memory, so as to invalidate a cache address in said cache memory when the DMA address buffer stored in said DMA buffer matches the cache address.
9. The device as claimed in claim 8, wherein said cache memory includes:
an instruction-cache memory which stores instructions as part of the information; and
an operand-cache memory which stores operands as part of the information,
and wherein said cache-control unit includes:
an instruction-cache-control unit which controls access to said instruction-cache memory;
an operand-cache-control unit which controls access to said operand-cache memory; and
a cache-invalidation buffer, provided in said operand-cache-control unit, which temporarily stores an operand-write address when an operand is written in said operand-cache memory by a request from the CPU,
wherein said instruction-cache-control unit invalidates a cache address in said instruction-cache memory when the operand-write address stored in said cache-invalidation buffer matches the cache address.
US09/164,677 1998-03-20 1998-10-01 DMA address buffer and cache-memory control system Expired - Fee Related US6345320B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10071099A JPH11272555A (en) 1998-03-20 1998-03-20 Cache memory control system
JP10-071099 1998-03-20

Publications (1)

Publication Number Publication Date
US6345320B1 true US6345320B1 (en) 2002-02-05

Family

ID=13450767

Family Applications (1)

Application Number Title Priority Date Filing Date
US09/164,677 Expired - Fee Related US6345320B1 (en) 1998-03-20 1998-10-01 DMA address buffer and cache-memory control system

Country Status (2)

Country Link
US (1) US6345320B1 (en)
JP (1) JPH11272555A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408345B1 (en) * 1999-07-15 2002-06-18 Texas Instruments Incorporated Superscalar memory transfer controller in multilevel memory organization
US20030028728A1 (en) * 2001-07-31 2003-02-06 Mitsubishi Denki Kabushiki Kaisha Cache memory control device
US6574682B1 (en) * 1999-11-23 2003-06-03 Zilog, Inc. Data flow enhancement for processor architectures with cache
US6678803B2 (en) * 1999-11-03 2004-01-13 Micron Technology, Inc. Method and device to use memory access request tags
US20050038946A1 (en) * 2003-08-12 2005-02-17 Tadpole Computer, Inc. System and method using a high speed interface in a system having co-processors
US20050138232A1 (en) * 2003-12-22 2005-06-23 Matsushita Electric Industrial Co., Ltd. Memory system control method
US20050204088A1 (en) * 2004-02-12 2005-09-15 Via Technologies Inc. Data acquisition methods
US20050274123A1 (en) * 2002-04-10 2005-12-15 The Penn State Research Foundation Thermoacoustic device
US20070174505A1 (en) * 2006-01-06 2007-07-26 Schlansker Michael S DMA access systems and methods
US20080040530A1 (en) * 2006-08-08 2008-02-14 Nec Electronics Corporation Data processing apparatus for controlling access to a memory
WO2008065479A1 (en) * 2006-11-30 2008-06-05 Freescale Semiconductor, Inc. Device and method for fetching instructions
US7620779B1 (en) 2003-04-09 2009-11-17 Klaiber Alexander C System and method for handling direct memory accesses
US7971002B1 (en) 2005-04-07 2011-06-28 Guillermo Rozas Maintaining instruction coherency in a translation-based computer system architecture
US20110191543A1 (en) * 2010-02-02 2011-08-04 Arm Limited Area and power efficient data coherency maintenance
US20130124929A1 (en) * 2010-07-27 2013-05-16 Panasonic Corporation Data transfer control device and data transfer control method
US8751753B1 (en) 2003-04-09 2014-06-10 Guillermo J. Rozas Coherence de-coupling buffer

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6338119B1 (en) * 1999-03-31 2002-01-08 International Business Machines Corporation Method and apparatus with page buffer and I/O page kill definition for improved DMA and L1/L2 cache performance

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01112451A (en) 1987-10-27 1989-05-01 Fujitsu Ltd System for controlling cash memory
US5724550A (en) * 1994-11-14 1998-03-03 Compaq Computer Corporation Using an address pin as a snoop invalidate signal during snoop cycles
US5749093A (en) * 1990-07-16 1998-05-05 Hitachi, Ltd. Enhanced information processing system using cache memory indication during DMA accessing
US5819105A (en) * 1994-10-14 1998-10-06 Compaq Computer Corporation System in which processor interface snoops first and second level caches in parallel with a memory access by a bus mastering device
US5850534A (en) * 1995-06-05 1998-12-15 Advanced Micro Devices, Inc. Method and apparatus for reducing cache snooping overhead in a multilevel cache system
US5860111A (en) * 1992-11-13 1999-01-12 National Semiconductor Corporation Coherency for write-back cache in a system designed for write-through cache including export-on-hold
US5884100A (en) * 1996-06-06 1999-03-16 Sun Microsystems, Inc. Low-latency, high-throughput, integrated cache coherent I/O system for a single-chip processor
US5893153A (en) * 1996-08-02 1999-04-06 Sun Microsystems, Inc. Method and apparatus for preventing a race condition and maintaining cache coherency in a processor with integrated cache memory and input/output control
US5966728A (en) * 1992-01-02 1999-10-12 International Business Machines Corp. Computer system and method for snooping date writes to cacheable memory locations in an expansion memory device
US6047337A (en) * 1995-08-09 2000-04-04 Cirrus Logic, Inc. Parasitic personal computer interface
US6178492B1 (en) * 1994-11-09 2001-01-23 Mitsubishi Denki Kabushiki Kaisha Data processor capable of executing two instructions having operand interference at high speed in parallel

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01112451A (en) 1987-10-27 1989-05-01 Fujitsu Ltd System for controlling cash memory
US5749093A (en) * 1990-07-16 1998-05-05 Hitachi, Ltd. Enhanced information processing system using cache memory indication during DMA accessing
US5966728A (en) * 1992-01-02 1999-10-12 International Business Machines Corp. Computer system and method for snooping date writes to cacheable memory locations in an expansion memory device
US5860111A (en) * 1992-11-13 1999-01-12 National Semiconductor Corporation Coherency for write-back cache in a system designed for write-through cache including export-on-hold
US5819105A (en) * 1994-10-14 1998-10-06 Compaq Computer Corporation System in which processor interface snoops first and second level caches in parallel with a memory access by a bus mastering device
US6178492B1 (en) * 1994-11-09 2001-01-23 Mitsubishi Denki Kabushiki Kaisha Data processor capable of executing two instructions having operand interference at high speed in parallel
US5724550A (en) * 1994-11-14 1998-03-03 Compaq Computer Corporation Using an address pin as a snoop invalidate signal during snoop cycles
US5850534A (en) * 1995-06-05 1998-12-15 Advanced Micro Devices, Inc. Method and apparatus for reducing cache snooping overhead in a multilevel cache system
US6047337A (en) * 1995-08-09 2000-04-04 Cirrus Logic, Inc. Parasitic personal computer interface
US5884100A (en) * 1996-06-06 1999-03-16 Sun Microsystems, Inc. Low-latency, high-throughput, integrated cache coherent I/O system for a single-chip processor
US5893153A (en) * 1996-08-02 1999-04-06 Sun Microsystems, Inc. Method and apparatus for preventing a race condition and maintaining cache coherency in a processor with integrated cache memory and input/output control

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408345B1 (en) * 1999-07-15 2002-06-18 Texas Instruments Incorporated Superscalar memory transfer controller in multilevel memory organization
US6678803B2 (en) * 1999-11-03 2004-01-13 Micron Technology, Inc. Method and device to use memory access request tags
US6574682B1 (en) * 1999-11-23 2003-06-03 Zilog, Inc. Data flow enhancement for processor architectures with cache
US20030028728A1 (en) * 2001-07-31 2003-02-06 Mitsubishi Denki Kabushiki Kaisha Cache memory control device
US20050274123A1 (en) * 2002-04-10 2005-12-15 The Penn State Research Foundation Thermoacoustic device
US8751753B1 (en) 2003-04-09 2014-06-10 Guillermo J. Rozas Coherence de-coupling buffer
US10540283B2 (en) 2003-04-09 2020-01-21 Facebook, Inc. Coherence de-coupling buffer
US9558116B2 (en) 2003-04-09 2017-01-31 Intellectual Ventures Holding 81 Llc Coherence de-coupling buffer
US7937536B2 (en) 2003-04-09 2011-05-03 Klaiber Alexander C Handling direct memory accesses
US7620779B1 (en) 2003-04-09 2009-11-17 Klaiber Alexander C System and method for handling direct memory accesses
US7636815B1 (en) * 2003-04-09 2009-12-22 Klaiber Alexander C System and method for handling direct memory accesses
US20100138615A1 (en) * 2003-04-09 2010-06-03 Klaiber Alexander C Handling direct memory accesses
US20050038946A1 (en) * 2003-08-12 2005-02-17 Tadpole Computer, Inc. System and method using a high speed interface in a system having co-processors
US20050138232A1 (en) * 2003-12-22 2005-06-23 Matsushita Electric Industrial Co., Ltd. Memory system control method
CN1332319C (en) * 2003-12-22 2007-08-15 松下电器产业株式会社 Memory system control method
US20050204088A1 (en) * 2004-02-12 2005-09-15 Via Technologies Inc. Data acquisition methods
US7971002B1 (en) 2005-04-07 2011-06-28 Guillermo Rozas Maintaining instruction coherency in a translation-based computer system architecture
US20070174505A1 (en) * 2006-01-06 2007-07-26 Schlansker Michael S DMA access systems and methods
US7934043B2 (en) * 2006-08-08 2011-04-26 Renesas Electronics Corporation Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle
US20080040530A1 (en) * 2006-08-08 2008-02-14 Nec Electronics Corporation Data processing apparatus for controlling access to a memory
US8234452B2 (en) 2006-11-30 2012-07-31 Freescale Semiconductor, Inc. Device and method for fetching instructions
WO2008065479A1 (en) * 2006-11-30 2008-06-05 Freescale Semiconductor, Inc. Device and method for fetching instructions
US20110191543A1 (en) * 2010-02-02 2011-08-04 Arm Limited Area and power efficient data coherency maintenance
US8756377B2 (en) * 2010-02-02 2014-06-17 Arm Limited Area and power efficient data coherency maintenance
US20130124929A1 (en) * 2010-07-27 2013-05-16 Panasonic Corporation Data transfer control device and data transfer control method
US8996913B2 (en) * 2010-07-27 2015-03-31 Panasonic Intellectual Property Management Co., Ltd. Data transfer control device and data transfer control method

Also Published As

Publication number Publication date
JPH11272555A (en) 1999-10-08

Similar Documents

Publication Publication Date Title
US20220309004A1 (en) Write merging on stores with different privilege levels
US5537575A (en) System for handling cache memory victim data which transfers data from cache to the interface while CPU performs a cache lookup using cache status information
US6345320B1 (en) DMA address buffer and cache-memory control system
KR100252570B1 (en) Cache memory with reduced request-blocking
US7032074B2 (en) Method and mechanism to use a cache to translate from a virtual bus to a physical bus
US7827354B2 (en) Victim cache using direct intervention
KR100318789B1 (en) System and method for managing cache in a multiprocessor data processing system
US6321296B1 (en) SDRAM L3 cache using speculative loads with command aborts to lower latency
US7305523B2 (en) Cache memory direct intervention
US6502171B1 (en) Multiprocessor system bus with combined snoop responses explicitly informing snoopers to scarf data
JPH11506852A (en) Reduction of cache snooping overhead in a multi-level cache system having a large number of bus masters and a shared level 2 cache
US20230214326A1 (en) Computer Memory Expansion Device and Method of Operation
US6871267B2 (en) Method for increasing efficiency in a multi-processor system and multi-processor system with increased efficiency
US5263144A (en) Method and apparatus for sharing data between processors in a computer system
US5809537A (en) Method and system for simultaneous processing of snoop and cache operations
US5987544A (en) System interface protocol with optional module cache
EP1030243B1 (en) Optimized hardware cleaning function for virtual index virtual tag data cache
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
US6349367B1 (en) Method and system for communication in which a castout operation is cancelled in response to snoop responses
US6477622B1 (en) Simplified writeback handling
US6976130B2 (en) Cache controller unit architecture and applied method
WO1997004392A1 (en) Shared cache memory device
EP0741356A1 (en) Cache architecture and method of operation
US6839806B2 (en) Cache system with a cache tag memory and a cache tag buffer
JP2001249846A (en) Cache memory device and data processing system

Legal Events

Date Code Title Description
AS Assignment

Owner name: FUJITSU LIMITED, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:KAWAMATA, SHIGEAKI;YOSHIOKA, ATSUSHI;REEL/FRAME:009496/0089

Effective date: 19980831

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20100205