Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
D&E Collaboration Projects
dintef
Commits
83abb418
Commit
83abb418
authored
Jul 28, 2020
by
David Schimansky
Browse files
Fix bug in send_test_data function
parent
46d13416
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/clients/sus.py
View file @
83abb418
...
...
@@ -171,16 +171,16 @@ class dyn(DintefSubCmd):
# set cycle length to 100
# and number of words to readout to 128
#
dev.command('REG 1:0x0C08 6553728')
dev
.
reg_write
(
DintefDevice
.
reg
.
dyn
[
2
][
"num_words_to_read"
],
128
)
dev
.
reg_write
(
DintefDevice
.
reg
.
dyn
[
2
][
"conf_cycle_length"
],
100
)
dev
.
command
(
'REG 1:0x0C08 6553728'
)
#
dev.reg_write(DintefDevice.reg.dyn[2]["num_words_to_read"], 128)
#
dev.reg_write(DintefDevice.reg.dyn[2]["conf_cycle_length"], 100)
# set conf_send_test_data to 1
#
dev.command('REG 1:0x0C00 2')
dev
.
reg_write
(
dev
.
reg
.
dyn
[
0
][
"conf_send_test_data"
],
1
)
dev
.
command
(
'REG 1:0x0C00 2'
)
#
dev.reg_write(dev.reg.dyn[0]["conf_send_test_data"], 1)
# set dyn ctrl input register to command RUN RO
#
dev.command('REG 1:0x0C04 3')
dev
.
reg_write
(
dev
.
reg
.
dyn
[
1
][
"dyn_in"
],
3
)
dev
.
command
(
'REG 1:0x0C04 3'
)
#
dev.reg_write(dev.reg.dyn[1]["dyn_in"], 3)
self
.
log
.
debug
(
'Dyn Ctrl State before write: '
+
# dev.command('?REG 1:0x0C28'))
dev
.
reg_read
(
dev
.
reg
.
dyn
[
10
][
"o_current_state"
]))
...
...
@@ -575,30 +575,30 @@ class measurement(DintefSubCmd):
if
(
pathToDataset
==
''
):
delim
=
''
for
i
in
range
(
8
):
nm
=
"cntValsFE"
+
str
(
i
/
2
)
hdf5File
[
pathToDataset
+
delim
+
nm
][:,
currIndex
,
i
%
2
]
=
\
np
.
int_
(
data
[:,
i
/
2
,
i
%
2
])
#
hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 0] = \
#
np.int_(data[:, 0, 0])
#
hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 1] = \
#
np.int_(data[:, 0, 1])
#
hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 0] = \
#
np.int_(data[:, 1, 0])
#
hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 1] = \
#
np.int_(data[:, 1, 1])
#
hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 0] = \
#
np.int_(data[:, 2, 0])
#
hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 1] = \
#
np.int_(data[:, 2, 1])
#
hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 0] = \
#
np.int_(data[:, 3, 0])
#
hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 1] = \
#
np.int_(data[:, 3, 1])
#
for i in range(8):
#
nm = "cntValsFE" + str(i / 2)
#
hdf5File[pathToDataset + delim + nm][:, currIndex, i % 2] = \
#
np.int_(data[:, i / 2, i % 2])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE0'
][:,
currIndex
,
0
]
=
\
np
.
int_
(
data
[:,
0
,
0
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE0'
][:,
currIndex
,
1
]
=
\
np
.
int_
(
data
[:,
0
,
1
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE1'
][:,
currIndex
,
0
]
=
\
np
.
int_
(
data
[:,
1
,
0
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE1'
][:,
currIndex
,
1
]
=
\
np
.
int_
(
data
[:,
1
,
1
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE2'
][:,
currIndex
,
0
]
=
\
np
.
int_
(
data
[:,
2
,
0
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE2'
][:,
currIndex
,
1
]
=
\
np
.
int_
(
data
[:,
2
,
1
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE3'
][:,
currIndex
,
0
]
=
\
np
.
int_
(
data
[:,
3
,
0
])
hdf5File
[
pathToDataset
+
delim
+
'cntValsFE3'
][:,
currIndex
,
1
]
=
\
np
.
int_
(
data
[:,
3
,
1
])
# print(hdf5File)
...
...
Write
Preview
Supports
Markdown
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