Справочник Пользователя для National Instruments NI-VXI

Скачать
Страница из 149
Chapter 3      Software Overview
NI-VXI User Manual
3-26
© National Instruments Corporation
  Low-Level VXI/VMEbus Access Functions
This section describes the use of the low-level VXI/VMEbus access
functions. You can use both low-level and high-level VXI/VMEbus
access functions to directly read or write to VXI/VMEbus addresses.
Some of the situations that require direct reads and writes to the
different VXI/VMEbus address spaces include the following:
• 
Register-based device/instrument drivers
• 
Non-VXI device/instrument drivers
• 
Accessing device-dependent registers on any type of VXI/VME
device
• 
Implementing shared memory protocols
Low-level and high-level access to the VXI/VMEbus, as the NI-VXI
interface defines them, are very similar in nature. Both sets of functions
can perform direct reads of and writes to any VXI/VMEbus address
space with any privilege state or byte order. However, the two
interfaces have different emphases with respect to user protection, error
checking, and access speed.
Low-level VXI/VMEbus access is the fastest access method (in terms
of overall throughput to the device) for directly reading or writing
to/from any of the VXI/VMEbus address spaces with random memory
accesses. Under many platforms, the high-level operation 
VXImove
provides the fastest access in terms of block moves. As such, however,
it is more detailed and leaves more issues for the application to resolve.
You can use these functions to obtain pointers that are directly mapped
to a particular VXI/VMEbus address with a particular VXI/VME
access privilege and byte ordering. You need to consider a number of
issues when using the direct pointers:
• 
You need to determine bounds for the pointers.
• 
Based on the methods in which a particular hardware platform sets
up access to VXI/VME address spaces, using more than one pointer
can result in conflicts.
• 
Your application must check error conditions such as Bus Error
(BERR*) separately.