1. About the Nios® V Embedded Processor
2. Nios® V Processor Hardware System Design with Quartus® Prime Software and Platform Designer
3. Nios® V Processor Software System Design
4. Nios® V Processor Debugging, Verifying, and Simulating
5. Nios® V Processor Configuration and Booting Solutions
6. Finding Nios® V Processor Design Example
7. Nios® V Processor - Using the MicroC/TCP-IP Stack
8. Nios® V Processor — Remote System Update
9. Nios® V Processor — Using Custom Instruction
10. Nios® V Processor – Running TinyML Application
11. Nios® V Processor – Implementing Lockstep Capabilities
12. Nios® V Embedded Processor Design Handbook Archives
13. Document Revision History for the Nios® V Embedded Processor Design Handbook
2.1. Creating Nios® V Processor System Design with Platform Designer
2.2. Clocks and Resets Best Practices
2.3. Designing a Nios® V Processor Memory System
2.4. Assigning a UART Agent for Printing
2.5. Assigning a Default Agent
2.6. Understanding the Design Requirement with JTAG Signals
2.7. Optimizing Platform Designer System Performance
2.8. Integrating Platform Designer System into the Quartus® Prime Project
2.9. Handing Off to an Embedded FPGA Software Developer
4.2.3.2.1. Enabling Signal Tap Logic Analyzer
4.2.3.2.2. Adding Signals for Monitoring and Debugging
4.2.3.2.3. Specifying Trigger Conditions
4.2.3.2.4. Assigning the Acquisition Clock, Sample Depth, and Memory Type, and Buffer Acquisition Mode
4.2.3.2.5. Compiling the Design and Programming the Target Device
4.6.1. Prerequisites
4.6.2. Setting Up and Generating Your Simulation Environment in Platform Designer
4.6.3. Creating Nios V Processor Software
4.6.4. Generating Memory Initialization File
4.6.5. Generating System Simulation Files
4.6.6. Running Simulation in the QuestaSim Simulator Using Command Line
5.1. Introduction
5.2. Linking Applications
5.3. Nios® V Processor Booting Methods
5.4. Introduction to Nios® V Processor Booting Methods
5.5. Nios® V Processor Booting from On-Chip Flash (UFM)
5.6. Nios® V Processor Booting from General Purpose QSPI Flash
5.7. Nios® V Processor Booting from Configuration QSPI Flash
5.8. Nios® V Processor Booting from On-Chip Memory (OCRAM)
5.9. Nios® V Processor Booting from Tightly Coupled Memory (TCM)
5.10. Summary of Nios® V Processor Vector Configuration and BSP Settings
5.11. Reducing Nios® V Processor Booting Time
2.3.1.2.1. Peripheral region
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. Caching an embedded peripheral can lead to issues due to potential anomalies:
- Delayed/Missed Writes - When the processor writes a command to a peripheral's memory address, the data might only be updated in the cache, not the actual physical register of the peripheral itself. The peripheral holds the old value, therefor, the command is never executed.
- Stale Reads - When the processor reads a status register from a peripheral (e.g., to check if a task is complete or a sensor value), the cache might return a previously cached, stale value instead of fetching the fresh data from the physical register.
- Cache Coherency Issues (with DMA) - Direct Memory Access (DMA) controllers move data directly to or from main memory, bypassing the cache. If the processor tries to access that data from a cached memory location, it could read an outdated copy from its cache, not the new data the DMA controller just wrote to RAM.
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:
- Open the system’s Address Map in the Platform Designer.
- Navigate to the address map of the processor’s Instruction Manager and Data Manager.
- Identify the peripherals and memories in your system.
Figure 14. Example of Address Map
- Group the peripherals:
- Memory as cacheable
- Peripherals as uncacheable
Table 24. 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 - 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.
| 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 | ||