Subject: Re: [sv-ec] Re: [sv-bc] Packed arrays
From: Kevin Cameron x3251 (Kevin.Cameron@nsc.com)
Date: Fri Jan 31 2003 - 15:42:55 PST
> From: "Steven Sharp" <sharp@cadence.com>
>
> >There doesn't appear to be a good reason why you can't connect packed structs
> >through ports to me, but I don't need to since I can put the struct in an
> >interface and share it that way.
>
> Which may be sufficient for your needs. However, variables shared via an
> interface don't provide all the capabilities that HW designers get with nets:
> things like driver resolution, net delays, path delays, interconnect delays
> and SDF back annotation.
Which is a major problem, but we'll fix that some other time...
> >Well, since people build hardware that processes reals as well as ints I see
> >no reason for making a distinction.
> >
> >How would you describe a bus carrying a double value as well as other values?
>
> As Mac pointed out, HW designers don't build hardware that processes reals.
They don't? I could swear that the ARM and DSP cores in my chip are throwing
reals across their busses quite happily.
> They build hardware that processes the bits that represent floating point
> numbers in the format that their hardware is designed for.
Which is usually IEEE format around here.
> If someone is working with Verilog reals as data, they are working with
> abstractions. There is no reason to require that they be mapped to a
> particular hardware representation as a vector of bits. So there is no
> reason to require them to be allowed in a packed struct. And if they were
> allowed in a packed struct, there would be no reason to require a particular
> bit layout.
Lots of modern processors have internal 64 bit data-paths that will carry
64-bit IEEE format reals some of the time.
> If I was working with an abstraction that I wanted to be able to use to
> hold/carry a real as well as other values, I would use a non-packed struct.
>
> Steven Sharp
> sharp@cadence.com
The non-packed stucture is definitely an abstract type, packed structs and
unions are intended to model things like busses.
If you don't use IEEE FP in your design, fine you don't need it in packed
structs. If you do it's going to be unnecessarily awkward getting values
from abstract behavioral code into the hardware and back out again if you
can't put them in packed structs.
I don't see any downside to defining how real values fit into packed
structs, you don't have to use it if you don't want to.
Kev.
This archive was generated by hypermail 2b28 : Fri Jan 31 2003 - 15:45:55 PST