Nios® V Embedded Processor Design Handbook

ID 726952
Date 7/16/2025
Public

Visible to Intel only — GUID: ahh1741485610128

Ixiasoft

Document Table of Contents

2.3.1.2.1. Peripheral region

Any embedded peripherals IP, such as UART, I2C, and SPI must not be cached. Cache is highly recommended for external memories which are affected by long access time, while internal on-chip memories may be excluded due to their short access time. You must not cache any embedded peripheral IPs, such as UART, I2C, and SPI, except for memories. This is important because events from external devices, such as agent devices updating the soft IPs, are not captured by the processor cache, in turn not received by the processor. As a result, these events can go unnoticed until you flush the cache, which can lead to unintended behavior in your system. In summary, the memory-mapped region of embedded peripheral IPs is uncacheable and must reside within the processor’s peripheral regions.

To set a peripheral region, follow these steps:
  1. Open the system’s Address Map in the Platform Designer.
  2. Navigate to the address map of the processor’s Instruction Manager and Data Manager.
  3. Identify the peripherals and memories in your system.
    Figure 12. Example of Address Map
    Note: The blue arrows are pointing to memories.
  4. Group the peripherals:
    1. Memory as cacheable
    2. Peripherals as uncacheable
    Table 19.  Cacheable and Uncacheable Region
    Subordinate Address Map Status Peripheral Region
    Size Base Address
    user_application_mem.s1 0x0 ~ 0x3ffff Cacheable N/A N/A
    cpu.dm_agent 0x40000 ~ 0x4ffff Uncacheable 65536 bytes 0x40000
    bootcopier_rom.s1 0x50000 ~ 0x517ff Cacheable N/A N/A
    bootcopier_ram.s1 0x52000 ~ 0x537ff Cacheable
    cpu.timer_sw_agent 0x54000 ~ 0x5403f Uncacheable

    144 bytes

    (min size is 65536 bytes)

    0x54000
    mailbox.avmm 0x54040 ~ 0x5407f Uncacheable
    sysid_qsys_0.control_slave 0x54080 ~ 0x54087 Uncacheable
    uart.avalon_jtag_slave 0x54088 ~ 0x5408f Uncacheable
  5. Align the peripheral regions with their specific sizes:
    • For example, if the size is 65536 bytes, it corresponds to 0x10000 bytes. Therefore, the allowed base address must be a multiple of 0x10000.
    • The CPU.dm_agent uses a base address of 0x40000, which is a multiple of 0x10000. As a result, Peripheral Region A, with a size of 65536 bytes and a base address of 0x40000, meets the requirements.
    • The base address of the collection of uncacheable regions at 0x54000 is not a multiple of 0x10000. You must reassign them to 0x60000 or other multiple of 0x10000. Thus, Peripheral Region B, which has a size of 65536 bytes and a base address of 0x60000, satisfies the criteria.
Table 20.  Cacheable and Uncacheable Region with Reassignment
Subordinate Address Map Status Peripheral Region
Size Base Address
user_application_mem.s1 0x0 ~ 0x3ffff Cacheable N/A N/A
cpu.dm_agent 0x40000 ~ 0x4ffff Uncacheable 65536 bytes 0x40000
bootcopier_rom.s1 0x50000 ~ 0x517ff Cacheable N/A N/A
bootcopier_ram.s1 0x52000 ~ 0x537ff Cacheable
cpu.timer_sw_agent 0x60000 ~ 0x6003f Uncacheable

144 bytes

(min size is 65536 bytes)

0x60000
mailbox.avmm 0x60040 ~ 0x6007f Uncacheable
sysid_qsys_0.control_slave 0x60080 ~ 0x60087 Uncacheable
uart.avalon_jtag_slave 0x60088 ~ 0x6008f Uncacheable