Used to communicate with a SpiNNaker Board. The main part of this package is the spinnman.transceiver.Transceiver class. This can be used to send and receive packets in various SpiNNaker formats, depending on what connections are available.
Connect to and communicate with a machine using a number of different connections.
Boot a machine with the expected version of the software.
- If the machine is already booted but the version is not the version expected, an exception will be thrown.
Check the version of the software which the machine is booted with.
Query the state of the machine to determine:
- What the current state of the machine is in terms of the chips and cores available, the SDRAM available on the chips and the which links are available between which chips.
- What external links to the host exist (and separately add the discovered links to the set of links used to communicate with the machine).
- What is running on the machine and where, and what the current status of those processes are.
- How many cores are in a given state.
- What is in the IOBUF buffers.
- What the current routing entries for a given router are.
- What the routing status counter values are.
Load application binaries on to the machine, either to individual cores or via a “flood-fill” mechanism to multiple cores simultaneously (which may be a subset of the cores on a subset of the chips).
Write data to SDRAM, either on an individual chip, or via a “flood-fill” mechanism to multiple chips simultaneously.
Send a signal to an application.
Read data from SDRAM on an individual chip.
Send and receive SpiNNaker packets where the connections allow this.
- If no connection supports this packet type, an exception is thrown.
- The user should be able to select which connection is used. Selection of a connection which does not support the traffic type will also result in an exception.
Send and receive SCP and SDP packets where the connections allow this.
- If no connection supports the packet type, an exception is thrown.
- The user should be able to select which connection is used. Selection of a connection which does not support the traffic type will also result in an exception.
It should be possible to call any of the functions simultaneously, including the same function more than once.
- Where possible, multiple connections should be used to overlap calls.
- The functions should not return until they have confirmed that any messages sent have been received, and any responses have been received.
- Functions should not respond with the result of a different function.
- Functions can further sub-divide the call into a number of separate calls that can be divided across the available connections, so long as the other requirements are met.
More than one machine can be connected to the same host.
- Once the subset of connections has been worked out for each machine, the operation of these machines should be independent.
- boot_board() and get_scamp_version() are used to ensure that the board is booted correctly before starting a simulation.
- get_machine_details() is used to get a representation of the current state of the machine, which is used to decide where executables are to be run on the board for a particular simulation, where any external peripherals are connected, and how messages between the executables and/or the external peripherals are to be routed
- write_memory() and execute() are used to write parameters and execute executables on the board
- send_signal() is used to send a signal which starts, stops or pauses a simulation.
- get_core_status_count() is used to determine if a simulation is complete or has gone into an error state.
- get_iobuf(), get_cpu_information() and get_router_diagnostics() are used to diagnose a problem with a simulation
- read_memory() is used to read some statistics recorded in SDRAM after a simulation
- set_ip_tag() and SCPListener are used to set up an IP Tag on the machine and receive transmitted SCP packets from the machine
- send_multicast() and send_scp_message() are used to inject packets in to the machine from the host
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of SCP messages
Abstract Methods
is_udp_eieio_command_receiver() |
Methods
receive_eieio_command_message([timeout]) | Receives an eieio message from this connection. |
Detailed Methods
Receives an eieio message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_eieio_receiver.AbstractEIEIOReceiver
A receiver of SCP messages
Abstract Methods
is_udp_eieio_receiver() |
Methods
is_eieio_receiver() | |
receive_eieio_message([timeout]) | Receives an eieio message from this connection. |
Detailed Methods
Receives an eieio message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_scp_receiver.AbstractSCPReceiver
A receiver of SCP messages
Abstract Methods
is_udp_scp_receiver() |
Methods
receive_scp_response(scp_response[, timeout]) | Receives an SCP message from this connection. |
Detailed Methods
Receives an SCP message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: |
|
---|---|
Rtype scp_response: | |
spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse |
|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_sdp_receiver.AbstractSDPReceiver
A receiver of SDP messages
Abstract Methods
is_udp_sdp_reciever() |
Methods
receive_sdp_message([timeout]) | Receives an SDP message from this connection. |
Detailed Methods
Receives an SDP message from this connection. Blocks until the message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | The received SDP message |
Return type: | |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of SCP messages
Abstract Methods
is_udp_eieio_command_sender() |
Methods
send_eieio_command_message(eieio_command_message) | Sends an SDP message down this connection |
Detailed Methods
Sends an SDP message down this connection
Parameters: | eieio_command_message (spinnman.messages.eieio.eieio_command_message.EIEIOCommandMessage) – The eieio message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_eieio_sender.AbstractEIEIOSender
A receiver of SCP messages
Abstract Methods
is_udp_eieio_sender() |
Methods
send_eieio_message(eieio_message) | Sends an SDP message down this connection |
Detailed Methods
Sends an SDP message down this connection
Parameters: | eieio_message (spinnman.messages.eieio.abstract_messages.abstract_eieio_message.AbstractEIEIOMessage) – The eieio message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_scp_sender.AbstractSCPSender
A sender of SCP messages
Abstract Methods
is_udp_scp_sender() |
Methods
send_scp_request(scp_request) | Sends an SCP request down this connection |
Detailed Methods
Sends an SCP request down this connection
Messages must have the following properties:
- source_port is None or 7
- source_cpu is None or 31
- source_chip_x is None or 0
- source_chip_y is None or 0
tag in the message is optional - if not set the default set in the constructor will be used. sequence in the message is optional - if not set (sequence number last assigned + 1) % 65536 will be used
Parameters: | scp_request (spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest) – message packet to send |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A sender of SDP messages
Abstract Methods
is_udp_sdp_sender() |
Methods
send_sdp_message(sdp_message) | Sends an SDP message down this connection |
Detailed Methods
Sends an SDP message down this connection
Parameters: | sdp_message (spinnman.messages.sdp.sdp_message.SDPMessage) – The SDP message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: object
Abstract Methods
deregister_callback(callback) | |
register_callback(callback, traffic_type) |
Detailed Methods
Bases: object
An abstract connection to the SpiNNaker board over some medium
Abstract Methods
close() | Closes the connection |
is_connected() | Determines if the medium is connected at this point in time |
Detailed Methods
Closes the connection
Returns: | Nothing is returned |
---|---|
Return type: | None |
Raises None: | No known exceptions are raised |
Determines if the medium is connected at this point in time
Returns: | True if the medium is connected, False otherwise |
---|---|
Return type: | bool |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error when determining the connectivity of the medium |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
Abstract Methods
is_eieio_receiver() | |
receive_eieio_message([timeout]) |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of SCP messages
Abstract Methods
is_eieio_sender() | |
send_eieio_message(eieio_message) | Sends an SDP message down this connection |
Detailed Methods
Sends an SDP message down this connection
Parameters: | eieio_message (spinnman.messages.eieio.eieio_data_message.EIEIODataMessage) – The eieio message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of Multicast messages
Abstract Methods
get_input_chips() | Get a list of chips which identify the chips from which this receiver can receive receive packets directly |
receive_multicast_message([timeout]) | Receives a multicast message from this connection. |
Detailed Methods
Get a list of chips which identify the chips from which this receiver can receive receive packets directly
Returns: | An iterable of tuples of (x, y) where x is the x-coordinate of the chip and y is the y-coordinate of the chip |
---|---|
Return type: | iterable of (int, int) |
Raises None: | No known exceptions are raised |
Receives a multicast message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | a multicast message |
Return type: | |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A sender of Multicast messages
Abstract Methods
get_input_chips() | Get a list of chips which identify the chips to which this sender can send multicast packets directly |
send_multicast_message(multicast_message) | Sends a SpiNNaker multicast message using this connection |
Detailed Methods
Get a list of chips which identify the chips to which this sender can send multicast packets directly
Returns: | An iterable of tuples of (x, y) where x is the x-coordinate of the chip and y is the y-coordinate of the chip |
---|---|
Return type: | iterable of (int, int) |
Raises None: | No known exceptions are raised |
Sends a SpiNNaker multicast message using this connection
Parameters: | multicast_message (spinnman.messages.multicast_message.MulticastMessage) – The message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of SCP messages
Abstract Methods
is_scp_receiver() | |
receive_scp_response(scp_response[, timeout]) | Receives an SCP message from this connection. |
Detailed Methods
Receives an SCP message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: |
|
---|---|
Rtype scp_response: | |
spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse |
|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A sender of SCP messages
Abstract Methods
is_udp_scp_sender() | |
send_scp_request(scp_request) | Sends an SCP request down this connection |
Detailed Methods
Sends an SCP request down this connection
Messages must have the following properties:
- source_port is None or 7
- source_cpu is None or 31
- source_chip_x is None or 0
- source_chip_y is None or 0
tag in the message is optional - if not set the default set in the constructor will be used. sequence in the message is optional - if not set (sequence number last assigned + 1) % 65536 will be used
Parameters: | scp_request (spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest) – message packet to send |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of SDP messages
Abstract Methods
is_sdp_reciever() | |
receive_sdp_message([timeout]) | Receives an SDP message from this connection. |
Detailed Methods
Receives an SDP message from this connection. Blocks until the message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | The received SDP message |
Return type: | |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A sender of SDP messages
Abstract Methods
is_sdp_sender() | |
send_sdp_message(sdp_message) | Sends an SDP message down this connection |
Detailed Methods
Sends an SDP message down this connection
Parameters: | sdp_message (spinnman.messages.sdp.sdp_message.SDPMessage) – The SDP message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A receiver of Spinnaker boot messages
Abstract Methods
receive_boot_message([timeout]) | Receives a boot message from this connection. |
Detailed Methods
Receives a boot message from this connection. Blocks until a message has been received, or a timeout occurs.
Parameters: | timeout (int) – The time in seconds to wait for the message to arrive; if not specified, will wait forever, or until the connection is closed |
---|---|
Returns: | a boot message |
Return type: | spinnman.messages.spinnaker_boot.spinnaker_boot_message.SpinnakerBootMessage |
Raises: |
|
Bases: spinnman.connections.abstract_classes.abstract_connection.AbstractConnection
A sender of Spinnaker Boot messages
Abstract Methods
send_boot_message(boot_message) | Sends a SpiNNaker boot message using this connection |
Detailed Methods
Sends a SpiNNaker boot message using this connection
Parameters: | boot_message (spinnman.messages.spinnaker_boot.spinnaker_boot_message.SpinnakerBootMessage) – The message to be sent |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error sending the message |
Bases: object
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error setting up the communication channel |
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Abstract Methods
connection_type() | method to help identify the connection |
supports_sends_message(message) | helper method to verify if the connection can deal with this message |
Methods
close() | See spinnman.connections.abstract_connection.AbstractConnection.close() |
is_connected() | See spinnman.connections.AbstractConnection.abstract_connection.is_connected() |
Detailed Methods
Bases: threading.Thread
A Queue for packets received
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Methods
get_packet() | Get the next packet from the queue |
run() | |
stop() | Stop the thread |
Detailed Methods
Bases: object
Methods
call_callback(callback, packet) |
Detailed Methods
Bases: spinnman.connections.listeners.queuers.abstract_port_queuer.AbstractPortQueuer
Queuer of EIEIO Commands
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Bases: spinnman.connections.listeners.queuers.abstract_port_queuer.AbstractPortQueuer
Queuer of EIEIO Data
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Bases: spinnman.connections.listeners.queuers.abstract_port_queuer.AbstractPortQueuer
Queuer of SCP Data
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Bases: spinnman.connections.listeners.queuers.abstract_port_queuer.AbstractPortQueuer
Queuer of SDP Messages
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Bases: spinnman.connections.listeners.queuers.abstract_port_queuer.AbstractPortQueuer
Queuer of Raw UDP messages
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Bases: threading.Thread
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Methods
deregister_callback(callback) | |
register_callback(callback) | |
run() | |
set_port(port) | |
stop() |
Detailed Methods
Bases: threading.Thread
Listens for SCP packets received from a connection, calling a callback function with received packets
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the callback or the error_callback do not take the expected number of arguments |
Attributes
daemon | A boolean value indicating whether this thread is a daemon thread (True) or not (False). |
ident | Thread identifier of this thread or None if it has not been started. |
name | A string used for identification purposes only. |
Methods
run() | Overridden method of Thread that runs this listener |
start() | Starts listening and sending callbacks |
stop() | Stops the reception of packets |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_eieio_command_receiver.AbstractUDPEIEIOCommandReceiver, spinnman.connections.abstract_classes.udp_senders.abstract_udp_eieio_command_sender.AbstractUDPEIEIOCommandSender, spinnman.connections.abstract_classes.abstract_callbackable_connection.AbstractCallbackableConnection
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
close() | |
connection_type() | |
deregister_callback(callback) | |
is_udp_eieio_command_receiver() | |
is_udp_eieio_command_sender() | |
register_callback(callback[, traffic_type]) | |
supports_sends_message(message) |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_scp_receiver.AbstractUDPSCPReceiver, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_sdp_receiver.AbstractUDPSDPReceiver, spinnman.connections.abstract_classes.abstract_callbackable_connection.AbstractCallbackableConnection
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error setting up the communication channel |
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
close() | |
connection_type() | |
deregister_callback(callback) | |
is_scp_receiver() | |
is_sdp_reciever() | |
is_udp_scp_receiver() | |
is_udp_sdp_reciever() | |
register_callback(callback, traffic_type) | |
supports_sends_message(message) |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_eieio_data_receiver.AbstractUDPEIEIODataReceiver, spinnman.connections.abstract_classes.udp_senders.abstract_udp_eieio_sender.AbstractUDPEIEIOSender, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_eieio_command_receiver.AbstractUDPEIEIOCommandReceiver, spinnman.connections.abstract_classes.udp_senders.abstract_udp_eieio_command_sender.AbstractUDPEIEIOCommandSender
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
connection_type() | |
is_eieio_receiver() | |
is_eieio_sender() | |
is_udp_eieio_command_receiver() | |
is_udp_eieio_command_sender() | |
is_udp_eieio_receiver() | |
is_udp_eieio_sender() | |
receive_raw() | |
send_raw(message) | sends a raw udp packet |
supports_sends_message(message) |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_eieio_data_receiver.AbstractUDPEIEIODataReceiver, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_eieio_command_receiver.AbstractUDPEIEIOCommandReceiver, spinnman.connections.abstract_classes.abstract_callbackable_connection.AbstractCallbackableConnection
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error setting up the communication channel |
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
close() | |
connection_type() | |
deregister_callback(callback) | |
is_udp_eieio_command_receiver() | |
is_udp_eieio_receiver() | |
recieve_raw(timeout) | |
register_callback(callback, traffic_type) | |
supports_sends_message(message) |
Detailed Methods
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.abstract_spinnaker_boot_sender.AbstractSpinnakerBootSender, spinnman.connections.abstract_classes.abstract_spinnaker_boot_receiver.AbstractSpinnakerBootReceiver
A connection to the spinnaker board that uses UDP to for booting
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanIOException: | |
If there is an error setting up the communication channel |
Attributes
can_send | a helper property method to check if this connection can send |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
connection_type() | |
receive_boot_message([timeout]) | See spinnman.connections.abstract_spinnaker_boot_receiver.AbstractSpinnakerBootReceiver.receive_boot_message() |
send_boot_message(boot_message) | See spinnman.connections.abstract_spinnaker_boot_sender.AbstractSpinnakerBootSender.send_boot_message() |
supports_sends_message(message) |
Detailed Methods
See spinnman.connections.abstract_spinnaker_boot_receiver.AbstractSpinnakerBootReceiver.receive_boot_message()
Bases: spinnman.connections.abstract_classes.abstract_udp_connection.AbstractUDPConnection, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_sdp_receiver.AbstractUDPSDPReceiver, spinnman.connections.abstract_classes.udp_senders.abstract_udp_sdp_sender.AbstractUDPSDPSender, spinnman.connections.abstract_classes.udp_senders.abstract_udp_scp_sender.AbstractUDPSCPSender, spinnman.connections.abstract_classes.udp_receivers.abstract_udp_scp_receiver.AbstractUDPSCPReceiver
Attributes
can_send | a helper property method to check if this connection can send |
chip_x | |
chip_y | |
local_ip_address | The local IP address to which the connection is bound. |
local_port | The local port to which the connection is bound. |
remote_ip_address | The remote ip address to which the connection is connected. |
remote_port | The remote port to which the connection is connected. |
Methods
connection_type() | |
is_scp_receiver() | |
is_sdp_reciever() | |
is_udp_scp_receiver() | |
is_udp_scp_sender() | |
is_udp_sdp_reciever() | |
is_udp_sdp_sender() | |
supports_sends_message(message) |
Detailed Methods
Bases: object
An abstract reader of bytes. Note that due to endianness concerns, the methods of this reader should be used directly for the appropriate data type being read; e.g. an int should be written using read_int rather than calling read_byte 4 times unless a specific endianness is being achieved.
Abstract Methods
is_at_end() | returns true if the reader is currently at the end of the byte |
read_byte() | Reads the next byte |
read_int() | Read the next four bytes as in int value |
read_long() | Reads the next eight bytes as a long value |
read_short() | Reads the next two bytes as a short value |
Methods
read_bytes([size]) | Reads an array of bytes |
Detailed Methods
returns true if the reader is currently at the end of the byte reader
Returns: | returns true if the reader is currently at the end of the byte |
---|
reader false otherwise :rtype: bool
Reads the next byte
Returns: | A byte |
---|---|
Return type: | int |
Raises: |
|
Reads an array of bytes
Parameters: | size (int) – The number of bytes to read, or None to read all of the remaining bytes |
---|---|
Returns: | An array of bytes |
Return type: | bytearray |
Raises: |
|
Read the next four bytes as in int value
Returns: | An int |
---|---|
Return type: | int |
Raises: |
|
Bases: object
An abstract writer of bytes. Note that due to endianness concerns, the methods of this writer should be used directly for the appropriate data type being written; e.g. an int should be written using write_int rather than calling write_byte 4 times with the parts of the int unless a specific endianness is being achieved.
Abstract Methods
get_n_bytes_written() | Determines how many bytes have been written in total |
write_byte(byte_value) | Writes the lowest order byte of the given value |
write_int(int_value) | Writes a four byte value |
write_long(long_value) | Writes an eight byte value |
write_short(short_value) | Writes the two lowest order bytes of the given value |
Methods
write_bytes(byte_iterable) | Writes a set of bytes |
Detailed Methods
Determines how many bytes have been written in total
Returns: | The number of bytes written |
---|---|
Return type: | int |
Raises None: | No known exception is raised |
Writes the lowest order byte of the given value
Parameters: | byte_value (int) – The byte to write |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises IOError: | If there is an error writing to the stream |
Writes a set of bytes
Parameters: | byte_iterable (iterable of bytes) – The bytes to write |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises IOError: | If there is an error writing to the stream |
Writes a four byte value
Parameters: | int_value (int) – The integer to write |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises IOError: | If there is an error writing to the stream |
Bases: object
Abstract Methods
read(n_bytes) | Read a number of bytes from the underlying stream |
readall() | Read the rest of the bytes from the underlying stream |
readinto(array) | Read a number of bytes into an array from the underlying stream |
Detailed Methods
Read a number of bytes from the underlying stream
Parameters: | n_bytes (int) – The number of bytes to read. |
---|---|
Returns: | The bytes read from the underlying stream. May be less than requested. |
Return type: | bytearray |
Raises IOError: | If there is an error obtaining the bytes |
Bases: spinnman.data.abstract_byte_reader.AbstractByteReader
A byte reader that reads from a byte array using big endian notation
Parameters: | data (bytearray) – The byte array to read the data from |
---|
Methods
Detailed Methods
See spinnman.data.abstract_byte_reader.AbstractByteReader.read_bytes()
Bases: spinnman.data.abstract_byte_writer.AbstractByteWriter
A byte writer that writes to a byte array using big endian notation
Attributes
data | The data that was written |
Methods
Detailed Methods
See spinnman.data.abstract_byte_writer.AbstractByteWriter.get_n_bytes_written()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_byte()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_bytes()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_int()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_long()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_short()
Classes
FileDataReader(filename) | A reader that can read data from a file |
FileIO | file(name: str[, mode: str]) -> file IO object |
Bases: spinnman.data.abstract_data_reader.AbstractDataReader
A reader that can read data from a file
Parameters: | filename (str) – The file to read |
---|---|
Raises spinnman.exceptions.SpinnmanIOException: | |
If the file cannot found or opened for reading |
Methods
close() | Closes the file |
read(n_bytes) | See spinnman.data.abstract_data_reader.AbstractDataReader.read() |
readall() | See spinnman.data.abstract_data_reader.AbstractDataReader.readall() |
readinto(data) | See spinnman.data.abstract_data_reader.AbstractDataReader.readinto() |
Detailed Methods
Closes the file
Returns: | Nothing is returned: |
---|---|
Return type: | None |
Raises spinnman.exceptions.SpinnmanIOException: | |
If the file cannot be closed |
See spinnman.data.abstract_data_reader.AbstractDataReader.read()
See spinnman.data.abstract_data_reader.AbstractDataReader.readinto()
Bases: _io._RawIOBase
file(name: str[, mode: str]) -> file IO object
Open a file. The mode can be ‘r’, ‘w’ or ‘a’ for reading (default), writing or appending. The file will be created if it doesn’t exist when opened for writing or appending; it will be truncated when opened for writing. Add a ‘+’ to the mode to allow simultaneous reading and writing.
Attributes
closed | True if the file is closed |
closefd | True if the file descriptor will be closed |
mode | String giving the file mode |
next | x.next() -> the next value, or raise StopIteration |
closed | True if the file is closed |
next | x.next() -> the next value, or raise StopIteration |
closed | True if the file is closed |
next | x.next() -> the next value, or raise StopIteration |
Methods
close(() -> None. Close the file.) | A closed file cannot be used for further I/O operations. |
fileno(() -> int. “file descriptor”.) | This is needed for lower-level file interfaces, such the fcntl module. |
flush | Flush write buffers, if applicable. |
isatty(...) | |
read(...) | Only makes one system call, so less data may be returned than requested In non-blocking mode, returns None if no data is available. |
readable(...) | |
readall(...) | In non-blocking mode, returns as much as is immediately available, or None if no data is available. |
readinto(() -> Same as RawIOBase.readinto().) | |
readline | Read and return a line from the stream. |
readlines | Return a list of lines from the stream. |
seek((offset: int[, ...) | Argument offset is a byte count. |
seekable(...) | |
tell(() -> int. Current file position) | |
truncate(...) | Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size. |
writable(...) | |
write(...) | Only makes one system call, so not all of the data may be written. |
writelines | |
close(() -> None. Close the file.) | A closed file cannot be used for further I/O operations. |
fileno(() -> int. “file descriptor”.) | This is needed for lower-level file interfaces, such the fcntl module. |
flush | Flush write buffers, if applicable. |
isatty(...) | |
read(...) | Only makes one system call, so less data may be returned than requested In non-blocking mode, returns None if no data is available. |
readable(...) | |
readall(...) | In non-blocking mode, returns as much as is immediately available, or None if no data is available. |
readline | Read and return a line from the stream. |
readlines | Return a list of lines from the stream. |
seek((offset: int[, ...) | Argument offset is a byte count. |
seekable(...) | |
tell(() -> int. Current file position) | |
truncate(...) | Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size. |
writable(...) | |
writelines | |
close(() -> None. Close the file.) | A closed file cannot be used for further I/O operations. |
fileno(() -> int. “file descriptor”.) | This is needed for lower-level file interfaces, such the fcntl module. |
flush | Flush write buffers, if applicable. |
isatty(...) | |
readable(...) | |
readline | Read and return a line from the stream. |
readlines | Return a list of lines from the stream. |
seek((offset: int[, ...) | Argument offset is a byte count. |
seekable(...) | |
tell(() -> int. Current file position) | |
truncate(...) | Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size. |
writable(...) | |
writelines |
Detailed Methods
A closed file cannot be used for further I/O operations. close() may be called more than once without error. Changes the fileno to -1.
This is needed for lower-level file interfaces, such the fcntl module.
Flush write buffers, if applicable.
This is not implemented for read-only and non-blocking streams.
Only makes one system call, so less data may be returned than requested In non-blocking mode, returns None if no data is available. On end-of-file, returns ‘’.
In non-blocking mode, returns as much as is immediately available, or None if no data is available. On end-of-file, returns ‘’.
Read and return a line from the stream.
If limit is specified, at most limit bytes will be read.
The line terminator is always b’n’ for binary files; for text files, the newlines argument to open can be used to select the line terminator(s) recognized.
Return a list of lines from the stream.
hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint.
Argument offset is a byte count. Optional argument whence defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). Note that not all file objects are seekable.
Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size.
Only makes one system call, so not all of the data may be written. The number of bytes actually written is returned.
A closed file cannot be used for further I/O operations. close() may be called more than once without error. Changes the fileno to -1.
This is needed for lower-level file interfaces, such the fcntl module.
Flush write buffers, if applicable.
This is not implemented for read-only and non-blocking streams.
Only makes one system call, so less data may be returned than requested In non-blocking mode, returns None if no data is available. On end-of-file, returns ‘’.
In non-blocking mode, returns as much as is immediately available, or None if no data is available. On end-of-file, returns ‘’.
Read and return a line from the stream.
If limit is specified, at most limit bytes will be read.
The line terminator is always b’n’ for binary files; for text files, the newlines argument to open can be used to select the line terminator(s) recognized.
Return a list of lines from the stream.
hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint.
Argument offset is a byte count. Optional argument whence defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). Note that not all file objects are seekable.
Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size.
A closed file cannot be used for further I/O operations. close() may be called more than once without error. Changes the fileno to -1.
This is needed for lower-level file interfaces, such the fcntl module.
Flush write buffers, if applicable.
This is not implemented for read-only and non-blocking streams.
Read and return a line from the stream.
If limit is specified, at most limit bytes will be read.
The line terminator is always b’n’ for binary files; for text files, the newlines argument to open can be used to select the line terminator(s) recognized.
Return a list of lines from the stream.
hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint.
Argument offset is a byte count. Optional argument whence defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). Note that not all file objects are seekable.
Size defaults to the current file position, as returned by tell().The current file position is changed to the value of size.
Bases: spinnman.data.abstract_byte_reader.AbstractByteReader
A byte reader that reads from a byte array using little endian notation
Parameters: | data (bytearray) – The byte array to read the data from |
---|
Methods
Detailed Methods
See spinnman.data.abstract_byte_reader.AbstractByteReader.read_bytes()
Bases: spinnman.data.abstract_byte_writer.AbstractByteWriter
A byte writer that writes to a byte array using little endian notation
Attributes
data | The data that was written |
Methods
Detailed Methods
See spinnman.data.abstract_byte_writer.AbstractByteWriter.get_n_bytes_written()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_byte()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_bytes()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_int()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_long()
See spinnman.data.abstract_byte_writer.AbstractByteWriter.write_short()
Bases: spinnman.data.abstract_byte_reader.AbstractByteReader
A byte reader that reads from a data reader using little endian notation
Parameters: | data_reader (spinnman.data.abstract_data_reader.AbstractDataReader) – The data reader to read from |
---|
Methods
Detailed Methods
See spinnman.data.abstract_byte_reader.AbstractByteReader.read_bytes()
Bases: object
Marker interface for an EIEIOMessage
Abstract Methods
write_eieio_message(byte_writer) | Write the message to a byte writer |
Detailed Methods
Write the message to a byte writer
Parameters: | byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write to |
---|
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
database_path | |
eieio_header |
Methods
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: object
EIEIO header for command packets
Attributes
command |
Methods
read_eieio_header(byte_reader) | Read an eieio command header from a byte_reader |
write_eieio_header(writer) | Write the command header to a writer |
Detailed Methods
Read an eieio command header from a byte_reader
Parameters: | byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read the data from |
---|---|
Returns: | an eieio command header |
Return type: | spinnman.messages.eieio.command_messages.eieio_command_header.EIEIOCommandHeader |
Raises: |
|
Write the command header to a writer
Parameters: | writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – the writer to write the header to |
---|---|
Returns: | None |
Bases: spinnman.messages.eieio.abstract_messages.abstract_eieio_message.AbstractEIEIOMessage
An EIEIO command message
Parameters: |
|
---|
Attributes
data | |
eieio_header |
Methods
get_min_packet_length() | |
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header |
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header | |
region_id | |
sequence_no | |
space_read |
Methods
get_min_packet_length() | |
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_data_message | |
eieio_header | |
region_id | |
sequence_no |
Methods
get_min_packet_length() | |
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header | |
p | |
region_id | |
sequence_no | |
space_available | |
x | |
y |
Methods
get_min_packet_length() | |
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header | |
p | |
region_id | |
sequence_no | |
space_available | |
x | |
y |
Methods
get_min_packet_length() | |
read_eieio_command_message(command_header, ...) | |
write_eieio_message(writer) |
Detailed Methods
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header |
Bases: spinnman.messages.eieio.command_messages.eieio_command_message.EIEIOCommandMessage
Attributes
data | |
eieio_header |
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_with_payload_data_message.EIEIOWithPayloadDataMessage
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
get_min_packet_length() |
Detailed Methods
Bases: object
A marker interface for possible data elements in the EIEIO data packet
Abstract Methods
write_element(eieio_type, byte_writer) | Write the element to the writer given the type |
Detailed Methods
Write the element to the writer given the type
Parameters: |
|
---|---|
Raises SpinnmanInvalidParameterException: | |
If the type is incompatible with the element |
Bases: object
EIEIO header for data packets
Parameters: |
|
---|
Attributes
count | |
eieio_type | |
is_time | |
payload_base | |
prefix | |
prefix_type | |
size | |
tag |
Methods
get_header_size(eieio_type[, is_prefix, ...]) | Get the size of a header with the given parameters |
increment_count() | |
read_eieio_header(byte_reader) | Read an eieio data header from a byte_reader |
reset_count() | |
write_eieio_header(byte_writer) | Writes the header to a writer |
Detailed Methods
Get the size of a header with the given parameters
Parameters: |
|
---|---|
Returns: | The size of the header in bytes |
Return type: | int |
Read an eieio data header from a byte_reader
Parameters: | byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read the data from |
---|---|
Returns: | an eieio header |
Return type: | spinnman.messages.eieio.data_messages.eieio_data_header.EIEIODataHeader |
Raises: |
|
Writes the header to a writer
Parameters: | byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write the header to |
---|
Bases: spinnman.messages.eieio.abstract_messages.abstract_eieio_message.AbstractEIEIOMessage
An EIEIO Data message
Parameters: |
|
---|
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
add_element(element) | Add an element to the message. |
min_packet_length(eieio_type[, is_prefix, ...]) | The minimum length of a message with the given header, in bytes |
write_eieio_message(byte_writer) |
Detailed Methods
Add an element to the message. The correct type of element must be added, depending on the header values
Parameters: | element (spinnman.messages.eieio.data_messages.abstract_eieio_data_element.AbstractEIEIODataElement) – The element to be added |
---|---|
Raises: |
|
The minimum length of a message with the given header, in bytes
Parameters: |
|
---|---|
Returns: | The minimum size of the packet in bytes |
Return type: | int |
Bases: spinnman.messages.eieio.data_messages.abstract_eieio_data_element.AbstractEIEIODataElement
A data element that contains just a key
Attributes
key |
Methods
write_element(eieio_type, byte_writer) |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.abstract_eieio_data_element.AbstractEIEIODataElement
A data element that contains a key and a payload
Attributes
key | |
payload | |
payload_is_timestamp |
Methods
write_element(eieio_type, byte_writer) |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_data_message.EIEIODataMessage
An EIEIO message with a payload
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
add_key_and_payload(key, payload) | Adds a key and payload to the packet |
Detailed Methods
Bases: spinnman.messages.eieio.data_messages.eieio_data_message.EIEIODataMessage
An EIEIO message without a payload
Attributes
eieio_header | |
is_next_element | Determine if there is another element to be read |
max_n_elements | The maximum number of elements that can fit in the packet |
n_elements | The number of elements in the packet |
next_element | The next element to be read, or None if no more elements. |
size | The size of the packet with the current contents |
Methods
add_key(key) | Add a key to the packet |
Detailed Methods
Functions
read_eieio_command_message(byte_reader) |
Bases: enum.Enum
Possible types of EIEIO packets
Attributes
KEY_16_BIT | Indicates that data is keys which are 16 bits |
KEY_32_BIT | Indicates that data is keys of 32 bits |
KEY_PAYLOAD_16_BIT | Indicates that data is keys and payloads of 16 bits |
KEY_PAYLOAD_32_BIT | Indicates that data is keys and payloads of 32 bits |
Bases: object
Represents an Abstract SCP Request
Parameters: |
|
---|---|
Raises None: | No known exceptions are raised |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Abstract Methods
get_scp_response() | Get an SCP response message to be used to process any response received |
Methods
write_scp_request(byte_writer) | Write the scp request to the given writer |
Detailed Methods
Get an SCP response message to be used to process any response received
Returns: | An SCP response, or None if no response is required |
---|---|
Return type: | spinnman.messages.scp_response.SCPResponse |
Raises None: | No known exceptions are raised |
Write the scp request to the given writer
Parameters: | byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write to |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: object
Represents an abstract SCP Response
Attributes
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Abstract Methods
read_scp_response(byte_reader) | Read the scp response from the given reader |
Detailed Methods
Read the scp response from the given reader
Parameters: | byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read from |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to stop an application
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If app_id is out of range |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP request to run an application loaded on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request which returns nothing other than OK
Parameters: |
|
---|
Attributes
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to get a count of the cores in a particular state
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If app_id is out of range |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request for the number of cores in a given state
Attributes
count | The count of the number of cores with the requested state |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to start a flood fill of data
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to start a flood fill of data
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to start a flood fill of data
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to clear an IP Tag
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to get an IP tag
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request for an IP tags
Attributes
count | The count of the number of packets that have been sent with the tag |
flags | The flags of the tag |
in_use | True if the tag is marked as being in use |
ip_address | The IP address of the tag, as a bytearray of 4 bytes |
is_arp | True if the tag is in the ARP state (where the MAC address is being looked up - transient state so unlikely) |
is_reverse | True if the tag is a reverse tag |
is_temporary | True if the tag is temporary |
mac_address | The MAC address of the tag, as a bytearray of 6 bytes |
port | The port of the tag |
rx_port | The receive port of the tag |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
spin_chip_x | The x-coordinate of the chip on which the tag is defined |
spin_chip_y | The y-coordinate of the chip on which the tag is defined |
spin_cpu | The cpu id of the ip tag |
spin_port | The spin-port of the ip tag |
strip_sdp | True if the tag is to strip sdp |
timeout | The timeout of the tag |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request information about IP tags
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
The chip-coordinates are out of range |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request for information about IP tags
Attributes
fixed_size | The count of the number of fixed IP tag entries |
pool_size | The count of the IP tag pool size |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to set an IP Tag
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to change the state of an LED
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP request to read a region of memory via a link on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request to read a region of memory via a link on a chip
Attributes
data | The data read |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP request to read a region of memory on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request to read a region of memory on a chip
Attributes
data | The data read |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP request to read a region of memory on a chip in words
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request to read a region of memory on a chip in words
Attributes
data | The words of data read |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to set an IP Tag
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to allocate space for routing entries
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If app_id is out of range, or n_entries is 0 or less |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request to allocate router entries
Attributes
base_address | The base address allocated, or 0 if none |
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to clear the router on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to initialize the router on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP Request to send a signal to cores
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If app_id is out of range |
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
An SCP request to read the version of software running on a core
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() | See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse
An SCP response to a request for the version of software running
Attributes
scp_response_header | The SCP header from the response |
sdp_header | The SDP header from the response |
version_info | The version information received |
Methods
read_scp_response(byte_reader) | See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to write memory on a neighbouring chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to write memory on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest
A request to write memory on a chip using words (little endian)
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
|
Attributes
argument_1 | The first argument, or None if no first argument |
argument_2 | The second argument, or None if no second argument |
argument_3 | The third argument, or None if no third argument |
data | The data, or None if no data |
scp_request_header | The SCP request header of the message |
sdp_header | The SDP header of the message |
Methods
get_scp_response() |
Detailed Methods
Bases: enum.Enum
The SCP Commands
Attributes
CMD_ALLOC | Router allocation |
CMD_APLX | |
CMD_AR | |
CMD_AS | |
CMD_FFD | Send Flood-Fill Data |
CMD_FILL | |
CMD_FLASH_COPY | |
CMD_FLASH_ERASE | |
CMD_FLASH_WRITE | |
CMD_IPTAG | Set an IPTAG |
CMD_LED | Control the LEDs |
CMD_LINK_READ | Read neighbouring chip’s memory. |
CMD_LINK_WRITE | Write neighbouring chip’s memory. |
CMD_NNP | Send a Nearest-Neighbour packet |
CMD_P2PC | |
CMD_POWER | |
CMD_READ | Read SDRAM |
CMD_REMAP | |
CMD_RESET | |
CMD_RTR | Router initialization |
CMD_RUN | |
CMD_SIG | Send a Signal |
CMD_SROM | |
CMD_TUBE | |
CMD_VER | Get SCAMP Version |
CMD_WRITE | Write SDRAM |
Bases: object
Represents the header of an SCP Request Each optional parameter in the constructor can be set to a value other than None once, after which it is immutable. It is an error to set a parameter that is not currently None.
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If one of the parameters is incorrect |
Attributes
command | The command of the SCP packet |
sequence | The sequence number of the SCP packet |
Methods
write_scp_request_header(byte_writer) | Write the SCP header to a byte_writer |
Detailed Methods
Write the SCP header to a byte_writer
Parameters: | byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write the data to |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: object
Represents the header of an SCP Response
Attributes
result | The result of the SCP response |
sequence | The sequence number of the SCP response |
Methods
read_scp_response_header(byte_reader) | Read an SCP header from a byte_reader |
Detailed Methods
Read an SCP header from a byte_reader
Parameters: | byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read the data from |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: enum.Enum
The SCP Result codes
Attributes
RC_ARG | Invalid arguments |
RC_BUF | No free Shared Memory buffers |
RC_CMD | Bad/invalid command |
RC_CPU | Bad CPU number |
RC_DEAD | SHM destination dead |
RC_LEN | Bad packet length |
RC_OK | SCPCommand completed OK |
RC_P2P_BUSY | Destination busy |
RC_P2P_NOREPLY | No reply to open |
RC_P2P_REJECT | Open rejected |
RC_P2P_TIMEOUT | Dest did not respond |
RC_PKT_TX | Pkt Transmission failed |
RC_PORT | Bad port number |
RC_ROUTE | No P2P route |
RC_SUM | Bad checksum |
RC_TIMEOUT | Timeout |
Bases: enum.Enum
SCP Signals
Parameters: |
|
---|
Attributes
CONTINUE | |
EXIT | |
INITIALISE | |
PAUSE | |
POWER_DOWN | |
START | |
STOP | |
SYNC0 | |
SYNC1 | |
TIMER | |
USER_0 | |
USER_1 | |
USER_2 | |
USER_3 |
Bases: object
Represents the header of an SDP message. Each optional parameter in the constructor can be set to a value other than None once, after which it is immutable. It is an error to set a parameter that is not currently None.
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If one ofthe parameters is not valid |
Attributes
destination_chip_x | The x-coordinate of the destination chip of the packet |
destination_chip_y | The y-coordinate of the destination chip of the packet |
destination_cpu | The core on the destination chip |
destination_port | The destination port of the packet |
flags | The flags of the packet |
source_chip_x | The x-coordinate of the source chip of the packet |
source_chip_y | The y-coordinate of the source chip of the packet |
source_cpu | The core on the source chip |
source_port | The source port of the packet |
tag | The tag of the packet |
Methods
read_sdp_header(byte_reader) | Read an SDP header from a byte_reader |
write_sdp_header(byte_writer) | Write the SDP header to a byte_writer |
Detailed Methods
Read an SDP header from a byte_reader
Parameters: | byte_reader (spinnman.data.abstract_byte_reader.AbstractByteReader) – The reader to read the data from |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Write the SDP header to a byte_writer
Parameters: | byte_writer (spinnman.data.abstract_byte_writer.AbstractByteWriter) – The writer to write the data to |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Bases: object
Wraps up an SDP message with a header and optional data.
Parameters: |
|
---|---|
Raises None: | No known exceptions are thrown |
Attributes
data | The data in the packet |
sdp_header | The header of the packet |
Bases: object
A message used for booting the board
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the opcode is not a valid value |
Attributes
data | The data |
opcode | The operation of this packet |
operand_1 | The first operand |
operand_2 | The second operand |
operand_3 | The third operand |
Bases: object
Represents a set of boot messages to be sent to boot the board
Parameters: | board_version (int) – The version of the board to be booted |
---|---|
Raises: |
|
Attributes
messages | Get an iterable of message to be sent. |
Functions
update_sdp_header(sdp_header, default_sdp_tag) | Apply defaults to the sdp header where the values have not been set |
Apply defaults to the sdp header where the values have not been set
Parameters: | sdp_header (spinnman.messages.sdp.sdp_header.SDPHeader) – The SDP header values |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the packet already has a source_port != 7, a source_cpu != 31, a source_chip_x != 0, or a source_chip_y != 0 |
Bases: object
A SpiNNaker Multicast message
Parameters: |
|
---|---|
Raises None: | No known exceptions are raised |
Attributes
key | The key of the packet |
payload | The payload of the packet if there is one |
Bases: object
Represents the system variables for a chip, received from the chip SDRAM
Parameters: | system_data (bytearray) – An array of bytes retrieved from SDRAM on the baord |
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the data doesn’t contain valid system data information |
Attributes
cpu_clock_mhz | The speed of the CPU clock in MHz |
cpu_information_base_address | The base address of the cpu information structure |
first_free_router_entry | The id of the first free routing entry on the chip |
iobuf_size | The size of the iobuf buffers in bytes |
ip_address | The ip address of the chip, or None if no ethernet |
is_ethernet_available | True if the ethernet is running on this chip, False otherwise |
links_available | The links that are available on the chip |
nearest_ethernet_x | The x-coordinate of the nearest chip with ethernet |
nearest_ethernet_y | The y-coordinate of the nearest chip with ethernet |
physical_to_virtual_core_map | The physical core id to virtual core id map; entries with a value of 0xFF are non-operational cores |
sdram_base_address | The base address of SDRAM on the chip |
virtual_core_ids | A list of available cores by virtual core id (including the monitor) |
x | The x-coordinate of the chip |
x_size | The number of chips in the x-dimension |
y | The y-coordinate of the chip |
y_size | The number of chips in the y-dimension |
Methods
router_table_copy_address() | The address of the copy of the router table |
Detailed Methods
Bases: object
Represents a subset of the cores on a chip
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If there is more than one core listed with the same id |
Attributes
processor_ids | The subset of processor ids on the chip |
x | The x-coordinate of the chip |
y | The y-coordinate of the chip |
Methods
add_processor(processor_id) | Adds a processor id to this subset |
Detailed Methods
Adds a processor id to this subset
Parameters: | processor_ids (int) – A processor id |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If there is already a processor in the subset with the same id |
Bases: object
Represents a group of CoreSubsets, with a maximum of one per chip
Parameters: | core_subsets (iterable of spinnman.model.core_subset.CoreSubset) – An iterable of cores for each desired chip |
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If there is more than one subset with the same core x and y coordinates |
Attributes
core_subsets | The one-per-chip subsets |
Methods
add_core_subset(core_subset) | Add a core subset to the set |
add_processor(x, y, processor_id) | Add a processor on a given chip to the set |
is_chip(x, y) | Determine if the chip with coordinates (x, y) is in the subset |
is_core(x, y, processor_id) | Determine if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset |
Detailed Methods
Add a core subset to the set
Parameters: | core_subset (spinnman.model.core_subset.CoreSubset) – The core subset to add |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If there is already a subset with the same core x and y coordinates |
Add a processor on a given chip to the set
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If there is already a processor on the given chip with the same id |
Determine if the chip with coordinates (x, y) is in the subset
Parameters: |
|
---|---|
Returns: | True if the chip with coordinates (x, y) is in the subset |
Return type: | bool |
Determine if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset
Parameters: |
|
---|---|
Returns: | True if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset |
Bases: object
Represents information about the state of a CPU
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the array does not contain a cpu data structure |
Attributes
application_id | The id of the application running on the core |
application_mailbox_command | The command currently in the mailbox being sent from the monitor processor to the application |
application_mailbox_data_address | The address of the data in SDRAM for the application mailbox |
application_name | The name of the application running on the core |
iobuf_address | The address of the IOBUF buffer in SDRAM |
link_register | The current link register value (lr) |
monitor_mailbox_command | The command currently in the mailbox being sent from the application to the monitor processor |
monitor_mailbox_data_address | The address of the data in SDRAM of the monitor mailbox |
p | The id of the core on the chip |
processor_state_register | The value in the processor state register (psr) |
registers | The current register values (r0 - r7) |
run_time_error | The reason for a run time error |
software_error_count | The number of software errors counted |
software_source_filename_address | The address of the filename of the software source |
software_source_line_number | The line number of the software source |
stack_pointer | The current stack pointer value (sp) |
state | The current state of the core |
time | The time at which the application started |
user | The current user values (user0 - user3) |
x | The x-coordinate of the chip containing the core |
y | The y-coordinate of the chip containing the core |
Bases: object
A router diagnostic counter filter, which counts packets passing through the router with certain properties. The counter will be incremented so long as the packet matches one of the values in each field i.e. one of each of the destinations, sources, payload_statuses, default_routing_statuses, emergency_routing_statuses and packet_types
Parameters: |
|
---|
Attributes
default_routing_statuses | |
destinations | |
emergency_routing_statuses | |
enable_interrupt_on_counter_event | |
filter_word | A word of data that can be written to the router to set up the filter |
match_emergency_routing_status_to_incoming_packet | |
packet_types | |
payload_statuses | |
sources |
Methods
read_from_int(int_value) |
Detailed Methods
Bases: enum.Enum
Default routing flags for the diagnostic filters. Note that only one has to match for the counter to be incremented
Attributes
DEFAULT_ROUTED | Packet is to be default routed |
NON_DEFAULT_ROUTED | Packet is not to be default routed |
Bases: enum.Enum
Destination flags for the diagnostic filters. Note that only one has to match for the counter to be incremented
Attributes
DUMP | Destination is to dump the packet |
LINK_0 | Destination is link 0 |
LINK_1 | Destination is link 1 |
LINK_2 | Destination is link 2 |
LINK_3 | Destination is link 3 |
LINK_4 | Destination is link 4 |
LINK_5 | Destination is link 5 |
LOCAL | Destination is a local core (but not the monitor core) |
LOCAL_MONITOR | Destination is the local monitor core |
Bases: enum.Enum
Emergency routing status flags for the diagnostic filters. Note that only one has to match for the counter to be incremented
Attributes
FIRST_STAGE | Packet is in first hop of emergency route; packet wouldn’t have reached this router without emergency routing |
FIRST_STAGE_COMBINED | Packet is in first hop of emergency route; packet should also have been sent here by normal routing |
NORMAL | Packet is not emergency routed |
SECOND_STAGE | Packet is in last hop of emergency route and should now return to normal routing |
Bases: enum.Enum
Packet type flags for the diagnostic filters. Note that only one has to match for the counter to be incremented
Attributes
FIXED_ROUTE | Packet is fixed-route |
MULTICAST | Packet is multicast |
NEAREST_NEIGHBOUR | Packet is nearest-neighbour |
POINT_TO_POINT | Packet is point-to-point |
Bases: enum.Enum
Payload flags for the diagnostic filters. Note that only one has to match for the counter to be incremented
Attributes
WITHOUT_PAYLOAD | Packet doesn’t have a payload |
WITH_PAYLOAD | Packet has a payload |
Bases: object
The contents of IOBUF for a core
Parameters: |
|
---|---|
Raises None: | No known exceptions are raised |
Attributes
iobuf | The contents of the buffer |
p | The id of the core on the chip |
x | The x-coordinate of the chip containing the core |
y | The y-coordinate of the chip containing the core |
Bases: object
Represents the dimensions of a machine
Parameters: |
|
---|---|
Raises None: | No known exceptions are raised |
Attributes
x_max | The maximum x-coordinate of the chips in the machine |
y_max | The maximum y-coordinate of the chips in the machine |
Bases: enum.Enum
Commands sent between an application and the monitor processor
Attributes
SHM_CMD | The mailbox contains a command |
SHM_IDLE | The mailbox is idle |
SHM_MSG | The mailbox contains an SDP message |
SHM_NOP | The mailbox contains a non-operation |
SHM_SIGNAL | The mailbox contains a signal |
Bases: object
Represents a set of diagnostic information available from a chip router
Parameters: |
|
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the number of register values is not 16 |
Attributes
error_status | The error status |
mon | The “mon” part of the control register |
n_dropped_fixed_route_packets | The number of fixed-route packets received that were dropped |
n_dropped_multicast_packets | The number of multicast packets received that were dropped |
n_dropped_nearest_neighbour_packets | The number of nearest-neighbour packets received that were dropped |
n_dropped_peer_to_peer_packets | The number of peer-to-peer packets received that were dropped |
n_external_fixed_route_packets | The number of fixed-route packets received from external links |
n_external_multicast_packets | The number of multicast packets received from external links |
n_external_nearest_neighbour_packets | The number of nearest-neighbour packets received from external links |
n_external_peer_to_peer_packets | The number of peer-to-peer packets received from external links |
n_local_fixed_route_packets | The number of fixed-route packets received from local cores |
n_local_multicast_packets | The number of multicast packets received from local cores |
n_local_nearest_neighbour_packets | The number of nearest-neighbour packets received from local cores |
n_local_peer_to_peer_packets | The number of peer-to-peer packets received from local cores |
registers | The values in all of the registers. |
user_registers | The values in the user control registers |
wait_1 | The wait_1 part of the control register |
wait_2 | The wait_2 part of the control register |
Functions
asctime(([tuple]) -> string) | Convert a time tuple to a string, e.g. |
localtime(...) | tm_sec,tm_wday,tm_yday,tm_isdst) |
Convert a time tuple to a string, e.g. ‘Sat Jun 06 16:26:11 1998’. When the time tuple is not present, current time as returned by localtime() is used.
tm_sec,tm_wday,tm_yday,tm_isdst)
Convert seconds since the Epoch to a time tuple expressing local time. When ‘seconds’ is not passed in, convert the current time instead.
Bases: object
Decodes SC&MP/SARK version information as returned by the SVER command
Parameters: | version_data (bytearray) – bytes from an SCP packet containing version information |
---|---|
Raises spinnman.exceptions.SpinnmanInvalidParameterException: | |
If the message does not contain valid version information |
Attributes
build_date | The build date of the software |
hardware | The hardware being run on |
name | The name of the software |
p | The processor id of the processor where the information was obtained |
version_number | The version number of the software |
version_string | The version information as text |
x | The x-coordinate of the chip where the information was obtained |
y | The y-coordinate of the chip where the information was obtained |
Classes
CONNECTION_TYPE | |
EIEIO_COMMAND_IDS | |
TRAFFIC_TYPE |
Bases: enum.Enum
Attributes
REVERSE_IPTAG | |
SDP_IPTAG | |
UDP_BOOT | |
UDP_IPTAG | |
UDP_SPINNAKER | |
USB |
Bases: enum.Enum
Attributes
DATABASE_CONFIRMATION | |
EVENT_PADDING | |
EVENT_STOP | |
HOST_DATA_READ | |
HOST_SEND_SEQUENCED_DATA | |
SPINNAKER_REQUEST_BUFFERS | |
SPINNAKER_REQUEST_READ_DATA | |
START_SENDING_REQUESTS | |
STOP_SENDING_REQUESTS |
Bases: enum.Enum
Attributes
EIEIO_COMMAND | |
EIEIO_DATA | |
SCP | |
SDP | |
UDP |
Exceptions
SpinnmanEIEIOPacketParsingException(...) | Unable to complete the parsing of the EIEIO packet received. |
SpinnmanException | Superclass of exceptions that occur when dealing with communication with SpiNNaker |
SpinnmanIOException(problem) | An exception that something went wrong with the underlying IO |
SpinnmanInvalidPacketException(packet_type, ...) | An exception that indicates that a packet was not in the expected format |
SpinnmanInvalidParameterException(parameter, ...) | An exception that indicates that the value of one of the parameters passed was invalid |
SpinnmanInvalidParameterTypeException(...) | An exception that indicates that the type of one of the parameters passed was invalid |
SpinnmanTimeoutException(operation, timeout) | An exception that indicates that a timeout occurred before an operation |
SpinnmanUnexpectedResponseCodeException(...) | Indicate that a response code returned from the board was unexpected for the current operation |
SpinnmanUnsupportedOperationException(operation) | An exception that indicates that the given operation is not supported |
Unable to complete the parsing of the EIEIO packet received. The routine used is invalid or the content of the packet is invalid
Superclass of exceptions that occur when dealing with communication with SpiNNaker
An exception that something went wrong with the underlying IO
Parameters: | problem (str) – The problem with the IO |
---|
An exception that indicates that a packet was not in the expected format
Parameters: |
|
---|
An exception that indicates that the value of one of the parameters passed was invalid
Parameters: |
|
---|
An exception that indicates that the type of one of the parameters passed was invalid
Parameters: |
|
---|
An exception that indicates that a timeout occurred before an operation could finish
Parameters: |
|
---|
Indicate that a response code returned from the board was unexpected for the current operation
Parameters: |
|
---|
Functions
generate_machine_report(report_directory, ...) | Generate report on the physical structure of the target SpiNNaker machine. |
Generate report on the physical structure of the target SpiNNaker machine.
Parameters: |
|
---|
spinnman.connections.abstract_connection.AbstractConnection :return None :rtype: None :raise IOError: when a file cannot be opened for some reason
Functions
create_transceiver_from_hostname(hostname[, ...]) | Create a Transceiver by creating a UDPConnection to the given hostname on port 17893 (the default SCAMP port), and a UDPBootConnection on port 54321 (the default boot port), |
gethostbyname((host) -> address) | Return the IP address (a string of the form ‘255.255.255.255’) for a host. |
inet_aton(...) | Convert an IP address in string format (123.45.67.89) to the 32-bit packed binary format used in low-level network functions. |
Parameters: |
|
---|---|
Returns: | The created transceiver |
Return type: | |
Raises: |
|
Return the IP address (a string of the form ‘255.255.255.255’) for a host.
Convert an IP address in string format (123.45.67.89) to the 32-bit packed binary format used in low-level network functions.
Bases: object
An encapsulation of various communications with the spinnaker board.
The methods of this class are designed to be thread-safe; thus you can make multiple calls to the same (or different) methods from multiple threads and expect each call to work as if it had been called sequentially, although the order of returns is not guaranteed. Note also that with multiple connections to the board, using multiple threads in this way may result in an increase in the overall speed of operation, since the multiple calls may be made separately over the set of given connections.
Parameters: |
|
---|---|
Raises: |
|
Methods
boot_board(board_version) | Attempt to boot the board. |
clear_ip_tag(tag[, connection, board_address]) | Clear the setting of an ip tag |
clear_multicast_routes(x, y) | Remove all the multicast routes on a chip |
clear_router_diagnostic_counters(x, y[, ...]) | Clear router diagnostic information om a chip |
close([close_original_connections]) | Close the transceiver and any threads that are running |
discover_scamp_connections() | Find connections to the board and store these for future use. |
ensure_board_is_ready(board_version[, n_retries]) | Ensure that the board is ready to interact with this version of the transceiver. |
execute(x, y, processors, executable, app_id) | Start an executable running on a single core |
execute_flood(core_subsets, executable, app_id) | Start an executable running on multiple places on the board. |
get_connections([include_boot_connection]) | Get the currently known connections to the board, made up of those passed in to the transceiver and those that are discovered during calls to discover_connections. |
get_core_state_count(app_id, state) | Get a count of the number of cores which have a given state |
get_cpu_information([core_subsets]) | Get information about the processors on the board |
get_cpu_information_from_core(x, y, p) | Get information about a specific processor on the board |
get_iobuf([core_subsets]) | Get the contents of the IOBUF buffer for a number of processors |
get_iobuf_from_core(x, y, p) | Get the contents of IOBUF for a given core |
get_machine_details() | Get the details of the machine made up of chips on a board and how they are connected to each other. |
get_machine_dimensions() | Get the maximum chip x-coordinate and maximum chip y-coordinate of the chips in the machine |
get_multicast_routes(x, y[, app_id]) | Get the current multicast routes set up on a chip |
get_router_diagnostic_filter(x, y, position) | Gets a router diagnostic filter from a router |
get_router_diagnostics(x, y) | Get router diagnostic information from a chip |
get_scamp_version([n_retries, timeout]) | Get the version of scamp which is running on the board |
get_tags([connection]) | Get the current set of tags that have been set on the board |
get_user_0_register_address_from_core(x, y, p) | Get the address of user 0 for a given processor on the board |
is_connected([connection]) | Determines if the board can be contacted |
load_multicast_routes(x, y, routes, app_id) | Load a set of multicast routes on to a chip |
locate_spinnaker_connection_for_board_address(...) | Find a connection that matches the given board IP address |
read_memory(x, y, base_address, length) | Read some areas of SDRAM from the board |
read_memory_return_byte_array(x, y, ...) | Read some areas of SDRAM from the board |
read_neighbour_memory(x, y, cpu, link, ...) | Read some areas of memory on a neighbouring chip using a LINK_READ SCP command. |
receive_multicast_message(x, y[, timeout, ...]) | Receives a multicast message from the board |
register_listener(callback, recieve_port_no, ...) | Register a callback for a certain type of traffic |
send_eieio_command_message(message[, connection]) | Sends a EIEIO command message using one of the connections. |
send_multicast_message(x, y, multicast_message) | Sends a multicast message to the board |
send_scp_message(message[, retry_codes, ...]) | Sends an SCP message, and gets a response |
send_sdp_message(message[, connection]) | Sends a EIEIO command message using one of the connections. |
send_signal(app_id, signal) | Send a signal to an application |
set_ip_tag(ip_tag) | Set up an ip tag |
set_leds(x, y, cpu, led_states) | Set LED states. |
set_reverse_ip_tag(reverse_ip_tag) | Set up a reverse ip tag |
set_router_diagnostic_filter(x, y, position, ...) | Sets a router diagnostic filter in a router |
stop_application(app_id) | Sends a stop request for an app_id |
write_memory(x, y, base_address, data[, n_bytes]) | Write to the SDRAM on the board |
write_memory_flood(base_address, data[, n_bytes]) | Write to the SDRAM of all chips. |
write_neighbour_memory(x, y, cpu, link, ...) | Write to the memory of a neighbouring chip using a LINK_READ SCP command. |
Detailed Methods
Attempt to boot the board. No check is performed to see if the board is already booted.
Parameters: | board_version (int) – The version of the board e.g. 3 for a SpiNN-3 board or 5 for a SpiNN-5 board. |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Clear the setting of an ip tag
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Remove all the multicast routes on a chip
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Clear router diagnostic information om a chip
Parameters: |
|
---|---|
Returns: | None |
Return type: | Nothing is returned |
Raises: |
|
Close the transceiver and any threads that are running
Parameters: | close_original_connections – If True, the original connections passed to the transceiver in the constructor are also closed. If False, only newly discovered connections are closed. |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises None: | No known exceptions are raised |
Find connections to the board and store these for future use. Note that connections can be empty, in which case another local discovery mechanism will be used. Note that an exception will be thrown if no initial connections can be found to the board.
Returns: | An iterable of discovered connections, not including the initially given connections in the constructor |
---|---|
Return type: | iterable of spinnman.connections.abstract_connection.AbstractConnection |
Raises: |
|
Ensure that the board is ready to interact with this version of the transceiver. Boots the board if not already booted and verifies that the version of SCAMP running is compatible with this transceiver.
Parameters: |
|
---|---|
Returns: | The version identifier |
Return type: | |
Raise: | spinnman.exceptions.SpinnmanIOException: * If there is a problem booting the board * If the version of software on the board is not compatible with this transceiver |
Start an executable running on a single core
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Start an executable running on multiple places on the board. This will be optimized based on the selected cores, but it may still require a number of communications with the board to execute.
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Get the currently known connections to the board, made up of those passed in to the transceiver and those that are discovered during calls to discover_connections. No further discovery is done here.
Parameters: | include_boot_connection (bool) – this parameter signals if the returned list of connections should include also the boot connection to SpiNNaker |
---|---|
Returns: | An iterable of connections known to the transceiver |
Return type: | iterable of spinnman.connections.abstract_connection.AbstractConnection |
Raises None: | No known exceptions are raised |
Get a count of the number of cores which have a given state
Parameters: |
|
---|---|
Returns: | A count of the cores with the given status |
Return type: | int |
Raises: |
|
Get information about the processors on the board
Parameters: | core_subsets (spinnman.model.core_subsets.CoreSubsets) – A set of chips and cores from which to get the information. If not specified, the information from all of the cores on all of the chips on the board are obtained |
---|---|
Returns: | An iterable of the cpu information for the selected cores, or all cores if core_subsets is not specified |
Return type: | iterable of spinnman.model.cpu_info.CPUInfo |
Raises: |
|
Get information about a specific processor on the board
Parameters: |
|
---|---|
Returns: | The cpu information for the selected core |
Return type: | |
Raises: |
|
Get the contents of the IOBUF buffer for a number of processors
Parameters: | core_subsets (spinnman.model.core_subsets.CoreSubsets) – A set of chips and cores from which to get the buffers. If not specified, the buffers from all of the cores on all of the chips on the board are obtained |
---|---|
Returns: | An iterable of the buffers, which may not be in the order of core_subsets |
Return type: | iterable of spinnman.model.io_buffer.IOBuffer |
Raises: |
|
Get the contents of IOBUF for a given core
Parameters: |
|
---|---|
Returns: | An IOBUF buffer |
Return type: | |
Raises: |
|
Get the details of the machine made up of chips on a board and how they are connected to each other.
Returns: | A machine description |
---|---|
Return type: | |
Raises: |
|
Get the maximum chip x-coordinate and maximum chip y-coordinate of the chips in the machine
Returns: | The dimensions of the machine |
---|---|
Return type: | |
Raises: |
|
Get the current multicast routes set up on a chip
Parameters: |
|
---|---|
Returns: | An iterable of multicast routes |
Return type: | iterable of spinnman.model.multicast_routing_entry.MulticastRoute |
Raises: |
|
Gets a router diagnostic filter from a router
Parameters: |
|
---|---|
Returns: | The diagnostic filter read |
Return type: | |
Raises: |
|
Get router diagnostic information from a chip
Parameters: |
|
---|---|
Returns: | The router diagnostic information |
Return type: | |
Raises: |
|
Get the version of scamp which is running on the board
Parameters: |
|
---|---|
Returns: | The version identifier |
Return type: | |
Raises: |
|
Get the current set of tags that have been set on the board
Parameters: | connection (spinnman.connections.abstract_scp_sender.AbstractSCPSender) – Connection from which the tags should be received. If not specified, all SCPSender connections will be queried and the response will be combined. |
---|---|
Returns: | An iterable of tags |
Return type: | iterable of spinn_machine.tags.abstract_tag.AbstractTag |
Raises: |
|
Get the address of user 0 for a given processor on the board
Parameters: |
|
---|
:return:The address for user 0 register for this processor :rtype: int :raise spinnman.exceptions.SpinnmanInvalidPacketException: If a packet is received that is not in the valid format :raise spinnman.exceptions.SpinnmanInvalidParameterException:
- If x, y, p is not a valid processor
- If a packet is received that has invalid parameters
Raises spinnman.exceptions.SpinnmanUnexpectedResponseCodeException: | |
---|---|
If a response indicates an error during the exchange |
Determines if the board can be contacted
Parameters: | connection (spinnman.connections.abstract_connection.AbstractConnection) – The connection which is to be tested. If none, all connections will be tested, and the board will be considered to be connected if any one connection works. |
---|---|
Returns: | True if the board can be contacted, False otherwise |
Return type: | bool |
Raises None: | No known exceptions are raised |
Load a set of multicast routes on to a chip
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Find a connection that matches the given board IP address
Parameters: | board_address (str) – The IP address of the ethernet connection on the baord |
---|---|
Returns: | A connection for the given IP address, or None if no such connection exists |
Return type: | spinnman.connections.udp_packet_connections.udp_spinnaker_connection.UDPSpinnakerConnection |
Read some areas of SDRAM from the board
Parameters: |
|
---|---|
Returns: | An iterable of chunks of data read in order |
Return type: | iterable of bytearray |
Raises: |
|
Read some areas of SDRAM from the board
Parameters: |
|
---|---|
Returns: | An full bytearray of data read in order |
Return type: | bytearray |
Raises: |
|
Read some areas of memory on a neighbouring chip using a LINK_READ SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs’ debug registers.
Parameters: |
|
---|
number) :type link: int :param base_address: The address in SDRAM where the region of memory to be read starts :type base_address: int :param length: The length of the data to be read in bytes :type length: int :return: An iterable of chunks of data read in order :rtype: iterable of bytearray :raise spinnman.exceptions.SpinnmanIOException: If there is an error communicating with the board :raise spinnman.exceptions.SpinnmanInvalidPacketException: If a packet is received that is not in the valid format :raise spinnman.exceptions.SpinnmanInvalidParameterException:
- If one of x, y, p, base_address or length is invalid
- If a packet is received that has invalid parameters
Raises spinnman.exceptions.SpinnmanUnexpectedResponseCodeException: | |
---|---|
If a response indicates an error during the exchange |
Receives a multicast message from the board
Parameters: |
|
---|---|
Returns: | The received message |
Return type: | |
Raises: |
|
Register a callback for a certain type of traffic
Parameters: |
|
---|
Sends a EIEIO command message using one of the connections.
Parameters: |
|
---|---|
Returns: | None |
Sends a multicast message to the board
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Sends an SCP message, and gets a response
Parameters: |
|
---|---|
Returns: | The received response, or the callback if get_callback is True |
Return type: | spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse |
Raises: |
|
Sends a EIEIO command message using one of the connections.
Parameters: |
|
---|---|
Returns: | None |
Send a signal to an application
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Set up an ip tag
Parameters: | ip_tag (spinn_machine.tags.iptag.IPTag) – The tag to set up; note board_address can be None, in which case, the tag will be assigned to all boards |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Set LED states. :param x: The x-coordinate of the chip on which to set the LEDs :type x: int :param y: The x-coordinate of the chip on which to set the LEDs :type y: int :param cpu: The CPU of the chip on which to set the LEDs :type cpu: int :param led_states: A dictionary mapping LED index to state with 0 being
off, 1 on and 2 inverted.
Returns: | Nothing is returned |
---|---|
Return type: | None |
Raises: |
|
Set up a reverse ip tag
Parameters: | reverse_ip_tag (spinn_machine.tags.reverse_ip_tag.ReverseIPTag) – The reverse tag to set up; note board_address can be None, in which case, the tag will be assigned to all boards |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Sets a router diagnostic filter in a router
Parameters: |
|
---|---|
Returns: | None |
Raises: |
|
Sends a stop request for an app_id
Parameters: | app_id (int) – The id of the application to send to |
---|---|
Raises: |
|
Write to the SDRAM on the board
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Write to the SDRAM of all chips.
Parameters: |
|
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|
Write to the memory of a neighbouring chip using a LINK_READ SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs’ debug registers.
Parameters: |
|
---|
number) :type link: int :param base_address: The address in SDRAM where the region of memory is to be written :type base_address: int :param data: The data to write. Should be one of the following:
- An instance of AbstractDataReader
- A bytearray
- A single integer - will be written using little-endian byte ordering
Parameters: | n_bytes (int) – The amount of data to be written in bytes. If not specified: * If data is an AbstractDataReader, an error is raised * If data is a bytearray, the length of the bytearray will be used * If data is an int, 4 will be used |
---|---|
Returns: | Nothing is returned |
Return type: | None |
Raises: |
|