From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Wed Oct 10 2001 - 00:06:34 PDT
Can someone explain to me the following:
reg [3:0] a ;
reg [5:0] b ;
reg [15:0] c ;
initial begin
a = 4'hf ;
b = 6'ha ;
...
c = a**b ; // expression size is determined by c
$display ("c=%x", c) ;
end
Why is the output
c=21 // example size is 16 bits (size of c)
?
* *
According to my calculator, 'hf**'ha = 86430aac61,
which should have been truncated to "ac61" ?
Thanks,
Shalom
-- ************************************************************************** Shalom Bresticker Shalom.Bresticker@motorola.com Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268 P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890 **************************************************************************
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:46 PDT
and
sponsored by Boyd Technology, Inc.