|
static void | naibrd_ClearCardInfo (int32_t cardIndex) |
|
static nai_status_t | naibrd_AvailableFifoSpace (int32_t cardIndex, int32_t module, uint32_t address, int32_t reqCount, int32_t fifoSize, int32_t timeout) |
|
static nai_intf_t | naibrd_comm2Intf (naibrd_comm_t comm) |
|
static nai_status_t | naibrd_verify_card (int32_t cardIndex) |
|
static nai_status_t | naibrd_verify_card_module (int32_t cardIndex, int32_t module) |
|
static nai_status_t | naibrd_verify_moduleMeasType (naibrd_module_meas_type_t type) |
|
static nai_status_t | naibrd_verify_moduleMeasRawType (naibrd_module_meas_raw_type_t type) |
|
static nai_status_t | naibrd_verify_tvc_moduleSensorType (naibrd_tvc_module_sensor_type_t type) |
|
static nai_status_t | naibrd_verify_tvc_moduleReadingType (naibrd_tvc_module_reading_type_t type) |
|
static nai_status_t | naibrd_verify_tvc_moduleThresholdType (naibrd_tvc_module_threshold_type_t type) |
|
NAIBRDFUNC void NAIAPI | naibrd_Init (void) |
| Initializes all internal structures used in all the libraries in the naibrd Software Support Kit (SSK). This routine should be called once prior to invoking any other APIs in the naibrd library.
|
|
NAIBRDFUNC int32_t NAIAPI | naibrd_GetMaxCards (void) |
| Retrieves the maximum number of NAI cards allowed for the naibrd library.
|
|
NAIBRDFUNC int32_t NAIAPI | naibrd_GetMaxModules (void) |
| Retrieves the maximum number of modules per NAI card allow for the naibrd library.
|
|
NAIBRDFUNC int32_t NAIAPI | naibrd_GetPCIList (int32_t lane, int32_t listLen, int32_t *p_outbus, int32_t *p_outdev, int32_t *p_outfunc, uint16_t *p_outdevid, naibsp_vaddr_t *p_outbaseaddr) |
| Retrieves the PCI enumeration information for the PCI boards detected by the NAI controller board.
|
|
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, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetBusDev (int32_t cardIndex, int32_t *p_outlane, int32_t *p_outbus, int32_t *p_outdev, int32_t *p_outfunc) |
| Retrieves the lane, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetOffbrdLane (int32_t cardIndex, int32_t *p_outlane) |
| Retrieves the off-board lane to use. The off-board lane that is used is processor dependent.
|
|
NAIBRDFUNC const char *NAIAPI | naibrd_GetDeviceName (uint16_t id) |
| 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_SetIPAddress (int32_t cardIndex, const char *p_ipAddress, const char *p_port) |
| Sets the Ethernet IP address for the card.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetMaster (int32_t cardIndex, int32_t masterCardIndex) |
| Specifies another card as the card's master, sending all Ethernet I/O operations though the master card.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetMasterInfo (int32_t cardIndex, int32_t *p_outmasterCardIndex, nai_comm_t *p_outcomm) |
| Retrieves info about a potential master card. If the card (specified by cardIndex) is a slave card, p_outmasterCardIndex and p_outcomm will return info about the master card. If the card (specified by cardIndex) is not a slave, it will return info about itself.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AdjTargetAddr (int32_t masterCardIdx, int32_t slaveCardIdx, uint32_t *p_inoutaddress) |
| Adjusts the slaves address for a master/slave ethernet/PCI configuration. If masterCardIdx equals slaveCardIdx, then there is no no master/slave configuration and we return the address in p_inoutaddress unmodified. If the two indexes differ, than we fetch and add the correct offset to the address from the off-board configuration.
|
|
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_SetAddress (int32_t cardIndex, uint32_t address) |
| Sets the address to communicate with the card using another card as a master.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetVMEInfo (int32_t cardIndex, int32_t slot, uint32_t addrMod) |
| Sets the slot and address modifier to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_VME.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetVMEInfo (int32_t cardIndex, int32_t *p_outSlot, uint32_t *p_outAddrMod) |
| Retrieves the slot and address modifier to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_VME.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetVMEInfoEx (int32_t cardIndex, int32_t slot, bool_t geoEnable, uint32_t addrMod, uint32_t address, uint32_t size, int32_t intLevel) |
| Sets a VME card's configuration to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_VME.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetVMEInfoEx (int32_t cardIndex, int32_t *p_outslot, bool_t *p_outgeoEnable, uint32_t *p_outaddrMod, uint32_t *p_outaddress, uint32_t *p_outsize, int32_t *p_outintLevel) |
| Retrieve's a VME card's configuration info.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_OpenDevice (int32_t cardIndex, naibrd_comm_t comm, const char *p_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_IsBoardReady (int32_t cardIndex) |
| Indication whether the board and modules are ready to be accessed.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetSerialNo (int32_t cardIndex, uint32_t *p_outserialNo) |
| Retrieves the serial number of the card.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetBoardGen (int32_t cardIndex, uint32_t *p_outboardGen) |
| Retrieves the board generation.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleCount (int32_t cardIndex, int32_t *p_outmoduleCount) |
| Retrieves the maximum number of modules that is available for the board.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleName (int32_t cardIndex, int32_t module, uint32_t *p_outmodulename) |
| Retrieves the module name or ID.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleOffset (int32_t cardIndex, int32_t module, uint32_t *p_outoffset) |
| Retrieves the offset address for the module.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleSize (int32_t cardIndex, int32_t module, uint32_t *p_outsize) |
| Retrieves the size (in bytes) of the module.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleCapabilities (int32_t cardIndex, int32_t module, uint32_t *outCapabilityVal) |
| Retrieves NAIBRD card structure to check if module is block and pack capable.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleFPGARev (int32_t cardIndex, int32_t module, float64_t *p_outfpgaRevMajorMinor) |
| Retrieves the module's FPGA revision, in terms of a floating point major/minor.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GenModuleRev (int32_t cardIndex, int32_t module, float64_t *p_outprocRevMajorMinor, float64_t *p_outfpgaRevMajorMinor, int32_t *p_outintfHwRev, int32_t *p_outfuncHwRev, uint32_t *p_outintfSpecialCode, uint32_t *p_outfuncSpecialCode) |
| Retrieves the module's revision information. The processor and FPGA revision is specified in terms of a major and minor revision.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GenModuleRevRaw (int32_t cardIndex, int32_t module, uint32_t *p_outprocRawRev, uint32_t *p_outfpgaRawRev, int32_t *p_outintfHwRev, int32_t *p_outfuncHwRev, uint32_t *p_outintfSpecialCode, uint32_t *p_outfuncSpecialCode) |
| Retrieves the module's revision information. The processor and FPGA revision is specified in terms of the raw value read from the revision register.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleRevGen2_3 (int32_t cardIndex, int32_t module, uint32_t *p_outversion, uint32_t *p_outrevision, uint32_t *p_outprocRev, uint32_t *p_outfpgaRev, uint32_t *p_outspecialCode) |
| Retrieves the module's revision information for Gen 2 and Gen 3 products.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetFloatingPointModeCapability (int32_t cardIndex, int32_t module, bool_t *p_outfloatingPointModeCapable) |
| Retrieves the module's capability for 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_SetFloatingPointModeEnable (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 blocks until the HW conversion is complete. When changing modes, the HW will convert all of the register's data that is affected by the change. Once all of the data has been converted, the HW will indicate its completion via the FLOATING_POINT_STATE register (NAI_GEN5_REG_FP_STATE_ADD).
|
|
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 (register), it does not indicate the locally shadowed 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_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_CONVERSION_BUSY 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. Use this function in conjunction with the naibrd_SetFloatingPointModeEnable_NonBlocking function to determine if all module's register data is in the correct data format.
|
|
nai_status_t NAIAPI | naibrd_GetRunningInFloatingPointMode (int32_t cardIndex, int32_t module, bool_t *p_outfloatingPointEnabled) |
| Retrieves the locally shadowed state of the floating point mode register. This API is meant to be used in custom applications. It will yeild a better performance over naibrd_GetFloatingPointModeEnable() since it does not read the FloatingPointModeEnable register directly (will be slower over ethernet). It refers to the locally shadowed state which is set on Open(), naibrd_SetFloatingPointModeEnable(), and naibrd_SetFloatingPointModeEnable_NonBlocking().
|
|
nai_status_t NAIAPI | naibrd_verify_module (int32_t cardIndex, int32_t module) |
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetMotherboardTemperature (int32_t cardIndex, naibrd_motherboard_temp_type_t mbTempType, float64_t *p_outmbTemp) |
| Retrieves a motherboard's temperature in degrees Celsius. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleTemperature (int32_t cardIndex, int32_t module, naibrd_module_temp_type_t moduleTempType, float64_t *p_outmoduleTemp) |
| Retrieves a module's temperature in degrees Celsius. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable) |
| Enables/disables status reporting for the specified channel.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable) |
| Retrieves the enabled/disabled state of status reporting for the specified channel.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_GetModuleMeasurement (int32_t cardIndex, int32_t module, naibrd_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, naibrd_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_TVC_GetModuleSensorStatus (int32_t cardIndex, int32_t module, uint32_t *p_outStatus) |
| Retrieves the Temperature, Voltage, and Current (TVC) status value of the specific module. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_TVC_GetModuleSensorThresholdStatus (int32_t cardIndex, int32_t module, naibrd_tvc_module_sensor_type_t sensorType, uint32_t *p_outStatus) |
| Retrieves the Temperature, Voltage, and Current (TVC) threshold status value of the specific sensor type and module. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_TVC_GetModuleSensorReading (int32_t cardIndex, int32_t module, naibrd_tvc_module_sensor_type_t sensorType, naibrd_tvc_module_reading_type_t readingType, float64_t *p_outreadingValue) |
| Retrieves the Temperature, Voltage, and Current (TVC) sensor measurement value of the specific sensor type and module. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_TVC_SetModuleSensorThreshold (int32_t cardIndex, int32_t module, naibrd_tvc_module_sensor_type_t sensorType, naibrd_tvc_module_threshold_type_t thresholdType, float64_t thresholdValue) |
| Sets the Temperature, Voltage, and Current (TVC) sensor threshold of spcific sensor type, threshold type and module location. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_TVC_GetModuleSensorThreshold (int32_t cardIndex, int32_t module, naibrd_tvc_module_sensor_type_t sensorType, naibrd_tvc_module_threshold_type_t thresholdType, float64_t *p_outthresholdValue) |
| Retrieves the Temperature, Voltage, and Current (TVC) sensor threshold value of spcific sensor type, threshold type and module location. This feature is only available on the Xilinx Generation 5 platforms.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_ConnectISR (int32_t cardIndex, nai_isr_t isr) |
| Handles associating the Interrupt Service Routine for PCI and Ethernet communication.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DisconnectISR (int32_t cardIndex) |
| Handles removing the interrupt associations (Interrupt Service Routine or Interrupt Driven Ethernet Messages).
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_ReadReg32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t *p_outdata) |
| Reads a 32-bit value from the register specified.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_WriteReg32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t data) |
| Writes a 32-bit value to register specified.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_Read32 (int32_t cardIndex, int32_t module, uint32_t offset, int32_t stride, int32_t count, uint32_t dataWidth, void *p_outdata) |
| Reads 32-bit values from the registers specified.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_Write32 (int32_t cardIndex, int32_t module, uint32_t offset, int32_t stride, int32_t count, uint32_t dataWidth, const void *p_data) |
| Writes the 32-bit values to the registers specified.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_WriteRegMask32 (int32_t cardIndex, int32_t module, uint32_t offset, uint32_t mask, uint32_t data) |
| Writes a 32-bit value to the register specified, 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_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 timeout_msec) |
| 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 timeout_msec 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 timeout_msec 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_ReadFifo32 (int32_t cardIndex, int32_t module, uint32_t dataOffset, uint32_t countOffset, int32_t count, int32_t *p_outcountRemaining, int32_t timeout_msec, uint32_t dataWidth, void *p_outdata, int32_t *p_outcountRead) |
| Reads the request amount of data from the FIFO. If 'timeout_msec' 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_msec' 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, int32_t count, int32_t fifoSize, int32_t timeout_msec, uint32_t dataWidth, const void *p_data, int32_t *p_outcountWrite) |
| Writes the requested amount of data to the FIFO. If 'timeout_msec' is set to NAIBRD_FIFO_TIMEOUT_NONE, the amount of space available on the FIFO will be compared to the 'count'. If there is enough space, the data will be written to the FIFO, otherwise a NAI_ERROR_TIMEOUT is returned indicating that there is not enough space in the FIFO for the data. Otherwise the 'timeout_msec' specifies the maximum amount of time in milliseconds to wait until the FIFO has enough space for the data. If it times out, no data is written.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_ReadReg16 (int32_t cardIndex, int32_t module, uint32_t offset, uint16_t *p_outdata) |
| Reads a 16-bit value from the register specified.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_Read16 (int32_t cardIndex, int32_t module, uint32_t offset, int32_t stride, int32_t count, uint32_t dataWidth, void *p_outdata) |
| Reads 16-bit values from the registers specified.
|
|
NAIBRDFUNC const char *NAIAPI | naibrd_GetStatusString (nai_status_t status) |
| Returns the ASCII text string associated with the status code passed in.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_msDelay (int32_t delay_ms) |
| Sleeps for the specified number of millisecond. Note, this process does relinquish control to the OS during the sleep.
|
|
NAIBRDFUNC nai_status_t NAIAPI | naibrd_usWait (unsigned long wait_us) |
| Waits the specified number of microseconds. Note, this is a "blocking" sleep - process is not relinquish control to the OS during the wait.
|
|
NAIBRDFUNC float64_t NAIAPI | naibrd_GetLibVersion (void) |
|