Re: [sv-bc] Does named modport port represent any data type?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Fri Sep 15 2006 - 08:44:01 PDT
Surya,
 
According to 20.4.4, 
 
       "The self-determined type of the port expression becomes the type
for the port."
 
Modport expressions are not defined in terms of the 1995 construct.
 
-- Brad

________________________________

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Surya Pratik Saha
Sent: Friday, September 15, 2006 12:26 AM
To: sv-bc@eda-stds.org
Subject: [sv-bc] Does named modport port represent any data type?


Hi, 
In SV 1800 LRM, following e.g. is given (section no. 20.4.4 Modport
expressions, page no. 359): 
interface I; 
logic [7:0] r; 
const int x=1; 
bit R; 
modport A (output .P(r[3:0]), input .Q(x), R); 
modport B (output .P(r[7:4]), input .Q(2), R); 
endinterface 
module M ( interface i);, 
initial i.P = i.Q; 
endmodule 
module top; 
I i1; 
M u1 (i1.A); 
M u2 (i1.B); 
initial #1 $display("%b", i1.r); // displays 00010010 
endmodule 

Here hierarchical reference is applied on named modport port 'P' and
'Q'. But do they represent any data type? 

LRM is not clear on that. If we consider equivalent e.g. with named port
in module port declaration corresponding to Verilog 2005 LRM: 
module top (.A(x), .B(y)); 
        input x,y; 
endmodule 

module test; 
        assign top.A = 1; 
endmodule 

This is invalid case. As  'A' does not represent any data type. So I
think the e.g. provided in SV LRM is wrong. 
-- 
Regards
Surya.
  
Received on Fri Sep 15 08:44:17 2006

This archive was generated by hypermail 2.1.8 : Fri Sep 15 2006 - 08:44:28 PDT