google / grumpy

Grumpy is a Python to Go source code transcompiler and runtime.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pythonparser for FPGA

joeblew99 opened this issue · comments

Its just a co-incidence but i have been working on FPGA stuff the last week.
Am trying out code generating from golang --> fpga.

I noticed your using m-labs Python parser ( https://github.com/m-labs/pythonparser ) , which was originally developed for python <--> FPGA (verilog, and others) code gen and synthesis. So this means that grumpy is parsing the python to AST, and then codegens the golang right ?
What do you think about the viability of codegen the opposite direction?
golang --> python --> FPGA

BTW there is another framework that does this and the code is alarmingly similar to golang.
http://cx-lang.org/

golang --> python --> FPGA is certainly doable, but Grumpy's (and pythonparser's) implementation is very tied to Python being the source language, so it'd offer no help going the other direction.

i was thinking of back porting the Migen python code to golang using grumpy.
This would take python out of the loop.
Then its golang --> verilog.

https://github.com/m-labs/migen
https://sourcegraph.com/github.com/m-labs/migen@master/-/blob/migen/__init__.py#L8:14

The FHDL is the key.