spynnaker.pyNN.data package¶
Submodules¶
spynnaker.pyNN.data.spynnaker_data_writer module¶
- class spynnaker.pyNN.data.spynnaker_data_writer.SpynnakerDataWriter(state: DataStatus)[source]¶
Bases:
FecDataWriter,SpynnakerDataViewSee
UtilsDataWriter.This class is designed to only be used directly by
spinn_front_end_common.interface.abstract_spinnaker_base.AbstractSpinnakerBaseand its subclasses and within the PyNN repositories unit tests.- Parameters:
state (DataStatus) – State writer should be in
- set_up_timings_and_delay(simulation_time_step_us: int | None, time_scale_factor: float | None, min_delay: int | float | None)[source]¶
- Parameters:
simulation_time_step_us (int or None) – An explicitly specified time step for the simulation in microseconds. If None, the value is read from the configuration
time_scale_factor (float or None) – An explicitly specified time scale factor for the simulation. If None, the value is read from the configuration
min_delay (int, float or None) – new value or None to say use simulation_time_step_ms
Module contents¶
- class spynnaker.pyNN.data.SpynnakerDataView¶
Bases:
FecDataViewAdds the extra Methods to the View for PyNN level.
See
UtilsDataViewfor a more detailed description.Use this class wherever possible as it inherits all methods from all View classes.
- classmethod add_population(population: Population)[source]¶
Called by each population to add itself to the list.
Usage other than from Population.__init__ is not supported and likely to raise an exception
Increments the all population ID counter by the size of the population.
- Parameters:
population (Population) – Population to add
- Returns:
The first and last global IDs for this Population
- Return type:
- Raises:
SimulatorRunningException – If sim.run is currently running
SimulatorNotSetupException – If called before sim.setup
SimulatorShutdownException – If called after sim.end
- classmethod add_projection(projection: Projection)[source]¶
Called by each projection to add itself to the list.
Usage other than from Projection.__init__ is not supported and likely to raise an exception
- Parameters:
projection (Projection) – Projection to add
- Raises:
SpiNNUtilsException – If projections should not be added in the current state
- classmethod get_min_delay() float[source]¶
The minimum supported delay if available, in milliseconds.
Typically simulation_time_step_per_ms but may be a positive multiple of it.
- Return type:
- Raises:
SpiNNUtilsException – If the min_delay is currently unavailable
- classmethod get_n_populations() int[source]¶
The number of populations previously added.
- Return type:
- classmethod get_segment_counter() int[source]¶
The number of the current recording segment being generated.
- Returns:
the segment counter
- Return type:
- classmethod get_sim_name() str[source]¶
Gets the name to be returned by pyNN.spiNNaker.name.
- Return type:
- classmethod has_min_delay() bool[source]¶
Report if there is a minimum supported delay available.
- Return type:
- classmethod iterate_populations() Iterator[Population][source]¶
An iteration of the populations previously added.
The iteration will be empty if no populations added.
Note: This method is backed by a set so does not guarantee order
- Return type:
iterable(Population)
- classmethod iterate_projections() Iterator[Projection][source]¶
An iteration of the projections previously added.
The iteration will be empty if no projections added.
Note: This method is backed by a set so does not guarantee order
- Return type:
iterable(Projection)