Re: [sv-bc] Straw man for parameterized functions

From: Brad Pierce <brad_pierce@acm.org>
Date: Mon Aug 09 2010 - 21:55:18 PDT

As I interpret the feedback from users, they'll either know or be able to
conveniently calculate the parameter values needed in function
specializations. I had been worried that we would end up seeing all calls to
parameterized functions hidden within macros like

       `define CALL1(foo, exp) foo#($bits(exp))(exp)

Apparently that was an unnecessary concern, and inference from the
self-determined types of the actuals will not be needed for readability.

So we don't really need to add parameterized functions, but could simply say
that a call like

      foo#(.N(2))(12);

is shorthand for

       foo#(.N(2))::foo(12)

where foo is both a class and a static method inside the class

       class foo#(…);
          static function ... foo(…); ... endfunction
       endclass

-- Brad

On Mon, Aug 2, 2010 at 10:29 AM, Brad Pierce <Brad.Pierce@synopsys.com>wrote:

> http://bradpierce.wordpress.com/2010/04/28/sv-parameterized-functions/
>
>
>
>
>
> --
> 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 Mon Aug 9 21:55:35 2010

This archive was generated by hypermail 2.1.8 : Mon Aug 09 2010 - 21:58:47 PDT