question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation fault running with Ghdl

See original GitHub issue

I’m a newbie with cocotb: I’m running on Windows 64 with Anaconda Python 3.7 and ghdl. Following the install instructions I’ve done a conda install -c msys2 m2-base m2-make and pip install cocotb. (I don’t know if relevant, but the pip install failed at first complaining the install required MS Visual C++ Build Tools. Once I’d installed these, the pip install succeeded).

I’m now trying to run the basic adder.vhdl example from the cocotb documentation In a conda shell I’m doing (py37) C:\Users\DD\Documents\adder\tests>make SIM=ghdl TOPLEVEL_LANG=vhdl

but getting a Segmentation Error :

make results.xml make[1]: Entering directory '/c/Users/DD/Documents/adder/tests' \ /c/Users/DD/Documents/fpga-toolchain/bin/ghdl -i --workdir=sim_build --work=work /c/Users/DD/Documents/adder/tests/../hdl/adder.vhdl && \ /c/Users/DD/Documents/fpga-toolchain/bin/ghdl -m --workdir=sim_build -Psim_build --work=work adder MODULE=test_adder TESTCASE= TOPLEVEL=adder TOPLEVEL_LANG=vhdl \ /c/Users/DD/Documents/fpga-toolchain/bin/ghdl -r --workdir=sim_build -Psim_build --work=work adder --vpi=C:/users/dd/anaconda3/envs/py37/lib/site-packages/cocotb/libs/cocotbvpi_ghdl.dll loading VPI module 'C:/users/dd/anaconda3/envs/py37/lib/site-packages/cocotb/libs/cocotbvpi_ghdl.dll' -.--ns INFO cocotb.gpi ..mbed\gpi_embed.cpp:77 in set_program_name_in_venv Did not detect Python virtual environment. Using system-wide Python interpreter -.--ns INFO cocotb.gpi ..\gpi\GpiCommon.cpp:105 in gpi_print_registered_impl VPI registered VPI module loaded! /c/users/dd/anaconda3/envs/py37/lib/site-packages/cocotb/share/makefiles/simulators/Makefile.ghdl make[1]: *** [results.xml] Segmentation fault make[1]: Leaving directory '/c/Users/DD/Documents/adder/tests' c:\users\dd\anaconda3\envs\py37\lib\site-packages\cocotb\share\makefiles/Makefile.inc:39: recipe for target 'sim' failed make: *** [sim] Error 2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gilbertwaltooncommented, Apr 17, 2021

Just an update: Whilst I haven’t found a solution for ghdl in ‘pure’ Windows, by installing MSYS cocotb and the MSYS Ghdl package from here : https://packages.msys2.org/package/mingw-w64-x86_64-ghdl I am now up and running. So at at least provides a solution for us VHDL/Windows-PC users.

0reactions
ktbarrettcommented, Apr 17, 2021

You found a workaround and the original problem is not with us. Reopen if you think your problem isn’t yet addressed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation fault and memory usage problem #1662 - GitHub
A very ordinary ram declaration causes a segmentation fault (using ghdl -r) above a certain array size on: 1) linux target built from...
Read more >
4 bit Carry Look Ahead Segmentation Fault - Google Groups
(The simulator should report that error, not crash, so it is a bug in the simulator too.) So, the thing to do in...
Read more >
Brian Drummond - Help with GHDL : GCC fails during -O2 ...
To simulate a VHDL design, just run the executable. ... test_utils.vhd:1:0: internal compiler error: Segmentation fault ENTITY Test_utils IS ^ 0x5314cf ...
Read more >
Re: [Ghdl-discuss] GHDL Error - The Mail Archive
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...
Read more >
ghdl1/Lobby - Gitter
I'm getting the following error with ghdl-yosys-plugin , and I'm absolutely clueless how to move forward in figuring out what's going on and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found