• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. error when passing a string to ncutils

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 66
  • Views 18601
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error when passing a string to ncutils

JMGGL
JMGGL over 16 years ago

This is what I am trying to do:

parameter [1023:0] chip_name="tb_top.I_0.";

wire [1023:0] path_name;

assign  path_name    = {chip_name,"module1.module2.signal"};

$nc_mirror("signal",path_name","verbose");

 

*And the following message error appears:

Non-string argument specified for $nc_mirror task...

 

I tried to pass directly  path_name, without concatenation, and same problem. Also with other ncutils: nc_force, nc_release... Does anybody know how to do it?

Thanks in advance.

  • Cancel
Parents
  • adua
    adua over 16 years ago

     

    The argument of $nc_mirror can be string or a register. Now, when it is a string, it should be the hierarchical path of the object. When it is a register then it has to be the 'actual' register. Here you are trying to pass a register whose value is expected to be treated as a string.

    So, you need to either declare a string as already suggested in this thread.

     Or the other simpler way is to avoid the path_name completely. I mean, instead of first filling a path_name variable with the actual hierarchical path, pass the hierarchical path directly as string in nc_mirror argument. Please see the example below that shows this (It works with IUS6.11 version and don't need any string SV datatype).

    //1.v file

    module tb_top ();

      parameter [1023:0] chip_name="tb_top.I_0.";

      reg [1023:0] path_name; wire signal;

      io I_O ();

    //assign path_name = {chip_name,"module1.module2.signal"};

      initial begin

       path_name = {chip_name,"module1.module2.signal"};

      $nc_mirror("signal","tb_top.I_O.module1.module2.signal","verbose");  //This works.

      //$nc_mirror("signal",path_name,"verbose");  //reg to be treated as holding string value. This WOn't work.

      end

    endmodule

    module io;

     m1 module1 ();

    endmodule

    module m1;

     m2 module2 ();

    endmodule

    module m2;

     wire signal;

     reg r;

     assign signal = r;

     initial begin

      #10 r = 1'b1;

      #10 r = 1'b0;

      #10 r = 1'b1;

     end

    endmodule

    //end 1.v

    Now, Run as follows: (6.1 is fine)

    > irun 1.v -access +r

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • adua
    adua over 16 years ago

     

    The argument of $nc_mirror can be string or a register. Now, when it is a string, it should be the hierarchical path of the object. When it is a register then it has to be the 'actual' register. Here you are trying to pass a register whose value is expected to be treated as a string.

    So, you need to either declare a string as already suggested in this thread.

     Or the other simpler way is to avoid the path_name completely. I mean, instead of first filling a path_name variable with the actual hierarchical path, pass the hierarchical path directly as string in nc_mirror argument. Please see the example below that shows this (It works with IUS6.11 version and don't need any string SV datatype).

    //1.v file

    module tb_top ();

      parameter [1023:0] chip_name="tb_top.I_0.";

      reg [1023:0] path_name; wire signal;

      io I_O ();

    //assign path_name = {chip_name,"module1.module2.signal"};

      initial begin

       path_name = {chip_name,"module1.module2.signal"};

      $nc_mirror("signal","tb_top.I_O.module1.module2.signal","verbose");  //This works.

      //$nc_mirror("signal",path_name,"verbose");  //reg to be treated as holding string value. This WOn't work.

      end

    endmodule

    module io;

     m1 module1 ();

    endmodule

    module m1;

     m2 module2 ();

    endmodule

    module m2;

     wire signal;

     reg r;

     assign signal = r;

     initial begin

      #10 r = 1'b1;

      #10 r = 1'b0;

      #10 r = 1'b1;

     end

    endmodule

    //end 1.v

    Now, Run as follows: (6.1 is fine)

    > irun 1.v -access +r

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information