From: stefen@boyd.com
Date: Tue Jul 27 1999 - 11:13:56 PDT
Hi all,
Here's the proposal for the expression size issue Cadence
raised in our last telconf.
Regards,
Stefen
--------------------
Stefen Boyd
__
| \ ____
|_/_ |
| \ |__
|___/oyd |
|___nterprises
stefen@boyd.com
(408)739-BOYD
(408)481-9658 (fax)
========================================
Details:
The size for the multiplication operator is not correct. It
was noted that when used in a self-determined expression (such as
$display(a*b)) that the size is not L(i)+L(j) as noted in Table
4-21, but actually max(L(i),L(j)). More importantly, if the size
of the result of the power operator was determined by the
equation given, 2**32 (both numbers are unsized... so use native
size of integer - 32bits typically) would result in a vector of
size of 13743895340. This is more (128gig) than your 32 bit
machine machine can address.
Proposal:
Delete entry for i**j in Table 4-21. Add i**j to the list of
operators in the 9th row: ">>,<<"
Delete entry for i*j in Table 4-21. Add i*j to the list of
operators in the 3rd row: "+ - / $ & | ^ ^~ ~^"
Add Section 4.4.3 - Example of self-determined expressions
reg [3:0] a;
reg [5:0] b;
reg [15:0] c;
initial begin
a = 4'hF;
b = 6'ha;
$display("a*b=%x",
a*b); // expression size is self determined
c = {a**b}; // expression a**b is self determined
$display("a**b=%x", c); // due to {}
c = a**b; // expression size is determined by c
$display("c=%x", c);
end
Simulator output for this example:
a*b=16 // 96 was truncated since expression size is 6
a**b=1 // expression size is 4 bits (size of a)
c=21 // expression size is 6 bits (size of c)
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:29 PDT
and
sponsored by Boyd Technology, Inc.