Pass string to $system in SystemVerilog?

Discussion in 'Cadence' started by Shenli, Jan 12, 2007.

  1. Shenli

    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, Jan 12, 2007
    #1
  2. Shenli

    sharp Guest

    $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.
     
    sharp, Jan 12, 2007
    #2
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 (here). After that, you can post your question and our members will help you out.