Skip to content

johnmcfarlane/cdsp

 
 

Repository files navigation

CDSP - Compositional DSP Library for C++

develop @ Travis-CI
(macOS & Linux)
develop @ Appveyor
(Windows)
Build Status Build status

CDSP is a header only DSP library written with CNL aiming for floating point and fixed-point implementation of typical DSP kernels.

Algorithm designers often start with Matlab, Scipy, R or maybe Julia and get the algorithm designed on very high level with a floating-point datatype. For real-time applications the final target is often fixed-point DSP, FPGA or ASIC. Manual porting of the algorithm to fixed-point is needed which can lead to three separate algorithm source codes: original algorithm in floating-point, fixed-point design of the same and the final implementation on the target. Keeping them in synchronization is a nightmare.

CDSP library shows how with CNL single source code can provide full implementation. Minimally, CDSP can provide both floating-point and fixed-point designs from the same source code. In the case compliant C++ compiler exists for the target the final implementation is done as well.

CDSP fixed-point implementations are measured against their floating point counterparts in terms of numerical accuracy. At this point performance with Cirrus ADSP2 fixed-point datatypes have been tested and separately verified against native Cirrus ADSP2 implementation. Composing new datatype with CNL and specializing the lowest level of core CDSP kernels is quite straight forward to support other architectures such as Qualcomm, TI DSPs and other application specific processors.

Requirements

Requirements are the same as with CNL. CDSP installs CNL and CDSP side-by-side and the only prerequisites are listed below.

Linux

Requires:

  • GCC 5.1 / Clang 3.5
  • Cmake 3.2.2

Optional:

  • Boost - for multiprecision support with CNL
  • Doxygen - generates documentation in the doc/gh-pages directory

Mac

See the instructions for Linux. Works similarly. For missing packages please use Homebrew.

Windows

  • MSBuild 15.0 (VS 2017)
  • Cmake 3.8.0

Instructions

Download

The library is hosted on GitHub

cd /some/directory
git clone https://github.com/hbe72/cdsp.git

Build

  1. Generate the build system

    mkdir build
    cd build
    cmake /some/directory/cdsp -DCMAKE_INSTALL_PREFIX=/directory/to/install -DCMAKE_BUILD_TYPE=Release
    
  2. Build tests:

    • Linux and Mac parallel with 8 cores
    cmake --build . --target Tests -- -j8
    
    • Windows
    cmake --build . --target test/Tests
    
  3. Run the tests

    ctest
    
  4. Install

    If you want to install the CDSP and CNL libraries to location specified by CMAKE_INSTALL_PREFIX.

    cmake --build . --target install 
    

    By default CDSP and CNL install to /usr/local.

About

Compositional DSP Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.8%
  • CMake 5.0%
  • Shell 0.2%