Software Library API naibrd 1.62
See all documentation at naii.docs.com
naibrd.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include "advanced/naibrd_adv.h"
#include "advanced/nai_ether_adv.h"
#include "naibrd_config.h"
#include "nai_utilities.h"
#include "boards/naibrd_64arm_g5.h"
#include "boards/naibrd_64ppc1.h"
#include "boards/naibrd_64c2.h"
#include "boards/naibrd_64c3.h"
#include "boards/naibrd_64e3.h"
#include "boards/naibrd_67g6.h"
#include "boards/naibrd_68c3.h"
#include "boards/naibrd_68arm_g5.h"
#include "boards/naibrd_68arm_g6.h"
#include "boards/naibrd_68dt1.h"
#include "boards/naibrd_68int4_5.h"
#include "boards/naibrd_68int6.h"
#include "boards/naibrd_68cb6.h"
#include "boards/naibrd_68pw1.h"
#include "boards/naibrd_68pw2.h"
#include "boards/naibrd_75arm_g5.h"
#include "boards/naibrd_75ppc1.h"
#include "boards/naibrd_68ppc2.h"
#include "boards/naibrd_68ppc3.h"
#include "boards/naibrd_67ppc2.h"
#include "boards/naibrd_75int2.h"
#include "boards/naibrd_75c3.h"
#include "boards/naibrd_75c5.h"
#include "boards/naibrd_75d3.h"
#include "boards/naibrd_75d4.h"
#include "boards/naibrd_75ds2.h"
#include "boards/naibrd_76c2.h"
#include "boards/naibrd_76cs3.h"
#include "boards/naibrd_79g5.h"
#include "boards/naibrd_79c3.h"
#include "boards/naibrd_niu1a.h"
#include "boards/naibrd_niu2a.h"
#include "boards/naibrd_niu3a.h"
#include "boards/naibrd_niu3e.h"
#include "boards/naibrd_niu1.h"
#include "boards/naibrd_99arm1.h"
#include "boards/naibrd_99arm2.h"
#include "boards/naibrd_gen5.h"
#include "include_local/naibrd_gen5_local.h"
#include "boards/naibrd_74sd5.h"
#include "naibrd_ether.h"
#include "nai_pci.h"
#include "advanced/nai_pci_adv.h"
#include "advanced/nai_mutex.h"

Macros

#define NAIBRD_64ARM_G5   1
 
#define NAIBRD_64PPC1   1
 
#define NAIBRD_64C2   1
 
#define NAIBRD_64C3   1
 
#define NAIBRD_64E3   1
 
#define NAIBRD_67G6   1
 
#define NAIBRD_68C3   1
 
#define NAIBRD_68ARM_G5   1
 
#define NAIBRD_68ARM_G6   1
 
#define NAIBRD_68DT1   1
 
#define NAIBRD_68INT4_5   1
 
#define NAIBRD_68INT6   1
 
#define NAIBRD_75ARM_G5   1
 
#define NAIBRD_75PPC1   1
 
#define NAIBRD_68PPC2   1
 
#define NAIBRD_68PPC3   1
 
#define NAIBRD_68CB6   1
 
#define NAIBRD_67PPC2   1
 
#define NAIBRD_68PW1   1
 
#define NAIBRD_68PW2   1
 
#define NAIBRD_75INT2   1
 
#define NAIBRD_75C3   1
 
#define NAIBRD_75C5   1
 
#define NAIBRD_75D3   1
 
#define NAIBRD_75D4   1
 
#define NAIBRD_75DS2   1
 
#define NAIBRD_76C2   1
 
#define NAIBRD_76CS3   1
 
#define NAIBRD_79G5   1
 
#define NAIBRD_79C3   1
 
#define NAIBRD_NIU1A   1
 
#define NAIBRD_NIU2A   1
 
#define NAIBRD_NIU3A   1
 
#define NAIBRD_NIU3E   1
 
#define NAIBRD_NIU1   1
 
#define NAIBRD_99ARM1   1
 
#define NAIBRD_99ARM2   1
 
#define NAIBRD_74SD5   1
 
#define VME_INTLVL_VALID   0x0001u
 
#define ISR_INSTALLED   0x0002u
 
#define NO_BOARD_READY   0
 
#define BOARD_READY_REG   1
 
#define NAI_FP_CONVERSION_POLL_TIME   50 /* Poll every 50uS */
 
#define NAI_MAX_FP_CONVERSION_TIMEOUT   1000000 /* Time-out after 1 second */
 

Typedefs

typedef struct nai_module_info nai_module_info_t
 
typedef struct nai_card nai_card_t
 
typedef struct nai_BC1553 nai_BC1553_t
 

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_blkQualify (nai_card_t *thisCard, uint32_t regWidth, uint32_t address, uint32_t count, nai_busExInfo_t naiBusReadExInfo)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_blkPackQualify (nai_card_t *thisCard, uint32_t address, nai_busExInfo_t naiBusReadExInfo)
 
NAIBRDFUNC double NAIAPI naibrd_GetVersion (void)
 Retrieves the naibrd Library Revision Information.
 
NAIBRDFUNC int32_t NAIAPI naibrd_GetMaxCards (void)
 Retrieves the maximum NAI cards allowed by the SW Library.
 
NAIBRDFUNC int32_t NAIAPI naibrd_GetMaxModules (void)
 Retrieves the maximum modules per NAI cards allowed by the SW Library.
 
nai_status_t NAIAPI naibrd_SetModuleCapabilities (int32_t cardIndex, uint32_t module, uint32_t capabilityVal, uint32_t modFeatureOverride)
 Sets NAIBRD card structure to show if module is block and pack capable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleCapabilities (int32_t cardIndex, uint32_t module, uint32_t *outCapabilityVal)
 Retrieves NAIBRD card structure to check if module is block and pack capable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerdesRev (int32_t cardIndex, uint32_t module, uint32_t serdesrev)
 Sets the module's SerDes Rev in the cards structure and determines the Series (D or E).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetAddress (int32_t cardIndex, uint32_t address)
 Specifies the address to communicate with the card when communicating over VME, using another card as a master, or using custom IO functions specified by naibrd_SetIOFnc and naibrd_SetFifoIOFnc.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetAddress (int32_t cardIndex, uint32_t *address)
 Get the address to communicate with the card when communicating over VME/PCI, using another card as a master, or using custom IO functions specified by naibrd_SetIOFnc and naibrd_SetFifoIOFnc.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetIPAddress (int32_t cardIndex, const char *ipaddress, const char *port)
 Sets the IP address to connect to in NAIBRD_COMM_ETHER_TCP and NAIBRD_COMM_ETHER_UDP.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBusDev (int32_t cardIndex, int16_t lane, int16_t bus, int16_t dev, int16_t func)
 Sets the lane (VxWorks only), bus, dev, and func to connect to when using NAIBRD_COMM_PCI.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEEndian (int32_t cardIndex, nai_endian_t brdEndian)
 sets the board physical Endianess.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEEndian (int32_t cardIndex, int32_t *brdEndian)
 Gets the board physical Endianess.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEGeoEn (int32_t cardIndex, bool_t enable)
 Sets the board geographic mode configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEGeoEn (int32_t cardIndex, bool_t *p_outEnable)
 Gets the board geographic mode configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEDataWidth (int32_t cardIndex, int32_t brdDataWidth)
 sets the board physical data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEDataWidth (int32_t cardIndex, int32_t *brdDataWidth)
 Gets the board physical data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEBoardIsNaiSbc (int32_t cardIndex, bool_t brdIsSbc)
 sets the board is a NAI SBC.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMESlotAddr (int32_t cardIndex, int32_t slot, uint32_t vmeSlaveBaseAddr, uint32_t vmeLocalAddr, uint32_t vmeAddrMod)
 sets the board physical slot in rack with the beginning of the boards VME slave window
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMESlotAddr (int32_t cardIndex, int32_t *slot, uint32_t *vmeSlaveBaseAddr, uint32_t *vmeLocalAddr, uint32_t *vmeAddrMod)
 gets the board physical slot in rack with the beginning of the boards VME slave window
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetBusDev (int32_t cardIndex, int16_t *lane, int16_t *bus, int16_t *dev, int16_t *func)
 Gets the lane, bus, dev, and func assigned to cardIndex when using NAIBRD_COMM_PCI.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetMaster (int32_t cardIndex, int32_t masterCardIndex)
 Specifies another card as the card's master, sending all I/O operations though it.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_OpenBCDevice (int16_t swDevice, int32_t cardIndex, int32_t module, int32_t channel, int32_t rtaddr, bool_t busAEnable, naibrd_comm_t comm, const char *device)
 Opens a 1553 BC device on a FTx or N7 module (must be an NAI card).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_OpenDevice (int32_t cardIndex, naibrd_comm_t comm, const char *device)
 Opens access to the board based on the device name and communication mode.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Close (int32_t cardIndex)
 Closes a connection to a card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PCI_GetHandle (int32_t cardIndex, uint32_t *outaddr)
 Return the base address of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PCI_GetDevInfo (int32_t cardIndex, int32_t slot, uint16_t *outvendor, uint16_t *outdevcode, uint32_t *outclasscode, uint16_t *outrevid)
 Gets information for the PCI device in the specified slot.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PCI_GetDevAddr (int32_t cardIndex, int32_t slot, int16_t *outbus, int16_t *outdev, uint32_t *outaddr)
 Gets information for the PCI device in the specified slot.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetSerialNo (int32_t cardIndex, uint32_t *sn)
 Gets the serial number of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetDateCode (int32_t cardIndex, uint32_t *dateCode)
 Gets the date code of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetPartNo (int32_t cardIndex, uint32_t *pn)
 Gets the part number of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetCardInfo (int32_t cardIndex, uint32_t *platform, uint32_t *model, uint32_t *gen, uint32_t *ver, uint32_t *special)
 Gets card information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetCardRev (int32_t cardIndex, uint32_t *pcbrev, uint32_t *procrev, uint32_t *fpgarev)
 Gets card information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetDeviceID (int32_t cardIndex, uint32_t *devid)
 Gets the device ID of the board, where the upper 16 bits are the generation and the lower 16 bits are the model.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffBoardCfgInfo (int32_t cardIndex, uint32_t offBdIdx, uint32_t *address, uint32_t *size, uint32_t *deviceId)
 Gets the off-board configuration from the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetBoardGen (int32_t cardIndex, uint32_t *boardgen)
 Gets the HW Generation of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleCount (int32_t cardIndex, int32_t *moduleCount)
 Gets the number of modules a card has.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleOffset (int32_t cardIndex, int32_t module, uint32_t *offset)
 Gets the offset of a module on the card.
 
NAIBRDFUNC uint32_t NAIAPI naibrd_GetModuleID (int32_t cardIndex, int32_t module)
 Gets the ID of a module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleInfo (int32_t cardIndex, int32_t module, uint32_t *modid, uint32_t *modver, uint32_t *modrev, uint32_t *modspecial)
 Gets module information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleRev (int32_t cardIndex, int32_t module, uint32_t *modprocrev, uint32_t *modfpgarev)
 Gets module proc and FPGA revision info details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHardwareRev (int32_t cardIndex, int32_t module, uint32_t *modhardwarerev)
 Gets module hardware revision.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleInfoEx (int32_t cardIndex, int32_t module, nai_module_info_type_t modInfoType, uint32_t *p_outmoduleInfo)
 Retrieves the raw module information corresponding to the specified module information type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSeries (int32_t cardIndex, int32_t module, nai_series_t *p_outseries)
 Retrieves the module series type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFloatingPointModeEnable (int32_t cardIndex, int32_t module, bool_t enable)
 Sets the module's floating point mode operation on or off. This call blocks until the FLOATING_POINT_CONVERSION_BUSY register is cleared. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFloatingPointModeEnable_NonBlocking (int32_t cardIndex, int32_t module, bool_t enable)
 Sets the module's register and naibrd library's (register shadow) floating point mode operation and returns immediately. This API does not wait for the HW to confirm that the conversion is complete. Call naibrd_GetFloatingPointModeConversionComplete(). to get the conversion status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeConversionComplete (int32_t cardIndex, int32_t module, bool_t *p_outconversionComplete)
 Indicate when the toggle of floating point mode operation (on or off) is complete. This API checks the FLOATING_POINT_STATE register and indicates its state. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeEnable (int32_t cardIndex, int32_t module, bool_t *p_outenable)
 Retrieves the module's floating point mode operation. In floating point mode operation, some of the module's registers will switch from integer values to single-precision floating point values. In this mode, the offset and gain settings specified for each channel will be applied to scale the value read or written to the register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITEnable (int32_t cardIndex, int32_t module, nai_bit_type_t type, bool_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITEnable (int32_t cardIndex, int32_t module, nai_bit_type_t type, bool_t *outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITErrorThreshold (int32_t cardIndex, int32_t module, uint32_t bitErrorThreshold)
 Sets the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITErrorThreshold (int32_t cardIndex, int32_t module, uint32_t *outBITErrorThreshold)
 Retrieves the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITLogic (int32_t cardIndex, int32_t module, int32_t channel)
 Resets the Continuous BIT internal circuitry and counter mechanism for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModulePBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outpbitComplete)
 Retrieves the PBIT (Power-on BIT) status of the module and channel specified. The PBIT result will be in the BIT status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITStatusRaw (int32_t cardIndex, int32_t module, nai_status_access_type_t type, uint32_t *p_outStatus)
 Retrieves the 32-bit BIT status of the module specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITStatusRaw (int32_t cardIndex, int32_t module, uint32_t rawData)
 Clears the latched BIT status of the channels specified by the bit mapped 32-bit argument.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t type, bool_t *outBitStatus)
 Retrieves the BIT status of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITStatus (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the latched BIT status of the channel specified.
 
nai_status_t NAIAPI naibrd_SetModuleBITEnableRaw (int32_t cardIndex, int32_t module, uint32_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:
 
nai_status_t NAIAPI naibrd_GetModuleBITEnableRaw (int32_t cardIndex, int32_t module, uint32_t *outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModulePBITCompleteRaw (int32_t cardIndex, int32_t module, uint32_t *outpbitComplete)
 Retrieves the raw PBIT (Power-on BIT) status of the module specified. The PBIT result will be in the BIT status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t intEnable)
 Sets the BIT Interrupt Enable register value for the specified module channel. Setting the bits to 1 enables the interrupt. Status is reported in the BIT Interrupt Status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outIntEnable)
 Retrieves the BIT Interrupt Enable register value for the specified module channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t edgeLevel)
 Sets the BIT Interrupt Edge/Level register value for the specified module channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outEdgeLevel)
 Retrieves the BIT Interrupt Edge/Level register value for the specified module channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t vector)
 Sets the BIT interrupt vector for the specified module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptVector (int32_t cardIndex, int32_t module, uint32_t *outvector)
 Retrieves the BIT interrupt vector for the specified module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t steering)
 Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptSteering (int32_t cardIndex, int32_t module, naibrd_int_steering_t *outsteering)
 Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleTempEx (int32_t cardIndex, int32_t module, nai_module_temp_type_t moduleTempType, float64_t *moduleTemp)
 Retrieves a module's extended precision temperature if available, otherwise returns integer temperature reading. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMotherboardTempEx (int32_t cardIndex, nai_motherboard_temp_type_t mbTempType, float64_t *mbTemp)
 Retrieves a motherboard's extended precision temperature, if available. Otherwise returns integer temperature reading. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleTemp (int32_t cardIndex, int32_t module, nai_module_temp_type_t moduleTempType, nai_module_temp_t *moduleTemp)
 Retrieves a module's temperature. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMotherboardTemp (int32_t cardIndex, nai_motherboard_temp_type_t mbTempType, nai_motherboard_temp_t *mbTemp)
 Retrieves the motherboard's temperature. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IsModuleReady (int32_t cardIndex, int32_t module)
 Determines whether the module is fully booted. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleMeasurement (int32_t cardIndex, int32_t module, nai_module_meas_type_t measType, float64_t *p_outmoduleMeas)
 Retrieves the module measured value based on the module measured value type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleMeasurementRaw (int32_t cardIndex, int32_t module, nai_module_meas_raw_type_t rawMeasType, uint32_t *p_outrawModuleMeas)
 Retrieves the raw register module measured value based on the module measured value raw type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleHealthMonitor (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_module_health_monitor_value_type_t moduleHealthMonitorValueType, float64_t moduleHealthMonitorValue)
 Sets the module health monitor threshold based on the module health monitor type and module health monitor value (threshold) type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHealthMonitor (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_module_health_monitor_value_type_t moduleHealthMonitorValueType, float64_t *p_outmoduleHealthMonitorValue)
 Retrieves the module health monitor value based on the module health monitor type and module health monitor value type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHealthMonitorStatus (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_module_health_monitor_status_type_t moduleHealthMonitorStatusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the module health monitor status based on the module health monitor type and module health monitor status type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHealthMonitorSummaryStatus (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_status_bit_t *p_outstatusBit)
 Retrieves the module health monitor summary status based on the module health monitor type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleHealthMonitorRaw (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_module_health_monitor_value_type_t moduleHealthMonitorValueType, uint32_t rawModuleHealthMonitorValue)
 Sets the module health monitor threshold raw register value based on the module health monitor type and module health monitor value (threshold) type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHealthMonitorRaw (int32_t cardIndex, int32_t module, nai_module_health_monitor_type_t moduleHealthMonitorType, nai_module_health_monitor_value_type_t moduleHealthMonitorValueType, uint32_t *p_outrawModuleHealthMonitorValue)
 Retrieves the module health monitor raw register value based on the module health monitor type and module health monitor value type specified. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleHealthMonitorSummaryStatusRaw (int32_t cardIndex, int32_t module, uint32_t *p_outrawStatus)
 Retrieves the raw value in the module health monitor summary status register. This feature is only available on the Xilinx Generation 5 platforms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardReady (int32_t cardIndex)
 Determines whether the board is fully booted.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMasterBitStatus (int32_t cardIndex, int32_t module, nai_status_access_type_t accessType, nai_status_bit_t *p_outstatusBit)
 Retrieve the latched or realtime BIT status correpsonding to the specified module from the Master BIT status register. Module 0 is reserved for future use. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetWatchdog (int32_t cardIndex, uint32_t watchdog)
 Sets the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetWatchdog (int32_t cardIndex, uint32_t *outwatchdog)
 Retrieves the watchdog register. The processor will invert the contents of this register within 1 second of the value being set.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CheckWatchdog (int32_t cardIndex, uint32_t watchdog)
 Checks the watchdog register. The processor will invert the contents of this register within 1 second of the value being set. Call naibrd_SetWatchdog() routine first with the watchdog value and call naibrd_CheckWatchdog() routine at lease 1 second afterwards with the same watchdog value. This routine will compare the contents read from the watchdog register and determine if the processor inverted the watchdog register value correctly.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SoftReset (int32_t cardIndex)
 For Gen 2 and Gen 3 Products, this function performs a soft reset on the card. For Gen5, this feature is added in MBCore(Rev 4.123) and above. The user can read the MBCore revision at mother board address 0x100. The revsion is encoded as (0x007B0004)minor(123) major(4). This will return setting to the power-on load state.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_HoldBoardReset (int32_t cardIndex, uint32_t holdBoardReset)
 Hole/Release board reset to the board for power management.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IsBoardResetOnHold (int32_t cardIndex, uint32_t *isBoardResetOnHold)
 Get the hold board reset status of the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncSource (int32_t cardIndex, int32_t syncModNum, int32_t sourceModNum)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncSource (int32_t cardIndex, int32_t syncModNum, int32_t *outsourceModNum)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncTriggerSource (int32_t cardIndex, int32_t module, int32_t triggerModNum)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncTriggerSource (int32_t cardIndex, int32_t module, int32_t *outtriggerModNum)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncMode (int32_t cardIndex, int32_t module, uint32_t syncAddress, naibrd_module_sync_config_type_t syncConfigType, naibrd_module_sync_mode_type_t syncMode, int32_t syncConfigModule)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncMode (int32_t cardIndex, int32_t module, uint32_t syncAddress, naibrd_module_sync_config_type_t syncConfigType, naibrd_module_sync_mode_type_t *outsyncMode, int32_t *outsyncConfigModule)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ReadReg16 (int32_t cardIndex, int32_t module, uint32_t offset, uint16_t *data)
 Reads a value from a 16-bit register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteReg16 (int32_t cardIndex, int32_t module, uint32_t offset, uint16_t data)
 Writes a value to a 16-bit register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteRegMask16 (int32_t cardIndex, int32_t module, uint32_t offset, uint16_t mask, uint16_t value)
 Writes a value to a 16-bit register, updating only the bit positions that are set in mask. The resulting value in the register will be (oldData & ~mask) | (data & mask). The mask and value may be truncated or padded with zeros depending on the register width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_MaskReg16 (int32_t cardIndex, int32_t module, uint32_t offset, uint16_t mask, nai_maskreg_op_t maskop)
 Writes a value to a 16-bit register, either clearing, setting or toggling only the bit positions that are set in mask. The mask and value may be truncated or padded with zeros depending on the register width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Read16 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t dataWidth, void *data)
 Reads from 16-bit registers. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Write16 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t dataWidth, const void *data)
 Writes to 16-bit register. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteZeros16 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t count)
 Writes zeros to a given number of contiguous 16-bit registers.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ReadReg32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t *data)
 Reads a value from a 32-bit register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteReg32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t data)
 Writes a value to a 32-bit register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteRegMask32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t mask, uint32_t value)
 Writes a value to a 32-bit register, updating only the bit positions that are set in mask. The resulting value in the register will be (oldData & ~mask) | (data & mask). The mask and value may be truncated or padded with zeros depending on the register width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_MaskReg32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t mask, nai_maskreg_op_t maskop)
 Writes a value to a 32-bit register, either clearing, setting or toggling only the bit positions that are set in mask. The mask and value may be truncated or padded with zeros depending on the register width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Read32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t dataWidth, void *data)
 Reads from 32-bit registers. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Write32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t dataWidth, const void *data)
 Writes to 32-bit registers. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_1553BM_SendAndReceive (int32_t cardIndex, int32_t module, uint32_t txoffset, uint32_t rxoffset, uint32_t rxcountoffset, const uint32_t *txbuffer, uint32_t txcount, uint32_t *rxbuffer, uint32_t rxcount)
 This function is used for the host application to communicate with the 1553 module bare metal via two FIFOs, the In FIFO and the Out FIFO. Commands to the bare metal are sent via the In FIFO and responses from the bare metal are received in the Out FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteZeros32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t count)
 Writes zeros to a given number of contiguous 32-bit registers.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ReadFifo32 (int32_t cardIndex, int32_t module, uint32_t dataoffset, uint32_t countoffset, uint32_t count, uint32_t *countremaining, uint32_t timeout, uint32_t width, void *data, uint32_t *outread)
 Attempts to read a fifo. If 'timeout' is set to NAIBRD_FIFO_TIMEOUT_NONE, 'count' will specify the maximum number of elements to read. The operation will not block and read up to 'count' words from the fifo. Otherwise, 'count' will specify an absolute number of elements to read and the operation waits up to 'timeout' milliseconds for the FIFO's count to be equal to or exceed 'count' before performing the read. If it times out, no data is read.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_WriteFifo32 (int32_t cardIndex, int32_t module, uint32_t dataoffset, uint32_t countoffset, uint32_t count, uint32_t fifosize, uint32_t timeout, uint32_t datawidth, const void *data, uint32_t *outwritten)
 Attempts to write to a fifo. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are written from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to drop to (fifosize-count) before performing the write. If it times out, no data is written.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BlockOp (int32_t masterCardIndex, int32_t slaveCardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, naibrd_blockAccessOp_t blockOp, uint32_t address[], uint32_t data[])
 This function writes data array to corresponding register address array. The benefit of using this function is that during Ethernet communication multiple data can be packed in one Ethernet message and hence increases through put.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ZBlockOp (int32_t masterCardIndex, uint16_t zblockid, uint32_t regwidth, uint32_t count, naibrd_blockAccessOp_t blockOp, uint16_t addrflags[], uint32_t address[], uint32_t data[])
 This function writes data array to corresponding register address array. The difference between this function and naibrd_BlockOp is that this function takes advantage of the Ethernet Z-Block Command which provides the capability to access on-board and off-board registers within the same Ethernet command. The benefit of using this function is that during Ethernet communication multiple data (inboard and off-board) can be packed in one Ethernet message and hence increases through put.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DirectInterrupts (int32_t cardIndex, nai_intf_t intf)
 Specified to which interface the card should direct interrupts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEInterruptLevel (int32_t cardIndex, uint8_t level)
 Sets the VME interrupt level of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetVMEInterruptLevel (int32_t cardIndex, uint8_t *level)
 Gets the VME interrupt level of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_InstallISR (int32_t cardIndex, naibrd_irq_id_t irq_id, nai_isr_t isr, void *param)
 Handles associating the Interrupt Service Routine for PCI and Ethernet communication.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_HookVector (int32_t cardIndex, uint32_t vector)
 Handles associating the interrupt vector to an interrupt driven Ethernet message.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_UninstallISR (int32_t cardIndex)
 Handles removing the interrupt associations (Interrupt Service Routine or Interrupt Driven Ethernet Messages).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffboardInterruptVector (int32_t cardIndex, uint32_t *unVector)
 Handles retrieving the interrupt vector over the backplane.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearOffboardInterrupt (int32_t cardIndex)
 Handles clearing an interrupt over the backplane.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Lock (int32_t cardIndex)
 Locks the board, preventing other threads from communicating with the board until naibrd_Release is called. Every call to naibrd_Lock MUST have a matching call to naibrd_Release. Boards can be locked recursively.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Release (int32_t cardIndex)
 Unlocks the board, allowing other threads/tasks to communicate with the board. The thread/task that last locked the board must call this. If the board is locked N times by the same thread/task, the board will only be unlocked after the Nth call to naibrd_Release by that thread/task.
 
NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceName (uint16_t devcode)
 Returns the Device Name associated with the Device Code passed in.
 
NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceNameIndex (uint16_t devcode, uint32_t cardIndex)
 Returns the Device Name associated with the Device Code passed in. Only needed when devID is 0x6881, for mb 68DT1, 68CB6, or 68G5.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Wait (unsigned long microseconds)
 Waits the specified number of microseconds. This is a blocking sleep function.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleCount (int32_t cardIndex, int32_t moduleCount)
 Sets the number of modules a card has.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleOffset (int32_t cardIndex, int32_t module, uint32_t offset)
 Sets the offset of a module on the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleInfo (int32_t cardIndex, int32_t module, uint32_t modid, uint32_t modver, uint32_t modrev, uint32_t modspecial)
 Sets module info details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleRev (int32_t cardIndex, int32_t module, uint32_t modprocrev, uint32_t modfpgarev)
 Sets module proc and FPGA revision info details.
 
NAIBRDFUNC nai_status_t naibrd_SetModuleTempExCapability (int32_t cardIndex, int32_t module, uint32_t modCoreTemp, uint32_t modIntfPCBTemp, uint32_t modFuncPCBTemp)
 Sets module extended temperature capability based on non zero readings returned from extended temperature readings.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModulePartInfo (int32_t cardIndex, int32_t module, uint32_t modPartID)
 Decodes and sets module part info parameters based on raw part info read. readings.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerialNo (int32_t cardIndex, uint32_t sn)
 Sets the serial number of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetOffBoardCfg (int32_t cardIndex, uint32_t offBdCfgIdx, uint32_t offBdCfgData)
 Sets the off-board configuration from the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffBoardCfg (int32_t cardIndex, uint32_t offBdCfgIdx, uint32_t *offBdCfgData)
 Gets the off-board configuration from the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetMBExecInfo (int32_t cardIndex, uint32_t version)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetDateCode (int32_t cardIndex, uint32_t dateCode)
 Sets the date code of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPartNo (int32_t cardIndex, uint32_t pn)
 Sets the part number of the card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardInfo (int32_t cardIndex, uint32_t platform, uint32_t model, uint32_t gen, uint32_t ver, uint32_t special)
 Sets card information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardRev (int32_t cardIndex, uint32_t pcbrev, uint32_t procrev, uint32_t fpgarev)
 Sets card information details.
 
NAIBRDFUNC nai_status_t naibrd_SetCardTempExCapability (int32_t cardIndex, uint32_t mbCoreTemp, uint32_t mbPCBTemp)
 Sets card extended temperature capability based on non zero readings returned from extended temperature readings.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardVmeSize (int32_t cardIndex, uint32_t size)
 Sets card VME size.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardVmeInfo (int32_t cardIndex, int32_t boardEndian, int32_t boardDataWidth, uint32_t vmeLocalBaseAddr, uint32_t vmeBaseAddr, uint32_t addrModifier, int32_t hostIsNAI_SBC, int32_t brdPhysicalSlot)
 Sets card VME information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetI2CInfo (int32_t cardIndex, int32_t unitNum, uint32_t devAddr, int32_t devType, int32_t smbus)
 Sets card I2C interface information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetI2CInfo (int32_t cardIndex, int32_t *unitNum, uint32_t *devAddr, int32_t *devType, int32_t *smbus)
 Gets card I2C interface information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetCardVmeInfo (int32_t cardIndex, int32_t *boardEndian, int32_t *boardDataWidth, uint32_t *vmeLocalBaseAddr, uint32_t *vmeBaseAddr, uint32_t *vmeSize, uint32_t *addrModifier, int32_t *hostIsNAI_SBC, int32_t *brdPhysicalSlot)
 Sets card VME information details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBoardReadyReg (int32_t cardIndex, uint32_t regOffset, uint32_t readyValue)
 Sets the board ready register of the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSoftResetReg (int32_t cardIndex, uint32_t softresetReg)
 Sets the soft reset register of the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetHoldBoardResetReg (int32_t cardIndex, uint32_t holdBoardResetReg)
 Sets the board hold reset register of the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetWatchdogReg (int32_t cardIndex, uint32_t watchdogReg)
 Sets the watchdog timer register of the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Open (int32_t cardIndex, naibrd_comm_t comm, nai_ether_gen_t gen)
 Opens a connection to a card, using the specified communication mode and any settings specified by prior calls to Connection Setup Functions.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetIOFnc (int32_t cardIndex, nai_read_fnc_t readFnc, nai_write_fnc_t writeFnc, nai_writemask_fnc_t writeMaskFnc, nai_maskreg_fnc_t maskRegFnc, nai_writeackmask_fnc_t writeAckMaskFnc, void *param, nai_ioflags_t flags)
 Sets the functions used by naibrd_Read32 and naibrd_Write32 to communicate with the board, overriding the default behavior, and changes the way I/O is performed.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFifoIOFnc (int32_t cardIndex, nai_readfifo_fnc_t readfifoFnc, nai_writefifo_fnc_t writefifoFnc)
 Sets the functions used by naibrd_ReadFifo32 and naibrd_WriteFifo32 to communicate with the board, overriding the default behavior.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSendAndReceive1553Fnc (int32_t cardIndex, nai_1553bm_sendandreceive_fnc_t sendAndReceive1553Fnc)
 Sets the functions used by naibrd_1553BM_SendAndReceive to communicate with the board, overriding the default behavior.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AckWriteRegMask32 (int32_t cardIndex, int32_t module, uint32_t reqOffset, uint32_t reqMask, uint32_t reqValue, uint32_t ackOffset, uint32_t ackMask, uint32_t ackValue, int32_t timeOutms)
 Handles a "Request and Acknowledge' handshake. The reqValue is written to the regOffset register and the ackOffset register is read and compared to the ackValue to indicate that the HW request has been serviced within the timeOutms period specified. The reqMask indicates which bits in the reqOffset register are updated. The ackMask indicates which bits in the ackOffset register are used in the comparison of the value retrieved from the ackOffset and the ackValue passed in. If ackValue is not detected within timeOutms milliseconds, the function fails with NAI_ERROR_TIMEOUT. The mask and value may be truncated or padded with zeros depending on the register width.
 
int getModuleByOffset (int32_t cardIndex, uint32_t startAddr)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusRead (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t dataWidth, void *data)
 Reads from a specified interface on the board. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusReadEx (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t dataWidth, nai_busExInfo_t busExInfo, void *data)
 Reads from a specified interface on the board. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWrite (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t dataWidth, const void *data)
 Writes to a specified interface on the board. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteEx (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t dataWidth, nai_busExInfo_t busExInfo, const void *data)
 Writes to a specified interface on the board. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteRegMask (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t mask, uint32_t value)
 Writes a value to a register over a specified interface, updating only the bit positions that are set in mask. The resulting value in the register will be (oldData & ~mask) | (data & mask). The mask and value may be truncated or padded with zeros depending on the register width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusMaskReg (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t mask, nai_maskreg_op_t maskop)
 Writes a value to a 16-bit register, either clearing, setting or toggling only the bit positions that are set in mask. The mask and value may be truncated or padded with zeros depending on the register width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusAckWriteRegMask (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t reqAddress, uint32_t reqMask, uint32_t reqValue, uint32_t ackAddress, uint32_t ackMask, uint32_t ackValue, int32_t timeOutms)
 Handles a "Request and Acknowledge' handshake. The reqValue is written to the reqAddress register and the ackAddress register is read and compared to the ackValue to indicate that the HW request has been serviced within the timeOutms period specified. The reqMask indicates which bits in the reqAddress register are updated. The ackMask indicates which bits in the ackAddress register are used in the comparison of the value retrieved from the ackAddress and the ackValue passed in. If ackValue is not detected within timeOutms milliseconds, the function fails with NAI_ERROR_TIMEOUT. The mask and value may be truncated or padded with zeros depending on the register width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusReadFifo (int32_t cardIndex, nai_intf_t intf, uint32_t dataaddr, uint32_t countaddr, uint32_t count, uint32_t *countremaining, uint32_t timeout, uint32_t datawidth, void *data, uint32_t *outread)
 Attempts to read a fifo over a specified interface. If 'timeout' is set to NAIBRD_FIFO_TIMEOUT_NONE, 'count' will specify the maximum number of elements to read. The operation will not block and read up to 'count' words from the fifo. Otherwise, 'count' will specify an absolute number of elements to read and the operation waits up to 'timeout' milliseconds for the FIFO's count to be equal to or exceed 'count' before performing the read. If it times out, no data is read.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteFifo (int32_t cardIndex, nai_intf_t intf, uint32_t dataregwidth, uint32_t dataaddr, uint32_t countregwidth, uint32_t countaddr, uint32_t count, uint32_t fifosize, uint32_t timeout, uint32_t datawidth, const void *data, uint32_t *outwritten)
 Attempts to write to a fifo over a specified interface. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are written from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to drop to (fifosize-count) before performing the write. If it times out, no data is written. The behavior of this function is not affected by naibrd_SetFifoIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceiveEx (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t txaddress, uint32_t rxaddress, uint32_t rxcountaddress, const uint32_t *txbuffer, uint32_t txcount, uint32_t *rxbuffer, uint32_t rxcount, nai_busExInfo_t naiBusReadExInfo)
 This function is used for the host application to communicate with the 1553 module bare metal via two FIFOs, the In FIFO and the Out FIFO. Commands to the bare metal are sent via the In FIFO and responses from the bare metal are received in the Out FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceive (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t txaddress, uint32_t rxaddress, uint32_t rxcountaddress, const uint32_t *txbuffer, uint32_t txcount, uint32_t *rxbuffer, uint32_t rxcount, nai_busExInfo_t naiBusReadExInfo)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceiveLegacyEthernet (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t txaddress, uint32_t rxaddress, uint32_t rxcountaddress, const uint32_t *txbuffer, uint32_t txcount, uint32_t *rxbuffer, uint32_t rxcount, nai_busExInfo_t naiBusReadExInfo)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPCIDevID (int32_t cardIndex, uint16_t devid)
 Sets the expected PCI device ID when connecting over PCI. If the expected PCI device ID doesn't match the actual one, the open will fail.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetAddressShift (int32_t cardIndex, uint8_t shift)
 Sets the number of bits to shift an address (up) before performing I/O operations.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetAddressShift (int32_t cardIndex, uint8_t *shift)
 Sets the number of bits to shift an address (up) before performing I/O operations.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetPciHandle (int32_t cardIndex, nai_pci_handle_t *pciHandle)
 Get PCI handle number from the card structure.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PCI_SetEnumFnc (int32_t cardIndex, nai_getdevinfo_fnc_t devinfoFnc, nai_getdevaddr_fnc_t devaddrFnc)
 Sets the functions to call to enumerate slave PCI cards on a NAI PCI master card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetGen (int32_t cardIndex, nai_ether_gen_t etherGen)
 Sets the Ethernet Protocol Generation that should be used to communicate to the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Read (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *outdata)
 Ethernet Reads from the board. The data will be truncated if the register is wider than the data width, or padded with zeros if the register is narrower than data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *data)
 Ethernet Writes to the board. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadFifo (int32_t cardIndex, nai_intf_t intf, uint32_t dataaddr, uint32_t countaddr, uint32_t count, uint32_t *countremaining, uint32_t timeout, uint32_t datawidth, void *data, uint32_t *outread)
 Attempts to read a fifo over a specified interface. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are read from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to exceed count before performing the read. If it times out, no data is read. The behavior of this function is not affected by naibrd_SetFifoIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBlock (int32_t cardIndex, uint16_t blockid, nai_intf_t intf, uint32_t regwidth, uint32_t count, uint32_t address[])
 Defines the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetBlock (int32_t cardIndex, uint16_t blockid, uint32_t arraysize, uint32_t outaddress[], uint32_t *regcount)
 Retrieves the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearBlock (int32_t cardIndex, uint16_t blockid)
 Clears the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t arraysize, uint32_t outdata[], uint32_t *datacount)
 Reads the data from the registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Write data to registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint16_t addrflags[], uint32_t address[])
 Defines the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetZBlock (int32_t cardIndex, uint16_t blockid, uint32_t arraysize, uint16_t outaddrflags[], uint32_t outaddress[], uint32_t *regcount)
 Retrieves the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearZBlock (int32_t cardIndex, uint16_t blockid)
 Clears the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t arraysize, uint32_t outdata[], uint32_t *datacount)
 Reads the data from the registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Write data to registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetTDRConfig (int32_t cardIndex, uint16_t tdrid, uint16_t protocol, uint16_t iplen, uint8_t ip[], uint16_t port, uint16_t period, uint16_t count, uint32_t arraysize, uint8_t command[])
 Defines the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetTDRConfig (int32_t cardIndex, uint16_t tdrid, uint16_t *outprotocol, uint16_t *outiplen, uint8_t outip[], uint16_t *outport, uint16_t *outperiod, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearTDRConfig (int32_t cardIndex, uint16_t tdrid)
 Clears the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartTDR (int32_t cardIndex, uint16_t tdrid)
 Starts the Time Driven Response for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopTDR (int32_t cardIndex, uint16_t tdrid)
 Stops the Time Driven Response for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetIDRConfig (int32_t cardIndex, uint16_t idrid, uint16_t protocol, uint16_t iplen, uint8_t ip[], uint16_t port, uint32_t vector, uint16_t count, uint32_t arraysize, uint8_t command[])
 Defines the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetIDRConfig (int32_t cardIndex, uint16_t idrid, uint16_t *outprotocol, uint16_t *outiplen, uint8_t outip[], uint16_t *outport, uint32_t *outvector, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearIDRConfig (int32_t cardIndex, uint16_t idrid)
 Clears the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartIDR (int32_t cardIndex, uint16_t idrid)
 Starts the Interrupt Driven Response for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopIDR (int32_t cardIndex, uint16_t idrid)
 Stops the Interrupt Driven Response for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetUPR (int32_t cardIndex, int32_t uprslot, nai_ether_upr_type_t upr_type, uint8_t ip[6], uint16_t udpport, uint32_t vector_periodms, const uint8_t uprmsg[], uint32_t uprmsglen)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetReadUPR (int32_t cardIndex, int32_t uprslot, nai_ether_upr_type_t upr_type, uint8_t ip[6], uint16_t udpport, uint32_t vector_periodms, uint8_t seqhi, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t width)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetWriteUPR (int32_t cardIndex, int32_t uprslot, nai_ether_upr_type_t upr_type, uint8_t ip[6], uint16_t udpport, uint32_t vector_periodms, uint8_t seqhi, int32_t module, uint32_t offset, uint32_t stride, uint32_t count, uint32_t width, const void *data)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBusReadUPR (int32_t cardIndex, int32_t uprslot, nai_ether_upr_type_t upr_type, uint8_t ip[6], uint16_t udpport, uint32_t vector_periodms, uint8_t seqhi, nai_intf_t intf, uint32_t address, uint32_t stride, uint32_t count, uint32_t width)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBusWriteUPR (int32_t cardIndex, int32_t uprslot, nai_ether_upr_type_t upr_type, uint8_t ip[6], uint16_t udpport, uint32_t vector_periodms, uint8_t seqhi, nai_intf_t intf, uint32_t address, uint32_t stride, uint32_t count, uint32_t width, const void *data)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteScript (int32_t cardIndex, uint16_t scriptid, uint16_t cmdcount, uint32_t arraysize, uint8_t command[])
 Defines the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadScript (int32_t cardIndex, uint16_t scriptid, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearScript (int32_t cardIndex, uint16_t scriptid)
 Clears the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_RunScript (int32_t cardIndex, uint16_t scriptid, int32_t cmdcount, int32_t dataSz, int32_t *dataLen, uint8_t *data)
 Runs the command for the Script ID specified. Returns any values returned from the script.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ExecuteScript (int32_t cardIndex, uint16_t scriptid)
 Executes the command for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetSafeStateScriptId (int32_t cardIndex, uint16_t scriptid)
 Sets the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetSafeStateScriptId (int32_t cardIndex, uint16_t *outscriptid)
 Retrieves the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_NOP (int32_t cardIndex)
 Ethernet NOP Command - This command communicates to the board for connection testing or synchronous idle. Compatible with all generation of boards that support Ethernet.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetNoCommsWatchdogTimer (int32_t cardIndex, uint32_t max_sec_between_ether_comm)
 Sets the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetNoCommsWatchdogTimer (int32_t cardIndex, uint32_t *outmax_sec_between_ether_comm)
 Retrieves the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write_NoReply (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *data)
 Same functionality as the Ethernet Writes to the board, however, with this Ethernet Write command the board will does not return any responses. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock_NoReply (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Same functionality as the Ethernet Write data to registers defined in the Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock_NoReply (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Same functionality as the Ethernet Write data to registers defined in the Z-Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetDirectInterruptFnc (int32_t cardIndex, nai_dirint_fnc_t fnc)
 Sets the function to call when changing which interface interrupts are directed to.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPCIInterruptConfig (int32_t cardIndex, uint32_t statusaddr, uint32_t clearaddr, uint32_t clearval)
 Configures interrupt handling behavior as a PCI slave card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetPCIInterruptConfig (int32_t cardIndex, uint32_t *statusaddr, uint32_t *clearaddr, uint32_t *clearval)
 Gets the Configuration of the interrupt handling for a PCI slave card.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEInterruptLevelAddr (int32_t cardIndex, uint32_t intlvladdr)
 Sets the VME interrupt level register address.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerdesAddress (int32_t cardIndex, int32_t module, uint32_t address)
 Specifies the base address to communicate with the Module when communicating over the SERDES bus.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetSerdesAddress (int32_t cardIndex, int32_t module, uint32_t *address)
 Get the base address to communicate with the Module when communicating over the SERDES bus.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashRead (int32_t cardIndex, uint32_t offset, uint32_t count, uint8_t data[])
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashProg (int32_t cardIndex, uint32_t offset, uint32_t count, const uint8_t data[])
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashErase (int32_t cardIndex, uint32_t offset)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSerialNo (int32_t cardIndex, int32_t module, int32_t serialLen, uint8_t *serialno)
 Gets module's 32 character serial number. Available only on Gen 5 products.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetMBExecVersion (int32_t cardIndex)
 Sets MB Exec (Ethernet Listener Application) Revision Information in the nai_card_t structure. Available only on Gen 5 products. Revision information is two 32-bit values (rev_major and rev_minor) where the each 32-bit value is formatted as follows: rev_major: 0x002C0003 (44, 3) rev_minor: 0x00000000 represents MB Exec Revision: 3.44.0.0. Data is set in nai_card_t mbexec_rev array as follows: mbexec_rev[0]=3, mbexec_rev[1]=44, mbexec_rev[2]=0, mbexec_rev[3]=0.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMBExecVersion (int32_t cardIndex, uint16_t rev[4])
 Gets MB Exec (Ethernet Listener Application) Revision Information. Available only on Gen 5 products. Revision information is two 32-bit values (rev_major and rev_minor) where the each 32-bit value is formatted as follows: rev_major: 0x002C0003 (44, 3) rev_minor: 0x00000000 represents MB Exec Revision: 3.44.0.0. Data is returned as follows: rev[0]=3, rev[1]=44, rev[2]=0, rev[3]=0.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleLinkSupport (int32_t cardIndex, uint32_t mbFPGARev)
 Sets NAIBRD card structure to see if motherboard supports module link status.
 
NAIBRDFUNC bool_t NAIAPI naibrd_GetModuleLinkSupport (int32_t cardIndex)
 Retrieves NAIBRD card structure to see if motherboard supports module link status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ValidatePCIRead32 (int32_t cardIndex, int32_t module, uint32_t regwidth, uint32_t datawidth, uint32_t read32Data)
 
NAIBRDFUNC nai_status_t naibrd_ValidateOnboardRead32 (int32_t cardIndex, int32_t module, uint32_t regwidth, uint32_t datawidth, uint32_t read32Data)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBoardGen (int32_t cardIndex, uint32_t boardgen)
 
NAIBRDFUNC uint32_t NAIAPI naibrd_GetInternalVersion (void)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeCapability (int32_t cardIndex, int32_t module, bool_t *outFloatingPointModeCapable)
 
NAIBRDFUNC nai_status_t naibrd_GetBITCapability (int32_t cardIndex, int32_t module)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetRunningInFloatingPointMode (int32_t cardIndex, int32_t module, bool_t *p_outfloatingPointEnabled)
 
nai_status_t NAIAPI naibrd_GetSocket (int32_t cardIndex, nai_socket_t *p_outsock)
 
void ConvertToAsciiChar (uint32_t hexVal, int8_t *asciiVal)
 
float32_t ConvertUint32ToFloat32 (uint32_t IEEE754Value)
 
uint32_t ConvertFloat32ToUint32 (float32_t singlePrecisionValue)
 
float64_t ConvertIEEESinglePrcsnToDblPrcsn (uint32_t IEEE754Value)
 
uint32_t ConvertDblPrcsnToIEEESinglePrcsn (float64_t dblPrecisionValue)
 

Variables

const double NAIBRD_VERSION = 1.62
 
const uint32_t NAIBRD_INTERNAL_VERSION = 0
 

Macro Definition Documentation

◆ BOARD_READY_REG

#define BOARD_READY_REG   1

◆ ISR_INSTALLED

#define ISR_INSTALLED   0x0002u

◆ NAI_FP_CONVERSION_POLL_TIME

#define NAI_FP_CONVERSION_POLL_TIME   50 /* Poll every 50uS */

◆ NAI_MAX_FP_CONVERSION_TIMEOUT

#define NAI_MAX_FP_CONVERSION_TIMEOUT   1000000 /* Time-out after 1 second */

◆ NAIBRD_64ARM_G5

#define NAIBRD_64ARM_G5   1

◆ NAIBRD_64C2

#define NAIBRD_64C2   1

◆ NAIBRD_64C3

#define NAIBRD_64C3   1

◆ NAIBRD_64E3

#define NAIBRD_64E3   1

◆ NAIBRD_64PPC1

#define NAIBRD_64PPC1   1

◆ NAIBRD_67G6

#define NAIBRD_67G6   1

◆ NAIBRD_67PPC2

#define NAIBRD_67PPC2   1

◆ NAIBRD_68ARM_G5

#define NAIBRD_68ARM_G5   1

◆ NAIBRD_68ARM_G6

#define NAIBRD_68ARM_G6   1

◆ NAIBRD_68C3

#define NAIBRD_68C3   1

◆ NAIBRD_68CB6

#define NAIBRD_68CB6   1

◆ NAIBRD_68DT1

#define NAIBRD_68DT1   1

◆ NAIBRD_68INT4_5

#define NAIBRD_68INT4_5   1

◆ NAIBRD_68INT6

#define NAIBRD_68INT6   1

◆ NAIBRD_68PPC2

#define NAIBRD_68PPC2   1

◆ NAIBRD_68PPC3

#define NAIBRD_68PPC3   1

◆ NAIBRD_68PW1

#define NAIBRD_68PW1   1

◆ NAIBRD_68PW2

#define NAIBRD_68PW2   1

◆ NAIBRD_74SD5

#define NAIBRD_74SD5   1

◆ NAIBRD_75ARM_G5

#define NAIBRD_75ARM_G5   1

◆ NAIBRD_75C3

#define NAIBRD_75C3   1

◆ NAIBRD_75C5

#define NAIBRD_75C5   1

◆ NAIBRD_75D3

#define NAIBRD_75D3   1

◆ NAIBRD_75D4

#define NAIBRD_75D4   1

◆ NAIBRD_75DS2

#define NAIBRD_75DS2   1

◆ NAIBRD_75INT2

#define NAIBRD_75INT2   1

◆ NAIBRD_75PPC1

#define NAIBRD_75PPC1   1

◆ NAIBRD_76C2

#define NAIBRD_76C2   1

◆ NAIBRD_76CS3

#define NAIBRD_76CS3   1

◆ NAIBRD_79C3

#define NAIBRD_79C3   1

◆ NAIBRD_79G5

#define NAIBRD_79G5   1

◆ NAIBRD_99ARM1

#define NAIBRD_99ARM1   1

◆ NAIBRD_99ARM2

#define NAIBRD_99ARM2   1

◆ NAIBRD_NIU1

#define NAIBRD_NIU1   1

◆ NAIBRD_NIU1A

#define NAIBRD_NIU1A   1

◆ NAIBRD_NIU2A

#define NAIBRD_NIU2A   1

◆ NAIBRD_NIU3A

#define NAIBRD_NIU3A   1

◆ NAIBRD_NIU3E

#define NAIBRD_NIU3E   1

◆ NO_BOARD_READY

#define NO_BOARD_READY   0

◆ VME_INTLVL_VALID

#define VME_INTLVL_VALID   0x0001u

Typedef Documentation

◆ nai_BC1553_t

typedef struct nai_BC1553 nai_BC1553_t

◆ nai_card_t

typedef struct nai_card nai_card_t

◆ nai_module_info_t

typedef struct nai_module_info nai_module_info_t

Function Documentation

◆ ConvertDblPrcsnToIEEESinglePrcsn()

uint32_t ConvertDblPrcsnToIEEESinglePrcsn ( float64_t dblPrecisionValue)

◆ ConvertFloat32ToUint32()

uint32_t ConvertFloat32ToUint32 ( float32_t singlePrecisionValue)

◆ ConvertIEEESinglePrcsnToDblPrcsn()

float64_t ConvertIEEESinglePrcsnToDblPrcsn ( uint32_t IEEE754Value)

◆ ConvertToAsciiChar()

void ConvertToAsciiChar ( uint32_t hexVal,
int8_t * asciiVal )

◆ ConvertUint32ToFloat32()

float32_t ConvertUint32ToFloat32 ( uint32_t IEEE754Value)

◆ getModuleByOffset()

int getModuleByOffset ( int32_t cardIndex,
uint32_t startAddr )

◆ naibrd_AckWriteRegMask32()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AckWriteRegMask32 ( int32_t cardIndex,
int32_t module,
uint32_t reqOffset,
uint32_t reqMask,
uint32_t reqValue,
uint32_t ackOffset,
uint32_t ackMask,
uint32_t ackValue,
int32_t timeOutms )

Handles a "Request and Acknowledge' handshake. The reqValue is written to the regOffset register and the ackOffset register is read and compared to the ackValue to indicate that the HW request has been serviced within the timeOutms period specified. The reqMask indicates which bits in the reqOffset register are updated. The ackMask indicates which bits in the ackOffset register are used in the comparison of the value retrieved from the ackOffset and the ackValue passed in. If ackValue is not detected within timeOutms milliseconds, the function fails with NAI_ERROR_TIMEOUT. The mask and value may be truncated or padded with zeros depending on the register width.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number to write to, or NAIBRD_MOTHERBOARD.
reqOffset: (Input) The offset from the module or board start address of the request register.
reqMask: (Input) The mask of the request bit(s).
reqValue: (Input) The request value to write. Note that only the bit positions set in mask will be used.
ackOffset: (Input) The offset from the module or board start address of the acknowledge register.
ackMask: (Input) The mask of the acknowledge bit(s).
ackValue: (Input) The acknowledge value to read. Note that only the bit positions set in mask will be used.
timeOutms: (Input) The value in ms to wait for an acknowledge .
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • NAI_ERROR_TIMEOUT when an acknowledge is not read within timeOutms
  • An error returned by naibrd_BusWriteRegMask or the writeMaskFnc specified by naibrd_SetIOFnc.

◆ naibrd_blkPackQualify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_blkPackQualify ( nai_card_t * thisCard,
uint32_t address,
nai_busExInfo_t naiBusReadExInfo )

◆ naibrd_blkQualify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_blkQualify ( nai_card_t * thisCard,
uint32_t regWidth,
uint32_t address,
uint32_t count,
nai_busExInfo_t naiBusReadExInfo )

◆ naibrd_Bus1553BMSendAndReceive()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceive ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t txaddress,
uint32_t rxaddress,
uint32_t rxcountaddress,
const uint32_t * txbuffer,
uint32_t txcount,
uint32_t * rxbuffer,
uint32_t rxcount,
nai_busExInfo_t naiBusReadExInfo )

◆ naibrd_Bus1553BMSendAndReceiveEx()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceiveEx ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t txaddress,
uint32_t rxaddress,
uint32_t rxcountaddress,
const uint32_t * txbuffer,
uint32_t txcount,
uint32_t * rxbuffer,
uint32_t rxcount,
nai_busExInfo_t naiBusReadExInfo )

This function is used for the host application to communicate with the 1553 module bare metal via two FIFOs, the In FIFO and the Out FIFO. Commands to the bare metal are sent via the In FIFO and responses from the bare metal are received in the Out FIFO.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying data register.
txaddress: (Input) The address of the In FIFO's data register.
rxaddress: (Input) The address of the Out FIFO's data register.
rxcountaddress: (Input) The address of the Out FIFO count register.
txbuffer: (Input) Buffer containing data to place in In FIFO.
txcount: (Input) Number of words to place in In FIFO.
rxbuffer: (Output) Pointer to array to store rx data from Out FIFO.
rxcount: (Input) The number of elements received from the Out FIFO.
naiBusReadExInfo: (Input) additional properties required for low level bus function calls.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead, naibrd_BusWrite or internal IO functions.

◆ naibrd_Bus1553BMSendAndReceiveLegacyEthernet()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Bus1553BMSendAndReceiveLegacyEthernet ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t txaddress,
uint32_t rxaddress,
uint32_t rxcountaddress,
const uint32_t * txbuffer,
uint32_t txcount,
uint32_t * rxbuffer,
uint32_t rxcount,
nai_busExInfo_t naiBusReadExInfo )

◆ naibrd_BusAckWriteRegMask()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusAckWriteRegMask ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t reqAddress,
uint32_t reqMask,
uint32_t reqValue,
uint32_t ackAddress,
uint32_t ackMask,
uint32_t ackValue,
int32_t timeOutms )

Handles a "Request and Acknowledge' handshake. The reqValue is written to the reqAddress register and the ackAddress register is read and compared to the ackValue to indicate that the HW request has been serviced within the timeOutms period specified. The reqMask indicates which bits in the reqAddress register are updated. The ackMask indicates which bits in the ackAddress register are used in the comparison of the value retrieved from the ackAddress and the ackValue passed in. If ackValue is not detected within timeOutms milliseconds, the function fails with NAI_ERROR_TIMEOUT. The mask and value may be truncated or padded with zeros depending on the register width.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying register.
reqAddress: (Input) The address of the register to perform the request.
reqMask: (Input) The mask of the request bit(s).
reqValue: (Input) The request value to write. Note that only the bit positions set in mask will be used.
ackAddress: (Input) The address of the register to perform the acknowledge.
ackMask: (Input) The mask of the acknowledge bit(s).
ackValue: (Input) The acknowledge value to read. Note that only the bit positions set in mask will be used.
timeOutms: (Input) The value in ms to wait for an acknowledge .
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • NAI_ERROR_TIMEOUT when an acknowledge is not read within timeOutms
  • An error returned by naibrd_BusRead, naibrd_BusWrite, or an internal I/O function.

◆ naibrd_BusMaskReg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusMaskReg ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t mask,
nai_maskreg_op_t maskop )

Writes a value to a 16-bit register, either clearing, setting or toggling only the bit positions that are set in mask. The mask and value may be truncated or padded with zeros depending on the register width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying register.
address: (Input) The address of the register to write to.
mask: (Input) The bits to change in the register.
maskop: (Input) The operation to perform on the data at the address specified.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • NAI_ERROR_INVALID_VALUE when the mask operation is invalid.
  • An error returned by naibrd_BusRead, naibrd_BusWrite, or an internal I/O function.

◆ naibrd_BusRead()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusRead ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t dataWidth,
void * data )

Reads from a specified interface on the board. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start reading from.
stride: (Input) The amount to increment the address after each individual read.
count: (Input) The total number of elements to read.
dataWidth: (Input) The width of the elements in data, in bytes.
data: (Output) The array to receive the values of the registers.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead or the readFnc specified by naibrd_SetIOFnc.

◆ naibrd_BusReadEx()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusReadEx ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t dataWidth,
nai_busExInfo_t busExInfo,
void * data )

Reads from a specified interface on the board. The data will be truncated if the register is wider than width, or padded with zeros if the register is narrower than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start reading from.
stride: (Input) The amount to increment the address after each individual read.
count: (Input) The total number of elements to read.
dataWidth: (Input) The width of the elements in data, in bytes.
data: (Output) The array to receive the values of the registers.
busExInfo: (Input) additional properties required for low level bus function calls.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead or the readFnc specified by naibrd_SetIOFnc.

◆ naibrd_BusReadFifo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusReadFifo ( int32_t cardIndex,
nai_intf_t intf,
uint32_t dataaddr,
uint32_t countaddr,
uint32_t count,
uint32_t * countremaining,
uint32_t timeout,
uint32_t datawidth,
void * data,
uint32_t * outread )

Attempts to read a fifo over a specified interface. If 'timeout' is set to NAIBRD_FIFO_TIMEOUT_NONE, 'count' will specify the maximum number of elements to read. The operation will not block and read up to 'count' words from the fifo. Otherwise, 'count' will specify an absolute number of elements to read and the operation waits up to 'timeout' milliseconds for the FIFO's count to be equal to or exceed 'count' before performing the read. If it times out, no data is read.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
dataaddr: (Input) The address of the FIFO's data register.
countaddr: (Input) The address of the FIFO's count register.
count: (Input) The number of elements to read from the FIFO.
countremaining: (Output) The number of elements remaining in the FIFO.
timeout: (Input) If the 'count' parameter specifies an absolute number of elements to read from the FIFO, then 'timeout' is the amount of time, in milliseconds, to wait for the number of elements in the FIFO to reach 'count' before timing out. If the 'count' parameter specifies the maximum number of elements that can be from the FIFO, then use NAIBRD_FIFO_TIMEOUT_NONE for the timeout parameter. This will cause the FIFO to be read (up to but not exceeding 'count') and immediately return to the caller.
datawidth: (Input) The width of the elements in data, in bytes.
data: (Output) An array to store the values read.
outread: (Output) The number of elements read.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • NAI_ERROR_TIMEOUT when the number of elements in the FIFO does not equal 'count' in the time specified by 'timeout'. This only applies when timeout is a time (in mS) and not NAIBRD_FIFO_TIMEOUT_NONE
  • An error returned by naibrd_BusRead or internal IO functions.

◆ naibrd_BusWrite()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWrite ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t dataWidth,
const void * data )

Writes to a specified interface on the board. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start writing to.
stride: (Input) The amount to increment the address after each individual write.
count: (Input) The total number of elements to write.
dataWidth: (Input) The width of the elements in data, in bytes.
data: (Input) The array that contains the values to write to the registers.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusWrite or the writeFnc specified by naibrd_SetIOFnc.

◆ naibrd_BusWriteEx()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteEx ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t dataWidth,
nai_busExInfo_t busExInfo,
const void * data )

Writes to a specified interface on the board. The data will be truncated if the register is narrower than width, or padded with zeros if the register is wider than width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start writing to.
stride: (Input) The amount to increment the address after each individual write.
count: (Input) The total number of elements to write.
dataWidth: (Input) The width of the elements in data, in bytes.
data: (Input) The array that contains the values to write to the registers.
busExInfo: (Input) additional properties required for low level bus function calls.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusWrite or the writeFnc specified by naibrd_SetIOFnc.

◆ naibrd_BusWriteFifo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteFifo ( int32_t cardIndex,
nai_intf_t intf,
uint32_t dataregwidth,
uint32_t dataaddr,
uint32_t countregwidth,
uint32_t countaddr,
uint32_t count,
uint32_t fifosize,
uint32_t timeout,
uint32_t datawidth,
const void * data,
uint32_t * outwritten )

Attempts to write to a fifo over a specified interface. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are written from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to drop to (fifosize-count) before performing the write. If it times out, no data is written. The behavior of this function is not affected by naibrd_SetFifoIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
dataregwidth: (Input) The width of the underlying data register.
dataaddr: (Input) The address of the FIFO's data register.
countregwidth: (Input) The width of the underlying count register.
countaddr: (Input) The address of the FIFO's count register.
count: (Input) The number of elements to write to the FIFO.
fifosize: (Input) The the maximum number of elements the FIFO can hold.
timeout: (Input) The amount of time, in milliseconds, to wait for the FIFO's count to drop to (fifosize-count) before timing out.
datawidth: (Input) The width of the elements in data, in bytes.
data: (Output) An array containing the values to write.
outwritten: (Output) The number of elements written.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead, naibrd_BusWrite or internal IO functions.

◆ naibrd_BusWriteRegMask()

NAIBRDFUNC nai_status_t NAIAPI naibrd_BusWriteRegMask ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t mask,
uint32_t value )

Writes a value to a register over a specified interface, updating only the bit positions that are set in mask. The resulting value in the register will be (oldData & ~mask) | (data & mask). The mask and value may be truncated or padded with zeros depending on the register width. The behavior of this function is not affected by naibrd_SetIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the write on.
regwidth: (Input) The width of the underlying register.
address: (Input) The address of the register to write to.
mask: (Input) The bits to change in the register.
value: (Input) The data to write. Not that only the bit positions set in mask will be used.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead, naibrd_BusWrite, or an internal I/O function.

◆ naibrd_ClearModuleBITLogic()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITLogic ( int32_t cardIndex,
int32_t module,
int32_t channel )

Resets the Continuous BIT internal circuitry and counter mechanism for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_ClearModuleBITStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITStatus ( int32_t cardIndex,
int32_t module,
int32_t channel )

Clears the latched BIT status of the channel specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_ClearModuleBITStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ClearModuleBITStatusRaw ( int32_t cardIndex,
int32_t module,
uint32_t rawData )

Clears the latched BIT status of the channels specified by the bit mapped 32-bit argument.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
rawData: (Input) Bit mapped 32-bit argument containing channels to clear.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_Ether_SetBusReadUPR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBusReadUPR ( int32_t cardIndex,
int32_t uprslot,
nai_ether_upr_type_t upr_type,
uint8_t ip[6],
uint16_t udpport,
uint32_t vector_periodms,
uint8_t seqhi,
nai_intf_t intf,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t width )

◆ naibrd_Ether_SetBusWriteUPR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBusWriteUPR ( int32_t cardIndex,
int32_t uprslot,
nai_ether_upr_type_t upr_type,
uint8_t ip[6],
uint16_t udpport,
uint32_t vector_periodms,
uint8_t seqhi,
nai_intf_t intf,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t width,
const void * data )

◆ naibrd_Ether_SetReadUPR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetReadUPR ( int32_t cardIndex,
int32_t uprslot,
nai_ether_upr_type_t upr_type,
uint8_t ip[6],
uint16_t udpport,
uint32_t vector_periodms,
uint8_t seqhi,
int32_t module,
uint32_t offset,
uint32_t stride,
uint32_t count,
uint32_t width )

◆ naibrd_Ether_SetUPR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetUPR ( int32_t cardIndex,
int32_t uprslot,
nai_ether_upr_type_t upr_type,
uint8_t ip[6],
uint16_t udpport,
uint32_t vector_periodms,
const uint8_t uprmsg[],
uint32_t uprmsglen )

◆ naibrd_Ether_SetWriteUPR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetWriteUPR ( int32_t cardIndex,
int32_t uprslot,
nai_ether_upr_type_t upr_type,
uint8_t ip[6],
uint16_t udpport,
uint32_t vector_periodms,
uint8_t seqhi,
int32_t module,
uint32_t offset,
uint32_t stride,
uint32_t count,
uint32_t width,
const void * data )

◆ naibrd_FlashErase()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashErase ( int32_t cardIndex,
uint32_t offset )

◆ naibrd_FlashProg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashProg ( int32_t cardIndex,
uint32_t offset,
uint32_t count,
const uint8_t data[] )

◆ naibrd_FlashRead()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FlashRead ( int32_t cardIndex,
uint32_t offset,
uint32_t count,
uint8_t data[] )

◆ naibrd_GetAddressShift()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetAddressShift ( int32_t cardIndex,
uint8_t * shift )

Sets the number of bits to shift an address (up) before performing I/O operations.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
shift: (Output) Pointer to the memory location where the card context address shift property is written to.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetBITCapability()

NAIBRDFUNC nai_status_t naibrd_GetBITCapability ( int32_t cardIndex,
int32_t module )

◆ naibrd_GetCardVmeInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetCardVmeInfo ( int32_t cardIndex,
int32_t * boardEndian,
int32_t * boardDataWidth,
uint32_t * vmeLocalBaseAddr,
uint32_t * vmeBaseAddr,
uint32_t * vmeSize,
uint32_t * addrModifier,
int32_t * hostIsNAI_SBC,
int32_t * brdPhysicalSlot )

Sets card VME information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
boardEndian: (Output) The Endianess of the card.
boardDataWidth: (Output) The data width of the card (2 or 4).
vmeLocalBaseAddr: (Output) The translated local (PCI) address of the card.
vmeBaseAddr: (Output) The VME address of the card.
vmeSize: (Output) The VME size of the card.
addrModifier: (Output) The VME address modifier of the card.
hostIsNAI_SBC: (Output) Flag to indicate that the card is a NAI SBC.
brdPhysicalSlot: (Output) The physical slot number of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetFloatingPointModeCapability()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetFloatingPointModeCapability ( int32_t cardIndex,
int32_t module,
bool_t * outFloatingPointModeCapable )

◆ naibrd_GetI2CInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetI2CInfo ( int32_t cardIndex,
int32_t * unitNum,
uint32_t * devAddr,
int32_t * devType,
int32_t * smbus )

Gets card I2C interface information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
unitNum: (Output) The I2C unit number.
devAddr: (Output) The I2C device addres.
devType: (Output) The I2C device type.
smbus: (Output) if smbus > 0, smbus mode enabled. Otherwise its regular I2C.

<param

Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetInternalVersion()

NAIBRDFUNC uint32_t NAIAPI naibrd_GetInternalVersion ( void )

◆ naibrd_GetMBExecVersion()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetMBExecVersion ( int32_t cardIndex,
uint16_t rev[4] )

Gets MB Exec (Ethernet Listener Application) Revision Information. Available only on Gen 5 products. Revision information is two 32-bit values (rev_major and rev_minor) where the each 32-bit value is formatted as follows: rev_major: 0x002C0003 (44, 3) rev_minor: 0x00000000 represents MB Exec Revision: 3.44.0.0. Data is returned as follows: rev[0]=3, rev[1]=44, rev[2]=0, rev[3]=0.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
rev: (Output) MB Exec Revision.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.

◆ naibrd_GetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITEnable ( int32_t cardIndex,
int32_t module,
nai_bit_type_t type,
bool_t * outbitEnable )

Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) The BIT type to check.
outbitEnable: (Output) BIT Enabled (0 = disabled, 1 = enabled).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITEnableRaw()

nai_status_t NAIAPI naibrd_GetModuleBITEnableRaw ( int32_t cardIndex,
int32_t module,
uint32_t * outbitEnable )

Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outbitEnable: (Output) Bit-mapped enable. D0 or D3.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITErrorThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITErrorThreshold ( int32_t cardIndex,
int32_t module,
uint32_t * outBITErrorThreshold )

Retrieves the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outBITErrorThreshold: (Output) The current BIT Error Threshold.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outEdgeLevel )

Retrieves the BIT Interrupt Edge/Level register value for the specified module channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outEdgeLevel: (Output)Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outIntEnable )

Retrieves the BIT Interrupt Enable register value for the specified module channel. Setting the bits to 1 enabled interrupts. Status is reported in the BIT Interrupt Status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outIntEnable: (Output) Enabled (1) and/or disabled (0).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_int_steering_t * outsteering )

Retrieves the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outsteering: (Output) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid group register type is specified.

◆ naibrd_GetModuleBITInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITInterruptVector ( int32_t cardIndex,
int32_t module,
uint32_t * outvector )

Retrieves the BIT interrupt vector for the specified module.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outvector: (Output) Interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetModuleBITStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_status_access_type_t type,
bool_t * outBitStatus )

Retrieves the BIT status of the channel specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) The status access type to read.
outBitStatus: (Output) Channel BIT Status (0 = pass, 1 = fail).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleBITStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleBITStatusRaw ( int32_t cardIndex,
int32_t module,
nai_status_access_type_t type,
uint32_t * p_outStatus )

Retrieves the 32-bit BIT status of the module specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) The status access type to read.
p_outStatus: (Output) BIT Status, bit mapped per channel (0 = pass, 1 = fail).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleCapabilities()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleCapabilities ( int32_t cardIndex,
uint32_t module,
uint32_t * outCapabilityVal )

Retrieves NAIBRD card structure to check if module is block and pack capable.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) module number.
outCapabilityVal: (Output) Data packing options read from card structure.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleLinkSupport()

NAIBRDFUNC bool_t NAIAPI naibrd_GetModuleLinkSupport ( int32_t cardIndex)

Retrieves NAIBRD card structure to see if motherboard supports module link status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • TRUE when module link feature supported
  • FALSE when module link feature not supported

◆ naibrd_GetModulePBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModulePBITComplete ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outpbitComplete )

Retrieves the PBIT (Power-on BIT) status of the module and channel specified. The PBIT result will be in the BIT status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outpbitComplete: (Output) TRUE = PBIT complete, FALSE = PBIT in execution.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModulePBITCompleteRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModulePBITCompleteRaw ( int32_t cardIndex,
int32_t module,
uint32_t * outpbitComplete )

Retrieves the raw PBIT (Power-on BIT) status of the module specified. The PBIT result will be in the BIT status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
outpbitComplete: (Output) TRUE = PBIT complete, FALSE = PBIT in execution.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetModuleSerialNo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSerialNo ( int32_t cardIndex,
int32_t module,
int32_t serialLen,
uint8_t * serialno )

Gets module's 32 character serial number. Available only on Gen 5 products.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
serialLen: (Input) Length of the serialno array buffer. Needs to be at least 32.
serialno: (Output) Module's 32 character serial number. "UNKNOWN" is returned when an module requested is not present.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetModuleSyncMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncMode ( int32_t cardIndex,
int32_t module,
uint32_t syncAddress,
naibrd_module_sync_config_type_t syncConfigType,
naibrd_module_sync_mode_type_t * outsyncMode,
int32_t * outsyncConfigModule )

◆ naibrd_GetModuleSyncSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncSource ( int32_t cardIndex,
int32_t syncModNum,
int32_t * outsourceModNum )

◆ naibrd_GetModuleSyncTriggerSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetModuleSyncTriggerSource ( int32_t cardIndex,
int32_t module,
int32_t * outtriggerModNum )

◆ naibrd_GetOffBoardCfg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffBoardCfg ( int32_t cardIndex,
uint32_t offBdCfgIdx,
uint32_t * offBdCfgData )

Gets the off-board configuration from the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
offBdCfgIdx: (Input) The off-board configuration index.
offBdCfgData: (Output) The memory where the off-board address is written to.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_GetPciHandle()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetPciHandle ( int32_t cardIndex,
nai_pci_handle_t * pciHandle )

Get PCI handle number from the card structure.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
pciHandle: (Output) Pointer to the memory location where the card context Serdes handle property is written to.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetPCIInterruptConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetPCIInterruptConfig ( int32_t cardIndex,
uint32_t * statusaddr,
uint32_t * clearaddr,
uint32_t * clearval )

Gets the Configuration of the interrupt handling for a PCI slave card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
statusaddr: (Output) The address of the card's interrupt status register.
clearaddr: (Output) The address of the card's clear status register.
clearval: (Output) The value to write to the card's clear status register to clear the status.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetRunningInFloatingPointMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetRunningInFloatingPointMode ( int32_t cardIndex,
int32_t module,
bool_t * p_outfloatingPointEnabled )

◆ naibrd_GetSerdesAddress()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetSerdesAddress ( int32_t cardIndex,
int32_t module,
uint32_t * address )

Get the base address to communicate with the Module when communicating over the SERDES bus.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) The module number (1 - NAI_MAX_MODULES).
address: (Output) Memory where the base address of the card is written to.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_GetSocket()

nai_status_t NAIAPI naibrd_GetSocket ( int32_t cardIndex,
nai_socket_t * p_outsock )

◆ naibrd_Open()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Open ( int32_t cardIndex,
naibrd_comm_t comm,
nai_ether_gen_t gen )

Opens a connection to a card, using the specified communication mode and any settings specified by prior calls to Connection Setup Functions.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
comm: (Input) The communications mode to use.
gen: (Input) Ethernet message generation code.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_VALUE when the communications mode is invalid.
  • NAI_ERROR_NOT_SUPPORTED if naibrd does not support that communications mode as configured and NAIBRD_IOFLAGS_NO_DEFAULT_INTF was not specified to naibrd_SetIOFnc.
  • An error returned by internal calls establishing the connection.

◆ naibrd_PCI_SetEnumFnc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PCI_SetEnumFnc ( int32_t cardIndex,
nai_getdevinfo_fnc_t devinfoFnc,
nai_getdevaddr_fnc_t devaddrFnc )

Sets the functions to call to enumerate slave PCI cards on a NAI PCI master card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
devinfoFnc: (Input) The function to call to retrieve device info for a specified slot.
devaddrFnc: (Input) The function to call to retrieve the device address for a specified slot.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetAddressShift()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetAddressShift ( int32_t cardIndex,
uint8_t shift )

Sets the number of bits to shift an address (up) before performing I/O operations.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
shift: (Input) The number of bits to shift an address. If shift is 1, the address 0x400 is adjusted to 0x800 before reading or writing a register.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetBoardGen()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBoardGen ( int32_t cardIndex,
uint32_t boardgen )

◆ naibrd_SetBoardReadyReg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBoardReadyReg ( int32_t cardIndex,
uint32_t regOffset,
uint32_t readyValue )

Sets the board ready register of the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
regOffset: (Input) The board ready register offset.
readyValue: (Input) The value written to the board ready register indicating the board is ready.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_SetCardInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardInfo ( int32_t cardIndex,
uint32_t platform,
uint32_t model,
uint32_t gen,
uint32_t ver,
uint32_t special )

Sets card information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
platform: (Input) The platform ID of the card.
model: (Input) The model ID of the card.
gen: (Input) The generation ID of the card.
ver: (Input) The version ID of the card.
special: (Input) The special code of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetCardRev()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardRev ( int32_t cardIndex,
uint32_t pcbrev,
uint32_t procrev,
uint32_t fpgarev )

Sets card information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
pcbrev: (Input) The PCB revision of the card.
procrev: (Input) The master processor ID of the card.
fpgarev: (Input) The interface FPGA ID of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetCardTempExCapability()

NAIBRDFUNC nai_status_t naibrd_SetCardTempExCapability ( int32_t cardIndex,
uint32_t mbCoreTemp,
uint32_t mbPCBTemp )

Sets card extended temperature capability based on non zero readings returned from extended temperature readings.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
mbCoreTemp: (Input) Temperature reading of motherboard core.
mbPCBTemp: (Input) Temperature reading of motherboard PCB.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetCardVmeInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardVmeInfo ( int32_t cardIndex,
int32_t boardEndian,
int32_t boardDataWidth,
uint32_t vmeLocalBaseAddr,
uint32_t vmeBaseAddr,
uint32_t addrModifier,
int32_t hostIsNAI_SBC,
int32_t brdPhysicalSlot )

Sets card VME information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
boardEndian: (Input) The Endianess of the card.
boardDataWidth: (Input) The data width of the card (2 or 4).
vmeLocalBaseAddr: (Input) The translated local (PCI) address of the card.
vmeBaseAddr: (Input) The VME address of the card.
addrModifier: (Input) The VME address modifier of the card.
hostIsNAI_SBC: (Input) Flag to indicate that the card is a NAI SBC.
brdPhysicalSlot: (Input) The physical slot number of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetCardVmeSize()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetCardVmeSize ( int32_t cardIndex,
uint32_t size )

Sets card VME size.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
size: (Input) The size of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetDateCode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetDateCode ( int32_t cardIndex,
uint32_t dateCode )

Sets the date code of the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
dateCode: (Input) The date code of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetDirectInterruptFnc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetDirectInterruptFnc ( int32_t cardIndex,
nai_dirint_fnc_t fnc )

Sets the function to call when changing which interface interrupts are directed to.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
fnc: (Input) The function to call to set the interrupt interface.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetFifoIOFnc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetFifoIOFnc ( int32_t cardIndex,
nai_readfifo_fnc_t readfifoFnc,
nai_writefifo_fnc_t writefifoFnc )

Sets the functions used by naibrd_ReadFifo32 and naibrd_WriteFifo32 to communicate with the board, overriding the default behavior.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
readfifoFnc: (Input) The function to call to read from a fifo from the board.
writefifoFnc: (Input) The function to call to write to a fifo on the board.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetHoldBoardResetReg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetHoldBoardResetReg ( int32_t cardIndex,
uint32_t holdBoardResetReg )

Sets the board hold reset register of the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
holdBoardResetReg: (Input) Hold Board Reset register.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_SetI2CInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetI2CInfo ( int32_t cardIndex,
int32_t unitNum,
uint32_t devAddr,
int32_t devType,
int32_t smbus )

Sets card I2C interface information details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
unitNum: (Input) The I2C unit number.
devAddr: (Input) The I2C device address.
devType: (Input) The I2C device type.
smbus: (Input) Set smbus > 0 for smbus mode. Set smbus = 0 for regular I2C.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetIOFnc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetIOFnc ( int32_t cardIndex,
nai_read_fnc_t readFnc,
nai_write_fnc_t writeFnc,
nai_writemask_fnc_t writeMaskFnc,
nai_maskreg_fnc_t maskRegFnc,
nai_writeackmask_fnc_t writeAckMaskFnc,
void * param,
nai_ioflags_t flags )

Sets the functions used by naibrd_Read32 and naibrd_Write32 to communicate with the board, overriding the default behavior, and changes the way I/O is performed.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
readFnc: (Input) The function to call to read from the board.
writeFnc: (Input) The function to call to write to the board.
writeMaskFnc: (Input) The function to call to perform a write mask operation on the board.
maskRegFnc: (Input) The function to call to perform a maskReg operation on the board.
writeAckMaskFnc: (Input) The function to call to perform an acknowledge write mask operation on the board.
param: (Input) The parameter to pass to the preceding functions.
flags: (Input) A set of flags to alter the I/O behavior. Currently only NAIBRD_IOFLAGS_NO_DEFAULT_INTF is supported, which disables default open and interrupt handling functionality.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetMBExecInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetMBExecInfo ( int32_t cardIndex,
uint32_t version )

◆ naibrd_SetMBExecVersion()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetMBExecVersion ( int32_t cardIndex)

Sets MB Exec (Ethernet Listener Application) Revision Information in the nai_card_t structure. Available only on Gen 5 products. Revision information is two 32-bit values (rev_major and rev_minor) where the each 32-bit value is formatted as follows: rev_major: 0x002C0003 (44, 3) rev_minor: 0x00000000 represents MB Exec Revision: 3.44.0.0. Data is set in nai_card_t mbexec_rev array as follows: mbexec_rev[0]=3, mbexec_rev[1]=44, mbexec_rev[2]=0, mbexec_rev[3]=0.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITEnable ( int32_t cardIndex,
int32_t module,
nai_bit_type_t type,
bool_t bitEnable )

Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

Note
For the following modules, call the Module BIT Enable function in the modules respective c file, instead of this one.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
type: (Input) The BIT type to enable/disable.
bitEnable: (Input) BIT Enable (0 = disable, 1 = enable).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_IO_PARAM when invalid type parameter is specified.

◆ naibrd_SetModuleBITEnableRaw()

nai_status_t NAIAPI naibrd_SetModuleBITEnableRaw ( int32_t cardIndex,
int32_t module,
uint32_t bitEnable )

Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

Note
For the following modules, call the Module BIT Enable function in the modules respective c file, instead of this one.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
bitEnable: (Input) Bit-mapped enable. D0 or D3.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_IO_PARAM when invalid type parameter is specified.

◆ naibrd_SetModuleBITErrorThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITErrorThreshold ( int32_t cardIndex,
int32_t module,
uint32_t bitErrorThreshold )

Sets the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
bitErrorThreshold: (Input) BIT Error Threshold to set (Default Value = 5u, Max Value = 0xFFFFu).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetModuleBITInterruptEdgeLevel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptEdgeLevel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t edgeLevel )

Sets the BIT Interrupt Edge/Level register value for the specified module channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
edgeLevel: (Input) Bitmask of the trigger Mode of interrupts (0 = EDGE, 1 = LEVEL).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_SetModuleBITInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t intEnable )

Sets the BIT Interrupt Enable register value for the specified module channel. Setting the bits to 1 enables the interrupt. Status is reported in the BIT Interrupt Status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
intEnable: (Input) Enabled (1) and/or disabled (0).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.

◆ naibrd_SetModuleBITInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_int_steering_t steering )

Sets the BIT Interrupt Steering which indicates the interrupt direction for the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
steering: (Input) Interrupt Steering: refer to naibrd_int_steering_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetModuleBITInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleBITInterruptVector ( int32_t cardIndex,
int32_t module,
uint32_t vector )

Sets the BIT interrupt vector for the specified module.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
vector: (Input) Interrupt vector.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetModuleCapabilities()

nai_status_t NAIAPI naibrd_SetModuleCapabilities ( int32_t cardIndex,
uint32_t module,
uint32_t capabilityVal,
uint32_t modFeatureOverride )

Sets NAIBRD card structure to show if module is block and pack capable.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) module number.
capabilityVal: (Input) Data packing options.
modFeatureOverride: (Input) override HW feature when feature is not available.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetModuleCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleCount ( int32_t cardIndex,
int32_t moduleCount )

Sets the number of modules a card has.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
moduleCount: (Input) The number of modules the board has.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_VALUE when moduleCount is less than 0 or greater than NAI_MAX_MODULES.

◆ naibrd_SetModuleInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleInfo ( int32_t cardIndex,
int32_t module,
uint32_t modid,
uint32_t modver,
uint32_t modrev,
uint32_t modspecial )

Sets module info details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
modid: (Input) The ID of the module.
modver: (Input) The version of the module.
modrev: (Input) The revision of the module.
modspecial: (Input) The special code of the module.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetModuleLinkSupport()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleLinkSupport ( int32_t cardIndex,
uint32_t mbFPGARev )

Sets NAIBRD card structure to see if motherboard supports module link status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
mbFPGARev: (Input) Motherboard FPGA revision.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetModuleOffset()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleOffset ( int32_t cardIndex,
int32_t module,
uint32_t offset )

Sets the offset of a module on the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
offset: (Input) The offset of that module from the start of the board.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetModulePartInfo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModulePartInfo ( int32_t cardIndex,
int32_t module,
uint32_t modPartID )

Decodes and sets module part info parameters based on raw part info read. readings.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
modPartID: (Input) Module Part ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetModuleRev()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleRev ( int32_t cardIndex,
int32_t module,
uint32_t modprocrev,
uint32_t modfpgarev )

Sets module proc and FPGA revision info details.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
modprocrev: (Input) The revision of the processor code.
modfpgarev: (Input) The revision of the FPGA code.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetModuleSyncMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncMode ( int32_t cardIndex,
int32_t module,
uint32_t syncAddress,
naibrd_module_sync_config_type_t syncConfigType,
naibrd_module_sync_mode_type_t syncMode,
int32_t syncConfigModule )

◆ naibrd_SetModuleSyncSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncSource ( int32_t cardIndex,
int32_t syncModNum,
int32_t sourceModNum )

◆ naibrd_SetModuleSyncTriggerSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetModuleSyncTriggerSource ( int32_t cardIndex,
int32_t module,
int32_t triggerModNum )

◆ naibrd_SetModuleTempExCapability()

NAIBRDFUNC nai_status_t naibrd_SetModuleTempExCapability ( int32_t cardIndex,
int32_t module,
uint32_t modCoreTemp,
uint32_t modIntfPCBTemp,
uint32_t modFuncPCBTemp )

Sets module extended temperature capability based on non zero readings returned from extended temperature readings.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
modCoreTemp: (Input) Temperature reading of module core.
modIntfPCBTemp: (Input) Temperature reading of module interface PCB.
modFuncPCBTemp: (Input) Temperature reading of module function PCB.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetOffBoardCfg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetOffBoardCfg ( int32_t cardIndex,
uint32_t offBdCfgIdx,
uint32_t offBdCfgData )

Sets the off-board configuration from the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
offBdCfgIdx: (Input) The off-board configuration index.
offBdCfgData: (Input) The off-board configuration data detected by the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetPartNo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPartNo ( int32_t cardIndex,
uint32_t pn )

Sets the part number of the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
pn: (Input) The part number of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetPCIDevID()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPCIDevID ( int32_t cardIndex,
uint16_t devid )

Sets the expected PCI device ID when connecting over PCI. If the expected PCI device ID doesn't match the actual one, the open will fail.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
devid: (Input) The expected device ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetPCIInterruptConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetPCIInterruptConfig ( int32_t cardIndex,
uint32_t statusaddr,
uint32_t clearaddr,
uint32_t clearval )

Configures interrupt handling behavior as a PCI slave card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
statusaddr: (Input) The address of the card's interrupt status register.
clearaddr: (Input) The address of the card's clear status register.
clearval: (Input) The value to write to the card's clear status register to clear the status.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetSendAndReceive1553Fnc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSendAndReceive1553Fnc ( int32_t cardIndex,
nai_1553bm_sendandreceive_fnc_t sendAndReceive1553Fnc )

Sets the functions used by naibrd_1553BM_SendAndReceive to communicate with the board, overriding the default behavior.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
sendAndReceive1553Fnc: (Input) The function to override naibrd_1553BM_SendAndReceive board.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetSerdesAddress()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerdesAddress ( int32_t cardIndex,
int32_t module,
uint32_t address )

Specifies the base address to communicate with the Module when communicating over the SERDES bus.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) The module number (1 - NAI_MAX_MODULES).
address: (Input) The SERDES start address of the module.
Returns
  • NAI_SUCCESS

◆ naibrd_SetSerdesRev()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerdesRev ( int32_t cardIndex,
uint32_t module,
uint32_t serdesrev )

Sets the module's SerDes Rev in the cards structure and determines the Series (D or E).

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) module number.
serdesrev: (Input) SerDes Rev.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetSerialNo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSerialNo ( int32_t cardIndex,
uint32_t sn )

Sets the serial number of the card.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
sn: (Input) The serial number of the card.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.

◆ naibrd_SetSoftResetReg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetSoftResetReg ( int32_t cardIndex,
uint32_t softresetReg )

Sets the soft reset register of the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
softresetReg: (Input) Soft Reset register offset.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_SetVMEInterruptLevelAddr()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetVMEInterruptLevelAddr ( int32_t cardIndex,
uint32_t intlvladdr )

Sets the VME interrupt level register address.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intlvladdr: (Input) The address of the interrupt level register.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SetWatchdogReg()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetWatchdogReg ( int32_t cardIndex,
uint32_t watchdogReg )

Sets the watchdog timer register of the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
watchdogReg: (Input) Watchdog Timer register offset.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported or the interrupt level address is invalid.

◆ naibrd_ValidateOnboardRead32()

NAIBRDFUNC nai_status_t naibrd_ValidateOnboardRead32 ( int32_t cardIndex,
int32_t module,
uint32_t regwidth,
uint32_t datawidth,
uint32_t read32Data )

◆ naibrd_ValidatePCIRead32()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ValidatePCIRead32 ( int32_t cardIndex,
int32_t module,
uint32_t regwidth,
uint32_t datawidth,
uint32_t read32Data )

Variable Documentation

◆ NAIBRD_INTERNAL_VERSION

const uint32_t NAIBRD_INTERNAL_VERSION = 0

◆ NAIBRD_VERSION

const double NAIBRD_VERSION = 1.62