wilson_on Posted February 24, 2016 Report Share Posted February 24, 2016 Hi, I am new to Python and I have been asked to build a UVM testbench which can call Python functions. Is there any way that I can do which is similar to DPI-C for C functions in verilog testbench? If you can provide a detail example, that would be great. Thanks. Quote Link to comment Share on other sites More sharing options...
acrussp Posted May 6, 2016 Report Share Posted May 6, 2016 Yes. I can't find it at the moment but some time with Google search should turn up a whole library a guy had written that uses Python as the verification language via the dpi. Seemed very interesting but I never did more than skim the docs. Quote Link to comment Share on other sites More sharing options...
bcassell Posted May 10, 2016 Report Share Posted May 10, 2016 You can take a look at cocotb, though I haven't used it. http://eda-playground.readthedocs.io/en/latest/intro.html#id2 http://cocotb.readthedocs.io/en/latest/introduction.html http://potential.ventures/cocotb/ Quote Link to comment Share on other sites More sharing options...
funningboy Posted August 1, 2016 Report Share Posted August 1, 2016 try this one, a python systemVerilog DPI wrapper interface by using registered callback events. https://github.com/funningboy/pyvpi_example Quote Link to comment Share on other sites More sharing options...
joniale Posted June 22, 2018 Report Share Posted June 22, 2018 A good tutorial to understand how to embedd Python in C https://www6.software.ibm.com/developerworks/education/l-pythonscript/l-pythonscript-ltr.pdf Then you can search how to use DPI with C to be able to use C in systemverilog. Sure, There is a lot of DPI examples in your vendor EDA simulator folder. bluster 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.