RE: [sv-bc] Function cannot return Unpack Array but can return unpack typedef

From: Steven Sharp <sharp_at_.....>
Date: Fri Mar 13 2009 - 16:51:41 PDT
>I believe that superlog had even defined some special syntax using '$' to 
handle the anonymous packed/unpacked array ambiguity. Something like:
>
>function  bit [3:0] func_arr  (bit [7:0] arg);            // packed array 
return type
>function  bit $ [3:0] func_arr  (bit [7:0] arg);         // unpacked array 
return type
>
>Thus, you could write function
>bit [3:0] $ [1:0] func_arr (bit [7:0] arg);
>
>Perhaps we can introduce something like this to SV? I'm not sure it's that 
worthwhile though.

If we wanted to allow this without a typedef, the natural syntax would
be what Abishek used: put the unpacked dimensions after the function
name, just as unpacked dimensions appear after the variable name.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Mar 13 16:53:07 2009

This archive was generated by hypermail 2.1.8 : Fri Mar 13 2009 - 16:54:27 PDT