Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby and SystemVerilog DPI

The DPI functionality in System Verilog always mentions that you can interface it with any language, the most common one being C/C++. I want to interface my system Verilog code with Ruby. Is there any documentation or support for this functionality? Any known way to do this?

I should add that my main goal is to call a ruby script from my system Verilog uvm test.

Thanks

like image 384
noobuntu Avatar asked Mar 19 '23 00:03

noobuntu


1 Answers

While the standard mentions that the DPI can interface SystemVerilog with any other foreign language, it then chickens out and says:

For now, however, SystemVerilog defines a foreign language layer only for the C programming language.

This means that you should get DPI-C support in all IEEE 1800 compliant simulators, but any other foreign languages you get depend on your simulator vendor. Mine for example also offers SystemC, but requires that the SystemC code be patched (i.e. it won't work out of the box).

Some guys in my company managed to interface Python with SystemVerilog through the DPI, but they did it via a 2-step approach: Python -> C and C -> SystemVerilog. You would probably need to do something similar.

like image 199
Tudor Timi Avatar answered Mar 27 '23 19:03

Tudor Timi