pynn_brainscales.brainscales2

Modules

pynn_brainscales.brainscales2.connectors

Add location_selector and source_location_selector to build-in pyNN connectors.

pynn_brainscales.brainscales2.examples

pynn_brainscales.brainscales2.helper

pynn_brainscales.brainscales2.morphology

pynn_brainscales.brainscales2.plasticity_rules

pynn_brainscales.brainscales2.populations

pynn_brainscales.brainscales2.projections

pynn_brainscales.brainscales2.recording

pynn_brainscales.brainscales2.recording_data

pynn_brainscales.brainscales2.simulator

pynn_brainscales.brainscales2.standardmodels

Implementation of the PyNN API for the neuromorphic BrainScales2 system.

Classes

AllToAllConnector([allow_self_connections, …])

ArrayConnector(array[, safe, callback, …])

Assembly(*populations, **kwargs)

CSAConnector(cset[, safe, callback, …])

CloneConnector(reference_projection[, safe, …])

DisplacementDependentProbabilityConnector(…)

DistanceDependentProbabilityConnector(…[, …])

Enum(value)

Generic enumeration.

FixedNumberPostConnector(n[, …])

FixedNumberPreConnector(n[, …])

FixedProbabilityConnector(p_connect[, …])

FixedTotalNumberConnector(n[, …])

FromFileConnector(file[, distributed, safe, …])

FromListConnector(conn_list[, column_names, …])

IndexBasedProbabilityConnector(index_expression)

InjectedConfiguration(pre_non_realtime, …)

User defined injected configuration

InjectedReadout(pre_realtime, …)

User defined injected readout

OneToOneConnector([safe, callback, …])

PlasticityRule(timer, observables, …)

Plasticity rule base class.

Population(size, cellclass[, cellparams, …])

A group of neurons all of the same type.

PopulationView(parent, selector[, label])

Projection(presynaptic_neurons, …[, …])

RunCommand(value)

Command specifying the type of run to be performed in pynn.run()

SmallWorldConnector(degree, rewiring[, …])

SpikingCalibOptions(cadc_options, …)

Data class containing further options for spiking calibration.

SpikingCalibTarget(cadc_target, …)

Data class containing targets for spiking neuron calibration.

Timer(**parameters)

Periodic timer information for plasticity rule execution.

auto()

Instances are replaced with an appropriate value in Enum class suites.

Functions

pynn_brainscales.brainscales2.connect(*args, **kwargs)

Deprecated. Use Projection() instead.

pynn_brainscales.brainscales2.create(*args, **kwargs)

Deprecated. Use Population() instead.

pynn_brainscales.brainscales2.dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False)

Returns the same class as was passed in, with dunder methods added based on the fields defined in the class.

Examines PEP 526 __annotations__ to determine fields.

If init is true, an __init__() method is added to the class. If repr is true, a __repr__() method is added. If order is true, rich comparison dunder methods are added. If unsafe_hash is true, a __hash__() method function is added. If frozen is true, fields may not be assigned to after instance creation. If match_args is true, the __match_args__ tuple is added. If kw_only is true, then by default all fields are keyword-only. If slots is true, an __slots__ attribute is added.

pynn_brainscales.brainscales2.end()

Do any necessary cleaning up before exiting.

pynn_brainscales.brainscales2.field(*, default=<dataclasses._MISSING_TYPE object>, default_factory=<dataclasses._MISSING_TYPE object>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object>)

Return an object to identify dataclass fields.

default is the default value of the field. default_factory is a 0-argument function called to initialize a field’s value. If init is true, the field will be a parameter to the class’s __init__() function. If repr is true, the field will be included in the object’s repr(). If hash is true, the field will be included in the object’s hash(). If compare is true, the field will be used in comparison functions. metadata, if specified, must be a mapping which is stored but not otherwise examined by dataclass. If kw_only is true, the field will become a keyword-only parameter to __init__().

It is an error to specify both default and default_factory.

pynn_brainscales.brainscales2.get_backend_statistics()_pygrenade_vx_network.NetworkGraphStatistics

Get statistics of placement and routing like amount of time spent and number of hardware entities used. :raises RuntimeError: If the simulator is not active, i.e. pynn.setup()

was not called.

Raises

RuntimeError – If the routing and placement step were not performed, i.e. pynn.run() was not called.

Returns

Statistics object.

pynn_brainscales.brainscales2.get_current_time()

Return the current time in the simulation (in milliseconds).

pynn_brainscales.brainscales2.get_execution_health_info()_pygrenade_vx_signal_flow.ExecutionHealthInfo

Get health information of last execution.

Raises
  • RuntimeError – If the simulator is not active, i.e. pynn.setup() was not called.

  • RuntimeError – If no info is available, i.e. pynn.run() was not called.

Returns

Health info object.

pynn_brainscales.brainscales2.get_execution_time_info()_pygrenade_vx_signal_flow.ExecutionTimeInfo

Get time information of last execution. :raises RuntimeError: If the simulator is not active, i.e. pynn.setup()

was not called.

Raises

RuntimeError – If no info is available, i.e. pynn.run() was not called.

Returns

Time info object.

pynn_brainscales.brainscales2.get_io(filename)

Return a Neo IO instance, guessing the type based on the filename suffix.

pynn_brainscales.brainscales2.get_max_delay()

Return the maximum allowed synaptic delay (in milliseconds).

pynn_brainscales.brainscales2.get_min_delay()

Return the minimum allowed synaptic delay (in milliseconds).

pynn_brainscales.brainscales2.get_post_realtime_read()Dict[pyhalco_common.Coordinate, pyhaldls_vx_v3.Container]

Get injected read results of after post_realtime section. :return: Dictionary with coordinates as keys and read container as

values.

pynn_brainscales.brainscales2.get_post_realtime_read_ppu_symbols()Dict[str, Union[Dict[pyhalco_hicann_dls_vx_v3.HemisphereOnDLS, pyhaldls_vx_v3.PPUMemoryBlock], pylola_vx_v3.ExternalPPUMemoryBlock]]

Get injected PPU symbol read results of after inside_realtime_end section. :return: Dictionary with symbol name as keys and read container(s) as

values.

pynn_brainscales.brainscales2.get_pre_realtime_read()Dict[pyhalco_common.Coordinate, pyhaldls_vx_v3.Container]

Get injected read results of after pre_realtime section. :return: Dictionary with coordinates as keys and read container as

values.

pynn_brainscales.brainscales2.get_time_step()

Return the integration time step (in milliseconds).

pynn_brainscales.brainscales2.initialize(*args, **kwargs)

Deprecated. Use Population.initialize() instead.

pynn_brainscales.brainscales2.list_standard_models()

Return a list of all the StandardCellType classes available for this simulator.

pynn_brainscales.brainscales2.num_processes()

Return the number of MPI processes.

pynn_brainscales.brainscales2.preprocess()

Does the same as pyNN.run(pyNN.RunCommand.PREPARE). Exists only due to backwards-compatibility reasons.

pynn_brainscales.brainscales2.rank()

Return the MPI rank of the current node.

pynn_brainscales.brainscales2.record(*args, **kwargs)

Deprecated. Use Population.record() instead.

pynn_brainscales.brainscales2.reset(annotations={})

Reset the time to zero, neuron membrane potentials and synaptic weights to their initial values, and begin a new Segment for recorded data. The network structure is not changed, nor are neuron/synapse parameters, nor the specification of which neurons to record from.

pynn_brainscales.brainscales2.run(runtime: Optional[float, None], command: pynn_brainscales.brainscales2.RunCommand = <RunCommand.EXECUTE: 3>)

Take different actions according to the value passed for command:

For command=pyNN.RunCommand.PREPARE: Execute all steps needed for the hardware back-end. Includes place&route of network graph or execution of calibration. Can be called manually to obtain calibration results for e.g. CalibHXNeuron and make adjustments if needed. If not called manually is automatically called on command=pyNN.RunCommand.APPEND.

For command=pyNN.RunCommand.APPEND: Make a snapshot of the current network configuration and cache it together with the according runtime, for which the system shall evolve in this configuration. Append snippet (=certain network description valid for certain duration) to currently scheduled experiment.

For command=pyNN.RunCommand.EXECUTE: Execute the experiment that was already scheduled by using command=pyNN.RunCommand.APPEND. Can also append a last snippet to the experiment right before executing the experiment, if a value is passed for runtime.

pynn_brainscales.brainscales2.run_for(runtime: Optional[float, None], command: pynn_brainscales.brainscales2.RunCommand = <RunCommand.EXECUTE: 3>)

Take different actions according to the value passed for command:

For command=pyNN.RunCommand.PREPARE: Execute all steps needed for the hardware back-end. Includes place&route of network graph or execution of calibration. Can be called manually to obtain calibration results for e.g. CalibHXNeuron and make adjustments if needed. If not called manually is automatically called on command=pyNN.RunCommand.APPEND.

For command=pyNN.RunCommand.APPEND: Make a snapshot of the current network configuration and cache it together with the according runtime, for which the system shall evolve in this configuration. Append snippet (=certain network description valid for certain duration) to currently scheduled experiment.

For command=pyNN.RunCommand.EXECUTE: Execute the experiment that was already scheduled by using command=pyNN.RunCommand.APPEND. Can also append a last snippet to the experiment right before executing the experiment, if a value is passed for runtime.

pynn_brainscales.brainscales2.run_until(time_point, callbacks=None)

Advance the simulation until time_point (in ms).

callbacks is an optional list of callables, each of which should accept the current time as an argument, and return the next time it wishes to be called.

run_until() and run() may be combined freely. See the documentation of the run() function for further information.

pynn_brainscales.brainscales2.set(*args, **kwargs)

Deprecated. Use Population.set() instead.

pynn_brainscales.brainscales2.setup(timestep=3.4e-05, min_delay='auto', **extra_params)

Should be called at the very beginning of a script. :param extra_params:

most params come from pynn.common.setup neuronPermutation: List providing lookup for custom pyNN neuron to

hardware neuron. Index: HW related population neuron enumeration. Value: HW neuron enumeration. Can be shorter than total HW neuron count. E.g. [2,4,5] results in the first neuron of the first HXNeuron population to be assigned to AtomicNeuronOnDLS(Enum(2)) and so forth.

backgroundPermutation: List providing lookup for custom pyNN background

spike source to hardware entity. Index: HW related population source enumeration. Value: HW source enumeration. Can be shorter than total HW source count. E.g. [2,3] results in the first population to be assigned to PADIBusOnPADIBusBlock(2) and so forth.

enable_neuron_bypass: Enable neuron bypass mode: neurons forward spikes

arriving at the synaptic input (i.e. no leaky integration is happening); defaults to False.

initial_config: Initial configuration of the entire chip. Can for

example be used to manually apply a calibration result.

injected_config: Optional user defined injected configuration. injected_readout: Optional user defined injected readout. calibration_cache: Directory where automated calibration is cached.

If none provided defaults to home cache.

injected_calib_target: Optional user defined injected calibration

target, which may be partially overwritten by parameters set at populations and projections.

injected_calib_options: Optional user defined injected calibration

options, which may be partially overwritten by parameters set at populations and projections.

pynn_brainscales.brainscales2.warn(message, category=None, stacklevel=1, source=None)

Issue a warning, or maybe ignore it or raise an exception.