spynnaker.pyNN.models.neuron package¶
Subpackages¶
- spynnaker.pyNN.models.neuron.additional_inputs package
- spynnaker.pyNN.models.neuron.builds package
- Submodules
- spynnaker.pyNN.models.neuron.builds.eif_cond_alpha_isfa_ista module
- spynnaker.pyNN.models.neuron.builds.hh_cond_exp module
- spynnaker.pyNN.models.neuron.builds.if_cond_alpha module
- spynnaker.pyNN.models.neuron.builds.if_cond_exp_base module
- spynnaker.pyNN.models.neuron.builds.if_cond_exp_stoc module
- spynnaker.pyNN.models.neuron.builds.if_curr_alpha module
- spynnaker.pyNN.models.neuron.builds.if_curr_delta module
- spynnaker.pyNN.models.neuron.builds.if_curr_dual_exp_base module
- spynnaker.pyNN.models.neuron.builds.if_curr_exp_base module
- spynnaker.pyNN.models.neuron.builds.if_curr_exp_ca2_adaptive module
- spynnaker.pyNN.models.neuron.builds.if_curr_exp_semd_base module
- spynnaker.pyNN.models.neuron.builds.if_facets_hardware1 module
- spynnaker.pyNN.models.neuron.builds.izk_cond_exp_base module
- spynnaker.pyNN.models.neuron.builds.izk_curr_exp_base module
- Module contents
- spynnaker.pyNN.models.neuron.implementations package
- Submodules
- spynnaker.pyNN.models.neuron.implementations.abstract_neuron_impl module
- spynnaker.pyNN.models.neuron.implementations.abstract_standard_neuron_component module
- spynnaker.pyNN.models.neuron.implementations.neuron_impl_standard module
- spynnaker.pyNN.models.neuron.implementations.ranged_dict_vertex_slice module
- spynnaker.pyNN.models.neuron.implementations.struct module
- Module contents
- spynnaker.pyNN.models.neuron.input_types package
- Submodules
- spynnaker.pyNN.models.neuron.input_types.abstract_input_type module
- spynnaker.pyNN.models.neuron.input_types.input_type_conductance module
- spynnaker.pyNN.models.neuron.input_types.input_type_current module
- spynnaker.pyNN.models.neuron.input_types.input_type_current_semd module
- Module contents
- spynnaker.pyNN.models.neuron.master_pop_table_generators package
- spynnaker.pyNN.models.neuron.neuron_models package
- spynnaker.pyNN.models.neuron.plasticity package
- Subpackages
- spynnaker.pyNN.models.neuron.plasticity.stdp package
- Subpackages
- spynnaker.pyNN.models.neuron.plasticity.stdp.common package
- spynnaker.pyNN.models.neuron.plasticity.stdp.synapse_structure package
- Submodules
- spynnaker.pyNN.models.neuron.plasticity.stdp.synapse_structure.abstract_synapse_structure module
- spynnaker.pyNN.models.neuron.plasticity.stdp.synapse_structure.synapse_structure_weight_accumulator module
- spynnaker.pyNN.models.neuron.plasticity.stdp.synapse_structure.synapse_structure_weight_only module
- Module contents
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence package
- Submodules
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.abstract_timing_dependence module
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.timing_dependence_pfister_spike_triplet module
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.timing_dependence_recurrent module
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.timing_dependence_spike_nearest_pair module
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.timing_dependence_spike_pair module
- spynnaker.pyNN.models.neuron.plasticity.stdp.timing_dependence.timing_dependence_vogels_2011 module
- Module contents
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence package
- Submodules
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence.abstract_has_a_plus_a_minus module
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence.abstract_weight_dependence module
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence.weight_dependence_additive module
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence.weight_dependence_additive_triplet module
- spynnaker.pyNN.models.neuron.plasticity.stdp.weight_dependence.weight_dependence_multiplicative module
- Module contents
- Module contents
- Subpackages
- spynnaker.pyNN.models.neuron.plasticity.stdp package
- Module contents
- Subpackages
- spynnaker.pyNN.models.neuron.structural_plasticity package
- Subpackages
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis package
- Subpackages
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.elimination package
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.formation package
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.partner_selection package
- Submodules
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.partner_selection.abstract_partner_selection module
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.partner_selection.last_neuron_selection module
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis.partner_selection.random_selection module
- Module contents
- Module contents
- Subpackages
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis package
- Module contents
- Subpackages
- spynnaker.pyNN.models.neuron.synapse_dynamics package
- Submodules
- spynnaker.pyNN.models.neuron.synapse_dynamics.abstract_generate_on_machine module
- spynnaker.pyNN.models.neuron.synapse_dynamics.abstract_plastic_synapse_dynamics module
- spynnaker.pyNN.models.neuron.synapse_dynamics.abstract_static_synapse_dynamics module
- spynnaker.pyNN.models.neuron.synapse_dynamics.abstract_synapse_dynamics module
- spynnaker.pyNN.models.neuron.synapse_dynamics.abstract_synapse_dynamics_structural module
- spynnaker.pyNN.models.neuron.synapse_dynamics.pynn_synapse_dynamics module
- spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_static module
- spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_stdp module
- spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_structural_common module
- spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_structural_static module
- spynnaker.pyNN.models.neuron.synapse_dynamics.synapse_dynamics_structural_stdp module
- Module contents
- spynnaker.pyNN.models.neuron.synapse_io package
- spynnaker.pyNN.models.neuron.synapse_types package
- Submodules
- spynnaker.pyNN.models.neuron.synapse_types.abstract_synapse_type module
- spynnaker.pyNN.models.neuron.synapse_types.synapse_type_alpha module
- spynnaker.pyNN.models.neuron.synapse_types.synapse_type_delta module
- spynnaker.pyNN.models.neuron.synapse_types.synapse_type_dual_exponential module
- spynnaker.pyNN.models.neuron.synapse_types.synapse_type_exponential module
- spynnaker.pyNN.models.neuron.synapse_types.synapse_type_semd module
- Module contents
- spynnaker.pyNN.models.neuron.threshold_types package
Submodules¶
spynnaker.pyNN.models.neuron.abstract_population_vertex module¶
-
class
spynnaker.pyNN.models.neuron.abstract_population_vertex.
AbstractPopulationVertex
(n_neurons, label, constraints, max_atoms_per_core, spikes_per_second, ring_buffer_sigma, incoming_spike_buffer_size, neuron_impl, pynn_model)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary
,spynnaker.pyNN.models.abstract_models.abstract_contains_units.AbstractContainsUnits
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spynnaker.pyNN.models.common.abstract_neuron_recordable.AbstractNeuronRecordable
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.abstract_provides_incoming_partition_constraints.AbstractProvidesIncomingPartitionConstraints
,spynnaker.pyNN.models.abstract_models.abstract_population_initializable.AbstractPopulationInitializable
,spynnaker.pyNN.models.abstract_models.abstract_population_settable.AbstractPopulationSettable
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spinn_front_end_common.abstract_models.abstract_rewrites_data_specification.AbstractRewritesDataSpecification
,spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set.AbstractReadParametersBeforeSet
,spynnaker.pyNN.models.abstract_models.abstract_accepts_incoming_synapses.AbstractAcceptsIncomingSynapses
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
,spinn_front_end_common.abstract_models.abstract_can_reset.AbstractCanReset
Underlying vertex model for Neural Populations.
-
BASIC_MALLOC_USAGE
= 2¶
-
BYTES_TILL_START_OF_GLOBAL_PARAMETERS
= 32¶
-
RUNTIME_SDP_PORT_SIZE
= 4¶
-
SPIKE_RECORDING_REGION
= 0¶
-
TRAFFIC_IDENTIFIER
= 'BufferTraffic'¶
-
add_pre_run_connection_holder
(connection_holder, edge, synapse_info)[source]¶ Add a connection holder to the vertex to be filled in when the connections are actually generated.
-
clear_recording
(variable, buffer_manager, placements, graph_mapper)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager – the buffer manager object
- placements – the placements object
- graph_mapper – the graph mapper object
Return type: None
-
clear_spike_recording
(buffer_manager, placements, graph_mapper)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager – the buffer manager object
- placements – the placements object
- graph_mapper – the graph mapper object
Return type: None
-
conductance_based
¶
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
describe
()[source]¶ Get a human-readable description of the cell or synapse type.
The output may be customised by specifying a different template together with an associated template engine (see
pyNN.descriptions
).If template is None, then a dictionary containing the template context will be returned.
-
generate_data_specification
(spec, placement, machine_time_step, time_scale_factor, graph_mapper, application_graph, machine_graph, routing_info, data_n_time_steps)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – the placement the vertex is located at
Return type: None
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_connections_from_machine
(transceiver, placement, edge, graph_mapper, routing_infos, synapse_information, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]¶ Get the connections from the machine post-run.
-
get_data
(variable, n_machine_time_steps, placements, graph_mapper, buffer_manager, machine_time_step)[source]¶ Get the recorded data
Parameters: - variable –
- n_machine_time_steps –
- placements –
- graph_mapper –
- buffer_manager –
- machine_time_step –
Returns:
-
get_incoming_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge that goes in to a vertex of this vertex.
Parameters: - partition (AbstractOutgoingEdgePartition) – An partition that goes in to this vertex
- partition – partition that goes into this vertex
Returns: A list of constraints
Return type: list(AbstractConstraint) Gets the constraints for partitions going into this vertex.
Returns: list of constraints
-
get_initial_value
(variable, selector=None)[source]¶ Gets the value for any variable whose in initialize_parameters.keys
Should return the current value not the default one.
Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added.
Parameters: - variable (str) – variable name with our without _init
- selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns: A list or an Object which act like a list
-
get_maximum_delay_supported_in_ms
(machine_time_step)[source]¶ Get the maximum delay supported by this vertex.
-
get_neuron_sampling_interval
(variable)[source]¶ Returns the current sampling interval for this variable
Parameters: variable – PyNN name of the variable Returns: Sampling interval in micro seconds
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge that comes out of this vertex.
Parameters: - partition (AbstractOutgoingEdgePartition) – An edge that comes out of this vertex
- partition – the partition that leaves this vertex
Returns: A list of constraints
Return type: list(AbstractConstraint) Gets the constraints for partitions going out of this vertex.
Returns: list of constraints
-
get_recordable_variables
()[source]¶ Returns a list of the variables this models is expected to collect
-
get_resources_used_by_atoms
(vertex_slice, graph, machine_time_step)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
get_spikes
(placements, graph_mapper, buffer_manager, machine_time_step)[source]¶ Get the recorded spikes from the object
Parameters: - placements – the placements object
- graph_mapper – the graph mapper object
- buffer_manager – the buffer manager object
- machine_time_step – the time step of the simulation
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in micro seconds
-
get_synapse_id_by_target
(target)[source]¶ Get the ID of a synapse given the name.
Parameters: target (str) – The name of the synapse Return type: int
-
get_units
(variable)[source]¶ Get units for a given variable
Parameters: variable – the variable to find units from Returns: the units as a string.
-
initialize
(variable, value)[source]¶ Set the initial value of one of the state variables of the neurons in this population.
-
initialize_parameters
¶ List the parameters that are initializable.
If “foo” is initializable there should be a setter initialize_foo and a getter property foo_init
Returns: list of property names
-
is_recording
(variable)[source]¶ Determines if variable is being recorded
Returns: True if variable are being recorded, False otherwise Return type: bool
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
read_parameters_from_machine
(transceiver, placement, vertex_slice)[source]¶ Read the parameters from the machine before any are changed
Parameters: - transceiver – the SpinnMan interface
- placement – the placement of a vertex
- vertex_slice – the slice of atoms for this vertex
-
regenerate_data_specification
(spec, placement, machine_time_step, time_scale_factor, graph_mapper, routing_info)[source]¶ Regenerate the data specification, only generating regions that have changed and need to be reloaded
Parameters: - spec (DataSpecificationGenerator) – Where to write the regenerated spec
- placement (Placement) – Where are we regenerating for?
-
requires_data_generation
¶ True if changes that have been made require that data generation be performed. By default this returns False but can be overridden to indicate changes that require data regeneration.
Return type: bool
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
requires_memory_regions_to_be_reloaded
()[source]¶ Return true if any data region needs to be reloaded
Return type: bool
-
ring_buffer_sigma
¶
-
set_initial_value
(variable, value, selector=None)[source]¶ Sets the value for any variable whose in initialize_parameters.keys
Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added
Parameters: - variable (str) – variable name with our without _init
- value – New value for the variable
- selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns: A list or an Object which act like a list
-
set_recording
(variable, new_state=True, sampling_interval=None, indexes=None)[source]¶ Sets variable to being recorded
-
set_recording_spikes
(new_state=True, sampling_interval=None, indexes=None)[source]¶ Set spikes to being recorded. If new_state is false all other parameters are ignored.
Parameters: - new_state (bool) – Set if the spikes are recording or not
- sampling_interval – The interval at which spikes are recorded. Must be a whole multiple of the timestep None will be taken as the timestep
- indexes – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
set_value
(key, value)[source]¶ Set a property
Parameters: - key – the name of the parameter to change
- value – the new value of the parameter to assign Set a property of the overall model.
-
spikes_per_second
¶
-
synapse_dynamics
¶
-
weight_scale
¶
-
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model module¶
-
class
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model.
AbstractPyNNNeuronModel
(model)[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, spikes_per_second, ring_buffer_sigma, incoming_spike_buffer_size)[source]¶ Create a vertex for a population of the model
Parameters: - n_neurons (int) – The number of neurons in the population
- label (str) – The label to give to the vertex
- constraints (list or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
default_population_parameters
= {'incoming_spike_buffer_size': None, 'ring_buffer_sigma': None, 'spikes_per_second': None}¶
-
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model_standard module¶
-
class
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model_standard.
AbstractPyNNNeuronModelStandard
(model_name, binary, neuron_model, input_type, synapse_type, threshold_type, additional_input_type=None)[source]¶ Bases:
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model.AbstractPyNNNeuronModel
spynnaker.pyNN.models.neuron.connection_holder module¶
-
class
spynnaker.pyNN.models.neuron.connection_holder.
ConnectionHolder
(data_items_to_return, as_list, n_pre_atoms, n_post_atoms, connections=None, fixed_values=None, notify=None)[source]¶ Bases:
object
Holds a set of connections to be returned in a PyNN-specific format
Parameters: - data_items_to_return – A list of data fields to be returned
- as_list – True if the data will be returned as a list, False if it is to be returned as a matrix (or series of matrices)
- n_pre_atoms – The number of atoms in the pre-vertex
- n_post_atoms – The number of atoms in the post-vertex
- connections – Any initial connections, as a numpy structured array of source, target, weight and delay
- fixed_values – A list of tuples of field names and fixed values to be appended to the other fields per connection, formatted as [(field_name, value), …]. Note that if the field is to be returned, the name must also appear in data_items_to_return, which determines the order of items in the result
- notify – A callback to call when the connections have all been added. This should accept a single parameter, which will contain the data requested
-
add_connections
(connections)[source]¶ Add connections to the holder to be returned
Parameters: connections – The connection to add, as a numpy structured array of source, target, weight and delay
-
connections
¶ The connections stored
spynnaker.pyNN.models.neuron.generator_data module¶
-
class
spynnaker.pyNN.models.neuron.generator_data.
GeneratorData
(synaptic_matrix_offset, delayed_synaptic_matrix_offset, max_row_n_words, max_delayed_row_n_words, max_row_n_synapses, max_delayed_row_n_synapses, pre_slices, pre_slice_index, post_slices, post_slice_index, pre_vertex_slice, post_vertex_slice, synapse_information, max_stage, machine_time_step)[source]¶ Bases:
object
Data for each connection of the synapse generator.
-
BASE_SIZE
= 68¶
-
gen_data
¶ Get the data to be written for this connection
Return type: numpy array of uint32
-
size
¶ The size of the generated data in bytes
Return type: int
-
spynnaker.pyNN.models.neuron.population_machine_vertex module¶
-
class
spynnaker.pyNN.models.neuron.population_machine_vertex.
PopulationMachineVertex
(resources_required, recorded_region_ids, label, constraints)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host.AbstractReceiveBuffersToHost
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
,spinn_front_end_common.abstract_models.abstract_recordable.AbstractRecordable
,spinn_front_end_common.interface.profiling.abstract_has_profile_data.AbstractHasProfileData
Parameters: - resources_required –
- recorded_region_ids –
- label –
- constraints –
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
[source]¶ Bases:
enum.Enum
Entries for the provenance data generated by standard neuron models.
-
BUFFER_OVERFLOW_COUNT
= 2¶
-
CURRENT_TIMER_TIC
= 3¶
-
PLASTIC_SYNAPTIC_WEIGHT_SATURATION_COUNT
= 4¶
-
PRE_SYNAPTIC_EVENT_COUNT
= 0¶
-
SATURATION_COUNT
= 1¶
-
-
N_ADDITIONAL_PROVENANCE_DATA_ITEMS
= 5¶
-
PROFILE_TAG_LABELS
= {0: 'TIMER', 1: 'DMA_READ', 2: 'INCOMING_SPIKE', 3: 'PROCESS_FIXED_SYNAPSES', 4: 'PROCESS_PLASTIC_SYNAPSES'}¶
-
get_profile_data
(transceiver, placement)[source]¶ Get the profile data recorded during simulation
Return type: spinn_front_end_common.interface.profiling.profile_data.ProfileData
-
get_provenance_data_from_machine
(transceiver, placement)[source]¶ Retrieve the provenance data.
Parameters: - transceiver (Transceiver) – How to talk to the machine
- placement (Placement) – Which vertex are we retrieving from, and where was it
Return type: list(ProvenanceDataItem)
-
get_recorded_region_ids
()[source]¶ Get the recording region IDs that have been recorded using buffering
Returns: The region numbers that have active recording Return type: iterable(int)
-
get_recording_region_base_address
(txrx, placement)[source]¶ Get the recording region base address
Parameters: - txrx (Transceiver) – the SpiNNMan instance
- placement (Placement) – the placement object of the core to find the address of
Returns: the base address of the recording region
Return type: int
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
spynnaker.pyNN.models.neuron.synaptic_manager module¶
-
class
spynnaker.pyNN.models.neuron.synaptic_manager.
SynapticManager
(n_synapse_types, ring_buffer_sigma, spikes_per_second, config, population_table_type=None, synapse_io=None)[source]¶ Bases:
object
Deals with synapses
-
changes_during_run
¶
-
get_connections_from_machine
(transceiver, placement, machine_edge, graph_mapper, routing_infos, synapse_info, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]¶
-
ring_buffer_sigma
¶
-
spikes_per_second
¶
-
synapse_dynamics
¶
-
vertex_executable_suffix
¶
-
Module contents¶
-
class
spynnaker.pyNN.models.neuron.
AbstractPopulationVertex
(n_neurons, label, constraints, max_atoms_per_core, spikes_per_second, ring_buffer_sigma, incoming_spike_buffer_size, neuron_impl, pynn_model)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary
,spynnaker.pyNN.models.abstract_models.abstract_contains_units.AbstractContainsUnits
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spynnaker.pyNN.models.common.abstract_neuron_recordable.AbstractNeuronRecordable
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.abstract_provides_incoming_partition_constraints.AbstractProvidesIncomingPartitionConstraints
,spynnaker.pyNN.models.abstract_models.abstract_population_initializable.AbstractPopulationInitializable
,spynnaker.pyNN.models.abstract_models.abstract_population_settable.AbstractPopulationSettable
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spinn_front_end_common.abstract_models.abstract_rewrites_data_specification.AbstractRewritesDataSpecification
,spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set.AbstractReadParametersBeforeSet
,spynnaker.pyNN.models.abstract_models.abstract_accepts_incoming_synapses.AbstractAcceptsIncomingSynapses
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
,spinn_front_end_common.abstract_models.abstract_can_reset.AbstractCanReset
Underlying vertex model for Neural Populations.
-
BASIC_MALLOC_USAGE
= 2¶
-
BYTES_TILL_START_OF_GLOBAL_PARAMETERS
= 32¶
-
RUNTIME_SDP_PORT_SIZE
= 4¶
-
SPIKE_RECORDING_REGION
= 0¶
-
TRAFFIC_IDENTIFIER
= 'BufferTraffic'¶
-
add_pre_run_connection_holder
(connection_holder, edge, synapse_info)[source]¶ Add a connection holder to the vertex to be filled in when the connections are actually generated.
-
clear_recording
(variable, buffer_manager, placements, graph_mapper)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager – the buffer manager object
- placements – the placements object
- graph_mapper – the graph mapper object
Return type: None
-
clear_spike_recording
(buffer_manager, placements, graph_mapper)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager – the buffer manager object
- placements – the placements object
- graph_mapper – the graph mapper object
Return type: None
-
conductance_based
¶
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
describe
()[source]¶ Get a human-readable description of the cell or synapse type.
The output may be customised by specifying a different template together with an associated template engine (see
pyNN.descriptions
).If template is None, then a dictionary containing the template context will be returned.
-
generate_data_specification
(spec, placement, machine_time_step, time_scale_factor, graph_mapper, application_graph, machine_graph, routing_info, data_n_time_steps)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – the placement the vertex is located at
Return type: None
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_connections_from_machine
(transceiver, placement, edge, graph_mapper, routing_infos, synapse_information, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]¶ Get the connections from the machine post-run.
-
get_data
(variable, n_machine_time_steps, placements, graph_mapper, buffer_manager, machine_time_step)[source]¶ Get the recorded data
Parameters: - variable –
- n_machine_time_steps –
- placements –
- graph_mapper –
- buffer_manager –
- machine_time_step –
Returns:
-
get_incoming_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge that goes in to a vertex of this vertex.
Parameters: - partition (AbstractOutgoingEdgePartition) – An partition that goes in to this vertex
- partition – partition that goes into this vertex
Returns: A list of constraints
Return type: list(AbstractConstraint) Gets the constraints for partitions going into this vertex.
Returns: list of constraints
-
get_initial_value
(variable, selector=None)[source]¶ Gets the value for any variable whose in initialize_parameters.keys
Should return the current value not the default one.
Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added.
Parameters: - variable (str) – variable name with our without _init
- selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns: A list or an Object which act like a list
-
get_maximum_delay_supported_in_ms
(machine_time_step)[source]¶ Get the maximum delay supported by this vertex.
-
get_neuron_sampling_interval
(variable)[source]¶ Returns the current sampling interval for this variable
Parameters: variable – PyNN name of the variable Returns: Sampling interval in micro seconds
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge that comes out of this vertex.
Parameters: - partition (AbstractOutgoingEdgePartition) – An edge that comes out of this vertex
- partition – the partition that leaves this vertex
Returns: A list of constraints
Return type: list(AbstractConstraint) Gets the constraints for partitions going out of this vertex.
Returns: list of constraints
-
get_recordable_variables
()[source]¶ Returns a list of the variables this models is expected to collect
-
get_resources_used_by_atoms
(vertex_slice, graph, machine_time_step)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
get_spikes
(placements, graph_mapper, buffer_manager, machine_time_step)[source]¶ Get the recorded spikes from the object
Parameters: - placements – the placements object
- graph_mapper – the graph mapper object
- buffer_manager – the buffer manager object
- machine_time_step – the time step of the simulation
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in micro seconds
-
get_synapse_id_by_target
(target)[source]¶ Get the ID of a synapse given the name.
Parameters: target (str) – The name of the synapse Return type: int
-
get_units
(variable)[source]¶ Get units for a given variable
Parameters: variable – the variable to find units from Returns: the units as a string.
-
initialize
(variable, value)[source]¶ Set the initial value of one of the state variables of the neurons in this population.
-
initialize_parameters
¶ List the parameters that are initializable.
If “foo” is initializable there should be a setter initialize_foo and a getter property foo_init
Returns: list of property names
-
is_recording
(variable)[source]¶ Determines if variable is being recorded
Returns: True if variable are being recorded, False otherwise Return type: bool
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
read_parameters_from_machine
(transceiver, placement, vertex_slice)[source]¶ Read the parameters from the machine before any are changed
Parameters: - transceiver – the SpinnMan interface
- placement – the placement of a vertex
- vertex_slice – the slice of atoms for this vertex
-
regenerate_data_specification
(spec, placement, machine_time_step, time_scale_factor, graph_mapper, routing_info)[source]¶ Regenerate the data specification, only generating regions that have changed and need to be reloaded
Parameters: - spec (DataSpecificationGenerator) – Where to write the regenerated spec
- placement (Placement) – Where are we regenerating for?
-
requires_data_generation
¶ True if changes that have been made require that data generation be performed. By default this returns False but can be overridden to indicate changes that require data regeneration.
Return type: bool
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
requires_memory_regions_to_be_reloaded
()[source]¶ Return true if any data region needs to be reloaded
Return type: bool
-
ring_buffer_sigma
¶
-
set_initial_value
(variable, value, selector=None)[source]¶ Sets the value for any variable whose in initialize_parameters.keys
Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added
Parameters: - variable (str) – variable name with our without _init
- value – New value for the variable
- selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns: A list or an Object which act like a list
-
set_recording
(variable, new_state=True, sampling_interval=None, indexes=None)[source]¶ Sets variable to being recorded
-
set_recording_spikes
(new_state=True, sampling_interval=None, indexes=None)[source]¶ Set spikes to being recorded. If new_state is false all other parameters are ignored.
Parameters: - new_state (bool) – Set if the spikes are recording or not
- sampling_interval – The interval at which spikes are recorded. Must be a whole multiple of the timestep None will be taken as the timestep
- indexes – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
set_value
(key, value)[source]¶ Set a property
Parameters: - key – the name of the parameter to change
- value – the new value of the parameter to assign Set a property of the overall model.
-
spikes_per_second
¶
-
synapse_dynamics
¶
-
weight_scale
¶
-
-
class
spynnaker.pyNN.models.neuron.
ConnectionHolder
(data_items_to_return, as_list, n_pre_atoms, n_post_atoms, connections=None, fixed_values=None, notify=None)[source]¶ Bases:
object
Holds a set of connections to be returned in a PyNN-specific format
Parameters: - data_items_to_return – A list of data fields to be returned
- as_list – True if the data will be returned as a list, False if it is to be returned as a matrix (or series of matrices)
- n_pre_atoms – The number of atoms in the pre-vertex
- n_post_atoms – The number of atoms in the post-vertex
- connections – Any initial connections, as a numpy structured array of source, target, weight and delay
- fixed_values – A list of tuples of field names and fixed values to be appended to the other fields per connection, formatted as [(field_name, value), …]. Note that if the field is to be returned, the name must also appear in data_items_to_return, which determines the order of items in the result
- notify – A callback to call when the connections have all been added. This should accept a single parameter, which will contain the data requested
-
add_connections
(connections)[source]¶ Add connections to the holder to be returned
Parameters: connections – The connection to add, as a numpy structured array of source, target, weight and delay
-
connections
¶ The connections stored
-
class
spynnaker.pyNN.models.neuron.
SynapticManager
(n_synapse_types, ring_buffer_sigma, spikes_per_second, config, population_table_type=None, synapse_io=None)[source]¶ Bases:
object
Deals with synapses
-
changes_during_run
¶
-
get_connections_from_machine
(transceiver, placement, machine_edge, graph_mapper, routing_infos, synapse_info, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]¶
-
ring_buffer_sigma
¶
-
spikes_per_second
¶
-
synapse_dynamics
¶
-
vertex_executable_suffix
¶
-
-
class
spynnaker.pyNN.models.neuron.
PopulationMachineVertex
(resources_required, recorded_region_ids, label, constraints)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host.AbstractReceiveBuffersToHost
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
,spinn_front_end_common.abstract_models.abstract_recordable.AbstractRecordable
,spinn_front_end_common.interface.profiling.abstract_has_profile_data.AbstractHasProfileData
Parameters: - resources_required –
- recorded_region_ids –
- label –
- constraints –
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
[source]¶ Bases:
enum.Enum
Entries for the provenance data generated by standard neuron models.
-
BUFFER_OVERFLOW_COUNT
= 2¶
-
CURRENT_TIMER_TIC
= 3¶
-
PLASTIC_SYNAPTIC_WEIGHT_SATURATION_COUNT
= 4¶
-
PRE_SYNAPTIC_EVENT_COUNT
= 0¶
-
SATURATION_COUNT
= 1¶
-
-
N_ADDITIONAL_PROVENANCE_DATA_ITEMS
= 5¶
-
PROFILE_TAG_LABELS
= {0: 'TIMER', 1: 'DMA_READ', 2: 'INCOMING_SPIKE', 3: 'PROCESS_FIXED_SYNAPSES', 4: 'PROCESS_PLASTIC_SYNAPSES'}¶
-
get_profile_data
(transceiver, placement)[source]¶ Get the profile data recorded during simulation
Return type: spinn_front_end_common.interface.profiling.profile_data.ProfileData
-
get_provenance_data_from_machine
(transceiver, placement)[source]¶ Retrieve the provenance data.
Parameters: - transceiver (Transceiver) – How to talk to the machine
- placement (Placement) – Which vertex are we retrieving from, and where was it
Return type: list(ProvenanceDataItem)
-
get_recorded_region_ids
()[source]¶ Get the recording region IDs that have been recorded using buffering
Returns: The region numbers that have active recording Return type: iterable(int)
-
get_recording_region_base_address
(txrx, placement)[source]¶ Get the recording region base address
Parameters: - txrx (Transceiver) – the SpiNNMan instance
- placement (Placement) – the placement object of the core to find the address of
Returns: the base address of the recording region
Return type: int
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
class
spynnaker.pyNN.models.neuron.
AbstractPyNNNeuronModel
(model)[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, spikes_per_second, ring_buffer_sigma, incoming_spike_buffer_size)[source]¶ Create a vertex for a population of the model
Parameters: - n_neurons (int) – The number of neurons in the population
- label (str) – The label to give to the vertex
- constraints (list or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
default_population_parameters
= {'incoming_spike_buffer_size': None, 'ring_buffer_sigma': None, 'spikes_per_second': None}¶
-
-
class
spynnaker.pyNN.models.neuron.
AbstractPyNNNeuronModelStandard
(model_name, binary, neuron_model, input_type, synapse_type, threshold_type, additional_input_type=None)[source]¶ Bases:
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model.AbstractPyNNNeuronModel