Subject: proposals for auto-increment and shortreal to 32 bit conversion
From: Karen Pieper (Karen.Pieper@synopsys.com)
Date: Fri Dec 06 2002 - 14:09:48 PST
These proposals are my two action items from the 11/15 meeting.
Increment decrement proposal:
In Section 7.3:
REPLACE: SystemVerilog also includes the C incrementor and decrementor
operators ++I, --I, I++ and I (provided there is no timing control). These
can be used in expressions without parentheses. These increment and
decrement operations behave as blocking assignments.
WITH: SystemVerilog also includes the C incrementor and decrementor
operators ++I, --I, I++ and I (provided there is no timing control). These
can be used in expressions without parentheses. These increment and
decrement operations behave as blocking assignments. The ordering of the
increment operation relative to any other operation within the statement is
implementation dependent. An implementation may warn whenever a variable
is assigned to more than once within a given statement, indicating the
potential for multiple correct interpretations of the statement.
Short-real conversion proposal
In Section 3.8:
REPLACE: When a shortreal is converted to an int, its value is rounded as
in Verilog. So the conversion can lose information. When a shortreal is
converted to 32 bits, its bit pattern is preserved, which means it can be
converted back to the same value without any loss of information. This
technique can also be used for structures, where the $bits attribute gives
the size of a structure in bits (the $bits system function is discussed in
section 16.2):
WITH: When a shortreal is converted to an int or to 32 bits, its value is
rounded as in Verilog. So the conversion can lose information. To convert
a shortreal to bits without a loss of information, use
<Gord's function proposals go here>.
Structures can be converted to bits preserving the bit pattern, which means
they can be converted back to the same value without any loss of
information. The following example demonstrates this conversion. In the
example, the $bits attribute gives the size of a structure in bits (the
$bits system function is discussed in section 16.2):
This archive was generated by hypermail 2b28 : Fri Dec 06 2002 - 14:12:02 PST