Joseph Tarango
Department of Computer Science and Engineering
Bourns College of Engineering
University of California, Riverside

Home
CS122A | Syllabus
Intro to FPGAs | Basics of VHDL | Intro to Xilinx | Turnin
Lab 1 | Lab 2 | Lab 3 | Lab 4 | Lab 5 | Project

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:

  1. How to create an EDK project with the Base System Builder
  2. How to add a software application to an EDK project
  3. 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:

  1. Open XPS by selecting "Start->All Programs->Xilinx ISE Design Suite 13.2->EDK->Xilinx Platform Studio".
  2. From the dialog box, select "Base System Builder wizard (recommended)" and OK.
  3. 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.)
  4. 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".
  5. 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".
  6. 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.)
  7. 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".
  8. 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.)
  9. 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.
  10. Click "Next".
  11. 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".
  12. 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"
  13. Your project should now display this window.
  14. 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).