• 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 18550
  • 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
  • JMGGL
    JMGGL over 16 years ago

     Sorry, I would say "$nc_mirror("signal",path_name,"verbose");", without the extra character.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Shalom B
    Shalom B over 16 years ago

    How about $nc_mirror("signal",{"\"",path_name,"\""},"verbose"); ?

     Shalom

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • JMGGL
    JMGGL over 16 years ago

    Thanks for your quick reply, but still not working...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 16 years ago

    When I displayed the path_name wire, it was empty:

    initial $display("signal %0s",path_name);

    However, if I made the path_name a reg and assigned it within an initial block, the display was correct:

    reg [1023:0] path_name;
    initial  path_name    = {chip_name,"module1.module2.signal"};

    Can you use a reg instead of a wire?

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • JMGGL
    JMGGL over 16 years ago

    Thanks Tim, but still with same issue: Non-string argument specified for $nc_mirror task...

    You were right when you said that the path was empty, so I fixed it.

    Now I mixed your solutions:

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

    reg [1023:0] path_name;

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

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

     

    With initial $display("signal %0s",path_name),  the path seems to be correct:

    "tb_top.I_0.module1.module2.signal"

     

    Any other idea?

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mickey
    Mickey over 16 years ago

    How about using the string datatype as follows:

    string chip_name = "tb_top.I_0.";
    string path_name;
    string full_path;

    initial 
      begin
        path_name = "module1.module2.signal";
        full_path = {chip_name, path_name};
        $nc_mirror("signal", full_path, "verbose");  
      end

     

    Hope that helps.

    Mickey

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • JMGGL
    JMGGL over 16 years ago

    Thanks Mickey.

    string datatype is used in System Verilog right? How to enable it with ncsim 6.11? I tried with ncvlog -sv and it doesn't work.

    Other options to solve my problem using normal Verilog? This is really important for me, since my database has plenty of those assignments...

    .

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • JMGGL
    JMGGL over 16 years ago

    No chance using string from System Verilog datatype.

    ncvlog_cg: *W,NOSTRA: Non-string argument specified for $nc_mirror task at Line...

    ncutils doesn't support the way to introduce signals as input parameters.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 16 years ago

    I was able to get it to work using the SV string datatype:

    file test.sv
    module test;

    parameter /*[1023:0]*/ string chip_name="test.";

    wire signal;
    wire x,y;

    /*reg [1023:0]*/ string path_name = {chip_name,"module2.a"};

    module2 module2 (.a(x), .b(y));

    initial begin
      $display("%0s",path_name);
      $nc_mirror("x",path_name,"verbose");
    end

    endmodule
    file mod2.vhd
     library IEEE;                       -- IEEE library
    use IEEE.std_logic_1164.all;        -- Reference the Std_logic_1164 system
    use IEEE.numeric_std.all;           -- Reference numeric standard package

    entity module2 is
      port(
        a   : in  std_logic;
        b   : out std_logic
      );
    end module2;

    architecture rtl of module2 is
      --signal data_bus_valid   : std_logic;

    begin
      b <= a;
    end rtl;
    % irun -access rwc mod2.vhd test.sv

    Although the string datatype is supported in IUS61, the above code did not work until IUS81.

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • JMGGL
    JMGGL over 16 years ago

    So the problem is the current version of NC-Verilog, since the string problem appears when I have compiled/elaborated your code with irun.

    Strange, since it seems to be last Cadence version.

    irun: 06.11-s011: (c) Copyright 1995-2008 Cadence Design Systems:

    ncvlog_cg: *W,NOSTRA: Non-string argument specified for $nc_mirror task at Line: 14 in File: ./test.sv.

    Thanks Tpylant.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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