SoC
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
  • Arm Cortex M3
  • Contact
Reading: Best practices for Cortex-M1 MMI generation in Xilinx FPGAs
SUBSCRIBE
SoCSoC
Font ResizerAa
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Search
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Have an existing account? Sign In
Follow US
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
© S-O-C.ORG, All Rights Reserved.
Arm

Best practices for Cortex-M1 MMI generation in Xilinx FPGAs

David Moore
Last updated: September 17, 2023 9:34 am
David Moore 4 Min Read
Share
SHARE

Generating the Memory Mapped Interface (MMI) for a Cortex-M1 processor inside a Xilinx FPGA can be challenging if not done properly. Here are some best practices to follow for optimal MMI generation.

Contents
Understand the Cortex-M1 ArchitectureUnderstand Xilinx FPGA Memory Interface OptionsGenerate a Memory MapGenerate AXI Lite InterfacesConnect Processor and InterfacesValidate the DesignImplement the Design in HardwareDevelop Software with Hardware AbstractionValidate Operation in HardwareConsider an SMP Linux Software Environment

Understand the Cortex-M1 Architecture

The Cortex-M1 is a 32-bit RISC processor core designed for deeply embedded applications. It has a 3-stage pipeline and a Von Neumann architecture with separate instruction and data buses. Key features include:

  • ARMv6-M architecture
  • Thumb-2 instruction set
  • Hardware multiply and divide
  • Nested Vectored Interrupt Controller (NVIC)
  • Optional Memory Protection Unit (MPU)

Understanding the architecture and interfaces of the Cortex-M1 is essential for proper MMI generation. Read the technical reference manual thoroughly.

Understand Xilinx FPGA Memory Interface Options

Xilinx FPGAs provide different options for interfacing memory and peripherals to processor cores:

  • AXI interfaces – Advanced eXtensible Interface bus, provides high bandwidth interfacing.
  • AXI Lite interfaces – Simplified version of AXI for simple memory mapped access.
  • Native Port interfaces – Custom parallel access to FPGA resources.

AXI Lite provides the best combination of easy interfacing and flexibility for Cortex-M1 MMI generation.

Generate a Memory Map

Create a detailed memory map specifying the base addresses and size of each peripheral and memory block in your system. Make sure to follow ARM recommendations for address space layout:

  • 0x00000000-0x1FFFFFFF – Code space (512MB)
  • 0x20000000-0x3FFFFFFF – SRAM (512MB)
  • 0x40000000-0x5FFFFFFF – Peripherals (512MB)
  • 0x60000000-0x9FFFFFFF – Ext. bus interface (1GB)
  • 0xA0000000-0xDFFFFFFF – Ext. memory (1GB)
  • 0xE0000000-0xFFFFFFFF – Private peripheral bus (512MB)

Leave room for future expansion and align addresses to natural boundaries.

Generate AXI Lite Interfaces

Use the IP catalog within Xilinx’s Vivado tool to generate AXI Lite interface blocks for each peripheral/memory element. Configure base addresses according to your memory map. AXI Lite provides simple address decoding.

Connect Processor and Interfaces

Connect the Cortex-M1 instruction and data buses to the master interfaces on the AXI Lite blocks. Utilize Vivado’s block design and Bus Interface tool to simplify connections.

Validate the Design

Validate the complete MMI design by:

  • Running vivado synthesis to check for errors
  • Simulating transactions over the AXI Lite interfaces
  • Generating test software that accesses peripherals at mapped addresses

Fix any issues before final implementation. Simulation provides the best way to verify correct MMI operation.

Implement the Design in Hardware

Run full implementation in Vivado to generate the bitstream for FPGA programming. Be sure to optimize timing performance during implementation. Long critical paths can cause issues.

Develop Software with Hardware Abstraction

Accessing hardware directly via memory mapped addresses can make software development challenging. Instead, develop HAL (Hardware Abstraction Layer) drivers for each peripheral that provide an easy software interface. This allows smooth porting between hardware platforms.

Validate Operation in Hardware

Download the bitstream to an FPGA dev board and validate real hardware operation. Verify peripheral access via a debug probe like JTAG. Time hardware bring up and driver development along with hardware implementation to shorten the development cycle.

Consider an SMP Linux Software Environment

For complex applications, consider augmenting the Cortex-M1 with an SMP capable processor like the Cortex-A series also implemented in the FPGA. Run Linux on the Cortex-A and access FPGA peripherals from Linux userspace via the Cortex-M1 acting as a secure gateway.

Following these best practices will help ensure a smooth and successful Cortex-M1 MMI generation within a Xilinx FPGA. Proper design at the outset saves debug time down the road.

Newsletter Form (#3)

More ARM insights right in your inbox

 


Share This Article
Facebook Twitter Email Copy Link Print
Previous Article Troubleshooting errors when running make_mmi_file.tcl
Next Article How to Correctly Configure Linker Options for Cortex-M23 in uVision5?
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

2k Followers Like
3k Followers Follow
10.1k Followers Pin
- Sponsored-
Ad image

You Might Also Like

Cortex M0+ delay routine without timers

Executing delays and timing operations are common needs in embedded…

10 Min Read

Implementing File I/O on Cortex-M1 without an OS or Filesystem

The Cortex-M1 processor from ARM is a powerful 32-bit chip…

7 Min Read

Modifying Stack Pointer (SP) and Program Counter (PC) in Cortex-M1

The stack pointer (SP) and program counter (PC) are important…

6 Min Read

Cortex-MO FPGA

Field Programmable Gate Arrays (FPGAs) based on ARM Cortex-M processor…

6 Min Read
SoCSoC
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
Welcome Back!

Sign in to your account