Implementing ARM processors on FPGAs can enable powerful and flexible embedded systems, combining the programmability of ARM with the hardware programmability of FPGAs. However, effectively integrating these two technologies requires careful planning and design considerations. This article provides practical guidelines and recommendations for engineers looking to implement ARM cores on FPGAs.
Choosing the right ARM core
The first major decision is choosing which specific ARM core to use. There are many options from ARM Cortex-M series microcontrollers to more powerful Cortex-A series application processors. Key factors to consider include:
- Performance requirements – Clock speed, memory bandwidth, floating point needs, etc.
- Power budget – Higher performance cores tend to use more power.
- FPGA logic and memory resources – More complex cores require more FPGA resources.
- Peripheral needs – Number and types of interfaces required, like Ethernet, USB, etc.
- Software compatibility – Some cores support more software platforms like Linux.
- Licensing cost – More advanced cores have higher licensing fees.
For many embedded applications, a Cortex-M1 or Cortex-M3 processor provides a good balance of performance and logic utilization. For systems needing an operating system like Linux, a Cortex-A5 or Cortex-A9 is recommended.
Obtaining the ARM IP
There are generally two options for obtaining ARM cores – either directly from ARM or from an FPGA vendor. ARM offers various pre-configured cores and also the option to customize core configurations. FPGA vendors like Xilinx and Intel/Altera offer optimized ARM cores integrated into their FPGA toolchains. The tradeoffs include:
- ARM cores – More configuration options but require more engineering effort to integrate and verify in the FPGA design flow.
- FPGA vendor cores – Pre-integrated and verified but less flexibility in configuration.
For most projects, the FPGA vendor cores offer the easiest path, with the ability to switch to the ARM cores if more customization is required. When licensing directly from ARM, pay close attention to the specific tool support for the FPGA design software that will be used.
Designing the system architecture
A key step is designing the overall system architecture and interfaces between the ARM core, FPGA fabric, and external system components. Important considerations include:
- Defining clock domains – The ARM core will usually run on a different clock from the rest of the FPGA logic.
- Memory interfaces – Architecting the connection between the ARM core and FPGA fabric for accessing shared memory and peripherals.
- Hardware acceleration – Determining which functions are better optimized on the FPGA vs in ARM software.
- External interfaces – Ethernet, USB, PCIe and other required I/O.
Getting the architecture right from the beginning will ease development, optimization and integration challenges as the project progresses. A modular design with well-defined interfaces is recommended to allow flexibility as requirements evolve.
ARM core configuration
Most ARM cores provide configuration options to balance performance against FPGA resource utilization. This includes choices like:
- Integer unit pipeline depth
- Selection of ARM/Thumb instruction set
- Floating point unit options
- Cache sizes for L1 and L2
- TLB configuration
- Embedded trace options
Determining the right configuration requires thorough analysis of the target application requirements and FPGA resource availability. Tuning these parameters can require several design iterations to find the optimal balance.
Using the FPGA fabric
A major advantage of implementing ARM cores on an FPGA is the ability to augment the processor with custom logic in the FPGA fabric. Typical ways the FPGA can complement the ARM processing system include:
- Hardware accelerators – Offloading critical algorithms from software into FPGA logic for higher performance and lower power.
- Custom peripherals – Creating application-specific peripherals and I/O interfaces.
- Memory and bus fabric – Optimizing connection between ARM core and memory elements.
- Reconfiguration fabric – Dynamically reconfiguring FPGA logic at runtime.
Effective use of the programmable FPGA fabric requires an iterative process to profile software, identify performance bottlenecks, and determine which functions to optimize in hardware. Bridge interfaces between the ARM core and FPGA logic, like AXI, provide standard methods to integrate hardware accelerators and peripherals.
Debugging and validation
Debugging and validating an ARM-based FPGA design requires using both ARM software development tools and FPGA implementation tools. Recommended best practices include:
- Simulation – Validating the design function early via RTL simulation.
- Software emulation – Developing software against an ARM instruction set simulator.
- In-system debugging – Using JTAG probe connected to ARM debug port.
- Trace buffer – Capturing ARM code execution history.
- Performance counters – Profiling software to identify optimization opportunities.
It is important to budget sufficient time for debug, as validating the interaction between hardware and software raises additional complexity over a pure software project.
Development boards
Rather than taping out custom ARM on FPGA silicon for initial development, engineers should seek out development boards that combine ARM processors with FPGAs. Boards like the Xilinx Zynq UltraScale+ MPSoC and Intel (Altera) SoC FPGA ARM Development Kit provide excellent platforms for software and hardware development, integration, and testing. Investing in these proven platforms reduces risk and shortens the development timeline.
Software development
A final key consideration is developing the necessary software stacks, drivers, and firmware to fully utilize the capabilities of the ARM cores and programmable logic. Options include using embedded Linux distributions or real-time operating systems like FreeRTOS. Driver development for custom hardware accelerators and I/O interfaces is also required. Allow sufficient lead time for software development, as this task often takes longer than the FPGA hardware design.
By following these practical guidelines, engineers can build powerful ARM-based systems leveraging the full capabilities of modern FPGA technology. Proper planning in the architectural, hardware/software co-design, debugging, and software development efforts is key to achieving success.