J
John Devereux
Guest
rickman <gnuarm@gmail.com> writes:
It's not always known how much you need, you discover things during
development, rework algorithms, sometimes trade RAM for speed. Customers
want more features.
Hmm, now that really sounds like turning a constraint into a feature!
Yes, if you have a powerful FPGA you could use a less powerful CPU
usually.
--
John Devereux
On 9/8/2013 2:04 PM, John Devereux wrote:
rickman<gnuarm@gmail.com> writes:
On 9/8/2013 4:04 AM, John Devereux wrote:
rickman<gnuarm@gmail.com> writes:
On 9/7/2013 4:24 AM, John Devereux wrote:
rickman<gnuarm@gmail.com> writes:
If your FPGA designs are expensive or power hungry, then you are doing
things you can't do in an MCU or you are not using FPGAs properly.
They don't need to use any more power than an MCU and in many cases
less. They certainly don't need to be significantly more expensive
unless you consider every dollar in your designs. At the very low end
MCUs can be under $1 and still have reasonable performance. For $1
you can't get much in the way of programmable logic. For $3 however,
you can get a chip large enough for a CPU (with math) and room for
your special logic.
I've never used an FPGA, microcontrollers have increased in speed faster
than my needs so far. So I can usually bitbang everything or use a
peripheral. I used PLDs for glue logic back in the day but that's it. Oh
and I bought a small xilinx dev kit which I got to make a led flash then
put in a drawer for 15 years.
So your use of MCUs is based on inertia?
Partly I suppose.
Or I could say that my projects so far all require a microcontroller
anyway, and it seemed likely that a separate FPGA was always going to be
more expensive than, say, choosing a faster CPU.
A STM32F4 can bitbang a PIO at 84MHz. (It can't do anything else then,
but still...)
I think what you are saying is that the MCU is a key part of your
design and you use a lot of code in it.
Yes, basically. "a lot" being only e.g. about 64k probably, not much for
a MCU but would push the price up for an FPGA I think.
Ok, if your emphasis in on using a commercial MCU that will do the
job. But unless your MCU needs are just too large for something that
fits in an FPGA, you have it backwards in my opinion. Why have both
when you can just use an FPGA?
I'm pretty sure that a FPGA with enough RAM would be far too expensive
(compared to the $3 200 MIPS CPU).
I won't pretend that an FPGA is the right solution for every task.
But I think MCUs are often used because that is what the designer is
used to and FPGAs aren't understood well enough to consider. Is
"enough" RAM more than what a given FPGA has? I don't know, how much
RAM do you really need? Most MCU projects I have worked on never had
a realistic RAM estimate, it was all by the seat of the pants.
It's not always known how much you need, you discover things during
development, rework algorithms, sometimes trade RAM for speed. Customers
want more features.
The fact that code uses RAM makes it harder to estimate. FPGAs are a
lot easier to design with in that regard. RAM quantities have to be
known exactly.
Hmm, now that really sounds like turning a constraint into a feature!
LUT counts have to be estimated though, so its not totally different.
A M3 or M4 with attached FPGA + memories would be interesting, if it was
at a reasonable price.
Or even an AVR... are you reading Ulf? I think the requirements for
MCUs are often overstated. Most of the sort of work I do could be
done with an 8051 (ugh!) if one of the higher performance devices
especially, but I often don't have the real estate for a separate MCU
unless I can treat it as an I/O expander.
Yes, if you have a powerful FPGA you could use a less powerful CPU
usually.
NXP have a M4 with attached M0 which sort of goes in that direction; the
M0 does the more deterministic simple stuff, the M4 does the number
crunching and runs the more complicated software.
Hell, I'd be estatic if they provided FPGAs in small enough packages
so I can use a 32 pin QFN for an MCU and the same footprint for an
FPGA. Well, Lattice *does* put an XO2 in a 32 QFN, but only 256 LUTs
which is not big enough for much. Why not 1 or 2 or 4 kLUT? For some
reason FPGA vendors all think you need more I/O and less LUTs.
But could you give an example of your $3 one? Or a favorite?
[...]
You can get the 1 kLUT parts for under $3 and possibly the 4 kLUT
parts. It has been a while since I got a quote. The 1 kLUT part is
big enough for a soft core MCU plus some custom logic.
OK, thanks, will check them out.
I haven't gotten a quote on these parts since they were bought by
Lattice. I'd appreciate a pricing update if you get one. They should
be able to do a lot better than the Digikey price, I know Xilinx and
Altera always do. Heck, the Digikey pricing for most FPGAs doesn't go
above qty 1... if nothing else there should be some quantity price
breaks.
Unfortunately I don't really have a live application, so would only be
able to buy them as "education" at this stage.
I got a freebie eval board for the iCE40 but haven't fired it up. I
want to measure some power consumption numbers. The data sheets
changed the static current a while back, well after they had been out,
just after Lattice bought SiliconBlue so I'm not sure what that was
about. The 1 kLUT part went from around 40 uA to 100 uA quiescent
current. The dynamic current is still very low though, single digit
mA with the device full of 16 bit counters running at 32 MHz. But
they seem to have removed that data when they changed data sheet
formats.
--
John Devereux