Call Perl in Verilog or SV?

S

Shenli

Hi all,

Sometimes, I want to do some sophisticated text operation in Verilog or
SystemVerilog testbench. And we all know that Verilog and SV is like
C/C++ and not very good at text manipulation.

Is there any method to call Perl routine in Verilog or SV? Pass
argument to Perl routine can be better. BTW, I use Cadence NC tools.

Best regards,
Davy
 
S

Shenli

Hi Ajeetha,

Thanks a lot for the help :)
I have tried your suggestion and it work OK.

But when I try to pass a string to $system(), the ncvlog said "Using
String without index is not supported in the given context."

The code I write like below,
//---------------------
string perl_cmd_str = "";

$sformat(perl_cmd_str,"perl ./perl/test_opt_file.pl -a %0d -b 4",
data_a);
$display("string is %s\n", perl_cmd_str);

$system (perl_cmd_str);
//---------------------

Any suggestion on how to input a string to $system()?

Best regards,
Shenli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top