PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Device drivers for my own cPCI card.

Hi,

I have developed a cPCI card and I have to write drivers for it in
labview. I do not have much experience in labview and would appreciate
if someone can give me some pointers, as to where to start.

Thank you,

Sandeep

0 Kudos
Message 1 of 6
(3,547 Views)
Sandeep,

What you are asking (how to write a driver) is not trivial. Most of the LabVIEW instrument drivers I have seen are wrappers that call a dll. The dll is typically written in C/C++.

Can you tell me about the architecture of your card? I assume you are using an off-the-shelf PCI interface ASIC with some logic behind it.

Collin
0 Kudos
Message 2 of 6
(3,542 Views)
Hi Collin,

Yes I am using Quicklogic chips, which already have the PCI/cPCI interface build inside it. The customer wants the drivers to be written in Labview. The only relevant document I could find on NI's website is " Using the VISA Driver Development Wizard and NI-VISA to register-Level Program a PXI/PCI Device under Windows ". I will appreciate if you can point out any  other documents or source code for reference.

Thank you,

Sincerely,

Sandeep
0 Kudos
Message 3 of 6
(3,523 Views)
Sandeep,

The document you referenced does provide a lot on useful information to get started. Have you gone through the VISA Driver Development Wizard?

You will need to implement the actual functionality of your card. VISA provides functions to access the BARs that will be programmed by the BIOS. The register set of your hardware will be accessed through these BARs. Since VISA provides most of the enumeration and access functions for you there isn't a document that describes how to write the application-specific part of the driver.

Do you have a defined register set for the hardware behind the QuickLogic PCI interface? Can you describe the function of your card?

Collin

0 Kudos
Message 4 of 6
(3,515 Views)
Hi Collin,

I am just using the BAR 0 address space for my applications. I begin by writing a reset signal at offset 0 ( zero). then I write 32 bit data at offset 0x4000, as my backend is mapped from address space 0x00004000 to 0x0000FFFF. The data values are stored in an asychronous FIFO, whcih is then consumed by the backend logic. Similarly I push data into the FIFO while reading back and POP it whenever the user needs the data values.

This is a relatively simple description of what I am trying to do.

I also need to distinguish between two cards having the same vendor ID and device ID. I have already posted this on the message board, and some suggestions were to put some kind of identifier in an EEPROM on board, which can be read. Does VISA distinguish between two boards with the same device ID and vendor ID, by thier slot numbers, when it makes the I/O resource name i:e PXI ::13 :: INSTR.

Thank you

Sandeep
0 Kudos
Message 5 of 6
(3,493 Views)
>>Does VISA distinguish between two boards with the same device ID and vendor ID, by thier slot numbers, when it makes the I/O resource name i:e PXI ::13 :: INSTR.

Yes, VISA will distinguish between cards having the same vendor/device ID. The VISA resource name will be formed from the PCI bus, device, and function numbers of the card.
0 Kudos
Message 6 of 6
(3,480 Views)