query about system verilog interfaces

S

Suman

Guest
Hello Experts,
What should be output of the following RTL after systhesis ?
-----------------------------------------------------
interface ifc1;
wire a, b;
endenterface

interface ifc2;
wire x, y;
ifc1 u1;
endinterface

module top;
ifc2 u2;

bot IO (.u(u2));
endmodule

module bot (ifc2 u);
endmodule
-------------------------------------------------
Should it compile to something like :
------------------------------------------------
module top;
wire \u2.x , \u2.y , \u2.u1.a , \u2.u1.b;

bot (.\u.x (\u2.x ), .\u.y (\u2.y ), .\u.u1.a (\u2.u1.a ), .\u.u1.b
(\u2.u1.b ));
endmodule;

module bot (inout \u.x , \u.y , \u.u1.a , \u.u1.b );
endmodule
---------------------------------------------------------------------
I could not find any lead from the LRM 1800-2005 regarding
nesting of interfaces.
Can you please help me out ?

Thanks,
Suman.
 
On 8 Aug 2006 05:34:52 -0700, "Suman" <suman.nandan@gmail.com> wrote:

Hello Experts,
What should be output of the following RTL after systhesis ?
[snip example with interface ifc2 containing an instance
of interface ifc1]

-------------------------------------------------
Should it compile to something like :
------------------------------------------------
module top;
wire \u2.x , \u2.y , \u2.u1.a , \u2.u1.b;

bot (.\u.x (\u2.x ), .\u.y (\u2.y ), .\u.u1.a (\u2.u1.a ), .\u.u1.b
(\u2.u1.b ));
endmodule;

module bot (inout \u.x , \u.y , \u.u1.a , \u.u1.b );
endmodule
Yes, I think that's correct. Effectively, passing an interface
instance through a module port simply gives you a renaming
of that instance, from the point of view of the module. So you
are correct when you suggest that the signal "u2.u1.a" is
visible inside module bot as "u.u1.a", because interface
instance "u2" is passed to the module through interface port "u".

A Synopsys person once told me that Design Compiler
compiles the contents of an interface instance into the
body of the instantiating module.

I could not find any lead from the LRM 1800-2005 regarding
nesting of interfaces.
Your interface isn't strictly "nested". Both interface definitions
are at the top level; nesting implies that you've defined one
inside the definition of the other. Your example has an
interface *instance* inside another interface, which is fine.
Nested interfaces, in the sense I just described, are also
possible - but I'm not sure I understand what they could
be used for, and I'm even less sure that any tools support them.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top