On Sat, 2013-12-07 at 12:02 +0100, Svenn Are Bjerkem wrote:

> Isn't ghdl creating gcc code for the simulation, and could this
> generated c-code be linked into a qemu binary to have a simulation
> level of the hardware?

ghdl doesn't generate C code. It generates gimple, (intermediate code)
just like the C, Ada, Fortran and other front ends (stored in memory,
not a file). Then the gcc backend translates that to either .s
(assembler) or .o(object) format; and the assembler and linker can do
with those anything it can with any other .s or .o files.

Which may or may not include linking into a qemu binary; I haven't tried

> I hope to provide testvectors to the VHDL hardware level which
> represent corner cases difficult to reproduce in the lab and to give
> the software developers a reliable development platform.

ghdl also has a minimal "vhpi" interface, allowing calls to C (or indeed
Ada) code, and vice versa, with some fiddling. The .o file (compiled
from VHDL) links with the other components using "ld" in the normal way.

Hope this info helps;

- Brian

Ghdl-discuss mailing list

Reply via email to