Skip to content

Commit

Permalink
assert cabinet and frame are 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jul 31, 2023
1 parent 937e84b commit 73e6726
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spinnman/model/bmp_connection_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class BMPConnectionData(object):

def __init__(self, cabinet, frame, ip_address, boards, port_num):
# pylint: disable=too-many-arguments
assert(cabinet == 0)
assert(frame == 0)
self._cabinet = cabinet
self._frame = frame
self._ip_address = ip_address
Expand Down
3 changes: 3 additions & 0 deletions spinnman/transceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ def __identify_connections(self, connections):
# Locate any connections that talk to a BMP
if isinstance(conn, BMPConnection):
# If it is a BMP conn, add it here
assert (len(self._bmp_connections) == 0)
self._bmp_connections.append(conn)
assert (conn.cabinet == 0)
assert (conn.frame == 0)
self._bmp_connection_selectors[conn.cabinet, conn.frame] =\
FixedConnectionSelector(conn)
# Otherwise, check if it can send and receive SCP (talk to SCAMP)
Expand Down

0 comments on commit 73e6726

Please sign in to comment.