Picoblaze
Encyclopedia
PicoBlaze is the designation of a series of three free soft processor cores from Xilinx
Xilinx
Xilinx, Inc. is a supplier of programmable logic devices. It is known for inventing the field programmable gate array and as the first semiconductor company with a fabless manufacturing model....

 for use in their FPGA and CPLD
CPLD
A complex programmable logic device is a programmable logic device with complexity between that of PALs and FPGAs, and architectural features of both. The building block of a CPLD is the macrocell, which contains logic implementing disjunctive normal form expressions and more specialized logic...

 products. They are based on a RISC architecture of 8 bits and can reach speeds up to 100 MIPS on the Virtex 4 FPGA's family. The processors
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 have an 8-bit address and data port for access to a wide range of peripherals. The license of the cores allows their free use, albeit only on Xilinx devices, and they come with development tools
Programming tool
A programming tool or software development tool is a program or application that software developers use to create, debug, maintain, or otherwise support other programs and applications...

. Third party tools are available from Mediatronix and others. Also PacoBlaze, a behavioral and device independent implementation of the cores exists and is released under the BSD License.

The PicoBlaze design was originally named KCPSM which stands for "Constant(K) Coded Programmable State Machine" (formerly "Ken Chapman's PSM"). Ken Chapman was the Xilinx systems designer who devised and implemented the microcontroller.

Instantiation

When instantiating a PicoBlaze microcontroller in VHDL, the respective KCPSM component name must be used. For example, for a PicoBlaze3 processor:

component kcpsm3 is
port (
address : out std_logic_vector(9 downto 0);
instruction : in std_logic_vector(17 downto 0);
port_id : out std_logic_vector(7 downto 0);
write_strobe : out std_logic;
out_port : out std_logic_vector(7 downto 0);
read_strobe : out std_logic;
in_port : in std_logic_vector(7 downto 0);
interrupt : in std_logic;
interrupt_ack : out std_logic;
reset : in std_logic;
clk : in std_logic
);
end component;

Performance

All instructions execute in two clock cycles, making performance of the core instruction set deterministic. Interrupt response is not more than five clock cycles. As a resource optimization, it is possible for two PicoBlaze cores to share the same 1k x 18 instruction PROM, taking advantage of the dual-ported implementation of this block on Xilinx FPGAs.

Architectural notes

Xilinx documents the PicoBlaze as requiring just 96 FPGA slices. The small implementation size is achieved in part through a fairly rigid separation of the instruction sequencing side (program counter, call-return stack, implied stack pointer, and interrupt enable bit) from the execution side (ALU, register file, scratchpad RAM, Z/C status bits). The only information which flows from the compute side to the sequencing side are the zero and carry ALU status bits, when tested by the conditional JUMP and CALL instructions. It is not possible to implement computed jumps or function pointers. The only information which flows from the sequencing side to the execution side are operand fields: destination register (4 bits), ALU opcode (six bits), optional source register (4 bits), optional 8-bit immediate value/port-address, optional 6-bit scratchpad address. There is no mechanism to inspect the value of the stack pointer, the contents of the 31-entry stack, the interrupt enable bit, or the contents of program memory.

The instruction sequencing side does not contain an adder, so relative branches and position independent code are not possible. All jump and call addresses are absolute.

The PicoBlaze is poorly suited to programming in compiled languages such as C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

. In addition to the lack of support for function pointers, there are no instructions or addressing modes to expedite a stack-based calling convention. For PicoBlaze it takes two instructions to implement PUSH or POP and two instructions to implement relative addressing off a software-designated stack pointer. The PicoBlaze is better suited to a hand-optimized register-based calling convention. This does not preclude the use of a Forth-like data stack, and in fact the PicoBlaze is well suited to this approach, if the 64-byte scratchpad memory offers sufficient space.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK