... | @@ -35,53 +35,40 @@ one that has being tested during the development. |
... | @@ -35,53 +35,40 @@ one that has being tested during the development. |
|
To download the sources, you should execute the following
|
|
To download the sources, you should execute the following
|
|
command:
|
|
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
|
|
## Compile
|
|
|
|
|
|
To compile the sources using the submodule dependencies, you should
|
|
To compile the sources using the submodule dependencies, you should
|
|
execute the following commands:
|
|
execute the following commands:
|
|
|
|
|
|
$ cd <path-to-fmc-tdc-sw>
|
|
cd <path-to-fmc-tdc-sw>
|
|
$ make
|
|
make
|
|
|
|
|
|
If you want to compile the software against other versions of ZIO or
|
|
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
|
|
FMC-BUS, you can use the environment variables like in the following
|
|
example:
|
|
example:
|
|
|
|
|
|
$ cd <path-to-fmc-tdc-sw>
|
|
cd <path-to-fmc-tdc-sw>
|
|
$ ZIO=<path-to-zio> FMC_BUS=<path-to-fmc> make
|
|
ZIO=<path-to-zio> FMC_BUS=<path-to-fmc> make
|
|
|
|
|
|
## Loading the drivers
|
|
## Loading the drivers
|
|
|
|
|
|
To load the drivers, we should load the dependencies first:
|
|
To load the drivers, we should load the dependencies first:
|
|
|
|
|
|
# insmod <path_zio>/zio.ko
|
|
sudo insmod <path_zio>/zio.ko
|
|
# insmod <path_fmc-bus>/kernel/fmc.ko
|
|
sudo insmod <path_fmc-bus>/kernel/fmc.ko
|
|
# insmod <path_spec-sw>/kernel/spec.ko
|
|
sudo insmod <path_spec-sw>/kernel/spec.ko
|
|
|
|
|
|
Once the dependencies are loaded, we load the drivers:
|
|
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
|
|
The spec-tdc.ko driver has several parameters, you can discover them
|
|
executing:
|
|
executing:
|
|
|
|
|
|
modinfo ./spec-tdc.ko.
|
|
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
|
|
## Libtdc, an user-space library
|
|
|
|
|
|
### Introduction
|
|
### Introduction
|
... | @@ -117,19 +104,19 @@ of the program under SSH. |
... | @@ -117,19 +104,19 @@ of the program under SSH. |
|
First of all, before execute it, you should compile the shared object
|
|
First of all, before execute it, you should compile the shared object
|
|
library:
|
|
library:
|
|
|
|
|
|
$ cd <path_fmc-tdc-sw>/lib
|
|
cd <path_fmc-tdc-sw>/lib
|
|
$ make libtdc.so
|
|
make libtdc.so
|
|
|
|
|
|
### How to use it
|
|
### How to use it
|
|
|
|
|
|
To execute it:
|
|
To execute it:
|
|
|
|
|
|
$ cd <path_fmc-tdc-sw>/test
|
|
cd <path_fmc-tdc-sw>/test
|
|
$ sudo ./test-fmctdc.py
|
|
sudo ./test-fmctdc.py
|
|
|
|
|
|
If you want the help, you can execute:
|
|
If you want the help, you can execute:
|
|
|
|
|
|
$ ./test-fmctdc.py -h
|
|
./test-fmctdc.py -h
|
|
|
|
|
|
-----
|
|
-----
|
|
|
|
|
... | | ... | |