A MicroZed UDP Server for Waveform Centroiding: Introduction

Table of Contents

So...how Do I Do Something That's Actually Useful on the MicroZed?

When I started working with the MicroZed, I began like any good student should. I read everything I could get my hands on, followed some basic tutorials, and scoured the Xilinx forums. But when it came time to put everything together to actually "do something useful", I realized I was in way over my head.

How was I supposed to get data from an Ethernet port into the algorithm I wrote in Vivado HLS? What the hell were all those DMA settings showing up in the DMA configuration widget? How does one write an HLS algorithm that doesn't send its results back to the MicroZed's ARM processor using DMA? These were the questions that were racking my brain.

It took me a really long time reading through a ton of different sources and getting help from experts (I'd particularly like to thank Jonathan Wolff) to answer these questions. So I figured I'd write a tutorial that covers all the hurdles I had to jump over in the hopes that it'll save other people some time.

A (Relatively) Simple Project to Start

The project I'm going to cover in this tutorial involves sending some data from a computer to the MicroZed over Ethernet, having the MicroZed run that data through a simple algorithm running in the Programmable Logic, and then sending the results back to computer on that same Ethernet link. It looks something like this.

Sounds easy, right? Shoot...I wish it was. I would have had more time to watch Key and Peele skits on the internet if it was.

The Tools You'll Need to Follow Along

To follow along with this tutorial, you'll need the following:

  1. A MicroZed board with a Zynq 7010 SoC on it
  2. An Ethernet crossover cable (RJ45) OR a regular Ethernet cable with an Ethernet switch
  3. Vivado High Level Synthesis
  4. Vivado Design Suite
  5. Xilinx SDK
  6. The socket include files in the GNU C Library

So the bad news is that the products above will cost you more than a top-notch washer/dryer combo. The good news is that once you've convinced your boss to buy them all, this tutorial will help you understand how these three applications can be used together to create a fully-functional system.

The Breakdown and What You'll Learn

Part of the reason this is difficult is that it involves using three different Xilinx tools, and each one of those tools has a thick ass manual that would take weeks to read through. I'm not saying they are bad tools by any means—I think they're excellent. But it's no walk in the park to go from reading those manuals to mastering the tools. Hence, why I'm writing this tutorial. Here is how things are laid out in the tutorial.

Chapter 1: Writing the GetCentroid Algorithm in HLS

In this chapter, we'll write our data processing algorithm in Vivado High Level Synthesis and turn it into an IP product that Vivado Design Suite can ingest. In this chapter, we'll tackle the following questions:

Chapter 2: Creating a Vivado Design that Uses Our Algorithm

Next, we'll build a block design in Vivado Design Suite that describes how the data is going to flow from the ARM microprocessor (after being received by a UDP server) to our algorithm. We'll address these questions:

Chapter 3: Writing the lwIP UDP Server Portion in Xilinx SDK

Finally, we'll write the code for our lwiP UDP server, DMA mover, and interrupt handler in Xilinx SDK. This code will run on the ARM processor inside the MicroZed.

My real hope is that if you can get through this tutorial then you can figure out how to make your own application that runs data through the MicroZed.

Next →

Table of Contents