Hello, According to SV LRM 1800-2005 "Formal arguments of imported functions can be specified as open arrays." and nothing is mentioned about imported task for this context and Dhiraj raised a question on this. and Doug answers Dhiraj that- Formal arguments of imported tasks can not be specified as open arrays. And you said that "a string can be considered a dynamic array of byte's" So string datatype can not be allowd as a formal arguments of imported task. But In SV LRM 1800-2005 sec 26.4.4 we found an example- import "DPI" task checkResults(input string s, bit [511:0] packet); So please make a comment on this. Thanks, Moumita Arturo Salz wrote: > 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 *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 Jan 17 02:33:14 2008
This archive was generated by hypermail 2.1.8 : Thu Jan 17 2008 - 02:33:42 PST