[sv-bc] Review of LRM Section 10


Subject: [sv-bc] Review of LRM Section 10
From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Fri Feb 06 2004 - 19:23:52 PST


---------------------------------------------------------------------
----- Syntax 10-2 -------

   task_body_declaration needs to be updated to reflect A.2.10.
   Specifically,

            ( task_port_list )

      should be

            ( [ tf_port_list ] )

   "A.2.1" --> "A.2.1.3" for lifetime

---- Syntax 10-3 ------

   "A.2.1" --> "A.2.1.3" for lifetime

----- 10.3.1 -------------

   "10.3.1 Void functions" --> "10.3.1 Return values and void functions"

   The call to myfunc1() disagrees with its prototype,
   and the input to myfunc1() is ignored. I'd suggest changing
   the definitions of myfunc1() and myfunc2() to

     function [15:0] myfunc1( input [7:0] x, y ) ;
        myfunc1 = x * y - 1; // return value is assigned to function name
     endfunction

     function [15:0] myfunc2( input [7:0] x, y ) ;
        return x * y - 1; // return value is specified using return
statement
     endfunction

----- 10.4.1 -----

   "Pass by value" in the first sentence of 10.4.1 should
   not be italicized.

----- 10.4.2 -----

   I think it would be more natural if, instead of using the show()
   task in the final example, we would just continue the running
   example of crc(). But I don't feel strongly about that.

   "generate compiler error" --> "generate a compiler error"

------ 10.4.4 ------

  AFTER

    fun( .j(2), .s("yes") ); // fun( 2 , "yes" );

  ADD

    fun( .s("yes"), .j(2) ); // fun( 2 , "yes" );
    fun( .s(), .j() ); // fun( 1 , "no" );

(The last example would point out a useful consequence of
"If the arguments have default values, they are treated like
parameters to module instances." As explained in the
V2K LRM (12.2.2.2) "The parameter expression is optional so
that instantiating the module can document the existence of
a parameter without assigning anything to it.")

--------------------------------------------------------------------



This archive was generated by hypermail 2b28 : Fri Feb 06 2004 - 19:34:21 PST