05.04.10: Software : : Fixed-point Math for Embedded Systems, Part 2

As mentioned in my previous post , Fixed-point Arithmetic is proving more and more interesting. Ahem, I created an Open Source project at Bitbucket ! Here's the link : Fixed-Point Math Library. You can download the latest version of software for free and try it out. I've created versions 0.1, 0.2 and 0.3, but it's always suggested to use the 'TIP'

I managed to code a thousand lines in just three days (Happy Easter !) over the long weekend. So the following, features are complete:

  1. Conversions among fixed-point, floating-point and ASCII strings (with or without rounding)
  2. Extracting integer-part and fractional-part of Q-number, absolute value & saturation
  3. Add, Subtract, Multiply, Divide (different versions for dealing with rounding and saturation in different Q-formats available)
  4. Fixed-point Square-root and Inverse Sqrt

One more feature I added are unit-tests -- as and when I implement new code, CuTesT will automatically generate template for my test suite. Currently there are about 18 test suites, take a look at the test/
folder in the downloaded zip. Of course, all of them are passing !



Things left to do (other than those noted at Bitbucket):

  1. Doxygen API documentation (preliminary support available)
  2. Use GNU Automake (or CMake ?) instead of hand-written Makefiles.
  3. More end-user documentation and examples.

My current focus is to get the functionality working. Therefore, the algorithms I used are just the basic ones (like Newton-Raphson ) and not optimal. Secondly, I love Python. And Mercurial (Hg) is my favorite version control system for the reason that it's written in Python. Hence, I chose Bitbucket. Will save it for a later day. Bye !

Posted by: bdsatish Category: Software

Comments

No comments yet

Add Comment

This item is closed, it's not possible to add new comments to it or to vote on it

RSS Feed


ComSigProc


Navigation