The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5 <strong>The</strong> <strong>FEE</strong><strong>Server</strong> <strong>Control</strong> <strong>Engine</strong><br />
<strong>the</strong> optical power <strong>of</strong> <strong>the</strong> diode is interesting because this information can be used to<br />
localize problems when <strong>the</strong> GTU gets only a weak optical input signal.<br />
5.4.6 Memory Tests<br />
Three memory tests are available to check <strong>the</strong> internal memory <strong>of</strong> <strong>the</strong> CPUs in <strong>the</strong> MCMs.<br />
First, initial patterns <strong>of</strong> 0xABCD are written into memory areas starting at 0xF000 <strong>of</strong> each<br />
CPU. <strong>The</strong>n <strong>the</strong> patterns are read back by a second CPU: CPU0 is read out by CPU1, CPU1<br />
is read out by CPU2, CPU2 is read out by CPU3 and CPU3 is read out by CPU0. Each time<br />
<strong>the</strong> read out pattern differs from <strong>the</strong> expected pattern, <strong>the</strong> address <strong>of</strong> <strong>the</strong> memory at fault<br />
is subsequently stored in o<strong>the</strong>r memory areas <strong>of</strong> <strong>the</strong> CPUs. At <strong>the</strong> end <strong>of</strong> <strong>the</strong> tests <strong>the</strong>se<br />
memory areas are read out and a detailed report is created, containing <strong>the</strong> addresses <strong>of</strong><br />
all damaged memory areas.<br />
<strong>The</strong> tree memory tests for DMM, DDD, and IMM memory (for detail see [A + 05])<br />
mainly differ in <strong>the</strong> memory addresses that are checked. Additionally, in case <strong>of</strong> <strong>the</strong><br />
DMM and DDD test, <strong>the</strong> board merger and half chamber merger are allowed to have<br />
memory errors. <strong>The</strong>refore <strong>the</strong>y are not checked during DMM and DDD test.<br />
5.4.7 Network Interface Test<br />
<strong>The</strong> Network Interface test checks <strong>the</strong> connections <strong>of</strong> <strong>the</strong> Readout Tree (see sec. 4.3.6).<br />
First a bit pattern is written to a memory area <strong>of</strong> each MCM via SCSN Bus and it is<br />
checked that this was done successfully. Afterwards a pretrigger frame is sent to each<br />
MCM triggering <strong>the</strong> data transfer to <strong>the</strong> MCMs in <strong>the</strong> next higher level <strong>of</strong> <strong>the</strong> Readout<br />
tree. <strong>The</strong>n <strong>the</strong> memory area where <strong>the</strong> received data are stored is read out via <strong>the</strong> SCSN<br />
Bus and compared with <strong>the</strong> expected pattern. This procedure is repeated with different<br />
bit patterns to increase <strong>the</strong> sensitivity <strong>of</strong> this test.<br />
Only <strong>the</strong> spare and <strong>the</strong> parity line <strong>of</strong> each connection is not checked with <strong>the</strong> procedure<br />
described above. <strong>The</strong>refore in a second pass two o<strong>the</strong>r lines are configured as spare line<br />
and parity line. After <strong>the</strong> reconfiguration <strong>the</strong> complete test is repeated.<br />
Every difference between <strong>the</strong> received and expected pattern is reported as an error.<br />
Additionally <strong>the</strong> exact position <strong>of</strong> <strong>the</strong> broken line is determined and reported.<br />
5.5 Error Handling and <strong>the</strong> Logging System<br />
5.5.1 Error Handling in <strong>the</strong> <strong>Control</strong> <strong>Engine</strong><br />
<strong>The</strong> error handling in <strong>the</strong> control engine is based on <strong>the</strong> exception mechanism <strong>of</strong> C++.<br />
Each time something unexpected happens which <strong>the</strong> current function cannot handle it<br />
executes <strong>the</strong> code in listing 5.5. Usually one would create an instance <strong>of</strong> a class which<br />
stores information about <strong>the</strong> error and <strong>the</strong>n call <strong>the</strong> C++ function throw() with <strong>the</strong> class<br />
as parameter. However, <strong>the</strong> ARM cross compiler used to compile <strong>the</strong> control engine for<br />
<strong>the</strong> DCS board does not support this technique. It can handle only <strong>the</strong> build in types <strong>of</strong><br />
variables. <strong>The</strong>refore a different implementation was chosen.<br />
<strong>The</strong> class ErrorInfo is implemented as a singleton class. It is derived from <strong>the</strong> C++ class<br />
ostringstream to get streaming functionality. Each time an error occurs, first <strong>the</strong> error type<br />
is set (line one in listing 5.5). At <strong>the</strong> moment 19 different error types are defined but <strong>the</strong><br />
71