Embedded Solutions
Page 16
Programming
Programming the PcieBiSerialDb37BA22 requires only the ability to read and write data
in the host's PCIe space.
Once the initialization process has occurred, and the system has assigned addresses to
the PcieBiSerialDb37BA22 card the software will need to determine what the address
space is for the PCI interface [BAR0]. The offsets in the address tables are relative to
the system assigned BAR0 base address.
The next step is to initialize the PcieBiSerialDb37BA22. The PLL will need to be
programmed to use the loop-back function or to transmit in the system. The Cypress
CyberClocks software can be used to create new .JED files if desired. PLLA should be
set to the transmit reference frequency output by the transmitter.
The driver comes with a .JED file prepared. The driver has a utility to load the PLL and
read back. The reference application software has an example of the use of PLL
programming. The reference application software also includes XLATE.c which
converts the .JED file from the CyberClocks tool to an array that can be programmed
into the PLL.
The IO for the BA22 direction and termination are hardwired in this design. The ports
are unidirectional and initialization is simplified with this approach.
The control bits for the BA22 will select how the data is transmitted – ordering, size of
transfer etc.
For Windows XP™ systems the Dynamic Driver can be used. The driver will take care
of finding the hardware and provide an easy to use mechanism to program the
hardware. The Driver comes with reference software showing how to use the card and
reference frequency files to allow the user to duplicate the test set-up used in
manufacturing at Dynamic Engineering. Using simple, known to work routines is a good
way to get acquainted with new hardware.
To use the BA22 specific functions the Channel Control, and PLL interface plus DMA
will need to be programmed. To use DMA, memory space from the system should be
allocated and the link list stored into memory. The location of the link list is written to
the BA22 to start the DMA. Please refer to the Burst IN and Burst Out register
discussions.
DMA should be set-up before starting the channel port function. For transmission this
will result in the FIFO being full or close to it when the transfer is started or at least the