Skip to content

XueshiGuo/koheron-sdk

 
 

Repository files navigation

koheron-sdk

Circle CI

What is Koheron SDK ?

Koheron SDK is a build system for quick prototyping of custom instruments on Zynq SoCs.

Quickstart with the Red Pitaya

1. Requirements for Ubuntu 16.04

1.2 Run

$ sudo apt-get install curl
$ cd ~/Downloads
$ curl https://raw.githubusercontent.com/Koheron/koheron-sdk/master/fpga/scripts/install_vivado.sh | sudo /bin/bash /dev/stdin
$ sudo ln -s make /usr/bin/gmake # tells Vivado to use make instead of gmake

1.3. Install requirements

$ sudo apt-get install git curl zip python-virtualenv python-pip \
    g++-arm-linux-gnueabihf lib32stdc++6 lib32z1 u-boot-tools \
    libssl-dev bc device-tree-compiler qemu-user-static
$ sudo apt-get install git
$ git clone https://github.com/Koheron/koheron-sdk
$ cd koheron-sdk
$ sudo pip install -r requirements.txt

2. Install Koheron Linux for Red Pitaya (Download SD card image)

3. Build and run the minimal instrument

$ source settings.sh
$ make NAME=led_blinker HOST=192.168.1.100 run

where HOST is your Red Pitaya IP address.

4. Ping the board and watch the LEDs blink

$ curl http://$(HOST)/api/board/ping

Examples of instruments

  • led_blinker : minimal instrument with LED control from Python.
  • adc_dac : instrument with minimal read/write capability on Red Pitaya ADCs and DACs.
  • pulse_generator : pulse generation with synchronous acquisition.
  • laser_controller : laser current control using pulse-density modulation.
  • decimator : decimation using a compensated CIC filter.
  • oscillo : signal acquisition / generation with coherent averaging mode.
  • spectrum : spectrum analyzer with peak-detection and averaging.

How to

Open Vivado and build the instrument block design:

$ make NAME=oscillo bd

Build the SD card image:

$ make NAME=led_blinker linux
$ sudo bash os/scripts/image.sh led_blinker

Build the instrument (without running it):

$ make NAME=oscillo

Test a verilog core:

$ make CORE=comparator_v1_0 test_core

Test a Tcl module:

$ make NAME=averager INSTRUMENT_PATH=fpga/modules test_module

Packages

No packages published

Languages

  • Tcl 34.7%
  • Python 21.5%
  • C++ 19.7%
  • Verilog 12.3%
  • C 4.3%
  • Makefile 4.2%
  • Other 3.3%