1 Apr 07:58
Ruby 1.9 support + C extension breakthrough
Hello all, Since Mikhail Ravkine suggested that regular development activity would stimulate this community, I thought I'd share some exciting news: For about a month now, I've been working on adding support for Ruby 1.9, and this past weekend I finally made a breakthrough: Instead of running the Ruby interpreter (which in turn runs the executable specification) inside a pthread and using pthread mutex to transfer control between Ruby and Verilog, I would simply run the executable specification inside a Ruby thread and use Ruby's thread-safe Queue class (a mailbox) to perform the control transfer [1]. This approach has the advantage that we completely avoid the difficulties associated with initializing the Ruby interpreter's stack inside a pthread (since a pthread's stack is small compared to the main process). Furthermore, since the Ruby interpreter is compiled with support for the pthreads library on some systems, it becomes even more tricky to initialize the interpreter's stack correctly. Nevertheless, this new approach works well with VCS, CVER, and NCSIM. Unfortunately, it fails *completely* with VSIM reporting an internal simulation kernel failure. This leading me to believe that VSIM invokes all vlog_startup_routines somewhere outside the execution stack of the main process (perhaps inside a pthread or within its own threading implementation).(Continue reading)
> Looking forward to this release,
Sure, thanks for your interest.
Cheers.
RSS Feed