Cortex™-M1 FPGA Development Kit Example System Tutorial

Altera Cyclone III Edition Version 1.1

Table of Contents

About this tutorial
Intended audience
Using this tutorial
Additional reading
Feedback on this product
Feedback on this tutorial
1. Introduction
1.1. About the tutorial and example SOPC system
1.2. SOPC components and implementation
1.2.1. Example SOPC system
1.2.2. Cortex-M1 processor SOPC Builder component
1.2.3. System Interconnect Fabric
1.2.4. Timer and Cortex-M1 Nested Vectored Interrupt Controller (NVIC)
1.2.5. JTAG UART
1.2.6. Switch and LED interfaces
1.2.7. External tristate bridge and external memories
1.2.8. External SSRAM PLL
1.3. Example SOPC system configuration
2. Getting Started
2.1. About getting started
2.2. Loading the FPGA using the Quartus II Programmer
2.3. Software execution
2.4. Interacting with the example software
2.4.1. Running the Cortex-M1 Terminal
2.4.2. Initial feedback from the board
2.4.3. The menu
2.5. Viewing the example software source code (optional)
2.6. Simulation environment
2.6.1. Generating the environment
2.6.2. Using the simulation environment
3. Demonstration Software and Example SOPC System
3.1. About the demonstration software
3.2. Source files
3.3. Menu tests
3.3.1. External SRAM test
3.3.2. Flash test
3.3.3. Timer test
3.3.4. Read SystemID test
3.3.5. Switches and LEDs test
3.3.6. Upper DTCM test
4. Debugging Example SOPC System
4.1. Assumptions
4.2. RealView MDK tools setup
4.3. Emulation on the Cyclone III Starter Board using the MDK tools
4.3.1. Important project settings
4.3.2. Compilation
4.4. Loading the Cyclone III Starter Board and starting the Cortex-M1 terminal
4.5. Debugging the demo
4.5.1. Breakpoint example part 1
4.5.2. Breakpoint example part 2
5. Simulating Example SOPC System
5.1. Generated SOPC HDL testbench
5.2. Simulation software description
5.3. Generating the ITCM image file
5.4. Simulating the example SOPC system design
5.4.1. Compile and load the design
5.4.2. Open the Wave viewer with Example SOPC System signals
5.4.3. Open the USB_UART log
5.4.4. Run the simulation
5.4.5. Halt and view the initial simulation results
5.4.6. Continue the simulation
5.4.7. Debugging simulation results
6. RTX Real Time Operating System Example
6.1. About the RTX real time operating system example
6.2. Examining the project
6.3. Program description
6.4. Hex file generation
7. Software Considerations and Customization
7.1. Memory resources
7.2. Flash-FPGA load and code space considerations
7.3. Preloading Altera RAMs with Cortex-M1 instructions
7.3.1. Loading on-chip memories
7.3.2. Scatter loading
7.4. Example SOPC system clocking
8. Configuring Example SOPC System
8.1. Using SOPC Builder to configure and generate the example SOPC system
8.1.1. Step 1: Create the shell project
8.1.2. Step 2: Configure the system
8.1.3. Step 3: Generate the testbench
8.1.4. Step 4: Create the top level wrapper
8.1.5. Step 5: Add the top-level file to the project
8.1.6. Step 6: Synthesize the design
8.1.7. Step 7: Import the pin assignments
8.1.8. Step 8: Configure the dual-purpose pins
8.1.9. Step 9: Import timing constraints
8.1.10. Step 10: Create TCM initialization files
8.1.11. Step 11: Compile the design

List of Figures

1.1. Example SOPC system block diagram
1.2. Example SOPC system with Cyclone III Starter Board
1.3. Example SOPC system configuration
2.1. CortexM1_ExampleDesign project selection
2.2. Hardware setup
2.3. Auto Detect button
2.4. SOF options
2.5. Programming complete
2.6. Cortex-M1 Terminal window
2.7. Cortex-M1 Terminal window awaiting switch press
2.8. Cortex-M1 Terminal window with test menu
2.9. uVision main source listing
2.10. CortexM1_ExampleDesign.qpf
2.11. Generate the example SOPC system
4.1. Select project file
4.2. RealView MDK IDE
4.3. Emulator target tab
4.4. Emulator output tab
4.5. Emulator linker tab
4.6. Emulator debug tab
4.7. Target driver setup
4.8. Cortex-M1 Terminal application window
4.9. RealView IDE with break at main()
4.10. Program break at while(1) loop
4.11. Cortex-M1 Terminal initial test menu window
5.1. Run Simulator option and button
5.2. ModelSim-Altera window
5.3. ModelSim-Altera wave view window
6.1. Linking the RTX library to a project
7.1. Options for Target Emulator
8.1. New Project Wizard Introduction window
8.2. New Project Wizard Directory window
8.3. New Project Wizard Add Files window
8.4. New Project Wizard Family & Device Settings window
8.5. New Project Wizard EDA Tool Settings window
8.6. New Project Wizard Summary window
8.7. SOPC Builder Create New System dialog
8.8. Initial SOPC Builder screen
8.9. ARM Cortex-M1 Processor settings window
8.10. Processor instantiation in SOPC Builder
8.11. LED IF component parameter settings dialog
8.12. LED_IF component instantiated in SOPC Builder
8.13. Switch_IF component instantiated in SOPC Builder
8.14. Timer component instantiated in SOPC Builder
8.15. JTAG_UART component instantiated in SOPC Builder
8.16. Launch PLL MegaWizard
8.17. PLL parameter settings
8.18. PLL Lock output setting
8.19. PLL Output Clocks setting
8.20. PLL instantiated in SOPC Builder
8.21. System ID instantiated in SOPC Builder
8.22. Flash settings
8.23. SSRAM settings dialog
8.24. Tristate Bridge settings dialog
8.25. Tristate Bridge connections to SSRAM and flash
8.26. Tristate Bridge connection settings dialog
8.27. Bottom of SOPC Builder screen
8.28. Quartus II Project File settings dialog
8.29. Quartus II Import Assignments dialog
8.30. Quartus II Device and Pin Options dialog

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.

Altera is a trademark and service mark of Altera Corporation in the United States and other countries. Altera products contain intellectual property of Altera Corporation and are protected by copyright laws and one or more U.S. and foreign patents and patent applications.

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.

Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is final, that is for a developed product.

Revision History
Revision A2 September 2008First release for version 1.1
Copyright © 2008 ARM Limited. All rights reserved.ARM DUI 0430A