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
f8a949b2
Commit
f8a949b2
authored
Nov 21, 2023
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: minor cleanup of the above commit
parent
40d557f0
Pipeline
#4971
failed with stage
in 3 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
spll_main.c
softpll/spll_main.c
+6
-4
spll_main.h
softpll/spll_main.h
+1
-0
No files found.
softpll/spll_main.c
View file @
f8a949b2
...
...
@@ -13,8 +13,8 @@
#include "softpll_ng.h"
#define MPLL_DISCARD_EARLY_TAGS 10
#define MPLL_FREQ_LOCK_SAMPLES 6000
#define MPLL_TAG_WRAPAROUND 100000000
#define MPLL_FREQ_PRELOCK_GAIN_BOOST 20
#undef WITH_SEQUENCING
...
...
@@ -53,9 +53,11 @@ void mpll_init(struct spll_main_state *s, int id_ref, int id_out)
/* Freqency branch lock detection */
s
->
freq_ld
.
threshold
=
50
;
s
->
freq_ld
.
lock_samples
=
1
0
;
s
->
freq_ld
.
lock_samples
=
5
0
;
s
->
freq_ld
.
delock_samples
=
20000
;
s
->
freq_prelock_gain_boost
=
MPLL_FREQ_PRELOCK_GAIN_BOOST
;
s
->
phase_ld
.
threshold
=
1200
;
s
->
phase_ld
.
lock_samples
=
1000
;
s
->
phase_ld
.
delock_samples
=
100
;
...
...
@@ -344,7 +346,7 @@ int mpll_update(struct spll_main_state *s, int tag, int source)
if
(
!
s
->
freq_ld
.
locked
)
{
err
=
-
20
*
freq_error
;
err
=
-
s
->
freq_prelock_gain_boost
*
freq_error
;
}
else
{
...
...
@@ -380,7 +382,7 @@ int mpll_update(struct spll_main_state *s, int tag, int source)
if
(
s
->
dac_index
==
0
)
spll_log_dac
(
y
);
spll_debug
(
s
->
dbg_src_id
,
SPLL_DBG_SIGNAL_PHASE_CURRENT
,
(
s
->
freq_ld
.
locked
?
1
:
0
)
+
(
s
->
phase_ld
.
locked
?
10
:
0
)
,
0
);
spll_debug
(
s
->
dbg_src_id
,
SPLL_DBG_SIGNAL_PHASE_CURRENT
,
s
->
phase_shift_current
,
0
);
spll_debug
(
s
->
dbg_src_id
,
SPLL_DBG_SIGNAL_PHASE_TARGET
,
s
->
phase_shift_target
,
0
);
spll_debug
(
s
->
dbg_src_id
,
SPLL_DBG_SIGNAL_TIME_MS
,
timer_get_tics
(),
0
);
spll_debug
(
s
->
dbg_src_id
,
SPLL_DBG_SIGNAL_REF
,
s
->
dref_dt
,
0
);
...
...
softpll/spll_main.h
View file @
f8a949b2
...
...
@@ -35,6 +35,7 @@ struct spll_main_state {
#endif
int
dref_dt
,
dout_dt
,
tag_ref_raw_d
,
tag_out_raw_d2
;
int
freq_prelock_gain_boost
;
int
discard_early_cnt
;
int
adder_ref
,
adder_out
;
int
tag_ref
,
tag_ref_d
;
...
...
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