[sv-bc] inconsistency wrt ref arguments to static subroutines

From: Roger Lutz <rogerl_at_.....>
Date: Mon May 01 2006 - 09:04:54 PDT

Section 12.4.2 of IEEE 1800-2005 states:

"It shall be illegal to use argument passing by reference for
subroutines with a lifetime of static."

Following this sentence is an example which appears to contradict the above:

function int crc( ref byte packet [1000:1] );
  for( int j= 1; j <= 1000; j++ ) begin
    crc ^= packet[j];
  end
endfunction

Since the example is a code fragment, the example could appear in a
context where the function is automatic, but it is confusing without
the "automatic" specification.

Roger Lutz




Received on Mon May  1 09:04:57 2006

This archive was generated by hypermail 2.1.8 : Mon May 01 2006 - 09:05:07 PDT