Re: [myhdl-list] Further development setup
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2009-04-20 09:59:38
|
Günter Dannoritzer wrote: > When I read the explanation about the compiler package at this page: > > http://docs.python.org/library/compiler.html > > It talks about that the compiler converts the Python code to an abstract > syntax tree and from there creates the Python bytecode. > > Unfortunately I have not understood that process much deeper yet, but if > I recall it right, then the MyHDL converter uses the abstract syntax > tree to create the Verilog or VHDL code from. So the last step, the > Python bytecode is not really needed. > > This makes me think whether it would make sense to take the compiler > package as part of myhdl? At least the part that parses Python code and > create the abstract syntax tree. This would ease the requirement to > change the conversion software in the time line of Python 2.6. Both packages, compiler and ast, generate an abstract syntax tree and support walking through it. None of them is used by the built-in Python compiler. However, ast starts from the same syntax description as the built-in compiler, so it is closer to the real thing. The problem is that these packages have to be adapted whenever the Python syntax changes by extensions (typical in major releases) or fundamental changes (3.0). What will happen with 3.0 is that package compiler simply won't support that Python syntax. Therefore, we have no choice to move to the ast package if we want to stay current. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |