circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 142 May2002
Design Your Own Microprocessor

 


by Jim Turley

PROCESSOR FACTORY

Although building your own foundry is out of reach for most engineers (it costs more than $1 billion just to upgrade an existing chip plant), it’s easy to make a few of your own processors using low-cost FPGAs. Altera and Xilinx both encourage this behavior for the obvious reasons. In fact, both companies have entered the business of supplying soft processor core designs to encourage engineers to use more FPGA chips. Altera’s Nios (see Figure 1) and Xilinx’s MicroBlaze (see Figure 2) are both free but only work, of course, in the parent company’s chips.

Figure 1—NIOS is a 16-bit processor Altera designed specifically to work in its own FPGA devices.

 

Why put a processor in an FPGA? Why not buy a real microprocessor chip and solder it down? If you’re going to use an FPGA for random logic anyway, you can eliminate the extra chip by putting the processor in the FPGA, as well. You also could experiment with different processors in your FPGA, evaluating various ones until you find the right balance of performance, size, cost, and power consumption.

Figure 2—Xilinx’s MicroBlaze, like NIOS, is an FPGA-only processor that resides in the "soft logic" of an FPGA.

 

The most interesting prospect, of course, is modifying the processor to suit your own whims. Or, dare I say, even designing your own processor from scratch (the first CPYou)? Well, you can, and there are some good reasons why you would (or would not) want to try this at home.

A ONE-MAN SHOW

For most engineers, designing your own processor architecture is a cool idea but not a practical one. A custom CPU has zero software support—no tools, no compiler, no debugger, and no one to turn to when bugs crop up. You’re on your own.

Using an existing CPU, on the other hand, makes a lot of sense even if you’re going to embed it into an FPGA or high-volume ASIC. In fact, according to Dataquest, the business of embedding CPUs into other chips is growing at about 25% per year and stood at about $20 billion in 2000. That’s no small potatoes. The average is 2.3 processors per intelligent ASIC (those with any programmability) and rising.

There’s no shortage of processors to choose from, either. From little-known 8-bit processors created as university research projects to popular 16- and 32-bit processors like the ’286, SPARC, ARM, or MIPS, the market is ready and willing to supply you with microprocessor intellectual property (IP). Some are free (and worth every penny), while others might cost you as much as a new Mercedes.

One high-end free core is LEON-1, a SPARC clone distributed by the European Space Agency. This is a real SPARC processor, created with Sun’s blessing, but without floating point capability or anywhere near the performance of Sun’s current processors. Still, SPARC has good software tools (available for free) and a certain amount of appeal and prestige. LEON-1 is provided with VHDL source code (you supply the hardware compiler) and runs at 20 to 40 MHz in Xilinx or Altera FPGAs. At that speed, it would probably take you a week to boot Solaris.

At the low end (and also in the free category), are 8-bit processor designs from CMOSexod and Free-IP cores. Both designs have little 8-bit processors you’ve never heard of but come with free tools to get you started. The Free-IP Project also has a 6502 core, in case you’ve been hankering to resurrect your old Apple II. VAutomation also sells its 8-bit V8 processor with free tools. For your money, VAutomation gives you real technical support and the warm fuzzy feeling that their processor really works. They even use the V8 in some of their own products. The company also has a 6502 as well as Z80, 8086, and ’186 cores. Now that Intel and AMD are both out of the embedded ’x86 business, soft cores like VAutomation’s may be your only way to get low-end ’x86 processors.