... | ... | @@ -15,6 +15,8 @@ the FMC-ADC Production Test Suite (PTS), you should instead use |
|
|
[this](https://www.ohwr.org/project/fmc-adc-100m14b4cha-tst/wikis/systemsetup)
|
|
|
guide.*
|
|
|
|
|
|
These instructions have been tested and are known to work with [Ubuntu Linux 19.04](http://releases.ubuntu.com/19.04/ubuntu-19.04-desktop-amd64.iso).
|
|
|
|
|
|
### Clone the software repository
|
|
|
|
|
|
$ git clone https://ohwr.org/project/fmc-adc-100m14b4cha-sw.git
|
... | ... | @@ -22,9 +24,14 @@ guide.* |
|
|
|
|
|
### Build all the software stack
|
|
|
|
|
|
Change dir into the freshly cloned repository, and just type 'make':
|
|
|
Change dir into the freshly cloned repository, and check out the latest stable release:
|
|
|
|
|
|
$ cd fmc-adc-100m14b4cha-sw
|
|
|
$ git checkout fmc-adc-100m-4.1.1
|
|
|
|
|
|
After that, just type 'make', but exclude building of the White Rabbit NIC (it does not work with recent Linux kernels and it is not required at all by the FMC-ADC software):
|
|
|
|
|
|
$ make
|
|
|
$ CONFIG_WR_NIC=n make
|
|
|
|
|
|
This will build the FMC ADC drivers, libraries and test programs. In the
|
|
|
process, the build will automagically resolve the dependent submodules
|
... | ... | @@ -39,8 +46,7 @@ terminated successfully. |
|
|
After success, you should see in the /lib/modules/<kernel-version>/extra
|
|
|
directory of the target machine some new stuff like shown below:
|
|
|
|
|
|
pcbe13089:fmc-adc-100m14b4cha-sw$ ls -l
|
|
|
/lib/modules/3.16.0-4-amd64/extra/
|
|
|
$ ls -l /lib/modules/`uname -r`/extra/
|
|
|
total 8608
|
|
|
drwxr-xr-x 2 root root 4096 Aug 3 09:44 buffers
|
|
|
drwxr-xr-x 2 root root 4096 Aug 3 09:44 drivers
|
... | ... | @@ -64,12 +70,14 @@ command: |
|
|
|
|
|
We are about to load the Linux device drivers for your FMC ADC. There is
|
|
|
one more pre-requisite before doing so. Appropriate firmware binaries
|
|
|
must be made accessible to initialise your hardware. Download the files
|
|
|
from the URLs below in the prescribed
|
|
|
places:
|
|
|
must be made accessible to initialise your hardware:
|
|
|
|
|
|
/lib/firmware/fmc/spec-fmc-adc-100m14b.bin https://www.ohwr.org/project/fmc-adc-100m14b4cha-sw/uploads/72545736ae289aba2df7c8b47432956c/spec-fmc-adc-v4.1.bin
|
|
|
/lib/firmware/fmc/spec-init.bin https://www.ohwr.org/project/spec-sw/uploads/636e7eaa2e1c3a884e2f9f694fdfd1b9/spec-init.bin-2015-09-18
|
|
|
$ sudo mkdir -p /lib/firmware/fmc
|
|
|
$ cd /lib/firmware/fmc
|
|
|
$ sudo wget https://www.ohwr.org/project/fmc-adc-100m14b4cha-sw/uploads/72545736ae289aba2df7c8b47432956c/spec-fmc-adc-v4.1.bin
|
|
|
$ sudo ln -s spec-fmc-adc-v4.1.bin spec-fmc-adc-100m14b.bin
|
|
|
$ sudo wget https://www.ohwr.org/project/spec-sw/uploads/636e7eaa2e1c3a884e2f9f694fdfd1b9/spec-init.bin-2015-09-18
|
|
|
$ sudo ln -s spec-init.bin-2015-09-18 spec-init.bin
|
|
|
|
|
|
### Load the kernel modules
|
|
|
|
... | ... | @@ -84,7 +92,7 @@ SPEC boards. |
|
|
If this step is successful, your kernel module list should display at
|
|
|
least the following:
|
|
|
|
|
|
pcbe13089:fmc-adc-100m14b4cha-sw$ lsmod
|
|
|
$ lsmod
|
|
|
Module Size Used by
|
|
|
[...other modules...]
|
|
|
spec 22358 0
|
... | ... | @@ -97,12 +105,11 @@ If you got to this point, congratulations\! Your kernel device drivers |
|
|
are ready to go, and the installed boards should be recognized by them.
|
|
|
Look into the directory /dev/zio to see your device nodes in full glory:
|
|
|
|
|
|
cfc-774-caos3:~$ ls -l /dev/zio/adc-100m14b-0400-0-i-*
|
|
|
$ ls -l /dev/zio
|
|
|
crw-rw---- 1 root root 247, 8 May 18 11:41 /dev/zio/adc-100m14b-0400-0-i-ctrl
|
|
|
crw-rw---- 1 root root 247, 9 May 18 11:41 /dev/zio/adc-100m14b-0400-0-i-data
|
|
|
|
|
|
A -ctrl device should be seen for each FMC ADC in the
|
|
|
system.
|
|
|
Do note the hexadecimal number after the "adc-100m14b" in the example above, you will need this when doing an acquisition later.
|
|
|
|
|
|
### Finally, do an acquisition
|
|
|
|
... | ... | @@ -112,3 +119,9 @@ fald-simple-acq, which will allow you to acquire samples from your ADC. |
|
|
Instructions in the manual are sufficient to get you started, so we will
|
|
|
not duplicate them here.
|
|
|
|
|
|
As a quick example, to perform an acquisition of 20 samples with an internal threshold of 0V on channel 1, do the following:
|
|
|
|
|
|
$ cd fmc-adc-100m14b4cha-sw/libtools
|
|
|
$ sudo ./fald-acq -b 10 -a 10 -n 1 -t 0 -c 1 0x400
|
|
|
|
|
|
(The 0x400 comes from /dev/zio as seen in the example before). |