Differences between ADMXRC2 and ADMXRC interfaces
The major differences between the ADMXRC2 and ADMXRC interfaces are as follows:
- The ADMXRC2_InstallErrorHandler function has been simplified in the interests of API reliability. The API no longer treats an installed error handler routine as a critical section. It is now the application programmer's responsibility to ensure that problems do not occur if the installed error handler function is called from multiple threads.
- The ADMXRC2_LoadBitstream and ADMXRC2_UnloadBitstream functions replace the ADMXRC_FindImageOffset, ADMXRC_LoadFpgaFile, ADMXRC_ReverseBytes and ADMXRC_UnloadFpgaFile functions. The ADMXRC2_LoadBitstream function loads only the SelectMap data into memory, reversing its bit order if necessary, instead of requiring the application to make several API calls to prepare the SelectMap data. The data loaded by ADMXRC2_LoadBitstream can be sent without modification to the FPGA's SelectMap port.
- The ADMXRC2_OpenCard function can open an instance of any of the following models: ADM-XRC, ADM-XRC-P, ADM-XRC-II-Lite, ADM-XRC-II, ADM-XPL, ADM-XP, ADP-DRC-II, ADP-WRC-II, ADP-XPI, ADM-XRC-4LX, ADM-XRC-4SX, ADM-XRC-4FX, ADM-XRC-5LX and ADM-XRC-5T1. ADMXRC_OpenCard can open only instances of the ADM-XRC or ADM-XRC-P models.
- The ADMXRC2_OpenCardByIndex function, not present in the ADMXRC interface, can open a card based on its index within the system as opposed to its Card ID.
- Functions in the ADMXRC2 interface that require a parameter that specifies the DMA channel to use, accept an unsigned int value for the DMA channel, whereas the ADMXRC interface functions used an enumerated type. The following functions from the ADMXRC2 interface are affected:
- There is no function equivalent to ADMXRC_GetClockType in the ADMXRC2 interface. This is because applications should not rely on a particular reference oscillator being fitted to a card (there may not be one at all), and the API takes care of programming the clock generators on a card.
- The ADMXRC_ReadReg and ADMXRC_WriteReg functions are not present in the ADMXRC2 interface as ADMXRC2_Read and ADMXRC2_Write with the appropriate parameters achieve the same effect.
- The ADMXRC2_ReadConfig and ADMXRC2_WriteConfig functions are new to the ADMXRC2 interface, and allow the configuration EEPROM on a card to be read and written.
- The ADMXRC2_GetSpaceInfo function is equivalent to ADMXRC_GetBaseAddress from the ADMXRC interface.
- The ADMXRC_CARD_INFO structure of the ADMXRC interface has been replaced by the ADMXRC2_CARD_INFO , ADMXRC2_SPACE_INFO and ADMXRC2_BANK_INFO structures of the ADMXRC2 interface. The latter two structures offer an increased level of abstraction of hardware features. The virtual address of the FPGA space must now be obtained using ADMXRC2_GetSpaceInfo.
- The ADMXRC2_SetClockRate function differs from ADMXRC_SetClockRate in two ways:
- The Clock parameter is now an integer as opposed to a member of an enumerated type. The value 0 always represents the local bus clock.
- A parameter Actual has been added, which can return the actual clock frequency programmed.