Example - National Instruments 6527 Series Programmer's Manual

Register-level
Hide thumbs Also See for 6527 Series:
Table of Contents

Advertisement

Instruments vendor ID (0x1093) and one of the following device IDs: PCI-6527 (0x2B20) or
PXI-6527 (0x2B10).
If a device is found, the algorithm can store the configuration information of the device into
a data structure. Base Address Register 0 (BAR0) points to the base address of the PCI MITE,
while Base Address Register 1 (BAR1) points to the base address of the device registers. The
size of each of these windows is 4 KB.
Both addresses are most likely mapped above 1 MB in the memory map. This means that in
order to communicate with the device you must know how to perform memory cycles to
extended memory.
Tip
To make communication with the device simpler, re-map the device below 1 MB in
the memory map using PCI BIOS read and write calls.

Example

This pseudocode example re-maps the device below 1 MB. If you choose not to re-map the
device, you can skip the first CWrite instruction, but you still need to perform the next and
last instructions to initialize the device. All values in this example are 32 bits.
Use the following pseudocode to re-map the PCI MITE to memory address 0xD0000 and the
device to memory address 0xD1000:
CWrite(0x10,0x000D0000)
Write(0xD0340,0x0000AEAE)
CWrite(0x14,0x000D1000)
Write(0xD00C0,0x000D1080)
© National Instruments Corporation
//Write the address to which you want to re-map the PCI
MITE to PCI configuration space offset 0x10 (BAR0).
//Write the value 0x0000AEAE to offset 0x340 from the
new PCI MITE address.
//Write the address to which you want to re-map the
device (other than the PCI MITE) to PCI configuration
space offset 0x14 (BAR1).
//Create the window data value by masking the new
device address:window data value = ((0xFFFFFF00
AND new device address) OR (0x00000080)).
//If you are not re-mapping the device, then the new
device address is the value in BAR1.
//Write the window data value to offset 0xC0 from the
new PCI MITE address. If you are not re-mapping the
device, then the new PCI MITE address is the value in
BAR0.
3-3
Chapter 3
6527 Register-Level Programmer Manual
Programming

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pci-6527Pxi-6527

Table of Contents