Class SDRAMAlloc
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
uk.ac.manchester.spinnaker.messages.scp.SCPRequest<SDRAMAlloc.Response>
uk.ac.manchester.spinnaker.messages.scp.SDRAMAlloc
- All Implemented Interfaces:
SerializableMessage
A request to allocate space in the SDRAM space. The response payload is
the location of the block of allocated memory.
Calls cmd_alloc() (and hence sark_xalloc()) in
scamp-cmd.c.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected final classAn SCP response to a request to allocate space in SDRAM. -
Field Summary
Fields inherited from class uk.ac.manchester.spinnaker.messages.scp.SCPRequest
argument1, argument2, argument3, BOOT_CHIP, BOOT_MONITOR_CORE, data, NO_DATA, scpRequestHeaderFields inherited from class uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
sdpHeader -
Constructor Summary
ConstructorsConstructorDescriptionSDRAMAlloc(HasChipLocation chip, AppID appID, int size) SDRAMAlloc(HasChipLocation chip, AppID appID, int size, int tag) -
Method Summary
Modifier and TypeMethodDescriptiongetSCPResponse(ByteBuffer buffer) Parse the response to this message.Methods inherited from class uk.ac.manchester.spinnaker.messages.scp.SCPRequest
addToBufferMethods inherited from class uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
getMessageData
-
Constructor Details
-
SDRAMAlloc
- Parameters:
chip- the chip to allocate onappID- The ID of the applicationsize- The size in bytes of memory to be allocated
-
SDRAMAlloc
- Parameters:
chip- the chip to allocate onappID- The ID of the applicationsize- The size in bytes of memory to be allocatedtag- 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- Throws:
IllegalArgumentException- If a bad tag is given.
-
-
Method Details
-
getSCPResponse
public SDRAMAlloc.Response getSCPResponse(ByteBuffer buffer) throws UnexpectedResponseCodeException, MemoryAllocationFailedException Description copied from class:SCPRequestParse the response to this message.- Specified by:
getSCPResponsein classSCPRequest<SDRAMAlloc.Response>- Parameters:
buffer- The buffer to parse.- Returns:
- The message response.
- Throws:
UnexpectedResponseCodeExceptionMemoryAllocationFailedException
-