On 04/10/16 13:09, Brian Drummond wrote:
On Tue, 2016-10-04 at 05:49 +0200, Tristan Gingold wrote:
On 03/10/16 22:33, why...@f-cpu.org wrote:


Why ?  Instead of translating the AST to mcode, you can write a pass
that transform it into a netlist.  That was always on my TODO list,
I
just have to find the time to do it.

Tristan.

How would one go about it?

It seems to me that the "ortho" language would be a good place to start
- looks like it can already be read and written independently of the
backend, and its reader is relatively simple - how does this relate to
the AST?

Code in Translate packages compiles the AST to mcode, but that's really for simulation, not synthesis.

Is it actually a representation of the AST or has it already been
linearised by a tree walker?

I would say none of that.  Each node of the AST is read to generate code.

Would it nevertheless be a possible place to start, or would it be
better to go further back, and if so, where in the source?

(I'm guessing, that would be the input to "translate")

Yes, synthesis should start with the input of translate.
For a point in the code, see Compile_Elab in ghdlrun.adb

Tristan.


_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to