Class CPUInfo
java.lang.Object
uk.ac.manchester.spinnaker.messages.model.CPUInfo
- All Implemented Interfaces:
HasChipLocation,HasCoreLocation
Represents information about the state of a CPU.
-
Constructor Summary
ConstructorsConstructorDescriptionCPUInfo(HasCoreLocation location, ByteBuffer buffer) Constructs a holder of information about the state of a CPU. -
Method Summary
Modifier and TypeMethodDescriptionintReturns The ID of the application running on the core.Returns The command currently in the mailbox being sent from the monitor processor to the application.intReturns The address of the data in SDRAM for the application mailbox.Returns The name of the application running on the core.intReturns The address of the IOBUF buffer in SDRAM.intReturns The current link register value (LR).Returns The command currently in the mailbox being sent from the application to the monitor processor.intReturns The address of the data in SDRAM of the monitor mailbox.intgetP()Returns The processor coordinate of the core on its chip.byteReturns The physical ID of this processor.intReturns The value in the processor state register (PSR).int[]Returns The current register values (r0…r7).Returns The reason for a run time error.shortReturns The number of software errors counted.intReturns The address of the filename of the software source.intReturns The line number of the software source.intReturns The software version.intReturns The current stack pointer value (SP).getState()Returns The current state of the core.Returns A description of the state.intgetTime()Returns The time at which the application started, in seconds since 00:00:00 GMT on 1 January 1970.int[]getUser()Returns The current user values (user0…user3).intgetUser(int index) Get the current user value.intgetX()Returns The X coordinate of the chip.intgetY()Returns The Y coordinate of the chip.toString()Returns A string representation of this CPU info.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
asChipLocation, getScampCore, onSameChipAsMethods inherited from interface uk.ac.manchester.spinnaker.machine.HasCoreLocation
asCoreLocation, onSameCoreAs
-
Constructor Details
-
CPUInfo
Constructs a holder of information about the state of a CPU.- Parameters:
location- Which core was queried for the information.buffer- The data received from SDRAM on the board, in a little-endian buffer.
-
-
Method Details
-
getX
public int getX()Description copied from interface:HasChipLocationReturns The X coordinate of the chip.- Specified by:
getXin interfaceHasChipLocation- Returns:
- The X coordinate of the chip
-
getY
public int getY()Description copied from interface:HasChipLocationReturns The Y coordinate of the chip.- Specified by:
getYin interfaceHasChipLocation- Returns:
- The Y coordinate of the chip
-
getP
public int getP()Description copied from interface:HasCoreLocationReturns The processor coordinate of the core on its chip.- Specified by:
getPin interfaceHasCoreLocation- Returns:
- The processor coordinate of the core on its chip
-
getRegisters
public int[] getRegisters()Returns The current register values (r0…r7).- Returns:
- The current register values (r0…r7)
-
getProcessorStateRegister
public int getProcessorStateRegister()Returns The value in the processor state register (PSR).- Returns:
- The value in the processor state register (PSR)
-
getStackPointer
public int getStackPointer()Returns The current stack pointer value (SP).- Returns:
- The current stack pointer value (SP)
-
getLinkRegister
public int getLinkRegister()Returns The current link register value (LR).- Returns:
- The current link register value (LR)
-
getRunTimeError
Returns The reason for a run time error.- Returns:
- The reason for a run time error
-
getPhysicalCPUID
public byte getPhysicalCPUID()Returns The physical ID of this processor.- Returns:
- The physical ID of this processor
-
getState
Returns The current state of the core.- Returns:
- The current state of the core
-
getApplicationID
public int getApplicationID()Returns The ID of the application running on the core.- Returns:
- The ID of the application running on the core
-
getApplicationMailboxDataAddress
public int getApplicationMailboxDataAddress()Returns The address of the data in SDRAM for the application mailbox.- Returns:
- The address of the data in SDRAM for the application mailbox
-
getMonitorMailboxDataAddress
public int getMonitorMailboxDataAddress()Returns The address of the data in SDRAM of the monitor mailbox.- Returns:
- The address of the data in SDRAM of the monitor mailbox
-
getApplicationMailboxCommand
Returns The command currently in the mailbox being sent from the monitor processor to the application.- Returns:
- The command currently in the mailbox being sent from the monitor processor to the application
-
getMonitorMailboxCommand
Returns The command currently in the mailbox being sent from the application to the monitor processor.- Returns:
- The command currently in the mailbox being sent from the application to the monitor processor
-
getSoftwareErrorCount
public short getSoftwareErrorCount()Returns The number of software errors counted.- Returns:
- The number of software errors counted
-
getSoftwareSourceFilenameAddress
public int getSoftwareSourceFilenameAddress()Returns The address of the filename of the software source.- Returns:
- The address of the filename of the software source
-
getSoftwareSourceLineNumber
public int getSoftwareSourceLineNumber()Returns The line number of the software source.- Returns:
- The line number of the software source
-
getTime
public int getTime()Returns The time at which the application started, in seconds since 00:00:00 GMT on 1 January 1970.- Returns:
- The time at which the application started, in seconds since 00:00:00 GMT on 1 January 1970
-
getApplicationName
Returns The name of the application running on the core.- Returns:
- The name of the application running on the core
-
getIobufAddress
public int getIobufAddress()Returns The address of the IOBUF buffer in SDRAM.- Returns:
- The address of the IOBUF buffer in SDRAM
-
getSoftwareVersion
public int getSoftwareVersion()Returns The software version.- Returns:
- The software version
-
getUser
public int[] getUser()Returns The current user values (user0…user3).- Returns:
- The current user values (user0…user3)
-
getUser
public int getUser(int index) Get the current user value.- Parameters:
index- Which index in the user array to read. Must be in range 0 to 3 (inclusive).- Returns:
- The current user value (userindex).
-
toString
Returns A string representation of this CPU info. -
getStatusDescription
Returns A description of the state.- Returns:
- A description of the state
-