Altera Nios II User Manual page 31

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

Chapter 2: Processor Architecture
Memory and I/O Organization
Effective Use of Cache Memory
The effectiveness of cache memory to improve performance is based on the following
premises:
Regular memory is located off-chip, and access time is long compared to on-chip
memory
The largest, performance-critical instruction loop is smaller than the instruction
cache
The largest block of performance-critical data is smaller than the data cache
Optimal cache configuration is application specific, although you can make decisions
that are effective across a range of applications. For example, if a Nios II processor
system includes only fast, on-chip memory (i.e., it never accesses slow, off-chip
memory), an instruction or data cache is unlikely to offer any performance gain. As
another example, if the critical loop of a program is 2 KB, but the size of the
instruction cache is 1 KB, an instruction cache does not improve execution speed. In
fact, an instruction cache may degrade performance in this situation.
If an application always requires certain data or sections of code to be located in cache
memory for performance reasons, the tightly-coupled memory feature might provide
a more appropriate solution. Refer to the Tightly-Coupled Memory section for details.
Cache Bypass Methods
The Nios II architecture provides the following methods for bypassing the data cache:
I/O load and store instructions
Bit-31 cache bypass
I/O Load and Store Instructions Method
The load and store I/O instructions such as ldio and stio bypass the data cache and
force an Avalon-MM data transfer to a specified address.
The Bit-31 Cache Bypass Method
The bit-31 cache bypass method on the data master port uses bit 31 of the address as a
tag that indicates whether the processor should transfer data to/from cache, or bypass
it. This is a convenience for software, which might need to cache certain addresses
and bypass others. Software can pass addresses as parameters between functions,
without having to specify any further information about whether the addressed data
is cached or not.
f
To determine which cores implement which cache bypass methods, refer to the
Core Implementation Details
Tightly-Coupled Memory
Tightly-coupled memory provides guaranteed low-latency memory access for
performance-critical applications. Compared to cache memory, tightly-coupled
memory provides the following benefits:
Performance similar to cache memory
February 2014 Altera Corporation
chapter of the Nios II Processor Reference Handbook.
2–15
Nios II
Nios II Processor Reference Handbook

Advertisement

Table of Contents
loading

Table of Contents