[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Icarus multiplier lpm



On Fri, 18 Mar 2005 20:22:07 +0100 (CET), Tomasz Motylewski
<T.Motylewski@xxxxxxx> wrote:
> 
> > However, it turns out that the IEEE1364-1995 standard was overruled
> > by the -2001 standard which changes the rule to the width of a
> > multiply being figured the same way the widths of a sum are figured.
> > The older behavior makes much more mathematical sense, but engineers
> > are not always logical, and practical engineers even less so:-)
> 
> What? For me it is clear that when I multiply two 8 bit numbers I will get 16
> bit number.
> 
> If the default has changed to only give upper 8 bit of the result

Unless I'm reading the netlist incorrectly, Tom's original example
would return the lower 8 bits in x and z, not the upper 8 bits.

> still force my code to generate 16 significant bits? Should I do:
> 
> input [7:0] a;
> input [7:0] b;
> 
> {8'b0,a}*{8'b0,b}
> 
> to get full a*b ?

seems like you could just do this:

output [15:0] x16;
...
assign x16 = a*b;

Note that here, x16 is 16 bits wide.

-- 
- Charles Lepple