• 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. What is the correct syntax for forcing signal in a Verilog...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 66
  • Views 36272
  • 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

What is the correct syntax for forcing signal in a Verilog testbench

Blaise70
Blaise70 over 14 years ago

Hi All,

I have a Verilog testbench where I would like to force some signals.

I'm using the following code in my Verilog file:

$nc_force("/full_path/sugnal_name","'b1");

Compilation seems to be OK, but during run-time I get the following error message:

ncsim: *E,SETNEL: Poorly formed string/enumeration literal: 'b1.

Can someone give me the correct syntax for the value to be forced? I have already tryed a lot of different strings, but none of them works.

Thanks in advance.

Best regards,

Blaise70

  • Cancel
Parents
  • StephenH
    StephenH over 14 years ago

    Did you try without the 'b part?

    In case you're not aware, the 6 letter error code can be used to display additional information:

    % nchelp ncsim SETNEL

    nchelp: 09.20-s031: (c) Copyright 1995-2010 Cadence Design Systems, Inc.
    ncsim/SETNEL =
            An attempt was made to force/nc_mirror a VHDL object using an invalid
            string or enumeration literal.
            Examples:
                    {"0001"}        -- legal
                    {"howdy"}       -- legal for a string type VHDL object
                    X"DF"           -- legal, format specifier can be used
                    {X"DF"}         -- legal, format specifier can be used
                    'a'             -- legal
                    {"0XXX_1111"}   -- underscores are legal
                    "0001"          -- invalid, '"' need to be escaped
                    {"FALSE, FALSE, TRUE"}    -- invalid for a boolean type
                    '_'                       -- invalid
                    '0',                      -- comma after the literal is invalid
     

    Notice how none of the examples use 'b.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • StephenH
    StephenH over 14 years ago

    Did you try without the 'b part?

    In case you're not aware, the 6 letter error code can be used to display additional information:

    % nchelp ncsim SETNEL

    nchelp: 09.20-s031: (c) Copyright 1995-2010 Cadence Design Systems, Inc.
    ncsim/SETNEL =
            An attempt was made to force/nc_mirror a VHDL object using an invalid
            string or enumeration literal.
            Examples:
                    {"0001"}        -- legal
                    {"howdy"}       -- legal for a string type VHDL object
                    X"DF"           -- legal, format specifier can be used
                    {X"DF"}         -- legal, format specifier can be used
                    'a'             -- legal
                    {"0XXX_1111"}   -- underscores are legal
                    "0001"          -- invalid, '"' need to be escaped
                    {"FALSE, FALSE, TRUE"}    -- invalid for a boolean type
                    '_'                       -- invalid
                    '0',                      -- comma after the literal is invalid
     

    Notice how none of the examples use 'b.

     

    • 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