From: dsp.study on 21 Jul 2010 03:39 This is on a mips processor which doesn't have native floating pt support. I have converted from floating pt to fixed pt (8.24) i.e. 8 bits for int part and 24 for fraction. I'd looking at log10 - any pointers would be highly appreciated. thanks, Marty >On Jul 20, 7:15 am, "dsp.study" <learner.study(a)n_o_s_p_a_m.gmail.com> >wrote: >> >> I have successfully converted add, sub, mul and div operations to fixed pt >> and see ~10 times improvement. > >on what platform did you do this? the only kind of platform i can >think of that would have this kind of speed improvement is a chip >without native floating-point capability. > >and what did you convert the add and sub operations from? > >i'm curious. > >> I'm not sure how to go about doing pow and log functions...can some one >> please suggest an algo or pt me to an open source code for reference. > >do you need bit-wise accuracy? or can you trade off some error >performance for speed performance? for DSP chips, i've always been a >proponent of simple polynomials with optimized coefficients for a >single octave and then to use shift operations to get the other >octaves. > >r b-j >
From: dsp.study on 21 Jul 2010 04:17 I tried to use the sample code for BinLog() and notice that its taking 1.5x more cycles as compared to std libc log2(). I'm using MIPS cpu. thanks! >On Tue, 20 Jul 2010 06:15:44 -0500, "dsp.study" ><learner.study(a)n_o_s_p_a_m.gmail.com> wrote: > >>I'm not sure how to go about doing pow and log functions...can some one >>please suggest an algo or pt me to an open source code for reference. > >http://groups.google.com/group/comp.dsp/browse_thread/thread/ce4f56d93425ee17 >
From: Andrew Reilly on 21 Jul 2010 08:07 On Wed, 21 Jul 2010 02:39:27 -0500, dsp.study wrote: > I'd looking at log10 - any pointers would be highly appreciated. log10 is only a constant factor different from log2, and the latter is where you want to be starting from. You can get the integer part from whatever the processor-native version of count-leading-zeros is. That leaves you with a value between 0.5 and 1.0 (in whatever fixed point form you're using). How you proceed from there depends on the accuracy you require. You can do iterations of the taylor series, polynomial approximations, or table-lookup and further refinements. Depends a lot on what you want to do with your logs afterwards... Cheers, -- Andrew
From: Steve Pope on 21 Jul 2010 21:00 dsp.study <learner.study(a)n_o_s_p_a_m.gmail.com> wrote: >This is on a mips processor which doesn't have native floating pt support. >I have converted from floating pt to fixed pt (8.24) i.e. 8 bits for int >part and 24 for fraction. > >I'd looking at log10 - any pointers would be highly appreciated. I'd recommend implementing log2 in fixed point, and recoding anything to use it instead of log10. Since you asked.... S.
From: pnachtwey on 21 Jul 2010 22:03 On Jul 20, 4:15 am, "dsp.study" <learner.study(a)n_o_s_p_a_m.gmail.com> wrote: > Hi, > > I have successfully converted add, sub, mul and div operations to fixed pt > and see ~10 times improvement. > > I'm not sure how to go about doing pow and log functions...can some one > please suggest an algo or pt me to an open source code for reference. > > thanks, > Marty Did you try the obvious and search? I always go to TI's website. http://focus.ti.com/lit/an/spra619/spra619.pdf http://www.dattalo.com/technical/theory/logs.html#2.%20Borchardt's%20Algorithm You still need to find sqrt() though. http://math.fullerton.edu/mathews/n2003/pade/PadeApproximationMod/Links/PadeApproximationMod_lnk_8.html Peter Nachtwey
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Need omnivorous carrier recovery method Next: Announcing ScopeIIR 5.0 |