Home

C/C++ Communication API - Electronic Systems Group

image

Contents

1. Figure 4 DIME_GetError example 7 37 DIME_GetLocateVersionNumber Syntax DWORD DIME_GetLocateVersionNumber void Arguments N A Return Returns the version number of the locate unit within the FUSE software Returns a0 on an error Description Gets the version number of the locate unit within the FUSE software 7 38 DIME_GetVersionNumber Syntax DWORD DIME_GetVersionNumber DIME_HANDLE CardHandle Arguments CardHandle If this argument is NULL then the version number for the FUSE SDL software is returned If this is a valid card handle then the returned version number is the version number for the FUSE card driver Return Returns a version number Description Gets the version number of the installed software 7 39 DIME InterruptControl Syntax DWORD DIME_InterruptControl DIME_HANDLE handle DWORD InterruptFlags DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card InterruptFlags This is used to specify which interrupt the function is to address See Table 19 for details of the available InterruptFlags Please check your motherboards user guide for details on what interrupts are available CmdMode This argument is used to specify what function is to be performed The table below gives details of the available command modes CmdMode Description dintENABLE This is enable the selected interrupt Returns zero on success non zero otherwise dintDISABLE T
2. Table 41 Type Cardinfo members Description This function is used to return system status information that cannot be returned using DIME_SystemStatus Example 72 www nallatech com NT107 0068 Issue 4 19 05 2003 PU _ z FUSE C C API Developers Guide DWORD i SWMBInfo pSWMBInfo Using the DIME SystemStatusPtr function if pSWMBInfo SWMBInfo DIME SystemStatusPtr 0 dinfDIME SWMBTS NULL printf The software detects d motherboards n pSWMBInfo gt NumTypes for i 0 i lt pSWMBInfo gt NumTypes i printf Details of mothreboard number d of d follows n 1 i pSWMBInfo gt NumTypes printf tMotherboard type d n pSWMBInfo gt pCardInfo i MotherBoardType printf tMotherboard description s n pSWMBInfo gt pCardInfo i MotherBoardDesc Figure 10 DIME_SystemStatusPtr example 7 71 DIME_UnLockMemory Syntax DWORD DIME_UnLockMemory DIME_HANDLE handle DIME_MEMHANDLE MemHandle Arguments handle is a valid handle to the DIME carrier card that performed the DIME_LockMemory MemHandle is the valid memory handle that needs to be unlocked Return Returns zero on success non zero otherwise Description This unlocks memory and gives control of the memory back to the OS kernel Example See Figure 8 Locking and Unlocking memory for DMA transfers 7 72 DIME_WriteLEDs Syntax void DIME_WriteLEDs DIME_HANDLE handle DWORD Value Arguments handle is a vali
3. printf failed to enable the on baord FPGA interrupt n Wait for the interrupt if Answer DIME InterruptControl hCard dintONBOARDFPGA dintWAIT dintBLOC ING 0 K printf On board interrupt received n printf Error while waiting for the on board FPGA interrupt n Disable the interrupt if Answer DIME InterruptControl hCard dintONBOARDFPGA dintDISABLE dintBLOCKING 0 prin else prin tf Disabled the on board FPGA interrupt n tf Failed to disable the on board FPGA interrupt n Figure 5 Interrupt Example using DIME_InterruptControl 7 40 DIME InterruptStatus Syntax Arguments DWORD DIME_InterruptStatus DIME_HANDLE handle DWORD InterruptFlags DWORD CmdMode handle is a valid handle to a DIME carrier card InterruptFlags This is used to specify which interrupt the function is to address The table below gives details of the available InterruptFlags dintONBOARDFPGA This is on board FPGA interrupt pin dintMODULEI This is the interrupt for Module dintMODULE2 This is the interrupt for Module 2 dintMODULE3 This is the interrupt for Module 3 dintMODULE4 This is the interrupt for Module 4 dintALL This is the flag for all the above interrupts www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Table 19 InterruptFlags argument options Please check your motherboards
4. Table 31 DIME_ModuleStatus CmdMode argument options Return The return value is dependant upon the command mode Returns on error Description This function returns module status information 7 56 DIME_ModuleStatusPtr Syntax void DIME_ModuleStatusPtr DIME_ HANDLE handle DWORD ModuleNum DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ModuleNum is the module that is being addressed Note modules are numbered from 0 CmdMode This argument is used to specify what particular aspect of module status information is to be returned The table below gives details of the available command modes CmdMode Description dinflMAGEFILENAME This command mode returns a string char which is the image filename for the module dinflCONFILENAME This command mode returns a string char which is the icon filename for the module dinfDESCRIPTION This command mode returns a string char which is a short description of the module Table 32 DIME_ModuleStatusPtr CmdMode argument options Return The return value is dependant upon the command mode Returns NULL on error Description This function returns card status information that cannot be returned using DIME_ModuleStatus Notes If a pointer to a string is returned this string is only valid until the next call is made into the library It is therefore advised that either the string is used directly or that it is copied for later use
5. The Timeout specifies the maximum period of inactivity that is acceptable during a DMA transfer If this value is exceeded then the DMA transfer is deemed to have failed and is terminated If the timeout value is set to zero then the timeout is effectively infinite The default value for DMA timeouts is 5000milli seconds which is set every time a DMA handle is created using DIME_DMAOpen Returns 0 on success ddmaCURRCOUNT This is used to set the address of where the current total of words transferred is to be stored ddmaPOLLED This is used to set all future DMA transfers on this channel to be polled rather than use interrupts When the DMA channel is opened the default state is that all transfers are polling transfers and not interrupt based Returns 0 on success ddmalNTERRUPTS This is used to set all future DMA transfers on this channel to be interrupt based rather than polling When the DMA channel is opened the default state is that all transfers are polling transfers and not interrupt based Note that polling transfers are in general faster than interrupt based transfers although interrupt based transfers use less CPU time Returns 0 on success Table 13 DIME_DMAControl CmdMode argument options NT107 0068 Issue 4 19 05 2003 www nallatech com 49 FUSE C C API Developers Guide PO _ Return Returns are dependant on the selected command mode Description This function is used to control DM
6. Terminate is not used Timeout this is the maximum time in milliseconds that the transfer is allowed to take If all the data has not been transferred within this time period the transfer is terminated and an error condition is returned If this is set to zero then the timeout is effectively infinite Return There are several possible returns for the DMA transfer See Table 15 for details NT107 0068 Issue 4 19 05 2003 www nallatech com 45 FUSE C C API Developers Guide ro _ Description This handles the transfer of a single 32bit word from the PC memory pointed to by Data to the Interface connected to the on board FGPA of the DIME Motherboard Notes This function should only be used in single card systems In systems with more than one card it is strongly advised that the DIME_DMA functions are used instead 7 24 DIME_DeviceControl Syntax DWORD DIME_DeviceControl DIME_HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card ModuleNum is the Module that is being addressed Note modules are numbered from 0 DeviceNum is the number of the device that is being addressed CmdMode This argument is used to specify what particular aspect of device is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Return Returns l on error Description This functi
7. 7 57 DIME OpenCard Syntax DIME _HANDLE DIME_OpenCard LOCATE_HANDLE LocateHandle int CardNumber DWORD Flags Arguments LocateHandle is a valid handle returned from the DIME_LocateCard function 66 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide CardNumber is the index of the card within the locate handle that the developer wishes to open Flags This argument allows the open process to be customised to suit the development requirements The table below gives details for the Flags Flags Description dccOPEN_DEFAULT This is the default option for opening the card With this option the onboard oscillators will get set to their default frequencies if this is appropriate for the card See your motherboards user manual for card specific details dccOPEN_NO_OSCILLATOR_SETUP This option opens the card as in the default mode except that the onboard oscillators are not set to their default frequencies dccNOMAINPOWERON This option only applies to motherboards with programmable power supplies With this option selected upon opening the card no power is supplied to the module sites Table 33 DIME_OpenCard Flags argument options Return Returns a handle that is used when calling other functions for this card Returns NULL on error Description Calling this function opens the motherboard and performs all the required set up so that the motherboard can be interfaced with Once
8. DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD SetFlags DWORD Progress DWORD ConfigFlags Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the number of the selected module DeviceNumber is the number of the selected device Filename is the filename of the bit file that is to be assigned to this device SetFlags These are the flags for the setting of the filename Please refer to DIME_ConfigSetBitsFilename for further details Progress This is a pointer to a memory location that holds the configuration completion percentage Please refer to DIME_ConfigDevice for further details 42 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide ConfigFlags These are the flags for the configuration of the device Please refer to DIME_ConfigDevice for further details Return Returns the result of DIME_ConfigSetBitsFilename if there is an error If no error occurs in this function then it returns the result of the device configuration Description This function assigns a bit stream filename to a particular device and then configures the device using the assigned bit stream file 7 18 DIME_ConfigSetBitsMemory Syntax DWORD DIME_ConfigSetBitsMemory DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD Bits DWORD ByteLength DWORD Flags Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the number of the selected module
9. DeviceNumber is the number of the selected device Bits is a pointer to the bit stream that is to be assigned to the device ByteLength is the byte length of the bit stream Flags This argument allows the developer to configure the assignment of bit streams to devices to suit the development requirements The table below gives details for the Flags Description dcfgFREEEMBEDBITS If the device already has a bit stream assigned and this bit stream is no longer valid then using this flag will de allocate the system resources that where assigned to the embedded bit stream Table 7 DIME_ConfigSetBitsMemory Flags argument options Return Returns 0 upon success Returns non zero otherwise Description This function assigns a bit stream to the specified device Once a device has a bit stream assigned this information is stored in any card definition file that is saved Furthermore when either DIME_ConfigCard or DIME_ConfigModule is called this assigned bit stream is used to configure the device Notes This function only assigns the memory location of the bit stream to the device No configuration is carried out If the bit stream is moved or altered after it has been assigned then the bit stream will need to be re assigned to the device 7 19 DIME_ConfigSetBitsMemoryAndConfig Syntax DWORD DIME_ConfigSetBitsMemoryAndConfig DIME_HANDLE handle DWWORD ModuleNumber DWORD DeviceNumber DWORD Bits DWORD ByteLength DWORD SetFlags DWORD
10. 5 3 Device configuration examples Once a card has been opened then it is common for the developers next step to be the configuration of a device in the majority of cases this will be an FPGA This device may be on the motherboard itself or may be on a module To configure the device the developer simply needs to use one of the device configuration functions detailed in 6 8 such as DIME_ConfigOnBoardDevice or DIME_ConfigDevice There are two example programs included in the FUSE install that specifically demonstrate configuring both the on board FPGA and a modules FPGA with the LED snake design Details on the design are included in the hardware s User Guide The two example programs are Configuring the on board FPGA with ledsnake Configuring a module with ledsnake 26 www nallatech com NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide 5 4 DMA transfers examples Once a card has been opened and a design placed into the FPGA it is common that data is required to be transferred between the card and the software application When this is the case then DMA transfers are required To perform a DMA transfer a few simple steps are required Firstly if the transfer is to occur over the PCI then the memory needs to be locked down prior to the transfer This is achieved using the DIME_LockMemory function Now a DMA channel needs to be opened between the card and the PC This can be achieved using the DIME_DMAOpen function N
11. 6 Copy all the files in the system directory to your local library directory e g 20 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide gt cp system usr lib 7 Install the driver gt cd redist driver gt make install Note that the driver is a reloadable module This must be installed at start up This can be done by typing the command gt insmod windrvr or putting this command in the start up script etc profile Note also that this must be done with root privilege The device created dev windrvr has root access For other users to use it the permissions will have to be changed 8 Add the following commands to etc profile gt DIMEDATA usr local nallatech mdf or wherever you ve installed the software gt DIMEBOARDDATA usr local nallatech bdf note the final at the end of bdf but not for mdf gt LD_LIBRARY_PATH usr lib gt export DIMEDATA DIMEBOARDDATA LD_LIBRARY_PATH 9 The Fuse framework is now installed Now consult your motherboards user guide for details on how to install your specific card s Installation instructions can also be found in the Linux folder on your motherboards CD Before starting the FUSE Software you may need to reboot your PC 10 Once you reboot your PC to start the user interface goto the Fuse bin directory and type in sh fuse gt cd usr local nallatech bin gt sh fuse NT107 0068 Issue 4 19 05 2003 www nallatech com 21 FUSE C
12. C API Developers Guide PO _ 22 www nallatech com NT 107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide Part 3 Implementation Guide This part of the Developers Guide contains reference information on the FUSE API in the following Sections Section 4 General Implementation Information Section 5 Sample Programs NT107 0068 Issue 4 19 05 2003 www nallatech com 23 FUSE C C API Developers Guide PO _ 24 www nallatech com NT107 0068 Issue 4 19 05 2003 PO _ j FUSE C C API Developers Guide Section 4 General Implementation Information In this section General implementation information 4 1 General implementation information When developing with the FUSE API a few files must be added to your project to gain access to the API functions these files are dimesdl h dimesdl lib coff version of the library for inclusion in Microsoft projects dimesdlomf lib omf version of the library for inclusion in Borland projects The above files can all be found in the include directory within the FUSE install allows access to specific card functions Details of this header file will be included in the FUSE compatibility section of your motherboards user Oo For some motherboards there will be an additional header file that guide Please refer to this for further information The example designs detailed in this part of the guide have all been produced using Microsoft Visual Version 6 an
13. C API are Fast and simple device configuration Multiple card support Multiple interface support Multiple operating system support Interfacing amp control of Nallatech hardware features Generic function interface 2 3 FUSE API Details The FUSE API comes on a delivery CD marked FUSE System Software x x where x x is the version of FUSE System Software supplied The actual API is implemented as a set of Windows 32 bit DLLs or the equivalent for the target installation operating system Figure shows the layered API approach to interfacing with Nallatech hardware NT 107 0068 Issue 4 19 05 2003 www nallatech com 15 FUSE C C API Developers Guide FO _ i Application Layer High Level User interface access Developer Layer General Interface for Custom Applications Figure FUSE API Layers The hardware abstract layer interfaces with the custom Nallatech hardware and cannot be accessed by developers Access to this layer is only possible indirectly through the developer layer which effectively removes all hardware interfacing issues The interface to the hardware abstract layer is therefore not provided and is only used for internal development by Nallatech The developer layer is the main layer used by developers when interfacing with the board for custom applications It consists of a library called DIMESDL DIME Software Development Library which contains functions that are detailed later on
14. DIME_SystemControl CmdMode argument options Value This argument is used to specify the action for a command mode The table below gives details Value Description dinfDISABLE Disables the selected command mode feature dinfENABLE Enables the selected command mode feature Table 37 DIME_SystemControl Value argument options Return The return is dependant upon the command mode A return of indicates an error Description This function is used to control system features 7 69 DIME_SystemStatus Syntax DWORD DIME_SystemStatus DIME_HANDLE handle DWWORD CmdMode Arguments handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of system status information is to be returned The table below gives details of the available command modes CmdMode Description dinfDIME_MODE_GUI Returns whether dialog boxes are displayed within the SDL or whether no dialog boxes are displayed so that the calling applications can control any error message boxes A return of I indicates that the dialogue boxes will appear and a return of 0 indicates that the dialogue boxes will not appear Note that the actual error will not be altered by this function and the DIME_GetError can be used to return the error information Table 38 DIME_SystemStatus CmdMode argument options NT107 0068 Issue 4 19 05 2003 www nallatech com 71 FUSE C C API Developers Gui
15. DMA channel is being addressed The available command modes are given in the table below CmdMode Description ddmaNUMCHANNELS Used with ddmaALLDMACHANNELS Returns the number of DMA channels available for this card ddmaREADFLAGS Used with ddmaALLDMACHANNELS Returns the number of readable DMA channels for this card The return is a bit wise DWORD with a I in a particular bit position indicates that that channel is readable E g a return of 0x00000003 means that channel numbers and 2 are both readable channels ddmaWRITEFLAGS Used with ddmaALLDMACHANNELS Returns the number of writeable DMA channels for this card The return is a bit wise DWORD with a I ina particular bit position indicates that that channel is writeable E g a return of 0x00000004 means that channel number 3 is a writeable channel ddmaREADANDWRITE Used with ddmaALLDMACHANNELS Returns the number DMA channels that are both writeable and readable for this card The return is a bit wise DWWORD with a I in a particular bit position indicates that that channel is both writeable and readable E g a return of 0x00000001 means that channel number is both a readable and writeable channel ddmaREADABLE ddmaWRITABLE Returns a l if the DMAChannel is readable Returns a 0 if not Returns a l if the DMAChannel is writeable Returns a O if not ddmaACTIVE Returns a l if the DMACha
16. Progress DWORD ConfigFlags Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the number of the selected module DeviceNumber is the number of the selected device Bits is a pointer to the bit stream that is to be assigned to the device ByteLength is the byte length of the bit stream SetFlags These are the flags for the setting of the filename Please refer to DIME_ConfigSetBitsMemory for further details NT107 0068 Issue 4 19 05 2003 www nallatech com 43 FUSE C C API Developers Guide PO __ Progress This is a pointer to a memory location that holds the configuration completion percentage Please refer to DIME_MemConfigDevice for further details ConfigFlags These are the flags for the configuration of the device Please refer to DIME_MemConfigDevice for further details Return Returns the result of DIME_ConfigSetBitsMemory if there is an error If no error occurs in this function then it returns the result of the device configuration Description This function assigns a bit stream in memory to a particular device and then configures the device using the assigned bit stream 7 20 DIME_DataRead Syntax DWORD DIME_DataRead DIME _HANDLE handle DWORD Data DWORD WordCount volatile DWORD Terminate DWORD Currcount DWORD Timeout Arguments handle is a valid handle to a DIME carrier card Data is a pointer to the PC memory which receives data from the card This should be 32 bit aligned WordCou
17. Syntax Arguments Return Description 7 4 Syntax Arguments Return Description 36 DIME CardControlPtr DWORD DIME_CardControlPtr DIME_HANDLE handle DWORD CmdMode void pValue handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of card is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Returns on error This function is used to control certain aspects of the card that cannot be controlled using DIME_CardControl DIME_CardResetControl DWORD DIME_CardResetControl DIME_HANDLE handle DWORD ResetNum DWORD CmdMode DWORD Value handle is a valid handle to a DIME carrier card ResetNum This argument is used to specify which reset is to be controlled The table below gives details of available resets ResetNum Description drINTERFACE This is the reset for the interface FPGA Toggling this reset causes an internal reset of the cards interface PCI USB etc that is primarily used to clear the internal interface FIFOs of the interface FPGA drSYSTEM This is the reset for the DIME system reset This signal is typically connected to the User FPGA s and all module sites This reset is designed to allow a software controlled reset of your implemented design Toggling this reset has a minimum pulse width of 100ns Please consult your motherboar
18. The buyer agrees to execute and return any license agreements as may be required by the company in order to authorise the use of those licensable items If the licensable item is to be resold this condition shall be enforced by the re seller on the end customer Each order received by the company will be deemed to form a separate contract to which these conditions apply and any waiver or any act of non enforcement or variation of these terms or part thereof shall not bind or prejudice the company in relation to any other contract The company reserves the right to re issue its price list at any time and to refuse to accept orders at a price other than at the price stated on the price list in force at the time of order The company reserves the right to vary the specification or withdraw from the offer any of its products without prior warning The company reserves the right to refuse to accept any contract that is deemed to be contrary to the companies policies in force at the time PRICING All prices shown on the company s price list or on quotations offered by them are based upon the acceptance of these conditions Any variation of these conditions requested by the buyer could result in changes in the offered pricing or refusal to supply All quoted pricing is in Pounds Sterling and is exclusive of Value Added Tax VAT and delivery In addition to the invoiced value the buyer is liable for all import duty as may be applicable in th
19. accident air conditioning humidity control or other environmental conditions Under no circumstances will the company be liable for any incidental or consequential damage or expense of any kind including but not limited to personal injuries and loss of profits arising in connection with any contract or with the use abuse unsafe use or inability to use the companies goods The company s maximum liability shall not exceed and the customers remedy is limited to either i repair or replacement of the defective part or product or at the companies option ii return of the product and refund of the purchase price and such remedy shall be the customers entire and exclusive remedy Warranty of the software written by the company shall be limited to 90 days warranty that the media is free from defects and no warranty express or implied is given that the computer software will be free from error or will meet the specification requirements of the buyer The terms of any warranty offered by a third party whose software is supplied by the company will be honoured by the company exactly No other warranty is offered by the company on these products Return of faulty equipment after the warranty period has expired the company may at its discretion make a quotation for repair of the equipment or declare that the equipment is beyond repair PASSING OF RISK AND TITLE The passing of risk for any supply made by the company shall occur at the
20. argc char argv LOCATE HANDLE hLocate DWORD NumOfCards LoopCntr Locate the Cards on the PCI interface hLocate DIME LocateCard dlPCI mbtALL NULL dldrDEFAULT dl DEFAULT Determine how many Nallatech cards have been found NumOfCards printf sd DIME LocateStatus hLocate 0 d1NUMCARDS Nallatech card s found n NumOfCards Get the details for each card detected for LoopCntr 1 LoopCntr lt NumOfCards LoopCntr printf Details of card number d of d n LoopCntr NumOfCards printf ti d1DI printf ti1 DIME The card driver for this card is a s n char DIME LocateStatusPtr hLocate LoopCntr SCRIPTION The cards motherboard type is d n LocateStatus hLocate LoopCntr d1MBTYPE Finally close the locate down DIME CloseLocate hLocate return 0 Figure 7 Getting information on the located cards 7 47 DIME_LocateStatusPtr Syntax Arguments void DIME_LocateStatusPtr LOCATE_HANDLE handle DWORD CardNumber DWORD CmdMode handle is a valid locate handle CardNumber is the selected cards index This can be NULL for certain command modes CmdMode is the command mode for the status function This is used to specify what particular piece of information is required The table below gives details for the CmdMode argument CmdMode Description dIDESCRIPTION This returns a po
21. down other applications and retry ddmaTIMEDOUT The DMA transfer was terminated due to the transfer exceeding the specified timeout value ddmalNPROGRESS The DMA transfer is in progress ddmalINTERRUPT_ERROR The DMA transfer failed due to an error relating to the interrupts ddmalNVALID_MEM_HANDLE The DMA transfer failed due to the locked down memory handle being invalid Table 15 DMA transfer functions return values Description This handles the transfer of WordCount 32bit words from the Interface with the on board FGPA of the DIME Motherboard to the memory pointed to by DestData The memory pointed to by DestData does not need to be contiguous as this function will handle the internal transfer and memory management Notes To achieve this first it locks down DestData and then performs the DMA transfer On completion of the transfer irrespective of the result it then unlocks the DestData So if your application performs several DMA reads then it is more efficient to use the DIME_DMAReadToLockedMem function 7 32 DIME_DMAReadToLockedMem Syntax DWORD DIME_DMAReadToLockedMem DIME_HANDLE handle DIME_DMAHANDLE DMAChannel DIME MEMHANDLE DestData DWORD SrcAddr DWORD WordCount DWORD Flags Arguments handle is a valid handle to a DIME carrier card DMAChannel A valid DMA handle that was returned from DIME_DMAOpen DestData This should be a valid memory handle returned from DIME_LockMemor
22. found didrALL This locates all drivers installed on your system for each card found Table 27 DIME_LocateCard DriverVersion argument options Flags This argument allows the locate process to be customised to suit your development requirements The table below gives details for the Flags Flags Description dIDEFAULT This is the default option for the locate It does not get the serial number from the cards dISERIALNUM Since getting the serial number from all the cards is a lengthy approximately a second per card process this information is not requested in the default option If the serial number is required then specifying this flag will bring back the serial number for all cards Table 28 DIME_LocateCard Flags argument options Returns a handle to information pertaining to the detected cards Returns NULL on failure The return type LOCATE_HANDLE is defined as a void pointer This function must be called before all other functions It searches the specified interface for the specified Nallatech motherboards and returns a handle which is subsequently used to open a chosen card www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Example See Figure 3 Locating Opening and Closing a card 7 46 DIME LocateStatus Syntax DWORD DIME_LocateStatus LOCATE _HANDLE handle DWORD CardNumber DWORD CmdMode Arguments handle is a valid locate handle CardNumber is th
23. guide for details what periphery IO is available Return Returns the value of the requested pins Returns all ones on error Description This function reads the values on the pins of the periphery I O 7 63 DIME ReadPIODirection Syntax DWORD DIME_ReadPIODirection DIME_HANDLE handle DWORD Bank Arguments handle is a valid handle to a DIME carrier card Bank is used to indicate which bank of periphery IO direction is to be read See Table 34 for details of the available banks Please check your motherboards user guide for details what periphery IO is available www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Return A I in a particular bit location indicates that the pin is an input otherwise the pins is an output Returns l on error Description This returns the setting of the direction for the specified bank 7 64 DIME SaveCardDefinition Syntax DWORD DIME_SaveCardDefinition DIME_HANDLE handle const char Filename DWORD Flags Arguments handle is a valid handle to a DIME carrier card Filename is the filename that the card definition is to be saved to Flags This argument allows the developer to configure the information held within the card definition files to suit their development needs The table below gives details for the Flags Flags Description dcfgEMBEDALLBITS It is possible not only to save the name of the assigned bit files into the card definition but also t
24. handle ModuleNumber dinfDIMECODE DIME_GetNumberOfDevices DWORD DIME_GetNumberOfDevices DIME_HANDLE handle DWORD ModuleNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number The function accesses the internal data structure of board information and returns the number of devices for the specified module www nallatech com 85 Description Alternative 8 38 Syntax Arguments Return Description Alternative 8 39 Syntax Arguments Return Description Note Alternative 8 40 Syntax Arguments Return Description Alternative FUSE C C API Developers Guide FU _ The function first checks that a valid card has in fact been successfully opened if not 0 is returned The function also checks that the specified module number is not greater than the total number of modules detected on the board DIME_ModuleStatus handle ModuleNumber dinfNUMDEVICES DIME_GetModuleDescription const char DIME_GetModuleDescription DIME_HANDLE handle DWORD ModuleNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number Returns a pointer to a string that describes the module selected Returns NULL on error The function first checks that a valid card has in fact been successfully opened if not a NULL is returned The function also checks that the specified module number is not greater than the total number of m
25. in this developer s guide The application layer intended for high level user interface access uses functions from the developer layer to communicate with the hardware An application such as the probe tool provided on this CD in which the user can control the hardware via a GUI is an example of an application layer product 16 www nallatech com NT107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide Part 2 Installation Guide This part of the Developers Guide contains installation information in the following Sections Section 3 Software Installation NT107 0068 Issue 4 19 05 2003 www nallatech com 17 FUSE C C API Developers Guide PO _ 18 www nallatech com NT 107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide Section 3 Software Installation In this section Software Requirements Software Installation Guide Windows Software Installation Guide Linux 3 1 Software Requirements The FUSE API runs under the following operating systems Microsoft Windows XP Professional Microsoft Windows 2000 Microsoft Windows Millennium Edition Microsoft Windows NT Service Pack 4 Microsoft Windows 98 3 2 Software Installation Guide Windows The Windows 95 98 NT 2000 ME XP Installation is detailed below I When the supplied CD is inserted it will auto run If the CD does not auto run run the following program CD_Drive autorun exe When the program runs the fol
26. is changed where 0 All Clocks SYSCLK 2 DSPCLK 3 PIXCLK DesiredFrequency is the desired frequency that the oscillator should be changed to Note not all frequencies are achievable precisely and some error may result this is where the ActualFrequency argument can be used to provide the actual frequency obtained ActualFrequency points to a memory location which is loaded with the actual frequency programmed This last argument can be set to NULL if the returned value is not required Return A return value of 0 indicates success means that a NULL handle has been given 2 means that the Oscillator Number is out of range 3 indicates a invalid frequency requested Description This function is used to control frequency of the programmable oscillators The frequency is given in Mhz and the frequency change is carried out glitch free Notes Please check your motherboards user guide for further details on the programmable oscillators Example Change the oscillators double ActualFrequency Try and set oscillator 1 the system clock to 41 23456MHz DIME SetOscillatorFrequency hCard1l 1 41 23456 amp ActualFrequency printf Actual frequency is f n ActualFrequency Figure 9 Getting information on the located cards 7 67 DIME_ShowMConfigGUl Syntax void DIME_ShowMConfigGUI void handle DWORD ShowFlag Arguments handle is a valid handle to a DIME carrier card ShowFlag
27. or DIME_MemConfigDevice provided that the device has been defined in the MDF as bootable and that a bit file has actually been assigned to the device Note that it will stop iterating through the devices at the first device that is unsuccessfully configured An unsuccessful configuration is indicated by a returned configuration result that is not equal to dcfgOK_NOSTATUS defgDL_IH_NOCRC or dcfgOK_STATUS 7 15 DIME ConfigOnBoardDevice Syntax DWORD DIME_ConfigOnBoardDevice DIME_HANDLE handle const char FileName DWORD Flags Arguments handle is a valid handle to a DIME carrier card FileName is the filename of the bit file that is to be used for booting the on board FPGA NT107 0068 Issue 4 19 05 2003 www nallatech com 4l FUSE C C API Developers Guide PO __ Flags This argument is used to control the configuration of the on board device Currently there are no flags and this argument is ignored Return This function has several possible returns Please see Table 5 for details Description This function configures the cards on board FPGA with the specified bit file Configuration is carried out using the cards JTAG chain Notes The bit file must be configured to use the JTAG clock for configuration rather than the default of the CCLK 7 16 DIME_ConfigSetBitsFilename Syntax DWORD DIME_ConfigSetBitsFilename DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD Flags Arguments handle is
28. particular card DIME_CardStatus handle dinfMOTHERBORDT YPE DIME_GetMultiConfigLicence DWORD DIME_GetMultiConfigLicence DIME_HANDLE handle handle is a valid handle to a DIME carrier card A return value of 0 indicates that no multiple configuration licence is available and a value of indicates that a multiple configuration licence is available This function returns whether the multiple configuration licence is valid on this system DIME_CardStatus handle dinfMULTICONFIGLICENCE DIME_ReadSlotUsed DWORD DIME_ReadSlotUsed DIME_HANDLE handle handle is a valid handle to a DIME carrier card A P ina particular bit location indicates that a Module is present otherwise the slot is free Bit 0 represents slot 0 bit represents slot etc This returns flags to indicate if a module is plugged into a particular DIME slot DIME_CardStatus handle dinfSLOTSUSED www nallatech com NT107 0068 Issue 4 19 05 2003 8 34 Syntax Arguments Return Description Notes Alternative 8 35 Syntax Arguments Return Description Alternative 8 36 Syntax Arguments Return Description Alternative 8 37 Syntax Arguments Return NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide DIME_GetNumberOfModules DWORD DIME_GetNumberOfModules DIME_HANDLE handle handle is a valid handle to a DIME carrier card Returns the number of modules installed in the card The function f
29. returned Locate_handles is a pointer to an array that will return with the locate handles for each card that the loaded system has opened Flags This argument is used to customise the loading of the system definition file Currently there are no flags and this argument is not used 0 Should be used Return Returns a pointer to an array containing the card handles for the cards that have been opened Also via the Locate_handles argument the locate handles are returned and via the CardCount argument the number of cards in the system is returned On error returns NULL Description This function takes a valid system definition file and loads it up In doing this it locates all the cards in the system and opens each of these cards Once opened the bit files streams are assigned to every device in every card Notes To successfully load a system definition file the card definition files for each card in the system must be in the same location that they where in when the system definition file was created 7 45 DIME LocateCard Syntax LOCATE _HANDLE DIME_LocateCard int LocateType DWORD MBType void LocateTypeArgs DWORD DriverVersion DWORD Flags NT107 0068 Issue 4 19 05 2003 www nallatech com 59 FUSE C C API Developers Guide PO _ Arguments Return Description 60 LocateType This is the interface that the locate is to be performed over The table below provides further details LocateType Description diPCI Searches fo
30. specify what particular aspect of card status information is to be returned The table below gives details of the available command modes CmdMode Description dinfMULTICONFIGLICENCE This function returns whether the multiple configuration licence is valid on this system A return value of indicates that the card has a multiple configuration licence A return value of 0 indicates that it does not dinfNUMBERMODULES Returns the number of modules installed in the card Note the card itself counts as an onboard module dinfNUMBERSLOTS Returns the number of module slots there are for the card NT107 0068 Issue 4 19 05 2003 www nallatech com 37 FUSE C C API Developers Guide Fos _ Return Description 7 7 Syntax Arguments Return Description Notes 7 8 Syntax Arguments Return Description 38 dinfsLOTSUSED This returns a bit wise value to indicate if a module is plugged into a particular DIME slot A I in a particular bit location indicates that a module is present otherwise the slot is free Bit 0 represents slot 0 bit represents slot etc dinfMOTHERBORDTYPE Returns the motherboard type of the card See Table 25 for details dinfCARDMAXJTAGSPEED Returns the maximum speed that the cards JTAG chain can be driven See Table 22 for details dinfSERIALNUMBER Returns the serial number of the card Table 3 DIME_CardStatus CmdMode argument options Th
31. the cards within your system and to retrieve simple information about these located cards to help determine which card should be opened DIME_LocateCard DIME CloseLocate DIME LocateStatus DIME LocateStatusPtr 6 2 Opening and closing the card These functions are used to de allocate system resources for the chosen card and to create destroy a handle for the card This handle is required for all functions that interface with the card DIME OpenCard DIME CloseCard 6 3 Oscillator These functions are used for controlling cards oscillators DIME SetOscillatorFrequency 6 4 LEDs These functions are used to read or write to the interface LEDs DIME ReadLEDs DIME WriteLEDs 6 5 Reset These functions are used to control the cards various resets DIME CardResetControl DIME CardResetStatus NT 107 0068 Issue 4 19 05 2003 www nallatech com 31 FUSE C C API Developers Guide PO _ 6 6 These functions are for controlling the cards various interrupts 6 7 Interrupts DIME_InterruptStatus DIME_InterruptControl DMA transfers These functions are for dealing with transfer of data between the card s and the PC 6 8 DIME_LockMemory DIME_UnLockMemory DIME_DMAOpen DIME_DMACI ose DIME_DMAStatus DIME_DMAControl DIME_DMARead DIME_DMAWrite DIME_DMAReadToLockedMem DIME_DMAWriteFromLockedMem DIME_DataWriteSingle DIME_DataReadSingle DIME_DataRead DIME_DataWrite DIME_AddressWriteSingle Device co
32. this function has been called all other functions are available Example See Figure 3 Locating Opening and Closing a card 7 58 DIME_Peripheralioctl Syntax DWORD DIME_Peripheralioctl DIME_HANDLE handle DWORD CMD DWORD Argl DWORD Arg2 DWORD Arg3 DWORD Arg4 void Arg5 Arguments handle is a valid handle to a DIME carrier card CMD The command to be performed Currently there are no commands Argl Arg2 Arg3 Arg4 and Arg5 are all dependant upon the command Return The return is dependant upon the selected command Description This function is used to control and return status information for the peripheral I O 7 59 DIME_PPSControl Syntax DWORD DIME_PPSControl DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card ModuleNum This is the module number CmdMode This argument is used to specify what particular aspect of programmable power supplies information is required There are no current command modes for this function Value This argument is used to specify the action for a command mode Return The return is dependant upon the selected command mode Description Allows control of the programmable power supplies NT107 0068 Issue 4 19 05 2003 www nallatech com 67 FUSE C C API Developers Guide PO _ 68 7 60 DIME_PPSStatus Syntax DWORD DIME_PPSStatus DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode Arguments handle is a valid hand
33. this license do not install the Software and promptly return it to the place where you obtained it I Licence Nallatech Ltd grants you a licence to use the software programs and documentation in this package Licensed materials if you have a single license on only one computer at a time or by only one user at a time if you have acquired multiple licenses the Software may be used on either stand alone computers or on computer networks by a number of simultaneous users equal to or less than the number of licenses that you have acquired and if you maintain the confidentiality of the Software and documentation at all times 2 Restrictions This software contains trade secrets in its human perceivable form and to protect them except as permitted by applicable law you may not reverse engineer disassemble or otherwise reduce the software to any human perceivable form You may not modify translate rent lease loan or create derivative works based upon the software or part thereof without a specific run time licence from Nallatech Ltd 3 Copyright The Licensed Materials are Copyrighted Accordingly you may either make one copy of the Licensed Materials for backup and or archival purposes or copy the Licensed Materials to another medium and keep the original Licensed Materials for backup and or archival purposes Additionally if the package contains multiple versions of the Licensed Materials then you may only use the Licensed Mater
34. user guide for details on what interrupts are available CmdMode This argument is used to specify what function is to be performed The table below gives details of the available command modes CmdMode Description dintFLAGS This is used to determine if an interrupt has occurred Returns if an interrupt has occurred 0 otherwise dintAVAILABLE Allows the user to check whether an interrupt for this card exists Returns a one in the relevant bit position if the interrupt is available Returns a zero in the relevant bit position otherwise dintPINVALUE This returns the value on the interrupt pin If the interrupt pin for the selected interrupt is high then this returns in the relevant bit position otherwise it returns 0 Table 20 DIME_InterruptStatus CmdMode argument options Return Returns all 1 on error otherwise the return is dependant on the command mode Description This function is used to get the status of the interrupts on the card There are three command modes available The first dintFLAGS is used to determine if an interrupt has occurred since the specified interrupt was enabled dintAVAILABLE is used to check whether the specified interrupt is valid for this particular card Finally dintPINVALUE is used to return the current value of the chosen interrupt pin Example Example Interrupt code if Answer DIME InterruptStatus hCard dintALL dintAVAILABL printf No Interrupts are available f
35. written to See Table 34 for details of the available banks Please check your motherboards user guide for details what periphery IO is available Returns zero on success non zero on error This function sets the direction of individual pins for the specified bank A I in a particular bit location sets that pin to an input otherwise the pins is an output www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Section 8 Obsolete Functions In this section The FUSE API is backward compatible with Nallatech s DIME system software These obsolete functions are all from the DIME system software library and while are still supported under the FUSE API every effort should be made by the developer to convert to the new FUSE API functions This section contains full details of all obsolete functions with alternative FUSE API function suggestions 8 1 Syntax Arguments Return Description Notes Alternative 8 2 Syntax Arguments Return Description Notes Alternative NT107 0068 Issue 4 19 05 2003 CloseDIMEBoard void CloseDIMEBoard DIME_HANDLE handle handle is a valid handle to a DIME Carrier Card that was returned from the OpenDIMEBoard function N A This function should be called at the end of the program This closes access to the DIME Carrier card and frees the resources use by the card and the software library Should only be used when a card has b
36. 108XL Xilinx 95108XL CPLD XC95144 Xilinx 95144 CPLD XC95144XL Xilinx 95144XL CPLD NT107 0068 Issue 4 19 05 2003 www nallatech com 47 FUSE C C API Developers Guide PO _ 7 27 Syntax Arguments Return Description Notes 7 28 Syntax Arguments Return 48 XC95216 Xilinx 95216 CPLD XC95216XL Xilinx 95216XL CPLD XC95288 Xilinx 95288 CPLD didXC2V40 Xilinx Virtex2 V40 didXC2V80 Xilinx Virtex2 V80 didXC2V250 Xilinx Virtex2 V250 didXC2V500 Xilinx Virtex2 V500 didXC2V1000 Xilinx Virtex2 V1000 didXC2V 1500 Xilinx Virtex2 V1500 didXC2V2000 Xilinx Virtex2 V2000 didXC2V3000 Xilinx Virtex2 V3000 didXC2V4000 Xilinx Virtex2 V4000 didXC2V6000 Xilinx Virtex2 V6000 didXC2V8000 Xilinx Virtex2 V8000 didXC2V 10000 Xilinx Virtex2 V10000 Table 10 JTAG Device ID Codes DIME_DeviceStatusPtr void DIME_DeviceStatusPtr DIME_HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMode handle is a valid handle to a DIME carrier card ModuleNum is the Module that is being addressed Note modules are numbered from 0 DeviceNum is the number of the device that is being addressed CmdMode This argument is used to specify what particular aspect of device status information is to be returned The table below gives details of the available command modes CmdMode Description dinflCONFILENAME This command mode returns a string char which is the icon filename for the de
37. 8 36 DIME_GetModuleDIMECode 85 8 37 DIME_GetNumberOfDevices 85 8 38 DIME_GetModuleDescription 86 8 39 DIME GetModulelconFilename 86 8 40 DIME_GetModulelmageFilename 86 8 41 DIME GetDevicelDCode 87 NT107 0068 Issue 4 19 05 2003 www nallatech com 7 FUSE C C API Developers Guide PO _ 8 42 DIME GetDeviceType 87 8 43 DIME_ GetDeviceXOffset 87 8 44 DIME_GetDeviceYOffset 88 8 45 DIME GetDeviceWidth 88 8 46 DIME_GetDeviceHeight 88 8 47 DIME_GetDeviceDescription 89 8 48 DIME GetDevicelconFilename 89 Version History List 91 9 1 New in version 1 6 91 8 www nallatech com NT107 0068 Issue 4 19 05 2003 List of Figures Figure FUSE API Layers 16 Figure 2 Examples of using DIME_CardResetControl 37 Figure 3 Locating Opening and Closing a card 39 Figure 4 DIME_GetError example 55 Figure 5 Interrupt Example using DIME_InterruptControl 56 Figure 6 Examples of using DIME_InterruptStatus 57 Figure 7 Getting information on the located cards 62 Figure 8 Locking and Unlocking memory for DMA transfers 63 Figure 9 Getting information on the located cards 70 Figure 10 DIME_SystemStatusPtr example 73 Figure 1 Alternative to OpenDIMECard 76 NT107 0068 Issue 4 19 05 2003 www nallatech com 9 FUSE C C API Developers Guide FO _ List of Tables Table DIME_CardResetControl ResetNum argument options 36 Table 2 DIME_CardResetControl CmdMode argument options 36 Table 3 DIME_CardStatus CmdMode argument options 38 Table 4 DIME_
38. A transfers for a particular channel 7 30 DIME_DMAOpen Syntax DIME_DMAHANDLE DIME_DMAOpen DIME_HANDLE handle DWORD DMAChannel DWORD Flags Arguments handle is a valid handle to a DIME carrier card DMAChannel is used to specify the actual DMA channel on your hardware that is to be addressed This is a bit wise argument Please refer to the motherboards user guide for more details on what DMA channels are available for the particular hardware Flags Used to specify special modes of opening the DMA channel Currently there are none and this argument is not used Return This handle is used to control the desired DMA channel Returns a valid DMA handle Returns NULL otherwise Description DMA transfers are fast and efficient ways of transferring large qualities of data between the host PC and the card This function checks the availability of the selected DMA channel and if suitable creates a handle that is required when performing the DMA data transfers 7 31 DIME_DMARead Syntax DWORD DIME_DMARead DIME_HANDLE handle DIME_DMAHANDLE DMAChannel DWORD DestData DWORD SrcAddr DWORD WordCount DWORD Flags Arguments handle is a valid handle to a DIME carrier card DMAChannel A valid DMA handle that was returned from DIME_DMAOpen DestData This should be a pointer to the PC memory that receives data from the card This should be 32 bit aligned SrcAddr This is the source address of the data on the card that is to be read If th
39. Any equipment sent to the company for any purpose including but not limited to equipment originally supplied by the company must be adequately insured by the buyer while on the premises of the company PAYMENT Nallatech Ltd terms of payment are 30 days net Any charges incurred in making the payment either currency conversion or otherwise shall be paid by the buyer The company reserves the right to charge interest at a rate of 2 above the base rate of the Bank of Scotland PLC on any overdue accounts The interest will be charged on any outstanding amount from said due date of payment until payment is made in full such interest will accrue on a daily basis TECHNICAL SUPPORT The company offers a dedicated technical support via telephone and an email address It will also accept faxed support queries Technical support will be given free of charge for 90 days from the date of invoice for queries regarding the use of the products in the system configuration for which they were sold Features not documented in the user manual or a written offer of the company will not be supported Interfacing with other products other than those that are pre approved by the company as compatible will not be supported If the development tools and system hardware is demonstrably working no support can be given with application level problems WARRANTY The company offers as part of a purchase contract 12 months warranty against parts and defective
40. CardStatusPtr CmdMode argument options 38 Table 5 Configuration function return values 40 Table 6 DIME_ConfigSetBitsFilename Flags argument options 42 Table 7 DIME_ConfigSetBitsMemory Flags argument options 43 Table 8 DIME_DeviceStatus CmdMode argument options 47 Table 9 Device Types 47 Table 10 JTAG Device ID Codes 48 Table 1 DIME_DeviceStatusPtr CmdMode argument options 48 Table 12 DIME_DMAClose Flags argument options 48 Table 13 DIME_DMAControl CmdMode argument options 49 Table 14 DMA transfer functions Flags argument options 50 Table 15 DMA transfer functions return values 5I Table 16 DIME_DMAStatus CmdMode argument options 53 Table 17 DIME_InterruptControl CmdMode argument options 55 Table 18 DIME_InterruptControl Value argument options 56 Table 19 InterruptFlags argument options 57 Table 20 DIME_InterruptStatus CmdMode argument options 57 Table 21 DIME_JTAGControl CmdMode argument options 58 Table 22 JTAG return descriptions 58 Table 23 DIME_JTAGStatus CmdMode argument options 59 Table 24 Locate types 60 Table 25 Motherboard types 60 Table 26 DIME_LocateCard LocateType argument options 60 Table 27 DIME_LocateCard DriverVersion argument options 60 Table 28 DIME_LocateCard Flags argument options 60 Table 29 DIME_LocateStatus CmdMode argument options 61 Table 30 DIME_LocateStatusPtr CmdMode argument options 62 Table 31 DIME_ModuleStatus CmdMode argument options 66 Table 32 DIME_ModuleStatusPtr CmdMode argument optio
41. Config Syntax DWORD DIME_SetFilenameAndConfig DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD Progress Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the Number of the selected module DeviceNumber is the selected device Filename is the filename used to assign for configuration Progress is the progress through a configuration www nallatech com NT107 0068 Issue 4 19 05 2003 Return Description Alternative 8 28 Syntax Arguments Return Description Alternative 8 29 Syntax Arguments Return Description Alternative 8 30 Syntax Arguments Return Description Notes NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide Returns the result of DIME_ConfigSetBitsFilename if there is an error If no error occurs in this function then it returns the result of the device configuration This function calls the function DIME_ConfigSetBitsFilenameAndConfig to assign the filename to the device and then to configure the device DIME_ConfigSetBitsFilenameAndConfig handle ModuleNumber DeviceNumber Filename 0 Progress 0 DIME_SaveSystemConfig DWORD DIME_SaveSystemConfig DIME_HANDLE handle const char Filename handle is a valid handle to a DIME carrier card Filename is the file to save the system configuration to If the information is successfully written to a file then the function returns a 0
42. DIME PPSStatus 68 7 61 DIME_ReadLEDs 68 7 62 DIME_ReadPIO 68 7 63 DIME_ReadPlODirection 68 7 64 DIME_SaveCardDefinition 69 7 65 DIME_SaveSystemDefinition 69 7 66 DIME_SetOscillatorFrequency 70 7 67 DIME_ShowMConfigGUI 70 7 68 DIME_SystemControl 71 7 69 DIME_SystemStatus 71 7 70 DIME SystemStatusPtr 72 7 71 DIME UnLockMemory 73 7 72 DIME WriteLEDs 73 7 73 DIME_WritePIO 73 7 74 DIME_WritePlODirection 74 Obsolete Functions 75 8 1 CloseDIMEBoard 75 8 2 OpenDIMEBoard 75 8 3 GetDIMEHandle 76 8 4 DIME_SmartScan 76 8 5 DIME_VirtexReset 76 8 6 DIME_VirtexResetEnable 76 8 7 DIME_VirtexResetDisable 77 8 8 DIME_SystemReset 77 8 9 DIME_SystemResetEnable 77 8 10 DIME_SystemResetDisable 77 8 11 DIME_PCIReset 78 8 12 DIME_ReadDigitallO 78 8 13 DIME_WriteDigitallO 78 8 14 DIME ReadDigitallODirection 78 8 15 DIME_WriteDigitallODirection 78 8 16 DIME VirtexIntPin 79 8 17 DIME InterfaceFlagBusy 79 8 18 DIME InterfaceFlagEmpty 79 8 19 DIME InterfaceFlagVirtexReadEmpty 79 8 20 DIME_InterfaceFlagVirtexWriteFull 80 8 21 DIME_JTAGTurboDisable 80 8 22 DIME JTAGTurboEnable 80 8 23 DIME_BootVirtexSingle 80 8 24 DIME BootDevice 8l 8 25 DIME_SetFilename 82 8 26 DIME_GetFilename 82 8 27 DIME_SetFilenameAndConfig 82 8 28 DIME_SaveSystemConfig 83 8 29 DIME_LoadSystemConfig 83 8 30 DIME GlobalMode 83 8 31 DIME_GetMotherBoardType 84 8 32 DIME_GetMultiConfigLicence 84 8 33 DIME_ReadSlotUsed 84 8 34 DIME_GetNumberOfModules 85 8 35 DIME_GetFailedMDFFileName 85
43. FU _ FUSE C C API Developers Guide Description This function boots the onboard FPGA device using the bit file given by filename Note that the bit file must be configured to use the JTAG clock for configuration rather than the default of the CCLK Alternative DIME_ConfigOnBoardDevice handle FileName 0 8 24 DIME BootDevice Syntax DWORD DIME_BootDevice DIME _HANDLE handle const char FileName DWORD ModuleNumber DWORD ModuleDeviceNumber DWORD Progress Arguments handle is a valid handle to a DIME carrier card FileName is the filename of a bit for loading into the FPGA ModuleNumber is the Module that is being addressed ModuleDeviceNumber is the selected device within the select module Progress should point to a variable which will be updated with the actual position in the configuration The position in the configuration file is expressed as a percentage 0 100 This is only useful in multi threaded applications and may point to a valid location or NULL in single threaded applications Return cfgINVLAID_CARD Indicates a valid card has not been detected NT107 0068 Issue 4 19 05 2003 cfgOK_NOSTATUS cfgBIT_FILE cfgINTEG_FAIL cfgDL_IL_NOCRC cfgDL_IL_CRC cfgDL_IH_NOCRC cfg_DL_IH_CRC cfgDH_IL_NOCRC cfgDH_IL_CRC cfgOK_STATUS cfgDH_IH_CRC cfgNOLIC cfg UNKNOWN Indicates that a bit file has been successfully shifted into the chain with no post configuration checking carried out I
44. FUSE C C API Developers Guide NT 107 0068 Issue 4 FUSE C C API Developers Guide PO _ 2 www nallatech com NT107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide NALLATECH Contacting Nallatech NT107 0068 Issue 4 19 05 2003 Support WWW Nallatech is the leading FPGA Centric Systems provider with unrivalled industry expertise in the provision of complete systems including hardware IP and software Nallatech s industry leading products and services are used in many application areas including DSP amp Imaging Telecommunications amp RF Aerospace amp Defence and Networking amp Storage Nallatech offers design services for complete systems in addition to the modular DIME and DIME II product ranges for electronic systems Go to www nallatech com and click support Email support nallatech com Headquarters Europe amp Asia Pacific North America Nallatech Nallatech Inc Boolean House One Napier Park Cumbernauld Glasgow G68 OBH United Kingdom Phone Fax 12565 Research Parkway Suite 300 Orlando Florida 32826 United States of America Europe amp Asia Pacific North America Phone 44 0 1236 789500 Phone 1 407 384 9255 Fax 44 0 1236 789599 Fax 1 407 384 8555 Email sales nallatech com WWW www nallatech com www nallatech com X MathWorks ROH 1S09001 REGISTERED COMPANY P am FUSE C C API Develope
45. IME_ModuleStatusPtr DIME ModuleControlPtr DIME DeviceStatus DIME DeviceControl DIME_DeviceStatusPtr NT 107 0068 Issue 4 19 05 2003 www nallatech com 33 FUSE C C API Developers Guide PO _ 34 DIME DeviceControlPtr 6 13 Programmable power supplies These functions allow control of the programmable power supplies for certain motherboards DIME PPSStatus DIME PPSControl 6 14 AII IO These functions deal with all I O such as digital peripheral and miscellaneous I O DIME ReadPIO DIME VrritePIO DIME_Miscioctl DIME_Peripheralioctl 6 15 Multiple configuration GUI These functions are for linking the example multiple configuration GUI to your application DIME _MConfigGUI DIME ShowMConfigGUI www nallatech com NT107 0068 Issue 4 19 05 2003 Section 7 Functional Reference In this section Alphabetical listing giving full details of each function within the FUSE API Use this section as a quick reference to the API functions 7 1 DIME_AddressWriteSingle Syntax DWORD DIME_AddressWriteSingle DIME_ HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout Arguments handle is a valid handle to a DIME carrier card Data is a pointer to the PC memory that holds the address to be written Terminate points to a memory location that enables termination of a transfer This memory location is 0 under normal conditions A non zero value terminates the transfer This argume
46. MAXSPEED50 This will attempt to set the cards JTAG chain to 50MHz djtagMAXSPEED60 This will attempt to set the cards JTAG chain to 60MHz djtagMAXSPEED70 This will attempt to set the cards JTAG chain to 7OMHz djtagMAXSPEED80 This will attempt to set the cards JTAG chain to 80MHz djtagMAXSPEED90 This will attempt to set the cards JTAG chain to 9OMHz djtagMAXSPEED 100 This will attempt to set the cards JTAG chain to 100MHz Table 22 JTAG return descriptions This function returns l on failure The function returns 0 on success This controls the JTAG chain on the card Once this function has been called calling the DIME_JTAGStatus function will return the speed at which the JTAG chain has been set DIME_JTAGStatus DWORD DIME_JTAGStatus DIME_HANDLE handle DWORD CmdMode handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify which particular of the JTAG chain is to be returned The table below gives details CmdMode Description djtagCONFIGSPEED The will return the current speed that the cards JTAG chain is running at E g If the JTAG chain is being driven at its default speed it will return djtagDEFAULTSPEED Otherwise it will return the closest maximum speed of the chain For example with the Ballynuey this would return www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide djtagMAXSPEED 10 See Table 22 for details Please consult you
47. ORD ModuleNumber DWORD ModuleDeviceNumber DWORD Progress DWORD Flags Arguments handle is a valid handle to a DIME carrier card FileName is the filename of a bit file for configuring the FPGA ModuleNumber is the Module that is being addressed ModuleDeviceNumber is the selected device within the selected module Progress should point to a variable which will be updated with the actual position in the configuration The position in the configuration file is expressed as a percentage 0 100 This is only useful in multi threaded applications and may point to a valid location or NULL in single threaded applications Flags This argument is used to control the configuration of the on board device Currently there are no flags and this argument is ignored Return This function has several possible returns The table below gives details dcfgOK_NOSTATUS Configured completed successfully although no post configuration checking carried out defgOK_STATUS Configuration completed successfully as indicated by read back of FPGA Status register DONE high INIT high No CRC errors detected defgINVALID_CARD The handle argument is invalid dcfgBIT_FILE Returned when the specified bit file could not be successfully opened defgINTEG_FAIL Indicates that the JTAG integrity scan check has failed and the chain is apparently incomplete defgDL_IL NOCRC Configuration Status DONE Low INIT Low No CRC errors detected defgDL_IL_CRC Configuration Status DONE Lo
48. RD DIME_SetFilename DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the Module that is being addressed DeviceNumber is the selected device within the select module Filename is the filename of a bit for loading into the FPGA Return Returns 0 upon success Returns non zero otherwise Description This function can be used to set the filename for the specified device on the specified module The handle for the particular board also needs to be passed to the function The specified filename is stored in internal data structures for later use Alternative DIME_ConfigSetBitsFilename handle ModuleNumber DeviceNumber Filename 0 8 26 DIME_GetFilename Syntax const char DIME_GetFilename DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number Return Returns a pointer to the filename that has been assigned to the selected device If no filename has been set for the device then a NULL pointer is returned Description This function is used to read the filename that has been set for a particular device ona module The handle for the particular board also needs to be passed to the function Alternative DIME_ConfigGetBitsFilename handle ModuleNumber DeviceNumber 8 27 DIME_SetFilenameAnd
49. a valid handle to a DIME carrier card ModuleNumber is the number of the selected module DeviceNumber is the number of the selected device Filename is the filename of the bit file that is to be assigned to this device Flags This argument allows the developer to configure the assignment of bit files to devices to suit the development requirements The table below gives details for the Flags Description dcfgFREEEMBEDBITS It is possible to embed a bit stream with a particular device instead of a filename If this is the case then when assigning a Filename to a device that already has a bit stream assigned then the existing assigned bit stream may no longer be required In this situation this flag should be used This will de allocate the system resources that where assigned to the embedded bit stream Table 6 DIME_ConfigSetBitsFilename Flags argument options Return Returns 0 upon success Returns non zero otherwise Description This function assigns a bit file to the specified device Once a device has a bit file assigned this information is stored in any card definition file that is saved Furthermore when either DIME_ConfigCard or DIME_ConfigModule is called this assigned bit file is used to configure the device Notes This function only assigns the name of the bit file to the device No configuration is carried out 7 17 DIME ConfigSetBitsFilenameAndConfig Syntax DWORD DIME_ConfigSetBitsFilenameAndConfig DIME_HANDLE handle
50. a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number This function returns the type of the specified device on the specified module See Table 9 for details As part of the MDF file format each device is classified as a particular type corresponding to whether it can be configured or not DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfDEVICET YPE DIME_GetDeviceX Offset DWORD DIME_GetDeviceXOffset DIME_HANDLE DWORD ModuleNumber DWORD DeviceNumber handle handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number The function accesses the internal data structure of board information and returns the X Offset for the specified module device in the module image The function first checks that a valid card has in fact been successfully opened if not a 0 is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfXOFFSET www nallatech com 87 FUSE C C API Developers Guide PO _ 88 8 44 Syntax Arguments Return Description Alternative 8 45 Syntax Arguments Return Description Alternative 8 46 Syntax Arguments Re
51. an be used with the dintWAIT command mode Once the software has finished dealing with interrupts and wants to disable then again DIME_InterruptControl is used with the dintDISABLE command mode The non threaded interrupts example program is Non threaded interrupts Once interrupts have been enabled all interrupts that occur are logged When waiting 0 Once interrupts have been enabled only polling DMA transfers should be used for interrupts if an interrupt has been logged then the function will return immediately For a threaded example and further information on how to use interrupts please refer to Nallatech Application note NT 302 0026 NT 107 0068 Issue 4 19 05 2003 www nallatech com 27 FUSE C C API Developers Guide PO _ 28 www nallatech com NT107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide Part 4 Reference Guide This part of the Developers Guide contains reference information on the FUSE API in the following Sections Section 4 Functions By Category a Section 5 Full Functional Reference Section 6 Obsolete Functions NT107 0068 Issue 4 19 05 2003 www nallatech com 29 FUSE C C API Developers Guide PO _ 30 www nallatech com NT 107 0068 Issue 4 19 05 2003 Section 6 Functions By Category In this section The functions provided in the API are grouped by category with brief descriptions of each category provided 6 1 Locating cards These functions are used to locate
52. ata that has been transferred via DMA write operation Returns the status of the EMPTY signal that is on the interface FPGA to on board FPGA Interface When the EMPTY signal is high this function returns a l otherwise it returns a 0 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide ddmaBUSYFLAG When BUSY is high it indicates that the internal transfer buffer from the on board FPGA to the interface FPGA is full and cannot accept any more data The user application should initiate a DMA read at this stage Returns the status of the BUSY signal that is on the interface FPGA to on board FPGA Interface When the BUSY signal is high this function returns a l otherwise it returns a 0 ddmaREADEMPTY Returns the status of the internal buffer between the on board FPGA and the interface FPGA interface If there is no data in the read buffer to be accessed this will return however 0 will be returned if there is data waiting to be read ddmaWRITEFULL This returns a l when the internal buffer from the interface FPGA to the on board FPGA is full and hence cannot accept any more data from the user application The user application must therefore wait until the FPGA reads data before any more data will be transferred ddmaWAITFORFINISH This returns only when the current DMA transfer over this channel is finished Table 16 DIME_DMAStatus CmdMode argument op
53. ates system resources This function should be called after all DMA transfers have finished using this DMAhandle Notes After successfully calling this function the DMAhandle is no longer valid 7 29 DIME_DMAControl Syntax DWORD DIME_DMAControl DIME_HANDLE handle DIME_DMAHANDLE DMAChannel DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card DMAChannel is a valid DMA handle that was returned from DIME_DMAOpen CmdMode This argument is used to specify which aspect of the open DMA channel is to be controlled The available command modes are given in the table below CmdMode Description ddmaLOCALNOINC Sets the DMA channel to have no incrementing for the local address during transfers Returns 0 on success ddmaREMOTENOINC Sets the DMA channel to have no incrementing for the remote address during transfers Returns 0 on success ddmaLOCALINC Sets the DMA channel to have incrementing for the local address during transfers Returns 0 on success ddmaREMOTEINC Sets the DMA channel to have incrementing for the remote address during transfers Returns 0 on success ddmaTERMINATE If the DMAChannel is a valid handle the current DMA transfer for this channel is terminated If DMAChannel NULL All DMA transfers with this card are terminated Returns 0 on success ddmaTIMEOUT Sets the Timeout value for the DMA channel to the number of milli seconds specified by the value argument
54. ce within the select module Progress should point to a variable that will be updated with the actual position in the configuration The position in the configuration file is expressed as a percentage 0 100 This is only useful in multi threaded applications and may point to a valid location or NULL in single threaded applications Flags This argument is used to control the configuration of the on board device Currently there are no flags and this argument is ignored Return This function has several possible returns Please see Table 5 for details Description This function configures the specified device with the specified bit file Notes The bit file must be configured to use the JTAG clock for configuration rather than the default of the CCLK 7 51 DIME_MemConfigOnBoardDevice Syntax DWORD DIME_MemConfigOnBoardDevice DIME_HANDLE handle DWORD Bitstream DWORD ByteLength DWORD Flags Arguments handle is a valid handle to a DIME carrier card Bitstream is the start of the Bitstream that is used to configure the device held in PC memory ByteLength This argument specifies the length of the Bitstream in bytes Flags This argument is used to control the configuration of the on board device Currently there are no flags and this argument is ignored Return This function has several possible returns Please see Table 5 for details 64 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guid
55. d handle DWORD ShowFlag Arguments handle is a valid handle to a DIME carrier card NT107 0068 Issue 4 19 05 2003 www nallatech com 63 FUSE C C API Developers Guide PO _ ShowFlag is a flag for initial condition of the form Return N A Description Calling this function opens the Multiple DIME configuration GUI which is demonstrated in the PCI probe example program provided It is displayed as a separate window and can handle all reconfiguration operations When ShowFlag is 0 then the window is created but not visible otherwise the window will be displayed when this function is called Notes The nueym lib needs to included in your design when using this function This library is installed in the include directory of the FUSE software This is an OMF format library for use with Borland projects If access to this function is required from a Microsoft Visual Studio project then please contact nallatech support 7 50 DIME MemConfigDevice Syntax DWORD DIME_MemConfigDevice DIME_HANDLE handle DWORD Bitstream DWORD ByteLength DWORD ModuleNumber DWORD ModuleDeviceNumber DWORD Progress DWORD Flags Arguments handle is a valid handle to a DIME carrier card Bitstream is the start of the Bitstream that is used to configure the device held in PC memory ByteLength This argument specifies the length of the Bitstream in bytes ModuleNumber is the Module that is being addressed ModuleDeviceNumber is the selected devi
56. d by OpenDIMEBoard This cannot be achieved now since it is possible that multiple cards and hence handles have been generated It is now up to the developer to store all valid handles returned This function has now been made fully obsolete and will now simply return NULL 8 4 DIME_SmartScan Syntax Arguments Return Description DWORD DIME_SmartScan DIME_HANDLE handle handle is a valid handle to a DIME carrier card ssOK SmartScan has been successfully completed This function previously carried out a scan of all the hardware modules and devices that where present in the cards JTAG chain However this scan in now incorporated into the DIME_OpenCard function So if a card is open then a successful SmartScan has already been carried out For this reason this function now does nothing except return ssOK 8 5 DIME_VirtexReset Syntax Arguments Return Description Alternative void DIME_VirtexReset DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle d ONBOARDFPGA drTOGGLE 0 Functionality not changed Enables the reset for the onboard FPGA DIME_CardResetControl handle d ONBOARDFPGA drTOGGLE 0 8 6 DIME_VirtexResetEnable Syntax void DIME_VirtexResetEnable DIME_HANDLE handle www nallatech com NT107 0068 Issue 4 19 05 2003 Arguments Return Description Alternative 8 7 Syntax Arguments Return Description Alternative 8 8 Syn
57. d can be found in the FUSE API Examples directory with the FUSE install NT 107 0068 Issue 4 19 05 2003 www nallatech com 25 FUSE C C API Developers Guide PO _ Section 5 Sample Programs In this section Fundamental Steps Locating and opening examples Device Configuration examples DMA Transfer examples Interrupt example 5 1 Fundamental steps There are two must do steps that are required to enable all the API functions The first step is to locate all the cards over a certain interface and the second is to open a selected card Once this has been achieved the FPGAs can be configured DMA transfers are possible LEDs can be flashed etc To locate a card DIME_LocateCard must be called After this has returned successfully other locate functions can be called to find out details on what was located and the card can be opened using DIME_OpenCard Once the card has been opened the other API functions become available Finally the card and the locate must be closed using DIME_CloseCard and DIME_CloseLocate 5 2 Locating and opening examples There are three example programs included in the fuse install that specifically deal with locating and opening cards These are Opening a single card Opening multiple cards over the same interface Opening multiple cards over different interfaces All the above programs open one or more cards and flash LEDs to prove the cards have been opened before closing the cards down
58. d handle to a DIME carrier card Value is the value that is to be written to the LEDs Return N A Description This function sets the status of the LEDs that are controlled via the PCI interface The values are stored in the least significant bits with a value of 0 indicating that the LED is to be illuminated The function checks that a valid card has been opened before setting the LEDs status Please check your motherboards user guide for details on the LEDs Example See Figure 3 Locating Opening and Closing a card 7 713 DIME_WritePIO Syntax DWORD DIME_WritePIO DIME_HANDLE handle DWORD Bank DWORD Data Arguments handle is a valid handle to a DIME carrier card NT107 0068 Issue 4 19 05 2003 www nallatech com 73 FUSE C C API Developers Guide FO _ 74 Return Description 7 74 Syntax Arguments Return Description Bank is used to indicate which bank of periphery IO is to be written to See Table 34 for details of the available banks Please check your motherboards user guide for details what periphery IO is available Data is the data to be written to the periphery IO Returns 0 on success Returns non zero on error This function writes the values to the pins of the periphery I O DIME_WrritePIODirection DWORD DIME_VrritePIODirection DIME_HANDLE handle DWORD Bank DWORD Data handle is a valid handle to a DIME carrier card Bank is used to indicate which bank of periphery IO direction is to be
59. d users guide for more details on this signal drONBOARDFPGA This is commonly a single bit signal that is provided as part of the communications signals between the interface FPGA and the on board FPGA This provides an active low software controllable reset to on board FPGA Toggling this reset has a minimum pulse width of 100ns Table DIME_CardResetControl ResetNum argument options CmdMode This argument is used to specify the command on the selected reset The table below gives details of the available commands drDISABLE This de asserts the reset line for the selected reset drENABLE This asserts the reset line for the selected reset drTOGGLE This toggles the reset line for the selected reset Table 2 DIME_CardResetControl CmdMode argument options The value argument is not used in this function and is only included for consistency Returns 0 on success Non zero on error This function controls the software resets For more details on these resets please consult your motherboards users guide www nallatech com NT107 0068 Issue 4 19 05 2003 PU _ z FUSE C C API Developers Guide Example Enable the OnBoardFPGA reset DIME CardResetControl handle drONBOARDFPGA drENABLE Disable the OnBoardFPGA reset DIME CardResetControl handle drONBOARDFPGA drDISABL Toggle the OnBoardFPGA reset DIME CardResetControl handle drONBOARDFPGA drTOGGLI Enable the Syst
60. de PO __ Return The return is dependant upon the command mode A return of l indicates an error Description This function is used to return system status information 7 70 DIME_SystemStatusPtr Syntax void DIME_SystemStatusPtr DIME_HANDLE handle DWWORD CmdMode Arguments handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of system status information is to be returned The table below gives details of the available command modes CmdMode Description dinfDIME_SWMBTS This command mode does not require a card to be opened The Handle argument is not used This command mode is used to return a structure that contains the system information on what motherboard types it can detect and a brief description of each of these motherboard types Table 39 DIME_SystemStatusPtr CmdMode argument options Return Return NULL on error For the command mode dinfDIME_SWMBTS the return will be a pointer of type SWMBInfo Type Name Description DWORD NumTypes The number of motherboard types returned Cardinfo pCardInfo Pointer to an array containing the motherboard information The number of elements in this array corresponds with NumTypes Table 40 Type SWMBInfo members Type Name Description DWORD MotherBoardType The motherboard type See Table 25 fro details char MotherBoardDesc 200 As short description of the motherboard E g Ballynuey2
61. direction of individual pins of the Digital I O connector A in a particular bit location sets that pin to an input otherwise the pins is an output Functionality not changed DIME_WritePIODirection handle dpioDIGITAL Data DIME_VirtexIntPin DWORD DIME_ VirtexIntPin DIME_HANDLE handle handle is a valid handle to a DIME carrier card If the interrupt pin on the FGPA is high then this returns otherwise it returns 0 Returns l on error This function returns the value on the Interrupt pin from the FPGA Simply calls DIME_InterruptStatus handle dintONBOARDFPGA dintPINVALUE DIME_InterruptStatus handle dintONBOARDFPGA dintPINVALUE DIME_InterfaceFlagBusy DWORD DIME_InterfaceFlagBusy DIME_HANDLE handle handle is a valid handle to a DIME carrier card Returns the status of the BUSY signal that is on the PCI to FPGA Interface When the BUSY signal is high this function returns a otherwise it returns a 0 When BUSY is high it indicates that the internal transfer buffer from the FPGA to the PCI is full and can not accept any more data The user application should initiate a data read at this stage Simply calls DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaBUSYFLAG DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaBUSYFLAG DIME_InterfaceFlagEmpty DWORD DIME_InterfaceFlagEmpty DIME_HANDLE handle handle is a valid handle to a DIME carrier card Returns the status of the EMPTY signal that is on the PCI t
62. e Description This function configures the on board FPGA of the targeted card in the same manner as DIME_ConfigOnBoardDevice The difference is that this function takes the Bitstream used to configure the device directly from memory and not from a file Notes The bit file must be configured to use the JTAG clock for configuration rather than the default of the CCLK 7 52 DIME Miscioctl Syntax DWORD DIME_Miscioctl DIME_HANDLE handle DWORD CMD DWORD Argl DWORD Arg2 DWORD Arg3 DWORD Arg4 void Arg5 Arguments handle is a valid handle to a DIME carrier card CMD The command to be performed Currently there are no commands Argl Arg2 Arg3 Arg4 and Arg5 are all dependant upon the command Return The return is dependant upon the selected command Description This function is used to control and return status information for the miscellaneous I O 7 53 DIME ModuleControl Syntax DWORD DIME_ModuleControl DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card ModuleNum is the module that is being addressed Note modules are numbered from 0 CmdMode This argument is used to specify what particular aspect of module is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Return Returns l on error Description This function is used to control certain aspects of the
63. e FES oss GN 02 E corel 0109 RIN 09525 FRENI Date 10 p oes aa Linear Sequence Clear to Zero Data 11 M Data 27 AOOHHOORTY Data 12 p Daae ROONOONTY Data 13 p Data 29 ODROOOOTTY PCI to Virtex FIFO Status Data 14 M pazzo ROOROODTTY PCI Vitex Write FIFO Ei gt Data 15 BOOOOOOO aes ORNOOOHON da TP Show Config en Wi Data 16 p Dates OOOO Vier Pa rom Read FIFO Empty io Close Uninstalling application software 8 To uninstall the FUSE software from your system select the Uninstall FUSE software option from the FUSE Software section within Programs of the Windows Start Menu 3 3 Software Installation Guide Linux On the Fuse CD there are 2 tgz files The first FuseLinux2 4 contains the all of the drivers and examples The second tgz file is FuseUserlInterface tgz this contains all of the files for the user interface The Linux installation for kernel version 2 4 is detailed below This installation has been tested on Redhat Standard installation 6 2 7 0 and 7 1 and Suse Linux installation 7 3 I Insert the installation CD 2 Mountthe installation CD gt mount t iso9660 dev cdrom mnt cdrom 3 Go to the area where you wish to install the software e g gt cd usr local nallatech 4 Unzip the files of the FuseLinux2 4 tgz gt tar xvzf mnt cdrom FuseLinux2 4 tgz 5 Unzip the files of the FuseUserInterface tgz file gt tar xvzf mnt cdrom FuseUserInterface tgz
64. e buyer s location If there is any documentation required for import formalities whether or not for the purposes of duty assessment the buyer shall make this clear at the time of order Quotations are made by Nallatech upon the customer s request but there is no obligation for either party until Nallatech accepts the customer s order Nallatech reserves the right to increase the price of goods agreed to be sold in proportion to any increase of costs to Nallatech between the date of acceptance of the order and the date of delivery or where the increase is due to any act or default of the customer including the cancellation or rescheduling by the customer of part of any order Nallatech reserves the right without prejudice to any other remedy to cancel any uncompleted order or to suspend delivery in the event of any of the customer s commitment with Nallatech not being met DELIVERY All delivery times offered by the company are to be treated as best estimates and no penalty can be accepted for non compliance with them Delivery shall be made by the company using a courier service of its choice The cost of the delivery plus a nominal fee for administration will be added to the invoice issued Payment of all inward customs duties and fees are the sole responsibility of the buyer If multiple shipments are requested by the buyer multiple delivery charges will be made In the case of multiple deliveries separate invoices will be rai
65. e return value is dependant upon the command mode Returns on error This function returns card status information DIME CardStatusPtr void DIME_CardStatusPtr DIME_HANDLE handle DWWORD CmdMode handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of card status information is to be returned The table below gives details of the available command modes CmdMode Description dinfDEFAULTIMAGE This command mode returns a string char which is the default image filename for the card dinfDEFAULTICON This command mode returns a string char which is the default icon filename for the card dinfFAILEDMDF This command mode returns a string char which is the last failed mdf dinflMAGEFILENAME This command mode returns a string char which is the image filename for the card dinflCONFILENAME This command mode returns a string char which is the icon filename for the card dinfDESCRIPTION This command mode returns a string char which is a short description of the card Table 4 DIME_CardStatusPtr CmdMode argument options The return value is dependant upon the command mode Returns NULL on error This function returns card status information that cannot be returned using DIME_CardStatus If a pointer to a string is returned this string is only valid until the next call is made into the library It is therefore advised t
66. e selected cards index This can be NULL for certain command modes CmdMode is the command mode for the status function This is used to specify what particular piece of information is required The table below gives details for the CmdMode argument diNUMCARDS This command mode returns the number of cards found by the locate No card number is required when this command mode is used dIMBTYPE Returns the motherboard type of the selected card dIINTERFACE Returns the interface type for the selected card dISERIALNUMBER Returns the serial number for the selected card diDRIVERVERSION Returns the software driver version number that will be used to control the selected card when it is opened DIME_OpenCard Table 29 DIME_LocateStatus CmdMode argument options Return Returns a DWORD that is dependant on the CmdMode argument Returns OxFFFFFFFF on error Description This function is used by the developer upon a successful return from a DIME_LocateCard function call to gather information on what has been located This is normally required for systems that contain multiple cards over various interfaces This information is then used to ensure that the desired card is opened and interfaced with NT107 0068 Issue 4 19 05 2003 www nallatech com 61 FUSE C C API Developers Guide FO _ include lt dimesdl h gt This is held in the include directory within FUSE include lt stdio h gt int main int
67. eFull DIME_HANDLE handle handle is a valid handle to a DIME carrier card This function returns a when the internal buffer from the PCI to the FPGA is full and hence cannot accept any more data from the user application The user application must therefore wait until the FPGA reads data before any more data will be transferred Calls DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaWRITEFULL DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaWRITEFULL DIME_JTAGTurboDisable void DIME_JTAGTurboDisable DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A This sets the cards JTAG chain to run at its default speed DIME_JTAGControl handle djtagCONFIGSPEED djtagDEFAULTSPEED DIME_JTAGTurboEnable void DIME_JTAGTurboEnable DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A This sets the cards JTAG chain to run faster than its default speed DIME_JTAGControl handle djtagCONFIGSPEED djtagMAXSPEED20 DIME_BootVirtexSingle DWORD DIME_BootVirtexSingle DIME_HANDLE handle const char FileName handle is a valid handle to a DIME carrier card FileName is the filename of the bit file that is to be used for booting the on board FPGA If successful this function returns a 0 otherwise a non zero result is returned on error and the device was not configured properly The return values are as listed for the function DIME_BootDevice www nallatech com NT107 0068 Issue 4 19 05 2003
68. een opened using the OpenDIMEBoard function DIME_CloseCard providing OpenDIMEBoard was not used to open the card OpenDIMEBoard DIME_HANDLE OpenDIMEBoard void N A Returns a handle for the card otherwise NULL is returned The return type DIME_HANDLE is defined as a void pointer This function will search the PCI interface for any Nallatech motherboard and then call DIME_OpenCard for the first Nallatech motherboard found Included only for backward compatibility When this function is used to provide a handle for a card the CloseDIMEBoard function must be used to close down the card This function cannot be used in conjunction with the DIME LocateCard or DIME_OpenCard functions It is strongly advised that DIME_LocateCard then DIME_OpenCard is used as shown in the code segment below as an alternative www nallatech com 75 FUSE C C API Developers Guide ro _ 76 LOCATE HANDLE hLocate DIME HANDLI E hCard Opening the card hLocate DIME LocateCard d1PCI mbtALL iL dldrDEFAULT dlDEFAULT hCard DIM E OpenCard hLocate 1 dccOPE EFAULT Main code Closing the card DIME CloseCard hCard DIME CloseLocate hLocate Figure Alternative to OpenDIMECard 8 3 GetDIMEHandle Syntax Arguments Return Description DIME_HANDLE GetDIMEHandle void N A Always returns NULL This function previously returned the handle that was last returne
69. em reset DIME Card tControl handle drSYSTEM drENABLE Disable the System reset DIME Card tControl handle drSYSTEM drDISABL Toggle the System set DIME Card tControl handle drSYSTEM drTOGGLI Toggl interface FPGA reset DIME Card trol handle drINTE E drToggle 0 Figure 2 Examples of using DIME_CardResetControl 7 5 DIME_CardResetStatus Syntax DWORD DIME_CardResetStatus DIME_HANDLE handle DWORD ResetNum DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ResetNum This argument is used to specify which reset status information is to be retrieved See Table for details CmdMode This argument is used to specify the command on the selected reset See Table 2 for details Return Returns on an invalid handle 0 on error and drCONTROLABLE or drTOGGLEONLY depending on the resets capabilities A return of drCONTROLABLE means that the reset can be toggled enabled or disabled A return of drTOGGLEONLY means that the reset can only be toggled Description This function allows the user to determine the capability of the selected reset Notes PCI resets are toggle only System and on board FPGA resets are controllable 7 6 DIME_CardStatus Syntax DWORD DIME_CardStatus DIME_HANDLE handle DWWORD CmdMode Arguments handle is a valid handle to a DIME carrier card CmdMode This argument is used to
70. etBits Filename 40 7 13 DIME_ConfigGetBitsMemory 41 7 14 DIME ConfigModule 4l 7 15 DIME ConfigOnBoardDevice 4l 7 16 DIME ConfigSetBitsFilename 42 7 17 DIME ConfigSetBitsFilenameAndConfig 42 7 18 DIME ConfigSetBitsMemory 43 7 19 DIME ConfigSetBitsMemoryAndConfig 43 7 20 DIME DataRead 44 7 21 DIME DataReadSingle 44 7 22 DIME DataVrrite 45 7 23 DIME_DataWriteSingle 45 7 24 DIME DeviceControl 46 7 25 DIME DeviceControlPtr 46 7 26 DIME DeviceStatus 46 7 27 DIME DeviceStatusPtr 48 7 28 DIME DMACI ose 48 7 29 DIME DMAControl 49 7 30 DIME_DMAOpen 50 7 31 DIME_DMARead 50 7 32 DIME_DMAReadToLockedMem 5I 7 33 DIME_DMAStatus 5I 7 34 DIME_DMAWrite 53 7 35 DIME_ DMAVrriteFromLockedMem 54 7 36 DIME_GetError 54 7 37 DIME GetLocateVersionNumber 55 7 38 DIME_ GetVersionNumber 55 7 39 DIME InterruptControl 55 740 DIME_InterruptStatus 56 7 41 DIME JTAGControl 58 7 42 DIME JTAGStatus 58 743 DIME LoadCardDefinition 59 7 44 DIME LoadSystemDefinition 59 7 45 DIME LocateCard 59 7 46 DIME_LocateStatus 61 7 47 DIME LocateStatusPtr 62 7 48 DIME LockMemory 63 749 DIME_MConfigGUl 63 7 50 DIME MemConfigDevice 64 7 51 DIME MemConfigOnBoardDevice 64 7 52 DIME_Miscioctl 65 7 53 DIME_ModuleControl 65 7 54 DIME_ModuleControlPtr 65 7 55 DIME_ModuleStatus 66 7 56 DIME_ModuleStatusPtr 66 7 57 DIME_OpenCard 66 6 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide 7 58 DIME_Peripheralioctl 67 7 59 DIME_PPSControl 67 7 60
71. f a the specified bit file could not be successfully opened Indicates that the JTAG integrity scan check has failed and the chain is apparently incomplete Configuration Status DONE Low INIT Low No CRC errors detected Configuration Status DONE Low INIT Low CRC errors detected Configuration Status DONE Low INIT high No CRC errors detected Configuration Status DONE Low INIT high CRC errors detected Configuration Status DONE high INIT low No CRC errors detected Configuration Status DONE high INIT low CRC errors detected Configuration completed successfully as indicated by read back of FPGA Status register DONE high INIT high No CRC errors detected Configuration Status DONE high INIT high CRC errors detected Multiple Configuration Licence not available Unidentifiable configuration result www nallatech com 81 FUSE C C API Developers Guide FO _ 82 Description This is the main function used for carrying out the actual configuration sequence of a specific single Programmable Logic device The main arguments apart from handle to denote if a card has actually been detected are ModuleNumber and ModuleDeviceNumber These are used to identify a particular device in the JTAG chain and provides enough information to configure the selected device Alternative DIME_ConfigDevice handle FileName ModuleNumber ModuleDeviceNumber Progress 0 8 25 DIME SetFilename Syntax DWO
72. face connected to the on board FPGA of the DIME motherboard The memory pointed to by SrcData does not need to be contiguous as this function will handle the internal transfer and memory management 7 36 DIME_GetError Syntax void DIME_GetError DIME_HANDLE handle DWORD ErrNumber char ErrString Arguments handle is a valid handle to a DIME carrier card ErrNumber is a pointer to the memory where the error number will be returned ErrString is a pointer to the start of the memory where the error string will be written Return N A Description This function allows information the developer to gather information relating to the last error that occurred in the system This is particularly useful if the system dialogue boxes have been disabled using DIME_SystemControl Notes It is up to the developer to allocate any memory that either the ErrNumber or the ErrString arguments require 1000 characters is the maximum error string length Example 54 www nallatech com NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide Example of using DIME GetError Note DIME CardStatusPtr is deliberately getting called with an invalid command mode to generate an error if DIME CardStatusPtr hCard dinfYOFFSET NULL DWORD ErrorNumber char ErrorString 1000 DIME GetError hCard amp ErrorNumber ErrorString printf Error number d n ErrorNumber printf ErrorString
73. hat either the string is used directly or that it is copied for later use DIME_CloseCard void DIME_CloseCard DIME_HANDLE CardHandle handle is a valid handle returned from DIME_OpenCard N A This function closes down the handle returned from DIME_OpenCard It de allocates all system resources that where used when interfacing with the card www nallatech com NT107 0068 Issue 4 19 05 2003 PU _ z FUSE C C API Developers Guide Notes Call this function after your application has finished using the card to ensure that the card is closed properly and all systems resources that where used are available for other applications Example include lt dimesdl h gt This is held in the include directory within FUSE DIME HANDLE hCardl LOCATE HANDLE hLocate DWORD LEDs Locate the Cards on the PCI interface hLocate DIME LocateCard d1PCI mbtALL NULL dldrDEFAULT d1DEFAULT Open the first card found in the locate hCardl DIME OpenCard hLocate 1 dccOPEN DEFAULT Change the LEDs LEDs DIME ReadLEDs hCardl DIME WriteLEDs hCardl LEDs 1 C1 the card down DIME oseCard hCardl Fi ly close the locate down DIME oseLocate hLocate Figure 3 Locating Opening and Closing a card 7 9 DIME_CloseLocate Syntax void DIME_CloseLocate LOCATE_HANDLE LocateHandle Arguments handle is a valid handle retur
74. he values to be written to the pins on the digital IO connector Returns 0 on success Returns non zero on error Simply calls DIME _WritePIO handle dpioDIGITAL Data Functionality not changed Writes the pins on the digital IO connector DIME_VrritePIO handle dpioDIGITAL Data DIME_ReadDigitallODirection DWORD DIME_ReadDigitallODirection DIME_HANDLE handle handle is a valid handle to a DIME carrier card A P ina particular bit location indicates that the pin is an input otherwise the pins is an output Returns l on error Simply calls DIME_ReadPlODirection handle dpioDIGITAL Functionality not changed Reads the pins on the digital IO connector DIME_ReadPIODirection handle dpioDIGITAL DIME_WriteDigitallODirection DWORD DIME_WriteDigitallODirection DIME_HANDLE handle DWORD Data handle is a valid handle to a DIME carrier card Data is the data used to set the direction of individual pins www nallatech com NT107 0068 Issue 4 19 05 2003 Return Description Alternative 8 16 Syntax Arguments Return Description Alternative 8 17 Syntax Arguments Return Description Alternative 8 18 Syntax Arguments Return Description Alternative 8 19 Syntax Arguments NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide Returns zero on success non zero on error Simply calls DIME_VrritePIODirection handle dpioDIGITAL Data This function sets the
75. his is used to disable the selected interrupt Returns zero on success non zero otherwise dintWAIT This causes the function to wait for the selected interrupt to occur providing that the interrupt has been enabled Returns zero on success non zero otherwise Table 17 DIME_InterruptControl CmdMode argument options NT107 0068 Issue 4 19 05 2003 www nallatech com 55 FUSE C C API Developers Guide FO _ 56 Return Description Example Value This is used in the control to specify whether the interrupt is to be a blocking or non blocking interrupt This is only used in the dintWAIT command mode The table below gives details of the available Values Value Description dintBLOCKING Blocks the threads execution until the interrupt occurs dintNONBLOCKING Does not block the threads execution Table 18 DIME_InterruptControl Value argument options Returns all 1 on error otherwise the return is dependant on the command mode This function is used to control the interrupts on the card It allows the interrupts to be enabled disabled and allows your program to wait and act on interrupts generated by your design All interrupts are genuine hardware interrupts interrupt code Obviously your design needs to use this the interrupt Answer DIME InterruptControl hCard dintONBOARDFPGA dintENABLE dintBLOCKING 0 printf On board FPGA Interrupt Enabled n
76. ials in one version on a single computer In no event may you use two copies of the Licensed Materials at the same time 4 Warranty Nallatech Ltd warrants the media to be free from defects in material and workmanship and that the software will substantially conform to the related documentation for a period of ninety 90 days after the date of your purchase Nallatech Ltd does not warrant that the Licensed Materials will be free from error or will meet your specific requirements 5 Limitations Nallatech Ltd makes no warranty or condition either expressed or implied including but not limited to any implied warranties of merchantability and fitness for a particular purpose regarding the Licensed Materials Neither Nallatech Ltd nor any applicable Licenser will be liable for any incidental or consequential damages including but not limited to lost profits 6 Export Control The Software is subject to the export control laws of the United States and of the United Kingdom The Software may not be shipped transferred or re exported directly or indirectly into any country prohibited by the United States Export Administration Act 1969 as amended and the regulations there under or be used for any purpose prohibited by the Act User Guide Conditions Information in this User Guide is subject to change without notice Any changes will be included in future versions of this document Information within this manual may include technical typing o
77. igured Table 9 Device Types JTAG device ID Description JTAG device Description code ID code 0 Invalid arguments didXCV50E Xilinx Virtex E device V50 didXCV50 Xilinx Virtex device V50 didXCV I 00E Xilinx Virtex E device V100 didXCV100 Xilinx Virtex device V100 didXCV200E Xilinx Virtex E device V200 didXCV150 Xilinx Virtex device V100 didXCV300E Xilinx Virtex E device V300 didXCV200 Xilinx Virtex device V200 didXCV400E Xilinx Virtex E device V400 didXCV300 Xilinx Virtex device V300 didXCV600E Xilinx Virtex E device V600 didXCV400 Xilinx Virtex device V400 didXCV I 000E Xilinx Virtex E device V1000 didXCV600 Xilinx Virtex device V600 didXCV I 600E Xilinx Virtex E device V 1600 didXCV800 Xilinx Virtex device V800 didXCV2000E Xilinx Virtex E device V2000 didXCV 1000 Xilinx Virtex device V1000 didXCV2600E Xilinx Virtex E device V2600 didXCV405EM Xilinx Virtex EM device V405 didXCV3200E Xilinx Virtex E device V3200 didXCV812EM Xilinx Virtex EM device V812 didXC18VO1 Xilinx 1800 PROMs VOI didXC2S50 Xilinx Spartan 2 S50 didXC18V02 Xilinx 1800 PROMs V02 didXC2S100 Xilinx Spartan 2 100 didXC18V04 Xilinx 1800 PROMs V04 didXC2S150 Xilinx Spartan 2 150 didXC18V256 Xilinx 1800 PROMs V256 didXC2S200 Xilinx Spartan 2 200 didXC18V512 Xilinx 1800 PROMs V512 XC9536 Xilinx 9536 CPLD XC9536XL Xilinx 9536XL CPLD XC9572 Xilinx 9572 CPLD XC9572XL Xilinx 9572XL CPLD XC95108 Xilinx 95108 CPLD XC95
78. inter of type CHAR to a string that is a short description of the software driver for the chosen card Return Description Notes Example 62 Table 30 DIME_LocateStatusPtr CmdMode argument options See table above since the return dependant on CmdMode This function is used by the developer upon a successful return from a DIME_LocateCard function call to gather information on what has been located This is normally required for systems that contain multiple cards over various interfaces This information is then used to ensure that the desired card is opened and interfaced with Copy the string into your own programs memory space immediately after the function returns since the pointer may only be valid until the next call into the library See Figure 7 Getting information on the located cards www nallatech com NT107 0068 Issue 4 19 05 2003 _ i FUSE C C API Developers Guide 7 48 DIME LockMemory Syntax DIME_MEMHANDLE DIME_LockMemory DIME_HANDLE handle DWORD Data DWORD Length Arguments handle is a valid handle to a DIME carrier card Data This a pointer to the start of the data that is required to be locked down Length This is the byte size of the memory that is to be locked down Return Returns a null pointer on error On success returns a memory handle Description When performing PCI DMA transfers the physical memory that your data resides in needs to locked down by the kernel This function does exactly th
79. ion The blue i symbol indicates useful or important information Q The red symbol indicates a warning which requires special attention 1 2 References Nallatech Application Note NT 302 0000 PCI to User FPGA Interface Core Nallatech Application Note NT 302 0026 Threaded interrupts 1 3 Abbreviations FUSE Field Upgradeable Systems Environment JTAG Joint Test Access Group DIME DSP and image Processing modules for Enhanced FPGAs FPGA Field Programmable Gate Array SDL Software Developer Layer DMA Direct Memory Access GUI Graphical User Interface OS Operating System CPU Central Processing Unit NT107 0068 Issue 4 19 05 2003 www nallatech com 13 FUSE C C API Developers Guide PO _ FIFO First In First Out MDF Module Definition File BDF Board Definition file DLL Dynamic load library API Application Programming Interface 14 www nallatech com NT107 0068 Issue 4 19 05 2003 Section 2 Product Overview In this section FUSE API Description Key Features FUSE API Details 2 1 FUSE API Description The FUSE API is a pure software product that allows the Nallatech hardware to be easily integrated with software removing any interfacing issues Developers can develop their own applications using the FUSE API in addition to their own code to interface directly with their Nallatech hardware 2 2 Key Features The Key features of the FUSE C
80. irst checks that a valid card has in fact been successfully opened if not a 0 is returned The function accesses the internal data structure of board information and returns the value for the number of modules detected in the current board set up The on board FGPA device is counted as a module itself DIME_CardStatus handle dinfNUMBERMODULES DIME_GetFailedMDFFileName const char DIME_GetFailedMDFFileName DIME_HANDLE handle handle is a valid handle to a DIME carrier card The filename can be returned through the use of this function If a card has not successfully been opened then NULL is returned otherwise the MDF filename is returned When opening the card a number of associated Module Definition Files are read into the program If there is a problem with a required MDF file then the card will not be opened DIME_CardStatusPtr handle dinfFAILEDMDF DIME_GetModuleDIMECode DWORD DIME_GetModuleDIMECode DIME_HANDLE handle DWORD ModuleNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number The function accesses the internal data structure of board information and returns the 32 bit hexadecimal DIME Code User Code for the specified module On error 0 is returned Please refer to the modules user guide for the code details The function also checks that the specified module number is not greater than the total number of modules detected on the board DIME_ModuleStatus
81. is argument is 0 the interface FPGAs FIFOs are to be read WordCount This is the number of 32 bit words to be read Flags This argument allows the DMA transfer to be customised to suit your development requirements The flags are bit wise so multiple flags can be combined The table below gives details for the Flags Obviously directly conflicting flags such as ddmaBLOCKING and ddmaNONBLOCKING should not be combined In this case the flag that sets the bit will be taken In this case the transfer would be set to be non blocking Flags Description ddmaPHYSICALADDR This is only valid in multiple card systems where DMA transfer is between two cards In this case the local address is actually a physical address and this flag should be used Please check the motherboards user guide for details ddmalNITWORDADDR This flag should be used when the initial word of the data is an address Table 14 DMA transfer functions Flags argument options Return There are several possible returns for the DMA transfer The table below gives details DMA transfer function return Description 50 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide ddmaOK The DMA transfer was a success ddmalINVALID_ HANDLE The DMA transfer could not begin since one of the handles where invalid ddmaMEM_ERROR There are insufficient system resources to carry out the transfer Please free some resources by closing
82. is a flag for the visibility of the form Return N A www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Description This function changes whether the Multiple DIME configuration window is visible or not Notes The nueym lib needs to included in your design when using this function This library is installed in the include directory of the FUSE software This is an OMF format library for use with Borland projects If access to this function is required from a Microsoft Visual Studio project then please contact nallatech support 7 68 DIME SystemControl Syntax DWORD DIME_SystemControl DIME_HANDLE handle DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of system information is to be controlled The table below gives details of the available command modes CmdMode Description dinfDIME_MODE_GUI Controls whether dialog boxes are displayed within the SDL or whether no dialog boxes are displayed so that the calling applications can control any error message boxes If the Value argument is dinfDISABLE then dialogue boxes will not be displayed If the Value argument is dinfENABLE then dialogue boxes will be displayed Note that the actual error will not be altered by this function and the DIME_GetError can be used to return the error information Returns 0 on success Table 36
83. is and returns a handle to the locked down memory that can then be passed into the DMA functions Notes Locking down and unlocking memory takes a significant amount of time and should therefore be minimised Please refer to the DMA examples for further information on efficient memory usage When dealing with transferring data between multiple cards one of which is connected via the USB interface the memory should be locked down using the PCI card handle This allows the one memory handle to be used with both cards and saves needless data transfers Locking memory prevents the OS kernel from moving the memory around and hence decreases the kernel efficiency Therefore locking down one large segment of memory is better practice than locking down several smaller segments Example DWORD DataArray 256 DIME MEMHANDLE hMem DWORD i Put data in the array for i 0 i lt sizeof DataArray sizeof DWORD it DataArray i i Lock down the memory if hMem DIME LockMemory hCard DataArray sizeof DWORD sizeof DataArray NULL printf Unable to lock down the data n else printf Data locked down n Do DMA transfer Unlock the memory if DIME UnLockMemory hCard hMem 0 printf Data unlocked n else printf Unable to unlock the memory n Figure 8 Locking and Unlocking memory for DMA transfers 7 49 DIME MConfigGUI Syntax void DIME_MConfigGUI voi
84. ition filenames that correspond with the card handle array SysFilename is a pointer to the system definition filename to be created NumOfCards is the number of cards that are to be used to create this system This number should correspond with the number of elements in the handles array and the CardFilenames array Flags This argument is used to customise the saving of the system definition file Currently there are no flags and this argument is not used 0 Should be used Return Returns 0 on success Returns non zero otherwise Description This function takes a group of card handles and card definition files and creates one system definition file This file can then be used to load the complete system without the requirement of locating or opening the cards NT107 0068 Issue 4 19 05 2003 www nallatech com 69 FUSE C C API Developers Guide PO __ 70 Notes The system definition file that is created does not incorporate the information held within the card definition files Hence to successfully load a system definition file the card definition files for each card in the system must be in the same location that they where in when the system definition file was created 7 66 DIME_SetOscillatorFrequency Syntax DWORD DIME_ SetOscillatorFrequency DIME_HANDLE handle DWORD OscillatorNum double DesiredFrequency double ActualFrequency Arguments handle is a valid handle to a DIME carrier card OscillatorNum determines which clock
85. le to a DIME carrier card Data is a pointer to the PC memory which receives data from the card This should be 32 bit aligned Terminate is not used Timeout this is the maximum time in milliseconds that the transfer is allowed to take If all the data has not been transferred within this time period the transfer is terminated and an error condition is returned If this is set to zero then the timeout is effectively infinite 44 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of a single 32bit word from the Interface with the on board FGPA of the DIME Motherboard and places this 32bit word into the PC memory pointed to by Data Notes This function should only be used in single card systems In systems with more than one card it is strongly advised that the DIME_DMA functions are used instead 7 22 DIME_DataWrite Syntax DWORD DIME_DataWrite DIME _HANDLE handle DWORD Data DWORD WordCount volatile DWORD Terminate DWORD Currcount DWORD Timeout Arguments handle is a valid handle to a DIME carrier card Data is a pointer to the PC memory which holds the data to be written This should be 32 bit aligned WordCount is the number of 32bit words to transfer Terminate is not used Currcount points to memory location which holds the current total of word
86. le to a DIME carrier card ModuleNum This is the module number CmdMode This argument is used to specify what particular aspect of programmable power supplies information is required There are no current command modes for this function Return The return is dependant upon the selected command mode Description Returns status information for the programmable power supplies 7 61 DIME_ReadLEDs Syntax DWORD DIME_ReadLEDs DIME_HANDLE handle Arguments handle is a valid handle to a DIME carrier card Return This returns the current setting of the LEDs which are controlled via the PCI interface Description The values are stored in the least significant bits with a value of 0 indicating that the LED is illuminated If a valid card has not been opened then a 0 is returned by the function The number of active bits depends on the number of LEDs on the motherboard Please check your motherboards user guide for details on the LEDs Example See Figure 3 Locating Opening and Closing a card 7 62 DIME_ReadPIO Syntax DWORD DIME_ReadPIO DIME_HANDLE handle DWORD Bank Arguments handle is a valid handle to a DIME carrier card Bank is used to indicate which bank of periphery IO is to be read The table below gives details of the available banks Description dpioDIGITAL This is the digital IO Data will be read from the digital IO connector Table 34 Periphery I O Bank argument options Please check your motherboards user
87. lowing screen will appear A WESMICECENCEN FUSE Systems Sofware tor DIME Install FUSE Application Software Browse Nallatech WebSite View Documentation Explore Application Notes Folder Technical Support Explore CD ROM 2 Click the option Install Application FUSE Software NT107 0068 Issue 4 19 05 2003 www nallatech com 19 FUSE C C API Developers Guide _ 3 The installation process begins It uses a standard installation interface with which most users will be familiar Work through the dialog boxes filling in details as required until the Finish dialog box is reached 4 8 Click Finish to install the software 5 The PC then needs restarted to complete the installation Initial Confidence Test After rebooting the machine and installing the DIME hardware as described in the hardware s User Guide the run the Probe Utility from the Start Menu Programs Fuse Software If the software and drivers have been installed correctly and the hardware is present in the PC a screen similar to that below will appear F N Ballynuey Probe Tool 1 1 Multiple Configuration Option BEE Data Values In Hexadecimal Daal foooo0000 Data pom Vikex DAE Vitex Address Misc Oscilators Daa2 p oaas ooo Number of Words to Transfer D a3 p Dataa BOOROONTTT ee cs po FE pass GEO 08521 RT oac RI 02522 TT baa FONNI csc fimo vec
88. ned from DIME_LocateCard Return N A Description This function closes down the handle returned from DIME_LocateCard Notes This function should be the final function called and should only be used after all the cards that were opened using this locate handle have been closed down Example See Figure 3 Locating Opening and Closing a card 7 10 DIME_ConfigCard Syntax DWORD DIME_ConfigCard DIME_HANDLE handle DWORD ModuleProgress DWORD DeviceProgress DWORD ConfigProgress Arguments handle is a valid handle to a DIME carrier card ModuleProgress is the progress through the modules DeviceProgress is the progress through the device ConfigProgress is the progress through a configuration Return The function simply returns the last value returned from the configuration of a module A return of I indicates an invalid carrier card Description The function simply iterates through each of the detected modules and calls the DIME_ConfigModule function The function continues to iterate through the configuration of each module until a module returns a boot result that is not equal to NT107 0068 Issue 4 19 05 2003 www nallatech com 39 FUSE C C API Developers Guide PO _ defgOK_NOSTATUS dcefgDL_IH_NOCRC or defgOK_STATUS When this happens the invalid boot result is returned 7 11 DIME_ConfigDevice Syntax DWORD DIME_ConfigDevice DIME_HANDLE handle const char FileName DW
89. nfiguration These functions are used to configure devices such as FPGAs and for assigning designs to devices 32 DIME_ConfigOnBoardDevice DIME_MemConfigOnBoardDevice DIME_ConfigDevice DIME_MemConfigDevice DIME_ConfigModule DIME_ConfigCard DIME_ConfigSetBitsFilename DIME_ConfigSetBitsMemory DIME_ConfigSetBitsFilenameAndConfig DIME_ConfigSetBitsMemoryAndConfig DIME_ConfigGetBitsFilename www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide DIME_ConfigGetBitsMemory 6 9 Card System definition files These functions allow the user to create card and system definition files that allow faster loading ofboth cards and systems DIME SaveCardDefinition DIME LoadCardDefinition DIME SaveSystemDefinition DIME LoadSystemDefinition 6 10 JTAG These functions allow control over the JTAG chain DIME JTAGStatus DIME JTAGControl 6 11 System information and control These functions enable the FUSE API to be controlled to suit the developers needs and for system information to be obtained DIME SystemStatus DIME SystemControl DIME SystemStatusPtr DIME Geterror DIME_GetLocateVersionNumber DIME GetVersionNumber 6 12 Card Module Device information These functions allow control over various aspects of the cards modules and devices DIME_CardStatus DIME_CardControl DIME_CardStatusPtr DIME CardControlPtr DIME ModuleStatus DIME ModuleControl D
90. nnel is active Returns a 0 if not ddmalINTERUPTABLE Returns a I if the DMAChannel is interruptible Returns a 0 if not ddmaNONBLOCKINGSUPPORT Returns a I if the DMAChannel supports non blocking DMA transfers Returns a 0 if not ddmaLOCALINCFLAG Returns a l if the DMAChannel at the local side the PC in the majority of cases supports incremental addressing Return a 0 if not ddmaREMOTEINCFLAG Returns a l if the DMAChannel at the remote side the card in the majority of cases supports incremental addressing Returns a 0 if not ddmaLOCALNOINC Returns a I if the DMAChannel can do no incrementing on local addresses Returns a 0 if not ddmaREMOTENOINC Returns a I if the DMAChannel can do no incrementing on remote addresses Returns a 0 if not ddmaTIMEOUT Returns the DMA timeout value for DMA transfers This is defaulted to 5000 milli seconds ddmaCURRCOUNT Returns the current word count of any DMA transfer This is useful feedback to the application This can be used in multi threaded applications to monitor the progress of the data transfer In single threaded applications it can be used to return the total number of words transferred ddmaEMPTYFLAG When EMPTY is high it indicate that there is no data waiting to be transferred to the FPGA i e the FPGA application has read all the available d
91. ns 66 Table 33 DIME_OpenCard Flags argument options 67 Table 34 Periphery I O Bank argument options 68 Table 35 DIME_SaveCardDefinition Flags argument options 69 Table 36 DIME_SystemControl CmdMode argument options 71 Table 37 DIME_SystemControl Value argument options 71 Table 38 DIME_SystemStatus CmdMode argument options 71 Table 39 DIME_SystemStatusPtr CmdMode argument options 72 Table 40 Type SWMBiInfo members 72 Table 41 Type CardInfo members 72 10 www nallatech com NT107 0068 Issue 4 19 05 2003 FUSE C C API Developers Guide Part Introduction This part of the User Guide contains information describing the format of this document referenced documents and a basic overview of the FUSE C C API in the following Sections Section Preface Section 2 FUSE C C API Overview NT107 0068 Issue 4 19 05 2003 www nallatech com Il FUSE C C API Developers Guide PO _ 12 www nallatech com NT 107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide Section Preface In this section About this User Guide a Abbreviations 1 1 About this User Guide This user guide provides detailed information on installing and using the FUSE C C API The main focus of the user guide is to provide information that allows the user to become acquainted with the FUSE C C API and the functionality it provides Throughout this document there are symbols to draw attention to important informat
92. ns the 32 bit hex decimal JTAG device ID code for the device See Table 10 for details dinfDEVICETYPE This command mode returns the device type for the device See Table 9 for details dinfXOFFSET This command mode returns the x co ordinate from the left most edge of the module image which is used to position the device image correctly on the module image This is only useful information when wishing to display an image of the device on the module dinfY OFFSET This command mode returns the y co ordinate from the bottom most edge of the module image which is used to position the device image correctly on the module image This is only useful information when wishing to display an image of the device on the module dinfWIDTH This command mode returns the width of the device image This is only useful information when wishing to display an image of the device on the module dinfHEIGHT This command mode returns the height of the device image This is only useful information when wishing to display an image of the device on the module Table 8 DIME_DeviceStatus CmdMode argument options Return The return value is dependant upon the command mode Returns on error Description This function returns device status information Notes Device Type Description dinfDEVICEBOOTABLE The device is configurable dinfDEVICEBYPASS The device is a bypass device dinfDEVICENOBOOT The device cannot be conf
93. nt can be NULL if not used Timeout is the maximum time in milliseconds that the transfer is allowed to take If all the data has not been transferred within this time period the transfer is terminated and an error condition is returned If this is set to zero then the timeout is effectively infinite Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of a single 32bit word from the PC memory pointed to by Data to the Interface connected to the on board FPGA of the DIME Motherboard In this case the AS DS line of the FPGA interface is asserted to indicate that address data is being passed on the Data lines Notes This function should only be used in single card systems In systems with more than one card it is strongly advised that the DIME_DMA functions are used instead 7 2 DIME_CardControl Syntax DWORD DIME_CardControl DIME_HANDLE handle DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify what particular aspect of a card is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Return Returns l on error Description This function is used to control certain aspects of the card NT107 0068 Issue 4 19 05 2003 www nallatech com 35 FUSE C C API Developers Guide PO _ 7 3
94. nt is the number of 32bit words to transfer Terminate is not used Currcount points to memory location that holds the current total of words transferred this is useful for feedback to the application This argument can be NULL if not used This argument can be used in multi threaded applications to monitor the progress of the data transfer In single threaded applications it can be used to return the total number of words transferred Timeout this is the maximum time in milliseconds that the transfer is allowed to take If all the data has not been transferred within this time period the transfer is terminated and an error condition is returned If this is set to zero then the timeout is effective infinite Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of WordCount 32bit words from the Interface with the on board FGPA of the DIME Motherboard to the PC memory pointed to by Data The memory pointed to by Data does not need to be contiguous as this function will handle the internal transfer and memory management Notes This function should only be used in single card systems In systems with more than one card it is strongly advised that the DIME_DMA functions are used instead 7 21 DIME DataReadSingle Syntax DWORD DIME_DataReadSingle DIME _HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout Arguments handle is a valid hand
95. o FPGA Interface When the EMPTY signal is high this function returns a otherwise it returns a 0 When EMPTY is high it indicate that there is no data waiting to be transferred to the FPGA i e the FPGA application has read all the available data that has been transferred via a PCI write operation Calls DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaEMPTYFLAG DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaEMPTYFLAG DIME_InterfaceFlagVirtexReadEmpty DWORD DIME_InterfaceFlagVirtexReadEmpty DIME_HANDLE handle handle is a valid handle to a DIME carrier card www nallatech com 79 FUSE C C API Developers Guide PO _ 80 Return Description Alternative 8 20 Syntax Arguments Return Description Alternative 8 21 Syntax Arguments Return Description Alternative 8 22 Syntax Arguments Return Description Alternative 8 23 Syntax Arguments Return If there is no data in read buffer to be accessed this function will return 0 however will be returned if there is data waiting to be read This function returns the status of the internal buffer between the FPGA and the PCI interface Therefore when the function returns a 0 the data is available to be read DIME_DataRead or DIME_DataReadSingle Calls DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaREADEMPTY DIME_DMAStatus handle ddmaALLDMACHANNELS ddmaEMPTYFLAG DIME_InterfaceFlagVirtexWriteFull DWORD DIME_InterfaceFlagVirtexWrit
96. o save the bit streams themselves If this is desired then this flag should be used This flag actually saves the bit streams from the assigned bit files or the assigned bit streams for each device on the card into the card definition file This file can then be used to completely configure the card It is the only file required Note If there are several bit streams associated to large devices then the saved card definition file will become very large Table 35 DIME_SaveCardDefinition Flags argument options Return Returns a pointer to the start of the bit stream that has been assigned to the selected device If no bit stream has been set for the device then a NULL pointer is returned Description This function should be used to save information regarding the current configuration of your card to a file Information such as the modules devices and the assigned bit files bit streams to particular devices is all saved Notes By using the dcfgEMBEDALLBITS flag a complete system snapshot is created This can be very useful for back up purposes or when porting the set up to different PCs 7 65 DIME_SaveSystemDefinition Syntax DWORD _ DIME_SaveSystemDefinition DIME _HANDLE handles char CardFilenames const char SysFilename DWWORD NumOfCards DWORD Flags Arguments handles is a pointer to an array containing the valid card handles for the system CardFilenames is a pointer to an array containing the card defin
97. odules detected on the board The function accesses the internal data structure of board information and returns the description for the specified module DIME_ModuleStatusPtr handle ModuleNumber dinfDESCRIPTION DIME_GetModulelconFilename const char DIME_GetModulelconFilename DIME_HANDLE handle DWORD ModuleNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number The function accesses the internal data structure of board information and returns the complete path and filename for the icon representing the specified module The function first checks that a valid card has in fact been successfully opened if not a NULL is returned The function also checks that the specified module number is not greater than the total number of modules detected on the board If an icon has not been specified in the MDF associated with the module a default icon filename is loaded DIME_ModuleStatusPtr handle ModuleNumber dinflCONFILENAME DIME_GetModulelmageFilename const char DIME_GetModulelmageFilename DIME_HANDLE handle DWORD ModuleNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number The function accesses the internal data structure of board information and returns the complete path and filename of the Image representing the specified module The function first checks that a valid card has in fact been successfully opened if not a NULL is ret
98. ointer is returned Description This function returns the filename that is assigned to a device 7 13 DIME_ConfigGetBitsMemory Syntax DWORD DIME_ConfigGetBitsMemory DIME _HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD ByteLength Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the number of the selected module DeviceNumber is the number of the selected device ByteLength is the address of the location that the byte length of the assigned bit stream will be placed Return Returns a pointer to the start of the bit stream that has been assigned to the selected device If no bit stream has been set for the device then a NULL pointer is returned Description This function returns the pointer to the start of the bit stream that is assigned to a device 7 14 DIME_ConfigModule Syntax DWORD DIME_ConfigModule DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceProgress DWORD ConfigProgress Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the Number of the selected module DeviceProgress is the progress through the device ConfigProgress is the progress through a configuration Return The function simply returns the last value returned from the configuration of a device A return of I indicates a non configuration error Description The function iterates through each of the devices in a specified module and will configure each device using DIME_ConfigDevice
99. ol DWORD DIME_JTAGControl DIME _HANDLE handle DWORD CmdMode DWORD Value handle is a valid handle to a DIME carrier card CmdMode This argument is used to specify which particular aspect of the JTAG chain is to be returned The table below gives details CmdMode Description djtagCONFIGSPEED The will set the current speed that the cards JTAG chain is running at The value argument is then taken and the cards chain is set as close to the specified value as possible This will return a zero on success Please consult your motherboards user guide for further details on the JTAG chain Table 21 DIME_JTAGControl CmdMode argument options Value is used to specify the value that the chain is to be driven at The table below gives details Value Description djtagDEFAULTSPEED This is the default speed for the JTAG chain on the card Please consult your motherboards used guide for more details djtagMAXSPEED This will attempt to set the cards JTAG chain to IMHz djtagMAXSPEED2 This will attempt to set the cards JTAG chain to 2MHz djtagMAXSPEED5 This will attempt to set the cards JTAG chain to 5MHz djtagMAXSPEED 10 This will attempt to set the cards JTAG chain to OMHz djtagMAXSPEED20 This will attempt to set the cards JTAG chain to 20MHz djtagMAXSPEED30 This will attempt to set the cards JTAG chain to 30MHz djtagMAXSPEED40 This will attempt to set the cards JTAG chain to 40MHz djtag
100. on is used to control certain aspects of the selected device 7 25 DIME_DeviceControlPtr Syntax DWORD DIME_DeviceControlPtr DIME_HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMode void pValue Arguments handle is a valid handle to a DIME carrier card ModuleNum is the Module that is being addressed Note modules are numbered from 0 DeviceNum is the number of the device that is being addressed CmdMode This argument is used to specify what particular aspect of device is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Return Returns NULL on error Description This function is used to control certain aspects of the card that cannot be controlled using DIME_DeviceControl 7 26 DIME_DeviceStatus Syntax DWORD DIME_DeviceStatus DIME_HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ModuleNum is the Module that is being addressed Note modules are numbered from 0 DeviceNum is the number of the device that is being addressed CmdMode This argument is used to specify what particular aspect of device status information is to be returned The table below gives details of the available command modes 46 www nallatech com NT107 0068 Issue 4 19 05 2003 PO _ FUSE C C API Developers Guide CmdMode Description dinfDEVICEIDCODE This command mode retur
101. opers Guide PO _ 90 www nallatech com NT 107 0068 Issue 4 19 05 2003 Section 9 Version History List In this section Version histories that detail all changes made to the FUSE API 9 1 New in version 1 6 Fix Several minor bug fixes to the API Fix When using DIME_DataRead and DIME_DataWrite for transfers greater than 32768 words the transfer will return a timeout error Transfers greater than 32K words are now allowed Fix DIME DMARead and DIME_DMAWrite where previously only locking down of the required memory for the transfer This has been fixed so the correct amount of memory is locked down Enhancement DIME_PPSStatus and DIME_PPSControl now have a supply number argument added NT107 0068 Issue 4 19 05 2003 www nallatech com 91 FUSE C C API Developers Guide PO _ 92 Standard Terms and Conditions GENERAL These Terms and Conditions shall apply to all contracts for goods sold or work done by Nallatech Limited hereinafter referred to as the company or Nallatech and purchased by any customer hereinafter referred to as the customer Nallatech Limited trading in the style Nallatech the company submits all quotations and price lists and accepts all orders subject to the following conditions of contract which apply to all contracts for goods supplied or work done by them or their employees to the exclusion of all other representations conditions or warranties express or implied
102. or this card n if Answer DIME InterruptStatus hCard dintONBOARDFPGA dintAVAILABLE dintONBOARDFPGA printf The on board FPGA interrupt is available for this card n if Answer DI dint f The terruptStatus hCard di ODULE1 dintAVAILABLI E lt 1 interrupt is availab this card n terrupts s hCard din E2 dintAVAILABL E2 2 inter t is availab this card n terrupts s hCard din E3 dintAVAILABL E3 3 interrupt is availab this card n terruptStatus hCard din E4 dintAVAILABL E4 4 interrupt is availab this card n sz E u u do Ol O Gus O O lt 0O G Fi OO Elo c C boo AMS DI P FI DI FPQHAGHHUHFREH is O Gl printf The current state of the on board FPGA interrupt pin is Sd n InterruptStatus hCard dintONBOARDFPGA dintPINVALUE printf A 0 indicates that an interrupt has not occured 1 indicates that one has d n DIME InterruptStatus hCard dintONBOARDFPGA dintFLAGS printf The value on the Virtex Int Pin is d n DIME VirtexIntPin hCard Figure 6 Examples of using DIME_InterruptStatus NT107 0068 Issue 4 19 05 2003 www nallatech com 57 FUSE C C API Developers Guide PO _ 7 41 Syntax Arguments Return Description Notes 7 42 Syntax Arguments 58 DIME_JTAGContr
103. otherwise a non zero result indicates an unsuccessful configuration This function can be used to save existing configuration information such as module device information and which bit files have been assigned to particular devices The information can simply be written to the file specified DIME_SaveCardDefinition handle Filename 0 DIME_LoadSystemConfig DWORD DIME_LoadSystemConfig DIME_HANDLE handle const char Filename handle is a valid handle to a DIME carrier card Filename is the file to load the system configuration from A successful load is indicated by a return value of 0 This function can be used to load existing information that has previously been saved to a file to be loaded back into the program DIME_LoadCardDefinition handle Filename 0 DIME GlobalMode DWORD DIME_GlobalMode DIME _HANDLE handle DWORD CmdMode DWORD Value handle is a valid handle to a DIME carrier card CmdMode is the mode to change Value is the value to set the mode to Returns non zero value on error This is a function to add greater global control over the functionality of the development libraries The details are given in the Notes below The general operation of this functions is to pass the global mode operation to be changed in the CmdMode argument and to pass its state in the Value argument CmdMode Function DIME_MODE_GUI Sets whether dialog boxes are displayed within the SDL or whether no dialog bo
104. ow the actual transfer of data can take place Functions such as DIME_DMAReadToLockedMem and DIME_DMAWriteFromLockedMem perform this data transfer Once all the data has been transferred the DMA channel can be closed and the locked memory can be unlocked In the examples detailed below the Nallatech ping design is used to turn the data around on the card Details of this design can be found in Nallatech application note NT 302 0000 It is worth noting that in the examples the memory is locked down at the start of the program and unlocked at the end rather than locked and unlocked for each transfer This improves the speed to the transfers The two example programs are DMA transfers DMA transfers with two cards In the second example data is first written and then read back from the first card as in the DMA transfers example and then the same data is written to and read back from the second card Data is never sent from one card directly to the other card 5 5 Non threaded interrupts example It may at some time be required for the FPGA design to need to communicate with the PC for whatever reason If this is the case then interrupts can be used To use interrupts firstly they must be enabled using the DIME_InterruptControl function Once they ve been enabled whenever the FPGA produces an interrupt then a genuine hardware interrupt is produced For the software to find out if an interrupt has occurred the DIME_InterruptControl function c
105. own SrcData and then performs the DMA transfer On completion of the transfer irrespective of the result it then unlocks the SrcData So if your application performs several DMA writes then it is more efficient to use the DIME_DMAWriteFromLockedMem function NT107 0068 Issue 4 19 05 2003 www nallatech com 53 FUSE C C API Developers Guide PO _ 7 35 DIME_DMAWriteFromLockedMem Syntax DWORD DIME_DMAWriteFromLockedMem DIME_HANDLE handle DIME DMAHANDLE DMAChannel DIME_MEMHANDLE SrcData DWORD DestAddr DWORD WordCount DWORD Flags Arguments handle is a valid handle to a DIME carrier card DMAChannel A valid DMA handle that was returned from DIME_DMAOpen SrcData This should be a valid memory handle returned from DIME_LockMemory This should be the 32 bit aligned location of the memory of the data that is to be written to the card DestAddr This is the destination address on the card that the data is to be written to If this argument is 0 the interface FPGAs FIFOs are assumed WordCount This is the number of 32 bit words to be written Flags This argument allows the DMA transfer to be customised to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 14 for valid flags Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of WordCount 32bit words from the PC memory pointed to by SrcData to the Inter
106. r all Nallatech cards over the PCI interface diIUSB Searches for all Nallatech cards over the USB interface Table 24 Locate types MBType This argument is used to specify which particular Nallatech motherboard is to be located i e the motherboard type The table below gives details for the MBType mbtALL All Nallatech motherboards mbtNONE No motherboard type not recognised Not valid for this function mbtTHEBALLYINX The Ballyinx mbtTHEBALLYNUEY The Ballynuey mbtTHEBALLYNUEY2 The Ballynuey2 mbtTHEBALLYNUEY3 The Ballynuey3 mbtTHEBENERA The Benera mbtTHESTRATHNUEY The Strathnuey Table 25 Motherboard types LocateTypeArgs This argument is used to provide any specific additional information that is required to locate a card over a specified interface The table below details what information should be provided dependant on the interface LocateType LocateTypeArgs diPCI NULL diUSB NULL Table 26 DIME_LocateCard LocateType argument options DriverVersion This argument is used to specify a particular software driver that is to be used when controlling the particular card This is only required for advanced users If the specific driver version number is known then this number can be used Otherwise an option from the table below should be used DriverVersion Description didrDEFAULT This locates the latest driver installed on your system for each card
107. r motherboards user guide for further details on the JTAG chain Table 23 DIME_JTAGStatus CmdMode argument options Return This function returns I on failure Otherwise the return is dependant upon the command mode Description This returns status information regarding the JTAG chain on the card 7 43 DIME LoadCardDefinition Syntax DWORD DIME_LoadCardDefinition DIME_HANDLE handle const char Filename DWORD Flags Arguments handle is a valid handle to a DIME carrier card Filename is the filename that the card definition is to be saved to Flags This argument is used to customise the loading of the card definition file Currently there are no flags and this argument is not used 0 Should be used Return Returns 0 on success Returns non zero otherwise Description This function loads a valid card definition file By doing this it assigns bit files streams to devices Notes If the dcfgEMBEDALLBITS flag was used when creating the card definition file then the bit files that where embedded into the card file will be loaded up into memory 7 44 DIME_LoadSystemDefinition Syntax DIME_HANDLE DIME_LoadSystemDefinition const char SysFilename DWWORD CardCount LOCATE _HANDLE Locate_handles DWORD Flags Arguments SysFilename This is the name of the system definition file that is to be loaded into memory CardCount This is a memory location to which the number of cards that the loaded system contains is
108. r printing inaccuracies or errors and no liability will arise therefrom This user guide is supplied without warranty or condition either expressed or implied including but not limited to any implied warranties of merchantability and fitness for a particular purpose regarding the information provided herein Under no circumstances will Nallatech Limited be liable for any incidental or consequential damage or expense of any kind including but not limited to loss of profits arising in connection with the use of the information provided herein 93 FUSE C C API Developers Guide PO _ Contacting Nallatech iriine List of Figures io 9 CONTEN ESen Eist of Tables arierna nina nia saliananoi 10 Copyright Information Nallatech Date of Issue ilaria ica Standard Terms and Conditions 89 Document Name c iii SUPPOME siii iii Document Number Trademark Information Issue NUMbEL iii User Guide Conditions Licensing AgreeMEnt irene 90 94 www nallatech com NT107 0068 Issue 4 19 05 2003
109. rENABLE 0 DIME_SystemResetDisable void DIME_SystemResetDisable DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle drSYSTEM drDISABLE 0 Functionality not changed Disables the reset for the system DIME_CardResetControl handle drSYSTEM drDISABLE 0 www nallatech com 77 FUSE C C API Developers Guide PO _ 78 8 11 Syntax Arguments Return Description Alternative 8 12 Syntax Arguments Return Description Alternative 8 13 Syntax Arguments Return Description Alternative 8 14 Syntax Arguments Return Description Alternative 8 15 Syntax Arguments DIME PCIReset void DIME_PCIReset DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle drINTERFACE dr TOGGLE 0 Functionality not changed Disables the reset for the system DIME_CardResetControl handle drINTERFACE drTOGGLE 0 DIME_ReadDigitallO DWORD DIME_ReadDigitallO DIME_HANDLE handle handle is a valid handle to a DIME carrier card Returns the value of the digital I O pins Simply calls DIME_ReadPIO handle dpioDIGITAL Functionality not changed Reads the pins on the digital IO connector DIME_ReadPIO handle dpioDIGITAL DIME_WriteDigitallO DWORD DIME_WriteDigitallO DIME_HANDLE handle DWORD Data handle is a valid handle to a DIME carrier card Data is t
110. rs Guide PO _ Document Name FUSE C C API Developers Guide Document Number NT107 0068 Issue Number 4 Date of Issue 23 07 2002 Trademark Information The Nallatech logo the DIME logo the DIME II logo FUSE Field Upgradeable Systems Environment DIME DIME II FUSE C C API and the Bally Ben and Strath product name prefixes are all Trademarks of Nallatech Limited The Algorithms to Hardware Company Making Hardware Soft FPGA Centric Systems and software defined systems are Service Marks of Nallatech Limited All products or brand names mentioned herein are used for identification purposes only and are trademarks registered trademarks or service marks of their respective owners Copyright Information This document which is supplied in confidence is the copyright property of Nallatech Limited Neither the whole nor any extract may be disclosed loaned copied or used for any purpose other than those purposes for which written permission was given at the time of release Application for any uplifting or relaxation of these restrictions must be made in writing to Nallatech Limited who may at their discretion refuse such application or give it qualified or absolute approval Copyright 1993 2002 Nallatech Limited All Rights Reserved 4 www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Contents INTRODUCTION Il Preface 13 I I About thi
111. rt of the contract by the company GOVERNING LAW This agreement and performance of both parties shall be governed by Scottish law Any disputes under any contract entered into by the company shall be settled in a court if the company s choice operating under Scottish law and the buyer agrees to attend any such proceedings No action can be brought arising out of any contract more than 2 months after the completion of the contract INDEMNITY The buyer shall indemnify the company against all claims made against the company by a third party in respect of the goods supplied by the company SEVERABILITY If any part of these terms and conditions is found to be illegal void or unenforceable for any reason then such clause or section shall be severable www nallatech com from the remaining clauses and sections of these terms and conditions which shall remain in force NOTICES Any notice to be given hereunder shall be in writing and shall be deemed to have been duly given if sent or delivered to the party concerned at its address specified on the invoice or such other addresses as that party may from time to time notify in writing and shall be deemed to have been served if sent by post 48 hours after posting Licensing Agreement Nallatech Ltd software is licensed for use by end users under the following conditions By installing the software you agree to be bound by the terms of this license If you do not agree with the terms of
112. s transferred this is useful for feedback to the application This argument can be NULL if not used This argument can be used in multi threaded applications to monitor the progress of the data transfer In single threaded applications it can be used to return the total number of words transferred Timeout this is the maximum time in milliseconds that the transfer is allowed to take If all the data has not been transferred within this time period the transfer is terminated and an error condition is returned If this is set to zero then the timeout is effectively infinite Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of WordCount 32bit words from the PC memory pointed to by Data to the Interface connected to the on board FGPA of the DIME Motherboard The memory pointed to by Data does not need to be contiguous as this function will handle the internal transfer and memory management Notes This function should only be used in single card systems In systems with more than one card it is strongly advised that the DIME_DMA functions are used instead 7 23 DIME_DataWriteSingle Syntax DWORD DIME_DataVYriteSingle DIME _HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout Arguments handle is a valid handle to a DIME carrier card Data is a pointer to the PC memory which holds the data to be written This should be 32 bit aligned
113. s User Guide 13 1 2 References 13 1 3 Abbreviations 13 Product Overview 15 2 1 FUSE API Description 15 2 2 Key Features 15 2 3 FUSE API Details 15 INSTALLATION GUIDE 17 Software Installation 19 3 1 Software Requirements 19 3 2 Software Installation Guide Windows 19 3 3 Software Installation Guide Linux 20 IMPLEMENTATION GUIDE 23 General Implementation Information 25 4 1 General implementation information 25 Sample Programs 26 5 1 Fundamental steps 26 5 2 Locating and opening examples 26 5 3 Device configuration examples 26 5 4 DMA transfers examples 27 5 5 Non threaded interrupts example 27 REFERENCE GUIDE 29 Functions By Category 31 6 1 Locating cards 31 6 2 Opening and closing the card 31 6 3 Oscillator 31 6 4 LEDs 31 6 5 Reset 31 6 6 Interrupts 32 6 7 DMA transfers 32 6 8 Device configuration 32 6 9 Card System definition files 33 6 10 JTAG 33 6 11 System information and control 33 6 12 Card Module Device information 33 6 13 Programmable power supplies 34 6 14 All I O 34 NT107 0068 Issue 4 19 05 2003 www nallatech com 5 FUSE C C API Developers Guide PO _ 6 15 Multiple configuration GUI 34 Functional Reference 35 7 1 DIME_AddressWriteSingle 35 7 2 DIME_CardControl 35 7 3 DIME_CardControlPtr 36 74 DIME_CardResetControl 36 75 DIME_CardResetStatus 37 7 6 DIME_CardStatus 37 7 7 DIME_CardStatusPtr 38 7 8 DIME_CloseCard 38 7 9 DIME_CloseLocate 39 7 10 DIME_ConfigCard 39 7 11 DIME_ConfigDevice 40 7 12 DIME_ConfigG
114. sed If requested at the time of ordering an alternative delivery service can be used but only if account details are supplied to the company so that the delivery can be invoiced directly to the buyer by the delivery service The buyer accepts that any to be advised scheduled orders not completed within twelve months from the date of acceptance of the original order or orders held up by the buyers lack of action regarding delivery can www nallatech com beshipped and invoiced by the company and paid in full by the buyer immediately after completion of that twelve month period INSURANCE All shipments from the company are insured by them If any goods received by the buyer are in an unsatisfactory condition the following courses of action shall be taken If the outer packaging is visibly damaged then the goods should not be accepted from the courier or they should be signed for only after noting that the packaging has sustained damage If the goods are found to be damaged after unpacking the company must be informed immediately Under no circumstances should the damaged goods be returned unless expressly authorised by the company If the damage is not reported within 48 hours of receipt the insurers of the company shall bear no liability Any returns made to the company for any reason at any time shall be packaged in the original packaging or its direct equivalent and must be adequately insured by the buyer
115. selected module 7 54 DIME ModuleControlPtr Syntax DWORD DIME_ModuleControlPtr DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode void pValue Arguments handle is a valid handle to a DIME carrier card ModuleNum is the module that is being addressed Note modules are numbered from 0 CmdMode This argument is used to specify what particular aspect of module is to be controlled There are no current command modes for this function Value This argument is used to specify the action for a command mode Return Returns NULL on error Description This function is used to control certain aspects of the card that cannot be controlled using DIME_ModuleControl NT107 0068 Issue 4 19 05 2003 www nallatech com 65 FUSE C C API Developers Guide PO _ 7 55 DIME_ModuleStatus Syntax DWORD DIME_ModuleStatus DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ModuleNum is the module that is being addressed Note modules are numbered from 0 CmdMode This argument is used to specify what particular aspect of module status information is to be returned The table below gives details of the available command modes CmdMode Description dinfDIMECODE This command mode returns the 32 bit hex decimal DIME Code User Code for the module Please check your modules user guide for further details dinfNUMDEVICES This command mode returns the number of devices on the module
116. tal number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinf WIDTH DIME_GetDeviceHeight DWORD DIME_GetDeviceHeight DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number The function accesses the internal data structure of board information and returns the height for the specified module device in the module image The function first checks that a valid card has in fact been successfully opened if not a 0 is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfHEIGHT www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ j FUSE C C API Developers Guide 8 47 DIME_GetDeviceDescription Syntax const char DIME_GetDeviceDescription DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number Return The function accesses the internal data structure of board information and returns the description for the specified module device A pointer to a string that describes the device is re
117. tax Arguments Return Description Alternative 8 9 Syntax Arguments Return Description Alternative 8 10 Syntax Arguments Return Description Alternative NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle dt ONBOARDFPGA drENABLE 0 Functionality not changed Enables the reset for the onboard FPGA DIME_CardResetControl handle d ONBOARDFPGA drENABLE 0 DIME_VirtexResetDisable void DIME_VirtexResetDisable DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle dt ONBOARDFPGA drDISABLE 0 Functionality not changed Disables the reset for the onboard FPGA DIME_CardResetControl handle d ONBOARDFPGA drDISABLE 0 DIME_SystemReset void DIME_SystemReset DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle drSYSTEM drTOGGLE 0 Functionality not changed Toggles the reset for the system DIME_CardResetControl handle drSYSTEM drTOGGLE 0 DIME_SystemResetEnable void DIME_SystemResetEnable DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle drSYSTEM drENABLE 0 Functionality not changed Enables the reset for the system DIME_CardResetControl handle drSYSTEM d
118. time of delivery The title however shall not pass to the buyer until payment has been received in full by the company And no other sums whatever shall be due from the customer to Nallatech If the customer who shall in such case act on his own account and not as agent for Nallatech shall sell the goods prior to making payment in full for them the beneficial entitlement of Nallatech therein shall attach to the proceeds of such sale or to the claim for such proceeds The customer shall store any goods owned by Nallatech in such a way that they are clearly identifiable as Nallatech s property and shall maintain records of them identifying them as Nallatech s property The customer will allow Nallatech to inspect these records and the goods themselves upon request In the event of failure by the customer to pay any part of the price of the goods in addition to any other remedies available to Nallatech under these terms and conditions or otherwise Nallatech shall be entitled to repossess the goods The customer will assist and allow Nallatech to repossess the goods as aforesaid and for this purpose admit or procure the admission of Nallatech or its employees and agents to the premises in which the goods are situated INTELLECTUAL PROPERTY The buyer agrees to preserve the Intellectual Property Rights IPR of the company at all times and that no contract for supply of goods involves loss of IPR by the company unless expressly offered as pa
119. tions Return Returns are dependant on the selected command mode Description This function returns status information on various DMA operations for the selected DMA channel 7 34 DIME_DMAWrite Syntax DWORD DIME_DMAWrite DIME_HANDLE handle DIME_DMAHANDLE DMAChannel DWORD SrcData DWORD DestAddr DWORD WordCount DWORD Flags Arguments handle is a valid handle to a DIME carrier card DMAChannel A valid DMA handle that was returned from DIME_DMAOpen SrcData This should be a pointer to the PC memory that contains the data to be written to the card This should be 32 bit aligned DestAddr This is the destination address on the card that the data is to be written to If this argument is 0 the interface FPGAs FIFOs are assumed WordCount This is the number of 32 bit words to be written Flags This argument allows the DMA transfer to be customised to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 14 for valid flags Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of WordCount 32bit words from the PC memory pointed to by SrcData to the Interface connected to the on board FPGA of the DIME Motherboard The memory pointed to by SrcData does not need to be contiguous as this function will handle the internal transfer and memory management Notes To achieve this first it locks d
120. turn Description Alternative DIME GetDeviceYOffset DWORD DIME_GetDeviceYOffset DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number The function accesses the internal data structure of board information and returns the Y Offset for the specified module device in the module image The function first checks that a valid card has in fact been successfully opened if not a 0 is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinff OFFSET DIME GetDeviceWidth DWORD DIME_GetDeviceWidth DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number The function accesses the internal data structure of board information and returns the width for the specified module device in the module image The function first checks that a valid card has in fact been successfully opened if not a 0 is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the to
121. turned Description The function first checks that a valid card has in fact been successfully opened if not a NULL is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively Alternative DIME_DeviceStatusPtr handle ModuleNumber DeviceNumber dinfDESCRIPTION 8 48 DIME_GetDevicelconFilename Syntax const char DIME_ GetDevicelconFilename DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number Return The function accesses the internal data structure of board information and returns the complete path and filename representative of the specified module device If an icon filename has not been specified in the MDF then a default device icon filename is returned Description The function first checks that a valid card has in fact been successfully opened if not a NULL is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively Alternative DIME_DeviceStatusPtr handle ModuleNumber DeviceNumber dinfl CONFILENAME NT107 0068 Issue 4 19 05 2003 www nallatech com 89 FUSE C C API Devel
122. urned The function also checks that the specified module number is not greater than the total number of modules detected on the board DIME_ModuleStatusPtr handle ModuleNumber dinflMAGEFILENAME www nallatech com NT107 0068 Issue 4 19 05 2003 8 41 Syntax Arguments Return Description Alternative 8 42 Syntax Arguments Return Description Alternative 8 43 Syntax Arguments Return Description Alternative NT107 0068 Issue 4 19 05 2003 PU _ FUSE C C API Developers Guide DIME_GetDevicelDCode DWORD DIME_GetDevicelDCode DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber handle is a valid handle to a DIME carrier card ModuleNumber is the selected Module number DeviceNumber is the selected Device number The function accesses the internal data structure of board information and returns the 32 bit ID code for the specified module device See Table 22 for all possible returns values The function first checks that a valid card has in fact been successfully opened if not a 0 is returned The function also checks that the specified module and device numbers are not greater than the total number of modules detected on the board and the total number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfDEVICEIDCODE DIME_GetDeviceType DWORD DIME_GetDeviceType DIME_HANDLE handle DWWORD ModuleNumber DWORD DeviceNumber handle is
123. vice dinfDESCRIPTION This command mode returns a string char which is a short description of the device Table 11 DIME_DeviceStatusPtr CmdMode argument options The return value is dependant upon the command mode Returns NULL on error This function returns card status information that cannot be returned using DIME_DeviceStatus If a pointer to a string is returned this string is only valid until the next call is made into the library It is therefore advised that either the string is used directly or that it is copied for later use DIME_DMAClose DWORD DIME_DMAClose DIME_HANDLE handle DIME_DMAHANDLE DMAhandle DWORD Flags handle is a valid handle to a DIME carrier card DMAhandle is a valid DMA handle that was returned from DIME_DMAOpen Flags This argument allows the DMA close process to be customised to suit your development requirements The table below gives details for the Flags Flags Description ddmaCLOSETERMINATE This will immediately terminate any DMA transfer using this DMAhandle and then close the handle ddmaCLOSEWAITFORFINISH This will wait for any active DMA transfer to finish before closing down the handle Table 12 DIME_DMAClose Flags argument options Returns zero on success non zero otherwise www nallatech com NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide Description This function closes down a valid DMAhandle In doing this it de alloc
124. w INIT Low CRC errors detected defgDL_IH_NOCRC Configuration Status DONE Low INIT high No CRC errors detected defgDL_IH_CRC Configuration Status DONE Low INIT high CRC errors detected defgDH_IL_NOCRC Configuration Status DONE high INIT low No CRC errors detected defgDH_IL_CRC Configuration Status DONE high INIT low CRC errors detected defgDH_IH_CRC Configuration Status DONE high INIT high CRC errors detected defgUNKNOWN Unidentifiable configuration result defgNOLIC Multiple Configuration Licence not available dcfgDEV_BIT_MIS The bit file is incorrect for the FPGA device type dcfgERROR An unspecified error has occurred Table 5 Configuration function return values Description This function configures the specified device with the specified bit file Notes The bit file must be configured to use the JTAG clock for configuration rather than the default of the CCLK 7 12 Syntax DIME_ConfigGetBitsFilename const char DIME_ConfigGetBitsFilename DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber Arguments 40 www nallatech com handle is a valid handle to a DIME carrier card NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide ModuleNumber is the number of the selected module DeviceNumber is the number of the selected device Return Returns a pointer to the filename that has been assigned to the selected device If no filename has been set for the device then a NULL p
125. workmanship of hardware elements of a system The basis of this warranty is that the fault be discussed with the companies technical support staff before any return is made If it is agreed that a return for repair is necessary then the faulty item and any other component of the system as requested by those staff shall be returned carriage paid to the company Insurance terms as discussed in the INSURANCE section will apply Returned goods will not be accepted by the company unless this has been expressly authorised After warranty repair goods will be returned to the buyer carriage paid by the company using their preferred method Faults incurred by abuse of the product as defined by the company are not covered by the warranty Attempted repair or alteration of the goods as supplied by the company by another party immediately invalidates the warranty offered The said warranty is contingent upon the proper use of the goods by the customer and does not cover any part of the goods which has been modified without Nallatech s prior written consent or which has been subjected to unusual physical or electrical stress or on which the original NT107 0068 Issue 4 19 05 2003 FU _ FUSE C C API Developers Guide NT107 0068 Issue 4 19 05 2003 identification marks have been removed or altered Nor will such warranty apply if repair or parts required as a result of causes other than ordinary authorised use including without limitation
126. xes are displayed so that the www nallatech com 83 FUSE C C API Developers Guide __ 84 Alternative 8 31 Syntax Arguments Return Description Alternative 8 32 Syntax Arguments Return Description Alternative 8 33 Syntax Arguments Return Description Alternative calling applications can control any error message boxes This does not affect the return values of functions When Value is TRUE dialog boxes are displayed when FALSE they are not displayed Default is on i e Value TRUE DIME_JTAG_CHECK When a Configuration of the FPGA is performed it is possible for a post configuration check to be done on the configuration of the FPGA itself Essentially this reads the contents out of the 32 bit internal FPGA status register When Value is TRUE post configuration status checking is carried out otherwise when Value is FALSE no checking is done and the FPGA is still sent the selected bit stream Default is on in multiple configuration i e Value TRUE DIME_SystemControl handle CmdMode Value DIME_GetMotherBoard Type DWORD DIME_GetMotherBoardType DIME_HANDLE handle handle is a valid handle to a DIME Card See Table 25 for details The DIME API is made as generic as possible for all DIME Carrier cards and this function returns the type of Motherboard installed This enables an application to take advantage of any special facilities for a
127. y This should be the 32 bit aligned location of the memory for the data is going to read from the card and stored in SrcAddr This is the source address of the data on the card that is to be read If this argument is 0 the interface FPGAs FIFOs are to be read WordCount This is the number of 32 bit words to be read Flags This argument allows the DMA transfer to be customised to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 14 for valid flags Return There are several possible returns for the DMA transfer See Table 15 for details Description This handles the transfer of WordCount 32bit words from the Interface with the on board FPGA of the DIME Motherboard to the memory pointed to by DestData The memory pointed to by DestData does not need to be contiguous as this function will handle the internal transfer and memory management 7 33 DIME_DMAStatus Syntax DWORD DIME_DMAStatus DIME_HANDLE handle DIME _DMAHANDLE DMAChannel DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card NT107 0068 Issue 4 19 05 2003 www nallatech com 5I FUSE C C API Developers Guide FU _ DMAChannel is a valid DMA handle that was returned from DIME_DMAOpen or DMAChannel is ddmaALLDMACHANNELS This is used under certain command modes to return card specific information on all DMA channels CmdMode This argument is used to specify which aspect of the open

Download Pdf Manuals

image

Related Search

Related Contents

生産技術科 シラバス(訓練支援計画書) [PDF 1.53MB]    Pro-Series III User Manaul.pub  CLUB3D Radeon R9 290X royalAce AMD Radeon R9 290X 4GB  FIRElink-25 Air Sampling System INSTALLATION MANUAL    MAX2320 Maxim Integrated Products  Philips Blender jar HR3010  MANUALE DI ISTRUZIONI  

Copyright © All rights reserved.
Failed to retrieve file