Download Coherent Accelerator Processor Interface User`s Manual

Transcript
User’s Manual
Coherent Accelerator Processor Interface
Advance
Bits
Field Name
Description
16:31
Status
Status.
The status field in the sw_command_status word must always be set to x‘0000’ by system software.
The PSL should only update this field when setting the completion status. The most significant bit
being set indicates an error. For example, a status of x‘8001’ indicates that there was an error terminating a process element.
x‘0000’ Operation pending.
x‘0001’ Process element has been terminated.
x‘0002’ Safe to remove process element from the linked list.
x‘0003’ Process element has been suspended and all outstanding operations are complete.
x‘0004’ Execution of the process element has been resumed.
x‘0005’ PSL acknowledgment of added process element.
x‘0006’ PSL acknowledgment of updated process element.
‘1ccc cccc cccc cccc’ Indicates an error with the requested command indicated by the “c” field.
All other values are reserved.
32:47
PSL_ID
PSL identifier.
The PSL identifier is used to select which PSL assigned to service the scheduled processes must
perform the operation. When the sw_command_status word is written by system software, the
PSL_ID must be the first in the list of PSLs assigned to service the processes. Each PSL has the ID
of the next PSL in the list and forwards the command to the next PSL in the psl_chained_command
if required.
48:63
Link
Process element link.
The process element link is the offset from the SPA_Base, shifted right by 7 bits, of the process element to operate on.
3.4 Process Management
In the shared programming model, the PSL switches between the processes scheduled to use the AFUs by
system software. This section describes the procedures for both system software and the PSLs for scheduling, descheduling, and terminating processes.
To schedule a process for an AFU, system software adds a process element entry to the linked list in system
storage. Once added, the PSL starts the new process at the next available context interval for a time-sliced
programming model or at an implementation-dependent point in time for an AFU-directed programming
model.
For the time-sliced programming models, any newly added processes are placed into a circular queue maintained by the PSL, referred to as the psl_queue. Process elements are pulled from the psl_queue in a roundrobin order by one or more CAIA-compliant devices to be run.
When a process element completes, system software is responsible for removing the process element and
updating the link list before allocating the process element to another processes.
To terminate a process element, system software first sets the system software state field in the process
element to indicate that the process element is being terminated. Next, system software issues a termination
command to the PSLs, which initiates a sequence of operation to remove the process element from the PSL
queue. The termination pending status is needed to prevent a PSL from starting or resuming the process
while the corresponding process entry is being removed from the PSL queue.
Programming Models
Page 38 of 101
Version 1.2
29 January 2015