Group Selection Page HELP DOC Controls Group Data Analysis Group ITDM WP76 DET Vacuum XRO EEE WP78 WP74 FXE SCS SPB MID HED SQS SXP Sample Environment Photon Commissioning Team Operation PSPO XO TS
General electronics MicroTCA EEE Electronics Lab EEE Rack Room
  MicroTCA Logbook  Not logged in ELOG logo
Message ID: 168     Entry time: 29 Jan 2015, 07:34
Author: Patrick Gessler 
Type: Infos 
Category: Software 
Subject: Information about DESY LLRF generic PCIe drivers 

 The driver is in the MTCA4U software repository under
https://svnsrv.desy.de/public/mtca4u/drivers/

It consists of two parts: The gpcieuni base driver and the pcieuni
driver. You first have to install the gpcieuni driver, otherwise the
pcieuni driver will not compile. The latest tags are
https://svnsrv.desy.de/public/mtca4u/drivers/gpcieuni/tags/0.1.1/
https://svnsrv.desy.de/public/mtca4u/drivers/pcieuni/tags/0.1.2/

Installation:
In addition to the kernel headers and the compiler you need the dkms
(dynamic kernel module support) package installed. It comes with you
distribution.

After downloading the driver just run
$ sudo make install
, first for gpcieuni and then for pcieuni.
(no need to do 'make' first because the installation is running dkms,
which does the compilation into the current kernel for you)

The driver is registering to the XILINX vendor ID 10EE and PCI Device ID
99 (and also 37, 38 and 39 which are used for DESY LLRF).

You can manually register the driver to you device, for example an
Altera FPGA (vendor id 1172) with Device ID 2407 (run as root)
# echo 1172 2407 > /sys/bus/usb/drivers/pcieuni/new_id

(IDs are in hex, you have to do this after each reboot or
loading/unloading of the driver).

You can now access the device using MTCA4U, for instance QtHardMon or
the command line tools, or from C++.

Attention: DMA transfer will probably not work because it uses the
simple implementation used at DESY. Especially the DMA of the stock
firmware for the Struck SIS8300 does not work with this driver.
But all registers of the whole PCIexpress address space is accessible
(except for bar 2, which is reserved for DMA in the DESY implementation
and intentionally not exposed to the user).

There is a driver for the SIS8300 stock firmware from the upciedev
(which is the original familiy the pciuni was forked from). But this
branch is still buggy and insecure by design and can kill your Linux kernel.

ELOG V3.1.4-7c3fd00