This is an old revision of the document!


Cmod A7 Out of Box Demo

Overview

Features Used

Not Used Used
2 user LEDs X
1 tri-color LEDs X
2 User Push Buttons X
48 GPIO Pins X
1 Pmod port X
Pins for XADC signals X
USB-UART Bridge X
512 kB SRAM X

Description

This simple User Demo project is a Microblaze project that tests the SRAM on the Cmod A7 and features the basic I/O on the device.

  • The SRAM is tested and the results can be seen through the UART port
  • BTN1 when pressed cycles through different colors of the RGB LED
  • BTN1 when pressed creates a binary counter with the user LEDs counting up to 3

Prerequisites

Skills

  • Basic familiarity with Vivado
    • This experience can be found by walking through our “Getting Started with Vivado” guide

Hardware

  • Cmod A7 FPGA board
  • Micro-USB cable

Software

  • Vivado Design Suite 2015.3
    • Newer/older versions can be used, but the procedure may vary slightly

Downloads

Cmod A7 Support Repository – GIT Repo


How to...

1. Generate the Project

1.1) Download the repository linked in the download section and unzip it in the location of your choosing.
1.2) Generate the User project in the Projects folder by following this guide before continuing: How to Generate a Project from Digilent's Github

2. Build the Project

2.1) Click Generate Bitstream on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically.

Note: If you want, you can click each step by itself in the order of Run Synthesis, Run Implementation and then Generate Bitstream.

3. Program the Board

3.1) Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option.

3.2) Click program to load the project onto your Cmod A7.

4. Export to SDK

Export the microblaze project by going to File>Export>Export Hardware. Click the check box to Include the bitstream, and export it local to project. This will create a .sdk folder in your project directory. Afterwards, click File>Launch SDK to launch Xilinx SDK.

5. Import the SDK files

In your project Explorer window on the left side, click File>Import then expand the General tab and click Existing Projects into Workspace. Navigate to the download folder, select the sdk folder, and click OK. In the Import window, click Finish to import the SDK project.

6. Program the FPGA

Click Xilinx Tools>Program FPGA and click Program. Xilinx SDK will then program the FPGA with a microblaze bit file.

4. Run the Project

This portion will help you run the demo and observe all its features.

4.1) Observing the different LED colors

For this demo, every time btn1 is pressed, the led state changes. The user LEDs create a 2 bit binary counter that increments every time the button is pressed. The RGB LED changes color every time the button is pressed.

4.2) UART

Connect a terminal program with the settings 9600 baud rate, 8 bits, one stop bit, and no parity bit. On reset, the board will go through a memory test and will print out the result. If the memory is working, the following message will appear.



Also whenever a button is pressed, the message “Button Pressed” is sent over UART.