FPGA and Soft Micro

Started by Mukund Deshmukh November 4, 2006
Hi,
Last few days I have spent on learning about CPLD and FPGA. It appears that
prices of these devices are coming down. I have also found that 8 bit (pico
blaze) and 32 bit (micro blaze) micro controller are also being implemented
on FPGA.
However I was wondering about the performance of these soft micro compared
with real micro.
Any one with any experience on the list?
Warm Regards,
Mukund Deshmukh,
Beta Computronics Pvt Ltd,
10/1 IT Park, Nagpur.
Cell 9422113746

An Engineer's Guide to the LPC2100 Series

--- In l..., Mukund Deshmukh wrote:

> Last few days I have spent on learning about CPLD and FPGA. ...
> However I was wondering about the performance of these soft micro
compared
> with real micro.

I am not an expert on FPGA, but it seems to me that the power
dissipation is the main difference - the FPGAs seem to require a lot
more power. I think they run a little slower, also (probably not much
slower).

An FPGA is also more expensive and harder to use if you have to supply
external flash to hold it's logic definitions.

However, the increased power dissipation and external memory have to
be weighed against the possibility to integrate more of your logic
into the FPGA, so it might be a wise choice in some cases.

My guess is that it makes the most sense for high quantities of end
products. Anything less than 10,000 boards would probably not be cost
effective, and the key quantity where it becomes cost effective
depends on how much extra logic you can integrate.

Eric
----- Original Message -----
From: "Mukund Deshmukh"
To:
Sent: Saturday, November 04, 2006 4:48 AM
Subject: [lpc2000] FPGA and Soft Micro
> Hi,
> Last few days I have spent on learning about CPLD and FPGA. It appears
> that
> prices of these devices are coming down. I have also found that 8 bit
> (pico
> blaze) and 32 bit (micro blaze) micro controller are also being
> implemented
> on FPGA.
> However I was wondering about the performance of these soft micro compared
> with real micro.
> Any one with any experience on the list?

I've played with a few of them, implemented on a Digilent/Xilinx Spartan 3
kit (starting at $99). Performance can be much better than 'real' chips in
that clock speeds of 30 MHz or more can be achieved. It isn't really worth
using an FPGA to replace a conventional MCU unless you already have one in
your system, or you want to implement some form of parallel processing, as
expensive multi-layer boards are advisable, and they take a lot of power.

Leon
--
Leon Heller, G1HSM
Suzuki SV1000S motorcycle
l...@bulldoghome.com
http://webspace.webring.com/people/jl/leon_heller/
I'm doing a softcore CPU in a Lattice XO FPGA right now. I am using PacoBlaze, which is a pure verilog form of PicoBlaze that runs on any FPGA. These small 8 bit CPUs are very fast, easily up to 100MIPS. But these are very small processors limited to about 1024 instructions. However you can use more than one in a core. Pico takes about 300 LUTs. Even in a small FPGA you could have 10 of these. Parallel processing all you want. I'm also using an I2C soft core.

There's not much of a limit on soft core CPUs today. You can get anything you want from 8 bit tiny CPUs like Pico, 8051, Z80, AVR, to 32 bit CPUs and even MIPs processors. Just about anything.

Embedded soft core functions in FPGAs is very hot now. However, adding functions to spare space in an existing FPGA already being used is where the cost savings come from. Buying an FPGA just to have a soft core is no savings at all. It makes no sense to buy a $10 FPGA to put just a CPU in it when you can buy a better 32 bit LPC for $3. But if you have spare space left over in an FPGA, and you need a bit of "smart" processing, soft cores are ideal and then you get the CPU for free

Lots of public code for free. Try opencores.org.

Chris.

----- Original Message -----
From: Mukund Deshmukh
To: l...
Sent: Friday, November 03, 2006 8:48 PM
Subject: [lpc2000] FPGA and Soft Micro
Hi,
Last few days I have spent on learning about CPLD and FPGA. It appears that
prices of these devices are coming down. I have also found that 8 bit (pico
blaze) and 32 bit (micro blaze) micro controller are also being implemented
on FPGA.
However I was wondering about the performance of these soft micro compared
with real micro.
Any one with any experience on the list?

Warm Regards,
Mukund Deshmukh,
Beta Computronics Pvt Ltd,
10/1 IT Park, Nagpur.
Cell 9422113746
> I'm doing a softcore CPU in a Lattice XO FPGA right now. I am using
PacoBlaze, which is a pure verilog form of PicoBlaze that runs on any FPGA.
These small 8 bit CPUs are very fast, easily up to 100MIPS. But these are
very small processors limited to about 1024 instructions. However you can
use more than one in a core. Pico takes about 300 LUTs. Even in a small
FPGA you could have 10 of these. Parallel processing all you want. I'm
also using an I2C soft core.
>
> There's not much of a limit on soft core CPUs today. You can get anything
you want from 8 bit tiny CPUs like Pico, 8051, Z80, AVR, to 32 bit CPUs and
even MIPs processors. Just about anything.
>
> Embedded soft core functions in FPGAs is very hot now. However, adding
functions to spare space in an existing FPGA already being used is where the
cost savings come from. Buying an FPGA just to have a soft core is no
savings at all. It makes no sense to buy a $10 FPGA to put just a CPU in it
when you can buy a better 32 bit LPC for $3. But if you have spare space
left over in an FPGA, and you need a bit of "smart" processing, soft cores
are ideal and then you get the CPU for free
>

Thanks a lot for reply.
Does that mean that parting line between Hard CPU and Soft CPU blurring?
Who is going to win FPGA or Hard Micro?

Warm Regards,

Mukund Deshmukh,
Beta Computronics Pvt Ltd,
10/1 IT Park, Nagpur.
Cell 9422113746
To some extent yes. If you have to put an FPGA in a design, and then need a CPU also, that is the time to look at soft core CPUs. I was planning on using an ARM7 part with an FPGA and then realized I could do the whole thing in one chip. Cheaper and far less PCB space. In fact with the Lattice XO part I could do it with a single sided PCB because it is single supply. Easy routing. The cost difference between 4 layer and double sided paid for the FPGA ($6) entirely.

There will always be a need for both hard CPUs and soft core. If you need a lot of heavy CPU functions than a hard CPU may be best. Every design is different and each has pros and cons. Both are needed. But you will probably see more soft core CPUs utilized when an FPGA is already present. In other designs I have no FPGA and a single MCU is the obvious low cost answer. Buying FPGAs just to build a single CPU or digital filter will never be cheaper. I use to have reps try to talk me into buying a $30 FPGA just to do digital filtering that I could do with a $7 DSP. The deticated chip is cheaper.

Soft cores simply give you the option of using the extra LUTs in an existing FPGA for more tasks. When you can do that you save money and space. The trick is getting the most out of your FPGA and soft cores offer a new level of utilization beyond simple glue logic. Also, FPGAs provide one of the lowest cost solutions for small amounts of very high speed dual port SRAM. Next year more will include spare flash space for the user. Very soon you will be able to implement a very complex collection of capabilities all within a single FPGA chip for very low cost. No external regulators, no external osc, no external flash/eeprom, no external sram, no external bus engines, no external mcu. All done 100% inside the FPGA. Truely a single chip solution.

Chris.

----- Original Message -----
From: Mukund Deshmukh
To: l...
Sent: Saturday, November 04, 2006 12:51 AM
Subject: Re: [lpc2000] FPGA and Soft Micro
> I'm doing a softcore CPU in a Lattice XO FPGA right now. I am using
PacoBlaze, which is a pure verilog form of PicoBlaze that runs on any FPGA.
These small 8 bit CPUs are very fast, easily up to 100MIPS. But these are
very small processors limited to about 1024 instructions. However you can
use more than one in a core. Pico takes about 300 LUTs. Even in a small
FPGA you could have 10 of these. Parallel processing all you want. I'm
also using an I2C soft core.
>
> There's not much of a limit on soft core CPUs today. You can get anything
you want from 8 bit tiny CPUs like Pico, 8051, Z80, AVR, to 32 bit CPUs and
even MIPs processors. Just about anything.
>
> Embedded soft core functions in FPGAs is very hot now. However, adding
functions to spare space in an existing FPGA already being used is where the
cost savings come from. Buying an FPGA just to have a soft core is no
savings at all. It makes no sense to buy a $10 FPGA to put just a CPU in it
when you can buy a better 32 bit LPC for $3. But if you have spare space
left over in an FPGA, and you need a bit of "smart" processing, soft cores
are ideal and then you get the CPU for free
>

Thanks a lot for reply.
Does that mean that parting line between Hard CPU and Soft CPU blurring?
Who is going to win FPGA or Hard Micro?

Warm Regards,

Mukund Deshmukh,
Beta Computronics Pvt Ltd,
10/1 IT Park, Nagpur.
Cell 9422113746
The Parallax Propellor is based on an Altera FPGA that has been turned into
a hard-wired chip by Altera:

http://www.parallax.com/propeller/index.asp

Leon
--
Leon Heller, G1HSM
Suzuki SV1000S motorcycle
l...@bulldoghome.com
http://webspace.webring.com/people/jl/leon_heller/
On Sat, 04 Nov 2006 07:08:48 -0000, you wrote:

>--- In l..., Mukund Deshmukh wrote:
>
>> Last few days I have spent on learning about CPLD and FPGA. ...
>> However I was wondering about the performance of these soft micro
>compared
>> with real micro.
>
>I am not an expert on FPGA, but it seems to me that the power
>dissipation is the main difference - the FPGAs seem to require a lot
>more power. I think they run a little slower, also (probably not much
>slower).
>
>An FPGA is also more expensive and harder to use if you have to supply
>external flash to hold it's logic definitions.
>
>However, the increased power dissipation and external memory have to
>be weighed against the possibility to integrate more of your logic
>into the FPGA, so it might be a wise choice in some cases.
>
>My guess is that it makes the most sense for high quantities of end
>products. Anything less than 10,000 boards would probably not be cost
>effective, and the key quantity where it becomes cost effective
>depends on how much extra logic you can integrate.
>
>Eric

There are generally 2 reasons for moving from an MCU to an FPGA - raw speed, and parallelism - an
FOGA can have lots of completely independent logic doing things simultaneously, whearas a MCU can
only ever approximate simultaneous processing with time-slicing of various kinds.

Once you find you need an FPGA, then embedding a micro in it can be worthwhile if the space is
otherwise unused, or the tight coupling to the FPGA logic is required.
Something designed for a specific task will usually outperform a general
purpose device in both cost and efficiency, so I would suggest that the
Hard CPU isn't going away any time soon. This was highlighted very well
when a Pentium 4 at some GHz clock speed with stacks of memory was set
up against the electromechanical WWII era Colossus to crack the enigma
codes. The Colossus won hands down, despite its own operational speed
being rated at no more than 200kHz equivalent. Similarly FPGA's are a
long way yet from meeting the power/cost/performance advantage enjoyed
by microcontrollers, even though they themselves are a general purpose
design.

Al

Mukund Deshmukh wrote:

> > I'm doing a softcore CPU in a Lattice XO FPGA right now. I am using
> PacoBlaze, which is a pure verilog form of PicoBlaze that runs on any
> FPGA.
> These small 8 bit CPUs are very fast, easily up to 100MIPS. But these are
> very small processors limited to about 1024 instructions. However you can
> use more than one in a core. Pico takes about 300 LUTs. Even in a small
> FPGA you could have 10 of these. Parallel processing all you want. I'm
> also using an I2C soft core.
> >
> > There's not much of a limit on soft core CPUs today. You can get
> anything
> you want from 8 bit tiny CPUs like Pico, 8051, Z80, AVR, to 32 bit
> CPUs and
> even MIPs processors. Just about anything.
> >
> > Embedded soft core functions in FPGAs is very hot now. However, adding
> functions to spare space in an existing FPGA already being used is
> where the
> cost savings come from. Buying an FPGA just to have a soft core is no
> savings at all. It makes no sense to buy a $10 FPGA to put just a CPU
> in it
> when you can buy a better 32 bit LPC for $3. But if you have spare space
> left over in an FPGA, and you need a bit of "smart" processing, soft cores
> are ideal and then you get the CPU for free
> > Thanks a lot for reply.
> Does that mean that parting line between Hard CPU and Soft CPU blurring?
> Who is going to win FPGA or Hard Micro?
>
> Warm Regards,
>
> Mukund Deshmukh,
> Beta Computronics Pvt Ltd,
> 10/1 IT Park, Nagpur.
> Cell 9422113746
>
>
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 3/11/2006
>
>
A couple of years ago, I implemented the Z80 CPU in a Xilinx FPGA (T80
core from opencores.org).

With a little effort, I added and IDE interface for 2 Compact Flash
devices, brought up the CP/M 2.2 operating system, added a PS/2
keyboard and a 25x80 text display. All with one FPGA plus an external
RAM. A complete pre 1980 computer in a 300k device with a lot of room
for expansion.

Another fun application was designing a large cellular automaton to
solve the IEEE robot maze. There are 256 cells that can
simultaneously update their distance from the target based on the
distances computed by adjacent cells. Worst case solution: 256
iterations (single clock cycle). More probable: 100 cycles - around 2
uS with a 50 MHz clock. The idea was to implement a single chip
solution including sensing and motor control.

I just finished putting together a really nice logic analyzer using
the Spartan 3 Starter Board: http://www.sump.org/projects/analyzer/

I don't view FPGAs as competing with uCs. I suppose there is some
overlap but I think of the FPGA as having a completely different
application space. Somewhere between uCs and ASIC.

And having a volatile program memory is ideal for crypto applications.
Any attempt to reverse engineer the chip results in a complete loss
of the design or more specifically, the current keys.

Richard