141 points · by ksec · 3y ago · 36 comments
https://github.com/antonblanchard/microwatt/tree/master/test...
Also, how many transistors does this equate to? Because IIRC PowerPC is quite an extensive instruction set, and some instructions are quite involved
Using the tools specific for each FPGA vendor, e.g. AMD (i.e. Xilinx), Altera (to be spun off soon by Intel), Lattice or Microchip, the HDL code can be synthesized into logic gates, then placed and routed, then the bit string with the corresponding configuration can be loaded into an FPGA.
If in the same FPGA one also implements a memory controller and peripheral interfaces, it can be used instead of a standard CPU.
The disadvantage is a low clock frequency, typically of a few hundred MHz, and high power consumption in comparison with a standard CPU with the same performance.
The advantage is that you can be certain that the CPU does only what you want, with no hidden functions or backdoors, and that you can customize it in ways that are not possible with standard CPUs, e.g. by adding instructions or accelerator blocks for performing some tasks that are done inefficiently in software or for interfacing with certain hardware devices that have real-time requirements that are difficult to achieve in a non-deterministic standard CPU.
Microwatt fits in a Lattice ECP5 FPGA with 85,000 LUTs (plus some block ram). Not sure how you'd get to transistors from that, wild guess times by 15 maybe? (But then the FPGA also has other special hardware blocks intended for interfacing with DDR RAM and other things, so those would be more as well).
You can see how the Power instruction decode is implemented https://github.com/antonblanchard/microwatt/blob/master/deco...
It's also an unwise search term on the web. Ask me how I know!
The big thing that complicates figuring out a transistor count for a soft CPU core is that FPGAs have hardware multipliers, which would be pretty big if you had to build them yourself.
Technically it's a core that's supplied as RTL (code). There's nothing stopping you using it in custom silicon instead of on an FPGA. Whereas a "hard IP" core is already compiled down to a specific technology and can only be used there. It's possible for a hard macro to be for an FPGA, but it would be for a specific product line. A "hard macro" for custom silicon would be specific to a particular fab process.
Of course, this is all very approximate.
There goes "tiny"...
There are big FPGAs that cost many thousands of $.
Medium-size FPGAs, which may cost a few hundreds of $, have a few hundred thousand LUTs.
An evaluation board for the medium-to-small ECP5 FPGA is $100.
I'm not sure that's quite true?
https://github.com/antonblanchard/microwatt/blob/master/fpu....
I presume v.state := ... is what the FPU will do next, like a deferred goto. you can unroll the whole process following that.
lookup table: https://github.com/antonblanchard/microwatt/blob/master/fpu....
I have first-hand experience porting https://phoenix-rtos.com/ to PowerPC back in the early 2000s and it's a very sane CPU arch (in comparison to x86). However, it's evident that POWER lags behind x86, ARM, and now RISC-V, both in terms of use and public attention.
Anything is sane compared to current x86. Each generation is an added layer of complication on top of the previous one and it's been going on since the late 70's.
If anything x86 is a proof that evolution works better in market adoption than nuking everything, specially when not every company cares about the bazaar, only their cathedrals.
You'd lose. There were two platforms who made that jump, but the architectures have no lineage in common at all.
Be a little patient. A bunch of very high performance application cores are hitting the market next year.
Sure judgement can be delayed till then.