1. Start Xilinx Platform Studio Hello World on the ATLYS Board Building the Hardware 2. Click on Create New Blank Project Using Base System Builder
For the project file field, browse to the directory where you want your design to reside. Make sure to create a directory that is initially empty and that will contain your design. My directory name is HelloWorldHW. If you do this through the Browse... button, the system.xmp file name is automatically generated. The field at the bottom that refers to the Atlys_BSB_Support... is a library that contains all of the support necessary to run our programs on the Atlys board. Again, just use the browse button to navigate to the directory that is shown in the window below. Click OK.
All of the fields in the next window are automatically filled in for you. Just click Next. Now you need to remove some unused peripherals. XPS includes some things that you don t need right now so let s remove them. Select the Digilent items with the mouse and click the remove button. You can see these items selected in the window below. Also remove the Ethernet LIte and MCB_DDR2 peripherals. Increase the Local Memory Size to 32 KB by using the drop-down menu for that option.
The window below shows what things should look like after you have removed the unused peripherals and have increased the local memory to 32KB.
Click Finish and the system will pop up a dialog box that shows how the build process is progressing. After the hardware system is built, you will see the following screen:
This screen is described in the documentation that was assigned earlier in this lab. Make sure that you understand this window. We will probably have a quiz on this later. Take a look at the block diagram view by clicking on the Graphical Design View tab. You will see something like:
Zoom in to various parts of the diagram to see details of the blocks contained in the design. Try and make some sense of the design by looking at the various blocks. Try to understand what the various blocks do. Now that you have designed the system you need to create the files that are used to program the FPGA. Just click the Generate BitStream button and wait, this process takes awhile so just sit and watch the process. You will see a status bar at the bottom right while the bitstream is being generated. Also, be prepared to explain what happens during this process. Review the console window at the bottom so you can see what is going on.
When the process completes you will several warnings but should have no errors. Click through the Console, Warnings, and Errors tabs located at the bottom left of the Xilinx Platform Studio (XPS) window. At this point (if all went well) you should be ready to export your hardware system to the Xilinx SDK. Click the Export Design button. The default setting should be OK but double-check to ensure that your window looks something like that shown below: Click Export & Launch SDK. Once it is ready to launch, you will see the following dialog. As before, create a new and empty folder that will serve as your workspace (use the Browse... button) and then hit OK. Once the SDK starts up you will see the following window:
Here s a closeup of the information window that is shown in the center: This is a description of the hardware that you just produced. All of this was included by default when you included the Atlys board support in an earlier step. Microblaze is the name of Xilinx s soft microprocessor. You all know what a UART is and you should be able to guess what a lot of the other things do.
Now, let s create a new Xilinx C Project. This will allow us to write and compile C source files for our embedded system. From the File menu at the far left, choose New and then select Xilinx C Project. We will pick the ready-made Hello World project. I think that it comes up as default but make sure that it is selected and the click the Next button.
Just use the default values that show up in the next window and click Finish. After you hit Finish, you should see some compilation messages stream by in the console window located near the bottom of the screen. If you hunt around a bit you can find the file that contains the main C program.
The program is quite simple but there is actually quite a bit going on. Look through the other files in the src directory to see what they do. Look in the microblaze_0 directory that is contained in the hello_world_bsp_0 directory. Every software file that your system uses is contained in there. Get acquainted with the directory structure inside microblaze_0 - you will be looking in there quite a bit during the semester.
You need to regenerate the linker script. Right-click on the hello_world_0 project and select Generate Linker Script (4th line from the bottom of the menu, see below). The Generate Linker Script window is shown below:
Just click Generate (all of the defaults are correct). A dialog box will ask you if you want to overwrite an existing file. Click Yes. We are almost ready to test our program. The only thing our program does is print out a short message to STDOUT so we need to use a terminal emulator program to see it. Start up Tera Term (or any other terminal emulator that you like) and make sure that it is configured to use serial port COM4. One of the 2 USB cables that run from the ATLYS board to the computer essentially connects the STDOUT from the ATLYS board to the COM4 port of the PC (via some preinstalled drivers). Next, let s download to the board and see if the program running on the ATLYS board will greet us. Click the Program FPGA button (the second button from the far left) to start the download process. Make sure that in the field microblaze_0 (near the bottom of the dialog box) that you replace the default bootloop entry with the one that refers to your workspace (use the pull-down menu).
Once you have filled in the microblaze_0 field properly, hit Program. This step requires a few seconds (less than a minute) to download your program to the ATLYS board and start it up. If you are successful, you should see the following in the terminal window: There are quite a few steps in the process so don t be disappointed if you don t get it the first time. Just keep trying and you should get there.