Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-13 Thread René Doß
first Davids changed code works. This is nices. equiv_process: process begin global = get_global(2); wait until board_clk'event and board_clk = '1'; end process equiv_process: The wait reactivate the process. The changing is only valid in the next clock cycle. T Other question: exist an

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-13 Thread David Koontz
On 13 Apr 2013, at 9:28 PM, René Doß d...@gmx.de wrote: first Davids changed code works. This is nices. equiv_process: process begin global = get_global(2); wait until board_clk'event and board_clk = '1'; end process equiv_process: The wait reactivate the process. The

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-10 Thread René Doß
Hi Jon, I can not call from C. Your solution can be interesting for me. I can give you only my commandline. For a Call from VHDL. ghdl -e -Wl,emulator_src.o -Wl,gdb_sim.o -Wl,-lpthread --ieee=synopsys --workdir=work -Pwork tb_lm_cpu I see no larger difference. Perhaps can you

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-10 Thread Martin Strubel
Hi Jon, I am attempting to write a multithreaded application in VHDL, using GHDL as the compiler. I need to call from C a function written in VHDL and compiled into object form using GHDL back into the VHDL code somehow, since I can't get direct access to pthreads from VHDL. Did you check

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-10 Thread Pascal Giard
On Wed, Apr 10, 2013 at 3:41 AM, Martin Strubel hack...@section5.ch 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

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-10 Thread Jon Taylor
On Wed, Apr 10, 2013 at 12:41 AM, Martin Strubel hack...@section5.chwrote: Hi Jon, I am attempting to write a multithreaded application in VHDL, using GHDL as the compiler. I need to call from C a function written in VHDL and compiled into object form using GHDL back into the VHDL code

Re: [Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-10 Thread Jon Taylor
On Wed, Apr 10, 2013 at 3:03 PM, Brian Drummond br...@shapes.demon.co.ukwrote: I am attempting to write a multithreaded application in VHDL, using GHDL as the compiler. I need to call from C a function written in VHDL and compiled into object form using GHDL back into the VHDL

[Ghdl-discuss] Calling functions written in VHDL from a linked C-language-compiled binary

2013-04-09 Thread Jon Taylor
Hi, I am attempting to write a multithreaded application in VHDL, using GHDL as the compiler. I need to call from C a function written in VHDL and compiled into object form using GHDL back into the VHDL code somehow, since I can't get direct access to pthreads from VHDL. I see that my main