AN-6130PCIe
HOLT INTEGRATED CIRCUITS
16
PLX API’s
PLX API’s use a unique input parameter (BAR) to specify which LB memory space to read and write from.
BAR stands for Base Address Register. BAR 0 and BAR 1 are reserved for the upstream PCIe. BAR 2 and
BAR 3 are used to provide separate memory spaces on the LB side. Bar 2 uses Space 0 and BAR 3 uses
Space 1. The Space 0 and Space 1 PEX8311 registers are loaded with the desired starting BAR addresses
at power up from the contents of the U6 EEPROM. Space 0 is reserved exclusively for the HI-6130 64KB
memory space and is set to starting address 0x2000-0000. Space 1 is shared and modified on-the-fly in
the API function calls to read/write to the output latches and reading the input status buffers. The
latches are used to set the state of various inputs to the HI-6130 and the inputs are used to read HI-6130
status and DIP switches. The Holt demo code includes several functions to read and write to the HI-6130
memory space, latches and input status buffers. The API functions are located in HI6130.c. These
functions use a PLX API to access the LB with either “PlxPci_PciBarSpaceRead(…)” or
“PlxPci_PciBarSpaceWrite(…). One of the input parameters to these API’s is “bOffsetAsLocalAddr” this
parameter controls how the API uses the U32 offset address. If “OffsetAsLocalAddr” is FALSE the input
address is an offset address from the Space x value. If this parameter is TRUE the input address is the full
address. See the PLX API user’s manual for descriptions and usage of the API’s, BAR spaces and other
input parameters associated with the PEX8311 and SDK API’s.
Device
BAR
Space
Address
Notes
HI-6130
2
0
0x2000-0000
32K word range
Output Latches
3
1
0x2400-0000
First location used
Inputs
3
1
0x2800-0000
First location used
Output Latches-2
3
1
0x2C00-0000
First location used
The U6 EEPROM contains configuration data the PEX8311 uses to configure the LB at power up. The LB
is configured for a 16-bit data bus, 14 wait states, Space0 and Space1 starting addresses/ranges, and
disables the TA/Ready input. The PCI PLX sub-ID 3566 is also programmed into this EEPROM. This sub-ID
is assigned by PLX exclusively for the Holt demo board.
The PlxMon utility is launched from the Windows start menu or by double-clicking on the application
found in the /Plx/…/Bin folder. The PlxMon utility opening screen is shown below: