Jan 12, 2007 #1 D 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, 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
Jan 12, 2007 #2 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 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);
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);
Jan 14, 2007 #3 D 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 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
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