Running pRUParser: Difference between revisions

From pCT
Mri083 (talk | contribs)
No edit summary
Vei046 (talk | contribs)
No edit summary
Line 86: Line 86:


=== Generation of test data ===
=== Generation of test data ===
Clone into the WP3 repository
<syntaxhighlight lang="bash">
cd wp3/software/simulation
pip3 install -r requirements.txt
python3 test_cases.py
</syntaxhighlight>
cd to the desired test case folder. The different test cases are described in test_cases.py
<syntaxhighlight lang="bash">
xxd -r -p testcase_pruformat.txt outputfilename.bin
</syntaxhighlight>

Revision as of 10:58, 23 June 2020

Main Page -> Control & Readout Software Documentation and Howto's -> Running pRUParser


Software Function

The pRUParser takes a raw, binary, offload stream of pRU data from a file created by the pDTP Client. It will sort, error check and prunes this in to a raw, binary, stream and save this do disk for further prosessing. It will lastly print a summary of any errors it detected.

Protocol Dependencies

The pRUParser uses the pRU Data Format Specification v0.2

TODO add link to protocol document/page

Usage

In the readout/ folder in your build directory: For help run: <syntaxhighlight lang="bash"> $./run-pru-parser -h </syntaxhighlight>

To parse a file, run: <syntaxhighlight lang="bash"> $./run-pru-parser -i relative/path/to/input/file -o relative/path/to/output/file -v verbosity level (0 or 1) </syntaxhighlight>

Output

During the parse, if verbosity is greater than 0, a status summaries will be printed: <syntaxhighlight lang="bash"> Starting pipeline ... Input policy [File reader]: file readout/testDataX288.bin size kxcd Filter policy [Forward]: buffer of kxcd byte(s) This parse had a speed of: kx.cd Mb/s Ouput policy [File writer]: write to file readout/pData.bin size kxcd ... done </syntaxhighlight>

Otherwise, only a the parse benchmark will be printed <syntaxhighlight lang="bash"> This parse had a speed of: kx.cd Mb/s </syntaxhighlight>

Then a summary is printed: <syntaxhighlight lang="bash"> SUMMARY ------------- Total number of pRU frames parsed: n Total number of pRU empty words found: n Total number of pRU delimiter words found: n Unfinished pRU words in buffer: n </syntaxhighlight>

If any pRU empty words are received a shot summary will be printed: <syntaxhighlight lang="bash"> EMPTY FRAMES FOUND: n </syntaxhighlight>

If no errors are found, this will be printed: <syntaxhighlight lang="bash"> No errors found. </syntaxhighlight>

Otherwise an error summary will be printed: <syntaxhighlight lang="bash"> INPUT_SIZE_ERROR: n, MULTIPLE_PRU_HEADER_ERROR: n, DATA_WORD_MISSING_HEADER_ERROR: n, TRAILER_WORD_MISSING_HEADER_ERROR: n, PRU_TRAILER_FLAGS_ERROR: n, NO_DATA_WORD_ERROR: n, FRAME_SIZE_ERROR: n, MISSING_CHIP_HEADER_ERROR: n, MISSING_REGION_HEADER_ERROR: n, MISSING_CHIP_TRAILER_ERROR: n, MULTIPLE_CHIP_HEADER_ERROR: n, ALPIDE_TRAILER_FLAGS_ERROR: n, PADDING_ERROR: n, UNKNOWN_ALPIDE_WORD_ERROR: n </syntaxhighlight>

If any of the non fatal alpide trailer flags has been detected, a summary will be printed: <syntaxhighlight lang="bash"> ALPIDE Busy Transition: n ALPIDE Strobe Extended: n </syntaxhighlight>

Parser specification

I/O formats

Decoder

Handling of format errors

  • recovery
  • fatal errors
  • propagation/monitoring

Generation of test data

Clone into the WP3 repository

<syntaxhighlight lang="bash"> cd wp3/software/simulation pip3 install -r requirements.txt python3 test_cases.py </syntaxhighlight>

cd to the desired test case folder. The different test cases are described in test_cases.py

<syntaxhighlight lang="bash"> xxd -r -p testcase_pruformat.txt outputfilename.bin </syntaxhighlight>