BY: Suraj Kurapati (snk) DATE: 2007-07-28 02:55 SUBJECT: RE: Can't seem to get ruby-vpi to work with V
Calvin Wong wrote: > Okay, I figured this one out. > > It turns out that when I build ruby 1.8.6, for > some reason a dynamic library was not placed > into the install lib directory. So, I had to > perform a make dll and then copy the libruby.so > related files over. > > It also turns out that vcs did not code > vpi_get_data, vpi_put_data and therefore those > two symbols never resolved. I had to comment > them out from the vpi_user.h within the ext > directory and then I also had to comment them > out from the swig_wrap.cin files as well. Ah! That explains it. I was getting the same error (reproduced below) on a 64-bit machine and could never figure it out (surely the world's premier Verilog simulator would define all VPI symbols!). Could not open library specified in -load option obj/vcs obj/vcs: undefined symbol: vpi_put_data Are you using a 64-bit machine also? Because I remember Ruby-VPI worked fine with VCS on a 32-bit machine some months ago (I haven't tested Ruby-VPI with VCS since then because the university machines were upgraded to 64-bit processors). > But now ... I am dealing with > > Error: vpi_put_value: Write permission not enabled > Please add capability wn to module register file. > Try adding the "+acc" option to lib/ruby-vpi/runner.rb:112 as follows: sh %w(vcs -R +v2k +vpi), SIMULATOR_ARGUMENTS[:vcs], '-load', "#{object_file_path(:vcs)}:#{LOADER_FUNC}", ############ '+acc', #### <=== added here! ############ expand_include_dir_options(:vcs), @sources You can just copy & paste the above code directly. Let me know how it works out, and thanks for your feedback.