Skip to content

Commit

Permalink
Updated README and requirements to reflect numpy versions <1.17 (wher…
Browse files Browse the repository at this point in the history
…e Python 2.7 support was dropped)
  • Loading branch information
amishatishpatel committed Jul 25, 2019
1 parent 9dac224 commit 1ad376c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# casperfpga #

`casperfpga` is a python library used to interact and interface with [**CASPER** Hardware](https://casper.berkeley.edu/wiki/Hardware). Functionality includes being able to reconfigure firmware, as well as read and write registers across the various communication interfaces.
`casperfpga` is a python library used to interact and interface with [**CASPER** Hardware](https://github.com/casper-astro/casper-hardware). Functionality includes being able to reconfigure firmware, as well as read and write registers across the various communication interfaces.

This README will outline, and make reference to, the following:
1. Notes to Users
1. [New Users](#new-users)
2. [Existing Users](#existing-users)
2. [Installation](#installation)
3. [Usage](#usage)
1. [Getting Started](https://casper.berkeley.edu/wiki/Tutorials)
2. [Methods and Utilities](https://github.com/ska-sa/casperfpga/wiki/API-Documentation)
1. [Getting Started](https://casper.berkeley.edu/index.php/getting-started/)
2. [Methods and Utilities](https://casperfpga.readthedocs.io/en/latest/)
4. [Contributing](#contributing)


Expand All @@ -19,7 +19,7 @@ This README will outline, and make reference to, the following:

Not much to say to new users except welcome! It goes without saying that once you have cloned this respository you should make sure you're on the correct branch (usually **master**, unless you're a contributor) and always pull regularly. This, to make sure you have the latest version of casperfpga with the latest features. You can move on straight to [Installation](#installation).

Should you be an existing `corr` user, wondering where some of your functionality has gone when interfacing to your ROACH/2, please [look here](https://github.com/ska-sa/casperfpga/wiki/Migrating-from-corr-to-casperfpga) for a detailed explanation on **How to migrate to `casperfpga`**.
Should you be an existing `corr` user, wondering where some of your functionality has gone when interfacing to your ROACH/2, please [look here](https://github.com/casper-astro/casperfpga/wiki/Migrating-from-corr-to-casperfpga) for a detailed explanation on **How to migrate to `casperfpga`**.

### Existing Users ###

Expand All @@ -31,7 +31,7 @@ In [2]: skarab = casperfpga.SkarabFpga('skarab010103')
In [3]: roach = casperfpga.katcp_fpga.KatcpFpga('roach020203')
```

As of commit [`4adffc0`](https://github.com/ska-sa/casperfpga/commit/4adffc0994c56c38dafe6a395d3ed94e8e9477cc) the method of instantiating a ROACH or SKARAB was altered to be done intelligently. `casperfpga` automatically works out whether the parameter given in its instantiation is a SKARAB or ROACH board.
As of commit [`4adffc0`](https://github.com/ska-sa/casperfpga/commit/4adffc0994c56c38dafe6a395d3ed94e8e9477cc) the method of instantiating a ROACH or SKARAB was altered to be done intelligently. `casperfpga` automatically works out whether the hostname given in its instantiation is a ROACH, SKARAB or SNAP board.

```python
In [1]: import casperfpga
Expand All @@ -46,22 +46,29 @@ DEBUG:root:casperfpga.casperfpga:roach020203: now a CasperFpga
```

## Installation ##
There are a number of prerequisites required for the casperfpga package.
[`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
$ git clone https://github.com/casper-astro/casperfpga
$ cd casperfpga/
$ sudo apt-get install python-pip
$ sudo pip install -r requirements.txt
$ sudo python setup.py install
$ # mock might give some warnings, they are not critical and can be ignored.
$ sudo pip install casperfpga
```

Then clone the casperfpga repository. The **master** branch is home to the latest, most stable build of casperfpga.
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:

```shell
1. Ubuntu 14.04 LTS
2. Ubuntu 16.04 LTS
3. Debian 8.x

Unfortunately the success of your installation using `pip` depends on the host OS of the installation, and you might need to rebuild the utility using the C-compiler native to your OS. In short, follow the more traditional method of installing custom Python packages.

```python
$ git clone https://github.com/ska-sa/casperfpga.git
$ cd casperfpga
$ sudo pip install -r requirements.txt
$ sudo python setup.py install
[sudo] password for user:
```

To check that casperfpga has been installed correctly open an ipython session and import casperfpga.
Expand All @@ -75,7 +82,7 @@ In [1]: import casperfpga
If you receive any errors after this please feel free to contact anyone on the [CASPER Mailing List](mailto:casper@lists.berkeley.edu), or check the [Mailing List Archive](http://www.mail-archive.com/casper@lists.berkeley.edu/) to see if your issue has been resolved already.

## Usage ##
The introductory tutorials for [ROACH](https://casper.berkeley.edu/wiki/Introduction_to_Simulink), [ROACH2](https://casper.berkeley.edu/wiki/Introduction_to_Simulink_ROACH2) and [SKARAB](https://casper.berkeley.edu/wiki/Introduction_to_Simulink_SKARAB) serve as a guide to the entire process of:
The introductory [tutorials](https://github.com/casper-astro/tutorials_devel) for ROACH/2, SKARAB and SNAP serve as a guide to the entire process of:
* Creating an FPGA design in Simulink using the CASPER and Xilinx Blocksets
* Building the design using the toolflow, and lastly
* Reconfiguring your CASPER Hardware with the generated .fpg file using `casperfpga`
Expand All @@ -90,4 +97,4 @@ fpga.upload_to_ram_and_program('your_file.fpg')

## Contributing ##

Fork this repo, add your changes and issue a pull request.
Fork [this](https://github.com/casper-astro/casperfpga) repo, add your changes and issue a pull request.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
future==0.16.0
ipython==5.3.0
katcp==0.6.2
numpy
numpy<1.17
odict
tornado<5
-e git://github.com/casper-astro/tftpy.git#egg=tftpy-0.6.3_fork-py2.7.egg
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
URL = 'https://github.com/casper-astro/casperfpga'
EMAIL = 'apatel@ska.ac.za'
AUTHOR = 'Paul Prozesky'
VERSION = '0.1.1' # Need to adopt the __version__.py format
VERSION = '0.1.2' # Need to adopt the __version__.py format


here = os.path.abspath(os.path.dirname(__file__))
Expand Down Expand Up @@ -52,7 +52,7 @@
# Specify version in-line here
install_requires=[
'katcp==0.6.2',
'numpy',
'numpy<1.17',
'odict',
'setuptools',
'tornado<5',
Expand Down

0 comments on commit 1ad376c

Please sign in to comment.