One interpretation of these two requirements would be as follows: If a prototype contains a named port declaration, the out-of-block method declaration must contain an identical port declaration. If a prototype contains an anonymous port declaration, then the out-of-block method must contain a named port declaration, and that name shall be the authoritative name for the port (used in named argument association, etc.). I think this is pretty reasonable, and practical for the user. Regards, Doug From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Francoise Martinolle Sent: Tuesday, July 24, 2007 10:22 AM To: sv-ec@server.eda-stds.org; sv-bc@server.eda.org Subject: [sv-bc] tf_port_item footnote 33 Someone reported this inconsistency to me: In the SV BNF, there is a note in the tf_port_item production as follows: "tf_port_item33 ::= { attribute_instance } [ tf_port_direction ] [ var ] data_type_or_implicit [ port_identifier { variable_dimension } [ = expression ] ] 33) In a tf_port_item, it shall be illegal to omit the explicit port_identifier except within a function_prototype or task_prototype." tf_port_item is used in tf_port_list which is used in task_prototype, function_prototype and method prototype. But this seems contradictory with the text for out of block declarations in 8.22 "The out-of-block method declaration must match the prototype declaration exactly; the only syntactical difference is that the method name is preceded by the class name and the class scope resolution operator ::" So is the following code illegal? class foo; extern function bar ( int); // prototype endclass function foo::bar ( int i ); ... endfunction // function declaration If the explicit port_identifier is ONLY optional in a prototype, how can its implementation (task declaration or function declaration ) match exactly? If we believe the BNF and its note, the above extern'd prototype is legal but its implementation is not. Francoise -- 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 Tue Jul 24 14:43:22 2007
This archive was generated by hypermail 2.1.8 : Tue Jul 24 2007 - 14:43:31 PDT