Machines Constructed for Running Python Code (Not Referring to Snakes)
Introducing PyXL, a new initiative in the realm of microcontrollers, aimed at executing Python code directly in hardware for unprecedented speed. Unlike conventional microcontrollers that rely on software interpreters or just-in-time (JIT) compilers for Python execution, PyXL utilizes a custom toolchain to compile Python code into a custom assembly and execute it in silicon [1][2][3].
Currently, PyXL exists as logic running on a Zynq-7000 FPGA on an Arty-Z7-20 development board. However, the long-term goal is to produce a chip-based version of PyXL [1][2]. For the time being, an ARM CPU assists in setup and memory tasks, with the Python code itself being executed entirely in dedicated hardware.
The primary emphasis of PyXL is speed. In a comparison test measuring GPIO round-trip latency, PyXL achieved a response time of 480 nanoseconds at 100 MHz, substantially faster than MicroPython's 15,000 nanoseconds at 168 MHz on a PyBoard [1][2]. This implies that PyXL is approximately 30 times faster than MicroPython based on raw performance, or 50 times faster when normalized for clock speed differences [1][2].
In the embedded world, Python has been employed in various contexts. PyXL, however, represents an innovative advance, offering both speed and predictable timing, making it suitable for applications that demand these characteristics [2].
[1] https://www.pyxl.ai/[2] https://www.rtbridges.com/articles/pyxl-runs-python-on-hardware-with-up-to-50x-faster-performance/[3] https://hackaday.com/2022/01/05/pyxl-runs-python-directly-on-a-custom-fpga/
PyXL's novel approach of compiling Python code into a custom assembly and executing it in silicon, using an FPGA, sets it apart from traditional microcontroller technology. In the future, the ambition is to create a chip-based version of PyXL, further enhancing its speed and making it an attractive choice for applications requiring both rapid response times and predictable timings.