Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pass string to $system in SystemVerilog?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
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!
Davy
 

Hi,
Checkout this!
Which simulator ur using??? I have ncverilog 5.6 which does not support
string construct yet!

Code:
reg[100*8:1] 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);
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
Hi nand_gates,

Thanks a lot! I will try your suggestion and tell you the result.

BTW, I use Cadence IUS583 (i.e. ncverilog 5.83 which support SystemVerilog).

Best regards,
Davy
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top