mu2eUtil Users' Guide¶
mu2eUtil is a very powerful debugging application that provides a direct interface to the DTC interface library. Running mu2eUtil -h produces the following output:
[mu2edaq@mu2edaq01 ~]$ mu2eUtil -h Usage: mu2eUtil [options] [read,read_data,reset_detemu,toggle_serdes,loopback,buffer_test,read_release,DTC,program_clock] Options are: -h: This message. -n: Number of times to repeat test. (Default: 1) -o: Starting Timestamp offest. (Default: 1). -i: Do not increment Timestamps. -S: Synchronous Timestamp mode (1 RR & DR per Read operation) -d: Delay between tests, in us (Default: 0). -D: CFO Request delay interval (Default: 1000 (minimum). -c: Number of Debug Packets to request (Default: 0). -b: Number of Data Blocks to generate per Event (Default: 1). -E: Number of Events to generate per DMA block (Default: 1). -a: Number of Readout Request/Data Requests to send before starting to read data (Default: 0). -q: Quiet mode (Don't print requests) Additionally, for buffer_test mode, limits to N (Default 1) packets at the beginning and end of the buffer. -Q: Really Quiet mode (Try not to print anything) -s: Stop on SERDES Error. -e: Use DTCLib's SoftwareCFO instead of the DTC CFO Emulator -t: Use DebugType flag (1st request gets ExternalDataWithFIFOReset, the rest get ExternalData) -T: Set DebugType flag for ALL requests (0, 1, or 2) -f: RAW Output file path -p: Send DTCLIB_SIM_FILE to DTC and enable Detector Emulator mode -P: Send <file> to DTC and enable Detector Emulator mode (Default: "") -g: Generate (and send) N DMA blocks for testing the Detector Emulator (Default: 0) -G: Read out generated data, but don't write new. With -g, will exit after writing data -r: # of rocs to enable. Hexadecimal, each digit corresponds to a ring. ROC_0: 1, ROC_1: 3, ROC_2: 5, ROC_3: 7, ROC_4: 9, ROC_5: B (Default 0x1, All possible: 0xBBBBBB) -F: Frequency to program (in Hz, sorry...Default 166666667 Hz) -C: Clock to program (0: SERDES, 1: DDR, Default 0)
h2. mu2eUtil Operating Modes
mu2eUtil supports the following "mode" commands: read,read_data,reset_detemu,toggle_serdes,loopback,buffer_test,read_release,DTC,program_clock
- read:
Performs a DTC read, through the DTC library, printing out any buffers that are already available. Packet checking is performed. - read_data:
Performs a "raw" read, printing out any buffers that are already available. - reset_detemu:
Performs a full reset of the Detector Emulator part of the firmware - toggle_serdes:
Changes the output SERDES between 2.5 Gbps and 3.125 Gbps - loopback:
Performs a SERDES loopback test through the DTC library - buffer_test:
Creates requests for data and performs a "raw" read of the resulting buffers - read_release:
Discard available buffers. - DTC:
Creates requests for data and performs a "DTC read" of the resulting buffers - program_clock:
Set the oscillator frequency for the specified clock
rocUtil Users' Guide¶
rocUtil is used to communicate with a ROC connected to the DTC using DCS Control packets.
This utility is designed for the prototype ROC's protocol; which is subject to change.
Running rocUtil -h produces the following output:
[mu2edaq@mu2edaq01 ~]$ rocUtil -h Usage: rocUtil [options] [read_register,reset_roc,write_register,write_extregister,test_read,read_release,toggle_serdes] Options are: -h: This message. -n: Number of times to repeat test. (Default: 1) -d: Delay between tests, in us (Default: 0). -w: Data to write to address -a: Address to write -b: Block address (for write_rocext) -q: Quiet mode (Don't print requests) -Q: Really Quiet mode (Try not to print anything) [mu2edaq@mu2edaq01 ~]$
rocUtil Operating Modes¶
rocUtil supports the following "mode" commands: read_register,reset_roc,write_register,write_extregister,test_read,read_release,toggle_serdes
- read_register:
Read the given register of the ROC - reset_roc:
Perform a "ROC Reset" - write_register:
Write the given value to the given "main" register of the ROC - write_extregister:
Write the given value to one of the "extended" registers of the ROC - test_read:
Perform a "raw" read of DCS packets from the ROC - read_release:
Discard available DCS buffers - toggle_serdes:
Changes the output SERDES between 2.5 Gbps and 3.125 Gbps
Examples¶
The flow of development is:- mu2eUtil buffer_test
- mu2eUtil DTC
- artdaqDriver <fixed number of events>
- mu2e_artdaq <Run Control mode>
For the mu2eUtil buffer_test:
export DTCLIB_SIM_ENABLE=N # Use the real DTC without a separate CFO card mu2eUtil -n 1 buffer_test # Sends a Readout Request and Data Request to ROC, displays response mu2eUtil -n 1000 buffer_test # Make sure things work in a more free-running manner
mu2eUtil DTC mode decodes the DataHeader packets coming from the DTC, but otherwise works in a very similar way as mu2eUtil buffer_test:
export DTCLIB_SIM_ENABLE=N # Use the real DTC without a separate CFO card mu2eUtil -n 1 DTC # Sends a Readout Request and Data Request to ROC, displays response mu2eUtil -n 1000 DTC # Make sure things work in a more free-running manner