Intro

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.

ArchitectOverview

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?

    Cheers,
    Jun

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

Leave a comment