RE: [sv-bc] nested interfaces & modports

From: Rich, Dave <Dave_Rich_at_.....>
Date: Thu Jun 12 2008 - 09:40:09 PDT
Nested interfaces didn't turn out to be a useful feature. People really
want inheritance.

 

You can get at nested identifiers by using modport expressions if you
must.

 

Dave

 

 

________________________________

From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Daniel Mlynek
Sent: Thursday, June 12, 2008 6:53 AM
To: 'sv-bc'
Subject: [sv-bc] nested interfaces & modports

 

LRM allows to have nested interfaces but there is no way for making such
nested interface visble through modport. Maybe there should be way to
specify interface on modport (as proposed in commented out text)

 

 

interface iface;

  interface n_iface;
        wire w;
    endinterface

wire x;
//    modport slave (interface n_iface , input x);
    modport slave (input x);
endinterface

 

module sub( iface.slave if_);
    assign if_.n_iface.w=1;//cannot be reached through interface
endmodule

 

module top;
        iface if1();
        sub uut(if1);
endmodule

 

 

 

DANiel

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jun 12 09:41:03 2008

This archive was generated by hypermail 2.1.8 : Thu Jun 12 2008 - 09:41:31 PDT