• 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. ncvlog -sv and ports of type "real"

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 4554
  • 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

ncvlog -sv and ports of type "real"

archive
archive over 18 years ago

Hi there,
For some system modeling I am looking into using ncvlog in SystemVerilog mode (ncvlog -sv) since I understand from some online documentation (www.deepchip.com/.../0466-04.html) that in SystemVerilog real data types can be passed hierarchically through ports.

Here is my test code:
    module test(input real x);
    endmodule

with the following result:
    ncvlog -sv test.v
    ncvlog: 06.11-s004: (c) Copyright 1995-2007 Cadence Design Systems, Inc.
    module test(input real x);
                       |
    ncvlog: *E,SVNTRL (test.v,1|23): A module port that is a net cannot be of type 'real' by         SystemVerilog language rules.

My questions are:
- does ncvlog -sv support real port types?
- are real port types indeed allowed in SystemVerilog by standard?

I am aware of the regular "workaround" using 64-bit vectors and $realtobits etc. but I was hoping to be able to use something more convenient.

Thanks
Axel


Originally posted in cdnusers.org by schuur
  • Cancel
  • archive
    archive over 18 years ago

    Try using the keyword 'var' in the port list

    // ncverilog real_io.sv +sv +linedebug +gui &

    module top();

    real rrr;

    one U1(rrr);

    two U2(rrr);

    endmodule


    module one(input var real rrr);
    initial
    #0 $display("%m %f", rrr);

    endmodule


    module two (output real rrr);
    initial
    rrr = 3.14159;

    endmodule


    Originally posted in cdnusers.org by tmackett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Indeed that does the trick.
    Thanks very much - it was hard to find this information otherwise.


    Originally posted in cdnusers.org by schuur
    • 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.

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

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