Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC TDC 1ns 5cha - Testing
Commits
c72cf5ac
Commit
c72cf5ac
authored
Sep 23, 2014
by
Evangelia Gousiou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last modifications before delivery to Jans tech
parent
6cdce109
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
21 deletions
+104
-21
fmctdc1ns5cha.sh
fmctdc1ns5cha.sh
+9
-9
fmctdc1ns5cha_calib.sh
fmctdc1ns5cha_calib.sh
+1
-1
fmctdc1ns5cha_funct.sh
fmctdc1ns5cha_funct.sh
+83
-0
example.zip
logs/log_fmctdc1ns5cha_calib/example.zip
+0
-0
zip_run_18599ec_20140923.163146.859149_FmcTdc1ns5cha_calib_prototype27.zip
...0140923.163146.859149_FmcTdc1ns5cha_calib_prototype27.zip
+0
-0
zip_run_71d6b69_20140923.162633.943999_FmcTdc1ns5cha_funct_prototype27.zip
...0140923.162633.943999_FmcTdc1ns5cha_funct_prototype27.zip
+0
-0
wrabbit_calib.py
test/fmctdc1ns5cha/calibration/python/wrabbit_calib.py
+10
-10
wrabbit_write_eeprom.py
.../fmctdc1ns5cha/calibration/python/wrabbit_write_eeprom.py
+1
-1
tdc.bin
test/fmctdc1ns5cha/functionality/firmwares/tdc.bin
+0
-0
No files found.
fmctdc1ns5cha.sh
View file @
c72cf5ac
...
@@ -14,11 +14,12 @@ sudo ./usbtmc_load
...
@@ -14,11 +14,12 @@ sudo ./usbtmc_load
cd
..
cd
..
cd
~/fmc-tdc-1ns-5cha-tst/pts
cd
~/fmc-tdc-1ns-5cha-tst/pts
LOGDIR_CALIB
=
./logs/calib
LOGDIR
=
../logs/log_fmctdc1ns5cha
mkdir
-p
$LOGDIR_CALIB
sudo rm
-fr
$LOGDIR_CALIB
/fmc-tdc-1ns-5cha-tst
*
mkdir
-p
$LOGDIR
LOGDIR_FUNC
=
./logs/func
sudo rm
-fr
$LOGDIR
/fmc-tdc-1ns-5cha-tst
*
mkdir
-p
$LOGDIR_FUNC
sudo rm
-fr
$LOGDIR_FUNC
/fmc-tdc-1ns-5cha-tst
*
serial
=
$1
serial
=
$1
if
[
x
$1
=
x
""
]
;
then
if
[
x
$1
=
x
""
]
;
then
...
@@ -59,15 +60,14 @@ do
...
@@ -59,15 +60,14 @@ do
echo
"--- Functionality tests ---"
echo
"--- Functionality tests ---"
sudo
./pts.py
-b
FmcTdc1ns5cha_funct
-s
$serial
-e
$extra_serial
-t
../test/fmctdc1ns5cha/functionality/python
-l
$LOGDIR
00
#
01 02 03 04 05 06 07 08 09 10 11 12
sudo
./pts.py
-b
FmcTdc1ns5cha_funct
-s
$serial
-e
$extra_serial
-t
../test/fmctdc1ns5cha/functionality/python
-l
$LOGDIR
_FUNC
00
01 02 03 04 05 06 07 08 09 10 11 12
echo
-n
"Do you wish to continue with the calibration tests [y,n]? "
echo
-n
"Do you wish to continue with the calibration tests [y,n]? "
read
reply
read
reply
if
[
"
$reply
"
=
"y"
]
if
[
"
$reply
"
=
"y"
]
then
then
echo
"--- Calibration tests ---
\n
"
echo
"--- Calibration tests ---
\n
"
LOGDIR
=
../logs/log_fmctdc1ns5cha_calib
sudo
./pts.py
-b
FmcTdc1ns5cha_calib
-s
$serial
-e
$extra_serial
-t
../test/fmctdc1ns5cha/calibration/python
-l
$LOGDIR_CALIB
13 14 15 16 17 18
sudo
./pts.py
-b
FmcTdc1ns5cha_calib
-s
$serial
-e
$extra_serial
-t
../test/fmctdc1ns5cha/calibration/python
-l
$LOGDIR
16 17 18
#13 14 15 16 17 18
fi
fi
if
[
"
$nb_test
"
!=
"
$nb_test_limit
"
]
if
[
"
$nb_test
"
!=
"
$nb_test_limit
"
]
...
@@ -89,5 +89,5 @@ echo -n "End of the test, do you want to switch the computer OFF? [y,n]"
...
@@ -89,5 +89,5 @@ echo -n "End of the test, do you want to switch the computer OFF? [y,n]"
read
reply
read
reply
if
[
"
$reply
"
=
"y"
]
if
[
"
$reply
"
=
"y"
]
then
then
sudo
halt
sudo
poweroff
fi
fi
fmctdc1ns5cha_calib.sh
View file @
c72cf5ac
...
@@ -14,7 +14,7 @@ cd ..
...
@@ -14,7 +14,7 @@ cd ..
cd
~/fmc-tdc-1ns-5cha-tst/pts
cd
~/fmc-tdc-1ns-5cha-tst/pts
LOGDIR
=
.
./logs/log_fmctdc1ns5cha_
calib
LOGDIR
=
.
/logs/
calib
mkdir
-p
$LOGDIR
mkdir
-p
$LOGDIR
sudo rm
-fr
$LOGDIR
/fmc-tdc-1ns-5cha-tst
*
sudo rm
-fr
$LOGDIR
/fmc-tdc-1ns-5cha-tst
*
...
...
fmctdc1ns5cha_funct.sh
0 → 100755
View file @
c72cf5ac
#!/bin/sh
# Copyright CERN, 2011
# Author: Matthieu Cattin <matthieu.cattin@cern.ch>
# Licence: GPL v2 or later.
# Website: http://www.ohwr.org
sudo
rmmod cp210x
cd
~/fmc-tdc-1ns-5cha-tst/pts
sudo
insmod ./cp210x-driver/cp210x.ko
cd
usbdriver
sudo
./usbtmc_load
cd
..
cd
~/fmc-tdc-1ns-5cha-tst/pts
LOGDIR
=
./logs/func
mkdir
-p
$LOGDIR
sudo rm
-fr
$LOGDIR
/fmc-tdc-1ns-5cha-tst
*
serial
=
$1
if
[
x
$1
=
x
""
]
;
then
echo
-n
"Please scan CERN serial number bar-code, then press [ENTER]: "
read
serial
fi
if
[
x
$serial
=
x
""
]
;
then
serial
=
0000
fi
if
[
-e
serial.txt
]
;
then
sudo rm
-f
serial.txt
fi
echo
$serial
>>
serial.txt
extra_serial
=
$2
if
[
x
$2
=
x
""
]
;
then
echo
-n
"If needed input extra serial number and press [ENTER] OR just press [ENTER]: "
read
extra_serial
fi
if
[
x
$extra_serial
=
x
""
]
;
then
extra_serial
=
0000
fi
echo
" "
nb_test_limit
=
2
nb_test
=
1
while
[
"
$nb_test
"
-le
"
$nb_test_limit
"
]
do
echo
"--------------------------------------------------------------"
echo
"Test series run
$nb_test
out of
$nb_test_limit
"
echo
" "
echo
"--- Functionality tests ---"
sudo
./pts.py
-b
FmcTdc1ns5cha_funct
-s
$serial
-e
$extra_serial
-t
../test/fmctdc1ns5cha/functionality/python
-l
$LOGDIR
00 01 02 03 04 05 06 07 08 09 10 11 12
if
[
"
$nb_test
"
!=
"
$nb_test_limit
"
]
then
echo
" "
echo
-n
"Do you want to run the test series again [y,n]? "
read
reply
if
[
"
$reply
"
!=
"y"
]
then
break
fi
fi
nb_test
=
$((
$nb_test
+
1
))
done
echo
"--------------------------------------------------------------"
echo
" "
echo
-n
"End of the test, do you want to switch the computer OFF? [y,n]"
read
reply
if
[
"
$reply
"
=
"y"
]
then
sudo
poweroff
fi
logs/log_fmctdc1ns5cha_calib/example.zip
deleted
100644 → 0
View file @
6cdce109
File deleted
pts/logs/calib/zip_run_18599ec_20140923.163146.859149_FmcTdc1ns5cha_calib_prototype27.zip
0 → 100644
View file @
c72cf5ac
File added
logs/log_fmctdc1ns5cha/example
.zip
→
pts/logs/func/zip_run_71d6b69_20140923.162633.943999_FmcTdc1ns5cha_funct_prototype27
.zip
View file @
c72cf5ac
No preview for this file type
test/fmctdc1ns5cha/calibration/python/wrabbit_calib.py
View file @
c72cf5ac
...
@@ -15,27 +15,27 @@
...
@@ -15,27 +15,27 @@
## |
## |
## Description Calibration of the TDC Channel 1 with White Rabbit. |
## Description Calibration of the TDC Channel 1 with White Rabbit. |
## |
## |
## For the calibration, we plug a pre-calibrated
38
ns LEMO cable [1] to the TDC |
## For the calibration, we plug a pre-calibrated
2
ns LEMO cable [1] to the TDC |
## Channel 1; the other end of the cable is connected to the PPS output of the White |
## Channel 1; the other end of the cable is connected to the PPS output of the White |
## Rabbit
switch
. |
## Rabbit
master
. |
## We also connect a fiber (of any lenght) between the SFP connector of the SPEC |
## We also connect a fiber (of any lenght) between the SFP connector of the SPEC |
## carrier and any of the 18 ports of the White Rabbit
switch.
|
## carrier and any of the 18 ports of the White Rabbit
master (switch or node).
|
## |
## |
## With White Rabbit, through the exchange of Ethernet messages in the fiber, a |
## With White Rabbit, through the exchange of Ethernet messages in the fiber, a |
## common notion of time is established between the TDC and the White Rabbit
switch
. |
## common notion of time is established between the TDC and the White Rabbit
master
. |
## Therefore, the TAI pulse within the TDC core, that signals the arrival of a new |
## Therefore, the TAI pulse within the TDC core, that signals the arrival of a new |
## TAI second and the PPS pulse in the input of the TDC board, are in principle |
## TAI second and the PPS pulse in the input of the TDC board, are in principle |
## expected to arrive as the following drawing shows: |
## expected to arrive as the following drawing shows: |
## |
## |
## TAI : ____________|-|_____________________________________ |
## TAI : ____________|-|_____________________________________ |
## |
## |
## PPS at the
switch
: ____________|-|_____________________________________ |
## PPS at the
master
: ____________|-|_____________________________________ |
## |
## |
## PPS at TDC Channel 1 : _______________________________|-|__________________ |
## PPS at TDC Channel 1 : _______________________________|-|__________________ |
## <----------------> |
## <----------------> |
##
38
ns |
##
2
ns |
## |
## |
## However, to this
38
ns we need to add the delays from the Channel 1 LEMO connector |
## However, to this
2
ns we need to add the delays from the Channel 1 LEMO connector |
## to the input of the ACAM chip (track lengths and input buffer delay). |
## to the input of the ACAM chip (track lengths and input buffer delay). |
## This amount of delay differs slightly from board to board. |
## This amount of delay differs slightly from board to board. |
## There is also an offset added by the ACAM chip calculations, in the order of 293ns|
## There is also an offset added by the ACAM chip calculations, in the order of 293ns|
...
@@ -131,7 +131,7 @@ def main (default_directory='.'):
...
@@ -131,7 +131,7 @@ def main (default_directory='.'):
tmp_stdin
=
sys
.
stdin
;
tmp_stdin
=
sys
.
stdin
;
sys
.
stdin
=
sys
.
__stdin__
;
sys
.
stdin
=
sys
.
__stdin__
;
ask
=
raw_input
(
"--> Please connect
White Rabbit fiber and PPS
; press y/n when finished [y/n]: "
)
ask
=
raw_input
(
"--> Please connect
the DIO PPS to TDC Channel 1
; press y/n when finished [y/n]: "
)
ask
=
ask
.
upper
()
ask
=
ask
.
upper
()
if
(
ask
==
"N"
):
if
(
ask
==
"N"
):
msg
=
(
"Operator decided not to perform the White Rabbit calibration"
)
msg
=
(
"Operator decided not to perform the White Rabbit calibration"
)
...
@@ -159,7 +159,7 @@ def main (default_directory='.'):
...
@@ -159,7 +159,7 @@ def main (default_directory='.'):
# Bind SPEC object to FMC TDC card
# Bind SPEC object to FMC TDC card
print
"
\n
-------------------------------------------------------------------"
print
"
\n
-------------------------------------------------------------------"
print
"-----------------------------
TDC PTS
-----------------------------"
print
"-----------------------------
FMC TDC
-----------------------------"
print
"-------------------- White Rabbit Calibration ---------------------
\n
"
print
"-------------------- White Rabbit Calibration ---------------------
\n
"
print
(
"White Rabbit calibration of the TDC Channel 1.
\n
"
)
print
(
"White Rabbit calibration of the TDC Channel 1.
\n
"
)
...
@@ -324,7 +324,7 @@ def main (default_directory='.'):
...
@@ -324,7 +324,7 @@ def main (default_directory='.'):
print
"max :
%.2
f ps"
%
(
max
(
all_measurs_max
))
print
"max :
%.2
f ps"
%
(
max
(
all_measurs_max
))
print
"min :
%.2
f ps"
%
(
min
(
all_measurs_min
))
print
"min :
%.2
f ps"
%
(
min
(
all_measurs_min
))
print
"avg :
%.2
f ps"
%
(
sum
(
all_measurs_avg
,
0.0
)
/
len
(
all_measurs_avg
))
print
"avg :
%.2
f ps"
%
(
sum
(
all_measurs_avg
,
0.0
)
/
len
(
all_measurs_avg
))
wr_calib_value
=
(((
sum
(
all_measurs_avg
,
0.0
)
/
len
(
all_measurs_avg
))
-
38000
)
*
100
)
wr_calib_value
=
(((
sum
(
all_measurs_avg
,
0.0
)
/
len
(
all_measurs_avg
))
-
1200
)
*
100
)
# finally the 2 ns cable was measured 1.2
print
"
\n\n
Calibration value :
%.2
f ps"
%
(
wr_calib_value
/
100
)
print
"
\n\n
Calibration value :
%.2
f ps"
%
(
wr_calib_value
/
100
)
print
"Calibration hex value written in file:
%
s"
%
WRABBIT_CALIB_FILENAME
print
"Calibration hex value written in file:
%
s"
%
WRABBIT_CALIB_FILENAME
print
"[ "
,
print
"[ "
,
...
...
test/fmctdc1ns5cha/calibration/python/wrabbit_write_eeprom.py
View file @
c72cf5ac
...
@@ -118,7 +118,7 @@ def main (default_directory='.'):
...
@@ -118,7 +118,7 @@ def main (default_directory='.'):
# Bind SPEC object to FMC TDC card
# Bind SPEC object to FMC TDC card
print
"
\n
-------------------------------------------------------------------"
print
"
\n
-------------------------------------------------------------------"
print
"----------------------------- FMC TDC -----------------------------"
print
"----------------------------- FMC TDC -----------------------------"
print
"-----
TDC mezz EEPROM writ
ting with White Rabbit Calibration ------
\n
"
print
"-----
- TDC mezz EEPROM wri
ting with White Rabbit Calibration ------
\n
"
print
(
"Retrieval of the existing calibration values already inside the
\n
"
print
(
"Retrieval of the existing calibration values already inside the
\n
"
"TDC EEPROM, addition of the White Rabbit calibration value
\n
"
"TDC EEPROM, addition of the White Rabbit calibration value
\n
"
...
...
test/fmctdc1ns5cha/functionality/firmwares/tdc.bin
0 → 100644
View file @
c72cf5ac
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment