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

Скачать
Страница из 149
Chapter 3      Software Overview
© National Instruments Corporation
3-23
NI-VXI User Manual
  High-Level VXI/VMEbus Access Functions
You can use both low-level and high-level VXI/VMEbus access
functions to read or write to VXI/VMEbus addresses. These are
required in many situations, including the following:
• 
Register-based device/instrument drivers
• 
Non-VXI/VME 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. 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. For example, your application must check error
conditions such as Bus Error (BERR*) separately when using low-level
accesses.
High-level VXI/VMEbus access functions need not take into account
any of the considerations that are required by the low-level VXIbus
access functions. The high-level VXI/VMEbus access functions have
all necessary information for accessing a particular VXI/VMEbus
address wholly contained within the function parameters. The
parameters prescribe the address space, privilege state, byte order, and
offset within the address space. High-level VXI/VMEbus access
functions automatically trap bus errors and return an appropriate error
status. Using the high-level VXI/VMEbus access functions involves
more overhead, but if overall throughput of a particular access (for
example, configuration or small number of accesses) is not the primary
concern, the high-level VXI/VMEbus access functions act as an
easy-to-use interface for VXI/VMEbus accesses.
  Programming Considerations
All accesses to the VXI/VMEbus address spaces performed by use of
the high-level VXI/VMEbus access functions are fully protected. The
hardware interface settings (context) for the applicable window are
saved on entry to the function and restored upon exit. No other
functions in the NI-VXI interface, including the low-level
VXI/VMEbus access functions, will conflict with the high-level