Re: [sv-bc] RE: [sv-ec] Are variable-width part selects already part of the SV language? (Mantis 2684)

From: Brad Pierce <brad_pierce@acm.org>
Date: Mon May 10 2010 - 08:07:49 PDT

> It can't be used within an expression, without wrapping it in a function first.

Shalom said that he only needed it in an assignment-like context.

If he needed it an expression, he could wrap it in a parameterized
function, if we added those to the language.

When someone asks for a syntax enhancement, let's also consider
whether the real need might be for an extensibility enhancement.

-- Brad

On Mon, May 10, 2010 at 7:48 AM, Steven Sharp <sharp@cadence.com> wrote:
>
>>From: Brad Pierce <brad_pierce@acm.org>
>
>>
>>Your version with 'foreach' is as clear as Shalom's original
>>
>>     foreach (out[i])
>>        out[i] = (i >= N) ? in[i] : replace[i] ;
>>
>>So his example doesn't demonstrate a need for variable width part-selects.
>
>
> A "need", no.  Anything you could write with a variable width part-select
> that ultimately results in a fixed width, you could write with bit-selects
> and a loop.
>
> The issue is presumably that this could be less convenient.  It can't be
> used within an expression, without wrapping it in a function first.
>
>
> Steven Sharp   |   Architect   |   Cadence
>
> P: 508.459.1436   M: 774.535.4149   www.cadence.com
>
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon May 10 08:08:17 2010

This archive was generated by hypermail 2.1.8 : Mon May 10 2010 - 08:10:59 PDT