FPGA Python is an open-source experiment that executes a limited subset of CPython bytecode directly in FPGA logic. CPython 3.14.4 compiles a function on the host; its bytecode is preserved and sent over UART, while the FPGA handles instruction decoding, a stack, integer arithmetic, and function frames. The host supplies arguments and transports the result but does not calculate it. The native core currently performs addition on signed 32-bit integers and supports calls between up to four bundled functions, with at most four active frames. It preserves CPython’s inline cache bytes and pins the interpreter version because bytecode details can change. A separate, earlier custom virtual machine supports features such as assignments, comparisons, and loops, but those capabilities are not part of the native CPython core.
The project reports 88 tests across software, RTL, image validation, and UART integration. Physical-hardware checks confirmed addition for 37 argument pairs from one upload and function calls for 26 pairs, including nested calls and fault recovery. These results demonstrate the supported operations, not a speed advantage: upload, communication, execution, and host overhead have not been benchmarked separately. Broader Python compatibility requires much more than adding opcodes, including arbitrary-precision numbers, object behavior, exceptions, imports, and runtime interfaces; native extensions used by libraries such as Pydantic are also unsupported. A compatibility checklist covers all 238 named opcode entries in the pinned interpreter’s inventories. The project can be explored through simulation or a software reference VM and is released under the MIT license.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.