... | ... | @@ -35,53 +35,40 @@ one that has being tested during the development. |
|
|
To download the sources, you should execute the following
|
|
|
command:
|
|
|
|
|
|
$ git clone git:https://www.ohwr.org/fmc-projects/fmc-tdc/fmc-tdc-sw.git
|
|
|
git clone git:https://www.ohwr.org/fmc-projects/fmc-tdc/fmc-tdc-sw.git
|
|
|
|
|
|
## Compile
|
|
|
|
|
|
To compile the sources using the submodule dependencies, you should
|
|
|
execute the following commands:
|
|
|
|
|
|
$ cd <path-to-fmc-tdc-sw>
|
|
|
$ make
|
|
|
cd <path-to-fmc-tdc-sw>
|
|
|
make
|
|
|
|
|
|
If you want to compile the software against other versions of ZIO or
|
|
|
FMC-BUS, you can use the environment variables like in the following
|
|
|
example:
|
|
|
|
|
|
$ cd <path-to-fmc-tdc-sw>
|
|
|
$ ZIO=<path-to-zio> FMC_BUS=<path-to-fmc> make
|
|
|
cd <path-to-fmc-tdc-sw>
|
|
|
ZIO=<path-to-zio> FMC_BUS=<path-to-fmc> make
|
|
|
|
|
|
## Loading the drivers
|
|
|
|
|
|
To load the drivers, we should load the dependencies first:
|
|
|
|
|
|
# insmod <path_zio>/zio.ko
|
|
|
# insmod <path_fmc-bus>/kernel/fmc.ko
|
|
|
# insmod <path_spec-sw>/kernel/spec.ko
|
|
|
sudo insmod <path_zio>/zio.ko
|
|
|
sudo insmod <path_fmc-bus>/kernel/fmc.ko
|
|
|
sudo insmod <path_spec-sw>/kernel/spec.ko
|
|
|
|
|
|
Once the dependencies are loaded, we load the drivers:
|
|
|
|
|
|
# insmod <path_fmc-tdc-sw>/drivers/spec-tdc.ko <parameters>
|
|
|
sudo insmod <path_fmc-tdc-sw>/drivers/spec-tdc.ko <parameters>
|
|
|
|
|
|
The spec-tdc.ko driver has several parameters, you can discover them
|
|
|
executing:
|
|
|
|
|
|
modinfo ./spec-tdc.ko.
|
|
|
|
|
|
- lun: Logical unit number.
|
|
|
- bus: PCI bus number where the SPEC+TDC is plugged on.
|
|
|
- slot: PCI slot where the SPEC+TDC is plugged on.
|
|
|
|
|
|
To know which are the bus and slot numbers, one can use the command
|
|
|
*lspci*:
|
|
|
|
|
|
$ lspci
|
|
|
[...]
|
|
|
00:04.0 Non-VGA unclassified device: CERN/ECP/EDU Device 018d (rev 03)
|
|
|
|
|
|
In the previous output, the parameters will be: bus=0 slot=4.
|
|
|
|
|
|
## Libtdc, an user-space library
|
|
|
|
|
|
### Introduction
|
... | ... | @@ -117,19 +104,19 @@ of the program under SSH. |
|
|
First of all, before execute it, you should compile the shared object
|
|
|
library:
|
|
|
|
|
|
$ cd <path_fmc-tdc-sw>/lib
|
|
|
$ make libtdc.so
|
|
|
cd <path_fmc-tdc-sw>/lib
|
|
|
make libtdc.so
|
|
|
|
|
|
### How to use it
|
|
|
|
|
|
To execute it:
|
|
|
|
|
|
$ cd <path_fmc-tdc-sw>/test
|
|
|
$ sudo ./test-fmctdc.py
|
|
|
cd <path_fmc-tdc-sw>/test
|
|
|
sudo ./test-fmctdc.py
|
|
|
|
|
|
If you want the help, you can execute:
|
|
|
|
|
|
$ ./test-fmctdc.py -h
|
|
|
./test-fmctdc.py -h
|
|
|
|
|
|
-----
|
|
|
|
... | ... | |