On Sun, Oct 25, 2009 at 1:25 PM, Tristan Gingold <[email protected]> wrote: > I am not sure how GHDL will work with pthreads. GHDL switches stacks, which > might be not very well supported by pthreads.
Ok, I eliminated the pthreads dependency, leaving only Lua. But that
didn't fix the problem. I still get a segfault. (As an aside, I
noted that running the Lua-only based code required me to increase the
stack size or the simulation would crash in Lua. Is there a way to
specify the stack size at compile time?)
So, I went even further. I eliminated Lua as well and hard-coded some
functionality. And I still get the same error. Here's a dump of
things in gdb (the project is attached):
(gdb) r --trace-processes
Starting program:
/home/pete/ghdl-pladow/fpga_stamp/fpga_stamp_m0/test/fpga_stamp_t0
--trace-processes
run process .fpga_stamp_t0(behav).t...@tcon_t0(behav).tcon_con [0872B328]
===> Executing FUNC_GPIO_CLR_DIR
===> Executing FUNC_WRITE
../../../tools/tb/tcon_t0/src/tcon_t0.vhd:166:11:@0ms:(assertion
note): VHDL: Executing tcon_write
../../../tools/tb/tcon_t0/src/tcon_t0.vhd:132:7:@0ms:(assertion note):
VHDL: Waiting for tcon_ack
run process .fpga_stamp_t0(behav).t...@tcon_t0(behav).gpio_con [0872B328]
Program received signal SIGSEGV, Segmentation fault.
0xc748ec83 in ?? ()
(gdb) bt
#0 0xc748ec83 in ?? ()
#1 0x0809b414 in grt.processes.run_processes (
postponed=<value optimized out>)
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/grt-processes.adb:593
#2 0x0809b83d in grt.processes.initialization_phase ()
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/grt-processes.adb:650
#3 0x080a0753 in __ghdl_run_through_longjump (
func=0x809b7ec <grt.processes.initialization_phase>)
at ../../../gcc-4.3.4/gcc/vhdl/grt/config/linux.c:312
#4 0x0809ae16 in grt.processes.simulation ()
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/grt-processes.adb:817
#5 0x080a5f38 in grt.main.run ()
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/grt-main.adb:154
#6 0x080a4564 in ghdl_main (argc=2, argv=Cannot access memory at
address 0xe58955c7
)
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/ghdl_main.adb:49
#7 0x080a0b26 in main (argc=Cannot access memory at address 0xe58955c3
) at ../../../gcc-4.3.4/gcc/vhdl/grt/main.adb:24
(gdb) frame 1
#1 0x0809b414 in grt.processes.run_processes (
postponed=<value optimized out>)
at /home/pete/Download/gcc-4.3.4/gcc/vhdl/grt/grt-processes.adb:593
593 Proc.Subprg.all (Proc.This);
(gdb) info threads
(gdb)
So this is a 99% VHDL implementation, with very basic foreign
subprograms. So it appears the conflict is not in pthreads or in Lua.
There is something else going on. I went a bit further and put some
breakpoints in my VHDL. The segfault happens in the wait statement in
the tcon_write function (line 133 of tcon_t0.vhd).
Perhaps this will give more insight?
Thanks,
Pete
ghdl-pladow-nolua.tar.bz2
Description: BZip2 compressed data
_______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
