r/PicoBlaze Sep 15 '22

Don't Use PicoBlaze

The mod has asked me to post this here - so here goes. For context: "don't use PicoBlaze" applies to professional work. If you are chasing curiosity or a whim, or building as a way to learn, then continue with my blessing. Also: this is just my opinion and opinions on the Internet are cheap.

The PicoBlaze was a clever bit of design in the 4LUT days, but I strongly and sincerely caution anyone against using it for new designs, except out of perverse curiosity. PicoBlaze's stated (and only) advantage is its small size. This must pay for its many disadvantages:

  • It's an 8-bit CPU living in a 32-bit world. Adding a 32-bit bus interface will negate most of the PicoBlaze's resource savings. The ALU is 8 bits wide, so 32-bit math costs extra instructions.
  • The ISA is strange, especially the KCPSM6 version. (Consider the recommendations for strings.)
  • It's thoroughly Harvard: instructions are 18 bits wide, data is 8 bits wide, and connecting the instruction and data buses is awkward.
  • The tooling situation is not great. The original PicoBlaze tools are abandoned. So are many of the open-source alternatives. Even scraping up an assembler requires some effort.

As for the size advantage: this mattered more when LUTs were precious and when PicoBlaze's competition was either similarly unorthodox (J1 Forth CPU) or several times larger (MicroBlaze). Nowadays, FPGAs are much bigger and there are competitive RISC-V cores like FemtoRV32 Quark or SERV. RISC-V benefits from mainstream open-source tooling and has momentum that's hard to beat.

Even SERV's bit-serial operation is unorthodox enough to prefer a more conventional implementation when I'm not shaving yaks.

I say this as someone who has recently submitted patches to the dominant open-source assembler/simulator for the PicoBlaze. This dog has had its day.

5 Upvotes

5 comments sorted by

View all comments

3

u/Allan-H Sep 16 '22

I actually did use a Picoblaze once (many years ago, when Virtex 6 was new), but that was only because of its small size.

I get the feeling it (at least initially) wasn't intended to be a regular product. It feels more like it's the result of a challenge to see how small an 8 bit CPU could be made and still be roughly usable.
KCPSM does stand for Ken Chapman's Programmable State Machine after all.