Microblaze Processor:
Creating a project using the Base System Builder
What am I learning
here?
In this post well look at using the Base System Builder in EDK version
13.1. Specifically you’ll learn:
- How to create an EDK project with the Base System Builder
- How to add a software application to an EDK project
- How to implement and test your design
Requirements
You will need the following :
- One Spartan-3E starter board (or actually any board supported
by Xilinx).
- Xilinx ISE Design Suite 13.2 (including EDK)
Create the Basic Project
Follow these steps to create the basic project:
- Open XPS by selecting "Start->All Programs->Xilinx ISE Design
Suite 13.2->EDK->Xilinx Platform Studio".
- From the dialog box, select "Base System Builder wizard (recommended)"
and OK.
- You will be asked to specify which folder to place the project.
Click "Browse" and create a new folder for the project (IE: "C:\Spartan3EStarterBoard").
Select this folder and Click "Save". (Note: No spaces can be in
the file name.)
- The first page of the wizard will ask us to choose between using
a Processor Local Bus (PLB) or an Advanced Extensible Interface
(AXI). As we are using the Spartan-3E, we have to select a PLB system,
but if you are working with a Virtex-6 or a Spartan-6 you are better
to go with the AXI system. Click "OK".
- We are given the choice to create a new project or to create
one using the template of another project. Tick "I would like to
create a new design" and click "Next".
- On the "Select Board" page, select "Xilinx" as the board vendor.
Then select the board you are using (eg. "Spartan-3E Starter Board").
Select "D″ as the board revision. Click "Next". (Note: If you are
using a different development board then use that instead.)
- Now we have the choice to build a single-processor or dual-processor
system. The Spartan-3E Starter Board does not have any hard processors,
so the Base System Builder will setup a MicroBlaze soft processor
for us. Select "Single-Processor System" and click "Next".
- On the "Configure MicroBlaze" page, we can specify the clock
frequency of our processor and the amount of memory it will use.
Select the clock frequency to 50MHz. Select 32KB for local memory.
Click "Next". (Note: If you select too high of a local memory for
the board you will receive "Too many comps of type "RAMB16" found
to fit this device.", meaning there is not enough BRAM to support
your design.)
- Now we can select the peripherals to put in the design. The
peripherals will all be connected to the MicroBlaze processor via
the PLB and they allow us to control and access features of the
FPGA and external hardware such as the Buttons, LEDs, Switches,
and UART. We will select Buttons_4bit, DIP_Switches_4bit, LEDs_8Bit,
and RS232_DCE. You might ask "Why
include these peripherals?", well most of the time
you would only include the peripherals that you need so that you
do not waste time building peripherals you wont use. In this case,
I want you to include all the peripherals because a lot of the following
EDK tutorials will be based on this "base system". This way, we
wont have to go through the Base System Builder for every tutorial
and we will save time. The fact is, in a professional environment,
you would never go through the Base System Builder when starting
a new project, instead you would take an existing project and develop
from that.
Click "Next".
- In the next page we can configure cache memory for the MicroBlaze.
In our case we wont use cache memory so leave the default and click
"Next".
- The Base System Builder then gives us a summary of the design
that it will create for us, showing the PLB memory map, the peripherals
and the files that it will create. Click "Finish"
- Your project should now display this window.
- The project is now ready to build the bitstream. To build the
bitstream of the project, select "Device Configuration->Update Bitstream".
This will take some time (around half an hour) depending on your
machine.
You should end up seeing this message when the build is complete:
Checking platform address map ...
Initializing Memory...
Running Data2Mem with the following command:
data2mem -bm "implementation/system_bd" -p xc3s500efg320-4 -bt
"implementation/system.bit" -bd "bootloops/microblaze_0.elf" tag microblaze_0
-o b implementation/download.bit
Memory Initialization completed successfully.
Done!
What about the software
application?
You would notice that we did not put any software into the project
(software to run on the MicroBlaze processor). The reason for this is
that Xilinx has removed this functionality from EDK in version 13.2.
They gave us plenty of notice actually, but now all the software development
for your FPGA projects must be done in SDK (Software Development Kit).
|