Page History
...
High-rate encoder (hrencoder)
Debugging
devGui
The high-rate encoder firmware is located at high-rate-encoder-dev, the devGui is included in the repository. To clone it:
Registers
TriggerEventBuffer.TriggerDelay
is an additional trigger seen by the encoder- Units 185.7 MHz clocks
- Provides a knob for timing the trigger to get the correct encoder reading per event.
- Default value (if not running from DAQ) is 42 - too small to affect dead time issues.
Set TriggerEventBuffer.TriggerSource
toXPM
(0) - Evr is the other option (LCLSI)- Set
EventBuilder.Partition
to group - Set
EventBuilder.Bypass
to0x4
to bypass full timing stream which has no buffer and is not needed for the high-rate encoder.
Data Format
This information also available at the firmware repository.
Data is on SFP[0], VC[1] Subframe 2, counting from 0.
The data message is:
Code Block |
---|
BIT[31:00] = Encoder position
BIT[39:32] = Encoder Error Counter
BIT[47:40] = Missed Trigger Counter
BIT[48] = "E" latch
BIT[49] = "P" latch
BIT[50] = "Q" latch
BIT[63:51] = Reserved (zeros) |
Debugging
devGui
The high-rate encoder firmware is located at high-rate-encoder-dev, the devGui is included in the repository. To clone it:
Code Block |
---|
GIT_LFS_SKIP_SMUDGE=1 git clone git@github.com:slaclab/high-rate-encoder-dev |
Code Block |
GIT_LFS_SKIP_SMUDGE=1 git clone git@github.com:slaclab/high-rate-encoder-dev --recursive |
The devGui
can then be run from high-rate-encoder-dev/software
as:
...
- The script must be run from the software directory as it looks for a configuration YAML that is located at
config/defaults.yml
. - It requires the
lane
not thelane mask
. As of 2024/03/29, the high-rate encoder is drp-srcf-cmp004 lane 7. --standAloneMode
is for running off of internal timing.
devGui + DAQ Simultaneously
It is possible to run the full devGui
(not the "Spy-mode" described above) alongside the DAQ with a bit of hack. This works fairly well with the hrencoder
because the hrencoder_config.py
is fairly simple. It may be of use if you can transition to configure but not beyond. To run the DAQ alongside the devGui
, you can:
- First open the DAQ alongside the spy-GUI described above.
- Pass through the
Configure
transition. - Switch to the "spy-mode devGui" and save a YAML file containing the current configuration.
- Close the DAQ and edit
hrencoder_config.py
(or other equivalent detector) - remove theRoot
object and all register accesses from the file. - Reopen the DAQ and rerun the
devGui
. Swich to theSystem
tab and browse to and load the YAML file you saved previously. - Transition to Configure and run etc..
- You have to load the YAML before transitioning to configure.
Restarting IOCs
(courtesy of Tyler Johnson)
...