Subject: Re: bump operators. How do we size the '1'
From: Clifford E. Cummings (cliffc@sunburst-design.com)
Date: Tue Jul 31 2001 - 12:25:11 PDT
At 07:23 PM 7/30/01 -0700, you wrote:
>>Page 21 - Anders: bump operators. How do we size the '1'. For example what
>>happens to the 1 the case of overflow. Statement needed in doc on the
>>"size" of the 1. Suggested wording: The resultant size of the operator is
>>the size of the operand.
>>Action - Stu to include wording in doc.
>>
>
>After thinking about this for more than 5 seconds, I don't believe
>there is an issue here. Contrary to what I said during the meeting,
>it doesn't really matter what size the constant one is, since the
>only natural interpretation is that auto-increment and auto-decrement
>(better terms than "bump operators") are self-determined. If a++
>means a = a + 1 the left context is a, so the size will be the size
>of a, regardless of what size the constant 1 is. This only needs an
>entry in the size table that says the result of auto-increment and
>auto-decrement is self-determined.
>
>John
I believe John is right.
I believe the objection to i++ and its variants had more to do with the
fact that expressions could be used almost anywhere and the vendors were
not crazy about parsing an i++ expression that might be passed as a
function input, module input, etc. As users, we wanted the ++ and --
capabilities, especially in the header of a for-loop, but the vendors
prevailed in convincing us that this was too burdensome to implement.
It is nice to see that Superlog was able to add the capability so easily.
Regards - Cliff
//*****************************************************************//
// Cliff Cummings Phone: 503-641-8446 //
// Sunburst Design, Inc. FAX: 503-641-8486 //
// 14314 SW Allen Blvd. E-mail: cliffc@sunburst-design.com //
// PMB 501 Web: www.sunburst-design.com //
// Beaverton, OR 97005 //
// //
// Expert Verilog, Synthesis and Verification Training //
//*****************************************************************//
This archive was generated by hypermail 2b28 : Tue Jul 31 2001 - 12:25:50 PDT