All Projects → casper-astro → tutorials_devel

casper-astro / tutorials_devel

Licence: other
Tutorials available here:

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

CASPER Tutorials Documentation Status

These tutorials serve as an introduction to CASPER's Toolflow, Software, and Hardware.

Downloading

You can download these libraries by cloning this repository and initializing a mlib_devel library version appropriate for your hardware platform.

# Clone this repository from github
git clone https://github.com/casper-astro/tutorials_devel

# Go into the repository directory
cd tutorials_devel

# Download libraries for your chosen platform.
# <platform> should be one of: "roach2", "snap", "skarab", "red_pitaya"
# For example, to download the libraries for the SNAP board, you should run:
#
# ./activate_platform snap
#
./activate_platform <platform>

Installing Dependencies

ROACH

For ROACH, you need Python 2.7 and python-pip. If you don't have these, you can probably install them with:

apt install python2.7
apt install python-pip

Once you have these, you can install all the dependencies you need with the following commands, run from the root directory of your repository (i.e., the mlib_devel directory):

# Install casperfpga dependencies
cd casperfpga
pip install -r requirements.txt

# Go back to the root of the repository
cd ..

# Install the requirements for your chosen platform
cd <your_platform_of_choice>/mlib_devel
pip install -r requirements.txt

For non-ROACH platforms

For platforms newer than ROACH, you need Python 3 and python3-pip. If you don't have these, you can probably install them with:

apt install python3
apt install python3-pip

We thoroughly recommend using a virtual environment to separate the version of Python and its libraries the toolflow uses from the rest of your system.

To create a Python 3 virtual environment:

# change directory to where you want the virtual environment to live
cd /home/user/work
# install virtualenv using pip3
sudo pip3 install virtualenv
# create a Python 3 virtual environment
virtualenv -p python3 casper_venv
# to activate the virtual environment:
source casper_venv/bin/activate
# to deactivate the virtual environment:
deactivate

Once you have these, you can install all the dependencies you need within your virtual environment with the following commands, run from the root directory of your repository (i.e., the mlib_devel directory):

# Activate your virtual environment
source /home/user/work/casper_venv/bin/activate

# Install casperfpga dependencies
cd casperfpga
pip3 install -r requirements.txt

# Go back to the root of the repository
cd ..

# Install the requirements for your chosen platform
cd <your_platform_of_choice>/mlib_devel
pip3 install -r requirements.txt

Local Configuration

You will need a startsg.local script in your chosen platform directory (eg. snap/startsg.local for the SNAP board) before you can start the toolflow. See The Toolflow Documentation for details about what this script should contain.

Once you've downloaded the appropriate libraries, you can move to your chosen platform's directory and start the toolflow --

# Enter the directory for your chosen platform.
# Eg. for SNAP:
cd snap/

# Start the toolflow's MATLAB frontend
./startsg your.startsg.local.file

Documentation

Documentation for these tutorials can be found here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].