Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
Euro ADC 65M 14b 40cha gw PUMA-gw
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
Euro ADC 65M 14b 40cha gw PUMA-gw
Commits
330478c2
Commit
330478c2
authored
Nov 29, 2017
by
Dan Saunders
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding link control scripts
parent
56872722
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
0 deletions
+128
-0
link_rx_stat.py
projects/64ch/software/link_rx_stat.py
+36
-0
link_rx_up.py
projects/64ch/software/link_rx_up.py
+28
-0
link_tx_down.py
projects/64ch/software/link_tx_down.py
+32
-0
link_tx_up.py
projects/64ch/software/link_tx_up.py
+32
-0
No files found.
projects/64ch/software/link_rx_stat.py
0 → 100755
View file @
330478c2
#!/usr/bin/python
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
))
for
hw
in
hw_list
:
print
hw
.
id
()
v
=
hw
.
getNode
(
"csr.id"
)
.
read
();
vs
=
hw
.
getNode
(
"csr.stat"
)
.
read
()
hw
.
dispatch
()
print
"csr.id"
,
hex
(
v
),
"csr.stat"
,
hex
(
vs
)
for
i
in
[
"us"
,
"ds"
]:
n
=
hw
.
getNode
(
"daq.tlink."
+
i
+
"_stat"
)
v_rdy_tx
=
n
.
getNode
(
"phy_rdy_tx"
)
.
read
()
v_rdy_rx
=
n
.
getNode
(
"phy_rdy_rx"
)
.
read
()
v_buf_tx
=
n
.
getNode
(
"buf_tx"
)
.
read
()
v_buf_rx
=
n
.
getNode
(
"buf_tx"
)
.
read
()
v_tx_empty
=
n
.
getNode
(
"tx_empty"
)
.
read
()
v_tx_full
=
n
.
getNode
(
"tx_full"
)
.
read
()
v_rx_empty
=
n
.
getNode
(
"rx_empty"
)
.
read
()
v_rx_full
=
n
.
getNode
(
"rx_full"
)
.
read
()
v_rx_up
=
n
.
getNode
(
"rx_up"
)
.
read
()
v_rx_fail
=
n
.
getNode
(
"rx_fail"
)
.
read
()
v_rx_cause
=
n
.
getNode
(
"rx_cause"
)
.
read
()
v_rem_id
=
n
.
getNode
(
"remote_id"
)
.
read
()
hw
.
dispatch
()
print
i
,
"rdy_tx:"
,
v_rdy_tx
,
"rdy_rx:"
,
v_rdy_rx
,
"buf_tx:"
,
v_buf_tx
,
"buf_rx"
,
v_buf_rx
,
"tx_empty:"
,
v_tx_empty
,
"tx_full:"
,
v_tx_full
,
"rx_empty:"
,
v_rx_empty
,
"rx_full:"
,
v_rx_full
,
"rx_up:"
,
v_rx_up
,
"rx_fail:"
,
v_rx_fail
,
"rx_cause:"
,
v_rx_cause
,
"remote_id:"
,
v_rem_id
projects/64ch/software/link_rx_up.py
0 → 100755
View file @
330478c2
#!/usr/bin/python
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
))
for
hw
in
hw_list
:
print
hw
.
id
()
v
=
hw
.
getNode
(
"csr.id"
)
.
read
()
vs
=
hw
.
getNode
(
"csr.stat"
)
.
read
()
hw
.
dispatch
()
print
"csr.id"
,
hex
(
v
),
"csr.stat"
,
hex
(
vs
)
print
"Enabling tx links"
hw
.
getNode
(
"daq.tlink.ctrl.en_us_rx_phy"
)
.
write
(
1
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_rx_phy"
)
.
write
(
1
)
hw
.
dispatch
()
hw
.
getNode
(
"daq.tlink.ctrl.en_us_rx"
)
.
write
(
1
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_rx"
)
.
write
(
1
)
hw
.
dispatch
()
projects/64ch/software/link_tx_down.py
0 → 100755
View file @
330478c2
#!/usr/bin/python
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
))
for
hw
in
hw_list
:
print
hw
.
id
()
v
=
hw
.
getNode
(
"csr.id"
)
.
read
()
vs
=
hw
.
getNode
(
"csr.stat"
)
.
read
()
hw
.
dispatch
()
print
"csr.id"
,
hex
(
v
),
"csr.stat"
,
hex
(
vs
)
print
"Dropping tx links"
hw
.
getNode
(
"daq.tlink.ctrl.en_us_tx"
)
.
write
(
0
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_tx"
)
.
write
(
0
)
hw
.
getNode
(
"daq.tlink.ctrl.en_us_tx_phy"
)
.
write
(
0
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_tx_phy"
)
.
write
(
0
)
hw
.
dispatch
()
vu
=
hw
.
getNode
(
"daq.tlink.us_stat"
)
.
read
()
vd
=
hw
.
getNode
(
"daq.tlink.ds_stat"
)
.
read
()
hw
.
dispatch
()
print
"us -- rdy_tx, buf_tx, stat_tx:"
,
(
vu
&
0x1
),
hex
((
vu
&
0xc
)
>>
2
),
hex
((
vu
&
0x300
)
>>
8
)
print
"ds -- rdy_tx, buf_tx, stat_tx:"
,
(
vd
&
0x1
),
hex
((
vd
&
0xc
)
>>
2
),
hex
((
vd
&
0x300
)
>>
8
)
projects/64ch/software/link_tx_up.py
0 → 100755
View file @
330478c2
#!/usr/bin/python
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
))
for
hw
in
hw_list
:
print
hw
.
id
()
v
=
hw
.
getNode
(
"csr.id"
)
.
read
()
vs
=
hw
.
getNode
(
"csr.stat"
)
.
read
()
hw
.
dispatch
()
print
"csr.id"
,
hex
(
v
),
"csr.stat"
,
hex
(
vs
)
print
"Enabling tx links"
hw
.
getNode
(
"daq.tlink.ctrl.en_us_tx"
)
.
write
(
1
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_tx"
)
.
write
(
1
)
hw
.
getNode
(
"daq.tlink.ctrl.en_us_tx_phy"
)
.
write
(
1
)
hw
.
getNode
(
"daq.tlink.ctrl.en_ds_tx_phy"
)
.
write
(
1
)
hw
.
dispatch
()
vu
=
hw
.
getNode
(
"daq.tlink.us_stat"
)
.
read
()
vd
=
hw
.
getNode
(
"daq.tlink.ds_stat"
)
.
read
()
hw
.
dispatch
()
print
"us -- rdy_tx, buf_tx, stat_tx:"
,
(
vu
&
0x1
),
hex
((
vu
&
0xc
)
>>
2
),
hex
((
vu
&
0x300
)
>>
8
)
print
"ds -- rdy_tx, buf_tx, stat_tx:"
,
(
vd
&
0x1
),
hex
((
vd
&
0xc
)
>>
2
),
hex
((
vd
&
0x300
)
>>
8
)
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