Home - SiLab-Bonn/pyBAR GitHub Wiki

Welcome

This is the wiki of pyBAR – the Bonn ATLAS Readout in Python

Support

To subscribe to the pyBAR mailing list, click here. Please ask questions on the pyBAR mailing list (subscription required) or file a new bug report / feature request here.

Download

To clone the pyBAR master branch, run the following command:

git clone https://github.com/SiLab-Bonn/pyBAR
A specific branch can be obtained using
git clone https://github.com/SiLab-Bonn/pyBAR -b branch_name
where branch_name is the name of a branch (e.g. development).
A specific tag can be obtained by additionally running
git tag -l  
git checkout -b tag_name tag_name
where tag_name is the name of a tag (e.g. 2.0.1).

Installation

For a short installation guide, please read the installation instructions in the README. Please note that the instructions in the README may vary depending on the pyBAR branch/tag.
For a more detailed installation guide, please follow our Step-by-step Installation Guide.

Usage

To prepare pyBAR for the first run, edit configuration.yaml. By default, the pyBAR run scripts are using the settings from the configuration.yaml file in pybar folder. The configuration.yaml contains all the necesary information about the hardware setup, the FEI4 flavor and configuration, and the data output folder.

  • Change dut and dut_configuration parameter according to your setup. dut_mio.yaml is compatible with the FEI4 Single Chip Adapter Card (default) and the Burn-in Card (Quad Module Adapter Card). Specify the adapter card in dut_mio.yaml. Change dut to dut_mio_gpac.yaml and dut_configuration to dut_configuration_mio_gpac.yaml for GPAC support.
  • Change the fe_flavor parameter according to the FEI4 flavor you are using (fei4a or fei4b). The initial configuration will be chosen accordingly.
  • Change fe_configuration. If left blank (default), the configuration from the last run with status FINISHED will be used. If no configuration is available, a configuration will be created. Enter a number to use the configuration file from the run with the given run number. Or enter a specific path to a configuration file (use quotes).
  • Change the module_id parameter to put all module data into a specific subfolder (data output folder). A subfolder with the given name will be created inside the folder where the configuration.yaml is located.

The run scripts are placed in the scans folder.
Each file has a prefix according to what it does: “test_” for tests, “scan_” for measurements, and “tune_” for scans which are changing the configuration.
A “run” is when executing one of these files. Runs are numbered starting from 1.
Configuration files can be selected by the run number (fe_configuration parameter in configuration.yaml).
A run script can be executed from the console by calling the python script from the scans folder, e.g.:

 python scan_digital.py 

Another way is to execute a run script from an integrated development environment (IDE). How to setup an IDE (e.g. Eclipse) is described here.
A third way is to use the pyBAR run manager. An example is given here.

Further Information on Usage

You will find more in-depth information in the User Guide.
Please also note the examples in the examples folder.

Development

Please contact the pyBAR developers if you want to contribute or fork this repository and submit a pull request.
An introduction on how to contribute is here.

Policy for Commit Messages

The following codes should be used for commit messages. The commit message should have one of the following letter codes at the beginning of the first line followed by a colon.

API: an (incompatible) API change
BLD: change related to build environment
BUG: bug fix
PRJ: add/update project related files
DEP: deprecate something, or remove a deprecated object
DEV: development tool or utility
DOC: documentation
ENH: enhancement
MAINT: maintenance commit (refactoring, typos, etc.)
REV: revert an earlier commit
STY: style fix
TST: addition or modification of tests
REL: related to release
GIT: git related (name changes, …)
REG: regression, a bug that was introduced without implementing a new features that is related to the bug
APT: Advanced Persistent Threat, something really bad is ongoing

Host Software

Please obey the Python coding conventions and style recommendations posted here (PEP 8 — Style Guide for Python Code).

FPGA

The firmware is based on Basil framework. Some parts of the firmware that were developed in early stages of pyBAR have been added to the Basil framework.
The firmware can be build with Xilinx ISE Design Suite.

RTL Simulation

RTL simulation of the FPGA modules is provided by the Basil framework. Examples on how to use the RTL simulator are given in the Basil repository.
The pyBAR readout software is tested against RTL simulation of FPGA and FE-I4. The simulator runs on TravisCI and is executed each time a commit is made.
How to set up the simulation is described here.

Hardware

The following hardware is supported by pyBAR:

  • MIO (USBpix)
    Information about firmware (pin assignments, status LEDs) is available here.
    General documentation of the MIO hardware is available here and here.
    Note:
    • Support of MIO3 (USBpix3) and MMC3 are work in progress.
    • The Single Chip Adapter Card, Burn-in Card (Quad Module Adapter Card) and the General Purpose Analog Card (GPAC) are fully supported.
  • SEABAS2
    Information about firmware (pin assignments, status LEDs) is available here.
    General documentation of the SEABAS2 hardware is available here.

Please read this document on how to power the Single Chip Card (SCC) externally.

License

Host Software

The host software is distributed under the BSD 3-Clause (“BSD New” or “BSD Simplified”) License.

FPGA Software

The FPGA software is distributed under the GNU Lesser General Public License, version 3.0 (LGPLv3).

⚠️ **GitHub.com Fallback** ⚠️