5.3.1. Assumptions About the Reader................................................................351
5.3.2. Implementing a Custom Boot Copier........................................................351
5.3.3. Default Nios II Boot Copier..................................................................... 352
5.3.4. Advanced Boot Copier Example............................................................... 354
5.3.5. Implementing the Advanced Boot Copier Example..................................... 360
5.3.6. Small Boot Copier Example.....................................................................368
5.3.7. Implementing the Small Boot Copier Example........................................... 369
5.3.8. Debugging Boot Copiers.........................................................................374
5.3.9. Externally Controlling the Nios II Boot Process.......................................... 375
5.4. Boot Time Performance Analysis...........................................................................381
5.4.1. Boot Time Performance Analysis Design Example........................................381
5.4.2. Boot Time Measurement Strategy.............................................................382
5.4.3. Reducing Nios II Boot Time in Intel MAX 10 FPGA Design.............................383
5.4.4. Boot Time Performance and Estimation..................................................... 386
5.5. Nios II Configuration and Booting Solutions Revision History.................................... 390
6. Nios II Debug, Verification, and Simulation ............................................................... 391
6.1. Software Debugging Options................................................................................392
6.2. Debugging Nios II Designs.................................................................................. 394
6.2.1. Debuggers............................................................................................ 394
6.2.2. Run-Time Analysis Debug Techniques........................................................403
6.2.3. Using the Debug Code from Intel MAX 10 On-Chip Flash - User Flash
Memory (UFM).......................................................................................408
6.3. Verification and Board Bring-Up........................................................................... 417
6.3.1. Verification Methods............................................................................... 417
6.3.2. Board Bring-up...................................................................................... 422
6.3.3. System Verification.................................................................................428
6.4. Additional Embedded Design Considerations.......................................................... 432
6.4.1. JTAG Signal Integrity.............................................................................. 432
6.4.2. Memory Space For System Prototyping..................................................... 432
6.5. Simulating Nios II Embedded Processor Designs.....................................................433
6.5.1. Before You Begin....................................................................................433
6.5.2. Setting Up and Generating Your Simulation Environment in Platform Designer 434
6.5.3. Creating the Nios II Software...................................................................435
6.5.4. Running Simulation in the ModelSim Simulator Using Nios II SBT for Eclipse.. 437
6.5.5. Running Simulation in the ModelSim Simulator Using Command Line............ 437
6.6. Nios II Debug, Verification, and Simulation Revision History.....................................439
7. Optimizing Nios II Based Systems and Software........................................................ 440
7.1. Hardware Acceleration and Coprocessing...............................................................441
7.1.1. Hardware Acceleration............................................................................ 441
7.1.2. Coprocessing......................................................................................... 450
7.2. Software Application Optimization........................................................................ 457
7.2.1. Performance Tuning Background.............................................................. 457
7.2.2. Speeding Up System Processing Tasks...................................................... 457
7.2.3. Accelerating Interrupt Service Routines..................................................... 461
7.2.4. Reducing Code Size................................................................................ 462
7.3. Memory Optimization..........................................................................................464
7.3.1. Isolate Critical Memory Connections..........................................................464
7.3.2. Match Master and Slave Data Width..........................................................464
7.3.3. Use Separate Memories to Exploit Concurrency.......................................... 464
7.3.4. Understand the Nios II Instruction Master Address Space............................ 465
Contents
Embedded Design Handbook Send Feedback
4