Skip to content

Commit

Permalink
minor doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
jkocz committed Sep 2, 2022
1 parent d93f643 commit 2801e01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
21 changes: 11 additions & 10 deletions docs/src/How-to-install-casperfpga.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# How to install casperfpga

This section explains how to install `casperfpga`, a python library used to interact with CASPER hardware. The `casperfpga` library currently works fully with Python 2.7, with efforts underway to port it to Python 3.
This section explains how to install `casperfpga`, a python library used to interact with CASPER hardware. The `casperfpga` library currently works fully with Python 3.8.

Once you have cloned the casperfpga repository, ensure that you are on the correct branch (usually **master** unless you are a contributor) and always pull regularly to make sure you have the latest version of casperfpga.
Once you have cloned the casperfpga repository, ensure that you are on the correct branch (usually **py38** unless you are a contributor) and always pull regularly to make sure you have the latest version of casperfpga.

## Installing casperfpga
## Installing casperfpga using a virtual environment

[`casperfpga`](https://pypi.org/project/casperfpga/) is now available on the Python Package Index (PyPI) and can be installed via [`pip`](https://pip.pypa.io/en/stable/). However, should you need to interface with a SNAP board, your installation workflow involves the extra step of installing against `casperfpga's requirements.txt`.
<!---[`casperfpga`](https://pypi.org/project/casperfpga/) is now available on the Python Package Index (PyPI) and can be installed via [`pip`](https://pip.pypa.io/en/stable/). However, should you need to interface with a SNAP board, your installation workflow involves the extra step of installing against `casperfpga's requirements.txt`.--->

```shell
$ python3.8 -m venv ./cfpga_venv
$ source ./cfpga_venv/bin/activate
$ git clone https://github.com/casper-astro/casperfpga
$ cd casperfpga/
$ git checkout master
$ sudo apt-get install python-pip
$ sudo pip install -r requirements.txt
$ sudo pip install casperfpga
$ git checkout py38
$ pip install -r requirements.txt
$ pip install .
```

The distribution on the Python Package Index is, of course, a built-distribution; this contains an already-compiled version of the SKARAB programming utility `progska`, written in `C`. Operating Systems tested using `pip install casperfpga` include:
<!--The distribution on the Python Package Index is, of course, a built-distribution; this contains an already-compiled version of the SKARAB programming utility `progska`, written in `C`. Operating Systems tested using `pip install casperfpga` include:
1. Ubuntu 14.04 LTS
2. Ubuntu 16.04 LTS
Expand All @@ -37,7 +38,7 @@ $ git clone https://github.com/casper-astro/casperfpga.git
$ cd casperfpga
$ git checkout master
$ sudo pip install -r requirements.txt
$ sudo python setup.py install
$ sudo python setup.py install-->
```
Expand Down
22 changes: 11 additions & 11 deletions docs/src/Installing-the-Toolflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ _(Note that official support for ROACH plaforms is no longer provided, however [
| Hardware | Operating System | Matlab Version | Xilinx Version | mlib_devel branch / commit | Python Version |
|----------------|---------------------|--------------------|--------------------|---------------------------------|------------------|
|ROACH1/2 | Ubuntu 14.04 | 2013b | ISE 14.7 | branch: `roach2` | Python 2.7 |
|SKARAB | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|SNAP | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|Red Pitaya | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|VCU118 | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|VCU128 | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|ZCU111 | Ubuntu 16.04 | 2018a | Vivado 2019.1.1 | branch: `master` | Python 3 |
|SNAP2 | Ubuntu 16.04 | 2016b | Vivado 2016.4 | branch: `master` | Python 3 |
|SKARAB | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|SNAP | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|Red Pitaya | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|VCU118 | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|VCU128 | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|ZCU111 | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |
|SNAP2 | Ubuntu 20.04 | 2021a | Vivado 2021.1 | branch: `m2021a` | Python 3 |

Other software combinations may work, but these are the tested configurations. Please see the [Note on Operating Systems](https://casper-toolflow.readthedocs.io/en/latest/index.html#a-note-on-operating-systems) for information on which alternative OS versions _may_ work with the tools.

The master branch is usually updated once a year. Between updates, code with newer features can be found in the `casper-astro-soak-test` branch. This branch can usually be used in place of the `master` branch for platforms which support `master`. However, be aware that `casper-astro-soak-test` is likely to be less stable. Please report any bugs you encounter via github's issue tracker.
The main toolflow branches are usually updated once a year. Between updates, code with newer features can be found in the respective dev branch (e.g `m2021a-dev` branch. However, be aware that `-dev` branches are likely to be less stable. Please report any bugs you encounter via github's issue tracker.


## Pre-requisites
Expand Down Expand Up @@ -70,8 +70,8 @@ Clone the toolflow from the [mlib_devel](https://github.com/casper-astro/mlib_de
```bash
# Clone the mlib_devel repository. Replace <branch_name> with the branch
# supported by your chosen platform.
# Eg. for master you should run:
# git clone -b master https://github.com/casper-astro.mlib_devel
# Eg. for m2021a you should run:
# git clone -b m2021a https://github.com/casper-astro.mlib_devel
git clone -b <branch_name> https://github.com/casper-astro/mlib_devel
```

Expand All @@ -85,7 +85,7 @@ source /home/user/work/casper_venv/bin/activate
pip3 install -r requirements.txt
```

You may need to run the `pip3 install` command as an administrator if you are using the system-maintained python installation instead of a virtual environment.
You may need to run the `pip3 install` command as an administrator if you are using the system-maintained python installation instead of a virtual environment (a virtual environemnt is _highly_ recommended).

**Note: there appears to be an incompability between pip3 v21.3.1 and xml2vhdl (one of the dependencies listing in the requirements file) that results in errors when installing requirements.txt. If you encounter an issue in fetching xml2vhdl when running `pip3 install -r requirements.txt`, try install pip3 v18.1 or earlier and use that instead (this is one of those things best done in a virtual environment, so as to not mess around with the system verson of python)**

Expand Down

0 comments on commit 2801e01

Please sign in to comment.