• 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. Mixed-Signal Design
  3. SysVerilog bidirectional port with wreal nettype from c...

Stats

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

SysVerilog bidirectional port with wreal nettype from cds_rnm_pkg

HoWei
HoWei over 2 years ago

Hi,

I was following this tutorial video https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O3w000009bfBiEAI&pageName=ArticleContent and created my own design. It uses the Cadence internal "$cged()" function to assign internal variables with the resolved net value of the declared nettype.

It will model 2 transmission gates, where each gate has 2 ports (A,B). The first gate has the nettype "wrealsum", whereas the second gate has the nettype "wrealmax".  This shall lead to different values on the nets, when the transimmion gate is enabled and driven with multiple drives (which is not the case in this example - here only 1 driver is connected):

import cds_rnm_pkg::*; //from dmsLib

`define resTyp1 wrealsum
`define resTyp2 wrealmax

module tb_wreal_TXRXdmy (
inout `resTyp1 InOut1A,
inout `resTyp1 InOut1B,
inout `resTyp2 InOut2A,
inout `resTyp2 InOut2B,
input logic control
);

//internal nets to store the external resolved value
`resTyp1 io1A;
`resTyp1 io1B;
`resTyp2 io2A;
`resTyp2 io2B;

initial begin
$cged(InOut1A, io1A); //$cged is required to store
$cged(InOut1B, io1B); //the resolved net value
$cged(InOut2A, io2A); //of the outside driving
$cged(InOut2B, io2B); //resolution function
end

//assign the internal signal to the other port
assign InOut1A = (control==1'b1) ? `wrealZState : io1B;
assign InOut1B = (control==1'b1) ? `wrealZState : io1A;
assign InOut2A = (control==1'b1) ? `wrealZState : io2B;
assign InOut2B = (control==1'b1) ? `wrealZState : io2A;

endmodule

The "control" is stimulated with a clock signal (20ns periode) and the input signals are applied to "InOutA1= 4.0" and "InOutA2=3.0". Both output signals "InOutB1" and "InOutB2" are open (not connected).

What I am expecting to see at the outputs is values toogling between the input values "4.0/3.0" and "Z".  But this is not the case.

Instead the output values at "InOutB1" and "InOutB2" are constantly showing the input signals "4.0/3.0".  

Why is that - any idea ?

  • Cancel
  • HoWei
    HoWei over 2 years ago

    It turns out that the above code is correct - but the VIVA display tool does not distinguish between "wreal value" and "wrealZState".

    It both looks the same as a single line at 3.0.

    You only can see the difference if you user a vertical cursor and readout the values - then it toogles between "3.0" and "Z".

    I consider this a bug - it cost me more than a day to figure that out:

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to HoWei

    I'm a little surprised about this, since ViVA has had support for plotting wrealZstate and wrealXstate values since IC6.1.5 ISR8 (for 11 years). I just opened a database with X/Z value and it works fine:

    That said, I see a note in the documentation saying that there's a limitation with signals from ADE (the above was using the results browser). Maybe that's it.

    Anyway, I see you've filed a case 46684577 on this - I'll leave the team to handle it (this was a very, very quick answer as I am rather over-committed at the moment and can't spend much time on the forums).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 2 years ago in reply to Andrew Beckett

    For completeness and FYI, I am using:

    - ICADVM20.10.160

    - Spectre 21.10.460

    - Xcelium 22.09.002

    But yes, the Cadence support team is working on it now.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    Cadence support response is very slow on this topic.

    Did you use VerilogAMS simulation results in your above plots, or SytemVerilog simulation results with the "cds_rnm_pkg" as shown above ?

    I am not able to get the same results as you do - I was using the results browser as well.

    EDIT: 

    I can confirm that in IC6.1.8.230 the display is showing the good X and Z states, as in your plot above.

    But in IC6.1.8.260 it is buggy and in ICADVM20.10.160.

    • 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