calix.common.synapse.DACBiasCalibCADC
-
class
calix.common.synapse.
DACBiasCalibCADC
Bases:
calix.common.base.Calib
Calibrates synapse DAC bias currents such that the amplitudes received at all neurons match those of the weakest quadrant.
The voltage drop on the synapse lines is measured using the CADC. The synaptic inputs are disabled and the synaptic time constant is set maximum. The initial value of the synaptic time constant and input strength are not restored. The digital configuration of the neuron is restored at the end of the calibration.
Requirements: * CADCs are connected to the neuron readout. * Bias currents are set such that synaptic input lines can be
observed on the neuron readout: The neurons’ readout amplifiers and the source followers in the neurons’ synaptic inputs need to be biased.
- Variables
original_neuron_config – Neuron configs before calibration, read during prelude, restored in postlude.
-
__init__
() Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
()Initialize self.
configure_parameters
(builder, parameters)Configures the given array of synapse DAC bias currents.
measure_results
(connection, builder)Measures the drop in synaptic input potentials for all synapse columns.
postlude
(connection)Restore original neuron configuration.
prelude
(connection)Prepares chip for calibration.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configures the given array of synapse DAC bias currents.
- Parameters
builder – Builder to append configuration instructions to.
parameters – Array of bias currents to set up.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Measures the drop in synaptic input potentials for all synapse columns.
- Parameters
connection – Connection to a chip.
builder – Builder to append read instructions to.
- Returns
Array containing the median drop in synaptic input potential per quadrant.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) Restore original neuron configuration.
- Parameters
connection – Connection to the chip to calibrate.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Prepares chip for calibration.
Reads the current neuron configuration which will be restored at the end of the calibration. After that synaptic inputs are disabled. Configures synapse drivers to stimulate the necessary input.
Measures the amplitudes of synapses per quadrant once, calculates the median amplitude per quadrant, and sets the ivar target to the minimum of these median amplitudes (which ensures the target can be reached, in case the maximum bias current of 1022 was used before).
- Parameters
connection – Connection to the chip to calibrate.
- Raises
CalibNotSuccessful – If amplitudes can not be brought into a reliable range by adjusting the number of enabled synapse rows.
AssertionError – If the number of enabled synapse rows is not updated in a given iteration. This indicates a bug and should not happen.