def run_forever(): """ Supports running forever in PyNN 0.8/0.9 format :return: returns when the application has started running on the\ SpiNNaker platform. """ AbstractSpiNNakerCommon.run(globals_variables.get_simulator(), None)
def reset(self): """ Reset the state of the current network to time t = 0. """ for population in self._populations: population.cache_data() self._segment_counter += 1 AbstractSpiNNakerCommon.reset(self)
def test_timings(self): # Test normal use interface = AbstractSpiNNakerCommon(graph_label="Test", database_socket_addresses=[], n_chips_required=None, n_boards_required=None, timestep=1.0, max_delay=144.0, min_delay=1.0, hostname=None) assert interface.machine_time_step == 1000 assert interface.time_scale_factor == 1 # Test auto time scale factor interface = AbstractSpiNNakerCommon(graph_label="Test", database_socket_addresses=[], n_chips_required=None, n_boards_required=None, timestep=0.1, max_delay=14.4, min_delay=1.0, hostname=None) assert interface.machine_time_step == 100 assert interface.time_scale_factor == 10 # Test delay out of bounds with self.assertRaises(ConfigurationException): interface = AbstractSpiNNakerCommon(graph_label="Test", database_socket_addresses=[], n_chips_required=None, n_boards_required=None, timestep=1.0, max_delay=145.0, min_delay=1.0, hostname=None) with self.assertRaises(ConfigurationException): interface = AbstractSpiNNakerCommon(graph_label="Test", database_socket_addresses=[], n_chips_required=None, n_boards_required=None, timestep=0.1, max_delay=145.0, min_delay=1.0, hostname=None)
def __init__(self, host_name=None, timestep=None, min_delay=None, max_delay=None, graph_label=None, database_socket_addresses=None, n_chips_required=None): # Determine default executable folder location # and add this default to end of list of search paths # population holders AbstractSpiNNakerCommon.__init__( self, database_socket_addresses=database_socket_addresses, graph_label=graph_label, n_chips_required=n_chips_required, timestep=timestep, hostname=host_name, max_delay=max_delay, min_delay=min_delay)
PushBotSpiNNakerLinkLaserDevice, PushBotSpiNNakerLinkLEDDevice, PushBotSpiNNakerLinkMotorDevice, PushBotSpiNNakerLinkSpeakerDevice) from spynnaker.pyNN.protocols import MunichIoSpiNNakerLinkProtocol from spynnaker.pyNN.spynnaker_external_device_plugin_manager import ( SpynnakerExternalDevicePluginManager as Plugins) from spynnaker8.models.populations import Population # useful functions add_database_socket_address = Plugins.add_database_socket_address activate_live_output_to = Plugins.activate_live_output_to activate_live_output_for = Plugins.activate_live_output_for add_poisson_live_rate_control = Plugins.add_poisson_live_rate_control logger = logging.getLogger(__name__) AbstractSpiNNakerCommon.register_binary_search_path( os.path.dirname(model_binaries.__file__)) spynnaker_external_devices = Plugins() __all__ = [ "EIEIOType", # General Devices "ExternalCochleaDevice", "ExternalFPGARetinaDevice", "MunichRetinaDevice", "MunichMotorDevice", "ArbitraryFPGADevice", "PushBotRetinaViewer", "ExternalDeviceLifControl", # PushBot Parameters
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from spinn_gym.games.breakout.breakout import Breakout from spinn_gym.games.multi_arm_bandit.bandit import Bandit from spinn_gym.games.inverted_pendulum.inverted_pendulum import Pendulum from spinn_gym.games.logic.logic import Logic from spinn_gym.games.store_recall.store_recall import Recall from spinn_gym.games.double_inverted_pendulum.double_pendulum \ import DoublePendulum import os # Put model_binaries directory on path from spynnaker.pyNN.abstract_spinnaker_common import AbstractSpiNNakerCommon binary_path = os.path.join(os.path.split(__file__)[0], 'model_binaries') AbstractSpiNNakerCommon.register_binary_search_path(binary_path) __all__ = [ 'Breakout', 'Bandit', 'Pendulum', 'Logic', 'Recall', 'DoublePendulum' ]
from model_binaries import __file__ as binaries_path from python_models.convolution_population import ConvolutionPopulation import os from spynnaker.pyNN.abstract_spinnaker_common import AbstractSpiNNakerCommon AbstractSpiNNakerCommon.register_binary_search_path( os.path.dirname(binaries_path))