Hi there,

just a follow up, I've been experimenting on this field and found no way
to access a shared variable array either. So the workaround was, to
emulate it all in C. Typical use case is a virtual RAM, which
initializes like:

----------------------------------------------------

    type     rambuf_t      is access integer;
    ...
    process
    begin
        ram_handle := ram_new(simulation'path_name, , ADDR_W);
    ...
----------------------------------------------------

Inside the clock sensitive process are calls to a ram_write() and
ram_read() function implemented in C. So the rambuf_t is just a
anonymous handle (C world: pointer) to VHDL.


> Now comes the question of providing the address of the VHDL function to
> signal(),
> without objdump.
> 

That sounds like much digging in the dirt :-)
I've had issues with a crashing GHDL at some point when manipulating
stuff from another thread through the VPI interface. So the only stable
variant for me turned out to separate the C / VHDL stuff as much as
possible and use some variable exchange procedures as interface that are
guarded by mutexes. Actually, this would be a nice starting point to
think about multithreading tricks with GHDL (that best being another
'thread' :-) )

Greetings,

- Martin

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

Reply via email to