Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
e878fd92
Commit
e878fd92
authored
Apr 24, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added method to generate parameters summary
parent
586b8213
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
x393_lma.py
py393/x393_lma.py
+1
-1
x393_mcntrl_adjust.py
py393/x393_mcntrl_adjust.py
+54
-1
No files found.
py393/x393_lma.py
View file @
e878fd92
...
@@ -55,7 +55,7 @@ PARAMETER_TYPES=(
...
@@ -55,7 +55,7 @@ PARAMETER_TYPES=(
{
"name"
:
"tFDQS"
,
"size"
:
4
,
"units"
:
"ps"
,
"description"
:
"DQS fine delays (mod 5)"
,
"en"
:
1
},
#only 4 are independent, 5-th is -sum of 4
{
"name"
:
"tFDQS"
,
"size"
:
4
,
"units"
:
"ps"
,
"description"
:
"DQS fine delays (mod 5)"
,
"en"
:
1
},
#only 4 are independent, 5-th is -sum of 4
{
"name"
:
"tFDQ"
,
"size"
:
32
,
"units"
:
"ps"
,
"description"
:
"DQ fine delays (mod 5)"
,
"en"
:
1
},
{
"name"
:
"tFDQ"
,
"size"
:
32
,
"units"
:
"ps"
,
"description"
:
"DQ fine delays (mod 5)"
,
"en"
:
1
},
{
"name"
:
"anaScale"
,
"size"
:
1
,
"dflt"
:
20
,
"units"
:
"ps"
,
"description"
:
"Scale for non-binary measured results"
,
"en"
:
1
},
#should not be 0 - singular matrix
{
"name"
:
"anaScale"
,
"size"
:
1
,
"dflt"
:
20
,
"units"
:
"ps"
,
"description"
:
"Scale for non-binary measured results"
,
"en"
:
1
},
#should not be 0 - singular matrix
{
"name"
:
"tCDQS"
,
"size"
:
30
,
"units"
:
"ps"
,
"description"
:
"DQS primary de
a
lays (all but 8 and 24"
,
"en"
:
1
},
#only 4 are independent, 5-th is -sum of 4
{
"name"
:
"tCDQS"
,
"size"
:
30
,
"units"
:
"ps"
,
"description"
:
"DQS primary delays (all but 8 and 24"
,
"en"
:
1
},
#only 4 are independent, 5-th is -sum of 4
)
)
FINE_STEPS
=
5
FINE_STEPS
=
5
DLY_STEPS
=
FINE_STEPS
*
32
# =160
DLY_STEPS
=
FINE_STEPS
*
32
# =160
...
...
py393/x393_mcntrl_adjust.py
View file @
e878fd92
...
@@ -4939,6 +4939,59 @@ write_settings= {
...
@@ -4939,6 +4939,59 @@ write_settings= {
if
not
d
is
None
:
if
not
d
is
None
:
print
(
"
%
d
%
s"
%
(
phase
,
d
))
print
(
"
%
d
%
s"
%
(
phase
,
d
))
def
dq_dqs_parameters_stats
(
self
,
out_mode
=
None
):
if
out_mode
is
None
:
try
:
self
.
load_mcntrl
(
'dbg/x393_mcntrl.pickle'
)
# load previously acquired data
except
:
print
(
"'dbg/x393_mcntrl.pickle' not found, using current data"
)
print
(
"
\n
Input:"
)
self
.
dq_dqs_parameters_stats
(
False
)
print
(
"
\n
Output:"
)
self
.
dq_dqs_parameters_stats
(
True
)
return
def
get_fine_step
(
tS
,
tF
):
tF
.
append
(
-
sum
(
tF
))
# tF.append(tF[0]) Do not process last (large) step, average 4 small ones
rslt
=
[]
for
i
in
range
(
len
(
tF
)
-
1
):
rslt
.
append
(
tS
+
tF
[
i
]
-
tF
[
i
+
1
])
return
rslt
parameters
=
self
.
adjustment_state
[(
"dqi_dqsi_parameters"
,
"dqo_dqso_parameters"
)[
out_mode
]]
for
laneP
in
parameters
:
laneP
[
'tFSDQS'
]
=
get_fine_step
(
laneP
[
'tSDQS'
],
laneP
[
'tFDQS'
][
0
:
4
]
)
laneP
[
'tFSDQ'
]
=
[]
for
line
in
range
(
8
):
laneP
[
'tFSDQ'
]
+=
get_fine_step
(
laneP
[
'tSDQ'
][
line
],
laneP
[
'tFDQ'
][
4
*
line
:
4
*
(
line
+
1
)])
print
(
'parameters='
,
parameters
)
templ
=
({
'name'
:
'tDQSHL'
,
'units'
:
'ps'
,
'scale'
:
1
},
{
'name'
:
'tDQHL'
,
'units'
:
'ps'
,
'scale'
:
1
},
{
'name'
:
'tDQ'
,
'units'
:
'ps'
,
'scale'
:
1
},
{
'name'
:
'tSDQS'
,
'units'
:
'ps/step'
,
'scale'
:
5.0
},
{
'name'
:
'tSDQ'
,
'units'
:
'ps/step'
,
'scale'
:
5.0
},
{
'name'
:
'tFSDQS'
,
'units'
:
'ps/step'
,
'scale'
:
1.0
},
{
'name'
:
'tFSDQ'
,
'units'
:
'ps/step'
,
'scale'
:
1.0
},
{
'name'
:
'anaScale'
,
'units'
:
'ps'
,
'scale'
:
1.0
},
)
print
(
'parameter number average min max max-min units'
)
for
par
in
templ
:
v
=
[]
for
laneP
in
parameters
:
if
isinstance
(
laneP
[
par
[
'name'
]],(
list
,
tuple
)):
v
+=
laneP
[
par
[
'name'
]]
else
:
v
.
append
(
laneP
[
par
[
'name'
]])
print
(
"
%
s
%
d
%.2
f
%.2
f
%.2
f
%.2
f
%
s"
%
(
par
[
'name'
],
len
(
v
),
par
[
'scale'
]
*
sum
(
v
)
/
len
(
v
),
par
[
'scale'
]
*
min
(
v
),
par
[
'scale'
]
*
max
(
v
),
par
[
'scale'
]
*
(
max
(
v
)
-
min
(
v
)),
par
[
'units'
]))
# print (par['name'],par['scale']*sum(v)/len(v),par['scale']*(max(v)-min(v)), par['units'])
...
...
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