Code Monkey home page Code Monkey logo

dspnel's Introduction

dspnel

A digital signal processing (DSP) programming language and tools to generate kernels in various target language.

Introduction

Because I am learning and experimenting with Software Defined Radio (SDR), I was lacking a domain-specific language (DSL) to easily experiment some ideas. Moreover because I am using several programming languages (esp. Rust, C++, Python), I do not want to repeat myself.

The goal is thus to have a DSL to:

  • express actual graphs and kernels,
  • visualize graphs as one may found them in text book,
  • apply some transformations and optimizations on graphs,
  • generate code in targetted languages.

Brainstorming

See also files in samples folder.

let a_vector = [2.0, 1.0];
let another_vector = [2.0;
                      1.0];
let a_matrix = [1.0, 2.0;
                3.0, 4.0];
let a_float32: f32 = 1.2;
kernel simplest_iir_low_pass_filter(
    in x:  <f32>,
    alpha: f32,
    out y: <f32>) {

    y = alpha * x + (1-alpha) * x';
}
kernel to_qpsk(
    in  symbols: <u2>,
    out iq:      <c32>) {
    
    let in_degrees = symbols * 360.0 / 4.0 + 45;
    let in_radians = in_degrees * pi / 180.0;
    iq = in_radians.cos() + 1j * in_radians.sin();
}
let k2 = to_qpsk() | simplest_iir_low_pass_filter(0.5);
let k2 = to_qpsk() ! simplest_iir_low_pass_filter(0.5);
let k2 = to_qpsk() : simplest_iir_low_pass_filter(0.5);
kernel k2 {
    let block1 = to_qpsk();
    let block2 = simplest_iir_low_pass_filter(0.5);
    block2.iq -> block1.x;
    // block2 -> block1
    // block1 <- block2
}

Sources of inspiration

dspnel's People

Contributors

loic-fejoz avatar

Stargazers

 avatar Sam avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.