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
6
Merge Requests
6
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
d77aca48
Commit
d77aca48
authored
Nov 18, 2023
by
Tomasz Wlostowski
Committed by
Adam Wujek
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: fiddle a bit with freq prelock threshold & PI gain
parent
c28d8537
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
spll_main.c
softpll/spll_main.c
+6
-6
spll_main.h
softpll/spll_main.h
+1
-4
No files found.
softpll/spll_main.c
View file @
d77aca48
...
...
@@ -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
...
...
@@ -52,9 +52,11 @@ void mpll_init(struct spll_main_state *s, int id_ref, int id_out)
s
->
enabled
=
0
;
/* Freqency branch lock detection */
s
->
freq_ld
.
threshold
=
10
0
;
s
->
freq_ld
.
threshold
=
5
0
;
s
->
freq_ld
.
lock_samples
=
50
;
s
->
freq_ld
.
delock_samples
=
1000
;
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
;
...
...
@@ -145,8 +147,6 @@ void mpll_start(struct spll_main_state *s)
s
->
tag_ref_raw_d
=
-
1
;
s
->
tag_out_raw_d2
=
-
1
;
s
->
freq_locked
=
0
;
s
->
phase_shift_target
=
0
;
s
->
phase_shift_current
=
0
;
s
->
sample_n
=
0
;
...
...
@@ -346,7 +346,7 @@ int mpll_update(struct spll_main_state *s, int tag, int source)
if
(
!
s
->
freq_ld
.
locked
)
{
err
=
freq_error
;
err
=
-
s
->
freq_prelock_gain_boost
*
freq_error
;
}
else
{
...
...
softpll/spll_main.h
View file @
d77aca48
...
...
@@ -35,10 +35,7 @@ struct spll_main_state {
#endif
int
dref_dt
,
dout_dt
,
tag_ref_raw_d
,
tag_out_raw_d2
;
int
frequency_lock_threshold
;
int
frequency_delock_threshold
;
int
freq_locked
;
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