Subject: Re: [sv-cc] Updated LRM - functions for bit type part-selects
From: Andrzej Litwiniuk (Andrzej.Litwiniuk@synopsys.com)
Date: Wed Mar 19 2003 - 11:31:50 PST
> I think the single most useful function for data extraction
> from packed bit vectors is the one you've defined as,
>
> > svBitVec32 svGetBits(const svBitPackedArrRef s, int i, int w);
>
> This will be the workhorse function for processing slides from
> most packed vector function arguments
I suppose so.
> If we can provide an
> equivalent that will allow us to also conveniently handle packed
> arrays between 33 bits and 64 bits in size that would be nice to.
> For example to extract the 48 bit destination or source
> address from an ethernet header into a long long.
I previously didn't notice your modified comment "Up to 64-bits"
and of course "up to" was key. Thus I misread your proposal; 'w' was
really needed for the "up to 64" variant. I had a fixed width 64 in my mind.
> As for having dedicated functions to extract whole 32 or
> 64 bit quantities, I don't think it is worth it.
>
> Perhaps for now, in the interest of simplicity, we should
> just add the svGetBits() function as you've defined it above
> and not bother with the fixed width variants.
>
> -- johnS
I have no opinion whether fixed 32-bit and 64-bit variants are worthy.
Neither I have any clue how useful may be the variant for 33 to 64 bits.
There would be an issue of unused bits with a variable width variant for 33
to 64 bits. Sign extension or zeroes? We provide auxiliary macros for 32-bit.
Regards,
Andrzej
This archive was generated by hypermail 2b28 : Wed Mar 19 2003 - 11:32:47 PST