CMSIS-DSP Libraries: convert signed integer to q31 notation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CMSIS-DSP Libraries: convert signed integer to q31 notation

1,806件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Fri Oct 16 11:16:37 MST 2015
Hello everyone,

My latest project requires some help from the DSP libraries (mostly for fast trigonometric functions and vector math). However, all of the data I acquire is in the form of int16_t.
How can this be converted into the q31_t used by the library functions (which is actually an int32_t)?
Also, once my variables are converted in q31_t, how can I perform normal math? Wikipedia explanation is pretty straightforward but very verbose nevertheless, so I wonder if the library had some helper functions.
By the way, I'm using an LPC1549 (Cortex M3 core).

Thanks in advance and have a nice weekend! :)
0 件の賞賛
返信
2 返答(返信)

1,691件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Oct 20 04:13:37 MST 2015
Suggest you do some reading up on fixed point. Using your favourite search engine for something like "convert integer to fixed point" or similar should throw up plenty of hits. For example:


[list]
  [*]http://blogs.mathworks.com/seth/2008/12/14/representing-numbers-integers-and-fixed-point/
  [*]https://books.google.co.uk/books?id=h590cd_BagMC&pg=PA42&lpg=PA42&dq=convert+integer+to+q1.31&source...
[/list]

Regards,
LPCXpresso Support
0 件の賞賛
返信

1,691件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Mon Oct 19 08:22:30 MST 2015
wow, no one with experience on CMSIS-DSP libraries? not even lpcxpresso-support? :(
0 件の賞賛
返信