Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
euro-adc-65m-14b-40cha-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
eurocard
euro-adc-65m-14b-40cha
euro-adc-65m-14b-40cha-gw
Commits
2ac18b53
Commit
2ac18b53
authored
Jul 25, 2018
by
Dan Saunders
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates from BR2
parent
52e3bbb9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
22 deletions
+100
-22
align_sdr.py
projects/64ch/software/align_sdr.py
+3
-2
call_align_adc.py
projects/64ch/software/call_align_adc.py
+3
-5
check_sync.py
projects/64ch/software/check_sync.py
+14
-3
connections.xml
projects/64ch/software/connections.xml
+40
-0
link_rx_up.py
projects/64ch/software/link_rx_up.py
+10
-3
link_tx_up.py
projects/64ch/software/link_tx_up.py
+9
-3
setup.py
projects/64ch/software/setup.py
+10
-3
stat.py
projects/64ch/software/stat.py
+11
-3
No files found.
projects/64ch/software/align_sdr.py
View file @
2ac18b53
...
...
@@ -35,8 +35,9 @@ def spi_read(spi, addr):
invert
=
[
0x1d
,
0x1e
,
0x1f
,
0x20
,
0x21
,
0x22
,
0x23
,
0x24
,
0x25
]
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
manager
=
uhal
.
ConnectionManager
(
"file://connections.xml"
)
board
=
manager
.
getDevice
(
sys
.
argv
[
1
])
#manager = uhal.ConnectionManager("file://connections.xml")
#board = manager.getDevice(sys.argv[1])
board
=
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
sys
.
argv
[
1
])
+
":50001"
,
"file://addrtab/top.xml"
)
board
.
getClient
()
.
setTimeoutPeriod
(
10000
)
v
=
board
.
getNode
(
"csr.id"
)
.
read
()
...
...
projects/64ch/software/call_align_adc.py
View file @
2ac18b53
...
...
@@ -5,17 +5,16 @@ import pickle
sys
.
path
.
append
(
'/home/dsaunder/workspace/go_projects/src/bitbucket.org/solidexperiment/readout-software/scripts/'
)
import
detector_config_tools
ips
=
detector_config_tools
.
currentIPs
(
False
)
print
ips
'''
for ip in ips:
cmd = "python align_
adc
.py " + str(ip) + " output_" + str(ip) + ".tapslips"
cmd = "python align_
sdr
.py " + str(ip) + " output_" + str(ip) + ".tapslips"
print cmd
try:
os.system(cmd)
except:
sys.exit(0)
'''
# Dump into a db
db
=
dataset
.
connect
(
'mysql://DAQGopher:gogogadgetdatabase@localhost/solid_phase1_running'
)
...
...
@@ -24,7 +23,6 @@ if len(db['TapSlips']) != 0: configID = max(db['TapSlips']['configID'])['configI
print
'New config ID:'
,
configID
for
ip
in
ips
:
results
=
pickle
.
load
(
open
(
"alignment
s/"
+
str
(
ip
)
+
".dat
"
,
"rb"
)
)
results
=
pickle
.
load
(
open
(
"alignment
_31Jan/output_"
+
str
(
ip
)
+
".tapslips
"
,
"rb"
)
)
for
res
in
results
:
db
[
'TapSlips'
]
.
insert
({
'configID'
:
int
(
configID
),
'ip'
:
str
(
ip
),
'tap'
:
res
[
2
],
'slip'
:
res
[
1
],
'channel'
:
res
[
0
]})
projects/64ch/software/check_sync.py
View file @
2ac18b53
...
...
@@ -11,12 +11,14 @@ import detector_config_tools
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
ips
=
detector_config_tools
.
currentIPs
(
False
)
#ips = [
58
]
#ips = [
92, 50, 88, 100, 86, 69, 53, 75, 60, 82
]
#manager = uhal.ConnectionManager("file://connections.xml")
#hw = manager.getDevice(sys.argv[1])
while
True
:
print
'
\n
'
,
time
.
ctime
(),
sumSynced
=
0
sumErrs
=
0
for
ip
in
ips
:
hw
=
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
ip
)
+
":50001"
,
"file://addrtab/top.xml"
)
hw
.
getNode
(
"daq.timing.csr.ctrl.cap_ctr"
)
.
write
(
1
)
...
...
@@ -25,8 +27,17 @@ while True:
fh
=
hw
.
getNode
(
"daq.timing.csr.sctr_h"
)
.
read
();
fs
=
hw
.
getNode
(
"daq.timing.csr.sync_ctr"
)
.
read
();
#ft = hw.getNode("daq.timing.csr.trig_ctr").read();
#fe = hw.getNode("daq.timing.csr.stat.sync_err").read();
fe
=
hw
.
getNode
(
"daq.timing.csr.stat.sync_err"
)
.
read
();
stat
=
hw
.
getNode
(
"csr.stat"
)
.
read
()
froc
=
hw
.
getNode
(
"daq.roc.csr.stat"
)
.
read
()
f_nhop
=
hw
.
getNode
(
"daq.trig.hop_cfg"
)
.
read
()
hw
.
dispatch
()
print
hex
(
fs
),
hex
(
fh
),
hex
(
fs
),
'
\t
'
,
synced
=
int
(
fs
)
>
0
#print int(synced), hex(froc), hex(stat),' ',
print
int
(
synced
),
int
(
f_nhop
),
' '
,
sumSynced
+=
int
(
synced
)
sumErrs
+=
int
(
fe
)
print
'
\t
'
,
sumSynced
,
sumErrs
,
time
.
sleep
(
2
)
projects/64ch/software/connections.xml
View file @
2ac18b53
...
...
@@ -7,6 +7,8 @@
address_table=
"file://addrtab/top_sim.xml"
/>
<connection
id=
"BEK_8CH"
uri=
"ipbusudp-2.0://192.168.235.1:50001"
address_table=
"file://addrtab/top_sim.xml"
/>
<connection
id=
"BR2_92"
uri=
"ipbusudp-2.0://192.168.235.92:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_51"
uri=
"ipbusudp-2.0://192.168.235.51:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_52"
uri=
"ipbusudp-2.0://192.168.235.52:50001"
...
...
@@ -35,4 +37,42 @@
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_68"
uri=
"ipbusudp-2.0://192.168.235.68:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_50"
uri=
"ipbusudp-2.0://192.168.235.50:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_67"
uri=
"ipbusudp-2.0://192.168.235.67:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_77"
uri=
"ipbusudp-2.0://192.168.235.77:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_80"
uri=
"ipbusudp-2.0://192.168.235.80:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_99"
uri=
"ipbusudp-2.0://192.168.235.99:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_84"
uri=
"ipbusudp-2.0://192.168.235.84:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_78"
uri=
"ipbusudp-2.0://192.168.235.78:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_66"
uri=
"ipbusudp-2.0://192.168.235.66:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_65"
uri=
"ipbusudp-2.0://192.168.235.65:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_56"
uri=
"ipbusudp-2.0://192.168.235.56:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_55"
uri=
"ipbusudp-2.0://192.168.235.55:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_79"
uri=
"ipbusudp-2.0://192.168.235.79:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_88"
uri=
"ipbusudp-2.0://192.168.235.88:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_100"
uri=
"ipbusudp-2.0://192.168.235.100:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_86"
uri=
"ipbusudp-2.0://192.168.235.86:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_69"
uri=
"ipbusudp-2.0://192.168.235.69:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_75"
uri=
"ipbusudp-2.0://192.168.235.75:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_60"
uri=
"ipbusudp-2.0://192.168.235.60:50001"
address_table=
"file://addrtab/top.xml"
/>
<connection
id=
"BR2_82"
uri=
"ipbusudp-2.0://192.168.235.82:50001"
address_table=
"file://addrtab/top.xml"
/>
</connections>
projects/64ch/software/link_rx_up.py
View file @
2ac18b53
...
...
@@ -5,10 +5,17 @@ import time
import
sys
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
manager
=
uhal
.
ConnectionManager
(
"file://connections.xml"
)
hw_list
=
[]
for
a
in
sys
.
argv
[
1
:]:
hw_list
.
append
(
manager
.
getDevice
(
a
))
#manager = uhal.ConnectionManager("file://connections.xml")
#for a in sys.argv[1:]:
# hw_list.append(manager.getDevice(a))
sys
.
path
.
append
(
'/home/dsaunder/workspace/go_projects/src/bitbucket.org/solidexperiment/readout-software/scripts'
)
import
detector_config_tools
ips
=
detector_config_tools
.
currentIPs
(
False
)
for
ip
in
ips
:
hw_list
.
append
(
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
ip
)
+
":50001"
,
"file://addrtab/top.xml"
))
for
hw
in
hw_list
:
print
hw
.
id
()
...
...
projects/64ch/software/link_tx_up.py
View file @
2ac18b53
...
...
@@ -5,10 +5,16 @@ import time
import
sys
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
manager
=
uhal
.
ConnectionManager
(
"file://connections.xml"
)
hw_list
=
[]
for
a
in
sys
.
argv
[
1
:]:
hw_list
.
append
(
manager
.
getDevice
(
a
))
#manager = uhal.ConnectionManager("file://connections.xml")
#for a in sys.argv[1:]:
# hw_list.append(manager.getDevice(a))
sys
.
path
.
append
(
'/home/dsaunder/workspace/go_projects/src/bitbucket.org/solidexperiment/readout-software/scripts'
)
import
detector_config_tools
ips
=
detector_config_tools
.
currentIPs
(
False
)
for
ip
in
ips
:
hw_list
.
append
(
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
ip
)
+
":50001"
,
"file://addrtab/top.xml"
))
for
hw
in
hw_list
:
print
hw
.
id
()
...
...
projects/64ch/software/setup.py
View file @
2ac18b53
...
...
@@ -11,14 +11,19 @@ import detector_config_tools
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
ips
=
detector_config_tools
.
currentIPs
(
False
)
slaveReadoutBoards
=
False
slaveReadoutBoards
=
True
#ips = [92, 50, 88, 100, 86, 69, 53, 75, 60, 82] # Module Edgar.
ips
=
[
92
]
hw_list
=
[]
for
ip
in
ips
:
print
'Setting up readout board ip:'
,
ip
hw_list
.
append
(
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
ip
)
+
":50001"
,
"file://addrtab/top.xml"
))
ihw
=
-
1
for
hw
in
hw_list
:
ihw
+=
1
print
'IP:'
,
ips
[
ihw
]
hw
.
getNode
(
"csr.ctrl.soft_rst"
)
.
write
(
1
)
# Reset ipbus registers
hw
.
dispatch
()
...
...
@@ -34,8 +39,10 @@ for hw in hw_list:
hw
.
getNode
(
"io.freq_ctr.ctrl.en_crap_mode"
)
.
write
(
0
);
hw
.
dispatch
()
ihw
=
-
1
for
hw
in
hw_list
:
ihw
+=
1
print
'IP:'
,
ips
[
ihw
]
print
hw
.
id
()
ver
=
hw
.
getNode
(
"csr.id"
)
.
read
()
hw
.
dispatch
()
...
...
projects/64ch/software/stat.py
View file @
2ac18b53
...
...
@@ -4,11 +4,19 @@ import uhal
import
time
import
sys
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
manager
=
uhal
.
ConnectionManager
(
"file://connections.xml"
)
hw_list
=
[]
for
a
in
sys
.
argv
[
1
:]:
hw_list
.
append
(
manager
.
getDevice
(
a
))
#manager = uhal.ConnectionManager("file://connections.xml")
#for a in sys.argv[1:]:
# hw_list.append(manager.getDevice(a))
sys
.
path
.
append
(
'/home/dsaunder/workspace/go_projects/src/bitbucket.org/solidexperiment/readout-software/scripts'
)
import
detector_config_tools
ips
=
detector_config_tools
.
currentIPs
(
False
)
for
ip
in
ips
:
hw_list
.
append
(
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235."
+
str
(
ip
)
+
":50001"
,
"file://addrtab/top.xml"
))
for
hw
in
hw_list
:
print
hw
.
id
()
...
...
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