Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
6dff78a3
Commit
6dff78a3
authored
Jul 04, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd_ptrack.c: add stat and channel sub-commands
The enable subcommand is renamed to unfreeze
parent
2c7f5594
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
cmd_ptrack.c
shell/cmd_ptrack.c
+18
-4
softpll_ng.c
softpll/softpll_ng.c
+15
-0
softpll_ng.h
softpll/softpll_ng.h
+1
-0
No files found.
shell/cmd_ptrack.c
View file @
6dff78a3
...
...
@@ -20,9 +20,11 @@
static
const
char
*
const
ptrack_cmds
[]
=
{
"enable"
,
"ps-freeze"
,
"vco-freeze"
"unfreeze"
,
"ps-freeze"
,
"vco-freeze"
,
"channel"
,
"stat"
,
};
...
...
@@ -37,7 +39,7 @@ static int cmd_ptrack(const char *args[])
spll_pshifter_freeze
(
0
);
break
;
case
1
:
if
(
args
[
0
])
{
if
(
args
[
1
])
{
int
ps
=
atoi
(
args
[
1
]);
pp_printf
(
"Freezing SPLL phase shifter at phase %d ps
\n
"
,
ps
);
spll_set_phase_shift
(
0
,
ps
);
...
...
@@ -52,6 +54,18 @@ static int cmd_ptrack(const char *args[])
pp_printf
(
"Freezing SPLL VCO control"
);
spll_vco_freeze
(
1
);
break
;
case
3
:
if
(
args
[
1
])
{
int
ch
=
atoi
(
args
[
1
]);
pp_printf
(
"enable ptracker %d
\n
"
,
ch
);
spll_enable_ptracker
(
ch
,
1
);
}
else
return
-
1
;
break
;
case
4
:
ptracker_show_stats
();
break
;
}
return
0
;
}
...
...
softpll/softpll_ng.c
View file @
6dff78a3
...
...
@@ -546,6 +546,21 @@ void spll_get_num_channels(int *n_ref, int *n_out)
*
n_out
=
spll_n_chan_out
;
}
void
ptracker_show_stats
(
void
)
{
int
ch
;
for
(
ch
=
0
;
ch
<
MAX_PTRACKERS
;
ch
++
)
{
struct
spll_ptracker_state
*
s
=
(
struct
spll_ptracker_state
*
)
&
softpll
.
ptrackers
[
ch
];
int32_t
phase
;
spll_read_ptracker
(
ch
,
&
phase
,
NULL
);
pp_printf
(
"ptrack %d: en %d id %d ready %d phase %d (%d ps) avg %d
\n
"
,
ch
,
s
->
enabled
,
s
->
id
,
s
->
ready
,
s
->
phase_val
,
(
int
)
phase
,
s
->
n_avg
);
}
}
void
spll_show_stats
(
void
)
{
struct
softpll_state
*
s
=
(
struct
softpll_state
*
)
&
softpll
;
...
...
softpll/softpll_ng.h
View file @
6dff78a3
...
...
@@ -119,6 +119,7 @@ struct spll_aux_clock_status spll_get_aux_status(int channel );
int
spll_get_delock_count
(
void
);
void
spll_show_stats
(
void
);
void
ptracker_show_stats
(
void
);
/* Sets VCXO tuning DAC corresponding to output (out_channel) to a given value */
void
spll_set_dac
(
int
out_channel
,
int
value
);
...
...
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