class MaroccoFixture(unittest.TestCase): def setUp(self): super(MaroccoFixture, self).setUp() self.marocco = PyMarocco() self.marocco.backend = PyMarocco.Without self.marocco.calib_backend = PyMarocco.CalibBackend.Default self.marocco.defects.backend = Defects.Backend.Without self.marocco.merger_routing.strategy( self.marocco.merger_routing.minimize_number_of_sending_repeaters) sim.setup(marocco=self.marocco) def tearDown(self): super(MaroccoFixture, self).tearDown() # sim.reset() only needed for multiple run() in the same session sim.end() def stats(self): return self.marocco.getStats()
pop = pop_arr[neuron_Number - 1] # Multiple projections for stronger input pynn.Projection(spikes_e, pop, con_alltoall_e, target="excitatory") pynn.Projection(spikes_e, pop, con_alltoall_e, target="excitatory") pynn.Projection(spikes_e, pop, con_alltoall_e, target="excitatory") pynn.Projection(spikes_i, pop, con_alltoall_i, target="inhibitory") pynn.Projection(spikes_i, pop, con_alltoall_i, target="inhibitory") pynn.Projection(spikes_i, pop, con_alltoall_i, target="inhibitory") pynn.run(duration_ms) pynn.end() mapping_stats = marocco.getStats() # load wafer config created by PyNN w = pysthal.Wafer() w.load(marocco.wafer_cfg) h = w[used_hicann] def get_denmems_for_pynn_nrn_with_pop(pop, nrn_index_in_pop): """ Return used denmems of pop[nrn_index_in_pop] """ bio_id = pymarocco.bio_id() if type(pop) is pynn.Population: bio_id.pop = pop.euter_id()