# \[ANN\] Ruby-VPI 11.1.0

**URL:** <https://www.ruby-forum.com/t/ann-ruby-vpi-11-1-0/75324>\
**Category:** Ruby\
**Created:** [November 9, 2006, 4:07am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-11-1-0/75324 "2006-11-09T04:07:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@snk](https://www.ruby-forum.com/u/snk)\
**Post date:** [November 9, 2006, 4:07am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-11-1-0/75324/1 "2006-11-09T04:07:11Z")

</div>

Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create  
complex Verilog test benches easily and wholly in Ruby.

Website: [http://ruby-vpi.rubyforge.org](http://ruby-vpi.rubyforge.org)

Install: gem install ruby-vpi

Version 11.1.0 (2006-11-08)

Summary

This release fixes a bug in generated benches, improves the  
the Vpi::Handle class, and improves performance by roughly  
20%.

Acknowledgment

Thanks to Matt Fischler for finding the bug in generated  
benches (see below).

Notice

â€¢ A bug in generated Verilog and Ruby benches, which  
caused this error

```
ruby: no such file to load -- ruby-vpi (LoadError)

has been fixed.
  â–¡ Please regenerate your tests to apply this bug fix
    to your tests.

```

Detail

â€¢ The class SWIG::TYPE\_p\_unsigned\_int has been aliased as  
Vpi::Handle for easier access.

â€¢ Vpi::Handle#to\_s and Vpi::Handle#inspect now produce  
more informative output. For example, what used to  
appear as

```
#<SWIG::TYPE_p_unsigned_int:0x2aaab6574fa0>

now appears as

#<Vpi::Handle vpiModule fullName=counter_rspec_bench, size=-1, 

```

file=counter\_rspec\_bench.v, lineNo=2\>

```
in this release.
  â–¡ You can also provide a list of VPI property/type
    names or integer constants to those methods to see
    additional information in the output.

```

â€¢ Vpi::Handle now implements all methods from Enumerable,  
such as map, each, select, and so on. However, unlike  
their counterparts in Enumerable, these methods also  
accept a list of VPI property/type names or integer  
constants. Thus, you are now able to write  
handle.select(:reg, :net) {|h| h.size \> 5} to obtain a  
list of child handles to registers and nets whose  
capacity is greater than 5 bits.

â€¢ The Vpi::Handle#[], Vpi::Handle#get\_value, and  
Vpi::Handle#put\_value methods now accept names of VPI  
types/properties as well as their integer constants.  
Thus, you are now able to write handle[:reg, :net] to  
obtain a list of handles to all child registers and  
nets.

â€¢ Vpi::Handle#method\_missing has been refactored to cache  
queries. There is now, approximately, 20% improvement  
in performance.

â€¢ Vpi::Handle#method\_missing has been fixed to accept  
operations with multiple underscores. For example,  
before this release, you could not write  
handle.find\_all\_reg {|r| r.name =~ /foo/} because the  
â€œfind\_all\_regâ€ method would be interpreted as the  
operation â€œfindâ€ and the VPI property â€œall\_regâ€.

â€¢ The IntegerGenerator class, in the pipelined ALU  
example, has been fixed so that multiple instances do  
not interfere with the generation of each otherâ€™s prime  
integers.

â€¢ Due to a bug in the Rakefile, the reference  
documentation was not included in the previous few  
releases. This has been fixed.
