Reader small image

You're reading from  The FPGA Programming Handbook - Second Edition

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781805125594
Edition2nd Edition
Tools
Right arrow
Authors (2):
Frank Bruno
Frank Bruno
author image
Frank Bruno

Frank Bruno is an experienced high-performance design engineer specializing in FPGAs with some ASIC experience. He has experience working for companies like SpaceX, GM Cruise, Belvedere Trading, Allston Trading, and Number Nine. He is currently working as an FPGA engineer for Belvedere Trading.
Read more about Frank Bruno

Guy Eschemann
Guy Eschemann
author image
Guy Eschemann

Guy Eschemann was an Electrical Engineer with over twenty years of experience designing FPGA-based embedded systems for automotive, industrial, medical, aerospace, military, and telecom applications. He was working as an FPGA engineer at plc2 Design GmbH.
Read more about Guy Eschemann

View More author details
Right arrow

Embedded Microcontrollers Using the Xilinx MicroBlaze

In the previous chapter, we learned about the Digilent PMODs and interfacing with SPI and UART devices. As we’ve progressed through the book, we’ve covered many topics – the Xilinx MIG, complex state machines, and driving a display, to name a few. As our skills developed, we turned to packaging our IPs, so that we could use them in new designs with minimal effort. We have mentioned microcontrollers and microprocessors, and in this chapter, we will introduce the Xilinx MicroBlaze processor, learning how to implement one using Vivado and how to develop software for it using Vitis.

In this chapter, we are going to cover the following main topics:

  • Understanding embedded microcontrollers
  • Introduction to Xilinx MicroBlaze
  • Implementing a MicroBlaze for the Nexys A7 using Vivado
  • Writing a simple “Hello World” program and loading it using Vitis

Technical requirements

The technical requirements for this chapter are the same as those for Chapter 2, FPGA Programming Languages and Tools. We’ll also need to make sure that Vitis is installed for programming the software.

To follow along with the examples and the project, you can find the code files for this chapter in the following repository on GitHub: https://github.com/PacktPublishing/The-FPGA-Programming-Handbook-Second-Edition/tree/master/CH13.

Understanding Embedded Microcontrollers

Microcontrollers are processors that are useful for small tasks that can be reconfigured fairly easily. They aren’t able to play Crysis or have high benchmark scores; in fact, they likely won’t support floating points. But they do allow us to run small, lightweight tasks without the time and complexity of developing hardware. In fact, if you were to look at some of the more advanced Xilinx cores, like the DDR4 controller, they use a MicroBlaze processor to handle the state machine aspects of the memory initialization process.

The Xilinx MicroBlaze processor is a configurable 32-bit processor that can be instanced as a simple microcontroller all the way to a full-blown processor capable of running Linux. In this chapter, we will be looking at the embedded aspects of it.

That said, FPGAs truly shine when you implement custom logic. This allows parallelization, pipelining, and custom interfaces to application-specific devices...

Summary

In this chapter, we’ve implemented a MicroBlaze processing system and developed a simple application to replace the calculator we developed in Chapter 5, Let’s Build a Calculator. We saw how with a little code we could easily reproduce the state machines we wrote as well as implement the division operation. We saw how to add peripherals and how easy it was to build a system around the MicroBlaze. We exported the design from Vivado and read it into Vitis where we could run the design, interact with the board, and see the output using the LEDs and the terminal through the AXI Uartlite.

Questions

  1. A MicroBlaze processor is a:
    1. Microprocessor
    2. Microcontroller
    3. Microcontroller or a microprocessor at design time
  2. We use ______ to develop an FPGA with a built-in ARM processor or MicroBlaze:
    1. Vivado
    2. Vitis
    3. Vivado and Vitis
    4. All of the above
  3. MicroBlaze applications can be developed to run under (multiple answers):
    1. Linux
    2. RTOS
    3. Bare metal
    4. All of the above
  4. A MicroBlaze is a highly parallel, high-performance processor that, when implemented in an FPGA, negates the need for all other custom logic. True or false?

Answers

  1. b) Microcontroller
  2. c) Vivado and Vitis
  3. d) All of the above
  4. False

Challenge

We’ve developed other IPs through the course of this book, like the VGA controller and the seven-segment display. Can you add one or more of these IP blocks to create a more robust design?

Join our community on Discord

Join our community’s Discord space for discussions with the authors and other readers:

https://packt.link/embedded

lock icon
The rest of the chapter is locked
You have been reading a chapter from
The FPGA Programming Handbook - Second Edition
Published in: Apr 2024Publisher: PacktISBN-13: 9781805125594
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (2)

author image
Frank Bruno

Frank Bruno is an experienced high-performance design engineer specializing in FPGAs with some ASIC experience. He has experience working for companies like SpaceX, GM Cruise, Belvedere Trading, Allston Trading, and Number Nine. He is currently working as an FPGA engineer for Belvedere Trading.
Read more about Frank Bruno

author image
Guy Eschemann

Guy Eschemann was an Electrical Engineer with over twenty years of experience designing FPGA-based embedded systems for automotive, industrial, medical, aerospace, military, and telecom applications. He was working as an FPGA engineer at plc2 Design GmbH.
Read more about Guy Eschemann