电脑开发与应用
電腦開髮與應用
전뇌개발여응용
COMPUTER DEVELOPMENT & APPLICATIONS
2014年
8期
50-52,55
,共4页
TMS320F2812%定点运算%Q格式
TMS320F2812%定點運算%Q格式
TMS320F2812%정점운산%Q격식
TMS320F2812%fixed-point calculation%Q format
TMS320F2812是目前控制领域先进的定点处理器之一,它有着大量地应用。然而,当其面临浮点运算时,往往会耗费更多的资源,使运算时间增加。使用Q格式,将浮点数采用定点表示,可缩短运算时间。但是,采用定点格式表示的数在范围与精度上存在矛盾,使得程序变得复杂,通用性低。正基于此,TI公司提供了IQmath库,利用该库中的函数,使运算速度快于标准C语言的浮点运算,同时具有可读性强及编程简单的特点。在介绍IQmath的基础上,以一个已经运用于实际的坐标解算程序为例,体现基于IQmath编程的优点。
TMS320F2812是目前控製領域先進的定點處理器之一,它有著大量地應用。然而,噹其麵臨浮點運算時,往往會耗費更多的資源,使運算時間增加。使用Q格式,將浮點數採用定點錶示,可縮短運算時間。但是,採用定點格式錶示的數在範圍與精度上存在矛盾,使得程序變得複雜,通用性低。正基于此,TI公司提供瞭IQmath庫,利用該庫中的函數,使運算速度快于標準C語言的浮點運算,同時具有可讀性彊及編程簡單的特點。在介紹IQmath的基礎上,以一箇已經運用于實際的坐標解算程序為例,體現基于IQmath編程的優點。
TMS320F2812시목전공제영역선진적정점처리기지일,타유착대량지응용。연이,당기면림부점운산시,왕왕회모비경다적자원,사운산시간증가。사용Q격식,장부점수채용정점표시,가축단운산시간。단시,채용정점격식표시적수재범위여정도상존재모순,사득정서변득복잡,통용성저。정기우차,TI공사제공료IQmath고,이용해고중적함수,사운산속도쾌우표준C어언적부점운산,동시구유가독성강급편정간단적특점。재개소IQmath적기출상,이일개이경운용우실제적좌표해산정서위례,체현기우IQmath편정적우점。
TMS320F2812 is the advanced fixed-point processor, which has widely used in the control area. However, when it meets float-point calculation, it will cost more resource of the hardware, making the calculation time longer. By means of Q format, the float-point data could be expressed by the fixed-point data. It will shorten the calculation time. But, when using fixed-point, the data’s range and precision have a conflict, and making the program more complicated. On the basis of that,TI Company provided IQmath library, using the function in that library, making it calculate faster than the standard C float-point’s. In addition, it has characteristic of readable and easily etc. After introducing IQmath, taking Coordinates Conversion Arithmetic as an example to present IQmath’s virtue.