element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog P2P Blog 2: SW Labs 1-5
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: nerdyupdates
  • Date Created: 25 Oct 2019 8:25 AM Date Created
  • Views 495 views
  • Likes 4 likes
  • Comments 3 comments
  • ultra96-v2
  • path ii programmable
Related
Recommended

P2P Blog 2: SW Labs 1-5

nerdyupdates
nerdyupdates
25 Oct 2019

These first few labs have been about getting up and running on the Xilinx SDK and getting familiar with the SDK environment.

 

SDK First Impressions

 

The SDK is built on the Eclipse IDE platform. I have had very little interaction with Eclipse in the past, but I'm liking it quite a bit already. To an inexperienced user, it's hard to tell what features are native Eclipse and what features have been added in by Xilinx. Overall, the feel and design flow seems user-friendly and intuitive. My favorite feature is the context popups you get when hovering over different elements in source files. You can see macro expansion (i.e. what values / definitions macros are initialized with), function definitions / prototypes, and I even saw info on a string (within a print statement), but haven't been able to replicate it for a screenshot. Below are a couple examples (Fig 1 and 2). Once the popup appears, you can move your mouse over it in order to expand the popup or scroll to see more context. Definitely a handy feature!

 

image

Fig 1. XST_SUCCESS Macro Expansion

 

image

Fig 2. Hover over function shows function definition

 

Labs 1 and 2: Hardware Platform

 

In Labs 1 and 2, we learned about the MPSoC hardware platform and hardware definition file (HDF). The hardware platform contains configuration parameters for the ARM processing system (PS) and the hardware design to be loaded in the programmable logic (PL). The HDF is an archive exported from Vivado containing the hardware platform configuration.

 

The HDF is an archive containing various files pertaining to hardware configuration. These files are specific to the Ultra96-V2 board and would vary depending on the hardware platform being targeted The HDF contains the following:

 

1. Hardware hand off (hwh): Used by SDK to create a board support package (BSP).

2. _bd.tcl: TCL file for re-creating the MPSoC block design

3. _wrapper.bit: programmable logic (PL) configuration bitstream which is used to configure the PL / FPGA fabric at power-up or via JTAG.

4. _init.c: Register setting definitions for initializing the ARM processing system (used to create bootloader)

5. _init.h: _init.c header file (also used for bootloader)

6. _init.html: Contains info on ARM processing system (PS) configuration for a given platform (register settings, etc)

7. _init.tcl: TCL equivalent of _init.c; used to init ARM when using JTAG/debugging via SDK

8. _init_gpl.c: Same as _init.c but includes GNU GPL header

9. _init_gpl.h: Same as _init.h but includes GNU GPL header

10. sysdef.xml: system definitions, parameter definitions for all files in hardware archive

 

Lab 2 walked through creating a workspace and importing the HDF into SDK. A workspace typically contains one imported hardware platform, one or more BSPs, and various application projects targeting the board. We explored the contents of the HDF, including the address map for the board and the IP blocks included in the design. Detailed information about the IP blocks is located in the Zynq UltraScale+ technical reference manual, Xilinx programmable logic documentation, or for custom IP, from the designer of said IP.

 

Lab 3: Board Support Package

 

Lab 3 went over the details of a board support package. A BSP is a collection of low-level libraries and drivers enabling software applications to interact with different features of the MPSoC and peripherals of the board. Applications run on top of this BSP layer. The lab introduced a standalone BSP which can be built with many Xilinx software libraries. These libraries enable features like standard I/O, networking, file system, external FLASH interface, configuration of the PL directly from the PS, in-system FLASH interface, power management and encryption.

 

The BSP documentation in Xilinx SDK is very good. The BSP description file (system.mss) lists each peripheral with links to its respective documentation. The documentation lists available APIs, data structures, a list of files associated with the driver, and examples.

 

Lab 4: Developing an Application

 

Lab 4 showed the process for creating an application in Xilinx SDK. For each example application that was added, the standalone BSP generated in Lab 3 was used. We added the obligatory "Hello Zynq" (Hello World) example application, as well as a peripheral test application and some memory test applications.

 

We examined the default linker script created when adding an application. This script contains a list of available memory regions, stack/heap size settings, and memory region mappings for each application section. We also played with creating a new linker script. Here we can control where each section (code, data, stack/heap) is placed in memory (on-chip, DDR, or block ram), as well as stack/heap size.

 

With each change to source or linker script, etc., the SDK recompiles the application project. This seems like a convenient way to quickly catch bugs caused by typos.

 

***One question I had in this lab was how we would've known on our own that the first 0x50 bytes of DDR were reserved for exception handling vectors. I'm not sure if this is specific to the DDR or a function of the board design, but it was an interesting detail to learn.

 

Lab 5: Connecting SDK to Hardware

 

Alright, now we're working with hardware! This lab walked through the debug environment in Xilinx SDK.

 

The debug environment seems very powerful. The JTAG debug interface allows for viewing register / memory contents, configuring the PL with a bitstream, downloading application code to memory, and of course debugging with breakpoints, etc.

 

Applications can be run standalone (right-click the application and select Run As -> Run Configurations...), or they can be run in debug mode (right-click application and select Debug As -> Debug Configurations...). There are other options for debug, including "Launch on Hardware (System Debugger)", "Launch on Hardware (System Debugger on QEMU)", "Launch on Hardware (GDB)", but these options aren't explored at this point. We walked through creating a new system debugger configuration and then launching the debug session.

 

When launching the debug session, a new "perspective" is displayed in the SDK which shows many new elements. Source files are shown, with the current line to be executed highlighted in green. A Memory view tab is shown on the bottom right, and other new tabs in the upper right include views of device registers, variable values, breakpoints, etc. as seen in Fig 3.

 

image

Fig 3. Debug Perspective in Xilinx SDK

 

I stepped through the Test_Memory application we created in the previous lab. This was the perfect opportunity to add a memory monitor.

 

image

Fig 4. Memory Monitor (Lower right of Debug perspective)

 

We know from the previous lab that the Test_Memory application first tests the AXI BRAM, followed by the DDR4. The base address for the AXI BRAM can be found in the HDF:

 

image

Fig 5. AXI BRAM Base Address in Hardware Definition File

 

The address listed in the memory map is 0xA0000000 for the AXI BRAM. This can also be found in the variables view in the debug perspective. The "memorytest.c" source file declares a "memory_range_s" variable containing the memory base address:

 

image

Fig 6. AXI BRAM Base Address defined in program variable (Upper right of Debug perspective)

 

I set the location of my first memory monitor to location 0xA0000000. I then set break points in front of each memory test function call; the 32 bit test, the 16 bit test, and the 8 bit test:

 

image

Fig 7. Program break points

 

Using "Step Over" will not enter function calls / loops, but I wanted to step through some of the memory test application. For this, I used "Step Into":

 

image

Fig 8. Step Functions in Debug Perspective

 

This brought me into the "xil_testmem.c" source file, and I could see values being written to the memory addresses in the memory monitor. The following shows a 8-bit write test on the AXI BRAM. Values 0x01, 0x02, 0x03 and 0x04 are written to addresses 0xA0000000 through 0xA0000003, and so-on, as I step through the application:

 

image

Fig 9. AXI BRAM 8-bit word memory test (stepped)

 

I added another Memory Monitor for the DDR4. From a previous lab, we know DDR4 starts at address 0x0. This can be seen in the HDF file shows in the debug perspective:

 

image

Fig 10. DDR4 Memory Address

 

In the previous lab, we also learned that DDR4 address locations are reserved until 0x50, which can be seen back in the variable view. I added the Memory Monitor for address 0x50. The following are screen shots captured while stepping through the 16-bit and 32-bit memory test on the DDR4:

 

image

Fig 11. DDR4 16-bit word memory test (stepped)

 

image

 

Fig 12. DDR4 32-bit word memory test (stepped)

 

And that's it! It was nice to finally get some more hands-on with the hardware in this lab.

 

The level of instruction has been very detailed so far. The videos give a brief overview and then the lab documentation really dives into the details. I'm excited to keep progressing through the rest of these SW labs and I can't wait to get to the HW labs!

 

-Phil

  • Sign in to reply

Top Comments

  • aspork42
    aspork42 over 6 years ago +1
    Nice write up.
  • cmelement14
    cmelement14 over 6 years ago +1
    Nice work. I created a short debug example showing a memory test failure case described in the Exploring Further section of SW Lab 4 if you're interested. https://www.element14.com/community/community…
  • cmelement14
    cmelement14 over 6 years ago

    Nice work. I created a short debug example showing a memory test failure case described in the Exploring Further section of SW Lab 4 if you're interested.

    https://www.element14.com/community/community/design-challenges/path2programmable/blog/2019/10/27/second-week#jive_conte…

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • nerdyupdates
    nerdyupdates over 6 years ago in reply to aspork42

    Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aspork42
    aspork42 over 6 years ago

    Nice write up.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube