RE: [sv-bc] RE: [sv-ec] Is string valid data type for 'foreach' array

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Jan 17 2008 - 01:07:43 PST
Whether foreach can be used with queues was discussed in the thread
starting at http://www.eda-stds.org/sv-ec/hm/4673.html. There was a
consensus that the answer is yes. 
 
Jonathan asked in http://www.eda-stds.org/sv-ec/hm/4686.html whether
foreach can be used with a string, but no one replied.
 
(By the way, what is the status of Mantis 888? A bug note says it is
waiting for changes from the Technical Committee (SV-EC).)
 
1447 attempts to settle that queues are arrays. It changes:

*	6.22.1(f) to say, "Two array types match if they are both packed
or both unpacked, are the same kind of array (fixed-size, dynamic,
associative, or queue), ..."
*	6.22.2(d) to say, "Dynamic array, associative array and queue
types are equivalent if they are the same kind of array (dynamic,
associative, or queue), ..."
*	7.4 to say, "Unpacked arrays may be fixed-size arrays (see
7.4.2), dynamic arrays ( see 7.5), associative arrays (see 7.9), or
queues (see 7.11)"
*	7.7 to say, "This is true for all array types: fixed-size,
dynamic, queue, or associative."

Shalom


________________________________

	From: owner-sv-ec@server.eda.org
[mailto:owner-sv-ec@server.eda.org] On Behalf Of Rich, Dave
	Sent: Thursday, January 17, 2008 9:11 AM
	To: Arturo Salz; Surya Pratik Saha; sv-ec@server.eda.org
	Subject: RE: [sv-bc] RE: [sv-ec] Is string valid data type for
'foreach' array
	
	

	12.7.3 will have to be modified because a queue is no longer an
array, or is it?

	 

	Dave

	 

	 

	
________________________________


	From: owner-sv-bc@server.eda.org
[mailto:owner-sv-bc@server.eda.org] On Behalf Of Arturo Salz
	Sent: Wednesday, January 16, 2008 11:02 PM
	To: Surya Pratik Saha; sv-ec@server.eda.org;
sv-bc@server.eda.org
	Subject: [sv-bc] RE: [sv-ec] Is string valid data type for
'foreach' array

	 

	Yes. The foreach should iterate over a string variable. In this
respect, a string can be considered a dynamic array of byte's.

	 

	            Arturo

	 

	
________________________________


	From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf
Of Surya Pratik Saha
	Sent: Wednesday, January 16, 2008 10:14 PM
	To: sv-ec@eda.org; sv-bc@eda.org
	Subject: [sv-ec] Is string valid data type for 'foreach' array

	 

	Hi,
	SV 1800-2008 draft LRM defines 'foreach' array as follows:
	12.7.3 The foreach loop
	The foreach-loop construct specifies iteration over the elements
of an array. Its argument is an identifier that designates any type of
array followed by a comma-separated list of loop variables enclosed in
square brack-ets.
	
	Is 'string' type allowed as array. Is the following case valid?
	module top;
	    string s;
	    initial begin
	        foreach (s[i]) begin
	        end
	    end
	endmodule
	
	
	

	-- 
	Regards
	Surya

	-- 
	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 <http://www.mailscanner.info/> MailScanner,
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. 

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jan 17 01:11:46 2008

This archive was generated by hypermail 2.1.8 : Thu Jan 17 2008 - 01:13:00 PST