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

No longer support a different bmp per frame and cabinet #349

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions spinnman/board_test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def set_up_remote_board(self):
if self.bmp_names == "None":
self.bmp_names = None
else:
self.bmp_names = [BMPConnectionData(
0, 0, self.bmp_names, [0], None)]
self.bmp_names = BMPConnectionData(self.bmp_names, [0], None)
self.auto_detect_bmp = \
self._config.getboolean("Machine", "auto_detect_bmp")
self.localport = _PORT
Expand Down
24 changes: 1 addition & 23 deletions spinnman/connections/udp_packet_connections/bmp_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ class BMPConnection(UDPConnection, AbstractSCPConnection):
A BMP connection which supports queries to the BMP of a SpiNNaker machine.
"""
__slots__ = [
"_boards",
"_cabinet",
"_frame"]
"_boards"]

def __init__(self, connection_data):
"""
Expand All @@ -42,28 +40,8 @@ def __init__(self, connection_data):
else connection_data.port_num
super().__init__(
remote_host=connection_data.ip_address, remote_port=port)
self._cabinet = connection_data.cabinet
self._frame = connection_data.frame
self._boards = connection_data.boards

@property
def cabinet(self):
"""
The cabinet ID of the BMP.

:rtype: int
"""
return self._cabinet

@property
def frame(self):
"""
The frame ID of the BMP.

:rtype: int
"""
return self._frame

@property
def boards(self):
"""
Expand Down
32 changes: 6 additions & 26 deletions spinnman/extended/extended_transceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def execute_application(self, executable_targets, app_id):
# Send a signal telling the application to start
self.send_signal(app_id, Signal.START)

def set_led(self, led, action, board, cabinet, frame):
def set_led(self, led, action, board):
"""
Set the LED state of a board in the machine.

Expand All @@ -445,16 +445,13 @@ def set_led(self, led, action, board, cabinet, frame):
also be an iterable of multiple boards (in the same frame). The
command will actually be sent to the first board in the iterable.
:type board: int or iterable(int)
:param int cabinet: the cabinet this is targeting
:param int frame: the frame this is targeting
"""
warn_once(logger, "The set_led method is deprecated and "
"untested due to no known use.")
process = SendSingleCommandProcess(
self._bmp_connection(cabinet, frame))
process = SendSingleCommandProcess(self._bmp_connection_selector)
process.execute(BMPSetLed(led, action, board))

def read_adc_data(self, board, cabinet, frame):
def read_adc_data(self, board):
"""
Read the BMP ADC data.

Expand All @@ -463,16 +460,13 @@ def read_adc_data(self, board, cabinet, frame):
known use. Same functionality provided by ybug and bmpc.
Retained in case needed for hardware debugging.

:param int cabinet: cabinet: the cabinet this is targeting
:param int frame: the frame this is targeting
:param int board: which board to request the ADC data from
:return: the FPGA's ADC data object
:rtype: ADCInfo
"""
warn_once(logger, "The read_adc_data method is deprecated and "
"untested due to no known use.")
process = SendSingleCommandProcess(
self._bmp_connection(cabinet, frame))
process = SendSingleCommandProcess(self._bmp_connection_selector)
response = process.execute(ReadADC(board))
return response.adc_info # pylint: disable=no-member

Expand Down Expand Up @@ -792,26 +786,12 @@ def number_of_boards_located(self):
warn_once(logger, "The number_of_boards_located method is deprecated "
"and likely to be removed.")
boards = 0
for bmp_connection in self._bmp_connections:
boards += len(bmp_connection.boards)
if self._bmp_connection:
boards += len(self._bmp_connection.boards)

# if no BMPs are available, then there's still at least one board
return max(1, boards)

@property
def bmp_connection(self):
"""
The BMP connections.

.. warning::
This property is currently deprecated and likely to be removed.

:rtype: dict(tuple(int,int),MostDirectConnectionSelector)
"""
warn_once(logger, "The bmp_connection property is deprecated and "
"likely to be removed.")
return self._bmp_connection_selectors

def get_heap(self, x, y, heap=SystemVariableDefinition.sdram_heap_address):
"""
Get the contents of the given heap on a given chip.
Expand Down
26 changes: 2 additions & 24 deletions spinnman/model/bmp_connection_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,15 @@ class BMPConnectionData(object):
"""
__slots__ = [
"_boards",
"_cabinet",
"_frame",
"_ip_address",
"_port_num"]

def __init__(self, cabinet, frame, ip_address, boards, port_num):
def __init__(self, ip_address, boards, port_num):
# pylint: disable=too-many-arguments
self._cabinet = cabinet
self._frame = frame
self._ip_address = ip_address
self._boards = boards
self._port_num = port_num

@property
def cabinet(self):
"""
The cabinet number.

:rtype: int
"""
return self._cabinet

@property
def frame(self):
"""
The frame number.

:rtype: int
"""
return self._frame

@property
def ip_address(self):
"""
Expand Down Expand Up @@ -78,7 +56,7 @@ def port_num(self):
return self._port_num

def __str__(self):
return (f"{self._cabinet}:{self._frame}:{self._ip_address}:"
return (f"{self._ip_address}:"
f"{self._boards}:{self._port_num}")

def __repr__(self):
Expand Down
Loading
Loading