Home
FUSE C - System and Instrumentation Physics
Contents
1. if Answer DIME_InterruptStatus hCard dintALL dintAVAILABLE 0 printf No Interrupts are available for 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 DIME InterruptStatus hCard dintMODULE1 dint AVAILABLE dintMODULE1 printf The MODULE 1 interrupt is available for this card n if Answer DIME InterruptStatus hCard dintMODULE2 dint AVAILABLE dintMODULE2 printf The MODULE 2 interrupt is available for this card n if Answer DIME InterruptStatus hCard dintMODULE3 dint AVAILABLE dintMODULE3 printf The MODULE 3 interrupt is available for this card n if Answer DIME_InterruptStatus hCard dintMODULE4 dintAVAILABLE dintMODULE4 printf The MODULE 4 interrupt is available for this card n printf The current state of the on board FPGA interrupt pin is sd n DIME_In terruptStatus hCard dintONBOARDFPGA dintPINVALUE printf A 0 indicates that an interrupt has not occured 1 indicates that one has d n DIME_Interrupt Status hCard dintONBOARDFPGA dintFLAGS printf The value on the Virtex Int Pin is d n DIME VirtexIntPin hCard Figure 8 Examples of using DIME InterruptStatus
2. 89 B id M 89 DIME GetMotherBoard ype cui rai 90 viii www nallatech com NT107 0068 Issue 8 September 14 2004 DIME _GetMultiConfigLicence sic ri 90 DIME ReadSlotU se 90 DIME _GetNumberOfModules 91 DIME GetFailedMDFFileName 91 DIME 9 DIME GetNumberOfDevices 92 DIME GetodileDescrIptlbbi s a alia 92 DIME GetModulelconFilename 92 DIME GetModulelmageFilename s eesennnes 93 DIME GetbsevicelD Code 93 DIME iisisti b 93 DIME _GetDeviceXOffset onu ccm 94 DIME GetDeviceY Offset 94 DIME cose ea 94 DIME Ser Devic s s 95 DIME GetDeviceDescription e testen ttetennnnctec 95 DIME GetDevicelconFilename 96 Version story Elisa 97 New in Version Pc 97 New in VERSION Leccate 97 NT107 0068 Issue 8 September 14 2004 www nallatech com www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide About this Developers Guide This Developers Guide provides detailed information on the FUSE C C API It allows you to become acqua
3. 54 DIME Lead Car dD ei nition 54 DIME LoadSystemDefinition 54 DIME LocateCard aussen alan aa 55 DIME oed ed pep rU nec cH Gn 57 DIME Locate statis EP usce ique Estote 59 DIME LockMemMory Luci 59 liceali 60 DIME _MConfigGUlExit 61 DIME MemGoniebDevee 61 DIME 62 DIME 62 DIME 63 DIME rara 63 DIME MeduleCortrl iii lla 63 DIME ModuleControlPtr 66 DIME 66 DIME T dodulgStatusPEP aiii D Dus te oet Dtm ab des 68 DIME DURER HR alin 69 DIME 69 DIME IPPSC ODUEO 70 DIME PES 70 DIME ET E D itte rette aaa 71 72 DIME ResdPIODIFEcHioni ss agrari Oba edem eode de iod OR 72 72 DIME _SaveSystemDefinition areale 73 DIME _SetOscillatorFrequency cirie 74 DIME Show
4. Table 1 FUSE Naming Conventions Comments and Suggestions xii www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide At the back of this book you will find a remarks form We welcome any comments you may have on our product or its documentation Your remarks will be examined thoroughly and taken into account for future versions of Nallatech products NT107 0068 Issue 8 September 14 2004 www nallatech com xiii About this Developers Guide xiv www nallatech com NT107 0068 Issue 8 September 14 2004 NALLATECH The High Performance FPGA Solutions Company Part I Introduction This part of the Reference Guide provides an introduction to the FUSE C C API and outlines its key features and functionality Step by step installation instructions are also included in the Getting Started section NT107 0068 Issue 8 September 14 2004 www nallatech com I 2 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section FUSE C C API Overview In this section FUSE Key Features 1 1 Key Features 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 create their own applications using the FUSE API in addition to their own code to interface directly with their Nallatech hardware The key features of the FU
5. Part III Reference Information This part of the Guide provides reference information on the FUSE API including a list of functions NT107 0068 Issue 8 September 14 2004 www nallatech com 14 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 5 Functions By Category In this section FUSE C C API Functions by Category 5 1 Locating Cards These functions are used to locate 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 5 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 5 3 Oscillator These functions are used for controlling cards oscillators DIME SetOscillatorFrequency 5 4 LEDs These functions are used to read or write to the interface LEDs DIME ReadLEDs DIME WriteLEDs 5 5 Reset These functions are used to control the cards various resets DIME CardResetControl DIME CardResetStatus NT107 0068 Issue 8 September 14 2004 www nallatech com 15 Functions By Category 5 6 Interrupts These functions are for controlling the cards various interrup
6. dimesdl h dimesdl lib coff version of the library for inclusion 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 For some motherboards there will be an additional header file that allows access to specific card functions Details of this header file will be included in the FUSE Compatibility section of your Motherboard Reference 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 and can be found in the FUSE API Examples directory with the FUSE install NT107 0068 Issue 8 September 14 2004 www nallatech com 9 Using FUSE C C API 10 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 4 Examples In this section Fundamental Steps Locating and Opening Examples Device Configuration Examples DMA Transfer Examples Interrupt Example 4 1 Fundamental Steps There are two key 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 r
7. LocateType This is the interface that the locate is to be performed over The Table 28 on page 55 provides further details diPCI Searches for all Nallatech cards over the PCI interface dIUSB Searches for all Nallatech cards over the USB interface diTCPIP Searches for all Nallatech cards over a network note that a server application has to be running on the destination machine diCITRIX Searches for all Nallatech cards over a Citrix environment die THERNET Searches for all Nallatech cards that have an Ethernet module diVME Searches for all Nallatech cards over the VME bus Table 28 Locate Types This argument is used to specify which particular Nallatech motherboard is to be located i e the motherboard type Table 29 on page 55 gives details for the MBType MBType Description mbtALL All Nallatech motherboards mbtNONE No motherboard type not recognized Not valid for this function mbtTHEBALLYINX The Ballyinx mbtTHEBALLYNUEY The Ballynuey mbtTHEBALLYNUEY2 The Ballynuey2 mbtTHEBALLYNUEY3 The Ballynuey3 Table 29 Motherboard Types NT107 0068 Issue 8 September 14 2004 www nallatech com 55 Functional Reference Description mbtTHEBENERA The BenERA mbtTHESTRATHNUEY The Strathnuey Table 29 Motherboard Types LocateTypeArgs This argument is used to provide any specific additional information that is required to locate a card over a spec
8. 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 drENABLE 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 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 drTOGGLE 0 Functionality not changed Disables the reset for the system DIME CardResetControl handle drINTERFACE drTOGGLE 0 www nallatech com NT107 0068 Issue 8 September 14 2004 7 12 Syntax Arguments Return Description Alternative 7 13 Syntax Arguments Return Description Alternative 7 14 Syntax Arguments Return Description Alternative 7 15 Syntax Arguments Return NT107 0068 Issue 8 Sep
9. Table 14 JTAG Device ID Codes www nallatech com 37 Functional Reference 6 29 Syntax Arguments CmdMode 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 Table 15 on page 38 gives details of the available command modes Description dinflCONFILENAME This command mode returns a string char which is the icon filename for the device dinfDESCRIPTION This command mode returns a string char which is a short description of the device Return Description Notes 38 Table 15 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 30 DIME
10. printf Error while waiting for the on board interrupt n Disable the interrupt if Answer DIME_InterruptControl hCard dintONBOARDFPGA dintDISABLE dintBLOCKING 0 printf Disabled the on board FPGA interrupt n else printf Failed to disable the on board FPGA interrupt n Figure 7 Interrupt Example using DIME_InterruptControl 50 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 43 InterruptStatus Syntax Arguments DWORD DIME InterruptStatus DIME HANDLE handle DWORD InterruptFlags CmdMode handle is a valid handle to a DIME carrier card InterruptFlags This is used to specify which interrupt the function is to address Table 23 on page 51 gives details of the available InterruptFlags InterruptFlags Description 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 Table 23 InterruptFlags Argument Options Note Currently the only parameter available is dintONBOARDFPGA except for the BenONE If a BenONE is used then either dintONBOARDFPGA or dintMODULEI may be used Both of these address the interrupt on the module FPGA CmdM
11. Syntax DWORD DIME_DMAClose DIME_HANDLE handle DIME DMAHANDLE DMAhandle DWORD Flags Arguments 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 Table 16 on page 39 gives details for the Flags 5 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 16 DIME DMACIOose Flags Argument Options Return Returns zero on success non zero otherwise Description This function closes down a valid DMAhandle In doing this it de allocates 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 6 31 DIME DMAControl Syntax DWORD JDIME 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 Table 17 on page 39 CmdMode Description ddmaLOCALNOINC S
12. dcfgOK_STATUS Configured completed successfully although no post configuration checking carried out Configuration completed successfully as indicated by read back of FPGA Status register DONE high INIT high No CRC errors detected dcfglNVALID CARD The handle argument is invalid dcfgBIT FILE Returned when the specified bitfile could not be successfully opened dcfglNTEG FAIL Indicates that the JTAG integrity scan check has failed and the chain is apparently incomplete dcfgDL IL NOCRC Configuration Status DONE Low INIT Low No CRC errors detected dcfgDL IL CRC Configuration Status DONE Low INIT Low CRC errors detected dcfgDL IH NOCRC Configuration Status DONE Low INIT high No CRC errors detected NT107 0068 Issue 8 September 14 2004 Table 8 Configuration Function Return Values www nallatech com Functional Reference Return Description dcfgDL_IH_CRC Configuration Status DONE Low INIT high CRC errors detected dcfgDH_IL_NOCRC Configuration Status DONE high INIT low No CRC errors detected defgDH_IL_CRC Configuration Status DONE high INIT low CRC errors detected dcfgDH_IH_CRC Configuration Status DONE high INIT high CRC errors detected dcfgUNKNOWN Unidentifiable configuration result dcfgNOLIC Multiple Configuration Licence not available dcfgDEV_BIT_MIS The bitfile is incorrect for
13. related documentation REVISION sissi ili T typographical xii U device configuration using FUSE C CFFAPL att beat 9 transfers ettet tator aate Reti JTAG ira V LEDs history list 97 multiple configuration GUI rari programmable power supplies Qr M system information and control 17 FUSE naming conventions xii G getting started ciare 5 implementation 7 installation 5 confidence 6 Bl cc 5 5 iIntroduction anoa E www nallatech com 103 104 www nallatech com NT107 0068 Issue 8 September 14 2004 Remarks Form We welcome any comments you may have on our product and its documentation Your remarks will be examined thoroughly and taken into account for future versions of this product FUSE C C API Developers Guide NT107 0068 Issue 8 14 09 04 Errors Detected Suggested Improvement Please send this completed form to Nallatech Boolean House One Napier Park Cumbernauld Glasgow G68 United Kingdom If you prefer you may send your remarks via E mai
14. 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 djtagMAXSPEED 10 See Table 26 on page 53 for details Please consult your Motherboard Reference Guide for further details on the JTAG chain Table 27 DIME JTAGStatus CmdMode Argument Options This function returns on failure Otherwise the return is dependant upon the command mode This returns status information regarding the JTAG chain on the card DIME LoadCardDefinition DWORD DIME LoadCardDefinition DIME HANDLE handle const char Filename DWORD Flags 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 customize the loading of the card definition file Currently there are no flags and this argument is not used 0 Should be used Returns 0 on success Returns non zero otherwise This function loads a valid card definition file By doing this it assigns bitfiles streams to devices If the dcfgEMBEDALLBITS flag was used when creating the card definition file then the bitfiles that where embedded into the card file will be loaded up into memory DIME LoadSystemDefinition DIME HANDLE DIME LoadSystemDefinition const char SysFilename DWORD CardCount LOCATE HANDLE Locate handles DWORD Flags Sys
15. 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 8 September 14 2004 www nallatech com 45 Functional Reference 46 6 37 Syntax Arguments Return Description DIME_DMAWriteFromLockedMem DWORD DIME_DMAWriteFromLockedMem DIME HANDLE handle DIME DMAHANDLE DMAChannel DIME MEMHANDLE SrcData DWORD DestAddr DWORD WordCount DWORD Flags 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 customized to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 18 on page 41 for valid flags There are several possible returns for the transfer See Table 19 on page 42 for details This handles the transfer of WordCount 32 bit words from the PC memory pointed to by SrcData to the Interface connected to the on
16. 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 any such application or give it qualified or absolute approval Copyright 1993 2004 Nallatech Limited Rights Reserved NT107 0068 Issue 8 September 14 2004 www nallatech com iii www nallatech com NT107 0068 Issue 8 September 14 2004 Contents About this Developers Guide xi Part bob adottate FUSE API 3 i 3 started 5 5 Host System 5 Software israele 5 Initial Confidence dela 6 Part Il Implementation ssh 7 Using FUSE CIC FT API ria 9 General Implementation Information 9 cocus uad A MEME LI Fundamental Steps criari Il Locating and Opening Examples
17. 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 www nallatech com 101 Standard Terms and Conditions 102 www nallatech com NT107 0068 Issue 8 September 14 2004 NT107 0068 Issue 8 September 14 2004 A abDreVviatlOrs oneri o ER REA E ER ana xii API layers A E pete to de e aee itae 4 C contact detalls 1 irae ra tonto ora ea eR a PR ENSE RANA ran RT ii E examples Il device configuration DMA transfer locating and opening seen non threaded interrupts example osa P inerek iea F files to be added 9 functional reference iii 19 functions 15 AO ARRE A card module device information card system definition files FUSE C C API Developers Guide Index K eena EE EEN AS 3 L legacy f rictlOns eniti 79 locating CARAS 15 O opening and closing cards sss 15 R reference guide xi reference information iii
18. iii E Device Configuration Dam pes are E Transfer 12 Non threaded Interrupts Example 12 Part Il Reference Information Functions By Category mi 15 lee 15 Opening and Closing the Card 15 e E EE A 15 C 15 FCR RS 15 Hai RR RR RE 16 DMA TIGISIGES slide l6 Device Configuration secu ele 16 Card System Definition Files ondes aa 17 oe 17 System Information and Controls 17 NT107 0068 Issue 8 September 14 2004 www nallatech com v Card Module Device Information secrete 17 Programmable Power Supplies PPS 18 O ao 18 Multiple Configuration GU di 18 Functional Reference 19 DIME AddressWriteSingle 19 DIME CardControl Lalla 20 DIME Dido erii Det ce s 20 DIME CardResetC ohtFol dri b eeepc cA 20 DIME CardResetStatus cirie 22 23 DIME C ardStatulsP El 24 DIME 8S8 alU linda 25 DIME ica 25 DIME f HA 26 DIME GConfle EU POBREE HEIN REFERENT EUN 26 DIME Config Device lai 27 DIME ConfigGetBitsFIlenialmie rai 28 DIME _ConfigGetBitsMemory ia die hU Eee HR de Ro p a ERREUR a ERE 28 DIME ConfigModule ma arido pH Hn ra ee
19. www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 44 DIME JTAGControl Syntax DWORD DIME JTAGControl 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 which particular aspect of the JTAG chain is to be returned Table 25 on page 53 gives details 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 Motherboard Reference Guide for further details on the JTAG chain Table 25 DIME JTAGControl CmdMode Argument Options Value is used to specify the value that the chain is to be driven at Table 26 on page 53 provides details djtagDEFAULTSPEED This is the default speed for the JTAG chain on the card Please consult your motherboards used guide for more details djtagMAXSPEED I This will attempt to set the cards JTAG chain to 1 MHz 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 10MHz djtagMAXSPEED20 This will attempt to set the cards JTAG chain to 20MHz djtagMAXSPEED30 This will a
20. 14 2004 FUSE C C API Developers Guide 6 22 Syntax Arguments Return Description Notes 6 23 Syntax Arguments Return Description Notes DIME DataRead DWORD DIME DataRead DIME _HANDLE handle DWORD Data DWORD WordCount volatile DWORD Terminate DWORD CurrCount DWORD Timeout 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 WordCount is the number of 32 bit words to transfer Terminate is not used CurrCount points to memory location that holds the current total of words transferred which 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 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 There are several possible returns for the data transfer See Table 19 on page 42 for details This handles the transfer of WordCount 32 bit words from the Interface with the on board FGPA of the DIME Motherboard to the PC memory pointed to by Data The memory pointed
21. 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 l 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 can be used to return the error information Table 45 DIME_SystemStatus CmdMode Argument Options Return The return is dependant upon the command mode A return of indicates an error Description This function is used to return system status information 6 76 DIME_SystemStatusPtr Syntax void DIME SystemStatusPtr DIME HANDLE handle DWORD 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 Table 46 on page 76 provides 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 46 DIME_SystemStatusPtr CmdMode Argument Options Return Return NULL on error For the command mode dinfDIME_
22. 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 used by the card and the software library Should only be used when a card has been opened using the OpenDIMEBoard function DIME_CloseCard providing OpenDIMEBoard was not used to open the card NT107 0068 Issue 8 September 14 2004 www nallatech com 79 Legacy Functions 7 2 OpenDIMEBoard Syntax DIME_HANDLE OpenDIMEBoard void Arguments N A Return Returns a handle for the card otherwise NULL is returned The return type DIME HANDLE is defined as a void pointer Description This function will search the PCI interface for any Nallatech motherboard and then call DIME_OpenCard for the first Nallatech motherboard found Notes 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 Alternative It is strongly advised that DIME LocateCard then DIME_OpenCard is used as shown in Figure 16 on page 80 as an alternative LOCATE HANDLE hLocate DIME HANDLE hCard Opening the card hLocate DIME LocateCard dlPCI mbtALL NULL dldrDEFAULT dlDEFAULT hCard DIME OpenCard hL
23. Syntax Arguments Return Description 34 DIME DataWrite DWORD DIME DataWrite DIME HANDLE handle DWORD Data DWORD WordCount volatile DWORD Terminate DWORD CurrCount DWORD Timeout 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 32 bit words to transfer Terminate is not used CurrCount points to memory location which holds the current total of words transferred which 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 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 There are several possible returns for the data transfer See Table 19 on page 42 for details This handles the transfer of WordCount 32 bit 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
24. This is used to set the address of where the current total of words transferred is to be stored 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 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 17 DIME DMAControl CmdMode Argument Options Return Returns are dependant on the selected command mode Description This function is used to control transfers for a particular channel www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 32 DIME DMAOpen Syntax 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 Motherboard Reference Guide for more details on what DMA channels are available for the particular hardware Flags Us
25. Virtex EM device V405 didXCV3200E Xilinx Virtex E device V3200 didXCV812EM Xilinx Virtex EM device V812 didXCI8VOI Xilinx 1800 PROMs VOI didXC2S50 Xilinx Spartan 2 S50 didXC18V02 Xilinx 1800 PROMs V02 didXC2S100 Xilinx Spartan 2 S100 didXC18V04 Xilinx 1800 PROMs V04 didXC2S150 Xilinx Spartan 2 5150 didXC18V256 Xilinx 1800 PROMs V256 didXC2S200 Xilinx Spartan 2 S200 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 XC95108XL Xilinx 95108XL CPLD XC95144 Xilinx 95144 CPLD XC95144XL Xilinx 95144XL CPLD 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 2000 didXC2V3000 Xilinx Virtex2 V3000 didXC2V4000 Xilinx Virtex2 V4000 didXC2V6000 Xilinx Virtex2 V6000 didXC2V8000 Xilinx Virtex2 V8000 didXC2V 10000 Xilinx Virtex2 V 10000 didXC2VP2 Xilinx Virtex2 Pro P2 didXC2VP4 Xilinx Virtex2 Pro P4 didXC2VP7 Xilinx Virtex2 Pro P7 didXC2VP20 Xilinx Virtex2 Pro P20 didXC2VP30 Xilinx Virtex2 Pro P30 didXC2VP40 Xilinx Virtex2 Pro P40 didXC2VP50 Xilinx Virtex2 Pro P50 didXC2VP70 Xilinx Virtex2 Pro P70 didXC2VP100 Xilinx Virtex2 Pro P100 didXC2VP125 Xilinx Virtex2 Pro P125 NT107 0068 Issue 8 September 14 2004
26. 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 4 5 Non threaded Interrupts Example An FPGA design may need to communicate with the PC using interrupts In order to use interrupts they must firstly be enabled using the DIME_InterruptControl function Once 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 can 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 only polling DMA transfers should be used Once interrupts have been enabled all interrupts that occur are logged When waiting 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 the Interrupts in FUSE Application Note on the FUSE CD at the location lt CDROM Drive gt ApplicationNotes NT302 0026 Using Interrupts documentation www nallatech com NT107 0068 Issue 8 September 14 2004 NALLATECH The High Performance FPGA Solutions Company
27. bit will be taken In this case the transfer would be set to be non blocking Description ddmaBLOCKING DIME DMARead will not return until the DMA transfer is complete ddmaNONBLOCKING DIME DMARead will return before the DMA transfer is complete Table 18 DMA Transfer Functions Flags Argument Options NT107 0068 Issue 8 September 14 2004 www nallatech com 41 Functional Reference 42 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 your Motherboard Reference Guide for details ddmalNITWORDADDR This flag should be used when the initial word of the data is an address Return Table 18 DMA Transfer Functions Flags Argument Options There are several possible returns for the DMA transfer Table 19 on page 42 provides details DMA transfer function return values Description ddmaOK The DMA transfer was a success ddmalNVALID 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 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 progr
28. carried out glitch free Please check your Motherboard Reference Guide for further details on the programmable oscillators 1 Change the oscillators double ActualFrequency and set oscillator 1 the system clock to 41 23456MHz DIMI printf Actual frequency is f n ActualFrequency SetOscillatorFrequency hCard1 1 41 23456 amp ActualFrequency 74 Figure 14 Getting Information on the Located Cards www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 73 ShowMConfigGUI Syntax void DIME ShowMConfigGUl void handle DWORD ShowFlag Arguments handle is a valid handle to a DIME carrier card ShowFlag is a flag for the visibility of the form Return N A Description This function changes whether the Multiple DIME configuration window is visible or not Notes The nueym lib for Microsoft Visual C or nueyomf lib for Borland C builder needs to be included in your design when using this function These libraries are installed in the include directory of the FUSE software 6 74 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 Table 43 on page 75 provides details of the available command modes
29. 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 l 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 dcfgOK NOSTATUS dcfsDL IH or dcfgOK STATUS When this happens the invalid boot result is returned 6 11 DIME ConfigControl Syntax DWORD DIME_ConfigControl DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD CmdMode DWORD Value Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the module you want to target DeviceNumber is the device in that module you want to target CmdMode is control command to implement Description dcfgFRAMEADDR This command sets the Frame Address The frame address is only used in the Readback functions and is used to set what Frame is to be read back By default the address is 0x00000000 Table 6 ConfigControl Commands Value is the command specific Return Return is zero on success Description This function is used to control some of the aspects of configuration ww
30. if you have acquired multiple licenses the Software may be used on either stand alone computers or on com puter 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 with out 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 FUSE C C API Developers Guide archival purposes Additionally if the package contains multiple versions of the Licensed Materials then you may only use the Licensed Materials 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 relat
31. management 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 DIME DataWriteSingle DWORD DIME DataWriteSingleDIME HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout 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 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 There are several possible returns for the transfer See Table 19 on page 42 for details This handles the transfer of a single 32 bit word from the PC memory pointed to by Data to the Interface connected to the on board FGPA of the DIME Motherboard www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C Developers Guide 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 6 26 DIME DeviceControl Syntax DWORD DIME DeviceControl DIME HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMode DWORD Value Arguments handle is a valid handl
32. not all motherboards support this feature Check your Motherboard Reference Guide if you are unsure if your hardware supports this NT107 0068 Issue 8 September 14 2004 www nallatech com 67 Functional Reference 68 Example read the temperature alert levels and both the module and FPGA temperatures DWORD ModuleNumber 0 DWORD FPGATEemp ModuleTemp MaxAlert MinAlert Read the FPGA temperature degrees c FPGATemp DIME ModuleStatus hCardl ModuleNumber dinfFPGATEMP Read the module temperature degrees c ModuleTemp DIME ModuleStatus 1 ModuleNumber dinfMODULETEMP Read the maximum alert threshold temperature degrees c MaxAlert DIME ModuleStatus hCardl ModuleNumber dinfTEMPALERTMAX Read the minimum alert threshold temperature degrees c MinAlert DIME_ModuleStatus hCard1 ModuleNumber dinfTEMPALERTMIN as Figure 12 Reading the Temperature Alert Levels and the FPGA and module temperatures 6 62 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 37 on page 68
33. on success non zero on error www nallatech com 83 Legacy Functions 84 Description Alternative 7 16 Syntax Arguments Return Description Alternative 7 17 Syntax Arguments Return Description Alternative 7 18 Syntax Arguments Return Description Alternative Simply calls DIME WritePlODirection handle dpioDIGITAL Data This function sets the direction of individual pins of the Digital I O connector A 1 in a particular bit location sets that to an input otherwise the pin is an output Functionality not changed DIME WritePlODirection 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 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 JInterfaceFlagBusy 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 O When BUSY is high it indicates that the internal transfer buffer from the FPGA to the PCI is full and cannot acc
34. orders held up by the buyers lack of action regarding delivery can be shipped 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 authorized 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 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 www nallatech com 99
35. 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 DIME_ConfigDevice handle FileName ModuleNumber ModuleDeviceNumber Progress 0 DIME_SetFilename DWORD DIME SetFilename DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename 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 Returns 0 upon success Returns non zero otherwise 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 DIME_ConfigSetBitsFilename handle ModuleNumber DeviceNumber Filename 0 DIME_GetFilename const char DIME_GetFilename 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 NT107 0068 Issue 8 September 14 2004 www nallatech co
36. regarding the current configuration of your card to a file Information such as the modules devices and the assigned bitfiles bitstreams to particular devices is all saved 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 DIME SaveSystemDefinition DWORD DIME SaveSystemDefinition DIME HANDLE handles char CardFilenames const char SysFilename DWORD NumOfCards DWORD Flags 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 definition 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 customize the saving of the system definition file Currently there are no flags and this argument is not used 0 Should be used Returns 0 on success Returns non zero otherwise 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 The system definition file that is created does not inco
37. the FPGA device type dcfgERROR An unspecified error has occurred Table 8 Configuration Function Return Values Description This function configures the specified device with the specified bitfile Notes 6 13 Syntax Arguments Return Description 6 14 Syntax Arguments The bitfile must be configured to use the JTAG clock for configuration rather than the default of the CCLK DIME_ConfigGetBitsFilename const char DIME ConfigGetBitsFilename DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber 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 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 This function returns the filename that is assigned to a device DIME ConfigGetBitsMemory DWORD DIME_ConfigGetBitsMemory DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD ByteLength 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Return Description 6 15 Syntax Arguments
38. to by Data does not need to be contiguous as this function will handle the internal transfer and memory management 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 DIME DataReadSingle DWORD DIME_DataReadSingle DIME HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout 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 Terminate is 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 There are several possible returns for the transfer See Table 19 on page 42 for details This handles the transfer of a single 32 bit word from the Interface with the on board FGPA of the DIME Motherboard and places this 32 bit word into the PC memory pointed to by Data 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 33 Functional Reference 6 24 Syntax Arguments Return Description Notes 6 25
39. with ddmaALLDMACHANNELS ddmaWRITEFLAGS Used with ddmaALLDMACHANNELS Returns the number of DMA channels available for this card Returns the number of readable DMA channels for this card The return is a bit wise DWORD with a l 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 Returns the number of writeable DMA channels for this card The return is a bit wise DWORD with a l in a particular bit position indicates the 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 of DMA channels that are both writeable and readable for this card The return is a bit wise DWORD with a l in a particular bit position indicates the channel is both writeable and readable E g a return of 0x00000001 means that channel number is both a readable and writeable channel Table 20 DIME DMAStatus CmdMode Argument Options NT107 0068 Issue 8 September 14 2004 www nallatech com 43 Functional Reference CmdMode Description ddmaREADABLE Returns a l if the DMAChannel is readable Returns a 0 if not ddmaWRITABLE Returns l if the DMAChannel is writeable Returns a 0 if not ddmaACTIVE Returns a l if the DMAChannel is active Returns a 0 if not ddmalNTERUPTABLE Returns a
40. 100millivolts Table 40 DIME_PPSStatus Command Mode Options Return The return is dependant upon the selected command mode Description Returns status information for the programmable power supplies www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Note The voltage and current capabilities are only applicable to DIME II systems Example Get the Voltage and Currents for module 0 power supply DWORD Current Voltage Voltage DIME_PPSStatus hCardl dppsMODULEO dppsSUPPLYC dppsVOLTAGE printf Core Voltage is d millivolts n Voltage Get the Voltage and current for all of module 0 Voltage DIME_PPSStatus hCardl dppsMODULEO dppsALLSUPPLIES dppsVOLTAGE printf The total Voltage for Module 0 is d n Voltage Figure 13 Getting Information on Power Supply Voltages and Currents 6 67 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 0 is returned by the function The number of active bits depends on the number of LEDs on the motherboard Please check your Motherboard Reference Guide for de
41. 107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 7 40 Syntax Arguments Return Description Alternative 7 41 Syntax Arguments Return Description Alternative 7 42 Syntax Arguments Return Description 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 returned 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 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 26 on page 53 for all possible returns values The function first checks that a valid card has in fact been successfully opened i
42. 7 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Return Description Alternative 7 46 Syntax Arguments Return Description Alternative 7 47 Syntax Arguments Return Description Alternative 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 total number of devices for the module respectively DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfWIDTH 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 re
43. 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 can be used to return the error information Returns 0 on success Table 43 DIME SystemControl CmdMode Argument Options Value This argument is used to specify the action for a command mode Table 44 on page 75 provides details Value Description dinfDISABLE Disables the selected command mode feature dinfENABLE Enables the selected command mode feature Table 44 DIME SystemControl Value Argument Options Return The return is dependant upon the command mode A return of 1 indicates an error Description This function is used to control system features NT107 0068 Issue 8 September 14 2004 www nallatech com 75 Functional Reference 76 6 75 DIME_SystemStatus Syntax DWORD DIME SystemStatus DIME HANDLE handle DWORD 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 Table 45 on page 76 provides details of the available command modes
44. E 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 10 on page 60 NT107 0068 Issue 8 September 14 2004 www nallatech com 77 Functional Reference 6 78 Syntax Arguments Return Description Example 6 79 Syntax Arguments Return Description 6 80 Syntax Arguments Return Description 78 DIME_WriteLEDs void DIME WriteLEDs DIME HANDLE handle DWORD Value handle is a valid handle to a DIME carrier card Value is the value that is to be written to the LEDs N A 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 Motherboard Reference Guide for details on the LEDs See Figure 4 on page 25 DIME WritePIO DWORD DIME WritePIO 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 I O is to be written to See Table 41 on page 72 for details of the available ba
45. E_LocateCard Flags Argument Options Return 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 56 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Description Example 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 See Figure 4 on page 25 6 49 DIME LocateStatus Syntax Arguments DWORD LocateStatus LOCATE HANDLE handle DWORD 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 Table 33 on page 57 gives details for the CmdMode argument CmdMode Description 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
46. FUSE API Developers Guide NT107 0068 Issue 8 6 Contacting Nallatech Support WWW NALLATECH Go to www nallatech com and click support Email support nallatech com Headquarters Europe and Asia Pacific Nallatech Boolean House One Napier Park Cumbernauld Glasgow G68 OBH UK Phone Fax Europe and Asia Pacific Phone 44 0 1236 789500 Fax 44 0 1236 789599 WWW www nallatech com North America Nallatech Inc 12565 Research Parkway Orlando Florida 32826 USA North America Phone 407 384 9255 Fax 1 407 384 8555 www nallatech com Western Sales Office and Design Center Nallatech Inc 226 Airport Parkway Suite 470 San Jose 95110 1004 USA Western Sales Office and Design Center Phone 1 408 467 5075 Fax 1 408 436 5402 NT107 0068 Issue 8 September 14 2004 Document Name FUSE C C API Developers Guide Document Number 107 0068 Issue Number Issue 8 Date of Issue 14 09 04 Revision History Date Issue Number Revision Trademark Information The Nallatech Logo the DIME logo the DIME II logo FUSE FIELD Upgradeable Systems Environment DIME DIME II TCL Plug In for FUSE 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 the only logical solution and software defined systems
47. Filename This is the name of the system definition file that is to be loaded intomemory CardCount This is a memory location to which the number of cards that the loaded system contains is returned www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Return Description Notes 6 48 Syntax Arguments 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 customize the loading of the system definition file Currently there are no flags and this argument is not used 0 Should be used 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 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 bitfiles streams are assigned to every device in every card To successfully load a system definition file the card definition files for each card in the system must be in the same location as when the system definition file was created DIME LocateCard LOCATE HANDLE DIME LocateCard int LocateType DWORD void LocateTypeArgs DWORD DriverVersion DWORD Flags
48. 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 modules 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 www nallatech com NT
49. MContige GU il lr 75 NT 107 0068 Issue 8 September 14 2004 www nallatech com DIME System ssa 75 DIME osa 76 _SystemStatusPtr 76 DIME ry uade rur hin 77 DIFESE 78 DIME _WritePlO sani 78 VVrEIESPICODIPSCEIDEL cella 78 besi PUNCU 79 Close DIMER Cal PERA 79 iii 80 lle 80 DIME 8l DIME VirtexReset oat untere tatem mi eap 8l DIME _VirtexResetEnable lilla 8l DIME VirtexResetDisable calante 8l DIME_SystemReset aeree 82 DIME SystemResetEnable cane 82 DIME ystermResetDisable illa 82 DIME PEIBOSEE RI RN REDEEM EM 82 DILET DITO eee 83 DIME ED aloe 83 DIME arde 83 DIME _WriteDigitallODirection 83 BIMEMre nbnakiiiiiiiidiiiiiiiiaiiiaidicadiccai 84 DIME_InterfaceflagBusy nin Datos fauc nitus Rd 84 DIME TiterfaceFlagEmpby aussi n M RR NEEDS 84 DIME InterfaceFlagVirtexReadEmpty 85 DIME InterfaceFlagVirtexWVriteFull 85 DIME_JTAGTurboDisable 85 DIME 85 DIME_BootVirtexSingle sciare 86 DIME 86 DIME SetFilenaMe cc 87 DIME GetFilename illa 87 DIME_SetFilenameAndConfig ett toe tnit 88 EJIME Saves 88 DIME
50. ME HANDLE handle DWORD ErrNumber char ErrString 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 N A This function allows you 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 You can allocate any memory required by either the ErrNumber or the ErrString arguments 1000 characters is the maximum error string length 1 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 6 40 Syntax Arguments Return Description 6 41 Syntax Arguments Figure 6 DIME GetError Example DIME GetLocateVersionNumber DWORD DIME GetLocateVersionNumber void N A Returns the version number of the locate unit within the FUSE software Returns 0 on an error Gets the version number of the locate unit within the FUSE software DIME GetVersionNumber D
51. Number 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 Module Reference 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 handle ModuleNumber dinfDIMECODE www nallatech com 9 Legacy Functions 92 7 37 Syntax Arguments Return Description Alternative 7 38 Syntax Arguments Return Description Alternative 7 39 Syntax Arguments Return Description Note Alternative 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 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
52. RD 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 6 66 DIME PPSStatus Syntax DIME PPSStatus DIME HANDLE handle DWORD ModuleNum DWORD SupplyNum DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ModuleNum This is the module number SupplyNum This argument is used to specify what particular power supply is targeted Valid supply numbers are provided Table 39 on page 70 SupplyNum Description dppsSUPPLYA Power Supply is selected dppsSUPPLYB Power Supply B is selected dppsSUPPLYC Power Supply C is selected dppsSUPPLYD Power Supply D is selected dppsALLSUPPLYS All supplies are selected Table 39 DIME_PPSStatus Supply Number Options CmdMode This argument is used to specify what particular aspect of programmable power supplies information is required CmdMode Description dppsVOLTAGE This command mode selects that only voltage information is returned The voltage returned is given in millivolts and has an error of
53. Return Description 6 16 Syntax Arguments Return Description Notes 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 This function returns the pointer to the start of the bit stream that is assigned to a device DIME ConfigModule DWORD DIME ConfigModule DIME HANDLE handle DWORD ModuleNumber DWORD DeviceProgress DWORD ConfigProgress 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 The function simply returns the last value returned from the configuration of a device A return of l indicates a non configuration error The function iterates through each of the devices in a specified module and will configure each device using DIME ConfigDevice or DIME MemConfigDevice provided that the device has been defined in the MDF as bootable and that a bitfile 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 dcfgDL IH NOCRC dcfgOK STATUS DIME ConfigOnBoardDevice DWORD DIME ConfigOnBoardDevice DIME HANDLE handle const ch
54. SE C C API include Fast and simple device configuration i Multiple card support Multiple interface support Multiple operating system support Interfacing amp control of Nallatech hardware features 2 Generic function interface Figure on page 4 shows the layered approach to interfacing with Nallatech hardware NT107 0068 Issue 8 September 14 2004 www nallatech com 3 FUSE C C API Overview 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 in this Developers 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 FUSE Probe Tool in which the user can control the hardware via a GUI is an example of an application layer product 4 www n
55. SWMBTS the return will be a pointer of type SWMBInfo Type Description DWORD NumTypes The number of motherboard types returned Cardlnfo pCardInfo Pointer to an array containing the motherboard information The number of elements in this array corresponds with NumTypes Table 47 Type SWMBInfo Members www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Description DWORD MotherBoardType The motherboard type See Table 29 on page 55 details char MotherBoardDesc 200 A short description of the motherboard E g Ballynuey2 Table 48 Type Cardinfo members Description This function is used to return system status information that cannot be returned using DIME_SystemStatus Example DWORD i SWMBInfo pSWMBInfo Using the DIME_SystemStatusPtr function if pSWMBInfo SWMBInfo DIME SystemStatusPtr 0 dinfDIME SWMBTS ZNULL printf The software detects d motherboards n pSWMBInfo NumTypes for i20 i pSWMBInfo NumTypes i printf Details of mothreboard number of follows n 1 i pSWMBInfo gt NumTypes printf tMotherboard type d n pSWMBInfo pCardInfo i MotherBoardType printf NtMotherboard description s n pSWMBInfo pCardInfo i MotherBoardDesc Figure 15 DIME SystemStatusPtr Example 6 77 DIME_UnLockMemory Syntax DWORD DIME UnLockMemory DIME HANDL
56. Standard Terms and Conditions 100 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 E mail 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 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 retur
57. WORD DIME GetVersionNumber DIME HANDLE CardHandle 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Return Returns a version number Description Gets the version number of the installed software 6 42 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 23 on page 51 for details of the available InterruptFlags Note Currently the only parameter available is dintONBOARDFPGA except for the BenONE If a BenONE is used then either dintONBOARDFPGA or dintMODULEI may be used Both of these address the interrupt on the module FPGA CmdMode This argument is used to specify what function is to be performed Table 21 on page 49 gives details of the available command modes CmdMode Description dintENABLE This is enable the selected interrupt Returns zero on success non zero otherwise dintDISABLE This is used to disable the selected interrupt Returns zero on success non zero otherwise dintWAIT This causes the function to wait for the selected interr
58. XSPEED20 7 23 DIME_BootVirtexSingle Syntax DWORD DIME BootVirtexSingle DIME HANDLE handle const char FileName Arguments handle is a valid handle to a DIME carrier card FileName is the filename of the bitfile that is to be used for booting the on board FPGA Return 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 Description This function boots the on board FPGA device using the bitfile given by filename Note that the bitfile must be configured to use the JTAG clock for configuration rather than the default of the CCLK Alternative DIME ConfigOnBoardDevice handle FileName 0 7 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 c
59. allatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 2 Getting Started In this section Installation 2 1 Installation 2 1 1 Host System 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 2 1 2 Software Installation Windows v To install FUSE software in Windows NT 2000 XP use the following procedures I Insert the supplied FUSE System Software CD into your system s CD ROM drive and wait for the CD to autorun lf autorun does not start click Start gt Run from the taskbar and run the following program CD Drive autorun exe 2 In the FUSE Main Menu click on Install FUSE Application Software 3 The installation process begins Work through the series of dialog boxes until the Finish box is reached 4 Click Finish to install the software 5 Restart the PC to complete the installation Linux v To install FUSE software in Linux RedHat use the following procedures I Insert the supplied FUSE System Software CD into your system s CD ROM drive NT107 0068 Issue 8 September 14 2004 www nallatech com 5 Getting Started 2 Mount the installation CD gt mount dev cdrom mnt cdrom 3 Change directory as follows cd mnt cdrom 4 Type rpm ihv followed by the ful
60. alue 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 boxes are displayed so that the 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 Table 49 DIME GlobalMode NT107 0068 Issue 8 September 14 2004 www nallatech com 89 Legacy Functions CmdMode Function 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 Alternative 7 31 Syntax Arguments Return Description Alternative 7 32 Syntax Arguments Return Desc
61. ar FileName DWORD Flags handle is a valid handle to a DIME carrier card FileName is the filename of the bitfile that is to be used for booting the on board FPGA Flags This argument is used to control the configuration of the on board device See Table 7 on page 27 This function has several possible returns Please see Table 8 on page 27 for details This function configures the cards on board FPGA with the specified bitfile Configuration is carried out using the cards JTAG chain The bitfile must be configured to use the JTAG clock for configuration rather than the default of the CCLK NT107 0068 Issue 8 September 14 2004 www nallatech com 29 Functional Reference 30 6 17 Syntax Arguments DIME_ConfigSetBitsFilename DWORD DIME_ConfigSetBitsFilename DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD Flags 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 bitfile that is to be assigned to this device Flags This argument allows the developer to configure the assignment of bitfiles to devices to suit the development requirements Table 9 on page 30 gives details for the Flags Flags Description Return Description Notes 6 18 Syntax Arguments dcfgFREEEMBEDBITS It is possible to embed a bitstream with a particular d
62. aveSystemConfig 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 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 bitfiles have been assigned to particular devices The information can simply be written to the file specified DIME_SaveCardDefinition handle Filename 0 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 7 29 Syntax Arguments Return Description Alternative 7 30 Syntax Arguments Return Description Notes 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 back into the program existing information previously saved to a file 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 v
63. 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 FUSE Developers Guide 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 raised 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
64. ble for other applications Example include dimesdl h 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 dlPCI mbtALL NULL dldrDEFAULT dlDEFAULT 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 I Close the card down DIME CloseCard hCardl Finally close the locate down DIME CloseLocate hLocate Figure 4 Locating Opening and Closing a Card 6 9 DIME CloseLocate Syntax void DIME CloseLocate LOCATE HANDLE LocateHandle Arguments handle is a valid handle returned 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 4 on page 25 NT107 0068 Issue 8 September 14 2004 www nallatech com 25 Functional Reference 26 6 10 DIME ConfigCard Syntax DWORD DIME_ConfigCard DIME HANDLE handle DWORD ModuleProgress DWORD DeviceProgress DWORD ConfigProgress Arguments handle is a valid
65. 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 38 Syntax Arguments Return Description Notes Example DIME GetCurrentHandle DIME_HANDLE DIME_GetCurrentHandle void N A Returns the currently selected card handle from the probe utility If no card is selected in the probe utility then the return will be NULL This function gets the current card handle from the probe utility Note that the probe utility must be launched and a card selected The nueym lib nueymomf lib for Borland projects needs to included in your design Borland example of using DIME GetCurrentHandle Display the GUI for Configuration DIME MConfigGUI NULL 1 wait here until a card has been selected Get the current card handle Handle DIME GetCurrentHandle if Handle NULL Application MessageBox No card selected Invalid card handle MB OK MB_ICONWARNING MB APPLMCDAL return Handle is now valid Figure 5 DIME GetCurrentHandle NT107 0068 Issue 8 September 14 2004 www nallatech com 47 Functional Reference 48 6 39 Syntax Arguments Return Description Notes Example DIME GetError void DIME GetError DI
66. 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 5 DIME_CardStatusPtr 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_CardStatus 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 24 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 8 DIME CloseCard Syntax void DIME CloseCard DIME HANDLE CardHandle Arguments handle is a valid handle returned from DIME OpenCard Return N A Description This function closes down the handle returned from DIME_OpenCard It de allocates all system resources that where used when interfacing with the card 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 availa
67. card when it is opened DIME_OpenCard Table 33 DIME_LocateStatus CmdMode Argument Options Return Returns 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 8 September 14 2004 www nallatech com 57 Functional Reference include lt dimesdl h gt This is held in the include directory within FUSE include lt stdio h gt int main int argc char argv LOCATE HANDLE hLocate DWORD NumOfCards LoopCntr Locate the Cards on the PCI interface hLocate DIME LocateCard dlPCI mbtALL NULL dldrDEFAULT dlDEFAULT Determine how many Nallatech cards have been found NumOfCards DIME LocateStatus hLocate 0 dlNUMCARDS printf d Nallatech card s found n NumOfCards Get the details for each card detected for LoopCntr 1 LoopCntr NumOfCards LoopCntr t printf Details of card number d of d n LoopCntr NumOfCards printf NtThe card driver for this card is ass n char DIME LocateStatusPtr hLocate LoopCntr dlDESCRIPTION printf tThe cards motherboard type is d
68. de Arguments handle is a valid handle to a DIME carrier card ModuleNum is the Module that is being addressed Note that 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 Table 12 on page 36 gives details of the available command modes CmdMode Description dinfDEVICEIDCODE This command mode returns the 32 bit hex decimal JTAG device ID code for the device See Table 4 on page 37 for details dinfDEVICETYPE This command mode returns the device type for the device See Table 3 on page 36 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 useful when wishing to display an image of the device on the module dinfYOFFSET 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 useful 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 useful 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 useful when wishing to display an image of the device o
69. e DIME DSP and Image Processing Modules for Enhanced FPGAs DIMESDL DIME Software Development Library Direct Memory Access FPGA Field Programmable Gate Array FUSE Field Upgradeable System Environment GUI Graphical User Interface e IO Input Output e PPS Programmable Power Supplies SRAM Static Random Access Memory Typographical Conventions The following typographical convention are used in this manual Red text indicates cross reference to information within the document set you currently reading Click the red text to go to the referenced item To return to the original page right click anywhere on the current page and select Go To Previous View Blue underlined text indicates a link to a Web page Click blue underlined text to browse the specified Web site Italics denotes the following items References to other documents See the FUSE System Software User Guide for more information Emphasis in text Enable Loopback should not be enabled until all other registers have been set up FUSE Naming Conventions Please note that the FUSE API clocks are named differently in the FUSE System Software compared to this Developers Guide The clock naming conventions are shown in Table on page xii Clock Names in FUSE Clock Names in Documentation System Clock SYSCLK Clock A CLK A DSP Clock DSPCLK Clock B CLK B Pixel Clock PIXCLK Clock C CLK C
70. e 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 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_InterfaceFlagVirtexWriteFull 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 www nallatech com 85 Legacy Functions 86 Alternative DIME JTAGControl handle djtagCONFIGSPEED djtagMA
71. e 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 on error Description This function is used to control certain aspects of the selected device 6 27 DIME DeviceControlPtr Syntax DWORD 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 15 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 the 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 35 Functional Reference 36 6 28 DIME DeviceStatus Syntax DWORD DIME DeviceStatus DIME HANDLE handle DWORD ModuleNum DWORD DeviceNum DWORD CmdMo
72. ed documentation for a period of ninety 90 days after the date of your purchase Nallatech Ltd does not war rant 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 regula tions there under or be used for any purpose prohib ited by the Act DEVELOPERS GUIDE CONDITIONS Information in this Developers 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 or printing inaccuracies or errors and no liability will arise therefrom This Developers Guide is supplied without warranty or condition either expressed or implied including but not limited to any implied warranties of merchantability and fitness
73. ed 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 9 on page 58 DIME LockMemory DIME MEMHANDLE DIME LockMemory DIME HANDLE handle unsigned int Data DWORD Length 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 Returns a null pointer on error On success returns a memory handle When performing PCI DMA transfers the physical memory that your data resides in must be locked down by the kernel This function does exactly this and returns a handle to the locked down memory that can then be passed into the DMA functions Locking down and unlocking memory takes a significant amount of time and should therefore be minimized 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 59 Functional Reference Locking memory prevents the OS kernel from moving the memory around and hence decrease
74. ed 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 quantities of data between the host 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 6 33 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 15 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 Table 18 on page 4l 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
75. ents Return Description DWORD DIME CardControl DIME HANDLE handle DWORD CmdMode DWORD Value 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 Returns on error This function is used to control certain aspects of the card 6 3 DIME CardControlPtr Syntax Arguments Return Description 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 a card is to be controlled There are no current command modes for this function pValue 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 6 4 DIME CardResetControl Syntax Arguments ResetNum drINTERFACE 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 Table 2 on page 20 gives details of available resets Description This is the reset for the interface FPGA Toggling this reset causes an interna
76. ept 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 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 to 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 www nallatech com NT107 0068 Issue 8 September 14 2004 7 19 Syntax Arguments Return Description Alternative 7 20 Syntax Arguments Return Description Alternative 7 21 Syntax Arguments Return Description Alternative 7 22 Syntax Arguments Return Description NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide DIME InterfaceFlagVirtexReadEmpty DWORD DIME JInterfaceFlagVirtexReadEmpty DIME HANDLE handle handle is a valid handle to a DIME carrier card If there is no data in read buffer to be accessed this function will return 0 however will be returned if ther
77. ess ddmalNTERRUPT_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 19 DMA Transfer Functions Return Values Description This handles the transfer of WordCount 32 bit 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 6 34 Syntax Arguments 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 DIME DMAReadToLockedMem DWORD DIME DMAReadToLockedMem HANDLE handle DIME DMAHANDLE DMAChannel DIME MEMHANDLE DestData DWORD SrcAddr DWORD WordCount DWORD Flags 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 LockMemory This should be the 32 bit aligned location of the memory for the data is going to read from the card and stored in www nallatech com NT107 0068 Issue 8 September 14 2004 Return Description 6 35 Syn
78. ets 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 Table 17 DIME DMAControl CmdMode Argument Options NT107 0068 Issue 8 September 14 2004 www nallatech com 39 Functional Reference CmdMode Description 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 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 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 ddmaPOLLED ddmalNTERRUPTS
79. eturned 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 4 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 4 3 Device Configuration Examples Once a card has been opened the next step is the configuration of a device typically 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 on page 15 such as DIME ConfigOnBoardDevice or DIME ConfigControl There are two example programs included in the FUSE install that demonstrate configuration of both the on board FPGA and a module FPGA with the LED snake design Details on the design are included in the Motherboard or Module Reference Guide The two example programs are Configuring the on board FPGA with ledsnake NT107 0068 Issue 8 September 14 2004 www nalla
80. evice instead of a filename If this is the case then when assigning a Filename to a device that already has a bitstream assigned then the existing assigned bitstream may no longer be required In this situation this flag should be used This will de allocate the system resources that were assigned to the embedded bit stream Table 9 DIME_ConfigSetBitsFilename Flags Argument Options Returns 0 upon success Returns non zero otherwise This function assigns a bitfile to the specified device Once a device has a bitfile 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 bitfile is used to configure the device This function only assigns the name of the bitfile to the device No configuration is carried out DIME_ConfigSetBitsFilenameAndConfig DWORD ConfigSetBitsFilenameAndConfig DIME_HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD SetFlags DWORD Progress DWORD ConfigFlags 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 bitfile that is to be assigned to this device SetFlags These are the flags for the setting of the filename Please refer to DIME ConfigSetBitsFilename on page 30 for further details Progress This is a pointer to a me
81. f 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 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 This function returns the type of the specified device on the specified module See Table 13 on page 36 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 93 Legacy Functions 94 Alternative DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfDEVICETYPE 7 43 DIME_GetDeviceX Offset Syntax DWORD DIME_GetDeviceXOffset 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 X Offset for the specified module device in the module image Description function first checks that a valid card ha
82. fglINVLAID CARD Indicates a valid card has not been detected cfgOK_NOSTATUS Indicates that has been successfully shifted into the chain with no post configuration checking carried out cfgBIT_FILE If a the specified could not be successfully opened cfgINTEG_FAIL Indicates that the JTAG integrity scan check has failed and the chain is apparently incomplete cfgDL_IL_NOCRC Configuration Status DONE Low INIT Low No CRC errors detected cfgDL_IL_CRC Configuration Status DONE Low INIT Low CRC errors detected cfgDL_IH_NOCRC Configuration Status DONE Low INIT high No CRC errors detected www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Description Alternative 7 25 Syntax Arguments Return Description Alternative 7 26 Syntax Arguments cfg_DL_IH_CRC Configuration Status DONE Low INIT high CRC errors detected cfgDH IL NOCRC Configuration Status DONE high INIT low No CRC errors detected cfgDH IL CRC Configuration Status DONE high INIT low CRC errors detected cfsOK STATUS Configuration completed successfully as indicated by read back of FPGA Status register DONE high INIT high No CRC errors detected cfgDH IH CRC Configuration Status DONE high INIT high CRC errors detected cfgNOLIC Multiple Configuration Licence not available cfg UNKNOWN Unidentifiable configuration result This is the main function used for carrying
83. 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 37 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 63 6DIME 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 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 38 on page 69 gives details for the Flags Flags Description dccOPEN DEFAULT This is the defaul
84. gs No action can be brought arising out of any contract more than 12 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 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 SOFTWARE 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 this license do not install the Software and promptly return it to the place where you obtained it I License Nallatech Ltd grants you a licence to use the software programs and documentation in this pack age Licensed materials If you have a single license on only one computer at a time or by only one user at a time
85. gument is used to specify the command on the selected reset See Table 3 on page 21 for details Return Returns on an invalid handle 0 on error and drFCONTROLABLE or drTOGGLEONLY depending on the resets capabilities A return of d CONTROLABLE 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 6 DIME_CardStatus Syntax DIME CardStatus DIME HANDLE handle DWORD CmdMode Arguments 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 Table 4 on page 23 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 on board module dinfNUMBERSLOTS Returns the number of module slots there are for the card dinfSLOTSUSED T
86. his returns a bit wise value to indicate if a module is plugged into a particular DIME slot A 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 29 on page 55 for details dinfCARDMAXJTAGSPEED Returns the maximum speed that the cards JTAG chain can be driven See Table 26 on page 53 for details dinfSERIALNUMBER Returns the serial number of the card dinfDESCRIPTION Returns a description of the motherboard Table 4 DIME CardStatus CmdMode Argument Options Return The return value is dependant upon the command mode Returns on error Description This function returns card status information NT107 0068 Issue 8 September 14 2004 www nallatech com 23 Functional Reference 6 7 DIME CardStatusPtr Syntax void DIME CardStatusPtr DIME HANDLE handle DWORD CmdMode Arguments 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 5 on page 24 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
87. i 29 DIME_ConfigOnBoardDevice dvd tad dba fedis 29 DIME 30 DIME ConfigSetBitsFilenameAndConfig ees 30 DIME ConfigSetBitsMemory 31 DIME ConfigSetBitsMemoryAndConfig 32 DIME ConfigStat s 32 DIME 33 DIME 2 dad iud dud ntes bn onc OE dent 33 DIME DataWrite cucinare etn cmd 34 DIME 34 DIME DeviceContfal ornano 35 DIME DeviceControlPth beer 35 DIME Drain 36 DIME eyicBSESEUSPEES e densi pat pd ocu pet unda imn cd dh 38 DIME DMA OSE M 39 DIME DRACO La 39 DIME BMAOpelisari ea 41 DIME DMAR ad 41 DIME 42 www nallatech com NT107 0068 Issue 8 September 14 2004 BE MA SACU M T 43 45 DIME_DMAVVriteFromLockedMem 46 DIME _GetCurrentHandle atrii cadre beber ce m bela 47 DIME cca 48 DIME 48 DIME _GetVersionNumber 48 DIME InterruptCantrol mina 49 DIME Interr ptStatus ariana 5 DIME TTC SD 53 DIME
88. ified interface Table 30 on page 56 details what information should be provided dependant on the interface diPCI NULL dIUSB NULL diTCPIP DIME_TCPIP dICITRIX DIME CITRIX dIETHERNET DIME_ETHERNET dIVME DIME_VME Table 30 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 Table 31 on page 56 should be used DriverVersion Description didrDEFAULT This locates the latest driver installed on your system for each card found didrALL This locates all drivers installed on your system for each card found Table 31 DIME LocateCard DriverVersion Argument Options Flags This argument allows the locate process to be customized to suit your development requirements Table 32 on page 56 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 32 DIM
89. in this function and is only included for consistency Return Returns 0 on success Non zero on error Description This function controls the software resets For more details on these resets please consult your Motherboard Reference Guide NT107 0068 Issue 8 September 14 2004 www nallatech com 21 Functional Reference 22 Example GI Enable the OnBoardFPGA reset DIME_CardResetControl handle drONBOARDFPGA drENABLE 0 Disable the OnBoardFPGA reset DIME_CardResetControl handle drONBOARDFPGA drDISABLE 0 Toggle the OnBoardFPGA reset DIME_CardResetControl handle drONBOARDFPGA drTOGGLE 0 Enable the System reset DIME CardResetControl handle drSYSTEM drENABLE 0 Disable the System reset DIME CardResetControl handle drSYSTEM drDISABLE 0 Toggle the System reset DIME CardResetControl handle drSYS M drTOGGLE 0 E Toggle the interface FPGA reset DIME_CardResetControl handle drINTERFACE drToggle 0 Figure 3 Examples of Using DIME_CardResetControl 6 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 2 on page 20 for details CmdMode This ar
90. inted with the API its features and the functionality it provides After reading the introduction you should proceed with installation instructions then work through the examples which provide a basic starting point for working with the API The reference section provides a list of functions which can be used in conjunction with the FUSE C C API Symbols Used Throughout this Guide there are symbols to draw attention to important information v The red arrow symbol indicates a set of procedures to follow such as installing software or setting up hardware The blue i symbol indicates useful or important information The red symbol indicates a warning which requires special attention Reference Guide Format The Reference Guide is divided into Sections which are grouped into Parts The parts divide the document as follows Introduction Provides a brief introduction to the Developers Guide and the FUSE C C API Installation instructions are also described here Implementation Provides details how to use the FUSE API and example applications Reference Information Provides reference information on the FUSE API functions Use this section as a quick reference to the API functions NT107 0068 Issue 8 September 14 2004 www nallatech com xi About this Developers Guide Related Documentation e Nallatech FUSE System Software User Guide Abbreviations API Application Program Interfac
91. l if the DMAChannel is interruptible Returns 0 if not ddmaNONBLOCKINGSUPPORT Returns a 1 if the DMAChannel supports non blocking DMA transfers Returns a 0 if not ddmaLOCALINCFLAG Returns a 1 if the DMAChannel at the local side the PC in the majority of cases supports incremental addressing Return a 0 if not ddmaREMOTEINCFLAG ddmaLOCALNOINC 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 Returns 1 if the DMAChannel can do no incrementing on local addresses Returns a 0 if not ddmaREMOTENOINC Returns 1 if the DMAChannel can do no incrementing on remote addresses Returns a 0 if not ddmaTIMEOUT ddmaCURRCOUNT Returns the DMA timeout value for DMA transfers This is defaulted to 5000 milli seconds 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 indicates 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 DMA write operation Returns the status of the EMPTY signal that is on the interface FPGA to the o
92. l name of the rpm RedHat Package Format file gt rpm ihv fuse 1 7 rpm 5 This installs FUSE to the following location gt usr local nallatech FUSE 2 1 3 Initial Confidence Test After rebooting the machine and installing the DIME II hardware as described in the DIME II Installation Guide located on your product CD run the FUSE Probe Tool 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 shown in Figure 2 on page 6 appears 556905606 Read Data cme A A 4 A A A A A Wite Read reos 0 Resets Frequencies Figure 2 FUSE Probe Tool 6 www nallatech com NT107 0068 Issue 8 September 14 2004 NALLATECH The High Performance FPGA Solutions Company Part IL Implementation This part of the Reference Guide provides detailed information on how to use the FUSE C C API and its key components NT107 0068 Issue 8 September 14 2004 www nallatech com 7 8 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 3 Using FUSE C C API In this section General Implementation Information 3 1 General Implementation Information When developing with the FUSE API certain files must be added to your project to gain access to the API functions These files are
93. l reset of the cards interface PCI USB etc that is primarily used to clear the internal interface FIFOs of the interface FPGA Table 2 DIME CardResetControl ResetNum Argument Options www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide ResetNum Description 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 Motherboard Reference 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 2 DIME CardResetControl Argument Options CmdMode This argument is used to specify the command on the selected reset Table 3 on page 21 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 3 DIME CardResetControl CmdMode Argument Options The value argument is not used
94. l to support nallatech com or by fax to 44 0 1236 789599 If you want Nallatech to reply to your comments please include your name address and telephone number
95. le DWORD Bitstream DWORD ByteLength DWORD ModuleNumber DWORD DeviceNumber DWORD Flags handle is a valid handle to a DIME carrier card Bitstream is a pointer to where you want the readback bitstream to be stored ByteLength This argument specifies the length of the Bitstream to readback ModuleNumber is the specific module you want to target DeviceNumber is the specific device you want to target Flags This argument is used to control the configuration of the on board device Currently there are no flags and this argument is ignored This function returns zero on success This function is used to either readback the configuration registers of the FPGA or readback the state of the CLBs IOBs etc Note to readback the state of all CLBs IOBs etc you must use the CAPTURE XXX where XXX is the type of FPGA www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 57 DIME MemReadbackOnBoardDevice Syntax DWORD DIME MemReadbackOnBoardDevice DIME HANDLE handle DWORD Bitstream DWORD ByteLength DWORD Flags Arguments handle is a valid handle to a DIME carrier card Bitstream is a pointer to where you want the readback bitstream to be stored ByteLength This argument specifies the length of the Bitstream to readback 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 returns ze
96. m 87 Legacy Functions Return Description Alternative 7 27 Syntax Arguments Return Description Alternative 7 28 Syntax Arguments Return Description Alternative 88 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 This function is used to read the filename that has been set for a particular device on a module The handle for the particular board also needs to be passed to the function DIME_ConfigGetBitsFilename handle ModuleNumber DeviceNumber DIME_SetFilenameAndConfig DWORD DIME SetFilenameAndConfig DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber const char Filename DWORD Progress 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 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 S
97. mber 14 2004 7 34 Syntax Arguments Return Description Notes Alternative 7 35 Syntax Arguments Return Description Alternative 7 36 Syntax Arguments Return Description Alternative NT107 0068 Issue 8 September 14 2004 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 first 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 Module
98. mory location that holds the configuration completion percentage Please refer to DIME ConfigControl on page 26 for further details www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide ConfigFlags These are the flags for the configuration of the device Again please refer to DIME_ConfigControl 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 bitstream filename to a particular device and then configures the device using the assigned bitstream file 6 19 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 DeviceNumber is the number of the selected device Bits is a pointer to the bitstream that is to be assigned to the device ByteLength is the byte length of the bitstream Flags This argument allows the developer to configure the assignment of bitstreams to devices to suit the development requirements Table 10 on page 31 gives details for the Flags Description dcfgFREEEMBEDBITS If the device already has a bitstream assigned and this bit stream is no longer valid then using this flag
99. n DIME LocateStatus hLocate LoopCntr dlMBTYPE Finally close the locate down DIME CloseLocate hLocate return 0 58 Figure 9 Getting Information on the Located Cards www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide 6 50 Syntax Arguments CmdMode DIME LocateStatusPtr 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 Table 34 on page 59 provides details for the CmdMode argument Description diDESCRIPTION This returns a pointer of type CHAR to a string that is a short description of the software driver for the chosen card Table 34 DIME_LocateStatusPtr CmdMode Argument Options Return Description Notes Example 6 51 Syntax Arguments Return Description Notes See Table 34 on page 59 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 open
100. n board FPGA Interface When the EMPTY signal is high this function returns a l otherwise it returns 0 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 the on board FPGA Interface When the BUSY signal is high this function returns a 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 Table 20 DIME_DMAStatus CmdMode Argument Options www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide CmdMode Description 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 20 DIME DMAStatus CmdMode Argument Options Return Returns are dependant on the selected c
101. n the FUSE API with full details of the function DIME AddressWriteSingle DWORD DIME AddressWriteSingle DIME HANDLE handle DWORD Data volatile DWORD Terminate DWORD Timeout 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 argument 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 There are several possible returns for the transfer See Table 18 on page 41 This handles the transfer of a single 32 bit 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 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 19 Functional Reference 20 6 2 DIME CardControl Syntax Argum
102. n the module Table 12 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 configured Table 13 Device Types www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide JTAG device ID code Description JTAG device ID code Description 0 Invalid arguments didXCV50E Xilinx Virtex E device V50 didXCV50 Xilinx Virtex device V50 didXCV100E Xilinx Virtex E device V100 didXCV 100 Xilinx Virtex device V100 didXCV200E Xilinx Virtex E device V200 didXCV 150 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 didXCV1000E Xilinx Virtex E device 1000 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 didXCV1000 Xilinx Virtex device V1000 didXCV2600E Xilinx Virtex E device V2600 didXCV405EM Xilinx
103. ned 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 authorized 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 which the original 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 authorized use including without limitation 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 www nallatech com company s maximum liabilit
104. nks Please check your Motherboard Reference Guide for details of available periphery I O Data is the data to be written to the periphery I O Returns 0 on success Returns non zero on error This function writes the values to the pins of the periphery I O DIME WrritePlODirection DWORD DIME WritePlODirection 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 I O direction is to be written to See Table 41 on page 72 for details of the available banks Please check your Motherboard Reference Guide for details of available periphery I O Returns zero on success non zero on error This function sets the direction of individual pins for the specified bank A l in a particular bit location sets that pin to an input otherwise the pins is an output www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 7 Legacy Functions In this section The FUSE API is backward compatible with Nallatech s DIME system software These legacy functions are from the DIME system software library and although still supported under the FUSE API you should convert to the new FUSE API functions This section contains full details of all obsolete functions with alternative FUSE API function suggestions 7 1 CloseDIMEBoard Syntax Arguments Return Description Notes Alternative void CloseDIMEBoard
105. nly locking down 4 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 8 September 14 2004 www nallatech com 97 Version History List 98 www nallatech com NT107 0068 Issue 8 September 14 2004 NT107 0068 Issue 8 September 14 2004 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 The buyer agrees to execute and return any license agreements as may be required by the company in order to authorize 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 forma separate contract to which these conditions apply and any waiver or any act of non enforcemen
106. ocate 1 dccOPEN DEFAULT Main code Closing the card DIME CloseCard hCard DIME CloseLocate hLocate Figure 16 Alternative to OpenDIMECard 7 3 GetDIMEHandle Syntax DIME HANDLE GetDIMEHandle void Arguments N A Return Always returns NULL Description This function previously returned the handle that was last returned by OpenDIMEBoard This cannot be achieved now since it is possible that multiple cards and hence handles have been generated lt 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 80 www nallatech com NT107 0068 Issue 8 September 14 2004 7 4 Syntax Arguments Return Description 7 5 Syntax Arguments Return Description Alternative Syntax Arguments Return Description Alternative Syntax Arguments Return Description Alternative NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide DIME SmartScan 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 were present in the cards JTAG chain However this scan is now incorporated into the DIME OpenCard function So if a card is open then a successful SmartScan has already been carried ou
107. ode This argument is used to specify what function is to be performed Table 24 on page 51 gives details of the available command modes Description dintFLAGS dintAVAILABLE This is used to determine if an interrupt has occurred Returns if an interrupt has occurred 0 otherwise 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 Return Description Table 24 DIME InterruptStatus CmdMode Argument Options Returns all l on error otherwise the return is dependant on the command mode P 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 51 Functional Reference 52 Example Example Interrupt code
108. odule 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 dinflCONFILENAME www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 8 Version History List In this section Version History of FUSE C C API 8 1 New in version 1 9 Enhancement DIME GetCurrentHandle added Enhancement Added the following command modes to DIME ModuleStatus dinfFPGATEMP dinfMODULETEMP dinf TEMPALERTMAX dinfTEMPALERTMIN Enhancement Added the following command modes to DIME ModuleControl dinf TEMPALERTMIN dinf FEMPALERTCLEAR Enhancement Added the following command modes to DIME PPSStatus dppsVOLTAGE dppsCURRENT 8 2 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 o
109. ommand mode Description This function returns status information on various operations for the selected channel 6 36 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 customized to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 18 on page 41 for valid flags Return There are several possible returns for the transfer See Table 19 on page 42 for details Description This handles the transfer of WordCount 32 bit 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 down SrcData and then performs the DMA transfer On completion of
110. perature is 0 degrees Celsius Value should be the integer value that the minimum alert should be set to in degrees Celsius Note Not all temperature sense devices have this capability Consult your Module Reference Guide or the Temperature Sense Device Datasheet to confirm if your module has this capability dinfSECTEMPALERTMIN This command mode is used to set the minimum temperature level for the temperature alert signal on the secondary FPGA Once set if the FPGA die temperature falls below this temperature the then the temperature alert signal is triggered Note that the power on default setting for this temperature is 0 degrees Celsius Value should be the integer value that the minimum alert should be set to in degrees Celsius Note Not all temperature sense devices have this capability Consult your module user guide or the temperature sense device data sheet to confirm if your module has this capability dinfTEMPALERTCLEAR This clears the temperature alert signal if set Note that if either the maximum or minimum temperature limits are still exceeded then the alert signal will immediately be set Value should to set to 0 Table 35 DIME ModuleControl CmdMode Argument Options 64 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Return Description Example Value This argument is command mode specific Returns on error This function is used to control cer
111. rdDefinition 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 www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Flags This argument allows the developer to configure the information held within the card definition files to suit their development needs Table 42 on page 73 gives details for the Flags Flags Description dcfgEMBEDALLBITS It is possible not only to save the name of the assigned bitfiles into the card definition but also to save the bitstreams themselves If this is desired then this flag should be used This flag saves the bitstreams from the assigned bitfiles or the assigned bitstreams 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 bitstreams associated to large devices then the saved card definition file will become very large Return Description Notes 6 71 Syntax Arguments Return Description Notes Table 42 DIME_SaveCardDefinition Flags Argument Options 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 This function should be used to save information
112. ription Alternative 7 33 Syntax Arguments Return Description Alternative Table 49 DIME_GlobalMode DIME_SystemControl handle CmdMode Value DIME_GetMotherBoardType DWORD DIME_GetMotherBoardType DIME_HANDLE handle handle is a valid handle to a DIME Card See Table 29 on page 55 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 particular card DIME_CardStatus handle dinfMOTHERBORDTYPE 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 1 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 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 8 Septe
113. ro on success Description This function is used to either readback the configuration registers of the FPGA or readback the state of the CLBs IOBs etc Note to readback the state of all CLBs IOBs etc you must use the CAPTURE_XXX where XXX is the type of FPGA 6 58 DIME Miscioctl Syntax DWORD Miscioct 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 6 59 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 that modules are numbered from 0 NT107 0068 Issue 8 September 14 2004 www nallatech com 63 Functional Reference CmdMode This argument is used to specify what particular aspect of module is to be controlled CmdMode Description dinfPRIMTEMPALERTMAX This command mode is used to set the maximum temperature level for the temperature alert signal on the primary FPGA Once set if the FPGA die temperature exceeds this temperature the temperature ale
114. rporate 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 as when the system definition file was created NT107 0068 Issue 8 September 14 2004 www nallatech com 73 Functional Reference 6 72 Syntax Arguments Return Description Notes Example DIME_SetOscillatorFrequency DWORD DIME SetOscillatorFrequency DIME HANDLE handle DWORD OscillatorNum double DesiredFrequency double ActualFrequency handle is a valid handle to a DIME carrier card OscillatorNum determines which clock 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 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 This function is used to control frequency of the programmable oscillators The frequency is given in Mhz and the frequency change is
115. rt signal is triggered Note that the power on default setting for this temperature is 255 degrees Celsius Value should be the integer value that the maximum alert should be set to in degrees Celsius NOTE This function sets the maximum temperature for the alert signal to trigger The alert signal is connected to the FPGA on the module so if the user wants to trigger an event at a certain temperature then the user will have to use the alert signal in their design dinfSECTEMPALERTMAX This command mode is used to set the maximum temperature level for the temperature alert signal on the secondary FPGA Once set if the FPGA die temperature exceeds this temperature the temperature alert signal is triggered Note that the power on default setting for this temperature is 255 degrees Celsius Value should be the integer value that the maximum alert should be set to in degrees Celsius NOTE This function sets the maximum temperature for the alert signal to trigger The alert signal is connected to the FPGA on the module so if the user wants to trigger an event at a certain temperature then the user will have to use the alert signal in their design dinfPRIMTEMPALERTMIN This command mode is used to set the minimum temperature level for the temperature alert signal on the primary FPGA Once set if the FPGA die temperature falls below this temperature the temperature alert signal is triggered Note that the power on default setting for this tem
116. s Please see Table 8 on page 27 for details Description This function configures the specified device with the specified bitfile Notes The bitfile must be configured to use the JTAG clock for configuration rather than the default of the CCLK NT107 0068 Issue 8 September 14 2004 www nallatech com 6 Functional Reference 6 55 Syntax Arguments Return Description Notes 6 56 Syntax Arguments Return Description 62 DIME MemConfigOnBoardDevice DWORD DIME MemConfigOnBoardDevice DIME HANDLE handle DWORD Bitstream DWORD ByteLength DWORD Flags 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 This function has several possible returns Please see Table 8 on page 27 for details 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 The bitfile must be configured to use the JTAG clock for configuration rather than the default of the CCLK DIME_MemReadbackDevice DWORD DIME_MemReadbackDevice DIME HANDLE hand
117. s 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 Alternative DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfXOFFSET 7 44 DIME_GetDeviceYOffset Syntax DWORD DIME_GetDeviceYOffset 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 Y Offset for the specified module device in the module image Description 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 Alternative DIME_DeviceStatus handle ModuleNumber DeviceNumber dinfYOFFSET 7 45 DIME_GetDeviceWidth Syntax DWORD DIME GetDeviceWidth 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 www nallatech com NT10
118. s 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 i Lock down the memory if hMem DIMI else Do DMA transfer Unlock the memory if DIME_UnLockMemory hCard hMem 0 else DataArray i i E LockMemory hCard DataArray sizeof DWORD sizeof DataArray NULL printf Unable to lock down the data n printf Data locked down n printf Data unlocked n printf Unable to unlock the memory n 6 52 Syntax Arguments Return Description Notes 60 Figure 10 Locking and Unlocking Memory for DMA Transfers DIME_MConfigGUI void DIME MConfigGUl void handle DWORD ShowFlag handle is a valid handle to a DIME carrier card ShowFlag is a flag for initial condition of the form N A Calling this function opens the FUSE Probe Tool 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 The nueym lib for Microsoft Visual or nueyomf lib for Borland builder needs to be included in your design when using this function These libraries are ins
119. sMemory on page 31 for further details Progress This is a pointer to a memory location that holds the configuration completion percentage Please refer to DIME MemConfigDevice on page 61 for further details ConfigFlags These are the flags for the configuration of the device Again 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 bitstream in memory to a particular device and then configures the device using the assigned bitstream 6 21 DIME ConfigStatus Syntax DWORD DIME ConfigStatus DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD CmdMode Arguments handle is a valid handle to a DIME carrier card ModuleNumber is the module you wish to target DeviceNumber is the device in that module you wish to target CmdMode is control command to implement Return Description dcfgFRAMEADDR This command sets the Frame Address The frame address is only used in the Readback functions and is used to set which Frame is read back By default the address is 0x00000000 Table 11 ConfigControl Commands Return The return is the status information from the specific command set in CmdMode Description This function is used to return configuration status information 32 www nallatech com NT107 0068 Issue 8 September
120. spectively DIME DeviceStatus handle ModuleNumber DeviceNumber dinfHEIGHT DIME GetDeviceDescription const char DIME GetDeviceDescription 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 description for the specified module device A pointer to a string that describes the device is returned 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 DIME DeviceStatusPtr handle ModuleNumber DeviceNumber dinfDESCRIPTION NT107 0068 Issue 8 September 14 2004 www nallatech com 95 Legacy Functions Le e 96 7 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 m
121. t For this reason this function does nothing except return ssOK DIME VirtexReset void DIME_VirtexReset DIME_HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME_CardResetControl handle dFONBOARDFPGA drTOGGLE 0 Functionality not changed Enables the reset for the on board FPGA DIME CardResetControl handle drONBOARDFPGA drTOGGLE 0 DIME VirtexResetEnable void DIME VirtexResetEnable DIME HANDLE handle handle is a valid handle to a DIME carrier card N A Simply calls DIME CardResetControl handle d ONBOARDFPGA drENABLE 0 Functionality not changed Enables the reset for the on board FPGA DIME CardResetControl handle drONBOARDFPGA 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 drONBOARDFPGA drDISABLE 0 Functionality not changed Disables the reset for the on board FPGA DIME CardResetControl handle drONBOARDFPGA drDISABLE 0 www nallatech com 8l Legacy Functions 82 7 8 Syntax Arguments Return Description Alternative Syntax Arguments Return Description Alternative Syntax Arguments Return Description Alternative 7 11 Syntax Arguments Return Description Alternative DIME_SystemReset void DIME SystemReset DIME HANDLE handle handle is a valid handle to a DIME carrier card
122. t option for opening the card With this option the on board oscillators will get set to their default frequencies if this is appropriate for the card See your Motherboard Reference Guide for card specific details dccOPEN NO OSCILLATOR SETUP This option opens the card as in the default mode except that the on board oscillators are not set to their default frequencies Table 38 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 this function has been called all other functions are available Example See Figure 4 on page 25 6 64 DIME_Peripheralioctl Syntax DWORD DIME Peripheraliocd 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 NT107 0068 Issue 8 September 14 2004 www nallatech com 69 Functional Reference 70 6 65 DIME PPSControl Syntax DWORD DIME PPSControl DIME HANDLE handle DWO
123. t 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 the 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
124. tails on the LEDs Example See Figure 4 on page 25 NT107 0068 Issue 8 September 14 2004 www nallatech com 71 Functional Reference 72 6 68 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 I O is to be read Table 4 on page 72 gives details of the available banks Bank Description dpioDIGITAL This is the digital I O Data will be read from the digital I O connector Table 41 Periphery I O Bank Argument Options Please check your Motherboard Reference Guide for details on available periphery I O 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 6 69 ReadPlIODirection Syntax DWORD DIME ReadPlODirection 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 I O direction is to be read See Table 41 on page 72 for details of the available banks Please check your Motherboard Reference Guide for details on available periphery I O Return A in a particular bit location indicates that the pin is an input otherwise the pins is an output Returns on error Description This returns the setting of the direction for the specified bank 6 70 DIME SaveCardDefinition Syntax DWORD DIME SaveCa
125. tain aspects of the selected module Note for the temperature functions not all motherboards support this feature Check your Motherboard Reference Guide if you are unsure if your hardware supports this DWORD DWORD DWORD Set Lr eb if DIME_ModuleControl hCardl ModuleNumber if DIME_ModuleControl hCardl ModuleNumber if DIME _ModuleControl hCardl ModuleNumber MaxAlert 65 MinAlert 0 ModuleNumber 0 the max and min alert levels dinfTEMPALERTMAX MaxAlert 0 printf Maximum FPGA Temperature set to degrees n MaxAlert dinfTEMPALERTMIN MinAlert 0 printf Minimum FPGA Temperature set to d degrees n MinAlert s code should be place in your temperature alert handler e you ve dealt with the alert and desire to clear the alert e to the FPGA dinfTEMPALERTCLEAR 0 0 printf The temperature alert line for module d has been cleared n ModuleNumber Figure 11 Setting the Maximum and Minimum Temperature Alert Limits and Clearing an Alert NT107 0068 Issue 8 September 14 2004 www nallatech com 65 Functional Reference 66 6 60 Syntax Arguments Return Description 6 61 Syntax Arguments DIME ModuleControlPtr DWORD DIME_ModuleControlPtr DIME_HANDLE handle DWORD ModuleNum DWORD CmdMode void pValue handle is a valid handle to a DIME carrier card Mod
126. talled in the include directory of the FUSE software www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C Developers Guide 6 53 DIME_MConfigGUIExit Syntax void DIME_MConfigGUIExit Arguments N A Return N A Description This function is used to clean up any memory used in the DIME_MConfigGUI Notes This function should only be used when you have finished using the Multi config GUI 6 54 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 device 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 return
127. tax Arguments FUSE C C API Developers Guide 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 customized to suit your development requirements The flags are bit wise so multiple flags can be combined See Table 18 on page 41 for valid flags There are several possible returns for the transfer See Table 19 on page 42 for details This handles the transfer of WordCount 32 bit 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 DIME DMAStatus DWORD DIME DMAStatus DIME HANDLE handle DIME DMAHANDLE DMAChannel DWORD CmdMode handle is a valid handle to a DIME carrier card 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 DMA channel is being addressed The available command modes are given inTable 20 on page 43 CmdMode Description ddmaNUMCHANNELS Used with ddmaALLDMACHANNELS ddmaREADFLAGS Used
128. tech com II Examples Configuring a module with ledsnake 4 4 DMA Transfer Examples Once a card has been opened and a design placed into the FPGA data is normally required to be transferred between the card and the software application via DMA transfers 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 Now 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 the PCI To User FPGA Interface Core Application Note on the FUSE CD at the location lt CDROM Drive gt ApplicationNotes NT302 0000 Spartan to Virtex Interface 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 transfers transfers with two cards In the second example data is first written and then read
129. tember 14 2004 FUSE C C API Developers Guide 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 ReadPlO handle dpioDIGITAL Functionality not changed Reads the pins on the digital I O connector DIME ReadPlO handle dpioDIGITAL DIME WriteDigitallO DWORD DIME WriteDigitallO DIME HANDLE handle DWORD Data handle is a valid handle to a DIME carrier card Data is the values to be written to the pins on the digital I O connector Returns 0 on success Returns non zero on error Simply calls DIME WritePlO handle dpioDIGITAL Data Functionality not changed Writes the pins on the digital I O connector DIME WritePlO handle dpioDIGITAL Data DIME ReadDigitallODirection DWORD DIME ReadDigitallODirection DIME HANDLE handle handle is a valid handle to a DIME carrier card A in a particular bit location indicates that the pin is an input otherwise the pins is an output Returns on error Simply calls DIME ReadPlODirection handle dpioDIGITAL Functionality not changed Reads the pins on the digital I O connector DIME ReadPlODirection handle dpioDIGITAL DIME WriteDigitallODirection DWORD 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 Returns zero
130. to suit the developers needs and for system information to be obtained DIME_SystemStatus DIME SystemControl DIME_SystemStatusPtr DIME GetError DIME GetLocateVersionNumber DIME GetVersionNumber 5 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 DIME ModuleStatusPtr DIME ModuleControlPtr DIME DeviceStatus DIME DeviceControl DIME_DeviceStatusPtr DIME DeviceControlPtr NT107 0068 Issue 8 September 14 2004 www nallatech com 17 Functions Category LE ng 5 13 Programmable Power Supplies PPS These functions allow control of the programmable power supplies for certain motherboards DIME_PPSStatus DIME PPSControl 5 14 These functions deal with all I O such as digital peripheral and miscellaneous I O DIME_ReadPIO DIME WritePIO 5 15 Multiple Configuration GUI These functions are for linking the example multiple configuration GUI to your application DIME MConfigGUI DIME MConfigGUIExit DIME ShowMConfigGUI www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide Section 6 Functional Reference In this section 6 1 Syntax Arguments Return Description Notes Alphabetical listing of each function withi
131. to the proceeds of such sale or to the claim for such proceeds The customer shall store any goods owned by Nallatech in such 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 part of the contract by the company GOVERNING LAW This agreement and performance of both parties shall be governed by Scottish law NT107 0068 Issue 8 September 14 2004 NT107 0068 Issue 8 September 14 2004 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 proceedin
132. ts DIME_InterruptStatus DIME_InterruptControl 5 7 DMA Transfers These functions are for dealing with transfer of data between the card s and the PC DIME LockMemory DIME_UnLockMemory DIME DMAOpen DIME DMACIose DIME DMAStatus DIME DMAControl a DIME_DMARead DIME DMAWrite DIME_DMAReadToLockedMem DIME DMAWriteFromLockedMem DIME DataWriteSingle DIME DataReadSingle DIME DataRead DIME DataWrite DIME AddressWriteSingle 5 8 Device Configuration These functions are used to configure devices such as FPGAs and for assigning designs to devices DIME_ConfigOnBoardDevice DIME_MemConfigOnBoardDevice DIME ConfigDevice DIME MemConfigDevice DIME_ConfigModule DIME_ConfigCard DIME_ConfigSetBitsFilename DIME ConfigSetBitsMemory DIME ConfigSetBitsFilenameAndConfig DIME ConfigSetBitsMemoryAndConfig DIME ConfigGetBitsFilename l6 www nallatech com NT107 0068 Issue 8 September 14 2004 E D FUSE C C API Developers Guide 5 9 Card System Definition Files These functions allow the user to create card and system definition files that allow faster loading of both cards and systems DIME SaveCardDefinition DIME LoadCardDefinition DIME SaveSystemDefinition DIME_LoadSystemDefinition 5 10 JTAG These functions allow control over the JTAG chain DIME_JTAGStatus DIME JTAGControl 5 11 System Information and Control These functions enable the FUSE API to be controlled
133. ttempt to set the cards JTAG chain to 30MHz djtagMAXSPEED40 This will attempt to set the cards JTAG chain to 40MHz djtagMAXSPEED50 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 90MHz djtagMAXSPEED 100 This will attempt to set the cards JTAG chain to 100MHz Table 26 JTAG Return Descriptions Return This function returns on failure The function returns 0 on success Description This controls the JTAG chain on the card Notes Once this function has been called calling the DIME JTAGStatus function will return the speed at which the JTAG chain has been set NT107 0068 Issue 8 September 14 2004 www nallatech com 53 Functional Reference 54 6 45 Syntax Arguments 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 Table 27 on page 54 provides details CmdMode Description Return Description 6 46 Syntax Arguments Return Description Notes 6 47 Syntax Arguments djtagCONFIGSPEED The will return the current speed that the cards JTAG chain is
134. uleNum 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 Returns NULL on error This function is used to control certain aspects of the card that cannot be controlled using DIME_ModuleControl DIME ModuleStatus DWORD DIME ModuleStatus DIME HANDLE handle DWORD ModuleNum 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 CmdMode This argument is used to specify what particular aspect of module status information is to be returned Table 36 on page 66 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 Module Reference Guide for further details dinfNUMDEVICES This command mode returns the number of devices on the module dinfPRIMFPGATEMP This command mode returns the die temperature of the primary FPGA in degrees Celsius Temperatures are accurate to degree dinfSECFPGATEMP This command mode returns the die temperature of the secondary FPGA in degrees Celsius Temperatures are accurate to degree dinfMODULETEMP This command mode ret
135. upt to occur providing that the interrupt has been enabled Returns zero on success non zero otherwise Table 21 DIME_InterruptControl CmdMode Argument Options Value This is used in the control to specify the type of interrupts to be used This is only used in the dintWAIT command mode Table 22 on page 49 gives details of the available Values Value Description dintBLOCKING Blocks the threads execution until the interrupt occurs Table 22 DIME_InterruptControl Value Argument Options Return Returns all 1 on error otherwise the return is dependant on the command mode Description 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 Example NT107 0068 Issue 8 September 14 2004 www nallatech com 49 Functional Reference Sample interrupt code Obviously your design needs to use this enable the interrupt if Answer DIME InterruptControl hCard dintONBOARDFPGA dintENABLE dintBLOCKING 0 printf On board FPGA Interrupt Enabled n E wm oc else printf failed to enable the on baord FPGA interrupt n Wait for the interrupt if Answer DIME InterruptControl hCard dintONBOARDFPGA dintWAIT dintBLOCKING 0 printf On board interrupt received n else
136. urns the temperature of the module in degrees Celsius Temperatures are accurate to degree Note that this temperature is measured next to the User FPGA and hence usually follows the FPGA temperature It shows the temperature of the module as a whole but not one specific device Table 36 DIME ModuleStatus CmdMode Argument Options www nallatech com NT107 0068 Issue 8 September 14 2004 FUSE C C API Developers Guide CmdMode Description dinfPRIMTEMPALERTMAX This command mode is used to read the maximum temperature level for the temperature alert signal on the primary FPGA Once set if the FPGA die temperature exceeds this temperature the temperature alert signal is triggered Note that the power on default setting for this temperature is 255 degrees Celsius NOTE The TempAlertMax temperature only sets the trigger for the alert signal For an event to happen at that temperature the user will have to use the alert signal in their design dinfSECTEMPALERTMAX This command mode is used to read the maximum temperature level for the temperature alert signal on the secondary FPGA Once set if the FPGA die temperature exceeds this temperature the temperature alert signal is triggered Note that the power on default setting for this temperature is 255 degrees Celsius NOTE The TempAlertMax temperature only sets the trigger for the alert signal For an event to happen at that temperature the user will have to
137. use the alert signal in their design dinfPRIMTEMPALERTMIN This command mode is used to set the minimum temperature level for the temperature alert signal on the primary FPGA Once set if the FPGA die temperature falls below this temperature the temperature alert signal is triggered Note that the power on default setting for this temperature is 0 degrees Celsius Note not all temperature sense devices used have this capability Consult your Module Reference Guide or the Temperature Sense Datasheet to find out if the temperature sense device on your module supports this dinfSECTEMPALERTMIN This command mode is used to set the minimum temperature level for the temperature alert signal on the secondary FPGA Once set if the FPGA die temperature falls below this temperature the temperature alert signal is triggered Note that the power on default setting for this temperature is 0 degrees Celsius Note not all temperature sense devices used have this capability Consult your Module Reference Guide or the Temperature Sense Datasheet to find out if the temperature sense device on your module supports this dinfSERIALNUMBER This command mode is used to return the serial number of the module Table 36 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 Note for the temperature functions
138. w nallatech com NT107 0068 Issue 8 September 14 2004 6 12 ConfigDevice FUSE C C API Developers Guide Syntax DWORD DIME ConfigDevice DIME HANDLE handle const char FileName DWORD ModuleNumber DWORD ModuleDeviceNumber DWORD Progress DWORD Flags Arguments handle is a valid handle to a DIME carrier card FileName is the filename of a bitfile 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 Return Description dcfgPROGSECURE Program the device in secure mode dcfgPROGKEYS This is used to program the triple des keys for that specific device Note a file with extension nky that is output from ISE is used instead of the bitfile Note when programming the encryptions keys the pc has to be turned off and back on before the encrypted bitstream works Table 7 Configuration Flags Return This function has several possible returns Table 8 on page 27 gives details Return Description dcfgOK_NOSTATUS
139. will de allocate the system resources that where assigned to the embedded bit stream Table 10 DIME ConfigSetBitsMemory Flags Argument Options Returns 0 upon success Returns non zero otherwise Description This function assigns a bitstream 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 bitstream is used to configure the device Notes This function only assigns the memory location of the bitstream to the device No configuration is carried out If the bitstream is moved or altered after it has been assigned then the bitstream will need to be re assigned to the device NT107 0068 Issue 8 September 14 2004 www nallatech com 3l Functional Reference 6 20 DIME ConfigSetBitsMemoryAndConfig Syntax DWORD DIME ConfigSetBitsMemoryAndConfig DIME HANDLE handle DWORD ModuleNumber DWORD DeviceNumber DWORD DWORD ByteLength 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 Bits is a pointer to the bitstream that is to be assigned to the device ByteLength is the byte length of the bitstream SetFlags These are the flags for the setting of the filename Please refer to DIME ConfigSetBit
140. y 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 customer s 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 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
Download Pdf Manuals
Related Search
Related Contents
GE jk910 User's Manual Betriebsanleitung Elektronisches Regelgerät Nokia C7-00 Cell Phone User Manual Sony SAW-M20 User's Manual Stand: 03.2008 VR-P004PCM Scarica MS-SW5 - User`s manual Copyright © All rights reserved.
Failed to retrieve file