Interface TransceiverInterface
- All Superinterfaces:
AutoCloseable
,BMPTransceiverInterface
- All Known Implementing Classes:
Transceiver
public interface TransceiverInterface extends BMPTransceiverInterface
Transceiver
. Emulates a lot of default
handling and variant-type handling by Python.
Note that operations on a BMP are always thread-unsafe.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested classes/interfaces inherited from interface uk.ac.manchester.spinnaker.transceiver.BMPTransceiverInterface
BMPTransceiverInterface.FPGAResetType
-
Field Summary
Fields Modifier and Type Field Description static int
BOARD_BOOT_RETRIES
How many times to try booting a board.static int
DEFAULT_CHECK_INTERVAL
What proportion of checks are to be expensive full checks.static EnumSet<CPUState>
DEFAULT_ERROR_STATES
The set of states that indicate a core in a failure state.static int
DEFAULT_POLL_INTERVAL
How often to poll by default.static int
LAUNCH_DELAY
Delay between starting a program on a core and checking to see if the core is ready for operational use.static Integer
TIMEOUT_DISABLED
A marker to indicate that no timeout applies. -
Method Summary
Modifier and Type Method Description default void
bootBoard()
Attempt to boot the board.void
bootBoard(Map<SystemVariableDefinition,Object> extraBootValues)
Attempt to boot the board.default void
clearIobuf()
Clear the contents of the IOBUF buffer for all processors.void
clearIobuf(@Valid CoreSubsets coreSubsets)
Clear the contents of the IOBUF buffer for a collection of processors.default void
clearIobuf(@Valid HasCoreLocation core)
Clear the contents of the IOBUF buffer for a given core.default void
clearIPTag(@uk.ac.manchester.spinnaker.machine.tags.TagID int tag)
Clear the setting of an IP tag.void
clearIPTag(@uk.ac.manchester.spinnaker.machine.tags.TagID int tag, InetAddress boardAddress)
Clear the setting of an IP tag.default void
clearIPTag(@Valid Tag tag)
Clear the setting of an IP tag.void
clearMulticastRoutes(@Valid HasChipLocation chip)
Remove all the multicast routes on a chip.void
clearReinjectionQueues(@Valid CoreSubsets monitorCores)
Clear the packet reinjection queues in some monitor processes.void
clearReinjectionQueues(@Valid HasCoreLocation monitorCore)
Clear the packet reinjection queues in a monitor process.default void
clearRouterDiagnosticCounters(@Valid HasChipLocation chip)
Clear router diagnostic information on a chip.default void
clearRouterDiagnosticCounters(@Valid HasChipLocation chip, boolean enable)
Clear router diagnostic information on a chip.void
clearRouterDiagnosticCounters(@Valid HasChipLocation chip, boolean enable, Iterable<@NotNull Integer> counterIDs)
Clear router diagnostic information on a chip.default void
clearRouterDiagnosticCounters(@Valid HasChipLocation chip, Iterable<@NotNull Integer> counterIDs)
Clear router diagnostic information on a chip.SCPConnection
createScpConnection(ChipLocation chip, InetAddress addr)
Create a connection to a particular instance of SCAMP.default void
enableWatchDogTimer(boolean watchdog)
Enable or disable the watch dog timer.void
enableWatchDogTimerOnChip(@Valid HasChipLocation chip, boolean watchdog)
Enable or disable the watch dog timer on a specific chip.default VersionInfo
ensureBoardIsReady()
Ensure that the board is ready to interact with this version of the transceiver.default VersionInfo
ensureBoardIsReady(@javax.validation.constraints.PositiveOrZero int numRetries)
Ensure that the board is ready to interact with this version of the transceiver.VersionInfo
ensureBoardIsReady(@javax.validation.constraints.PositiveOrZero int numRetries, Map<SystemVariableDefinition,Object> extraBootValues)
Ensure that the board is ready to interact with this version of the transceiver.default VersionInfo
ensureBoardIsReady(Map<SystemVariableDefinition,Object> extraBootValues)
Ensure that the board is ready to interact with this version of the transceiver.default void
execute(@Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull File executable, @NotNull AppID appID)
Start an executable running on a single chip.void
execute(@Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull File executable, @NotNull AppID appID, boolean wait)
Start an executable running on a single chip.default void
execute(@Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID)
Start an executable running on a single chip.void
execute(@Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID, boolean wait)
Start an executable running on a single chip.default void
execute(@Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull ByteBuffer executable, @NotNull AppID appID)
Start an executable running on a single chip.default void
execute(@Valid HasCoreLocation core, @NotNull File executable, @NotNull AppID appID)
Start an executable running on a single core.default void
execute(@Valid HasCoreLocation core, @NotNull File executable, @NotNull AppID appID, boolean wait)
Start an executable running on a single core.default void
execute(@Valid HasCoreLocation core, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID)
Start an executable running on a single core.default void
execute(@Valid HasCoreLocation core, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID, boolean wait)
Start an executable running on a single core.default void
execute(@Valid HasCoreLocation core, @NotNull ByteBuffer executable, @NotNull AppID appID)
Start an executable running on a single core.default void
execute(@Valid HasCoreLocation core, @NotNull ByteBuffer executable, @NotNull AppID appID, boolean wait)
Start an executable running on a single core.void
execute(HasChipLocation chip, Collection<Integer> processors, ByteBuffer executable, AppID appID, boolean wait)
Start an executable running on a single chip.default void
executeApplication(@Valid ExecutableTargets executableTargets, @NotNull AppID appID)
Execute a set of binaries that make up a complete application on specified cores, wait for them to be ready and then start all of the binaries.default void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull File executable, @NotNull AppID appID)
Start an executable running on multiple places on the board.void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull File executable, @NotNull AppID appID, boolean wait)
Start an executable running on multiple places on the board.default void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID)
Start an executable running on multiple places on the board.void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull InputStream executable, @javax.validation.constraints.Positive int numBytes, @NotNull AppID appID, boolean wait)
Start an executable running on multiple places on the board.default void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull ByteBuffer executable, @NotNull AppID appID)
Start an executable running on multiple places on the board.void
executeFlood(@Valid CoreSubsets coreSubsets, @NotNull ByteBuffer executable, @NotNull AppID appID, boolean wait)
Start an executable running on multiple places on the board.default void
fillMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, int repeatValue, @javax.validation.constraints.Positive int size)
Fill some memory with repeated data.void
fillMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, int repeatValue, @javax.validation.constraints.Positive int size, @NotNull FillDataType dataType)
Fill some memory with repeated data.void
freeSDRAM(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress)
Free allocated SDRAM.int
freeSDRAM(@Valid HasChipLocation chip, @NotNull AppID appID)
Free all SDRAM allocated to a given application ID.default CoreSubsets
getCoresInState(@Valid CoreSubsets allCoreSubsets, @NotNull CPUState state)
Get all cores that are in a given state.default CoreSubsets
getCoresInState(@Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states)
Get all cores that are in a given set of states.default Map<CoreLocation,CPUInfo>
getCoresNotInState(@Valid CoreSubsets allCoreSubsets, @NotNull CPUState state)
Get all cores that are not in a given state.default Map<CoreLocation,CPUInfo>
getCoresNotInState(@Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states)
Get all cores that are not in a given set of states.int
getCoreStateCount(@NotNull AppID appID, @NotNull CPUState state)
Get a count of the number of cores which have a given state.default MappableIterable<CPUInfo>
getCPUInformation()
Get information about the processors on the board.MappableIterable<CPUInfo>
getCPUInformation(@Valid CoreSubsets coreSubsets)
Get information about some processors on the board.default CPUInfo
getCPUInformation(@Valid HasCoreLocation core)
Get information about a specific processor on the board.default ChipInfo
getFullChipInformation(HasChipLocation chip)
Get the full information about the chip.default List<HeapElement>
getHeap(@Valid HasChipLocation chip)
Get the contents of the SDRAM heap on a given chip.List<HeapElement>
getHeap(@Valid HasChipLocation chip, @NotNull SystemVariableDefinition heap)
Get the contents of the given heap on a given chip.default MappableIterable<IOBuffer>
getIobuf()
Get the contents of the IOBUF buffer for all processors.MappableIterable<IOBuffer>
getIobuf(@Valid CoreSubsets coreSubsets)
Get the contents of the IOBUF buffer for a collection of processors.default IOBuffer
getIobuf(@Valid HasCoreLocation core)
Get the contents of IOBUF for a given core.Machine
getMachineDetails()
Get the details of the machine made up of chips on a board and how they are connected to each other.MachineDimensions
getMachineDimensions()
Get the maximum chip x-coordinate and maximum chip y-coordinate of the chips in the machine.default List<MulticastRoutingEntry>
getMulticastRoutes(@Valid HasChipLocation chip)
Get the current multicast routes set up on a chip.List<MulticastRoutingEntry>
getMulticastRoutes(@Valid HasChipLocation chip, AppID appID)
Get the current multicast routes set up on a chip.Map<CoreLocation,ReinjectionStatus>
getReinjectionStatus(@Valid CoreSubsets monitorCores)
Get the packet reinjection status of some monitor processes.ReinjectionStatus
getReinjectionStatus(@Valid HasCoreLocation monitorCore)
Get the packet reinjection status of a monitor process.DiagnosticFilter
getRouterDiagnosticFilter(@Valid HasChipLocation chip, @javax.validation.constraints.PositiveOrZero int position)
Gets a router diagnostic filter from a router.RouterDiagnostics
getRouterDiagnostics(@Valid HasChipLocation chip)
Get router diagnostic information from a chip.ConnectionSelector<SCPConnection>
getScampConnectionSelector()
default VersionInfo
getScampVersion()
Get the version of SCAMP which is running on the board.default VersionInfo
getScampVersion(@NotNull ConnectionSelector<SCPConnection> connectionSelector)
Get the version of SCAMP which is running on the board.default VersionInfo
getScampVersion(@Valid HasChipLocation chip)
Get the version of SCAMP which is running on the board.VersionInfo
getScampVersion(@Valid HasChipLocation chip, @NotNull ConnectionSelector<SCPConnection> connectionSelector)
Get the version of SCAMP which is running on the board.default List<Tag>
getTags()
Get the current set of tags that have been set on the board using all SCPSender connections.List<Tag>
getTags(SCPConnection connection)
Get the current set of tags that have been set on the board.default Map<Tag,Integer>
getTagUsage()
Get the number of times each tag has had a message sent via it using all SCPSender connections.Map<Tag,Integer>
getTagUsage(@NotNull SCPConnection connection)
Get the number of times each tag has had a message sent via it for a connection.default MemoryLocation
getUser0RegisterAddress(@uk.ac.manchester.spinnaker.machine.ValidP int p)
Get the address of user0 for a given processor on the board.default MemoryLocation
getUser0RegisterAddress(@Valid HasCoreLocation core)
Get the address of user0 for a given processor on the board.default MemoryLocation
getUser0RegisterAddress(@Valid Processor processor)
Get the address of user0 for a given processor on the board.default MemoryLocation
getUser1RegisterAddress(@uk.ac.manchester.spinnaker.machine.ValidP int p)
Get the address of user1 for a given processor on the board.default MemoryLocation
getUser1RegisterAddress(@Valid HasCoreLocation core)
Get the address of user1 for a given processor on the board.default MemoryLocation
getUser1RegisterAddress(@Valid Processor processor)
Get the address of user1 for a given processor on the board.default MemoryLocation
getUser2RegisterAddress(@uk.ac.manchester.spinnaker.machine.ValidP int p)
Get the address of user2 for a given processor on the board.default MemoryLocation
getUser2RegisterAddress(@Valid HasCoreLocation core)
Get the address of user2 for a given processor on the board.default MemoryLocation
getUser2RegisterAddress(@Valid Processor processor)
Get the address of user2 for a given processor on the board.default boolean
isConnected()
Determines if the board can be contacted.boolean
isConnected(Connection connection)
Determines if the board can be contacted.void
loadApplicationRouterTables(@Valid CoreSubsets monitorCores)
Load the (previously saved) application's multicast router tables.default void
loadFixedRoute(@Valid HasChipLocation chip, @Valid RoutingEntry fixedRoute)
Loads a fixed route routing table entry onto a chip's router.void
loadFixedRoute(@Valid HasChipLocation chip, @Valid RoutingEntry fixedRoute, @NotNull AppID appID)
Loads a fixed route routing table entry onto a chip's router.default void
loadMulticastRoutes(@Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes)
Load a set of multicast routes on to a chip associated with the default application ID.void
loadMulticastRoutes(@Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes, @NotNull AppID appID)
Load a set of multicast routes on to a chip.void
loadSystemRouterTables(@Valid CoreSubsets monitorCores)
Load the (previously configured) system multicast router tables.SCPConnection
locateSpinnakerConnection(@NotNull InetAddress boardAddress)
Find a connection that matches the given board IP address.default MemoryLocation
mallocSDRAM(@Valid HasChipLocation chip, @javax.validation.constraints.Positive int size)
Allocates a chunk of SDRAM on a chip on the machine.default MemoryLocation
mallocSDRAM(@Valid HasChipLocation chip, @javax.validation.constraints.Positive int size, @NotNull AppID appID)
Allocates a chunk of SDRAM on a chip on the machine.MemoryLocation
mallocSDRAM(@Valid HasChipLocation chip, @javax.validation.constraints.Positive int size, @NotNull AppID appID, int tag)
Allocates a chunk of SDRAM on a chip on the machine.default RoutingEntry
readFixedRoute(@Valid HasChipLocation chip)
Reads a fixed route routing table entry from a chip's router.RoutingEntry
readFixedRoute(@Valid HasChipLocation chip, @NotNull AppID appID)
Reads a fixed route routing table entry from a chip's router.default ByteBuffer
readMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read some areas of SDRAM from the board.ByteBuffer
readMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read some areas of SDRAM (or System RAM) from the board.default ByteBuffer
readMemory(@Valid HasCoreLocation core, @NotNull HeapElement element)
Read the contents of an allocated block on the heap from the board.default ByteBuffer
readNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read some areas of memory on a neighbouring chip using a LINK_READ SCP command.ByteBuffer
readNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.Positive int length)
Read some areas of memory on a neighbouring chip using a LINK_READ SCP command.void
readRegion(BufferManagerStorage.Region region, @NotNull BufferManagerStorage storage)
Read an area associated with a recording region from SDRAM from a core of a chip on the board.default int
readUser0(@Valid HasCoreLocation core)
Read the user0 register of a core.default int
readUser1(@Valid HasCoreLocation core)
Read the user1 register of a core.default int
readUser2(@Valid HasCoreLocation core)
Read the user2 register of a core.void
resetReinjectionCounters(@Valid CoreSubsets monitorCores)
Reset the packet reinjection counters of some monitor processes.void
resetReinjectionCounters(@Valid HasCoreLocation monitorCore)
Reset the packet reinjection counters of a monitor process.void
saveApplicationRouterTables(@Valid CoreSubsets monitorCores)
Save the application's multicast router tables.void
sendSCPMessage(@NotNull SCPRequest<?> message, @NotNull SCPConnection connection)
Sends an SCP message, without expecting a response.default void
sendSDPMessage(@NotNull SDPMessage message)
Sends an SDP message using one of the connections.void
sendSDPMessage(@NotNull SDPMessage message, SDPConnection connection)
Sends an SDP message using one of the connections.void
sendSignal(@NotNull AppID appID, @NotNull Signal signal)
Send a signal to an application.void
setIPTag(@Valid IPTag tag)
Set up an IP tag.void
setIPTag(@Valid IPTag tag, @NotNull SDPConnection connection)
Set up an IP tag to deliver messages to a particular connection.default void
setLEDs(@Valid HasChipLocation chip, Map<Integer,LEDAction> ledStates)
Set LED states.void
setLEDs(@Valid HasCoreLocation core, Map<Integer,LEDAction> ledStates)
Set LED states.default void
setReinjection(@Valid CoreSubsets monitorCores, boolean reinject)
Set whether packets (of all types) are to be reinjected.default void
setReinjection(@Valid CoreSubsets monitorCores, @NotNull ReinjectionStatus status)
Restore whether packets are to be reinjected to a previously saved state.default void
setReinjection(@Valid HasCoreLocation monitorCore, boolean reinject)
Set whether packets (of all types) are to be reinjected.default void
setReinjection(@Valid HasCoreLocation monitorCore, @NotNull ReinjectionStatus status)
Restore whether packets are to be reinjected to a previously saved state.void
setReinjectionEmergencyTimeout(@Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent)
Set the emergency packet reinjection timeout.default void
setReinjectionEmergencyTimeout(@Valid CoreSubsets monitorCores, @NotNull ReinjectionStatus status)
Set the emergency packet reinjection timeout.default void
setReinjectionEmergencyTimeout(@Valid CoreSubsets monitorCores, @NotNull RouterTimeout timeout)
Set the emergency packet reinjection timeout.void
setReinjectionEmergencyTimeout(@Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent)
Set the emergency packet reinjection timeout.default void
setReinjectionEmergencyTimeout(@Valid HasCoreLocation monitorCore, @NotNull RouterTimeout timeout)
Set the emergency packet reinjection timeout.void
setReinjectionTimeout(@Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent)
Set the packet reinjection timeout.default void
setReinjectionTimeout(@Valid CoreSubsets monitorCores, @NotNull ReinjectionStatus status)
Set the packet reinjection timeout.default void
setReinjectionTimeout(@Valid CoreSubsets monitorCores, @NotNull RouterTimeout timeout)
Set the packet reinjection timeout.void
setReinjectionTimeout(@Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent)
Set the packet reinjection timeout.default void
setReinjectionTimeout(@Valid HasCoreLocation monitorCore, @NotNull RouterTimeout timeout)
Set the packet reinjection timeout.void
setReinjectionTypes(@Valid CoreSubsets monitorCores, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour)
Set what types of packets are to be reinjected.void
setReinjectionTypes(@Valid HasCoreLocation monitorCore, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour)
Set what types of packets are to be reinjected.void
setReverseIPTag(@Valid ReverseIPTag tag)
Set up a reverse IP tag.void
setRouterDiagnosticFilter(@Valid HasChipLocation chip, int position, @NotNull DiagnosticFilter diagnosticFilter)
Sets a router diagnostic filter in a router.default void
setWatchDogTimeout(int watchdog)
Set the value of the watch dog timer.void
setWatchDogTimeoutOnChip(@Valid HasChipLocation chip, int watchdog)
Set the value of the watch dog timer on a specific chip.void
stopApplication(@NotNull AppID appID)
Sends a stop request for an application ID.default void
updateProvenanceAndExit()
Tell all running application cores to write their provenance data to a location where it can be read back, and then to go into theFINISHED
state.void
updateProvenanceAndExit(@Valid CoreSubsets coreSubsets)
Tell some running application cores to write their provenance data to a location where it can be read back, and then to go into theirFINISHED
state.default void
updateProvenanceAndExit(@Valid HasCoreLocation core)
Tell a running application core to write its provenance data to a location where it can be read back, and then to go into theFINISHED
state.default void
updateRuntime(@PositiveOrZero Integer runTimesteps, @javax.validation.constraints.PositiveOrZero int currentTime, @javax.validation.constraints.PositiveOrZero int syncTimesteps)
Set the running time information for all processors.void
updateRuntime(@PositiveOrZero Integer runTimesteps, @javax.validation.constraints.PositiveOrZero int currentTime, @javax.validation.constraints.PositiveOrZero int syncTimesteps, @Valid CoreSubsets coreSubsets)
Set the running time information for a collection of processors.default void
updateRuntime(@PositiveOrZero Integer runTimesteps, @javax.validation.constraints.PositiveOrZero int currentTime, @javax.validation.constraints.PositiveOrZero int syncTimesteps, @Valid HasCoreLocation core)
Set the running time information for a given core.default void
waitForCoresToBeInState(@Valid CoreSubsets coreSubsets, @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates)
Waits for the specified cores running the given application to be in some target state or states.void
waitForCoresToBeInState(@Valid CoreSubsets allCoreSubsets, @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates, @PositiveOrZero Integer timeout, @javax.validation.constraints.Positive int timeBetweenPolls, EnumSet<@NotNull CPUState> errorStates, @javax.validation.constraints.Positive int countsBetweenFullCheck)
Waits for the specified cores running the given application to be in some target state or states.default void
writeMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.NotEmpty byte[] data)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, int dataWord)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, @NotNull File dataFile)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, @NotNull InputStream dataStream, @javax.validation.constraints.Positive int numBytes)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasChipLocation chip, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.NotEmpty byte[] data)
Write to the SDRAM on the board.default void
writeMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, int dataWord)
Write to the SDRAM (or System RAM) on the board.void
writeMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, @NotNull File dataFile)
Write to the SDRAM on the board.void
writeMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, @NotNull InputStream dataStream, @javax.validation.constraints.Positive int numBytes)
Write to the SDRAM on the board.void
writeMemory(@Valid HasCoreLocation core, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write to the SDRAM (or System RAM) on the board.default void
writeMemoryFlood(@NotNull MemoryLocation baseAddress, @javax.validation.constraints.NotEmpty byte[] data)
Write to the SDRAM of all chips.default void
writeMemoryFlood(@NotNull MemoryLocation baseAddress, int dataWord)
Write to the SDRAM of all chips.void
writeMemoryFlood(@NotNull MemoryLocation baseAddress, @NotNull File dataFile)
Write to the SDRAM of all chips.void
writeMemoryFlood(@NotNull MemoryLocation baseAddress, @NotNull InputStream dataStream, @javax.validation.constraints.Positive int numBytes)
Write to the SDRAM of all chips.void
writeMemoryFlood(@NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write to the SDRAM of all chips.default void
writeNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.NotEmpty byte[] data)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, int dataWord)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull File dataFile)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull InputStream dataStream, @javax.validation.constraints.Positive int numBytes)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasChipLocation chip, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @javax.validation.constraints.NotEmpty byte[] data)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, int dataWord)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.void
writeNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull File dataFile)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.void
writeNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull InputStream dataStream, @javax.validation.constraints.Positive int numBytes)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.void
writeNeighbourMemory(@Valid HasCoreLocation core, @NotNull Direction link, @NotNull MemoryLocation baseAddress, @NotNull ByteBuffer data)
Write to the memory of a neighbouring chip using a LINK_WRITE SCP command.default void
writeUser0(@Valid HasCoreLocation core, int value)
Write to the user0 register of a core.default void
writeUser0(@Valid HasCoreLocation core, @NotNull MemoryLocation pointer)
Write to the user0 register of a core.default void
writeUser1(@Valid HasCoreLocation core, int value)
Write to the user1 register of a core.default void
writeUser1(@Valid HasCoreLocation core, @NotNull MemoryLocation pointer)
Write to the user1 register of a core.default void
writeUser2(@Valid HasCoreLocation core, int value)
Write to the user2 register of a core.default void
writeUser2(@Valid HasCoreLocation core, @NotNull MemoryLocation pointer)
Write to the user2 register of a core.Methods inherited from interface uk.ac.manchester.spinnaker.transceiver.BMPTransceiverInterface
availableBoards, availableBoards, bind, close, getBoundBMP, getResetStatus, getResetStatus, getSerialFlashBuffer, getSerialFlashBuffer, power, powerOff, powerOff, powerOffMachine, powerOn, powerOn, powerOnMachine, readADCData, readADCData, readBlacklist, readBlacklist, readBMPFirmwareDescriptor, readBMPFirmwareDescriptor, readBMPMemory, readBMPMemory, readBMPMemoryWord, readBMPMemoryWord, readBMPVersion, readBMPVersion, readBMPVersion, readBMPVersion, readBoardSerialNumber, readBoardSerialNumber, readFPGALinkCounter, readFPGALinkCounter, readFPGALinkCounter, readFPGALinkCounter, readFPGARegister, readFPGARegister, readFPGARegister, readFPGARegister, readFPGARegister, readFPGARegister, readSerialFlash, readSerialFlash, readSerialFlashCRC, readSerialFlashCRC, resetFPGA, resetFPGA, setLED, setLED, writeBlacklist, writeBlacklist, writeBMPFlash, writeBMPFlash, writeBMPMemory, writeBMPMemory, writeBMPMemory, writeBMPMemory, writeBMPMemory, writeBMPMemory, writeFlash, writeFlash, writeFPGARegister, writeFPGARegister, writeFPGARegister, writeFPGARegister, writeFPGARegister, writeFPGARegister, writeSerialFlash, writeSerialFlash, writeSerialFlash, writeSerialFlash, writeSerialFlash, writeSerialFlash
-
Field Details
-
LAUNCH_DELAY
static final int LAUNCH_DELAYDelay between starting a program on a core and checking to see if the core is ready for operational use. In milliseconds.- See Also:
- Constant Field Values
-
TIMEOUT_DISABLED
A marker to indicate that no timeout applies. -
DEFAULT_POLL_INTERVAL
static final int DEFAULT_POLL_INTERVALHow often to poll by default.- See Also:
- Constant Field Values
-
DEFAULT_ERROR_STATES
The set of states that indicate a core in a failure state. -
DEFAULT_CHECK_INTERVAL
static final int DEFAULT_CHECK_INTERVALWhat proportion of checks are to be expensive full checks.- See Also:
- Constant Field Values
-
BOARD_BOOT_RETRIES
static final int BOARD_BOOT_RETRIESHow many times to try booting a board.- See Also:
- Constant Field Values
-
-
Method Details
-
getScampConnectionSelector
- Returns:
- The connection selector to use for SCP messages.
-
sendSCPMessage
@ParallelSafe void sendSCPMessage(@NotNull @NotNull SCPRequest<?> message, @NotNull @NotNull SCPConnection connection) throws IOExceptionSends an SCP message, without expecting a response.- Parameters:
message
- The message to sendconnection
- The connection to use (omit to pick a random one)- Throws:
IOException
- If anything goes wrong with networking.
-
sendSDPMessage
Sends an SDP message using one of the connections.- Parameters:
message
- The message to send- Throws:
IOException
- If anything goes wrong with networking.
-
sendSDPMessage
@ParallelSafe void sendSDPMessage(@NotNull @NotNull SDPMessage message, SDPConnection connection) throws IOExceptionSends an SDP message using one of the connections.- Parameters:
message
- The message to sendconnection
- An optional connection to use- Throws:
IOException
- If anything goes wrong with networking.
-
getMachineDimensions
@ParallelSafeWithCare @CheckReturnValue MachineDimensions getMachineDimensions() throws IOException, ProcessException, InterruptedExceptionGet the maximum chip x-coordinate and maximum chip y-coordinate of the chips in the machine.WARNING! This operation is unsafe in a multi-threaded context unless previously called from a parallel-safe situation.
- Returns:
- The dimensions of the machine
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getMachineDetails
@ParallelSafeWithCare @CheckReturnValue Machine getMachineDetails() throws IOException, ProcessException, InterruptedExceptionGet the details of the machine made up of chips on a board and how they are connected to each other.WARNING! This operation is unsafe in a multi-threaded context unless previously called from a parallel-safe situation.
- Returns:
- A machine description
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
isConnected
Determines if the board can be contacted.- Returns:
- True if the board can be contacted, False otherwise
-
isConnected
Determines if the board can be contacted.- Parameters:
connection
- The connection which is to be tested. Ifnull
, 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
-
getScampVersion
@ParallelSafe @CheckReturnValue default VersionInfo getScampVersion() throws IOException, ProcessException, InterruptedExceptionGet the version of SCAMP which is running on the board.- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getScampVersion
@ParallelSafe @CheckReturnValue default VersionInfo getScampVersion(@NotNull @NotNull ConnectionSelector<SCPConnection> connectionSelector) throws IOException, ProcessException, InterruptedExceptionGet the version of SCAMP which is running on the board.- Parameters:
connectionSelector
- the connection to send the SCAMP version or none (if none then a random SCAMP connection is used).- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getScampVersion
@ParallelSafe @CheckReturnValue default VersionInfo getScampVersion(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionGet the version of SCAMP which is running on the board.- Parameters:
chip
- the coordinates of the chip to query for SCAMP version- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getScampVersion
@ParallelSafe @CheckReturnValue VersionInfo getScampVersion(@Valid @Valid HasChipLocation chip, @NotNull @NotNull ConnectionSelector<SCPConnection> connectionSelector) throws IOException, ProcessException, InterruptedExceptionGet the version of SCAMP which is running on the board.- Parameters:
connectionSelector
- the connection to send the SCAMP version or none (if none then a random SCAMP connection is used).chip
- the coordinates of the chip to query for SCAMP version- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
bootBoard
Attempt to boot the board. No check is performed to see if the board is already booted.WARNING! This operation is unsafe in a multi-threaded context.
- Throws:
IOException
- If anything goes wrong with networking.InterruptedException
- If the thread is interrupted while waiting.
-
bootBoard
@ParallelUnsafe void bootBoard(Map<SystemVariableDefinition,Object> extraBootValues) throws InterruptedException, IOExceptionAttempt to boot the board. No check is performed to see if the board is already booted.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
extraBootValues
- extra values to set during boot- Throws:
IOException
- If anything goes wrong with networking.InterruptedException
- If the thread is interrupted while waiting.
-
ensureBoardIsReady
@ParallelUnsafe @CheckReturnValue default VersionInfo ensureBoardIsReady() throws IOException, ProcessException, InterruptedExceptionEnsure 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.WARNING! This operation is unsafe in a multi-threaded context.
- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
ensureBoardIsReady
@ParallelUnsafe @CheckReturnValue default VersionInfo ensureBoardIsReady(Map<SystemVariableDefinition,Object> extraBootValues) throws IOException, ProcessException, InterruptedExceptionEnsure 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.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
extraBootValues
- Any additional values to set during boot- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
ensureBoardIsReady
@ParallelUnsafe default VersionInfo ensureBoardIsReady(@PositiveOrZero @javax.validation.constraints.PositiveOrZero int numRetries) throws IOException, ProcessException, InterruptedExceptionEnsure 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.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
numRetries
- The number of times to retry booting- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
ensureBoardIsReady
@ParallelUnsafe VersionInfo ensureBoardIsReady(@PositiveOrZero @javax.validation.constraints.PositiveOrZero int numRetries, Map<SystemVariableDefinition,Object> extraBootValues) throws IOException, ProcessException, InterruptedExceptionEnsure 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.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
numRetries
- The number of times to retry bootingextraBootValues
- Any additional values to set during boot- Returns:
- The version identifier
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
getCPUInformation
@ParallelUnsafe @CheckReturnValue default MappableIterable<CPUInfo> getCPUInformation() throws IOException, ProcessException, InterruptedExceptionGet information about the processors on the board.WARNING! This operation is unsafe in a multi-threaded context.
- Returns:
- An iterable of the CPU information for all cores.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCPUInformation
@ParallelSafe @CheckReturnValue default CPUInfo getCPUInformation(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedExceptionGet information about a specific processor on the board.- Parameters:
core
- The coordinates of the core to get the information about- Returns:
- The CPU information for the selected core
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCPUInformation
@ParallelSafeWithCare @CheckReturnValue MappableIterable<CPUInfo> getCPUInformation(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedExceptionGet information about some processors on the board.WARNING! This operation is unsafe in a multi-threaded context unless the
coreSubsets
only contains cores on a single board.- Parameters:
coreSubsets
- A set of chips and cores from which to get the information. Ifnull
, 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
coreSubsets
isnull
. - Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getFullChipInformation
@ParallelSafeWithCare @CheckReturnValue default ChipInfo getFullChipInformation(HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionGet the full information about the chip. This is obtained by reading the full system variable block for the chip. This is an operation that takes a bit of time; the view is not guaranteed to be internally consistent though most values are very unlikely to change during the read.- Parameters:
chip
- Which chip are we getting information about?- Returns:
- A full description of the chip.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getUser0RegisterAddress
Get the address of user0 for a given processor on the board. This does not read from the processor.- Parameters:
core
- the coordinates of the core to get the user0 address for- Returns:
- The address for user0 register for this processor
-
getUser0RegisterAddress
@ParallelSafe default MemoryLocation getUser0RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)Get the address of user0 for a given processor on the board. This does not read from the processor.- Parameters:
p
- the processor ID to get the user0 address for- Returns:
- The address for user0 register for this processor
-
getUser0RegisterAddress
Get the address of user0 for a given processor on the board. This does not read from the processor.- Parameters:
processor
- the processor to get the user0 address for- Returns:
- The address for user0 register for this processor
-
getUser1RegisterAddress
Get the address of user1 for a given processor on the board. This does not read from the processor.- Parameters:
core
- the coordinates of the core to get the user1 address for- Returns:
- The address for user1 register for this processor
-
getUser1RegisterAddress
@ParallelSafe default MemoryLocation getUser1RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)Get the address of user1 for a given processor on the board. This does not read from the processor.- Parameters:
p
- the processor ID to get the user1 address for- Returns:
- The address for user1 register for this processor; this will be in System RAM and be accessible from any core of the chip.
-
getUser1RegisterAddress
Get the address of user1 for a given processor on the board. This does not read from the processor.- Parameters:
processor
- the processor to get the user1 address for- Returns:
- The address for user1 register for this processor; this will be in System RAM and be accessible from any core of the chip.
-
getUser2RegisterAddress
Get the address of user2 for a given processor on the board. This does not read from the processor.- Parameters:
core
- the coordinates of the core to get the user2 address for- Returns:
- The address for user2 register for this processor; this will be in System RAM and be accessible from any core of the chip.
-
getUser2RegisterAddress
@ParallelSafe default MemoryLocation getUser2RegisterAddress(@ValidP @uk.ac.manchester.spinnaker.machine.ValidP int p)Get the address of user2 for a given processor on the board. This does not read from the processor.- Parameters:
p
- the processor ID to get the user2 address for- Returns:
- The address for user0 register for this processor
-
getUser2RegisterAddress
Get the address of user2 for a given processor on the board. This does not read from the processor.- Parameters:
processor
- the processor to get the user2 address for- Returns:
- The address for user0 register for this processor
-
getIobuf
@ParallelUnsafe @CheckReturnValue default MappableIterable<IOBuffer> getIobuf() throws IOException, ProcessException, InterruptedExceptionGet the contents of the IOBUF buffer for all processors.- Returns:
- An iterable of the buffers, order undetermined.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getIobuf
@ParallelSafe @CheckReturnValue default IOBuffer getIobuf(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedExceptionGet the contents of IOBUF for a given core.- Parameters:
core
- The coordinates of the processor to get the IOBUF for- Returns:
- An IOBUF buffer
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getIobuf
@ParallelSafeWithCare @CheckReturnValue MappableIterable<IOBuffer> getIobuf(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedExceptionGet the contents of the IOBUF buffer for a collection of processors.- Parameters:
coreSubsets
- A set of chips and cores from which to get the buffers.- Returns:
- An iterable of the buffers, which may not be in the order of
coreSubsets
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIobuf
@ParallelUnsafe default void clearIobuf() throws IOException, ProcessException, InterruptedExceptionClear the contents of the IOBUF buffer for all processors.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIobuf
@ParallelSafe default void clearIobuf(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedExceptionClear the contents of the IOBUF buffer for a given core.- Parameters:
core
- The coordinates of the processor to clear the IOBUF on.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIobuf
@ParallelSafeWithCare void clearIobuf(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedExceptionClear the contents of the IOBUF buffer for a collection of processors.- Parameters:
coreSubsets
- A set of chips and cores on which to clear the buffers.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setWatchDogTimeoutOnChip
@ParallelSafe void setWatchDogTimeoutOnChip(@Valid @Valid HasChipLocation chip, int watchdog) throws IOException, ProcessException, InterruptedExceptionSet the value of the watch dog timer on a specific chip.- Parameters:
chip
- coordinates of the chip to write new watchdog parameter towatchdog
- value to set the timer count to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
enableWatchDogTimerOnChip
@ParallelSafe void enableWatchDogTimerOnChip(@Valid @Valid HasChipLocation chip, boolean watchdog) throws IOException, ProcessException, InterruptedExceptionEnable or disable the watch dog timer on a specific chip.- Parameters:
chip
- coordinates of the chip to write new watchdog parameter towatchdog
- whether to enable (True) or disable (False) the watchdog timer- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setWatchDogTimeout
@ParallelUnsafe default void setWatchDogTimeout(int watchdog) throws IOException, ProcessException, InterruptedExceptionSet the value of the watch dog timer.- Parameters:
watchdog
- value to set the timer count to.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
enableWatchDogTimer
@ParallelUnsafe default void enableWatchDogTimer(boolean watchdog) throws IOException, ProcessException, InterruptedExceptionEnable or disable the watch dog timer.- Parameters:
watchdog
- whether to enable (True) or disable (False) the watch dog timer- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCoreStateCount
@ParallelUnsafe @CheckReturnValue int getCoreStateCount(@NotNull @NotNull AppID appID, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedExceptionGet a count of the number of cores which have a given state.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
appID
- The ID of the application from which to get the count.state
- The state count to get- Returns:
- A count of the cores with the given status
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.numBytes
- The number of bytes to read from the input stream.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.numBytes
- The number of bytes to read from the input stream.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.numBytes
- The number of bytes to read from the input stream.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.numBytes
- The number of bytes to read from the input stream.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasChipLocation chip, Collection<@ValidP Integer> processors, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe default void execute(@Valid @Valid HasCoreLocation core, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single core.- Parameters:
core
- The coordinates of the core on which to run the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
execute
@ParallelSafe void execute(HasChipLocation chip, Collection<Integer> processors, ByteBuffer executable, AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on a single chip.- Parameters:
chip
- The coordinates of the chip on which to run the executableprocessors
- The cores on the chip on which to run the applicationexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the binary should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.numBytes
- The size of the executable data in bytes.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull InputStream executable, @Positive @javax.validation.constraints.Positive int numBytes, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.numBytes
- The size of the executable data in bytes.appID
- The ID of the application with which to associate the executablewait
- True if the processors should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull File executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the processors should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare default void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executable- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeFlood
@ParallelSafeWithCare void executeFlood(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull ByteBuffer executable, @NotNull @NotNull AppID appID, boolean wait) throws IOException, ProcessException, InterruptedExceptionStart an executable running on multiple places on the board. This will be optimised based on the selected cores, but it may still require a number of communications with the board to execute.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
coreSubsets
- Which cores on which chips to start the executableexecutable
- The data that is to be executed.appID
- The ID of the application with which to associate the executablewait
- True if the processors should enter a "wait" state on loading- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.
-
executeApplication
@ParallelUnsafe default void executeApplication(@Valid @Valid ExecutableTargets executableTargets, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedException, SpinnmanExceptionExecute a set of binaries that make up a complete application on specified cores, wait for them to be ready and then start all of the binaries. Note this will get the binaries intoc_main()
but will not signal the barrier.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
executableTargets
- The binaries to be executed and the cores to execute them onappID
- The application ID to give this application- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the thread is interrupted while waiting.SpinnmanException
- If some cores enter an unexpected state.
-
updateRuntime
@ParallelUnsafe default void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int syncTimesteps) throws IOException, ProcessException, InterruptedExceptionSet the running time information for all processors.- Parameters:
runTimesteps
- How many machine timesteps will the run last.null
is used to indicate an infinite (unbounded until explicitly stopped) run.currentTime
- The current simulation time.syncTimesteps
- The number of timesteps before we pause to synchronise.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
updateRuntime
@ParallelSafe default void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int syncTimesteps, @Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedExceptionSet the running time information for a given core.- Parameters:
runTimesteps
- How many machine timesteps will the run last.null
is used to indicate an infinite (unbounded until explicitly stopped) run.currentTime
- The current simulation time.syncTimesteps
- The number of timesteps before we pause to synchronise.core
- The coordinates of the processor to clear the IOBUF on.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
updateRuntime
@ParallelSafeWithCare void updateRuntime(@PositiveOrZero @PositiveOrZero Integer runTimesteps, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int currentTime, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int syncTimesteps, @Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedExceptionSet the running time information for a collection of processors.- Parameters:
runTimesteps
- How many machine timesteps will the run last.null
is used to indicate an infinite (unbounded until explicitly stopped) run.currentTime
- The current simulation time.syncTimesteps
- The number of timesteps before we pause to synchronise.coreSubsets
- A set of chips and cores on which to set the running time.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
updateProvenanceAndExit
@ParallelUnsafe default void updateProvenanceAndExit() throws IOException, ProcessException, InterruptedExceptionTell all running application cores to write their provenance data to a location where it can be read back, and then to go into theFINISHED
state.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
updateProvenanceAndExit
@ParallelSafe default void updateProvenanceAndExit(@Valid @Valid HasCoreLocation core) throws IOException, ProcessException, InterruptedExceptionTell a running application core to write its provenance data to a location where it can be read back, and then to go into theFINISHED
state.- Parameters:
core
- The core to tell to finish.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
updateProvenanceAndExit
@ParallelSafeWithCare void updateProvenanceAndExit(@Valid @Valid CoreSubsets coreSubsets) throws IOException, ProcessException, InterruptedExceptionTell some running application cores to write their provenance data to a location where it can be read back, and then to go into theirFINISHED
state.- Parameters:
coreSubsets
- A set of cores tell to finish.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @javax.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
chip
- The coordinates of the chip where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataStream
- The stream of data that is to be written.numBytes
- The amount of data to be written in bytes.- Throws:
IOException
- If anything goes wrong with networking or reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @javax.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
core
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataStream
- The stream of data that is to be written.numBytes
- The amount of data to be written in bytes.- Throws:
IOException
- If anything goes wrong with networking or reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
chip
- The coordinates of the chip where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataFile
- The file holding the data that is to be written.- Throws:
IOException
- If anything goes wrong with networking or reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
core
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataFile
- The file holding the data that is to be written.- Throws:
IOException
- If anything goes wrong with networking or reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
chip
- The coordinates of the chip where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataWord
- The word that is to be written (as 4 bytes).- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM (or System RAM) on the board.- Parameters:
core
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendataWord
- The word that is to be written (as 4 bytes).- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @javax.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
chip
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @javax.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
core
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe default void writeMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM on the board.- Parameters:
chip
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written. The data should be from the position to the limit.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemory
@ParallelSafe void writeMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM (or System RAM) on the board.- Parameters:
core
- The coordinates of the core where the memory is that is to be written tobaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written. The data should be from the position to the limit.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser0
default void writeUser0(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedExceptionWrite to the user0 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written tovalue
- The word of data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser0
default void writeUser0(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedExceptionWrite to the user0 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written topointer
- The pointer/address that is to be written to the register.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser1
default void writeUser1(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedExceptionWrite to the user1 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written tovalue
- The word of data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser1
default void writeUser1(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedExceptionWrite to the user1 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written topointer
- The pointer/address that is to be written to the register.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser2
default void writeUser2(@Valid @Valid HasCoreLocation core, int value) throws ProcessException, IOException, InterruptedExceptionWrite to the user2 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written tovalue
- The word of data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeUser2
default void writeUser2(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation pointer) throws ProcessException, IOException, InterruptedExceptionWrite to the user2 register of a core.- Parameters:
core
- The coordinates of the core whose register is to be written topointer
- The pointer/address that is to be written to the register.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @javax.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be written tolink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataStream
- The stream of data that is to be written.numBytes
- The amount of data to be written in bytes.- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @javax.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataStream
- The stream of data that is to be written.numBytes
- The amount of data to be written in bytes.- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be written tolink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataFile
- The file holding the data that is to be written.- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataFile
- The name of the file holding the data that is to be written.- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be written tolink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataWord
- The word that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendataWord
- The word that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @javax.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be written tolink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @javax.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare default void writeNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be written tolink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written. The data should be from the position to the limit.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeNeighbourMemory
@ParallelSafeWithCare void writeNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite to the memory of a neighbouring chip using a LINK_WRITE SCP command. If sent to a BMP, this command can be used to communicate with the FPGAs' debug registers; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the core whose neighbour is to be written to; the CPU to use is typically 0 (or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written. The data should be from the position to the limit.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemoryFlood
@ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull InputStream dataStream, @Positive @javax.validation.constraints.Positive int numBytes) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM of all chips.WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.
- Parameters:
baseAddress
- The address in SDRAM where the region of memory is to be writtendataStream
- The stream of data that is to be written.numBytes
- The amount of data to be written in bytes.- Throws:
IOException
- If anything goes wrong with networking or with reading from the input stream.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemoryFlood
@ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull File dataFile) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM of all chips.WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.
- Parameters:
baseAddress
- The address in SDRAM where the region of memory is to be writtendataFile
- The name of the file holding the data that is to be written.- Throws:
IOException
- If anything goes wrong with networking or with reading from the file.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemoryFlood
@ParallelUnsafe default void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, int dataWord) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM of all chips.WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.
- Parameters:
baseAddress
- The address in SDRAM where the region of memory is to be writtendataWord
- The word that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemoryFlood
@ParallelUnsafe default void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotEmpty @javax.validation.constraints.NotEmpty byte[] data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM of all chips.WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.
- Parameters:
baseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
writeMemoryFlood
@ParallelUnsafe void writeMemoryFlood(@NotNull @NotNull MemoryLocation baseAddress, @NotNull @NotNull ByteBuffer data) throws IOException, ProcessException, InterruptedExceptionWrite to the SDRAM of all chips.WARNING! This operation is unsafe in a multi-threaded context. It has interlocking, but you should not rely on it.
- Parameters:
baseAddress
- The address in SDRAM where the region of memory is to be writtendata
- The data that is to be written. The data should be from the position to the limit.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readMemory
@ParallelSafe @CheckReturnValue default ByteBuffer readMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead some areas of SDRAM from the board.- Parameters:
chip
- The coordinates of the chip where the memory is to be read frombaseAddress
- The address in SDRAM where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readMemory
@ParallelSafe @CheckReturnValue ByteBuffer readMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead some areas of SDRAM (or System RAM) from the board.- Parameters:
core
- The coordinates of the core where the memory is to be read frombaseAddress
- The address in SDRAM where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data read, positioned at the start of the data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readMemory
@ParallelSafe @CheckReturnValue default ByteBuffer readMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull HeapElement element) throws IOException, ProcessException, InterruptedExceptionRead the contents of an allocated block on the heap from the board. The SDRAM heap can be read from any core of that chip; the DTCM heap can only be read from one particular core.- Parameters:
core
- The coordinates of the core where the memory is to be read fromelement
- The heap element to read the contents of- Returns:
- A little-endian buffer of data read, positioned at the start of
the data, or
null
if the heap element is free. - Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readRegion
@ParallelSafe void readRegion(@Valid BufferManagerStorage.Region region, @NotNull @NotNull BufferManagerStorage storage) throws IOException, ProcessException, StorageException, InterruptedExceptionRead an area associated with a recording region from SDRAM from a core of a chip on the board.- Parameters:
region
- The recording region that is being read. Describes which core produced the data, what DSE index the data came from, and where in memory to actually read.storage
- The database to write to.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.StorageException
- If anything goes wrong with access to the database.InterruptedException
- If the communications were interrupted.
-
readUser0
@CheckReturnValue default int readUser0(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedExceptionRead the user0 register of a core.- Parameters:
core
- The coordinates of the core to read the register of- Returns:
- The contents of the register
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readUser1
@CheckReturnValue default int readUser1(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedExceptionRead the user1 register of a core.- Parameters:
core
- The coordinates of the core to read the register of- Returns:
- The contents of the register
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readUser2
@CheckReturnValue default int readUser2(@Valid @Valid HasCoreLocation core) throws ProcessException, IOException, InterruptedExceptionRead the user2 register of a core.- Parameters:
core
- The coordinates of the core to read the register of- Returns:
- The contents of the register
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readNeighbourMemory
@ParallelSafeWithCare default ByteBuffer readNeighbourMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead 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; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
chip
- The coordinates of the chip whose neighbour is to be read fromlink
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data that has been read, positioned at the start of the data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readNeighbourMemory
@ParallelSafeWithCare ByteBuffer readNeighbourMemory(@Valid @Valid HasCoreLocation core, @NotNull @NotNull Direction link, @NotNull @NotNull MemoryLocation baseAddress, @Positive @javax.validation.constraints.Positive int length) throws IOException, ProcessException, InterruptedExceptionRead 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; in that case, the link must be the direction with the same ID as the ID of the FPGA to communicate with.WARNING! This operation is unsafe in a multi-threaded context if the link leaves the current board.
- Parameters:
core
- The coordinates of the chip whose neighbour is to be read from, plus the CPU to use (typically 0, or if a BMP, the slot number)link
- The link direction to send the request alongbaseAddress
- The address in SDRAM where the region of memory to be read startslength
- The length of the data to be read in bytes- Returns:
- A little-endian buffer of data that has been read, positioned at the start of the data
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
stopApplication
@ParallelUnsafe void stopApplication(@NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionSends a stop request for an application ID.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
appID
- The ID of the application to send to- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
waitForCoresToBeInState
@ParallelSafeWithCare default void waitForCoresToBeInState(@Valid @Valid CoreSubsets coreSubsets, @NotNull @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates) throws IOException, InterruptedException, SpinnmanExceptionWaits for the specified cores running the given application to be in some target state or states. Handles failures.WARNING! This operation is unsafe in a multi-threaded context if the cores are over more than a single board.
- Parameters:
coreSubsets
- the cores to check are in a given sync stateappID
- the application ID that being used by the simulationcpuStates
- The expected states once the applications are ready; success is when each application is in one of these states- Throws:
IOException
- If anything goes wrong with networking.InterruptedException
- If the thread is interrupted while waiting.SpinnmanException
- If some cores enter an error state or SpiNNaker rejects a message.
-
waitForCoresToBeInState
@ParallelSafeWithCare void waitForCoresToBeInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull AppID appID, EnumSet<@NotNull CPUState> cpuStates, @PositiveOrZero @PositiveOrZero Integer timeout, @Positive @javax.validation.constraints.Positive int timeBetweenPolls, EnumSet<@NotNull CPUState> errorStates, @Positive @javax.validation.constraints.Positive int countsBetweenFullCheck) throws IOException, InterruptedException, SpinnmanExceptionWaits for the specified cores running the given application to be in some target state or states. Handles failures.WARNING! This operation is unsafe in a multi-threaded context if the cores are over more than a single board.
- Parameters:
allCoreSubsets
- the cores to check are in a given sync stateappID
- the application ID that being used by the simulationcpuStates
- The expected states once the applications are ready; success is when each application is in one of these statestimeout
- The amount of time to wait in milliseconds for the cores to reach one of the states, ornull
to wait for an unbounded amount of time.timeBetweenPolls
- Time between checking the state, in millisecondserrorStates
- Set of states that the application can be in that indicate an error, and so should raise an exceptioncountsBetweenFullCheck
- The number of times to use the count signal before instead using the full CPU state check- Throws:
IOException
- If anything goes wrong with networking.InterruptedException
- If the thread is interrupted while waiting.SpinnmanException
- If some cores enter an error state or SpiNNaker rejects a message.
-
getCoresInState
@ParallelSafeWithCare @CheckReturnValue default CoreSubsets getCoresInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedExceptionGet all cores that are in a given state.WARNING! This operation is unsafe in a multi-threaded context unless the
allCoreSubsets
only contains cores on a single board.- Parameters:
allCoreSubsets
- The cores to filterstate
- The states to filter on- Returns:
- Core subsets object containing cores in the given state
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCoresInState
@ParallelSafeWithCare @CheckReturnValue default CoreSubsets getCoresInState(@Valid @Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states) throws IOException, ProcessException, InterruptedExceptionGet all cores that are in a given set of states.WARNING! This operation is unsafe in a multi-threaded context unless the
allCoreSubsets
only contains cores on a single board.- Parameters:
allCoreSubsets
- The cores to filterstates
- The states to filter on- Returns:
- Core subsets object containing cores in the given states
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCoresNotInState
@ParallelSafeWithCare @CheckReturnValue default Map<CoreLocation,CPUInfo> getCoresNotInState(@Valid @Valid CoreSubsets allCoreSubsets, @NotNull @NotNull CPUState state) throws IOException, ProcessException, InterruptedExceptionGet all cores that are not in a given state.WARNING! This operation is unsafe in a multi-threaded context unless the
allCoreSubsets
only contains cores on a single board.- Parameters:
allCoreSubsets
- The cores to filterstate
- The state to filter on- Returns:
- Core subsets object containing cores not in the given state
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getCoresNotInState
@ParallelSafeWithCare @CheckReturnValue default Map<CoreLocation,CPUInfo> getCoresNotInState(@Valid @Valid CoreSubsets allCoreSubsets, EnumSet<@NotNull CPUState> states) throws IOException, ProcessException, InterruptedExceptionGet all cores that are not in a given set of states.WARNING! This operation is unsafe in a multi-threaded context unless the
allCoreSubsets
only contains cores on a single board.- Parameters:
allCoreSubsets
- The cores to filterstates
- The states to filter on- Returns:
- Core subsets object containing cores not in the given states
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
sendSignal
@ParallelUnsafe void sendSignal(@NotNull @NotNull AppID appID, @NotNull @NotNull Signal signal) throws IOException, ProcessException, InterruptedExceptionSend a signal to an application.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
appID
- The ID of the application to send tosignal
- The signal to send- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setLEDs
@ParallelSafe default void setLEDs(@Valid @Valid HasChipLocation chip, Map<Integer,LEDAction> ledStates) throws IOException, ProcessException, InterruptedExceptionSet LED states.- Parameters:
chip
- The coordinates of the chip on which to set the LEDsledStates
- A map from LED index to state with 0 being off, 1 on and 2 inverted.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setLEDs
@ParallelSafe void setLEDs(@Valid @Valid HasCoreLocation core, Map<Integer,LEDAction> ledStates) throws IOException, ProcessException, InterruptedExceptionSet LED states.- Parameters:
core
- The coordinates of the core on which to set the LEDsledStates
- A map from LED index to state with 0 being off, 1 on and 2 inverted.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
locateSpinnakerConnection
Find a connection that matches the given board IP address.- Parameters:
boardAddress
- The IP address of the Ethernet connection on the board- Returns:
- A connection for the given IP address, or
null
if no such connection exists
-
setIPTag
@ParallelSafeWithCare void setIPTag(@Valid @Valid IPTag tag) throws IOException, ProcessException, InterruptedExceptionSet up an IP tag.- Parameters:
tag
- The tag to set up; note its board address can benull
, in which case, the tag will be assigned to all boards.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setIPTag
@ParallelSafeWithCare void setIPTag(@Valid @Valid IPTag tag, @NotNull @NotNull SDPConnection connection) throws IOException, ProcessException, InterruptedExceptionSet up an IP tag to deliver messages to a particular connection.- Parameters:
tag
- The tag to set up.connection
- The connection to deliver messages to, which must already be set up to talk to the correct board.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReverseIPTag
@ParallelSafe void setReverseIPTag(@Valid @Valid ReverseIPTag tag) throws IOException, ProcessException, InterruptedExceptionSet up a reverse IP tag.- Parameters:
tag
- The reverse tag to set up; note its board address can benull
, in which case, the tag will be assigned to all boards- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIPTag
@ParallelSafe default void clearIPTag(@Valid @Valid Tag tag) throws IOException, ProcessException, InterruptedExceptionClear the setting of an IP tag.- Parameters:
tag
- The tag- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIPTag
@ParallelUnsafe default void clearIPTag(@TagID @uk.ac.manchester.spinnaker.machine.tags.TagID int tag) throws IOException, ProcessException, InterruptedExceptionClear the setting of an IP tag.WARNING! This operation is unsafe in a multi-threaded context.
- Parameters:
tag
- The tag ID- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearIPTag
@ParallelSafe void clearIPTag(@TagID @uk.ac.manchester.spinnaker.machine.tags.TagID int tag, InetAddress boardAddress) throws IOException, ProcessException, InterruptedExceptionClear the setting of an IP tag.- Parameters:
tag
- The tag IDboardAddress
- Board address where the tag should be cleared. Ifnull
, all SCPSender connections will send the message to clear the tag- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getTags
@ParallelUnsafe @CheckReturnValue default List<Tag> getTags() throws IOException, ProcessException, InterruptedExceptionGet the current set of tags that have been set on the board using all SCPSender connections.WARNING! This operation is unsafe in a multi-threaded context.
- Returns:
- An iterable of tags
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getTags
@ParallelSafe @CheckReturnValue List<Tag> getTags(SCPConnection connection) throws IOException, ProcessException, InterruptedExceptionGet the current set of tags that have been set on the board.- Parameters:
connection
- Connection from which the tags should be received.- Returns:
- An iterable of tags
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getTagUsage
@ParallelUnsafe @CheckReturnValue default Map<Tag,Integer> getTagUsage() throws IOException, ProcessException, InterruptedExceptionGet the number of times each tag has had a message sent via it using all SCPSender connections.WARNING! This operation is unsafe in a multi-threaded context.
- Returns:
- A map from the tags to their usage.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getTagUsage
@ParallelSafe @CheckReturnValue Map<Tag,Integer> getTagUsage(@NotNull @NotNull SCPConnection connection) throws IOException, ProcessException, InterruptedExceptionGet the number of times each tag has had a message sent via it for a connection.- Parameters:
connection
- Connection from which the tag usage should be retrieved.- Returns:
- A map from the tags to their usage.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
mallocSDRAM
@ParallelSafe @CheckReturnValue default MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @javax.validation.constraints.Positive int size) throws IOException, ProcessException, InterruptedExceptionAllocates a chunk of SDRAM on a chip on the machine.- Parameters:
chip
- The coordinates of the chip onto which to allocate memorysize
- The amount of memory to allocate in bytes- Returns:
- the base address of the allocated memory
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
mallocSDRAM
@ParallelSafe @CheckReturnValue default MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @javax.validation.constraints.Positive int size, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionAllocates a chunk of SDRAM on a chip on the machine.- Parameters:
chip
- The coordinates of the chip onto which to allocate memorysize
- The amount of memory to allocate in bytesappID
- The ID of the application with which to associate the routes.- Returns:
- the base address of the allocated memory
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
mallocSDRAM
@ParallelSafe MemoryLocation mallocSDRAM(@Valid @Valid HasChipLocation chip, @Positive @javax.validation.constraints.Positive int size, @NotNull @NotNull AppID appID, int tag) throws IOException, ProcessException, InterruptedExceptionAllocates a chunk of SDRAM on a chip on the machine.- Parameters:
chip
- The coordinates of the chip onto which to allocate memorysize
- The amount of memory to allocate in bytesappID
- The ID of the application with which to associate the routes.tag
- The tag for the SDRAM, a 8-bit (chip-wide) tag that can be looked up by a SpiNNaker application to discover the address of the allocated block.- Returns:
- the base address of the allocated memory
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
freeSDRAM
@ParallelSafe void freeSDRAM(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress) throws IOException, ProcessException, InterruptedExceptionFree allocated SDRAM.- Parameters:
chip
- The coordinates of the chip onto which to free memorybaseAddress
- The base address of the allocated memory- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
freeSDRAM
@ParallelSafe int freeSDRAM(@Valid @Valid HasChipLocation chip, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionFree all SDRAM allocated to a given application ID.- Parameters:
chip
- The coordinates of the chip onto which to free memoryappID
- The app ID of the owner of the allocated memory- Returns:
- The number of blocks freed
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadMulticastRoutes
@ParallelSafe default void loadMulticastRoutes(@Valid @Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes) throws IOException, ProcessException, InterruptedExceptionLoad a set of multicast routes on to a chip associated with the default application ID.- Parameters:
chip
- The coordinates of the chip onto which to load the routesroutes
- An iterable of multicast routes to load- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadMulticastRoutes
@ParallelSafe void loadMulticastRoutes(@Valid @Valid HasChipLocation chip, Collection<@NotNull MulticastRoutingEntry> routes, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionLoad a set of multicast routes on to a chip.- Parameters:
chip
- The coordinates of the chip onto which to load the routesroutes
- An iterable of multicast routes to loadappID
- The ID of the application with which to associate the routes.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadFixedRoute
@ParallelSafe default void loadFixedRoute(@Valid @Valid HasChipLocation chip, @Valid @Valid RoutingEntry fixedRoute) throws IOException, ProcessException, InterruptedExceptionLoads a fixed route routing table entry onto a chip's router.- Parameters:
chip
- The coordinates of the chip onto which to load the routefixedRoute
- the route for the fixed route entry on this chip- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadFixedRoute
@ParallelSafe void loadFixedRoute(@Valid @Valid HasChipLocation chip, @Valid @Valid RoutingEntry fixedRoute, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionLoads a fixed route routing table entry onto a chip's router.- Parameters:
chip
- The coordinates of the chip onto which to load the routefixedRoute
- the route for the fixed route entry on this chipappID
- The ID of the application with which to associate the route.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFixedRoute
@ParallelSafe @CheckReturnValue default RoutingEntry readFixedRoute(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionReads a fixed route routing table entry from a chip's router.- Parameters:
chip
- The coordinate of the chip from which to read the route.- Returns:
- the route as a fixed route entry
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
readFixedRoute
@ParallelSafe @CheckReturnValue RoutingEntry readFixedRoute(@Valid @Valid HasChipLocation chip, @NotNull @NotNull AppID appID) throws IOException, ProcessException, InterruptedExceptionReads a fixed route routing table entry from a chip's router.- Parameters:
chip
- The coordinate of the chip from which to read the route.appID
- The ID of the application associated the route.- Returns:
- the route as a fixed route entry
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getMulticastRoutes
@ParallelSafe @CheckReturnValue default List<MulticastRoutingEntry> getMulticastRoutes(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionGet the current multicast routes set up on a chip.- Parameters:
chip
- The coordinates of the chip from which to get the routes- Returns:
- An iterable of multicast routes
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getMulticastRoutes
@ParallelSafe @CheckReturnValue List<MulticastRoutingEntry> getMulticastRoutes(@Valid @Valid HasChipLocation chip, AppID appID) throws IOException, ProcessException, InterruptedExceptionGet the current multicast routes set up on a chip.- Parameters:
chip
- The coordinates of the chip from which to get the routesappID
- The ID of the application to filter the routes for.null
means "don't filter".- Returns:
- An iterable of multicast routes
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearMulticastRoutes
@ParallelSafe void clearMulticastRoutes(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionRemove all the multicast routes on a chip.- Parameters:
chip
- The coordinates of the chip on which to clear the routes- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getRouterDiagnostics
@ParallelSafe @CheckReturnValue RouterDiagnostics getRouterDiagnostics(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionGet router diagnostic information from a chip.- Parameters:
chip
- The coordinates of the chip from which to get the information- Returns:
- The router diagnostic information
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setRouterDiagnosticFilter
@ParallelSafe void setRouterDiagnosticFilter(@Valid @Valid HasChipLocation chip, int position, @NotNull @NotNull DiagnosticFilter diagnosticFilter) throws IOException, ProcessException, InterruptedExceptionSets a router diagnostic filter in a router.- Parameters:
chip
- the address of the router in which this filter is being setposition
- the position in the list of filters where this filter is to be added, between 0 and 15 (note that positions 0 to 11 are used by the default filters, and setting these positions will result in a warning).diagnosticFilter
- the diagnostic filter being set in the position.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getRouterDiagnosticFilter
@ParallelSafe @CheckReturnValue DiagnosticFilter getRouterDiagnosticFilter(@Valid @Valid HasChipLocation chip, @PositiveOrZero @javax.validation.constraints.PositiveOrZero int position) throws IOException, ProcessException, InterruptedExceptionGets a router diagnostic filter from a router.- Parameters:
chip
- the address of the router from which this filter is being retrievedposition
- the position in the list of filters where this filter is to be read from- Returns:
- The diagnostic filter read
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearRouterDiagnosticCounters
@ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionClear router diagnostic information on a chip. Resets and enables all diagnostic counters.- Parameters:
chip
- The coordinates of the chip- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearRouterDiagnosticCounters
@ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, boolean enable) throws IOException, ProcessException, InterruptedExceptionClear router diagnostic information on a chip. Resets all diagnostic counters.- Parameters:
chip
- The coordinates of the chipenable
- True (default) if the counters should be enabled- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearRouterDiagnosticCounters
@ParallelSafe default void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, Iterable<@NotNull Integer> counterIDs) throws IOException, ProcessException, InterruptedExceptionClear router diagnostic information on a chip. Resets and enables all the numbered counters.- Parameters:
chip
- The coordinates of the chipcounterIDs
- The IDs of the counters to reset and enable; each must be between 0 and 15- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearRouterDiagnosticCounters
@ParallelSafe void clearRouterDiagnosticCounters(@Valid @Valid HasChipLocation chip, boolean enable, Iterable<@NotNull Integer> counterIDs) throws IOException, ProcessException, InterruptedExceptionClear router diagnostic information on a chip.- Parameters:
chip
- The coordinates of the chipenable
- True (default) if the counters should be enabledcounterIDs
- The IDs of the counters to reset and enable if enable is True; each must be between 0 and 15- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getHeap
@ParallelSafe @CheckReturnValue default List<HeapElement> getHeap(@Valid @Valid HasChipLocation chip) throws IOException, ProcessException, InterruptedExceptionGet the contents of the SDRAM heap on a given chip.- Parameters:
chip
- The coordinates of the chip- Returns:
- the list of chunks in the heap
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getHeap
@ParallelSafe @CheckReturnValue List<HeapElement> getHeap(@Valid @Valid HasChipLocation chip, @NotNull @NotNull SystemVariableDefinition heap) throws IOException, ProcessException, InterruptedExceptionGet the contents of the given heap on a given chip.- Parameters:
chip
- The coordinates of the chipheap
- The SystemVariableDefinition which is the heap to read- Returns:
- the list of chunks in the heap
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
fillMemory
@ParallelSafe default void fillMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int repeatValue, @Positive @javax.validation.constraints.Positive int size) throws ProcessException, IOException, InterruptedExceptionFill some memory with repeated data.- Parameters:
chip
- The coordinates of the chipbaseAddress
- The address at which to start the fillrepeatValue
- The data to repeatsize
- The number of bytes to fill. Must be compatible with the data type i.e. if the data type is WORD, the number of bytes must be divisible by 4- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
fillMemory
@ParallelSafe void fillMemory(@Valid @Valid HasChipLocation chip, @NotNull @NotNull MemoryLocation baseAddress, int repeatValue, @Positive @javax.validation.constraints.Positive int size, @NotNull @NotNull FillDataType dataType) throws ProcessException, IOException, InterruptedExceptionFill some memory with repeated data.- Parameters:
chip
- The coordinates of the chipbaseAddress
- The address at which to start the fillrepeatValue
- The data to repeatsize
- The number of bytes to fill. Must be compatible with the data type i.e. if the data type is WORD, the number of bytes must be divisible by 4dataType
- The type of data to fill.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearReinjectionQueues
@ParallelSafe void clearReinjectionQueues(@Valid @Valid HasCoreLocation monitorCore) throws IOException, ProcessException, InterruptedExceptionClear the packet reinjection queues in a monitor process.- Parameters:
monitorCore
- The coordinates of the monitor core.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
clearReinjectionQueues
@ParallelSafe void clearReinjectionQueues(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionClear the packet reinjection queues in some monitor processes.- Parameters:
monitorCores
- The coordinates of the monitor cores.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getReinjectionStatus
@ParallelSafe @CheckReturnValue ReinjectionStatus getReinjectionStatus(@Valid @Valid HasCoreLocation monitorCore) throws IOException, ProcessException, InterruptedExceptionGet the packet reinjection status of a monitor process.- Parameters:
monitorCore
- The coordinates of the monitor core.- Returns:
- The reinjection status.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
getReinjectionStatus
@ParallelSafe @CheckReturnValue Map<CoreLocation,ReinjectionStatus> getReinjectionStatus(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionGet the packet reinjection status of some monitor processes.- Parameters:
monitorCores
- The coordinates of the monitor cores.- Returns:
- The reinjection statuses of the cores.
- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
resetReinjectionCounters
@ParallelSafe void resetReinjectionCounters(@Valid @Valid HasCoreLocation monitorCore) throws IOException, ProcessException, InterruptedExceptionReset the packet reinjection counters of a monitor process.- Parameters:
monitorCore
- The coordinates of the monitor core.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
resetReinjectionCounters
@ParallelSafeWithCare void resetReinjectionCounters(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionReset the packet reinjection counters of some monitor processes.- Parameters:
monitorCores
- The coordinates of the monitor cores.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjection
@ParallelSafe default void setReinjection(@Valid @Valid HasCoreLocation monitorCore, boolean reinject) throws IOException, ProcessException, InterruptedExceptionSet whether packets (of all types) are to be reinjected.- Parameters:
monitorCore
- The coordinates of the monitor core.reinject
- True if all packets are to be reinjected.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.InterruptedException
- If the communications were interrupted.
-
setReinjection
@ParallelSafe default void setReinjection(@Valid @Valid CoreSubsets monitorCores, boolean reinject) throws IOException, ProcessException, InterruptedExceptionSet whether packets (of all types) are to be reinjected.- Parameters:
monitorCores
- The coordinates of some monitor cores.reinject
- True if all packets are to be reinjected.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjection
@ParallelSafe default void setReinjection(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedExceptionRestore whether packets are to be reinjected to a previously saved state.- Parameters:
monitorCore
- The coordinates of the monitor core.status
- The saved reinjection status to restore.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjection
@ParallelSafe default void setReinjection(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedExceptionRestore whether packets are to be reinjected to a previously saved state.- Parameters:
monitorCores
- The coordinates of some monitor cores.status
- The saved reinjection status to restore.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTypes
@ParallelSafe void setReinjectionTypes(@Valid @Valid HasCoreLocation monitorCore, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour) throws IOException, ProcessException, InterruptedExceptionSet what types of packets are to be reinjected.- Parameters:
monitorCore
- The coordinates of the monitor core.multicast
- True if multicast packets are to be reinjected.pointToPoint
- True if point-to-point packets are to be reinjected.fixedRoute
- True if fixed-route packets are to be reinjected.nearestNeighbour
- True if nearest-neighbour packets are to be reinjected.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTypes
@ParallelSafeWithCare void setReinjectionTypes(@Valid @Valid CoreSubsets monitorCores, boolean multicast, boolean pointToPoint, boolean fixedRoute, boolean nearestNeighbour) throws IOException, ProcessException, InterruptedExceptionSet what types of packets are to be reinjected.- Parameters:
monitorCores
- The coordinates of some monitor cores.multicast
- True if multicast packets are to be reinjected.pointToPoint
- True if point-to-point packets are to be reinjected.fixedRoute
- True if fixed-route packets are to be reinjected.nearestNeighbour
- True if nearest-neighbour packets are to be reinjected.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionEmergencyTimeout
@ParallelSafe void setReinjectionEmergencyTimeout(@Valid @Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedExceptionSet the emergency packet reinjection timeout.- Parameters:
monitorCore
- The coordinates of the monitor core.timeoutMantissa
- The mantissa of the timeout value, between 0 and 15.timeoutExponent
- The exponent of the timeout value, between 0 and 15.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionEmergencyTimeout
@ParallelSafe default void setReinjectionEmergencyTimeout(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedExceptionSet the emergency packet reinjection timeout.- Parameters:
monitorCore
- The coordinates of the monitor core.timeout
- The timeout value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionEmergencyTimeout
@ParallelSafeWithCare void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedExceptionSet the emergency packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.timeoutMantissa
- The mantissa of the timeout value, between 0 and 15.timeoutExponent
- The exponent of the timeout value, between 0 and 15.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionEmergencyTimeout
@ParallelSafeWithCare default void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedExceptionSet the emergency packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.timeout
- The timeout value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionEmergencyTimeout
@ParallelSafeWithCare default void setReinjectionEmergencyTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedExceptionSet the emergency packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.status
- The saved core status.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTimeout
@ParallelSafe void setReinjectionTimeout(@Valid @Valid HasCoreLocation monitorCore, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedExceptionSet the packet reinjection timeout.- Parameters:
monitorCore
- The coordinates of the monitor core.timeoutMantissa
- The mantissa of the timeout value, between 0 and 15.timeoutExponent
- The exponent of the timeout value, between 0 and 15.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTimeout
@ParallelSafe default void setReinjectionTimeout(@Valid @Valid HasCoreLocation monitorCore, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedExceptionSet the packet reinjection timeout.- Parameters:
monitorCore
- The coordinates of the monitor core.timeout
- The timeout value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTimeout
@ParallelSafeWithCare void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, int timeoutMantissa, int timeoutExponent) throws IOException, ProcessException, InterruptedExceptionSet the packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.timeoutMantissa
- The mantissa of the timeout value, between 0 and 15.timeoutExponent
- The exponent of the timeout value, between 0 and 15.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTimeout
@ParallelSafeWithCare default void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull RouterTimeout timeout) throws IOException, ProcessException, InterruptedExceptionSet the packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.timeout
- The timeout value.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
setReinjectionTimeout
@ParallelSafeWithCare default void setReinjectionTimeout(@Valid @Valid CoreSubsets monitorCores, @NotNull @NotNull ReinjectionStatus status) throws IOException, ProcessException, InterruptedExceptionSet the packet reinjection timeout.- Parameters:
monitorCores
- The coordinates of some monitor cores.status
- The saved core status.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
saveApplicationRouterTables
@ParallelSafeWithCare void saveApplicationRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionSave the application's multicast router tables.- Parameters:
monitorCores
- The coordinates of some monitor cores; the routers on those chips will have their (current) multicast router tables saved.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadApplicationRouterTables
@ParallelSafeWithCare void loadApplicationRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionLoad the (previously saved) application's multicast router tables. The router tables must have been previously saved.- Parameters:
monitorCores
- The coordinates of some monitor cores; the routers on those chips will have their multicast router tables loaded.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
loadSystemRouterTables
@ParallelSafeWithCare void loadSystemRouterTables(@Valid @Valid CoreSubsets monitorCores) throws IOException, ProcessException, InterruptedExceptionLoad the (previously configured) system multicast router tables. The application's router tables must have been previously saved.- Parameters:
monitorCores
- The coordinates of some monitor cores; the routers on those chips will have their multicast router tables loaded.- Throws:
IOException
- If anything goes wrong with networking.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If the communications were interrupted.
-
createScpConnection
@ParallelSafe @MustBeClosed SCPConnection createScpConnection(ChipLocation chip, InetAddress addr) throws IOExceptionCreate a connection to a particular instance of SCAMP. Note that this connection is a new connection; it is not a previously existing connection.- Parameters:
chip
- The location of the chip on the board with this remoteHostaddr
- The IP address of the SpiNNaker board to send messages to.- Returns:
- The SCP connection to use. It is up to the caller to arrange for this to be closed at the right time.
- Throws:
IOException
- If anything goes wrong with socket setup.
-