Monday, February 16, 2026

Apple-1 on FPGA

 I started with electronics in 1979 at age of 14. And am doing it ever since. One chip I really wanted to use was MC6809. I was even able to buy it on the black market. But I have never worked with it. But look what I did see today:

I see the welcome screen of Replica-1 compatible computer running on MC6809 compatible IP Core. My first ever greeting from 6809! Makes me smile.

HOW? Easy, I did take the existing Replica-1 repo at github here and then adapted it for the FPGA board on my table. What was on my table? It was AXE5-Falcon PCB with serial number #0. There is some info about AXE5-Falcon here.

I spent about two hours to get it to work. Why so long? Because the usual suspect UART RXD and TXD. They are swapped at the level shifter. So I did not notice that at first, so I swapped RXD/TXD several times with no luck. And then I realized that the FTDI UART pins at FPGA are in 1.8V bank, I had selected 3.3! That was the mistake and real reason for two hours debug session.

So now it works.

But I have no idea what I can do with it :) there should be possible to enable ROM BASIC, I so assume. And with PMOD SD card adapter it could even access SD cards?

Well, it works :) so I can ask the author what I can do with it.

It it is named as Replica-1, but Replica-1 is replica of Apple-1 home computer. So I have a Apple-1 on my desk.

UPDATE: by changing two lines of code the processor is changed to 6502 and ROM to Basic+monitor, with a magic:

E000R

The Basic starts, and it is possible to enter and execute Basic programs.

How big is it? On the AXE5-Falcon board, the logic utilization is less than 1%. For 48Kbyte RAM and 8KB Basic ROM, the block RAM utilization is below 8%. So I could instantiate 10 Apple-1 computers in a single FPGA!

What about really small FPGA? Trying out special version for MAX1000 with 10M08 FPGA. And here is an adventure game starting:

Note for UART downloading, you need to use teraterm (and not putty) and set line end delay to 7ms then the download works.





Tuesday, February 3, 2026

FPGA Power Consumption

"Please give me  FPGA power consumption at maximum load"! This is not such an uncommon question. This is what FPGA SoM vendors hear all the time.

Answer? The direct answer is: cannot tell.

FPGA is a very complicated device that can burn a very different amount of power depending on the loaded design. Most FPGA's can be converted to an HEATER that generates lots of heat and burns lots of energy. So the "maximum load" does not make sense, maximum loaded FPGA makes no sense, except being a heater.

The good thing is that with a somewhat reasonable design, the FPGA consumes a reasonable amount of energy. How much? To answer this question, pretty much all FPGA vendors provide power estimator tools in some form. Some versions are Excel worksheets, some are power calculator apps. In both cases they provide an estimation how much power will be used. Important is to notice that the power consumption depends on the FPGA Die temperature. At higher temperatures, the idle current increases a lot. So it may be good to play with the temperature settings in the power estimator tool. The tool may have different names, be it XPE, PDM or PTC or something else.

So if you need to know how much current you must be ready to deliver to the FPGA SoM, run the power estimator first, then calculate the power losses in the onboard DCDC regulators, and you get some indication of how much current is needed.

Ballbark numbers? (For FPGA SoM's):

If you have a small FPGA (say 50KLE) running a soft processor core at 100MHz and some low-speed peripherals, chances are that you consume less than 1W total.

AMD Zynq-7 based SoM with small FPGA fabric and low load on the FPGA? Calculate with a minimum of 3W.

AMD MPSoC based SoM with small FPGA fabric and low load on the FPGA? Calculate with a minimum of 5W.

SoM power consumption depends on the FPGA power and power losses in the DCDC regulators. While DCDC regulators have decent efficiency, it is peaking usually at 75% of the max load. The power losses at low currents can be rather big. So, for example AXE5000 board consumes about 1.7W doing nothing, whereas Altera PTC tool says that the FPGA consumes 0.67W, so about 1W must be power losses. AXE5000 uses 5x times TDK's FS1606 DCDC converters that can deliver each up to 6A, those DCDC are not optimized for low loads and consume about 200mW each at very light loads. So there is no mystery where the power goes.

So you always need to calculate FPGA power consumption and DCDC power losses.