FLoating point multiplier Logicore

OP (Company: fast) #3665819
I am using the manual which is provided on the xilinx site. A want a 
answer of a simple multiplier like 1.2 x 1.2 should give me 2.4 in 
binary at the output but it is giving me some dummy values.
Guest #3665824
Misbah Faiz wrote:
> I am using the manual which is provided on the xilinx site. A want
> a
> answer of a simple multiplier like 1.2 x 1.2 should give me 2.4 in
> binary at the output but it is giving me some dummy values.

I'm not surprised.
1.2 x 1.2 gives 1.44 in my understanding.
Guest #3665860
I suppose

"1.2" means a signed fractional format with 1 integer bit and 2 
fractional bits.
When multiplying two such numbers using a 3-bit signed integer 
multiplier the result has to be interpreted as "2.4".

However, when dealing with floating point ( normalized mantissa, || < 
1.0 )
the multiplication result is usually modified by dropping the unused 
MSbits
so that "1.4" is left. Now, the new additional LSbits ( in this case 2 ) 
that cannot be represented in the destination format which is usually 
the same as the input format "1.2" are dropped as well ( possibly after 
rounding )

This might explain the confusion

Reply

A question of your own? This thread is over 12 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.