• 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. Custom IC Design
  3. How to model bidir switch in RNM

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 126
  • Views 14304
  • 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

How to model bidir switch in RNM

dontknow
dontknow over 4 years ago

I was wondering if there was a way of modelling bidir switch.

Using code, I always have a problem of propagating signal.

For instance:

module bidir_sw( a, b, ctrl);

inout a;

inout b;

inout ctrl

wreal a;

wreal b;

logic ctrl;

// this will only work from b -> a

assign a = (ctrl == 1'b1) ? b : `wrealZState;   

// this will only work from a -> b

assign b = (ctrl == 1'b1) ? a : `wrealZState;

endmodule

Is there an easy way to make it work both ways, using XCELIUM ?

  • Cancel
Parents
  • dontknow
    dontknow over 4 years ago

    Hi Frank, 

    thanks for reply.

    Can I do it using vams ? Or SystemVerilog is the only way to achieve it ? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago in reply to dontknow

    It seems to be possible with VAMS as well, if I read the manual section Writing Bidirectional Model Behavior correctly.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dontknow
    dontknow over 4 years ago in reply to Frank Wiedmann

    Hi Frank,

    sorry to bother you again, but I still don't understand hot the whole thing works. Would yoy be able to provide me with vams module that does behaves like a bidirectional  switch ?

    Thank you,

    Gianluca

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dontknow
    dontknow over 4 years ago in reply to Frank Wiedmann

    Hi Frank,

    sorry to bother you again, but I still don't understand hot the whole thing works. Would yoy be able to provide me with vams module that does behaves like a bidirectional  switch ?

    Thank you,

    Gianluca

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago in reply to dontknow

    The vams module is given in the manual section I mentioned. I don't think that I am allowed to post the code here (someone from Cadence might be able to do so).

    • 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