You are on page 1of 20

SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.

com

SP6 Microblaze
Author:jinry tang

Data:2013-6-15

Addr:NanJin China

Tutorial_01 HelloWorld

Your first microblaze experience.

Learning Microblaze Step by Step

1
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Tutorial_01 HelloWorld

Start Xilinx ISE Project Navigator, Start Programs Xilinx ISE Design Suite 13.2 ISE

Design Tools Project Navigator and create a new project: File > New Project…

Set the Project Location to F:\Xilinx\Embedded\ and the Project Name to Tutorial.

Click Next.

Select Spartan6, xc6slx9-tqg144-2. For this tutorial, pick Verilog as the Preferred

Language. Click Next.

2
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Go to Project > New Source…

Select Embedded Processor. Type mb_system for the File name. Click Next.

Click Finish

Click YES

3
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Select AXI system

Set as follows >Next

4
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Set as follows

Finish

5
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

The Base System Builder wizard created all the files needed to get started with an

embedded MicroBlaze system. Once finished the Xilinx Platform Studio IDE has all the

information for the project. We will look at the interface and the files created. Xilinx

Platform Studio provides an integrated environment for creating an embedded hardware

platform. We will explore all of the windows and necessary files as shown in the figure

below.

1. The System Assembly View shows each peripheral used and the connections between the peripherals
when the Bus Interface tab is selected. We will learn more about the System Assembly View as well as
the IP Catalog tab in the next tutorial.

2. The Project window provides information on the project options used, gives access to the main project
files, and log files. The main Project Files are:
MHS File. The Microprocessor Hardware Specification file contains the hardware specification of
the entire system. The MHS file contains the bus architecture, list of peripherals, connectivity for
the system, interrupt request priorities, and address space. The MHS file can also call out custom IP.

§ MSS File. The Microprocessor Software Specification file defines the software drivers associated
with peripherals, standard input/output devices, interrupt handler routines,
RTOS and libraries used, and other related software features.
§ UCF File. The User Constraints File contains the timing and placement constraints for the FPGA.

§ Download.cmd - iMPACT Command File contains JTAG chain information to download the
6
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com
design to the FPGA on the development board.

§ Fast_runtime.opt - Implementation Options File lists implementation options for all the phases of
the FPGA hardware implementation. The options are used to run the standard ISE tools.

§ Bitgen.ut - Bitgen Options File provides options when generating the bit file for the FPGA.

3. The Applications tab shows the software applications available for the processor. For this lab, the
Xilinx Software Development Kit (SDK) will be used to edit and compile the software.

4. The Addresses tab shows the address map for the system.

5. Click on the Block Diagram tab to view the block diagram for the project. The block diagram shows
the connections between the different busses and components in the system. Also, you can export this
Block Diagram to a jpeg image by clicking Project > Generate Block Diagram Image. This image gets
saved in your under your project in a folder named blockdiagram.

6. A datasheet of the system can also be generated. Go to Project > Generate and View Design Report to
view the design report. This is an html file that is generated in a report subfolder.

Select IP Catalog > Expand Communication Low-Speed>Selct AXI UART(Lite)>Right

Click and Select Add IP


Set Parity FALSE >OK

7
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Select axi_uartlite_0 > Double Cilick to Change Name

Change Name to Rs232 and Expand Select axi4lite_0

Select Ports > Expand RS232

Set RX>UART_RXD TX>UART_TXD

Make External > Expand External Port

Select Addresses TAB and Click Generate Addresses

8
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Select Project

Double Click mb_system.mhs file view it

Double Click mb_system.ucf file Set the footpoint Constrains

9
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Return to Project Navigator and Go to Project > Add Copy of Source to add the FPGA

constraints to the project.

Select mb_system.ucf in the mb_system\data directory.

Click OK.

Select mb_system

Double Generate Top HDL Source

Double Click Export Hardware Design to SDK with Bitstream

Create a Workspace named WorkSpace in the Tutorial_03 directory.

Workspace: F:\Xilinx\Embedded\Tutorial_03\WorkSpace

Click OK.

10
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Create a Workspace named WorkSpace in the Tutorial_01 directory. Click OK.

Go to File > New > Xilinx C Project to create a new C project

11
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Select the HelloWorld application from the project templates then click Next.

Change the Board Support Package project name to Standalone >Click Finish.

12
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

View the Window

Double click on the helloworld.c file to view the main application

13
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

The system contains internal BRAM memory as well as external SDRAM memory. We

can select where the code will be physically located through a linker script. Right-click on

the helloworld project and select Generate Linker Script.

Use the drop-down list to select the internal BRAM memory, ilmb_cntlr_dlmb_cntlr, for

all the code sections. Click Generate

Click Yes.

14
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

15
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Plug the MIcroBoard board into the PC and Usb Cable

Click on the Program FPGA icon

a. For the Bitstream, browse to the Tutorial_01 directory and select mb_system.bit
b. For the BMM File, browse to the Tutorial_01 directory and select edkBmmFile_bd.bmm
c. Click on Program.

16
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

In the SDK Project Explorer View, right-click on the helloworld_0 project and select Run

As > Run Configurations

Select Xilinx C/C++ ELF and click on the New Launch Configuration icon

17
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Select the COM port from step 4 above and leave the BAUD Rate at 9600 this depend

your pc.Click Run

18
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

On the console We can see the COM received data send by our board.

19
SP3E Miroblaze user manual Community: www.openpuu.com Sell:www.openpuu.taobao.com Email:jinry606@qq.com

Thank you for your support.

As you know , time is limited, mistakes can not be avoided, we hope you can

understand ,and give us your good suggestion.

Our goal is to build a Community web site -www.openpuu.com .Currently ,we are

preparing the pre-work. We may need six months to finish it. At then ,we hope you will

like it.

Our address:699-8 Xuanwu big road Xuanwu District Nanjin China

tech-support:+86 15366833677

Taobao shop:http://openpuu.taobao.com/

QQ group

If you have not bought our board : 34215299

If you have bought our board : 86730608

You need tell our you taobao ID as the pass.

20