Suraj Kurapati wrote:
Hi Robert,

On Wed, Mar 17, 2010 at 6:45 PM, Robert Smolinski <rsmol...@illinois.edu> wrote:
I have a "reg [79:0] mem[31:0]", I'd like to access mem[0] and such
I print out using DUT.each_vpiNet and it doesn't print out any of the names
declared with "reg".

I'm running the simulations with cver 2.12.a and ruby-vpi 21.1.0.

It's been a while since I worked on this project so the details are
not fresh in my mind.  If you could kindly attach a tarball of the
test suite you are running, it would help me to solve this issue.

I'm also in the middle of revamping some of my other projects (and
their infrastructure) right now, so I thank you in advance for your
patience.

As for the future of this project, I've had some new (rather
low-level) developments brewing since last year:

* Ruby 1.9 coroutine support[1] for more efficient & consistent
behavior in all simulators.

* switch from MRI C extension to Ruby::FFI[2] --- this involves
developing and contributing a Ruby::FFI backend to the SWIG project.

Hopefully I'll get to finishing these by the end of this year.  [1] in
particular is very cool; it's a great leap beyond the work I did for
my MS thesis.

Cheers.

[1]: http://redmine.ruby-lang.org/issues/show/2294
[2]: http://github.com/sunaku/swig-ruby-ffi
It looks like [1] was a tricky issue to find/solve and that you had a decent challenge getting it in. It's very cool that you are continuing your work on the project. I've really enjoyed using your ruby-vpi so far. It seems to me that ruby's unique language features are a definite advantage in design verification.

I figured out a work around to get to the array elements using the vpi function "vpi_handle_by_index", since I can't find the correct argument to pass to "to_a".

Do you have any further tips / utility functions that you found useful? I'm trying to find an elegant function to shorten the call to get the interger value of a wire.

The best I could do seems like overkill:
def IntVal wire_name, module="DUT"
 eval(module + "." + wire_name + ".intVal")
end


Thank you very much,
Rob.

Reply via email to