top of page

MicroZed Chronicles : CMod A7 and External Memory Controller IP.

Over the years, we have spent a lot of time looking at the Arty series of devices. Outside of the MicroZed, they might be some of the most featured boards in my projects and blogs. The Spartan and Artix devices on these boards are very useful for a range of projects and demos. Two of the Digilent boards we have never explored over the years are from the smaller Cmod family. These come in two versions: the S7 and the A7.

The Cmods are interesting as they are very small and provided in a compact form factor with a 48-pin DIP adapter. The Cmod includes all the essentials, such as power, clocking, memories, USB connection, two push buttons, two (A7) or four (S7) LEDs, one RGB LED, and a PMod interface. With the I/O broken out to the 48-pin DIP, the Cmod enables hobbyists and developers to easily integrate an FPGA into their projects.

The Cmod S7 provides a XC7S25 device, while the A7 provides the XC7A35T. It is the Cmod A7 that we are going to examine for the remainder of this blog. Unlike the S7, the A7 variant comes with a small external 512 KB SRAM, which makes it ideal for applications that might require a small MicroBlaze along with a logic solution.

This SRAM is also interesting as it enables me to discuss an AMD IP block, which we have not covered before: the External Memory Controller.

Typically, the development boards we work with have some variety of DDR3 or DDR4 on them. As such, we use the Memory Interface Generator to implement the controller. While DDR provides large, inexpensive memory, the implementation of a controller can reduce resources available for development in smaller devices.

Therefore, if there isn't a requirement for large memory but a need greater than what is available in BRAM, this is where external SRAM can come into its own. In this case, the A7 uses a small asynchronous 512 KB SRAM.

While the 512 KB might not be enough to run an embedded Linux solution, it is more than enough to deploy a real-time operating system such as FreeRTOS. This can come in very handy when we want to work with real-time control, etc., in our project.

Creating a project within Vivado targeting the Cmod A7 will enable us to create an IP integrator block diagram. On this block diagram, we can create a simple MicroBlaze system. From the Boards tab, we can drag across the Cellular RAM, and this will instantiate an EMC controller configured for the SRAM.

Double-clicking on the EMC Controller, we will observe that the EMC is capable of supporting interfaces for both synchronous and asynchronous SRAM, along with linear flash, PSRAM, and Page Mode flash.

All we need to do is provide the memory type, the data width, and then provide the timing parameters from the selected device's datasheet.

In our design, this will present a standard AXI memory-mapped interface, meaning we can easily interact with it using a variety of components, from MicroBlaze to DMA.

The completed block diagram with the MicroBlaze looks as below:

This implementation takes very few FPGA resources, leaving plenty of resources spare for the applications.

With the XSA and bitstream available, we can open Vitis and create a bare-metal project to run the application using the MicroBlaze.

I am liking both the S7 and A7 versions of the Cmod. I can see they could be very useful in a few of our projects where we need a very small solution but do not want to design something custom due to lead times or cost!

Workshops and Webinars

If you enjoyed the blog why not take a look at the free webinars, workshops and training courses we have created over the years. Highlights include

Embedded System Book   

Do you want to know more about designing embedded systems from scratch? Check out our book on creating embedded systems. This book will walk you through all the stages of requirements, architecture, component selection, schematics, layout, and FPGA / software design. We designed and manufactured the board at the heart of the book! The schematics and layout are available in Altium here   Learn more about the board (see previous blogs on Bring up, DDR validation, USB, Sensors) and view the schematics here.

Sponsored by AMD



bottom of page