RE: [sv-bc] SV-BC Issue 24

From: Mark Hartoog <Mark.Hartoog@synopsys.com>
Date: Mon May 10 2004 - 08:45:45 PDT

My thought was that we should cast the value to the type of the parameter.
If that cast is illegal, then the parameter value assignment would be
illegal. The case you mention below should result in a illegal unpacked
array cast, and so should be illegal.

> As far as the composite types are concerned, I don't think we should allow
> conversion to the target type, we should require that the expression be of the
> composite type, otherwise it is a type check error. The analogy to make is that
> we don't allow a variable assignment of a struct type to have a value which is
> not of that exact struct type.
> For instance if we have:
> parameter real p [1:3] = {0.0, 0.1, 0.2};
> The RHS expression is an array aggregate of size 3, which matches the
> array size declaration of the parameter.
> parameter real p [1:3] = {0.0, 0.1};
> In this last example, the parameter declaration has a type check error, the
> array aggregate does not match the size of the parameter array.
>
> Francoise
Received on Mon May 10 08:45:52 2004

This archive was generated by hypermail 2.1.8 : Mon May 10 2004 - 08:46:01 PDT