Skip to content

Commit

Permalink
test with cfg defaults inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Dec 18, 2024
1 parent 64d0914 commit 19a71fb
Show file tree
Hide file tree
Showing 2 changed files with 53 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,38 @@
# 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)
machine = 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")
input_proj = 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 19a71fb

Please sign in to comment.