Class Processor
java.lang.Object
uk.ac.manchester.spinnaker.machine.Processor
- All Implemented Interfaces:
Comparable<Processor>
A processor object included in a SpiNNaker chip.
Note: There is no public constructor; instead use a static factory method.
- Author:
- Christian-B
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
The clock speed of the processor in cycles per second.final int
The amount of DTCM available on this processor.final boolean
Determines if the processor is the monitor, and therefore not to be allocated.final @uk.ac.manchester.spinnaker.machine.ValidP int
The ID of the processor. -
Method Summary
Modifier and TypeMethodDescriptionProvides a clone of this processor but changing it to a system processor.int
int
The number of CPU cycles available from this processor per millisecond.boolean
static Processor
factory
(int processorId) Obtain a non-monitor processor object for this ID.static Processor
factory
(int processorId, boolean isMonitor) Obtain a processor object for this ID, which could be a monitor.static Processor
factory
(int processorId, int clockSpeed, int dtcmAvailable, boolean isMonitor) Obtain a processor for this ID and with these properties.int
hashCode()
toString()
-
Field Details
-
processorId
The ID of the processor. -
clockSpeed
public final int clockSpeedThe clock speed of the processor in cycles per second. -
isMonitor
public final boolean isMonitorDetermines if the processor is the monitor, and therefore not to be allocated. -
dtcmAvailable
public final int dtcmAvailableThe amount of DTCM available on this processor.
-
-
Method Details
-
cpuCyclesAvailable
public int cpuCyclesAvailable()The number of CPU cycles available from this processor per millisecond.- Returns:
- The number of CPU cycles available from this processor per ms.
-
cloneAsSystemProcessor
Provides a clone of this processor but changing it to a system processor.- Returns:
- A different Processor with all the same parameter values EXCEPT
isMonitor
which will always be true.
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Processor>
-
factory
public static Processor factory(int processorId, int clockSpeed, int dtcmAvailable, boolean isMonitor) throws IllegalArgumentException Obtain a processor for this ID and with these properties.- Parameters:
processorId
- ID of the processor in the chip.clockSpeed
- The number of CPU cycles per second of the processor.dtcmAvailable
- Data Tightly Coupled Memory (DTCM) available.isMonitor
- Determines if the processor is considered the monitor processor, and so should not be otherwise allocated.- Returns:
- A Processor object with these properties
- Throws:
IllegalArgumentException
- If a nonsense parameter is given.
-
factory
Obtain a processor object for this ID, which could be a monitor.- Parameters:
processorId
- ID of the processor in the chip.isMonitor
- Determines if the processor is considered the monitor processor, and so should not be otherwise allocated.- Returns:
- A default processor object with this ID and monitor state
-
factory
Obtain a non-monitor processor object for this ID.- Parameters:
processorId
- ID of the processor in the chip.- Returns:
- A default processor object with this ID
-