Re: [sv-ec] Re: [sv-bc] Packed arrays


Subject: Re: [sv-ec] Re: [sv-bc] Packed arrays
From: Steven Sharp (sharp@cadence.com)
Date: Wed Jan 29 2003 - 17:03:46 PST


>Date: Wed, 29 Jan 2003 16:27:48 -0800 (PST)
>From: "Kevin Cameron x3251" <Kevin.Cameron@nsc.com>

>> I do agree that it would be far nicer if one didn't have to call
>> $realtobits and $bitstoreal when passing things around.
>
>That's where the real inefficiency is.

Are you assuming that because these are called "system functions", the
compiler actually has to generate a function call? I assure you that
NC-Verilog doesn't do anything of the sort. That would be inefficient.

>The code above should behave the same in SV as it does in C, the
>argument is about the behavior in packed structs/unions. Your example
>shows that there is no real difference in the FP representation (IEEE
>I presume) between X86 and Sparc so there would only be minor bit twiddling
>required if you pick a particular order for packed doubles.

There is no guarantee that this is the only difference on all different
platforms. If this is the only difference, the cost is approximately
the same as a $bitstoreal and $realtobits on each read and write of the
packed double. And you have yet to provide a reason why a user needs this.

Steven Sharp
sharp@cadence.com



This archive was generated by hypermail 2b28 : Wed Jan 29 2003 - 17:04:42 PST