fpe_write_dma(3) CLIX fpe_write_dma(3)
NAME
fpe_write_dma, fpe_write_dma_nw - Write data to a Floating Point Engine
(FPE) coprocessor
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/types.h>
#include <sys/immu.h>
#include <sys/xio/xio.h>
#include <sys/xio/xerr.h>
#include <sys/xio/xfpe.h>
int fpe_write_dma(
int fpeno ,
char *dbuf ,
int dcnt ,
int timeout ,
int *xfcnt );
int fpe_write_dma_nw(
int fpeno ,
char *dbuf ,
int dcnt ,
int timeout ,
struct xiosb *xiosb ,
int efn );
PARAMETERS
fpeno A Floating Point Engine number
dbuf A pointer to the buffer containing the data to be written
dcnt The size of the buffer containing data to be written
timeout The number of 1/60 second intervals before halting an active
transfer.
xfcnt The number of bytes written
xiosb A pointer to an xiosb structure
2/94 - Intergraph Corporation 1
fpe_write_dma(3) CLIX fpe_write_dma(3)
efn The event flag associated with the transfer request
DESCRIPTION
The fpe_write_dma() function transfers data to a Floating-Point Engine
(FPE) coprocessor. The value of fpeno, obtained by fpe_coproc_alloc(), is
the number of the FPE which receives the data.
The dbuf parameter points to the buffer containing the data to be written
to the FPE. The dcnt is the size (in bytes) of dbuf. The buffer must be
longword aligned and have a size that is a multiple of 4 bytes.
The timeout parameter is the number of 1/60 second intervals
fpe_write_dma() waits before halting an active transfer. A value of 0
disables the timeout feature.
Upon completion of the synchronous request, the integer pointed to by
xfcnt is updated with the number of bytes successfully written to the FPE.
The fpe_write_dma_nw() function is the asynchronous version of
fpe_write_dma(), providing the same capability without waiting for
completion of the request. The efn parameter specifies the event flag
number associated with the request. The xiosb parameter is a pointer to
the xiosb structure updated upon completion of the request (see intro(3)).
The xfcnt member of the xiosb structure indicates the number of bytes
successfully written to the FPE.
RETURN VALUES
Upon successful completion of the synchronous request, a value of 0 is
returned. Otherwise, one of the following failure codes is returned.
If the asynchronous request is accepted by the XIO system, a value of 0
will be returned by the request. Otherwise, XIO_FAILURE will be returned.
Upon completion of an accepted request, the status member of the xiosb
structure will be set to either 0 if successful, or to one of the
following failure codes if unsuccessful.
ERRORS
The fpe_write_dma() and fpe_write_dma_nw() functions will fail if one of
the following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request or efn is invalid.
[FPE_NOT_PRESENT]
The value of fpeno specifies an FPE that is not in the system.
[FPE_NOT_OWNER]
2 Intergraph Corporation - 2/94
fpe_write_dma(3) CLIX fpe_write_dma(3)
The value of fpeno specifies an FPE that is not currently allocated
by the process.
[BAD_DATA_BUFFER_ADDRESS]
The dbuf parameter points to buffer that is not longword aligned or
is to an invalid memory space.
[BAD_DATA_BUFFER_SIZE]
Dcnt is not a multiple of 4 bytes.
[PAGE_LOCK_FAILED]
The system is unable to lock down all the pages needed to satisfy
the request.
[FPE_DMA_CANCELED]
A call to fpe_dma_cancel() canceled the request.
[FPE_DMA_TIMEOUT]
A timeout occurred before the request completed.
RELATED INFORMATION
Functions: fpe_coproc_alloc(3), fpe_cancel_dma(3), intro(3)
Files: xfpe(7)
2/94 - Intergraph Corporation 3