Skip to content

HSI hardware readout and control

strilov edited this page Apr 28, 2023 · 3 revisions

The configuration generator, daqconf_multiru_gen is able to produce a configuration for reading out real HSI devices, based on either DTS or CTB hardware. The generator is also is able to produce configuration for running the software-based HSI emulator.

DTS

The readout of DTS HSI hardware is enabled via the option, hsi.use_timing_hsi. If this flag is used the following options need to be set correctly.

  • hsi.hsi_hw_connections_file, IPBus connections file containing the HSI device entry
  • hsi.host_timing_hsi, Host to run the DTS readout HSI app on
  • hsi.enable_hardware_state_recovery, Enable (or not) hardware state recovery of the DTS HSI device
  • hsi.hsi_device_name, device name of DTS HSI hw (used for connection look-up to timing session)
  • hsi.hsi_readout_period, Real HSI hardware only: Period between the polling of the HSI hardware by the readout software [us]
  • hsi.control_hsi_hw, Flag to control whether we are controlling the DTS HSI hardware
  • hsi.hsi_endpoint-address, Timing address of DTS HSI endpoint
  • hsi.hsi_endpoint-partition, Timing partition of DTS HSI endpoint (deprecated with new style timing protocol)
  • hsi.hsi_re-mask, Rising-edge trigger mask, controls which inputs with a rising edge cause an HSI event
  • hsi.hsi_fe-mask, Falling-edge trigger mask, controls which inputs with a falling edge cause an HSI event
  • hsi.hsi_inv-mask, Invert-edge mask, controls which inputs are inverted
  • hsi.hsi_source, HSI signal source; 0 - hardware, 1 - emulation (bits 31-1: trigger timestamp bits, bit 0: periodic randoms generated in firmware)

N.B. If the HSI hardware has been configured to be in emulation mode, the rate at which bit 0 of the HSI signal map is asserted is set by the daqconf_multiru_gen parameter, trigger-rate-hz. This configuration is applied at the commands, conf, start, and start_run. For start and start_run, the parameter can be overwritten via a nanorc command line interface parameter. This rate of emulated HSI signals can be controlled mid-run using change_rate.

N.B. The configuration performed by daqconf_multiru_gen only configures the HSI layer of firmware. If the HSI firmware shares hardware with the timing master managed by the global timing partition application then the IO hardware layer configuration will be performed at conf of that application. If this is not the case, then IO hardware layer configuration will need to be performed by the low-level python tools available in the timing package. For the rest of the instructions we assume the hardware layer of the HSI device is already configured.

Pure software HSI (FakeHSIEventGenerator)

To add to the system, a pure software HSI generator, set the hsi.use_fake_hsi option to true. In such a case, make sure the below parameters are set correctly.

  • hsi.host_fake_hsi, Host to run the fake HSI app on
  • hsi.hsi_device_id, Fake HSI only: device ID of fake HSIEvents
  • hsi.mean_hsi_signal_multiplicity, Fake HSI only: rate of individual HSI signals in emulation mode 1
  • hsi.hsi_signal_emulation_mode, Fake HSI only: HSI signal emulation mode
  • hsi.enabled_hsi_signals, Fake HSI only: bit mask of enabled fake HSI signals