The Cortex-M1 processor from ARM is a 32-bit RISC CPU core designed for microcontroller applications. It combines a high-performance processor core with memory protection unit and nested vectored interrupt controller to provide an efficient and secure solution for embedded systems. When paired with an FPGA, the Cortex-M1 opens up even more possibilities for rapid prototyping and custom hardware acceleration.
Overview of Cortex-M1 Processor
Some key features of the Cortex-M1 processor include:
- 32-bit RISC architecture with Thumb-2 instruction set for optimal code density
- Operating frequency up to 150 MHz
- Memory Protection Unit (MPU) for secure software execution
- Nested Vectored Interrupt Controller (NVIC) for managing interrupts
- Embedded Trace Macrocell (ETM) for instruction trace capabilities
- Debug Access Port (DAP) for debug probe connectivity
The Cortex-M1 is extremely energy efficient, delivering 150 DMIPS/mW. Its flexible memory system allows instruction and data accesses to be interleaved for maximum performance. The MPU provides configurable regions for memory access control, enhancing software reliability. NVIC offers low latency interrupt handling with configurable priority levels.
FPGA Tools and Kits for Cortex-M1
Using an FPGA with Cortex-M1 opens up opportunities to customize peripherals, accelerate algorithms, and rapidly prototype system concepts. Some popular FPGA tools and kits that work with Cortex-M1 include:
Xilinx Vivado Design Suite
The Vivado Design Suite from Xilinx supports integrating Cortex-M1 into programmable logic designs. This includes IP cores for the processor as well as peripherals like DDR memory controllers. The Vivado IDE simplifies creating custom peripherals and hardware accelerators using HDL. Example projects are available for developing Cortex-M1 systems on Xilinx FPGAs like the Zynq-7000 SoC.
Intel Quartus Prime
For Intel FPGAs, the Quartus Prime design software has support for embedded Cortex-M1. This includes optimized IP cores for the Cyclone V, Arria V, and Stratix series. The Qsys system integration tool simplifies connecting custom logic blocks. Example reference designs help speed up development of Cortex-M1 prototypes on Intel FPGAs.
Microsemi SmartFusion2 Starter Kit
This low-cost kit provides early prototyping on Microsemi FPGAs. It includes a SmartFusion2 device with integrated Cortex-M1, DDR3 memory interface, and other peripherals. Soft console provides easy access to debug and programming tools. Reference designs and tutorials help jump start custom project development.
Lattice MachXO3D Starter Kit
The MachXO3D FPGA from Lattice Semiconductor includes an embedded Cortex-M1 processor. The starter kit has onboard DDR3, flash, and peripherals to enable rapid prototyping. iCEcube2 design software supports implementation of custom accelerators and attaching external memories. Demo projects show how to build Cortex-M1 systems.
Developing with Cortex-M1 and FPGA
A typical workflow for developing a Cortex-M1 system on an FPGA involves:
- Configuring the processor system using IP integrator tools like Vivado IP catalog
- Creating custom peripherals and hardware accelerators with HDL
- Connecting processor subsystem and custom logic in top level design
- Synthesizing and implementing design for target FPGA
- Developing software with ARM compiler and debugger
- Co-simulating design with embedded software
- Deploying bitstream to FPGA and debugging
Key tools used in this flow are:
- ARM Keil MDK – For compiling embedded C/C++ code and debugging
- FPGA Vendor IDE – For building hardware design and co-simulation
- Board Support Package – Device drivers for embedded software
Let’s look at some specific examples of developing with Cortex-M1 and FPGA:
Custom Peripheral Example
A custom peripheral, such as a sensor interface or motor controller can be added using HDL. The FPGA tool will generate a wrapper component that connects to the AXI bus. Software drivers access the custom peripheral registers mapped into the Cortex-M1 memory space.
Hardware Acceleration Example
For time critical operations like video processing, a hardware accelerator can speed up execution. The accelerator connects to memory buses and includes control registers accessible from software. Data gets transferred from processor memory into accelerator, processed, and results written back.
Rapid Prototyping Example
Using an FPGA with Cortex-M1 enables rapidly testing out concepts like new bus architectures or memory technologies. Custom IP blocks can be quickly developed in HDL and synthesized into prototype chip-level system for validation.
Debugging Cortex-M1 with FPGA
Debugging Cortex-M1 software running on an FPGA requires using the embedded debug components built into the processor system. This includes:
- Embedded Trace Macrocell (ETM) – Provides instruction and data trace information used for debugging code execution.
- Debug Access Port (DAP) – Allows debugger to set breakpoints, access registers, and control code execution.
- ARM Serial Wire (SW) – Serial wire output contains debug messages created by software APIs.
A JTAG probe connected to the FPGA can access the ETM, DAP, and SW interfaces on Cortex-M1. The ARM Keil MDK toolkit has support for multi-core debugging to visualize software execution across Cortex-M1 and the FPGA logic.
Co-Simulation Debug
For pre-silicon validation, the FPGA tools also provide co-simulation options. This allows debugging the hardware design and embedded software together in a virtual environment before loading onto physical FPGA.
Conclusion
The Cortex-M1 processor combines high performance 32-bit RISC core with ARM Thumb-2 instruction set for embedded microcontroller applications. When mapped into an FPGA, the Cortex-M1 enables creating custom peripherals, hardware accelerators, and rapid prototypes. Tools like ARM Keil MDK, FPGA vendor IDEs, and board support packages enable an efficient design flow. Debug capabilities like ETM, DAP, and co-simulation help validate the hardware and software.
Overall, the Cortex-M1 + FPGA combination provides a flexible and powerful platform for embedded system development.