Documente Academic
Documente Profesional
Documente Cultură
Many FPGA
applications can
benefit from using a
simple soft-core processor
to ease the generation of
sequential control structure.
T
he PicoBlaze is a com- ple 8-bit microcontroller that is based WHY USE PICOBLAZE?
pact 8-bit soft-core mi- around a RISC architecture (see Figure FPGA applications usually require a
crocontroller that FPGA 1). The controller has a 12-bit address combination of parallel and sequential
engineers instantiate with- port, which means it can address as operations, with data flow being pre-
in their selected Xilinx many as 4,096 memory locations. Each dominantly parallel and control struc-
FPGA. Once implemented, this core is address location contains an 18-bit in- tures predominantly implemented as
completely contained within the FPGA struction that defines the operation the sequential structures, for example state
fabric using only logic slices and Block core must perform. Inputs and outputs machines (see Xcell Journal issue 81,
RAMs; it requires no external volatile or to and from the core are possible via two How to Implement State Machines in
nonvolatile memory. 8-bit ports (one input, one output). The Your FPGA). However, complex con-
Thanks to its small implementation controller also provides an 8-bit identi- trol structures if implemented as a state
footprint, it is possible for an FPGA to fication port, allowing for up to 256 pe- machine can become unwieldy, increas-
contain multiple PicoBlaze instantia- ripherals to be read from or written to. ing the verification time and making
tions, with each instantiation used to There is also a size-selectable scratch- modifications later in the development
implement control structures typically pad that can be 64, 128 or 256 bytes. As cycle more difficult. Complicated state
created by state machines. The result with all micros, PicoBlaze contains an machines also take more time to devel-
is a reduction in the development time arithmetic logic unit and support for op and if several are required, this time
along with a standardized approach to one interrupt. These capabilities mean can be considerable.
control structure generation. Thanks to the controller offers many advantages You can also use PicoBlaze for seri-
the underlying high performance of the to the FPGA design engineer. al communication control over RS232,
Xilinx FPGA fabric, PicoBlaze instantia- One of the most important aspects I2C and SPI. In fact, anything that you
tions are often capable of outperforming of PicoBlaze is its highly determinis- would use a typical 8-bit micro for can
many discrete 8-bit microcontrollers. tic nature, which means all instruc- be implemented within a PicoBlaze,
Lets take a look at how we can best uti- tions require two clock cycles for ex- with the upside of higher performance.
lize this handy device within our designs. ecution and interrupts are serviced Engineers have used PicoBlaze to im-
with four clock cycles maximum. plement PID controllers in control sys-
PICOBLAZE ARCHITECTURE (You can find more detailed infor- tems. They have used it with I2C, SPI or
Before we can use the core, it is first a mation on the PicoBlaze architec- parallel DACs to create reference wave-
good idea to understand a little about ture within the Xilinx user guide that forms that range from simple square,
its architecture. PicoBlaze is a very sim- comes with your download.) sawtooth and triangular to more com-
Program
Memory
Instruction[18]
ALU Flags Decode and Control
Generated by KCPSM6.exe
Contained within KCPSM6.Vhd
<Your Program>.Vhd
Figure 1 PicoBlaze architecture, with processor in left box and memory at right
Enable Enable
Instruction Address Address Data
Rdl
Input Output
FPGA Fabric IP Port
Port
FPGA Fabric OP
Port ID
From FPGA
CLK Tree CLK
RS
Interrupt Interrupt Ack
Sleep