From kazunori at easter.kuee.kyoto-u.ac.jp Mon Jun 20 03:41:41 2011 From: kazunori at easter.kuee.kyoto-u.ac.jp (Kazunori Kimura) Date: Mon, 20 Jun 2011 16:41:41 +0900 Subject: RSpec error Message-ID: Hi, I tried to use ruby-vpi-21.1.0 follows environment: OS : Debian Linux x86-64 Linux Version : 2.6.37.2 Ruby Version : 1.8.7 ruby-vpi version : 21.1.0 When I run 'rake vsim PROTOTYPE=1' in example/counter/RSpec directory, RSpec module not found. # LoadError: no such file to load -- spec I checked RSpec version by 'gem list'. RSpec's version was 2.6.0. then, I tried to follows ruby -e "require 'rubygems'; require'rspec'" this command works. so, I modified counter_spec.rb . replace 'spec' to 'rspec'. then, I tried 'rake vsim PROTOTYPE=1' one more. but follows error ocurred. NoMethodError: undefined method `setup' for # I check RSpec 2.6.0 document. there are no 'setup' mothod. document uses 'before(:each)' instead of 'setup' I replaced 'setup' to 'before(:each)'. and then 'rake vsim PROTOTYPE=1'. error messages were not appeared. but, there were no test result mesasge. How do I get correct result with 'rake vsim PROTOTYPE=1'. Best regards -- Kazunori Kimura From sunaku at gmail.com Mon Jun 20 14:03:39 2011 From: sunaku at gmail.com (Suraj N. Kurapati) Date: Mon, 20 Jun 2011 11:03:39 -0700 Subject: RSpec error In-Reply-To: References: Message-ID: <20110620110339.63b2d299@gmail.com> On Mon 20 Jun 2011 04:41:41 PM PDT, Kazunori Kimura wrote: > NoMethodError: undefined method `setup' for # > > I check RSpec 2.6.0 document. there are no 'setup' mothod. > document uses 'before(:each)' instead of 'setup' Please try with rspec version 1.1.4 (released May 26, 2008). > I replaced 'setup' to 'before(:each)'. and then 'rake vsim > PROTOTYPE=1'. error messages were not appeared. but, there were no > test result mesasge. > > How do I get correct result with 'rake vsim PROTOTYPE=1'. Good question. It should work regardless of the unit testing framework being used. I'll try to dig into this issue this week. By the way, I noticed that your e-mail address comes from Kyoto University! the birthplace of the original ruby-vpi! :) Welcome! Are you interested in maintaining or developing Ruby-VPI? I have done more experiments, such as using ucontext instead of pthread[1], and have more ideas, such as replacing `rake vsim` with a ruby-vpi.so that can be loaded into any simulator and invoked on-demand from a C program, and other ideas written in my notebook. [1]: https://github.com/sunaku/ruby-coroutine-example -- To give happiness is to deserve happiness. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From kazunori at easter.kuee.kyoto-u.ac.jp Tue Jun 21 00:10:28 2011 From: kazunori at easter.kuee.kyoto-u.ac.jp (Kazunori Kimura) Date: Tue, 21 Jun 2011 13:10:28 +0900 Subject: RSpec 1.1.4 works correct In-Reply-To: <20110620110339.63b2d299@gmail.com> References: <20110620110339.63b2d299@gmail.com> Message-ID: >>>>> In <20110620110339.63b2d299 at gmail.com> >>>>> "Suraj N. Kurapati" wrote: Hi Suraj. Thank you for you response. > Please try with rspec version 1.1.4 (released May 26, 2008). I tried rspec version 1.1.4 . It seemed that test result was correct. then, I tried with no PROTOTYPE, 'rake vsim'. but, segmentation error occured. follows are message. ** Fatal: (SIGSEGV) Bad pointer access. Closing vsimk. ** Fatal: vsimk is exiting with code 211. (Exit codes are defined in the ModelSim messages appendix of the ModelSim User's Manual.) # SystemExit: exit # from ** /home/kazunori/.gem/ruby/1.8/gems/ruby-vpi-21.1.0/lib/ruby-vpi/core/callback.rb:73:in ** `user_data' # from ** /home/kazunori/.gem/ruby/1.8/gems/ruby-vpi-21.1.0/lib/ruby-vpi/core/callback.rb:73:in ** `relay_verilog' # from ** /home/kazunori/.gem/ruby/1.8/gems/ruby-vpi-21.1.0/lib/ruby-vpi/core/scheduler.rb:103:in ** `advance_to_read_only_slot' # from ** /home/kazunori/.gem/ruby/1.8/gems/ruby-vpi-21.1.0/lib/ruby-vpi/core/scheduler.rb:29:in `initialize' when I tried gplcver, no errors appeared. so I think vsim.so has problem. if I have a time, I'll tackle this issue. > Are you interested in maintaining or developing Ruby-VPI? I have > done more experiments, such as using ucontext instead of pthread[1], > and have more ideas, such as replacing `rake vsim` with a > ruby-vpi.so that can be loaded into any simulator and invoked > on-demand from a C program, and other ideas written in my notebook. That's interesting. I'm sorry but I just returned to school. because of illness. but, I'm really interested in Ruby-VPI. when my condition gets better, I want to join development. -- Kazunori Kimura