Instructions on how to get started with PCIe code development.¶
Content in the second section below starting "A Nevis PCIe board" is out of date with respect to the uboonedaq machine installation. It is still useful background reading. However on the uboonedaq-xyz-NM machines we package the windriver driver code into a shared library which itself lives in a ups product. So, the "skeletal code" referred to below is mostly captured in that library. We do not stamp it out with any frequency. Also, our Jungo license is now paid for. There's no need to reload the driver frequently. We've bought a 3 (5?) seat license. We've never told Jungo who sits at those seats. Names one would perhaps naturally assign are Georgia, Gennadiy, Eric, Wes, Chi. Jungo has never asked, yet.
If you truly want to delve into using the code which calls the electronics setup and readout, explore the uboonedaq projects/hwUtils directory. For example: Recipe_XMITReadout.cpp. You'll see many calls to the functions which themselves use the driver code. It is pretty nicely self-documenting.
Below is kept for posterity.
A Nevis PCIe board has been installed in the uboonedaq01 machine at FNAL. You can use the PCIe driver software which was installed on the machine to play with the card/develop code for it as needed.
Driver software can be generated using WinDriver on uboonedaq01.fnal.gov, in /home/uboonedaq/
(grab the version corresponding to PCI User's Manual for Linux)
Follow the instructions starting on p. 35 of the manual to generate the basic driver code which allows communication with the PCIe on that particular machine. Details: run DriverWizard, select New host driver project, select the PCIe (Altera) on the device list that pops up, and skip to Step 6 in the manual to generate the skeletal driver code. (Code generation options: Linux Makefile, click OK and OK again.)
Or, use existing skeletal code, with base name "pcie". Details: Some PCIe skeletal code has already been generated and can be found in /home/uboonedaq/WinDriver/wizard/projects/. In the projects directory, you'll find a pcie_files.txt file which explains what each generated file does. pcie_diag.c is a standard diagnostics skeletal code that was generated and later mutated to add in options for loop back and speed tests (use option 8 when you run it). See comments/explanations within the pcie_diag.c code to see what each option does.
To run the code, become root (ksu) after logging in to uboonedaq-evb.fnal.gov as uboonedaq, cd to the /home/uboonedaq/WinDriver/wizard/projects directory, and do ./linux/pcie
If you make any changes to the code, make sure to compile it first before running. You do that by typing make in the projects/linux directory.
Note: Because the WinDriver software license is relatively expensive and has to be renewed every year, we're using WinDriver in evaluation mode, which means every 2 hrs or so we need to reload the driver. One can do that in the /home/uboonedaq/WinDriver directory, using the reloadg executable (./reloadg). (Eventually we'll have to buy the license but at the moment we don't need to.)
Contact Georgia Karagiorgi email@example.com if you have any questions.