Sequence Replay Mode
Programming
(c) Spectrum GmbH
109
Programming
Programming of the sequence mode is done using the known driver interface with the addition of a few new registers.
Gathering information
If the sequence mode is installed on the card, the different details and limits of the sequence programming can be read out:
Setting up the registers
Define the card mode
To enable the sequencer the card mode needs to be set appropriately first:
Prepare the data memory
Setting up the segmentation of the on-board data memory is done by using the following registers:
Due to the internal organization of the card memory there is a certain minimum, maximum and stepsize when setting the segmentsize for the
sequence memory. The following table gives you an overview of all limits. The table shows all values in relation to the installed memory size
in samples. If more memory is installed the maximum memory size figures will increase according to the complete installed memory:
For analog generator cards
For Digital I/O cards
Register
Value
Direction
Description
SPC_PCIFEATURES
2120
read only
PCI feature register. Holds the installed features and options as a bit field. The return value must be
masked out with one of the masks below to get information about one certain feature.
SPCM_FEAT_SEQUENCE
1000h
Replay sequence mode available (only available for arbitrary generator and digital I/O cards).
Register
Value
Direction
Description
SPC_SEQMODE_AVAILMAXSEGMENT
349900
read only
Returns the maximum number of segments the memory can be divided into. Please note that only
dividers with a power of 2 are possible return values.
SPC_SEQMODE_AVAILMAXSTEPS
349901
read only
Returns the maximum number of sequence steps that can be used on this card.
SPC_SEQMODE_AVAILMAXLOOP
349902
read only
Returns the maximum number of loops that can be programmed for a step.
SPC_SEQMODE_AVAILFEATURES
349903
read only
Returns the available features for each sequence step as shown below:
SPCSEQ_ENDLOOPONTRIG
40000000h
The step runs endless until a trigger is received. If no trigger has been detected, the step will enter itself again, count-
ing down its own loops and check for a trigger again. For a minimum reaction time on an external trigger event it is
good practice to set the loop parameter to 1 in the step checking for the trigger.
SPCSEQ_END
80000000h
This sequence step is the end of the sequence. The card is stopped somewhere inside this step.
Register
Value
Direction
Description
SPC_CARDMODE
9500
read/write
Defines the used operating mode.
SPC_REP_STD_SEQUENCE
40000h
Data generation from on-board memory, by splitting the memory into several segments and replaying the data using
a programmable order coming from a special sequence memory.
Register
Value
Direction
Description
SPC_SEQMODE_MAXSEGMENTS
349910
read/write
Programs the number of segments the on-board memory should be divided into. If changing the
number of segments all information that has been stored before is lost and all sequence data and all
sequence setup has to be written again. Only a power of two is allowed, but not all of the segments
must be actually used in the sequence.
If reading this register the number of segments the memory is currently divided into is returned.
SPC_SEQMODE_WRITESEGMENT
349920
read/write
Defines the current segment to be addressed by the user. Must be programmed prior to changing any
segment parameters.
SPC_SEQMODE_SEGMENTSIZE
349940
read/write
Defines the number of valid/to be replayed samples for the current selected memory segment.
For cards with 14 bit converter resolution
For cards with 8 bit converter resolution
Activated
Pattern size for register
Pattern size for currently register
Channels
SPC_SEQMODE_SEGMENTSIZE
SPC_SEQMODE_SEGMENTSIZE
Min
Max
Step
Min
Max
Step
1 channel
32
(Mem/1) / SPC_SEQMODE_MAXSEGMENTS)
8
48
(Mem/1) / SPC_SEQMODE_MAXSEGMENTS)
16
2 channels
32
(Mem/2) / SPC_SEQMODE_MAXSEGMENTS)
8
48
(Mem/2) / SPC_SEQMODE_MAXSEGMENTS)
16
4 channels
32
(Mem/4) / SPC_SEQMODE_MAXSEGMENTS)
8
48
(Mem/4) / SPC_SEQMODE_MAXSEGMENTS)
16
For cards with 8 bit converter resolution
Activated
Pattern size for currently selected segment
Channels
SPC_SEQMODE_SEGMENTSIZE
Min
Max
Step
1
2
Not allwed
4
8
48
(Mem/1) / SPC_SEQMODE_MAXSEGMENTS)
16
16
32
(Mem/2) / SPC_SEQMODE_MAXSEGMENTS)
8
32
32
(Mem/4) / SPC_SEQMODE_MAXSEGMENTS)
4
64
32
(Mem/8) / SPC_SEQMODE_MAXSEGMENTS)
4