• 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. Connecting outputs of type "real"?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 64
  • Views 7008
  • 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

Connecting outputs of type "real"?

archive
archive over 17 years ago

Hi,
For a system modeling task with sytemverilog, I have various blocks that have outputs of type "real". To match the hardware being modeled (an analog circuit), these outputs need to be connected together. Only one of these blocks would have valid outputs at one time, the others would have a high-impedance ("z") value.
However, there seems to be some fundamental problem with connecting module outputs of type "real" together, since variables cannot have multiple drivers, and "real" data types are variables.

Here is a test case and the result:

module test1;

    real a;
    real b;

    initial
    begin
        a = 0.0;
    end

    test1a t1(.A(a),.B(b));
    test1a t2(.A(a),.B(b));

endmodule

module test1a(A,B);
    input var real A;
    output var real B;

    always @(A)
        B = A;

endmodule

> ncverilog +sv test.v
ncverilog: 06.11-s004: (c) Copyright 1995-2007 Cadence Design Systems, Inc.
file: test.v
        module worklib.test1:v
                errors: 0, warnings: 0
        module worklib.test1a:v
                errors: 0, warnings: 0
                Caching library 'worklib' ....... Done
        Elaborating the design hierarchy:
        test1a t2(.A(a),.B(b));
                         |
ncelab: *E,MULDRV (./test.v,12|18): Multiple drivers to variable b detected.
ncverilog: *E,ELBERR: Error during elaboration (status 1), exiting.

Does anyone have an idea on how to solve this?

Thanks!
Axel


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

    Not sure if it it legal for real but wire instead of var is the correct net_type to do this for "logic". "Var" is only single source and "wire" allows multiple sources.


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

    wire can't be real. Use $realtobits with wire[63:0].


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

    That is, wire [63:0].

    Posted By shalom on 12/09/2007 2:22 AM
    wire can't be real. Use $realtobits with wire[63:0].



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

    Last try: wire [ 63 : 0 ].


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