|
|
|
# Software
|
|
|
|
|
|
|
|
The firmware uses the IPBus protocol
|
|
|
|
[https://svnweb.cern.ch/trac/cactus](https://www.ohwr.org/project/https/wikis)
|
|
|
|
to communicate from the FPGA to the host computer.
|
|
|
|
|
|
|
|
There are some example scripts in the firmware/scripts directory of the
|
|
|
|
Git repository. They are designed to be run on Linux, but it may be
|
|
|
|
possible to use them under Windows. They use an deprecated Python class,
|
|
|
|
PyChips to communicate with the FPGA. The advantage of PyChips is that
|
|
|
|
it is pure Python with no external libraries. The example script uses
|
|
|
|
the CERN ROOT system to display histograms and store the data.
|
|
|
|
|
|
|
|
For higher performance use the newer pycohal or uHAL libraries described
|
|
|
|
on the Cactus website.
|
|
|
|
|
|
|
|
## Running test scripts
|
|
|
|
|
|
|
|
- Make sure you have Python 2.6 installed , together with the
|
|
|
|
following libraries: logging , csv , OptionParser , threading , time
|
|
|
|
, ConfigParser , itertools , binstr , Queue , sys , ROOT , time ,
|
|
|
|
math
|
|
|
|
|
|
|
|
\* Clone the Git repository:
|
|
|
|
|
|
|
|
git clone git:https://www.ohwr.org/white-rabbit/maroc_csa.git
|
|
|
|
|
|
|
|
\* Set up the environment (assumed bash):
|
|
|
|
|
|
|
|
cd maroc_csa/firmware/scripts
|
|
|
|
export PYTHONPATH=PyChips_1_5_0_pre2A/src
|
|
|
|
|
|
|
|
\* Execute the takeMarocData.py script. It has options to set the
|
|
|
|
IP-Address of the FPGA ( set with DIP switches on the board ) the output
|
|
|
|
file , number of events to capture and configuration file.
|
|
|
|
|
|
|
|
python takeMarocData.py
|
|
|
|
|
|
|
|
Data will be stored in a ROOT file.
|
|
|
|
|