Pass string to $system in SystemVerilog?

S

Shenli

Guest
Hi,

I want to run perl command with dynamic argument in SystemVerilog. And
I use Cadence IUS583.

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 string to $system()?

Thanks!
Shenli
 
Shenli wrote:
Any suggestion on how to input string to $system()?
$system is an old non-standard Verilog task. I wouldn't expect
updating it to work with SystemVerilog strings to be a high priority.
I would suggest using a wide vector buffer to hold your string value,
the way such things have always been done in Verilog.
 

Welcome to EDABoard.com

Sponsor

Back
Top