Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr2rf-vme
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
wr2rf-vme
Commits
ffc59c3b
Commit
ffc59c3b
authored
Apr 12, 2021
by
John Gill
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6fe3ecb0
56f3776b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
18 deletions
+49
-18
wr2rf.c
software/libwr2rf/wr2rf.c
+22
-0
ftw2freq.sh
software/scripts/ftw2freq.sh
+11
-0
sps_inj_sim.sh
software/scripts/sps_inj_sim.sh
+16
-18
No files found.
software/libwr2rf/wr2rf.c
View file @
ffc59c3b
...
...
@@ -2326,6 +2326,27 @@ usage:
printf
(
"usage: %s gpio1|gpio2 [0 | 1]
\n
"
,
argv
[
0
]);
}
static
void
lemo_ext_sel
(
struct
libwr2rf_dev
*
dev
,
int
argc
,
char
**
argv
)
{
unsigned
addr
=
WR2RF_VME_REGS_INIT
+
WR2RF_INIT_REGS_LEMO_EXT
;
unsigned
lemo
;
if
(
argc
!=
1
&&
argc
!=
2
)
goto
usage
;
lemo
=
strtoul
(
argv
[
1
],
NULL
,
0
)
&
0x3f
;
libwr2rf_write16
(
dev
,
addr
,
lemo
);
lemo
=
libwr2rf_read16
(
dev
,
addr
);
printf
(
"lemo_ext: 0x%02x
\n
"
,
lemo
);
return
;
usage:
printf
(
"usage: %s [sel]
\n
"
,
argv
[
0
]);
}
static
void
lemo_start_sel
(
struct
libwr2rf_dev
*
dev
,
int
argc
,
char
**
argv
)
{
...
...
@@ -3459,6 +3480,7 @@ static struct cmds cmds[] =
{
"lemo-start-sel"
,
lemo_start_sel
,
"configure lemo input to trigger unit start"
},
{
"lemo-stop-sel"
,
lemo_stop_sel
,
"configure lemo input to trigger unit stop"
},
{
"lemo-gpio"
,
lemo_gpio
,
"configure lemo gpio output signals"
},
{
"lemo-ext-sel"
,
lemo_ext_sel
,
"configure lemo extended pulse mode on output"
},
{
"ext-ref"
,
ext_ref
,
"set or read ext_ref (pps+10Mhz) direction"
},
{
"rf-diag"
,
rf_diag
,
"rf diagnostics"
},
{
"vtu"
,
vtu
,
"trigger unit"
},
...
...
software/scripts/ftw2freq.sh
0 → 100644
View file @
ffc59c3b
#!/bin/bash
ftw_hex
=
`
echo
$1
|
tr
a-f A-F
`
freq_wrclk
=
125000000
ftw
=
`
echo
"ibase=16;
$ftw_hex
"
| bc
-q
`
echo
"ftw=
$ftw
"
prod
=
`
echo
"
$ftw
*
$freq_wrclk
"
| bc
-q
`
echo
"prod=
$prod
"
fout
=
`
echo
"
$prod
/(2^48)"
| bc
-q
`
echo
"Fout=
$fout
"
software/scripts/sps_inj_sim.sh
View file @
ffc59c3b
...
...
@@ -5,38 +5,36 @@
#are specific to cfv-774-celma4 card configuration and should be adapted...
# slot 2 is TX, slots 4 RX
./wr2rf
-s
4 set-rfout 1 mix
./wr2rf
-s
4 set-rfout 2 mix
ftw_SFTPRO2_hex
=
0016b0bbb3c4
echo
"FTW SFT protons:
$ftw_SFTPRO2_hex
"
freq_SFTPRO2
=
43278.463683
freq_wrclk
=
125000000
prod
=
`
echo
"
$freq_SFTPRO2
*(2^48)"
| bc
-q
`
ftw_h1
=
`
echo
"
$prod
/(
$freq_wrclk
)"
| bc
-q
`
ftw_SFTPRO2_hex
=
`
echo
"obase=16;ibase=10;
$ftw_h1
"
| bc
-q
`
ftw_LHCPILOT_hex
=
0016b9f306de
echo
"FTW LHC protons:
$ftw_LHCPILOT_hex
"
freq_LHCPILOT
=
43347.158955
freq_wrclk
=
125000000
prod
=
`
echo
"
$freq_LHCPILOT
*(2^48)"
| bc
-q
`
ftw_h1
=
`
echo
"
$prod
/(
$freq_wrclk
)"
| bc
-q
`
ftw_LHCPILOT_hex
=
`
echo
"obase=16;ibase=10;
$ftw_h1
"
| bc
-q
`
ftw_SFTION1_hex
=
00168b5cbff4
echo
"FTW SFT ion :
$ftw_SFTION1_hex
"
###############################################################
# reset the RX wr2rf trigger unit
usleep 1000
sh vtu_setup.sh 4
# Prepare the dds 300 ms before we expect to need stable RF
usleep 1000
./wr2rf
-s
2 ftw-send1 0x
$ftw_SFTPRO2_hex
reset
usleep 1000
###############################################################
# reset the RX wr2rf trigger unit
usleep 1000
sh vtu_setup.sh 4
# Prepare the dds 300 ms before we expect to need stable RF
usleep 1000
./wr2rf
-s
2 ftw-send1 0x
$ftw_LHCPILOT_hex
reset
###############################################################
# reset the RX wr2rf trigger unit
usleep 1000
sh vtu_setup.sh 4
# Prepare the dds 300 ms before we expect to need stable RF
usleep 1000
./wr2rf
-s
2 ftw-send1 0x
$ftw_SFTION1_hex
reset
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