Le 2014-04-10 12:42, [email protected] a écrit :
I have uploaded two examples that I've tried tonight:
http://ygdes.com/GHDL/access_c/ : variable in C, accessed from GHDL
http://ygdes.com/GHDL/direct_c/ : shared variable in a package,
accessed by C with extern
The last one is good but has one drawback : it
requires manipulations to extract the actual variable name
from objdump. I'd like to find a way to avoid that.
I've found a one-liner script that extracts the variable's name
and #defines it while calling GCC, so the code is slightly less brittle.
$ ghdl -a ghdl_direct.vhdl direct_test.vhdl
$ NAME=$(objdump -t ghdl_direct.o |grep '[.]bss' |grep my_var|sed 's/.*
//' )
$ gcc -DVARNAME=$NAME -c ghdl_direct.c -o ghdl_direct_c.o
Now, I have a new question :
has anyone tried to call a VHDL procedure as a POSIX signal handler ?
:-)
the setup with signal() probably needs to be in C but the callback
would greatly benefit from being directly in VHDL !
yg
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss