[sv-bc] Possible errata in LRM 3.1a sections 19.6, A.2.6 and A.2.7, modport task/function prototypes

From: Stuart Sutherland <stuart@sutherland-hdl.com>
Date: Mon Aug 30 2004 - 06:00:57 PDT

I feel there is some errata in the 3.1a LRM regarding modport task/function
prototypes.

1) As near as I can tell from BNF sections A.2.6 and A.2.7, the prototype of
a task or function can assign default values to the task/function arguments.
If this is wrong, then the BNF for prototypes needs to use a different
production than "tf_port_list". If this is correct, then Section 19.6 on
modport prototypes needs to state if the prototype default values override
any default values in the formal argument definitions, or if the default
values of the prototype and the formal must exactly match. I did not check
to see if DPI prototypes are also affected by this section of the BNF.

2) Section 19.6.1, last paragraph, says "The number and types of arguments
in a prototype must match the argument types in the function or task
declaration". However, the examples in 19.6.2 do not follow this rule. The
examples show tasks with formal arguments, and prototypes of those tasks
with no arguments. Either the text is wrong, or the examples are wrong. I
did not search for other examples of modport prototypes that might also be
wrong.

3) The subheading for section 19.6.1 is misleading. It says "An example of
using tasks in an interface", but following the example code is normative
text that is introducing a new topic, task/function prototypes in modports.
I suggest the text in 19.6.1 be moved to 19.6, after the first paragraph.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland Sutherland HDL Inc.
stuart@sutherland-hdl.com 22805 SW 92nd Place
phone: 503-692-0898 Tualatin, OR 97062

Sutherland HDL, Inc. -- Training Engineers to be Verilog, SystemVerilog
and VHDL Wizards! http://www.sutherland-hdl.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Mon Aug 30 06:01:40 2004

This archive was generated by hypermail 2.1.8 : Mon Aug 30 2004 - 06:01:48 PDT