• 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 interfaces to old fashion DUTs

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 64
  • Views 16058
  • 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 interfaces to old fashion DUTs

archive
archive over 17 years ago

While it looks clean (or so) how to connect two module exposing interfaces, My basic question is how to connect a system verilog interface to a old fashion verilog DUT
I have an issue connecting an interface to a DUTwhich is an old fashion verilog module (Verilog 1996), i.e. with traditional port declaration
The interface looks like this

interface xram_if

  (output CLK, nRST);

timeunit 1ns;
timeprecision 1ps;

  logic [7:0] AD;
  logic ALE;
  logic nWR;
  logic nRD;

  modport master (
    output nWR,
    output nRD,
    output ALE,
    inout AD,
    import write,
    import read
  );

  modport slave (
    input nWR,
    input nRD,

    input ALE,

    inout AD
  );
....

  task init ();
   begin
    ALE = 0;
    nRD = 1;
    nWR = 1;
    AD = `DATAW'bz;
    nrst    = 1'b1;
...

  endtask // init

  task write (
    input t_xram_addr addr,
    input t_xram_data data
  );
  begin
   ....

  end

  endtask // write

  task read (
    input t_xram_addr addr,
    output t_xram_data data
  );
  begin
...

  end
 endtask

I want to instantiate it in a test bench, e.g.

  xram_if xramif (
    .CLK(MCLK),
    .nRST(nRST)
  );

and I need a master interface to drive my DUT (so there are modports
above)
My DUT does not support interfaces (it is Verilog 2001)
How do I specifiy
- which interface flavor (master or slave)
How doi I connect my interface to the DUT?

The following does not work ...

I think I am missing sopme big points here ...

  vdt_top i_vdt_top(
...
    .access_if_ale_i               (xramif.master.ALE),
    .access_if_nwr_i               (xramif.master.nWR),
    .access_if_nrd_i               (xramif.master.nRD),
...

    .access_if_ad_0                (xramif.master.AD[0]),
    .access_if_ad_1                (xramif.master.AD[1]),
    .access_if_ad_2                (xramif.master.AD[2]),
    .access_if_ad_3                (xramif.master.AD[3]),
    .access_if_ad_4                (xramif.master.AD[4]),
    .access_if_ad_5                (xramif.master.AD[5]),
    .access_if_ad_6                (xramif.master.AD[6]),
    .access_if_ad_7                (xramif.master.AD[7]),

...

);


I feel I am missing some big points here ...

thanks to whoever will help on this



Originally posted in cdnusers.org by marco.stanzani
  • Cancel
Parents
  • archive
    archive over 17 years ago

    My first question is "do you really need modports?" If you are not sure, then you might be able to get by without them and your problem is solved. If you absolutely must have them, then I see the only solution is to create a wrapper for your dut that can take an interface with modport. module dut_wrapper(interface mif, sif); vdt_! top i_vdt_top( ... .access_if_ale_i (mif.ALE), .access_if_nwr_i (mif.nWR), .access_if_nrd_i (mif.nRD), ... ); endmodule module top; xram_if xramif_m (.CLK(MCLK), .nRST(nRST)); xram_if xramif_s (.CLK(MCLK), .nRST(nRST)); dut_wrapper dut (xramif_m.master, xramif_s.slave); endmodule Tim


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

    My first question is "do you really need modports?" If you are not sure, then you might be able to get by without them and your problem is solved. If you absolutely must have them, then I see the only solution is to create a wrapper for your dut that can take an interface with modport. module dut_wrapper(interface mif, sif); vdt_! top i_vdt_top( ... .access_if_ale_i (mif.ALE), .access_if_nwr_i (mif.nWR), .access_if_nrd_i (mif.nRD), ... ); endmodule module top; xram_if xramif_m (.CLK(MCLK), .nRST(nRST)); xram_if xramif_s (.CLK(MCLK), .nRST(nRST)); dut_wrapper dut (xramif_m.master, xramif_s.slave); endmodule Tim


    Originally posted in cdnusers.org by tpylant
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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