UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Hidden Gems: The Xilinx PicoBlaze Microcontroller—a tiny RISC processor for FPGAs

by Xilinx Employee ‎07-31-2014 01:57 PM - edited ‎07-31-2014 02:03 PM (43,916 Views)

Yesterday’s discussion of using a couple of FPGA pins for debugging with the I2C serial protocol introduced the idea of using the Xilinx PicoBlaze microcontroller in your FPGA-based designs. (See “Debug your FPGA design with nothing more than two I/O pins, I2C, and a digital scope.”) Pico Blaze is one of those hidden gems embedded within the Xilinx corporate fabric. It’s a tiny microcontroller that fits an 8-bit processor, RAM, and ROM into an amazingly small 26 logic slices. How big is that?

 

  • It’s 0.03% of the smallest Virtex-7 FPGA (91,050 slices)
  • It’s 0.25% of the smallest Kintex-7 FPGA (10,250 slices)
  • It’s 0.5% of the smallest Artix-7 FPGA (5200 slices)
  • It’s 4.3% of the smallest Spartan-6 FPGA (600 slices)

 

In other words, you can easily fit one or more PicoBlaze processors into your FPGA-based design no matter which of these FPGA families you’re using today.

 

Here’s a block diagram of the PicoBlaze microcontroller taken from the PicoBlaze User Guide:

 

 PicoBlaze Microcontroller Block Diagram.jpg

 

 

 

So why would you want to use one (or more) of these PicoBlaze microcontrollers? Rather than have me pitch this useful tool, here are some quotes from people who have actually used the PicoBlaze microcontroller:

 

“The favorite toy in our Xilinx bag-of-tricks is the PicoBlaze processor. We could not have completed the project in the time allowed without extensive use of the PicoBlaze processor. The design contains an impressive count of more than 1,000 of these embedded processors, with nine different designs. PicoBlaze processors provide efficient logic resource utilization by time-multiplexing logic circuits. The PicoBlaze processor also provides a quick and easy way to develop control functions. The alternative would be to build a custom state machine for each function. The PicoBlaze processor is a programmable state machine, meaning that the state machine is already built; one just has to program it.”

 

“The PicoBlaze made our transition towards embedding a SW based application into our well-known FPGA environment seamless and surprisingly simple.”

 

“I can drop PicoBlaze into my design as a block and run sequential tasks with the absolute minimum of interfacing headaches. I am a physicist really, but find development of complex and ultra-fast signal processing systems using this combination a breeze AND a real pleasure!”

 

“By using assembly language, one can accomplish a surprising amount using only a single Block RAM, and the very small PicoBlaze footprint leaves you plenty of room for the rest of your logic functions, and even room for more PicoBlazes!”

 

 

Ken Chapman, a Principal Engineer at Xilinx, has been seeing to the care and feeding of the Xilinx PicoBlaze microcontroller since 1993—for more than two decades. Here’s what Ken says about the PicoBlaze microcontroller:

 

“PicoBlaze is highly predictable in that every instruction takes 2 clock cycles to execute under all circumstances. This makes the meeting of timing requirements possible; I2C and SPI are really quite relaxed when it comes to timing but a UART needs to be reasonably accurate because there is no reference clock.

 

I would argue that, compared with implementing a hardware state machine, it is easier to implement such things using PicoBlaze. Any changes to the hardware of a design [done with Verilog or VHDL] require the recompilation of the whole design (i.e. synthesis, place and route, bit stream generation, and reconfiguration of the device). In contrast, a PicoBlaze program is stored in a BRAM (typically 1K instructions are more than enough and require only one 18kbit Block memory) and can be modified on the fly using the JTAG Loader supplied in the PicoBlaze package.

 

You can change a line of code in your bit-banging program and have it running in live silicon in under 15 seconds. This facilitates a very interactive form of development. For example, you can be looking at the signals on your oscilloscope and observe them as you adjust your code in real time. In practice, the signals are pretty easy to get right and the more challenging part is normally getting the correct protocol for the transactions. That would be much harder using a hardware state machine.”

 

If PicoBlaze isn’t in your Xilinx toolbox, it might be time to add it. Downloadable ZIP files with all the information you need are located here.

Comments
by Visitor ganaylor
on ‎08-27-2014 02:47 AM

I can confirm that picoblaze is brilliant! I have been using them for years. They are so small that you can use a picoblaze for each task as a way of multi-tasking, rather than time sharing in more complex processors which leads to variable and long latencies. Picoblaze gives a low and more deterministic latency. The program space is now quite large and you can actually fit a lot of stuff on just one of these guys! One handy application is to provide a back door to your design via a serial port to configure and interrogate internal processes (the picoblaze can parse simple get and set commands) - allowing a system to be controlled over a simple terminal (eg laptop) locally.

by Voyager
on ‎04-28-2015 06:10 AM

is there an example available on how to use a picoblaze combined with Zynq ARM cores? how to download software on the picoblaze and debug? how to communicate between zynq & picoblaze?

 

 

by Xilinx Employee
on ‎04-29-2015 10:38 AM

ronnywebers,

 

Please check out the PicoBlaze resource page on Xilinx.com:

 

http://www.xilinx.com/ipcenter/processor_central/picoblaze/picoblaze_user_resources.htm

 

Using PicoBlaze in the programmable logic of the Zynq SoC is not significantly different than using it in any Xilinx All Programmable device.

 

Good Luck!

 

--Steve

 

Labels
About the Author
  • Be sure to join the Xilinx LinkedIn group to get an update for every new Xcell Daily post! ******************** Steve Leibson is the Director of Strategic Marketing and Business Planning at Xilinx. He started as a system design engineer at HP in the early days of desktop computing, then switched to EDA at Cadnetix, and subsequently became a technical editor for EDN Magazine. He's served as Editor in Chief of EDN Magazine, Embedded Developers Journal, and Microprocessor Report. He has extensive experience in computing, microprocessors, microcontrollers, embedded systems design, design IP, EDA, and programmable logic.