Many students and hobbyists are exposed to microcontrollers (and the associated tools and languages used to program them) before they are introduced to FPGAs. Often this next step is taken out of necessity. The realization hits that your trusted microcontroller cannot effectively solve the problem at hand, and a little research leads to the wonderful world of FPGAs.
However, this world can seem significantly less wonderful when the project grinds to a halt, stalled until you learn a different toolset, different language and even an altogether different programming paradigm. While embedded systems experience is helpful, even an MCU expert can run into a steep learning curve if never before exposed to FPGAs.
Is there anything that can soften the blow?
Yes. Using what is called a soft microprocessor core, one can create a microcontroller within the FPGA and take advantage of traditional embedded system friendly tools and languages such as C. With a soft processor core such as the MicroBlaze from Xilinx, MCU users can gain appreciation of the power of FPGAs without relying solely on hardware definition languages (HDL). Useful right? However it’s only a small part of the utility of MicroBlaze. The real power lies not only in the ability of the user to use familiar tools and languages, but in how this allows one to work within this familiar environment while having access to FPGA fabric through the microcontroller. This allows for certain advantages, such as the flexibility of peripherals through custom IP cores that the rigidity of a traditional microcontroller architecture limits. Users can design their own IPs, or choose from the vast array of peripheral IPs provided by Xilinx and third parties, to create highly customized and flexible designs.
“The real power of the MicroBlaze lies in having access to FPGA fabric through the microcontroller.”
Digilent Pmod IP cores are an example of third party IPs ready to be leveraged by designers. Over 20 of our most popular Pmods now have dedicated IP cores and more are being added regularly. As with traditional microcontrollers, half the battle of designing with the MicroBlaze is setting up proper communication with peripherals. With the ready to use Pmod IP cores, the time required to add a Pmod to your design can drop from hours of additional work to minutes. Below is a closeup of a MicroBlaze design incorporating five Pmods.
So what is needed to actually design a system like this? There is more than one tool available in creating MicroBlaze designs, depending on which series Xilinx FPGA is being programmed. If you follow Digilent’s tutorial, Using Pmod IPs, you will be guided through implementing Digilent’s Pmod interfaces in a MicroBlaze or Zynq design in Vivado. Therefore, a Digilent 7-series FPGA or Zybo (Zynq) board is required. In addition to Vivado 2015.X or 2016.X, Xilinx SDK is also used.
Once set up with the appropriate hardware, software and board support files (which are provided), it’s less than ten steps to create a design and add a Pmod. The steps can be summarized as follows:
- Install board files
- Add repo
- Create block design
- Add MicroBlaze
- Click and drag DDR memory
- Choose which connector and which Pmod
- Run connection automation
- Send to SDK
From within SDK, the user can then access all C libraries and example code in the board support package. For the full step-by-step tutorial, visit the Digilent wiki. To see which Pmods currently have dedicated IP cores, visit your Pmod of interest’s wiki page or go to the Digilent GitHub under vivado-library/ip/Pmods. Check back often as we are actively adding more to the list!
One Comment on “Introduction to Pmod IP Cores”