Calibration

BrainScaleS-2 uses analog circuits to emulate the behavior of neurons and synapses. Due to the manufacturing process these circuits are subject to variations. This means that every analog circuit has slightly different properties.

In order to reduce the mismatch between different neurons and synapses the BrainScaleS-2 system can be calibrated. The calix library is capable of performing these calibration. In this document we describe how calibration data can be used in PyNN.

Loading a Calibration

The helper function chip_from_file() converts a binary dump of a playback program to an object which represents the configuration of the BrainScaleS-2 chip.

import pynn_brainscales.brainscales2 as pynn
chip = pynn.helper.chip_from_file(some_file)

Applying a Calibration

The global chip configuration can be injected when we call the setup() function.

pynn.setup(initial_config=chip)

Nightly Calibration

Every night a default calibration is generated for each setup. The path to the most recent calibration for the setup in use can be fetched with:

pynn_brainscales.brainscales2.helper.nightly_calib_path()pathlib.Path

Find path for nightly calibration.

Furthermore, a convenient function is provided which allows to directly retrieve the chip configuration:

pynn_brainscales.brainscales2.helper.chip_from_nightly()pylola_vx_v3.Chip

Extract chip config from nightly calibration.

Generating the Calibration from the PyNN Network

In addition to loading a previously created calibration into PyNN, the calibration can also be directly be created for a network defined in PyNN. This feature can be used by replacing the HXNeuron by one of the following cell types:

class pynn_brainscales.brainscales2.standardmodels.cells.CalibHXNeuronCuba(plasticity_rule: Optional[pynn_brainscales.brainscales2.plasticity_rules.PlasticityRule] = None, *, v_rest: Optional[Union[int, List, numpy.ndarray]] = None, v_reset: Optional[Union[int, List, numpy.ndarray]] = None, v_thresh: Optional[Union[int, List, numpy.ndarray]] = None, tau_m: Optional[Union[int, List, numpy.ndarray]] = None, tau_syn_E: Optional[Union[int, List, numpy.ndarray]] = None, tau_syn_I: Optional[Union[int, List, numpy.ndarray]] = None, cm: Optional[Union[int, List, numpy.ndarray]] = None, tau_refrac: Optional[Union[int, List, numpy.ndarray]] = None, i_synin_gm_E: Optional[Union[int, List, numpy.ndarray]] = None, i_synin_gm_I: Optional[Union[int, List, numpy.ndarray]] = None, synapse_dac_bias: Optional[Union[int, List, numpy.ndarray]] = None, **parameters)

HX Neuron with automated calibration. Cell parameters correspond to parameters for Calix spiking calibration.

Uses current-based synapses.

class pynn_brainscales.brainscales2.standardmodels.cells.CalibHXNeuronCoba(plasticity_rule: Optional[pynn_brainscales.brainscales2.plasticity_rules.PlasticityRule] = None, *, v_rest: Optional[Union[int, List, numpy.ndarray]] = None, v_reset: Optional[Union[int, List, numpy.ndarray]] = None, v_thresh: Optional[Union[int, List, numpy.ndarray]] = None, tau_m: Optional[Union[int, List, numpy.ndarray]] = None, tau_syn_E: Optional[Union[int, List, numpy.ndarray]] = None, tau_syn_I: Optional[Union[int, List, numpy.ndarray]] = None, cm: Optional[Union[int, List, numpy.ndarray]] = None, tau_refrac: Optional[Union[int, List, numpy.ndarray]] = None, i_synin_gm_E: Optional[Union[int, List, numpy.ndarray]] = None, i_synin_gm_I: Optional[Union[int, List, numpy.ndarray]] = None, e_rev_E: Optional[Union[int, List, numpy.ndarray]] = None, e_rev_I: Optional[Union[int, List, numpy.ndarray]] = None, synapse_dac_bias: Optional[Union[int, List, numpy.ndarray]] = None, **parameters)

HX Neuron with automated calibration. Cell parameters correspond to parameters for Calix spiking calibration.

Uses conductance-based synapses.

Once run() is called, calix is used to generate a calibration in the background. As generating a calibration takes around five minutes, this mode is not meant for interactive exploration.