
152
(c) Spectrum Instrumentation GmbH
Reading out ABA data
ABA mode (dual timebase)
Reading out ABA data
General
The slow „A“ data is stored in an additional FIFO that is located in hardware on the card. This additional FIFO can read out slow „A“ data
using DMA transfer similar to the DMA transfer of the main sample data DMA transfer. The card has three completely independent busmaster
DMA engines in hardware allowing the simultaneous transfer of both „A“ and sample data, as well as optionally timestamp data. The sample
data itself is read out as explained before using the standard DMA routine.
As seen in the picture there are separate FIFOs holding ABA and timestamp data.
Although an M4i is shown here, this applies to M4x and M2p cards as well. Each FIFO has its own DMA channel, the way data is handled
by the DMA engine is similar for both kinds of extra FIFOs and is also very similar to the main sample data transfer engine. Therefore addi
-
tional information can be found in the chapter explaining the main data transfer.
Commands and Status information for extra transfer buffers.
As explained above the data transfer is performed with the same command and status registers like the card control and sample data transfer.
It is possible to send commands for card control, data transfer and extra FIFO data transfer at the same time
The extra FIFO data transfer can generate one of the following status information:.
Data Transfer using DMA
Data transfer consists of two parts: the buffer definition and the commands/status information that controls the transfer itself. Extra data transfer
shares the command and status register with the card control, data transfer commands and status information.
The DMA based data transfer mode is activated as soon as the M2CMD_EXTRA_STARTDMA is given. Please see next chapter to see how
the polling mode works.
Table 87: Spectrum API: extra DMA commands (ABA and Timestamp)
Register
Value
Direction
Description
SPC_M2CMD
100
write only
Executes a command for the card or data transfer
M2CMD_EXTRA_STARTDMA
100000h
Starts the DMA transfer for an already defined buffer.
M2CMD_EXTRA_WAITDMA
200000h
Waits until the data transfer has ended or until at least the amount of bytes defined by notify size are available. This
wait function also takes the timeout parameter into account.
M2CMD_EXTRA_STOPDMA
400000h
Stops a running DMA transfer. Data is invalid afterwards.
M2CMD_EXTRA_POLL
800000h
Polls data without using DMA. As DMA has some overhead and has been implemented for fast data transfer of large
amounts of data it is in some cases more simple to poll for available data. Please see the detailed examples for this
mode. It is not possible to mix DMA and polling mode.
Table 88: Spectrum APUI: extra DMA status (ABA and Timestamp)
Register
Value
Direction
Description
SPC_M2STATUS
110
read only
Reads out the current status information
M2STAT_EXTRA_BLOCKREADY
1000h
The next data block as defined in the notify size is available. It is at least the amount of data available but it also can
be more data.
M2STAT_EXTRA_END
2000h
The data transfer has completed. This status information will only occur if the notify size is set to zero.
M2STAT_EXTRA_OVERRUN
4000h
The data transfer had on overrun (acquisition) or underrun (replay) while doing FIFO transfer.
M2STAT_EXTRA_ERROR
8000h
An internal error occurred while doing data transfer.
Image 70: Overview of acquisition data, ABA data and timestamp data DMA transfer
Summary of Contents for M2p.59 Series
Page 190: ......