Skip to content

A modified CORDIC implementation using the posit representation.

Notifications You must be signed in to change notification settings

rutgers-apl/CordicWithPosits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CordicWithPosits

Introduction

This repository contains the implementation of cordic algorithm with posits. The cordic algorithm is also modified based on our CF-2020 paper, "Approximating Trigonometric Functions for Posits Using the CORDIC Method."

Installation

  • Prerequisite: our cordic algorithm uses the SoftPosit library to compute posit expressions.
  1. Install SoftPosit
$ git clone https://gitlab.com/cerlane/SoftPosit.git
$ cd SoftPosit/build/Linux-x86_64-GCC/
$ make
$ cd ../../..
  1. Set the following environment:
export SOFTPOSITPATH = <path to SoftPosit directory>
  1. Download and build CordicWithPosits
git clone https://github.com/rutgers-apl/CordicWithPosits.git
cd CordicWithPosit
make
  1. Test CordicWithPosits
export SOFTPOSITPATH = <path to SoftPosit directory>
cd example
make
./example

You should see the program output sin(1), cos(1), and tan(2/1).

Using CordicWithPosits

Our cordic library is built in lib/lib_cordic.a and header file is in include/cordic.h. To compile the program using our cordic library, you also have to include the SoftPosit library. Please refer to the source file and Makefile in the example directory.

About

A modified CORDIC implementation using the posit representation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published