W. Elmenreich, Maximilian Rosenblattl, Andreas Wolf
{"title":"Fixed Point Library Based on ISO/IEC Standard DTR 18037 for Atmel AVR Microcontrollers","authors":"W. Elmenreich, Maximilian Rosenblattl, Andreas Wolf","doi":"10.1109/WISES.2007.4408492","DOIUrl":null,"url":null,"abstract":"The ISO/IEC Standard DTR 18037 defines the syntax and semantics for fixed point operations for programming embedded hardware in C. However, there are currently only few compilers available that support this standard. Therefore, we have implemented a stand-alone library according to the standard that can be compiled with standard C compilers. The library is available as open source and written in plain C, thus can be used in various target architectures as long as a C compiler is available. This paper presents a brief description of the ISO/IEC standard and the library implementation followed by an evaluation of code size and performance of the fixed point operations on the Atmel AVR architecture. A comparison with the standard floating point library (which is machine code-optimized to the target architecture) shows that simple fixed point functions such as addition, subtraction and multiplication are more efficient, while more complicate functions can only compete in the worst case behavior. The fixed point approach provides a smaller memory foot print, for typical applications where only a small subset of functions is used. This is especially of interest for the big market of embedded microcontrollers with only a few Kbytes of program memory.","PeriodicalId":319643,"journal":{"name":"2007 Fifth Workshop on Intelligent Solutions in Embedded Systems","volume":"260 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-06-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2007 Fifth Workshop on Intelligent Solutions in Embedded Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/WISES.2007.4408492","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
Abstract
The ISO/IEC Standard DTR 18037 defines the syntax and semantics for fixed point operations for programming embedded hardware in C. However, there are currently only few compilers available that support this standard. Therefore, we have implemented a stand-alone library according to the standard that can be compiled with standard C compilers. The library is available as open source and written in plain C, thus can be used in various target architectures as long as a C compiler is available. This paper presents a brief description of the ISO/IEC standard and the library implementation followed by an evaluation of code size and performance of the fixed point operations on the Atmel AVR architecture. A comparison with the standard floating point library (which is machine code-optimized to the target architecture) shows that simple fixed point functions such as addition, subtraction and multiplication are more efficient, while more complicate functions can only compete in the worst case behavior. The fixed point approach provides a smaller memory foot print, for typical applications where only a small subset of functions is used. This is especially of interest for the big market of embedded microcontrollers with only a few Kbytes of program memory.