Lab 3 - Board Support Package

Welcome back everyone - hope you all have a great new year! This lab goes into much more detail about what the Board Support Package (BSP) is and does when it comes to the software SDK. For me, this cleared up a lot of questions I had regarding it and why we have to generate it from the HDL (Hardware description) that Vivado outputs. Read on to find out more!

 

About:

Through Avnet, Xilinx and Element14, a training program to learn about the Zynq 7000 platform which is System On Chip combining an FPGA with an ARM processor. This comes to the students as complete development board packed with goodies like a wireless chip from MuRata (BT/BTLE/WIFI), 8GB Flash memory, onboard RAM, USB to JTAG (JTAG programmable over USB), Arduino-style headers (3.3V compatible only), Microphone, Bi-Color LED, and two additional expansion ports.

 

See all blog posts for this training here.

 

Importing HDL and generating BSP

The HDL file is generated from Vivado and describes the 'hardware' that is included in a project. This means things like a UART, BRAM, Flash, SPI, and any custom IP like the aforementioned PWM controller. The HDL file is literally just 'describing' the hardware. So it will list things like memory addresses, what the physical pin layouts are, what clocks and timing setups are used. It is up to the BSP to tie these physical descriptions with specific drivers and libraries to make them work together. Once the BSP is created, the software developer will have everything that they require to start developing the actual software.

 

BSP hardware components and associated drivers to be included:

 

 

 

Once the BSP is created, we can examine the system.mss file which describes the BSP. This file shows all the relevant info for the BSP; and even includes links to example code for each of the individual drivers that are used.

 

In the lesson, we click on "Import Examples" for the ps7_gpio_0 and pull in example code for reading GPIO inputs and writing an LED on and off based on that input.

 

We also are shown that the Project Explorer is showing us what is physically located in our workspace on the hard drive of the computer. So if we ever need a back door into the file structure; it is all present in this location.

 

It is noted that these four files are removed & re-created every time a new BSP is generated. This means that we should never edit them directly as they will be blown away. If changes are required; it could mean re-generating the HDL from Vivado or re-importing individual libraries as required.

 

That's it for this lab! In the next lab we will crate "our own" code (following the instructions) and add some example code. And after that, we can connect the board and test things IRL!

 

Until next time,

- James