Skip to content

Commit

Permalink
merged in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jan 3, 2025
2 parents a9a66e8 + 7657e04 commit 9930aa3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Machine]
version = None
versions = ANY
virtual_board = True
machineName = None
spalloc_server = None
remote_spinnaker_url = None
time_scale_factor = None
enable_advanced_monitor_support = False

[Buffers]
use_auto_pause_and_resume = False

[Mode]
mode = All
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2017 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pyNN.spiNNaker as sim
from spinnaker_testbase import BaseTestCase


class TestSimple(BaseTestCase):

# NO unittest_setup() as sim.setup is called

def test_simple(self):
sim.setup(timestep=1.0, n_boards_required=1)
sim.get_machine()
sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 100)

pop_1 = sim.Population(1, sim.IF_curr_exp(), label="pop_1")
input_pop = sim.Population(
1, sim.SpikeSourceArray(spike_times=[0]), label="input")
sim.Projection(input_pop, pop_1, sim.OneToOneConnector(),
synapse_type=sim.StaticSynapse(weight=5, delay=1))
pop_1.record(["spikes", "v"])
simtime = 10
sim.run(simtime)
pop_1.get_data(variables=["spikes", "v"])
sim.end()

0 comments on commit 9930aa3

Please sign in to comment.