On Wed, Apr 10, 2013 at 3:41 AM, Martin Strubel <[email protected]> wrote: > The symbol have a prepended '_' to be called from C directly. You'd have > to probably develop some sort of wrapper and/or use nasty inline > assembler hacks. > BTW, GHDL does not appear to be thread safe. I've been calling the VHDL > side from a C thread via VPI which randomly quits or does other funny > things. The only stable way exchanging data between a C and a GHDL > simulation thread I found so far was using a software FIFO. It's all > covered up in the ghdlex code posted here somewhere.
FWIW, I've used POSIX shared memory and semaphores with some success. However, I've also ran into weird issues e.g. I had to use sem_trywait() as I was unable to get sem_wait() to behave well in GHDL [1]. -Pascal [1] http://www.mail-archive.com/[email protected]/msg00363.html -- Homepage (http://organact.mine.nu) Debian GNU/Linux (http://www.debian.org) COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca) Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca) _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
