Maxrefdes43 Zedboard Quick Start Guide
Maxrefdes43 Zedboard Quick Start Guide
Maxim Integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim Integrated product. No circuit
patent licenses are implied. Maxim Integrated reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000
© 2015 Maxim Integrated Products, Inc. Maxim Integrated and the Maxim Integrated logo are trademarks of Maxim Integrated Products, Inc.
MAXREFDES43# ZedBoard Quick Start Guide
Table of Contents
1. Required Equipment ............................................................................................. 3
2. Overview .............................................................................................................. 3
3. Boot from an SD Card .......................................................................................... 5
4. Download Demonstration from Xilinx SDK ........................................................... 8
5. Included Files ....................................................................................................... 9
6. Procedure ........................................................................................................... 10
7. Appendix A: Project Structure and Key Filenames ............................................. 21
8. Appendix B: Code Snippets of Importants .......................................................... 22
9. Appendix C: Pre-Install Master Secret into Bitstream ......................................... 22
10. Trademarks ........................................................................................................ 24
11. Revision History.................................................................................................. 25
2
MAXREFDES43# ZedBoard Quick Start Guide
1. Required Equipment
• MAXREFDES43# board
• ZedBoard™ development kit
• To run the binary from SD card:
o Host PC with Windows® OS with Terminal Software installed
(HyperTerminal) and two USB ports
o CP2104 device drivers (Silicon Labs USB-UART)
o 4GB FAT32 formatted SD card
• To run the software from the Xilinx® SDK:
o PC with Windows OS with Xilinx SDK version 14.4 and two USB ports
o License for Xilinx EDK/SDK (free WebPACK™ license is OK)
2. Overview
The MAXREFDES43# software can be downloaded to the ZedBoard via two methods:
• (Easiest) Boot from an SD card containing a binary file that loads the necessary
CPU bootloader, FPGA bitstream, and MAXREFDES43# executable file. This
approach is explained in detail in Section 3 of this document.
• (Flexible) Use the Xilinx SDK to download the board bitstream and executable
file. This approach allows the source code to be modified. This approach is
explained in detail of Section 4 of this document.
3
MAXREFDES43# ZedBoard Quick Start Guide
4
MAXREFDES43# ZedBoard Quick Start Guide
5
MAXREFDES43# ZedBoard Quick Start Guide
6
MAXREFDES43# ZedBoard Quick Start Guide
7
MAXREFDES43# ZedBoard Quick Start Guide
8
MAXREFDES43# ZedBoard Quick Start Guide
5. Included Files
The top level of the hardware design is a Xilinx ISE® Project Navigator Project (.XISE)
for Xilinx ISE version 14.4. The C-code design instantiates the Zynq® ARM core, the
support hardware required to run the Zynq ARM core, and the peripherals that interface
to the Pmod ports. This is supplied as a Xilinx software development kit (SDK) project
that includes a demonstration software application to evaluate the MAXREFDES43#
subsystem reference design. The lower level c-code driver routines are portable to the
user’s own software project.
9
MAXREFDES43# ZedBoard Quick Start Guide
6. Procedure
1. Connect the MAXREFDES43# board to the JA1 port of a ZedBoard development
kit as shown in Figure 1. The other Pmod ports, JB1, JC1, JD1, can be enabled
at a later time. Make sure that jumpers are connected across pins 2 and 3 of J3
and across pins 2 and 3 of J4. This is the ZedBoard configuration. Connect the
ZedBoard to your PC through both the UART connector, J14, and the
programming connector, J17 (alternatively, you can connect to the JTAG
connector to the ZedBoard, instead of the programming connector). Connect 12V
power supply to barrel jack, J20. Power up the ZedBoard development kit by
turning SW8 to the On position. The MAXREFDES43# board is completely
powered from the ZedBoard development kit and no external power is required.
C:\0123456789\0123456789\0123456789\0123456789\0123456789\0123456789\
0123456789\0123456789\0123456789\RD43V02_40.ZIP
(This path is too long.)
In addition, the Xilinx tools require the path to not contain any spaces.
10
MAXREFDES43# ZedBoard Quick Start Guide
4. Open the Xilinx Software Development Kit (SDK) from the Windows Start
menu. Note that this design requires Xilinx EDK/SDK version 14.4.
5. SDK will prompt for a workspace directory, which is the location where the
software project is located. For this example, it is:
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7\sdkWorkspace
Click OK and SDK will open. The Xilinx SDK is based on an Eclipse™-based
IDE, so it will be a familiar flow for many software developers.
11
MAXREFDES43# ZedBoard Quick Start Guide
6. Review the SDK IDE. The Project Explorer in the upper left tab should have
four components as shown in the image below. If all four subfolders are present,
you can skip the next step.
12
MAXREFDES43# ZedBoard Quick Start Guide
7. If the Project Explorer does not contain these four subfolders, launch the
File | Import menu, expand the General folder, and select Existing Projects
into Workspace. Click Next. Set the root directory to:
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7sdkWorkspace
and the missing projects should appear in SDK Project Explorer with their
checkboxes checked.
13
MAXREFDES43# ZedBoard Quick Start Guide
8. Download the bitstream (top_mem.bit) file to the board, click on the Program
FPGA icon (which looks like a green chain of devices). Note: The top_mem.bit
file is pre-generated per Appendix C: Pre-Install Master Secret into Bitstream to
contain the Master Secret.
The Program FPGA dialog box appears. A prompt will appear, requiring
selection of zynq1_hw_platform or zynq2_hw_platform. Select
zynq1_hw_platform, as indicated below.
14
MAXREFDES43# ZedBoard Quick Start Guide
Bitstream:
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7\top_mem.bit
BMM File:
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7\edkBmmFile.
bmm
The BMM file request may be grayed out. This does not matter and the system
still works.
Press Program.
15
MAXREFDES43# ZedBoard Quick Start Guide
9. Set up the terminal program to run on the PC using the following steps. Before
loading the executable firmware file on the FPGA, the terminal program on the
PC should be running. The example firmware running on the FPGA
communicates with the PC via a USB port set up to emulate a serial port (UART).
To establish this communication link, the PC must be configured with the
appropriate Windows drivers. A suitable terminal program such as Tera Term or
HyperTerminal should be invoked.
Once installed, Windows assigns a previously unused COM port. Use the
Windows Control Panel | System | Device Manager to determine the COM port
number. (It will be named USB Serial Port). Make a note of which COM port this
is. That information is needed in the next step.
data bits: 8;
parity: none;
stop bits: 1;
16
MAXREFDES43# ZedBoard Quick Start Guide
10. Use the Xilinx SDK to download and run the executable ELF (.ELF) file on the
ARM Cortex-A9 using the following steps.
Right-click the mouse while the maximPMOD project is selected, choose the
Run As menu, and then Run Configurations… menu as shown below.
17
MAXREFDES43# ZedBoard Quick Start Guide
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7\
sdkWorkspace\maximPMOD\Debug\maximPMOD.elf
18
MAXREFDES43# ZedBoard Quick Start Guide
Also, select the ps7_init.tcl file by clicking on Device Initialization and browsing
to the ps7_init.tcl file, in a location similar to:
C:\designs\maxim\RD43V02_70\Zedboard_HDL_and_SW\v2_7\
sdkWorkspace\zynq1_hw_platform\ps7_init.tcl
Once both the maximPMOD.elf and the ps7_init.tcl files are selected, press
Run.
19
MAXREFDES43# ZedBoard Quick Start Guide
At this point, the application is running on the ARM Cortex and the terminal
program should show the menu below. Make the desired selections by pressing
the appropriate keys on the keyboard. For example, select 1 to move the active
Pmod port to a different connector.
The DS28C22 will not be setup for authentication until running step 5. Once
programmed, both the authorization (authentication) and encryption
demonstrations will run successfully.
20
MAXREFDES43# ZedBoard Quick Start Guide
21
MAXREFDES43# ZedBoard Quick Start Guide
www.xilinx.com/support/documentation/user_guides/ug1019-zynq-trustzone.pdf
Bitstream: The output of the Xilinx ISE tools will generate a bitstream (top.bit) that
configures all programmable logic inside the FPGA fabric, including block memories.
The default block RAM configuration will have the data at all memory addresses set to
zero. This Block RAM can be initialized to any set of values by using a Xilinx command
line tool called data2mem to merge an existing bitstream with a text file (test.mem) that
contains the desired block memory contents.
Test.mem: The test.mem file alternates memory locations followed by the data for that
memory location. An example configuration is shown below. Each line should contain a
carriage return, and the file does not contain any headers, footers, or checksums.
@82cd0000
3378D863
@82cd0004
0537C88A
@82cd0008
4F57FA55
@82cd000C
98E81450
@82cd0010
AF66F5C5
@82cd0014
20F79E58
@82cd0018
E589FF3A
@82cd001C
758DB5B7
22
MAXREFDES43# ZedBoard Quick Start Guide
Note that if the Xilinx tools are not included in the command line path, the
data2mem.exe and DLLs can be copied to a directory containing the top.bit and
test.mem file. These tools are typically found in the Xilinx tools install directory at:
C:\Xilinx\14.4\ISE_DS\ISE\bin\nt
• Data2mem.exe
• libData2MEMDataUtil.dll
• libData2MEMDesignUtil.dll
When downloading the new bitstream for the design, make sure to use the new
top_mem.bit file instead of the old top.bit file.
23
MAXREFDES43# ZedBoard Quick Start Guide
10. Trademarks
ARM is a registered trademark of ARM, Ltd.
Cortex is a registered trademark of ARM, Ltd.
Eclipse is a trademark of Eclipse Foundation, Inc.
ISE is a registered trademark of Xilinx, Inc.
MicroBlaze is a trademark of Xilinx, Inc.
Pmod is a trademark of Digilent Inc.
Spartan is a registered trademark of Xilinx, Inc.
WebPACK is a trademark of Xilinx, Inc.
Windows is a registered trademark and registered service mark and Windows XP is a
registered trademark of Microsoft Corporation.
Xilinx is a registered trademark and registered service mark of Xilinx, Inc.
ZedBoard is a trademark of ZedBoard.org.
Zynq is a registered trademark of Xilinx, Inc.
24
MAXREFDES43# ZedBoard Quick Start Guide
25