abstract |
An electronic system, such as a computer system, having a first level write through cache and a smaller second-level write-back cache, is disclosed. The disclosed computer system includes a single integrated circuit microprocessor unit that includes a microprocessor core, a memory controller circuit, and first and second level caches. The microprocessor unit is connected to external dynamic random access memory (DRAM). The first level cache is a write-through cache, while the second level cache is a write-back cache that is much smaller than the first level cache. In operation, a write access cache miss to the first level cache that is a cache hit in the second level cache effects a write to the second level cache, rather than to DRAM, thus saving a wait state. A dirty bit is set for each modified entry in the second level cache. Upon the second level cache being full of modified data, a cache flush to DRAM is automatically performed. In addition, each entry of the second level cache is flushed to DRAM upon each of its byte locations being modified. The electronic system may also include one or more additional integrated circuit devices, such as a direct memory access (DMA) circuit and a bus bridge interface circuit for bidirectional communication with the microprocessor unit. The microprocessor unit may also include handshaking control to prohibit configuration register updating when a memory access is in progress or is imminent. The disclosed microprocessor unit also includes circuitry for determining memory bank size and memory address type. |