Hardware and Software Design • Manufacturing Services
page 38
In Capture mode the Address Generator hardware waits for the combination of an active channel request [start]
and the half full status true condition from the corresponding input channel. When data is present the state
machine will begin to transfer the data from the input FIFO to the SDRAM. The transfers occur with burst
accesses as much as possible. The state machine loops, checking each channel for activity, then refreshing and
looping again until all channels are completed. The Input FIFO is filled based on the LVDS data and the tag bit
definitions.
The Address Generator should be programmed for the active channel(s). The starting address and length first
then the start commands. Once the Address generators are started the FE devices can be programmed and
started. The FE registers should be programmed for length, clock selection, deserializer enable, tag bits, parity
and so forth first. The start bit can be set once the other registers and any required delay for the deserializer
taken care of. If the DMA Xilinx is programmed to generate an interrupt based on the done bits then the host will
be interrupted when the various channels complete. Alternatively the done bits can be polled.
In Retrieve mode the data is read from the SDRAM and written to the output FIFO. Data is transferred 256 long
words to a burst. The state machine will keep from just under 1/2 full to full in the output FIFO by monitoring the
HF flag and bursting when there is room. The DMA controller will attempt to empty the FIFO to the PCI bus at the
same time. The Address generator has the advantage of 2X bandwidth and will be able to keep the DMA process
from running out of data. Channel 0 is used to Retrieve data from the SDRAM for channels 0-3 and channel 4 is
used to control Retrieve for channels 4-7.
First the DMA Xilinx is programmed to select the correct channel and mode. The Output FIFO should be reset if
not empty. The Address Generator should be programmed for channel 0 or 4. The starting address and length
first then the start commands. Once the Address generators are started the data will be transferred to the
Output FIFO on a space available basis. If DMA is used the PLX will start the transfer by getting the scatter gather
from host memory then reading from the DMA address in the DMA Xilinx. The transfer will continue until the
scatter gather list is exhausted. Any number of longwords can be moved from the SDRAM to the PCI bus. The
count in the PLX device will control the total length. If more data is in the scatter gather list than is requested
from the Address Generator the last data will be repeated until the list is completed…be careful to program the
length properly to match the 64 bit count with the byte count that the PLX uses.