• 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. interface for bidirectional pins

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 64
  • Views 13920
  • 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

interface for bidirectional pins

archive
archive over 18 years ago

Hi

I trying to interface a bidirectional pin in sysytemverilog. in my interface declaration i have declared it as wire and in clocking block as inout...in my top module i'm using a reg to get values and then using the following syntax

assign my_if.biDir_pinname = reg_name;

in simulation i'm observing X. i also have to do a weak pullup. please guide on how to model and successfully interface bidirectional pins. i'm using cadence IUS5.83

Thanks 


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

    Hello,

    You will have to treat the wire in the interface like you would treat any wire in Verilog. It can only have one driver at a time. I believe you will have to conditionally assign reg_name:

    assign my_if.biDir_pinname = (enable_me) ? reg_name : 'bz;

    Here is a mini example:

    interface mod_if;
    wire [7:0] bidir_bus;
    logic enable1;
    endinterface : mod_if

    module one (interface my_if);
    assign my_if.bidir_bus = (enable1) ? 8'h11 : 8'hz;
    endmodule : one

    module two (interface my_if);
    assign my_if.bidir_bus = (enable1) ? 8'hz : 8'h22;
    endmodule : two

    module top();
    mod_if my_if();
    one m1 (my_if);
    two m2 (my_if);

    initial begin
    my_if.enable1 = 1;
    repeat (4)
    #1 my_if.enable1 = ~my_if.enable1;
    end

    initial $monitor(my_if.enable1,, my_if.bidir_bus);
    endmodule : top

    Kathleen Meade


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