Hi,

> 
>> - verilog interface
> I'd say, you interface to software, not the language it treats.
> so... Find a easily hackable Verilog simulator that you can hack
> and get to work ? :-)
> 

For a verilog simulator, see icarus. If you're referring to the VPI
interface: You'd have to complete the VPI spec :-)
But why would you wanna do that?

>> - vhpi interface that an external source can call a vhdl function. At
>> the moment only a vhdl function can call an external code.
> 
> Well...
> 
> you can hack something like this but the API in GHDL has to handle
> returning
> variable sized elements. It's pretty tricky,
> and I know only the surface that gdb allowed me to uncover.
> It's possible to do some things, like finding out the actual function names
> that have been compiled by GHDL, calling these functions from outside,
> but a) they must be "pure" (not modify signals, globals etc.) b) they
> must process
> simple data types. Tristan may refute this however but you can always
> try and use objdump or something like that.
> 

I would advise against calling VHDL functions from C, again, why should
one do that? The problem is, sooner or later you'll end up doing
asynchronous stuff via threads and that will fail (according to
experiments I made). So when passing on synchronous data between C and
VHDL, just use software FIFOs (like in ghdlex) that are thread safe.

Greetings,

- Martin

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to