enchanter Posted June 11, 2013 Report Share Posted June 11, 2013 Is there any way to call python function from SystemVerilog? Quote Link to comment Share on other sites More sharing options...
dave_59 Posted June 11, 2013 Report Share Posted June 11, 2013 If you can call a python function from C (which you can) then you can use the SystemVerilog DPI to call C which would call python, If you simply want to call a python script, you can use the $system("command") task, but all interaction with python and SystemVerilog would have to be through file I/O. Quote Link to comment Share on other sites More sharing options...
matter Posted August 21, 2013 Report Share Posted August 21, 2013 If you can call a python function from C (which you can) then you can use the SystemVerilog DPI to call C which would call python, If you simply want to call a python script, you can use the $system("command") task, but all interaction with python and SystemVerilog would have to be through file I/O. Do you ever evaluate the performance of using DPI or through file I/O? Quote Link to comment Share on other sites More sharing options...
funningboy Posted August 21, 2013 Report Share Posted August 21, 2013 maybe you can try cython to wrapper python into c based, then using the DPI interface to wrapper the c. Quote Link to comment Share on other sites More sharing options...
dave_59 Posted August 21, 2013 Report Share Posted August 21, 2013 Do you ever evaluate the performance of using DPI or through file I/O? I never evaluated performance, but I've got to believe DPI is quicker. And BTW, I've only personally done both with PERL, not python. 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.