Project

General

Profile

Using the hardware emulator system » History » Version 1

Thomas Dealtry, 03/06/2015 03:44 AM

1 1 Thomas Dealtry
h1. Using the hardware emulator system
2 1 Thomas Dealtry
3 1 Thomas Dealtry
h2. Penn emulator
4 1 Thomas Dealtry
5 1 Thomas Dealtry
It's recommended to have 3 terminals open, but of course you can use just one & leave processes running in the background.
6 1 Thomas Dealtry
7 1 Thomas Dealtry
# *Specify your setup options in PennReceiver0.fcl*
8 1 Thomas Dealtry
# *Start the python emulator (terminal 1)*
9 1 Thomas Dealtry
After sourcing setupLBNEARTDAQ, run:
10 1 Thomas Dealtry
<pre>
11 1 Thomas Dealtry
python `which pennEmulator.py`
12 1 Thomas Dealtry
</pre>
13 1 Thomas Dealtry
A port option exists if the default 9999 is taken.
14 1 Thomas Dealtry
A host option also exists, to start the emulator on another machine (e.g. on lbnedaq3 from the gateway) but this is untested
15 1 Thomas Dealtry
# *Start the Penn system (terminal 2)*
16 1 Thomas Dealtry
After sourcing setupLBNEARTDAQ, run:
17 1 Thomas Dealtry
<pre>
18 1 Thomas Dealtry
startPennSystem.sh
19 1 Thomas Dealtry
</pre>
20 1 Thomas Dealtry
# *Run the Penn system (terminal 3)*
21 1 Thomas Dealtry
After sourcing setupLBNEARTDAQ, use the managePennSystem.sh to control the system. See [[artdaq-demo:Running a sample artdaq-demo system]] for details on manage*.sh script options.
22 1 Thomas Dealtry
You might want to add the following function to your .bashrc
23 1 Thomas Dealtry
<pre>
24 1 Thomas Dealtry
function managepenn {
25 1 Thomas Dealtry
    managePennSystem.sh -v init;
26 1 Thomas Dealtry
    managePennSystem.sh -N 101 start;
27 1 Thomas Dealtry
    sleep $1;
28 1 Thomas Dealtry
    managePennSystem.sh stop;
29 1 Thomas Dealtry
    managePennSystem.sh shutdown;
30 1 Thomas Dealtry
}
31 1 Thomas Dealtry
</pre>
32 1 Thomas Dealtry
33 1 Thomas Dealtry
Note that you can also use lbnerc to control the Penn. Things to remember (assuming you're on lbne35t-gateway01):
34 1 Thomas Dealtry
* Specify your configuration in /data/lbnedaq/config/penn_emulator/penn01_hw_cfg.fcl (or make your own!). Remember to 'git commit' before using the new/modified configuration.
35 1 Thomas Dealtry
* Remember to do step 2 (start the Penn system) on the correct machine. (This is currently lbnedaq3)
36 1 Thomas Dealtry
h2. Running multiple emulators together