calix.hagen.synapse_driver.STPRampCalib
-
class
calix.hagen.synapse_driver.
STPRampCalib
Bases:
calix.common.base.Calib
Search synapse driver STP ramp currents such that the mean amplitudes of drivers on different CapMem blocks are the same.
This is necessary as 64 drivers each, which are connected to the same CapMem block, receive the same bias current, but different instances of the CapMem can drive different currents at the same setting. This calibration counters systematic deviations in amplitudes between synapse drivers on different quadrants.
The amplitudes are measured with the neurons in integration mode. In order to obtain a representative result for a quadrant’s amplitudes with the STP offsets not calibrated yet, we select an “average” driver for each CapMem block during the prelude. The median of their amplitudes is used as calibration target.
Requirements: * Synapse DAC bias is calibrated. * Static synapse driver bias currents are set. This can be achieved
using preconfigure_capmem().
- Variables
test_activation – Hagen-mode activation to use when determining the ramp slope. Should be low, close but not equal to zero. Make sure to change the target amplitude accordingly when changing the test_activation.
n_parallel_measurements – Number of parallel measurements to execute when measuring results.
offset_calib – Instance of calibration used for Hagen DAC offset. This calibration is called each time after changing the STP ramp currents, before measuring results.
log – Logger used to log outputs.
-
__init__
() Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
()Initialize self.
calculate_quadrant_means
(results)Calculate mean amplitudes per quadrant from an array of all drivers’ amplitudes.
configure_parameters
(builder, parameters)Configure the given STP ramp currents to the CapMem quadrants.
measure_results
(connection, builder)Measure the amplitudes of all drivers at a low activation.
postlude
(connection)Print the calibrated ramp currents.
prelude
(connection)Measure maximum amplitude per driver, using a high ramp bias current and a high activation.
-
static
calculate_quadrant_means
(results: numpy.ndarray) → numpy.ndarray Calculate mean amplitudes per quadrant from an array of all drivers’ amplitudes.
- Parameters
results – Results from all synapse drivers on chip.
- Returns
Mean results of all drivers on a quadrant.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the given STP ramp currents to the CapMem quadrants.
The STP calibration current is set equal to this ramp current: The ramp offset calibration works by sinking part of the ramp current within the first 2 ns of the ramp generation phase. The calibration current controls the sinked current, therefore it is sensible to scale it with the sourced (ramp) current.
- Parameters
builder – Builder to append configuration to.
parameters – STP ramp currents to set.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Measure the amplitudes of all drivers at a low activation.
This corresponds to a high DAC voltage, i.e. the end of the ramp. We return the mean amplitude per quadrant.
- Parameters
connection – Connection to the chip to run on.
builder – Builder to measure results with.
- Returns
Array of STP amplitudes per quadrant.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) → None Print the calibrated ramp currents.
- Parameters
connection – Connection to the chip to run on.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Measure maximum amplitude per driver, using a high ramp bias current and a high activation.
- Parameters
connection – Connection to the chip to run on.