RE: [sv-bc] Are modport port directions enforced?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Mon Feb 26 2007 - 14:00:18 PST
I meant that the same rules would apply to a component of a modport
declared 'input' as would apply to a conventional port of the same type
declared 'input'.  So it would be illegal to assign to an input variable
component of a modport for the reasons in 6.7 --

   "A continuous assignment is implied when a variable is connected to
an input port declaration. This makes assignments to a variable declared
as an input port illegal."

-- Brad

-----Original Message-----
From: Francoise Martinolle [mailto:fm@cadence.com] 
Sent: Monday, February 26, 2007 1:28 PM
To: Brad Pierce; sv-bc@eda-stds.org
Subject: RE: [sv-bc] Are modport port directions enforced?

Brad,

OK. You are suggesting that "to restrict interface access" should be
interpreted as it should be an error to write to a modport port of
direction input or read from a modport port of direction output.
I agree with you that we should raise an error (otherwise what is the
direction of a modport port for?), but that is not clear in the LRM

Francoise
    '

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad
Pierce
Sent: Monday, February 26, 2007 4:21 PM
To: sv-bc@eda-stds.org
Subject: Re: [sv-bc] Are modport port directions enforced?

According to 20.4

"To restrict interface access within a module, there are modport lists
with directions declared within the interface. The keyword modport
indicates that the directions are declared as if inside the module."

-- Brad


________________________________

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Francoise Martinolle
Sent: Monday, February 26, 2007 1:19 PM
To: Mark Hartoog; sv-bc@eda-stds.org
Subject: RE: [sv-bc] Are modport port directions enforced?


Where is the LRM text supporting your answer?


________________________________

	From: Mark Hartoog [mailto:Mark.Hartoog@synopsys.com] 
	Sent: Monday, February 26, 2007 4:17 PM
	To: Francoise Martinolle; sv-bc@eda-stds.org
	Subject: RE: [sv-bc] Are modport port directions enforced?
	
	
	If it is a variable, as in your example, it should be an error.
If it is a net, then you might argue it should be allowed.


________________________________

		From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]
On Behalf Of Francoise Martinolle
		Sent: Monday, February 26, 2007 1:08 PM
		To: sv-bc@eda-stds.org
		Subject: [sv-bc] Are modport port directions enforced?
		
		
		I have a question regarding the modport port directions.
		If I declare a modport port in an interface with
direction input, should it be an error
		if the module which uses this modport tries to assign to
the modport port of direction input?
		 
		I cannot find anything in the LRM which talks about
modport port direction enforcements.
				interface data_if ();
		 
		logic [31:0] d;
		 
		modport in  (input d);
		
		modport out (output d);
		 
		endinterface: data_if
		 
				module duv (data_if.in i, data_if.out
o);
		 
		assign i.d = o.d;     ====> is this allowed?
		 
		endmodule: duv
		 
		endinterface: data_if

		-- 
		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 <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.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Feb 26 14:00:42 2007

This archive was generated by hypermail 2.1.8 : Mon Feb 26 2007 - 14:00:48 PST