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
public class SDRAMAlloc extends SCPRequest<SDRAMAlloc.Response>
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 Classes Modifier and Type Class Description protected class
SDRAMAlloc.Response
An 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, scpRequestHeader
-
Constructor Summary
Constructors Constructor Description SDRAMAlloc(HasChipLocation chip, AppID appID, int size)
SDRAMAlloc(HasChipLocation chip, AppID appID, int size, int tag)
-
Method Summary
Modifier and Type Method Description SDRAMAlloc.Response
getSCPResponse(ByteBuffer buffer)
Parse the response to this message.Methods 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, MemoryAllocationFailedExceptionDescription copied from class:SCPRequest
Parse the response to this message.- Specified by:
getSCPResponse
in classSCPRequest<SDRAMAlloc.Response>
- Parameters:
buffer
- The buffer to parse.- Returns:
- The message response.
- Throws:
UnexpectedResponseCodeException
MemoryAllocationFailedException
-