Re: [vhdl-200x-ft] Re: Bit size rules (summary)

From: Jim Lewis <Jim@SynthWorks.com>
Date: Wed Jul 07 2004 - 07:32:16 PDT

David,
>> PROPOSAL 4
>>
>> Define mixed signed/unsigned logic. Add "+", "*", "-", and "/" operators
>> for all combinations of UFIXED/SFIXED. This is another fairly common
>> operation in signal processing hardware that is well-defined. David
>> noted
>> that bit literals need a type cast anyway, so we shouldn't have the same
>> problem as mixed arithmetic in numeric_std.
>
>
> The questions raised around this one have to do with bit litterals. Since
> you can't do a bit literal with an open ended type, this is not an issue.
> Once again, unless there is an objection this is Approved.

Consider this an objection.
I think the methodology here needs to be discussed and voted
upon here. In that discussion I would include all mixed
functions, such as: Y_ufixed <= A_ufixed + B_unsigned ;

On one hand, by providing the overloading makes the above
happen automatically, so the following would be legal:
   Y_ufixed <= A_ufixed + B_unsigned ;

On the otherhand, if we don't provide the overloading, we
would need to write something like the following:
   Y_ufixed <= A_ufixed + to_ufixed(B_unsigned) ;

I for one like the additional notation when moving
between types. Although requiring this makes it harder
on the coder, it certainly makes the code easier to
review.

Cheers,
Jim

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training             mailto:Jim@SynthWorks.com
SynthWorks Design Inc.           http://www.SynthWorks.com
1-503-590-4787
Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Wed Jul 7 07:32:18 2004

This archive was generated by hypermail 2.1.8 : Wed Jul 07 2004 - 07:32:20 PDT