Also available in WinDriver is a PLX Diagnostics application similar to PLX's PLXMon. The Diagnostics application source code is available in the WinDriver package.
PLX Diagnostics is a ready-to-run sample diagnostics application for PLX 9030/9050/9052/9054/9080 and iop480 chip sets. The diagnostics program accesses the hardware via WinDriver’s PLX API. The diagnostics program is written as a console mode application (and not as a GUI application) in order to simplify your understanding of the source code. (This will help to learn how to use WinDriver's PLX API efficiently.)
Use this application as a starting point to build your device driver. If your driver is not a console mode application, you may remove the printf() calls from the code and replace them with MessageBox().
Besides being an example of using the PLX API, the diagnostics utility is also a useful utility for any PLX chip based device - which offers engineers unrestricted read/write access to all PCI registers, PCI devices and PCI buses. It also supports all PLX chip registers, host and local memory and port I/O.
The PLX Diagnostics utility accesses the hardware using WinDriver. Therefore WinDriver must be installed before it is able to run.
Once WinDriver is installed, you may run the diagnostics utility by clicking 'Start / Programs / WinDriver / Samples /PLX xyz Diagnostics (here xyz stands for the chip sets number, for example 9050).
The utility will first try to locate the card, with the default VendorID and DeviceID assigned by PLX (VendorID = 0x10b5, DeviceID = 0x9050 / 0x9080). If such a card is found, a message "PLX card found" will appear. If you have programmed your EEPROM to load a different VendorID/DeviceID, then at the main menu you will have to choose your card (option 'Locate/Choose PLX board in main menu).
Main Menu Options:
Scan PCI bus:
Displays all the cards present on the PCI bus and their resources.
(IO ranges, Memory ranges, Interrupts, VendorID/DeviceID). This
information may be used to choose the card you need to access.
Locate/Choose PLX board:
Chooses the active card that the diagnostics application will use.
You are asked to enter the VendorID/DeviceID of the card you want to
access. In case there are several cards with the same
VendorID/DeviceID, you will be asked to choose one of them.
PCI configuration registers:
This option is available only after choosing an active card. A list
of the PCI configuration registers and their READ value are
displayed. These are general registers, common to all PCI cards. In
order to WRITE to a register, enter its number, and then the value to
write to it.
PLX 9050/9060/9080 local registers:
This option is available only after choosing an active card. A list
of the chips registers and their READ value are displayed. In order
to WRITE to a register, enter the register number, and then enter the
value to write to it.
Access memory ranges on the board:
This option is available only after choosing an active card. Use
this option carefully. Accessing memory ranges, accesses the local
bus on your card -- If you access an invalid local address, or if you
have any problem with your card (such as a problem with the IRDY
signal), the CPU may hang.
- To access a local region, first toggle active mode between BYTE/WORD/DWORD, to fit the hardware you are accessing.
- The PLX9050 has four memory ranges to access a local region. There is no difference between them, therefore you need not change the active memory range.
- To READ from a local address, choose 'Read from board. You will be asked for local address to read from.
- To WRITE from a local address, choose 'Write from board. You will be asked for local address to write to, and the data to write.
For both board READ and WRITE, the address you give will also be used to set the base address register. LASxBA register is set with the base address, and LASxBRD register is set with the mode (BYTE/WORD/DWORD as chosen as active mode).