Andes Workshop

It is currently Tue Jun 27, 2017 7:34 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Q format
PostPosted: Wed Feb 24, 2016 6:44 pm 
Offline

Joined: Thu Jan 07, 2016 12:28 pm
Posts: 5
以Q15為例:
Q15 也可以直接給 10進制的值。
不過較不建議這樣給,因為會不知道實際的值。
使用者較容易瞭解的寫法如下。
q15_t q15value = 0.12345 * 32768;

因為 DSP library 中Q15 函式的參數也都是 Q15,
所以運算就直接用,不用轉換成float再算。

以Q13為例:
The final format is Q13. It can simply show as (0x4000 * 0x2000 + 0x2000 * 0x1000) >> 17 = 0x500.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group