pynn_brainscales.brainscales2.simulator.NeuronPlacement

class pynn_brainscales.brainscales2.simulator.NeuronPlacement(permutation: Optional[List[int]] = None)

Bases: object

Tracks the assignment of pyNN IDs to LogicalNeuronOnDLS.

This tracking is needed for all neuron types which are placed in the neuron array. By default the anchor of the neurons are placed in increasing order of the hardware enumeration.

Parameters

neuron_id – Look up table for permutation. Index: HW related population neuron enumeration. Value: HW neuron enumeration.

__init__(permutation: Optional[List[int]] = None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([permutation])

Initialize self.

id2first_circuit(neuron_id)

Get hardware coordinate of first circuit in first compartment as plain int from pyNN ID.

id2logicalneuron(neuron_id)

Get hardware coordinate from pyNN ID :param neuron_id: pyNN neuron ID

register_neuron(neuron_id, logical_compartments)

Register new IDs to placement.

Attributes

DEFAULT_PERMUTATION

DEFAULT_PERMUTATION: Final[List[int]] = range(0, 512)
id2first_circuit(neuron_id: Union[List[pynn_brainscales.brainscales2.simulator.ID], pynn_brainscales.brainscales2.simulator.ID])Union[List[int], int]

Get hardware coordinate of first circuit in first compartment as plain int from pyNN ID.

Parameters

neuron_id – pyNN neuron ID

Returns

Enums of first circuits in first compartments.

id2logicalneuron(neuron_id: Union[List[pynn_brainscales.brainscales2.simulator.ID], pynn_brainscales.brainscales2.simulator.ID])Union[List[pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS], pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS]

Get hardware coordinate from pyNN ID :param neuron_id: pyNN neuron ID

register_neuron(neuron_id: Union[List[pynn_brainscales.brainscales2.simulator.ID], pynn_brainscales.brainscales2.simulator.ID], logical_compartments: pyhalco_hicann_dls_vx_v3.LogicalNeuronCompartments)

Register new IDs to placement.

Parameters
  • neuron_id – pyNN neuron IDs to be registered.

  • logical_compartments – LogicalNeuronCompartments which belong to the neurons which should be registered. All neurons which should be registered have to share the same morphology, i.e. have the same LogicalNeuronCompartments coordinate.