FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-24-2005, 07:30 PM
SD
Guest
 
Posts: n/a
Default Truncating Fixed point numbers

Hello all,
I am trying to implement a DSP algorithm on a FPGA(SpartanIIE). I was
wondering if somebody could comment on whats the best way to truncate
the multiplier outputs to the 8bit inputs I have. If I have 8bits
inputs to the multiplier I want the output to be 8bits too instead of
16bits. I know I'l be losing out on precision but thats fine. Whats the
best way to do it in hardware?

Thanks,
Sourabh

Reply With Quote
  #2 (permalink)  
Old 01-24-2005, 08:14 PM
Symon
Guest
 
Posts: n/a
Default Re: Truncating Fixed point numbers

Sourabh,
Signed or Unsigned?
Syms.
"SD" <[email protected]> wrote in message
news:[email protected] ups.com...
> Hello all,
> I am trying to implement a DSP algorithm on a FPGA(SpartanIIE). I was
> wondering if somebody could comment on whats the best way to truncate
> the multiplier outputs to the 8bit inputs I have. If I have 8bits
> inputs to the multiplier I want the output to be 8bits too instead of
> 16bits. I know I'l be losing out on precision but thats fine. Whats the
> best way to do it in hardware?
>
> Thanks,
> Sourabh
>



Reply With Quote
  #3 (permalink)  
Old 01-24-2005, 11:22 PM
SD
Guest
 
Posts: n/a
Default Re: Truncating Fixed point numbers

I plan to have it "unsigned".

Reply With Quote
  #4 (permalink)  
Old 01-25-2005, 12:16 AM
Symon
Guest
 
Posts: n/a
Default Re: Truncating Fixed point numbers

In that case, if the output of the 16 bit multiply is result(15 downto 0),
your output should be result(15 downto 8) incremented if result(7) is a '1'.
Truncation is usually bad; rounding is much nicer!
Cheers, Syms.
"SD" <[email protected]> wrote in message
news:[email protected] ups.com...
> I plan to have it "unsigned".
>



Reply With Quote
  #5 (permalink)  
Old 01-25-2005, 09:54 PM
Guest
 
Posts: n/a
Default Re: Truncating Fixed point numbers

Symon wrote:
> In that case, if the output of the 16 bit multiply is result(15

downto 0),
> your output should be result(15 downto 8) incremented if result(7) is

a '1'.
> Truncation is usually bad; rounding is much nicer!
> Cheers, Syms.
> "SD" <[email protected]> wrote in message
> news:[email protected] ups.com...
> > I plan to have it "unsigned".
> >


Truncation simply adds a DC offset to the signal which is not a
problem if you're bandpass or highpass filtering just downstream.
Although rounding gets rid of the DC offset it will add an additional
adder operator with associated carry-chain resulting in increased
propagation delay and LE resource utilization in your datapath. This
may have an impact if your design is tight on resources or high speed.
-Paul

Reply With Quote
  #6 (permalink)  
Old 01-25-2005, 10:45 PM
Symon
Guest
 
Posts: n/a
Default Re: Truncating Fixed point numbers

<[email protected]> wrote in message
news:[email protected] ps.com...
>
> Although rounding gets rid of the DC offset it will add an additional
> adder operator with associated carry-chain resulting in increased
> propagation delay and LE resource utilization in your datapath. This
> may have an impact if your design is tight on resources or high speed.
> -Paul
>

....although often you can implement the additional adder by using the 'carry
in' of a downstream adder.
Cheers, Syms.


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fixed point multiplier and divider shwetika Verilog 2 07-31-2008 10:07 AM
fixed point divider help Salman Sheikh FPGA 0 08-27-2003 03:06 PM
Re: scaling fixed point fft Ray Andraka FPGA 0 07-08-2003 10:15 PM


All times are GMT +1. The time now is 06:18 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved