Running a very small subset of python on an FPGA is possible with pyCPU.

The Python Hardware Processsor (pyCPU)  is a implementation of a Hardware CPU in Myhdl. The CPU can directly execute something very similar to python bytecode (but only a very restricted instruction set). The Programcode for the CPU can therefore be written directly in python (very restricted parts of python). This code is then converted to this restricted python bytecode. Since the hardware description is also in python, the slightly modified bytecode is then automatically loaded into the CPU design.

Most “bytecode” instructions are executed in the Hardware CPU with one instruction per cycle. If you have enought hardware available you can simply instantiate more cores on an FPGA with different Programmcode to make them run in parallel.


Due to the python nature of Myhdl and the Python Hardware Processor written with it, it
allows you, to write a programm for the processor, to simulate the Hardware processor
and to convert the processor to a valid hardware description (VHDL or Verilog) inside
a single python environment.

  1. This is a very unique project. The advantages this approach offers makes it interesting.
    Would it be possible to develop the python code of this interactively?
    And how steep is the learning curve?


  2. Thanks for the info, i’am still learning python progamming right now!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s