Memory Access - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

5–6
In the following code example, a multiply operation (with 1 instruction cycle and 2
result latency cycles) is followed immediately by an add operation that uses the result
of the multiply. On the Nios II/f core, the addi instruction, like most ALU
instructions, executes in a single cycle. However, in this code example, execution of
the addi instruction is delayed by two additional cycles until the multiply operation
completes.
mul r1, r2, r3
addi r1, r1, 100
In contrast, the following code does not stall the processor.
mul r1, r2, r3
or r5, r5, r6
or r7, r7, r8
addi r1, r1, 100
Shift and Rotate Performance
The performance of shift operations depends on the hardware multiply option. When
a hardware multiplier is present, the ALU achieves shift and rotate operations in one
or two clock cycles. Otherwise, the ALU includes dedicated shift circuitry that
achieves one-bit-per-cycle shift and rotate performance. Refer to
page 5–11

Memory Access

The Nios II/f core provides optional instruction and data caches. The cache size for
each is user-definable, between 512 bytes and 64 KB.
The memory address width in the Nios II/f core depends on whether the optional
MMU is present. Without an MMU, the Nios II/f core supports the bit-31 cache
bypass method for accessing I/O on the data master port. Therefore addresses are 31
bits wide, reserving bit 31 for the cache bypass function. With an MMU, cache bypass
is a function of the memory partition and the contents of the translation lookaside
buffer (TLB). Therefore bit-31 cache bypass is disabled, and 32 address bits are
available to address memory.
Instruction and Data Master Ports
The instruction master port is a pipelined Avalon
master port. If the core includes data cache with a line size greater than four bytes,
then the data master port is a pipelined Avalon-MM master port. Otherwise, the data
master port is not pipelined.
The instruction and data master ports on the Nios II/f core are optional. A master port
can be excluded, as long as the core includes at least one tightly-coupled memory to
take the place of the missing master port.
1
Although the Nios II processor can operate entirely out of tightly-coupled memory
without the need for Avalon-MM instruction or data masters, software debug is not
possible when either the Avalon-MM instruction or data master is omitted.
Support for pipelined Avalon-MM transfers minimizes the impact of synchronous
memory with pipeline latency. The pipelined instruction and data master ports can
issue successive read requests before prior requests complete.
Nios II Processor Reference Handbook
; r1 = r2 * r3
; r1 = r1 + 100 (Depends on result of mul)
; r1 = r2 * r3
; No dependency on previous results
; No dependency on previous results
; r1 = r1 + 100 (Depends on result of mul)
for details.
Chapter 5: Nios II Core Implementation Details
Table 5–10 on
®
Memory-Mapped (Avalon-MM)
February 2014 Altera Corporation
Nios II/f Core

Advertisement

Table of Contents
loading

Table of Contents