Project

General

Profile

Using the hardware emulator system » History » Version 3

Thomas Dealtry, 03/06/2015 04:00 AM

1 1 Thomas Dealtry
h1. Using the hardware emulator system
2 1 Thomas Dealtry
3 2 Thomas Dealtry
{{toc}}
4 2 Thomas Dealtry
5 1 Thomas Dealtry
h2. Penn emulator
6 1 Thomas Dealtry
7 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.
8 1 Thomas Dealtry
9 1 Thomas Dealtry
# *Specify your setup options in PennReceiver0.fcl*
10 1 Thomas Dealtry
# *Start the python emulator (terminal 1)*
11 1 Thomas Dealtry
After sourcing setupLBNEARTDAQ, run:
12 1 Thomas Dealtry
<pre>
13 1 Thomas Dealtry
python `which pennEmulator.py`
14 1 Thomas Dealtry
</pre>
15 1 Thomas Dealtry
A port option exists if the default 9999 is taken.
16 3 Thomas Dealtry
A host option also exists, to start the emulator on another machine (e.g. on lbnedaq3 from lbne35t-gateway01) but this doesn't work. If you know how to fix it, please do!
17 1 Thomas Dealtry
# *Start the Penn system (terminal 2)*
18 1 Thomas Dealtry
After sourcing setupLBNEARTDAQ, run:
19 1 Thomas Dealtry
<pre>
20 1 Thomas Dealtry
startPennSystem.sh
21 1 Thomas Dealtry
</pre>
22 1 Thomas Dealtry
# *Run the Penn system (terminal 3)*
23 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.
24 1 Thomas Dealtry
You might want to add the following function to your .bashrc
25 1 Thomas Dealtry
<pre>
26 1 Thomas Dealtry
function managepenn {
27 1 Thomas Dealtry
    managePennSystem.sh -v init;
28 1 Thomas Dealtry
    managePennSystem.sh -N 101 start;
29 1 Thomas Dealtry
    sleep $1;
30 1 Thomas Dealtry
    managePennSystem.sh stop;
31 1 Thomas Dealtry
    managePennSystem.sh shutdown;
32 1 Thomas Dealtry
}
33 1 Thomas Dealtry
</pre>
34 2 Thomas Dealtry
Then to take a 60 second run, just type:
35 2 Thomas Dealtry
<pre>
36 2 Thomas Dealtry
managepenn 60
37 2 Thomas Dealtry
</pre>
38 1 Thomas Dealtry
39 2 Thomas Dealtry
Note that you can also use lbnerc to control the Penn. The steps are then (assuming you're on lbne35t-gateway01)
40 2 Thomas Dealtry
41 2 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.
42 2 Thomas Dealtry
# Remember to do step 2 (start the Penn system) on the correct machine - check ~/.lbnerc-components (currently use lbnedaq3)
43 2 Thomas Dealtry
# Use lbnecmd to control the system. See [[Running DAQ Interface]] for more information
44 2 Thomas Dealtry
45 2 Thomas Dealtry
h2. RCE emulator
46 2 Thomas Dealtry
47 2 Thomas Dealtry
*NOTE use the feature/emulators branch for the RCE emulator (for now) and don't merge it into develop*
48 2 Thomas Dealtry
49 2 Thomas Dealtry
The steps here are essentially identical to the Penn instructions. This is because the Penn emulator is a modified RCE emulator.
50 2 Thomas Dealtry
51 2 Thomas Dealtry
PennReceiver0.fcl -> TpcRceReceiver0.fcl
52 2 Thomas Dealtry
pennEmulator.py -> rceEmulator.py
53 2 Thomas Dealtry
startPennSystem.sh -> startRceSystem.sh
54 2 Thomas Dealtry
managePennSystem.sh -> manageRceSystem.sh
55 2 Thomas Dealtry
56 2 Thomas Dealtry
h2. SSP emulator
57 2 Thomas Dealtry
58 1 Thomas Dealtry
h2. Running multiple emulators together