java.lang.Object
uk.ac.manchester.spinnaker.messages.model.CPUInfo
All Implemented Interfaces:
HasChipLocation, HasCoreLocation

@SARKStruct("vcpu")
public class CPUInfo
extends Object
implements HasCoreLocation
Represents information about the state of a CPU.
  • Constructor Details

    • CPUInfo

      public CPUInfo​(HasCoreLocation location, ByteBuffer buffer)
      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()
      Specified by:
      getX in interface HasChipLocation
      Returns:
      The X coordinate of the chip.
    • getY

      public int getY()
      Specified by:
      getY in interface HasChipLocation
      Returns:
      The Y coordinate of the chip.
    • getP

      public int getP()
      Specified by:
      getP in interface HasCoreLocation
      Returns:
      The processor coordinate of the core on its chip.
    • getRegisters

      public int[] getRegisters()
      Returns:
      The current register values (r0…r7).
    • getProcessorStateRegister

      public int getProcessorStateRegister()
      Returns:
      The value in the processor state register (PSR).
    • getStackPointer

      public int getStackPointer()
      Returns:
      The current stack pointer value (SP).
    • getLinkRegister

      public int getLinkRegister()
      Returns:
      The current link register value (LR).
    • getRunTimeError

      public RunTimeError getRunTimeError()
      Returns:
      The reason for a run time error.
    • getPhysicalCPUID

      public byte getPhysicalCPUID()
      Returns:
      The physical ID of this processor.
    • getState

      public CPUState getState()
      Returns:
      The current state of the core.
    • getApplicationID

      public int getApplicationID()
      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.
    • getMonitorMailboxDataAddress

      public int getMonitorMailboxDataAddress()
      Returns:
      The address of the data in SDRAM of the monitor mailbox.
    • getApplicationMailboxCommand

      public MailboxCommand getApplicationMailboxCommand()
      Returns:
      The command currently in the mailbox being sent from the monitor processor to the application.
    • getMonitorMailboxCommand

      public MailboxCommand getMonitorMailboxCommand()
      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.
    • getSoftwareSourceFilenameAddress

      public int getSoftwareSourceFilenameAddress()
      Returns:
      The address of the filename of the software source.
    • getSoftwareSourceLineNumber

      public int getSoftwareSourceLineNumber()
      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.
    • getApplicationName

      public String getApplicationName()
      Returns:
      The name of the application running on the core.
    • getIobufAddress

      public int getIobufAddress()
      Returns:
      The address of the IOBUF buffer in SDRAM.
    • getSoftwareVersion

      public int getSoftwareVersion()
      Returns:
      The software version.
    • getUser

      public int[] getUser()
      Returns:
      The current user values (user0…user3).
    • getUser

      public int getUser​(int index)
      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

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of this CPU info.
    • getStatusDescription

      public String getStatusDescription()
      Returns:
      A description of the state.