Systemverilog DPI

Hi all,

I am looking for a practical example in which systemverilog DPI is connected to Matlab via C Wrapper. Is there any paper published in this field?
I appreciate any suggestion to read about it…

Thanks

http://chipdesignmag.com/display.php?articleId=258

http://www.springerlink.com/content/l37v688630pw751w/

Hi Mohammed,

I am an engineer from MathWorks. Although we do not have any specific examples or papers on this topic, there are several ways you can do this, but it depends a little bit on your goal:

If you need full debugging capabilities of both ModelSim/QuestaSim and MATLAB, I would suggest the use of HDL Verifier from MathWorks. This provides a co-simulation link between ModelSim/QuestaSim and MATLAB or Simulink and does not limit your visualization or debug options.

On the other hand, if your goal is different, I would suggest you take a look at a couple of capabilities that allow you to export from MATLAB/Simulink. The above post mentions a couple of these, but just to add/re-iterate you could also:

  • Generate TLM 2.0 models
  • Generate Verilog and VHDL models
  • Generate C/C++ that can be integrated using the DPI

If you are interested in any of these suggestions, let me know. I’d be happy to delve into one further!

Shyam Yadati
Pilot Engineer
MathWorks Inc.

In reply to shyam.yadati:

Also, I just found an article in the cookbook that has an example you can download.

https://verificationacademy.com/cookbook/Matlab/Integration

In reply to dave_59:

Hello All,

I ran the example on the socket connection from the following : Matlab/Integration | Verification Academy, but seems could not make the socket connection right from the VSIM client. I am using the QuestaSim 10.1d and Matlab 2012a. From the README.txt, it should work on 10.1/2011a. I got the following errors:

MLerr - connect() failed: Sock Failure ID =111 Connection refused

MATLAB server may not be available, use hdldaemon(‘socket’,5001)

Could the cross network be the problem? Any help is greatly appreciated.

Thanks,
-Hidayat