Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protected Cpu info methods #1379

Closed
wants to merge 11 commits into from
10 changes: 3 additions & 7 deletions unittests/model_tests/neuron/test_synaptic_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

from spinn_utilities.overrides import overrides
from spinn_utilities.config_holder import set_config
from spinnman.model import CPUInfo
from spinnman.processes.get_cpu_info_process import _INFO_PATTERN
from spinnman.transceiver import Transceiver
from pacman.model.placements import Placement
from pacman.operations.routing_info_allocator_algorithms import (
Expand Down Expand Up @@ -78,11 +76,9 @@ def write_memory(self, x, y, base_address, data, n_bytes=None, offset=0,
data = struct.Struct("<I").pack(data)
self._data_to_read[base_address:base_address + len(data)] = data

@overrides(Transceiver.get_cpu_information_from_core)
def get_cpu_information_from_core(self, x, y, p):
bs = bytearray(128)
cpu_data = _INFO_PATTERN.unpack_from(bytes(bs), 0)
return CPUInfo(x=1, y=2, p=3, cpu_data=cpu_data)
@overrides(Transceiver.get_region_base_address)
def get_region_base_address(self, x, y, p):
return 0

@overrides(Transceiver.read_memory)
def read_memory(self, x, y, base_address, length, cpu=0):
Expand Down