Shalom,
The purpose of
out[127:0] = { in[127:N], replace[N-1:0] } ;
is to construct the new vector. Variable-width part-select was just
one proposed means to that end.
You couldn't implement a variable-width part-select operator with a
parameterized function, but you could implement the foreach of
http://www.eda.org/sv-bc/hm/10223.html
foreach (out[i])
out[i] = (i >= N) ? in[i] : replace[i] ;
because out, in, and replace all have a width that is known at elaboration time.
-- Brad
On Mon, May 10, 2010 at 8:10 AM, Bresticker, Shalom
<shalom.bresticker@intel.com> wrote:
> I don't see how a parameterized function would help. Function parameter overrides also have to be constants.
>
> Shalom
>
>
>> -----Original Message-----
>> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On
>> Behalf Of Brad Pierce
>> Sent: Monday, May 10, 2010 6:08 PM
>> To: Steven Sharp
>> Cc: sv-bc@eda.org; sv-ec@eda.org
>> Subject: Re: [sv-bc] RE: [sv-ec] Are variable-width part
>> selects already part of the SV language? (Mantis 2684)
>>
>> > 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
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
>
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon May 10 08:23:42 2010
This archive was generated by hypermail 2.1.8 : Mon May 10 2010 - 08:26:22 PDT