Skip to content
Snippets Groups Projects
Commit 90a2b509 authored by Daniele Dal Santo's avatar Daniele Dal Santo
Browse files

README update

parent f1ec3aa5
No related branches found
No related tags found
1 merge request!60README update
......@@ -17,13 +17,13 @@ This is the backend to the [ITk demonstrator software](https://gitlab.cern.ch/at
Please check our documentation: [https://optoboard-system.docs.cern.ch](https://optoboard-system.docs.cern.ch/). Support requests through our [Bern-Optoboard Mattermost](https://mattermost.web.cern.ch/bat-optoboard) (sign up [here](https://mattermost.web.cern.ch/signup_user_complete/?id=778hfkdwfjd5mm899qhs8m9m5w)).
## Prerequisites
### Prerequisites
Everything hardware related or software that is needed for running a full data transmission setup is summarised in [our documentation](https://optoboard-system.docs.cern.ch/software/). The dependency installation is handled using the `pyproject.toml` file.
# How to configure/use an Optoboard
**The suggested way to use the `optoboard_felix` software is via its containerized version: follow the instructions in [https://gitlab.cern.ch/atlas-itk-pixel-systemtest/itk-demo-sw/containers/optoboard-container](https://gitlab.cern.ch/atlas-itk-pixel-systemtest/itk-demo-sw/containers/optoboard-container).** It is also possible to locally install the `optoboard_felix` software using the following instructions.
1. Install the package from the Package Registry:
```
```bash
pip install optoboard-felix --index-url https://gitlab.cern.ch/api/v4/projects/113584/packages/pypi/simple
```
2. Set up your FELIX environment, configure FELIX card and check link alignment
......@@ -34,7 +34,7 @@ pip install optoboard-felix --index-url https://gitlab.cern.ch/api/v4/projects/1
The InitOpto command is a shim for the InitOpto.py script.
```
```bash
InitOpto [-h]
[-optoListPath OPTOLISTPATH]
[-config_path CONFIG_PATH]
......@@ -56,14 +56,20 @@ For an explanation on the arguments, run `InitOpto -h` or consult the [API](http
### Examples
Minimal example to configure a full Optoboard using default configuration files and using the Python session afterwards:
```
```python
InitOpto -optoboard_serial 30000000 -vtrx_v 1.3 -flx_G 0 -flx_d 0 -i -configure 1
>>> opto.lpgbt1.check_PUSM_status()
>>> opto.lpgbt1.swap_rx_polarity(0) # invert rx polarity for channel 0 (possible values: 0 -> 5)
>>> opto.lpgbt1.swap_tx_polarity(0) # invert tx polarity for channel 0 (possible values: 0 -> 7)
```
or by providing a config like `30000000_test_lpgbtv1_vtrxv1_3.json`:
```
```bash
InitOpto -config_path configs/30000000_test_lpgbtv1_vtrxv1_3.json -configure 1 -i
```
Notice that if one uses the `config_path` argument, then `optoboard_serial`, `vtrx_v`, `flx_G` and `flx_d` **must be specified inside the configuration file** by adding a key-value pair of the type:
```python
......@@ -88,7 +94,8 @@ The script has default configs according to the lpGBT and VTRx+ quad laser drive
## Create multiple optoboard instances
Multiple optoboard instances can be initialized at once by providing a json following the model of `optoConfigList_example.json` to `InitOpto`:
```
```bash
InitOpto -optoListPath optoConfigList_example.json -i
```
......@@ -140,3 +147,14 @@ opto.vtrx.read("GCR", None) # check enabled fibre channels of VTRx+ (only v1.
opto1.bertScan("lpgbt3", "gbcr3", 0, 6, 11) # perform an GBCR3 equalizer scan with BERT on lpGBT3
```
## Info for developers
To test changes in the code it is suggested to install the package in a virtual environment by using `poetry`:
```bash
poetry install
poetry shell
```
Make sure to have sourced the felix software beforehand.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment