{"action":"created","issue":{"url":"https://api.github.com/repos/potentialventures/cocotb/issues/137","repository_url":"https://api.github.com/repos/potentialventures/cocotb","labels_url":"https://api.github.com/repos/potentialventures/cocotb/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/potentialventures/cocotb/issues/137/comments","events_url":"https://api.github.com/repos/potentialventures/cocotb/issues/137/events","html_url":"https://github.com/potentialventures/cocotb/issues/137","id":37842573,"number":137,"title":"Modelsim as a simulator in 64-bit platform","user":{"login":"aylons","id":720443,"avatar_url":"https://avatars.githubusercontent.com/u/720443?v=3","gravatar_id":"","url":"https://api.github.com/users/aylons","html_url":"https://github.com/aylons","followers_url":"https://api.github.com/users/aylons/followers","following_url":"https://api.github.com/users/aylons/following{/other_user}","gists_url":"https://api.github.com/users/aylons/gists{/gist_id}","starred_url":"https://api.github.com/users/aylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aylons/subscriptions","organizations_url":"https://api.github.com/users/aylons/orgs","repos_url":"https://api.github.com/users/aylons/repos","events_url":"https://api.github.com/users/aylons/events{/privacy}","received_events_url":"https://api.github.com/users/aylons/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-07-15T00:53:30Z","updated_at":"2016-02-22T14:53:10Z","closed_at":"2014-07-19T02:00:33Z","body":"First of all, kudos for the project! I'm very excited by it and going to great lengths to use it and I expect to help with the development ASAP.\r\n\r\nAfter playing a bit with Icarus, I decided to depart to Modelsim, as this is the simulator I must use at work and I have the intention to bring it there. However, I have a 64 bit system and, although I have a 32-bit version of Modelsim, things are not easy.\r\n\r\nFirst, I've compiled Python and zlib to 32 bit and installed virtualenv, so everything could run in a 32-bit environment inside my 64-bit system. It almost works, but there are some problems:\r\n\r\nWhile compiling cocotb, the process mostly works except for the tests with Icarus. They always finish with this error:\r\n\r\n```\r\niverilog -o sim_build/sim.vvp -D COCOTB_SIM=1   /home/aylons/git/cocotb/examples/endian_swapper/tests/../hdl/endian_swapper.sv\r\nPYTHONPATH=/home/aylons/git/cocotb/build/libs/i686:/home/aylons/git/cocotb:/home/aylons/git/cocotb/examples/endian_swapper/tests:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim: LD_LIBRARY_PATH=/home/aylons/git/cocotb/build/libs/i686:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim: MODULE=test_endian_swapper \\\r\n        TESTCASE= TOPLEVEL=endian_swapper \\\r\n        vvp -M /home/aylons/git/cocotb/build/libs/i686 -m gpivpi sim_build/sim.vvp   \r\ngpivpi:`/home/aylons/git/cocotb/build/libs/i686/gpivpi.vpl' failed to open using dlopen() because:\r\n    /home/aylons/git/cocotb/build/libs/i686/gpivpi.vpl: wrong ELF class: ELFCLASS32.\r\nVCD info: dumpfile waveform.vcd opened for output.\r\nmake[3]: Leaving directory `/home/aylons/git/cocotb/examples/endian_swapper/tests'\r\n```\r\n\r\nOk, so the problem seems to be with Icarus. Maybe it's a benign problem, and I try to run the endian_swapper test using Modelsim, and it almost work again. This is the resulting output:\r\n\r\n```\r\n(env)aylons@aylons-yoga2:~/git/cocotb/examples/endian_swapper/tests$ make SIM=modelsim\r\nmake results.xml\r\nmake[1]: Entering directory `/home/aylons/git/cocotb/examples/endian_swapper/tests'\r\nLD_LIBRARY_PATH=/home/aylons/git/cocotb/build/libs/i686::/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim: MODULE=test_endian_swapper TESTCASE= TOPLEVEL=endian_swapper \\\r\n\tPYTHONPATH=/home/aylons/git/cocotb/build/libs/i686:/home/aylons/git/cocotb:/home/aylons/git/cocotb/examples/endian_swapper/tests:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim:/home/aylons/git/cocotb/examples/endian_swapper/tests/../cosim: \\\r\n\tvsim -c -do runsim.do 2>&1 | tee sim.log\r\nReading /opt/Modelsim/modeltech/tcl/vsim/pref.tcl \r\n\r\n# 6.5f\r\n\r\n# do runsim.do \r\n# ** Warning: (vlib-34) Library already exists at \"work\".\r\n# Model Technology ModelSim SE vlog 6.5f Compiler 2010.06 Jun 16 2010\r\n# -- Compiling module endian_swapper\r\n# \r\n# Top level modules:\r\n# \tendian_swapper\r\n# vsim -onfinish stop -pli libgpi.so work.endian_swapper \r\n# Loading /home/aylons/git/cocotb/build/libs/i686/libgpi.so\r\n# //  ModelSim SE 6.5f Jun 16 2010 Linux 3.13.0-30-generic\r\n# //\r\n# //  Copyright 1991-2010 Mentor Graphics Corporation\r\n# //              All Rights Reserved.\r\n# //\r\n# //  THIS WORK CONTAINS TRADE SECRET AND \r\n# //  PROPRIETARY INFORMATION WHICH IS THE PROPERTY\r\n# //  OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS\r\n# //  AND IS SUBJECT TO LICENSE TERMS.\r\n# //\r\n# Loading sv_std.std\r\n# Loading work.endian_swapper(fast)\r\nTraceback (most recent call last):\r\n  File \"/home/aylons/git/cocotb/cocotb/__init__.py\", line 35, in <module>\r\n    import logging\r\n  File \"/opt/pym32/lib/python2.7/logging/__init__.py\", line 26, in <module>\r\n    import sys, os, time, cStringIO, traceback, warnings, weakref, collections\r\nImportError: /opt/pym32/lib/python2.7/lib-dynload/time.so: undefined symbol: PyExc_ValueError\r\nFailed to load \"cocotb\"\r\n# Attempting stack trace sig 11\r\n# Signal caught: signo [11]\r\n# vsim_stacktrace.vstf written\r\n# Current time Mon Jul 14 21:43:03 2014\r\n# ModelSim Stack Trace\r\n# Program = vsim\r\n# Id = \"6.5f\"\r\n# Version = \"2010.06\"\r\n# Date = \"Jun 16 2010\"\r\n# Platform = linux\r\n# --> START OF USERCODE\r\n# 0    0x56c530da: 'embed_sim_init + 0x5aa' in '/home/aylons/git/cocotb/build/libs/i686/libcocotb.so'\r\n# 1    0x5558a893: 'gpi_embed_init + 0x18' in '/home/aylons/git/cocotb/build/libs/i686/libgpi.so'\r\n# 2    0x5558c165: 'handle_sim_init + 0x3b' in '/home/aylons/git/cocotb/build/libs/i686/libgpi.so'\r\n# 3    0x5558ad13: 'gpi_handle_callback + 0x18' in '/home/aylons/git/cocotb/build/libs/i686/libgpi.so'\r\n# 4    0x5558bb90: 'handle_vpi_callback + 0x7f' in '/home/aylons/git/cocotb/build/libs/i686/libgpi.so'\r\n# <-- END OF USERCODE\r\n# 5    0x081e7594: '<unknown (@0x81e7594)>'\r\n# 6    0x081e77cb: '<unknown (@0x81e77cb)>'\r\n# 7    0x08485a01: '<unknown (@0x8485a01)>'\r\n# 8    0x0837ef3b: '<unknown (@0x837ef3b)>'\r\n# 9    0x08380590: '<unknown (@0x8380590)>'\r\n# 10   0x086d4237: '<unknown (@0x86d4237)>'\r\n# 11   0x086d59e9: '<unknown (@0x86d59e9)>'\r\n# 12   0x086fb31b: '<unknown (@0x86fb31b)>'\r\n# 13   0x08700403: '<unknown (@0x8700403)>'\r\n# 14   0x086d797c: '<unknown (@0x86d797c)>'\r\n# 15   0x086daa2d: '<unknown (@0x86daa2d)>'\r\n# 16   0x086d59e9: '<unknown (@0x86d59e9)>'\r\n# 17   0x086fb31b: '<unknown (@0x86fb31b)>'\r\n# 18   0x08700663: '<unknown (@0x8700663)>'\r\n# 19   0x086d60fc: '<unknown (@0x86d60fc)>'\r\n# 20   0x086dd7fd: '<unknown (@0x86dd7fd)>'\r\n# 21   0x086d59e9: '<unknown (@0x86d59e9)>'\r\n# 22   0x086d6e7d: '<unknown (@0x86d6e7d)>'\r\n# 23   0x086d72c0: '<unknown (@0x86d72c0)>'\r\n# 24   0x086d7caa: '<unknown (@0x86d7caa)>'\r\n# 25   0x085a61ea: '<unknown (@0x85a61ea)>'\r\n# 26   0x0870e01b: '<unknown (@0x870e01b)>'\r\n# 27   0x0873cb4e: '<unknown (@0x873cb4e)>'\r\n# 28   0x0871d480: '<unknown (@0x871d480)>'\r\n# 29   0x0871d77e: '<unknown (@0x871d77e)>'\r\n# 30   0x08694f80: '<unknown (@0x8694f80)>'\r\n# 31   0x0836b410: '<unknown (@0x836b410)>'\r\n# 32   0x082cd49a: '<unknown (@0x82cd49a)>'\r\n# 33   0x0805d6e9: '<unknown (@0x805d6e9)>'\r\n# End of Stack Trace\r\n\r\n\r\n** Fatal: (SIGSEGV) Bad pointer access. Closing vsimk.\r\n```\r\nAnd this is where I'm stuck at right now. I understand this is probably a problem with my system and not with cocotb, but I think this is the best place to seek for help. Also, I would love to run a full 64 bit stack, but as the documentation says it is not supported, I though going trying this 32-bit approach would put me to work faster. \r\n\r\nAny ideas on how to correct these errors?"},"comment":{"url":"https://api.github.com/repos/potentialventures/cocotb/issues/comments/187216215","html_url":"https://github.com/potentialventures/cocotb/issues/137#issuecomment-187216215","issue_url":"https://api.github.com/repos/potentialventures/cocotb/issues/137","id":187216215,"user":{"login":"stuarthodgson","id":3698891,"avatar_url":"https://avatars.githubusercontent.com/u/3698891?v=3","gravatar_id":"","url":"https://api.github.com/users/stuarthodgson","html_url":"https://github.com/stuarthodgson","followers_url":"https://api.github.com/users/stuarthodgson/followers","following_url":"https://api.github.com/users/stuarthodgson/following{/other_user}","gists_url":"https://api.github.com/users/stuarthodgson/gists{/gist_id}","starred_url":"https://api.github.com/users/stuarthodgson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuarthodgson/subscriptions","organizations_url":"https://api.github.com/users/stuarthodgson/orgs","repos_url":"https://api.github.com/users/stuarthodgson/repos","events_url":"https://api.github.com/users/stuarthodgson/events{/privacy}","received_events_url":"https://api.github.com/users/stuarthodgson/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T14:53:10Z","updated_at":"2016-02-22T14:53:10Z","body":"@cfswanson, you'll need to run make from the cocotb checkout,"}}