From nikolaj at novelda.no Tue Sep 7 03:49:46 2010 From: nikolaj at novelda.no (Nikolaj Andersen) Date: Tue, 7 Sep 2010 09:49:46 +0200 (CEST) Subject: NameError when simulating with ncsim Message-ID: <02b801cb4e61$391801e0$ab4805a0$@no> Hi, I am fairly new to ruby, but I came across ruby-vpi and I think it looks very interesting so I thought I would give it a go. After installing rubygems I installed ruby-vpi and tried to run the example from the ruby-vpi user guide. When I run 'rake ncsim PROTOTYPE=1' the simulator crashes with the following error message: . [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/relay') failed with status 6 [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/loader') failed with status 6 ruby: uninitialized constant RubyVPI (NameError) ncsim: *F,INTERR: INTERNAL ERROR . I also get a similar message when I run it on the verilog module with 'rake ncsim'. Any idea what I'm doing wrong? I have included all the files I'm using, including the ncverilog log-file. I am running this on Cadence ncsim64 version 09.20-s014, ruby-vpi version 21.1.0 and ruby version 1.8.5. Best regards Nikolaj Andersen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter.v Type: application/octet-stream Size: 222 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter_design.rb Type: application/octet-stream Size: 239 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter_loader.rb Type: application/octet-stream Size: 89 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter_proto.rb Type: application/octet-stream Size: 175 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter_runner.rake Type: application/octet-stream Size: 1428 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: counter_spec.rb Type: application/octet-stream Size: 816 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ncverilog.log Type: application/octet-stream Size: 3284 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Rakefile Type: application/octet-stream Size: 31 bytes Desc: not available URL: From sunaku at gmail.com Tue Sep 7 12:58:06 2010 From: sunaku at gmail.com (Suraj Kurapati) Date: Tue, 7 Sep 2010 09:58:06 -0700 Subject: NameError when simulating with ncsim In-Reply-To: <02b801cb4e61$391801e0$ab4805a0$@no> References: <02b801cb4e61$391801e0$ab4805a0$@no> Message-ID: On Tue, Sep 7, 2010 at 12:49 AM, Nikolaj Andersen wrote: > When I run ?rake ncsim PROTOTYPE=1? the simulator crashes with the following > error message: > > [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/relay') failed with > status 6 > [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/loader') failed with > status 6 > ruby: uninitialized constant RubyVPI (NameError) > ncsim: *F,INTERR: INTERNAL ERROR > > I am running this on Cadence ncsim64 version 09.20-s014, ruby-vpi version > 21.1.0 and ruby version 1.8.5. Please try using Ruby 1.8.6 or 1.8.7. I'm afraid that 1.8.5 is too old. From nikolaj at novelda.no Wed Sep 8 10:48:00 2010 From: nikolaj at novelda.no (Nikolaj Andersen) Date: Wed, 8 Sep 2010 16:48:00 +0200 (CEST) Subject: NameError when simulating with ncsim In-Reply-To: References: <02b801cb4e61$391801e0$ab4805a0$@no> Message-ID: <002e01cb4f64$d253eaf0$76fbc0d0$@no> Hi Suraj, Thank you for your response! I upgraded ruby to 1.8.7 but I still get the same error. I also tried to install Icarus verilog on a different computer (Ubuntu this time, the first one was running RHEL 5) but with no luck, I get the same error message again.. Then I tried to install an older version of Ruby-VPI. 21.0.0 crashes with the same error, but 20.0.0 works a lot better! However, the example didn't run right away. It complains about the setup methods in the specification: counter_spec.rb:27:in `load_test': undefined method `setup' for Spec::Example::ExampleGroup::Subclass_2:Class (NoMethodError) I played around with it and changed 'setup do' --> 'before :each'. Now it runs without any complaints, but I'm not very familiar with RSpec so I don't know if the two lines actually do the same thing? -Nikolaj > -----Original Message----- > From: ruby-vpi-discuss-bounces at rubyforge.org [mailto:ruby-vpi-discuss- > bounces at rubyforge.org] On Behalf Of Suraj Kurapati > Sent: 7. september 2010 18:58 > To: ruby-vpi-discuss at rubyforge.org > Subject: Re: NameError when simulating with ncsim > > On Tue, Sep 7, 2010 at 12:49 AM, Nikolaj Andersen > wrote: > > When I run ?rake ncsim PROTOTYPE=1? the simulator crashes with the > following > > error message: > > > > [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/relay') failed > with > > status 6 > > [user.c:23] Ruby-VPI: error: rb_require('ruby-vpi/boot/loader') > failed with > > status 6 > > ruby: uninitialized constant RubyVPI (NameError) > > ncsim: *F,INTERR: INTERNAL ERROR > > > > I am running this on Cadence ncsim64 version 09.20-s014, ruby-vpi > version > > 21.1.0 and ruby version 1.8.5. > > Please try using Ruby 1.8.6 or 1.8.7. I'm afraid that 1.8.5 is too > old. From sunaku at gmail.com Wed Sep 8 13:35:43 2010 From: sunaku at gmail.com (Suraj Kurapati) Date: Wed, 8 Sep 2010 10:35:43 -0700 Subject: NameError when simulating with ncsim In-Reply-To: <002e01cb4f64$d253eaf0$76fbc0d0$@no> References: <02b801cb4e61$391801e0$ab4805a0$@no> <002e01cb4f64$d253eaf0$76fbc0d0$@no> Message-ID: On Wed, Sep 8, 2010 at 7:48 AM, Nikolaj Andersen wrote: > I also tried to install Icarus verilog on a different computer I highly recommend using GPL Cver instead of Icarus Verilog for Ruby-VPI. > counter_spec.rb:27:in `load_test': undefined method `setup' for > Spec::Example::ExampleGroup::Subclass_2:Class (NoMethodError) > > I played around with it and changed 'setup do' --> 'before :each'. Now it > runs without any complaints, but I'm not very familiar with RSpec so I don't > know if the two lines actually do the same thing? Good find! Yes, RSpec had a setup() method some years ago, but it was later changed to before(:each) as you discovered.