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
4
Merge Requests
4
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
f47ac11c
Commit
f47ac11c
authored
Jul 30, 2013
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll/softpll_ng.c: update phase trackers in all modes, not only slave
parent
ca951a9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
softpll_ng.c
softpll/softpll_ng.c
+9
-19
No files found.
softpll/softpll_ng.c
View file @
f47ac11c
...
...
@@ -115,10 +115,6 @@ static inline void sequencing_fsm(struct softpll_state *s, int tag_value, int ta
spll_enable_tagger
(
MAIN_CHANNEL
,
1
);
softpll
.
dac_timeout
=
timer_get_tics
();
if
(
softpll
.
mode
==
SPLL_MODE_SLAVE
)
spll_resync_dmtd_counter
(
softpll
.
mpll
.
id_ref
);
softpll
.
seq_state
=
SEQ_WAIT_CLEAR_DACS
;
break
;
...
...
@@ -146,7 +142,7 @@ static inline void sequencing_fsm(struct softpll_state *s, int tag_value, int ta
/* State "Start external reference PLL": starts up BB PLL for locking local reference to 10 MHz input */
case
SEQ_START_EXT
:
{
// external_update(&s->ext, tag_value, tag_source
);
spll_enable_tagger
(
MAIN_CHANNEL
,
0
);
external_start
(
&
s
->
ext
);
s
->
seq_state
=
SEQ_WAIT_EXT
;
...
...
@@ -194,10 +190,7 @@ static inline void sequencing_fsm(struct softpll_state *s, int tag_value, int ta
case
SEQ_WAIT_MAIN
:
{
if
(
s
->
mpll
.
ld
.
locked
)
{
update_ptrackers
(
s
,
tag_value
,
tag_source
);
s
->
seq_state
=
SEQ_READY
;
}
break
;
}
...
...
@@ -227,7 +220,9 @@ static inline void update_loops(struct softpll_state *s, int tag_value, int tag_
if
(
s
->
mode
==
SPLL_MODE_GRAND_MASTER
)
{
switch
(
s
->
seq_state
)
{
case
SEQ_WAIT_EXT
:
case
SEQ_START_HELPER
:
case
SEQ_WAIT_HELPER
:
case
SEQ_START_MAIN
:
case
SEQ_WAIT_MAIN
:
case
SEQ_READY
:
external_update
(
&
s
->
ext
,
tag_value
,
tag_source
);
...
...
@@ -237,6 +232,7 @@ static inline void update_loops(struct softpll_state *s, int tag_value, int tag_
switch
(
s
->
seq_state
)
{
case
SEQ_WAIT_HELPER
:
case
SEQ_START_MAIN
:
case
SEQ_WAIT_MAIN
:
case
SEQ_READY
:
helper_update
(
&
s
->
helper
,
tag_value
,
tag_source
);
...
...
@@ -258,8 +254,9 @@ static inline void update_loops(struct softpll_state *s, int tag_value, int tag_
for
(
i
=
0
;
i
<
spll_n_chan_out
-
1
;
i
++
)
mpll_update
(
&
s
->
aux
[
i
].
pll
.
dmtd
,
tag_value
,
tag_source
);
// fixme: bb hooks here
update_ptrackers
(
s
,
tag_value
,
tag_source
);
}
update_ptrackers
(
s
,
tag_value
,
tag_source
);
}
}
...
...
@@ -340,14 +337,7 @@ void spll_init(int mode, int slave_ref_channel, int align_pps)
s
->
seq_state
=
SEQ_CLEAR_DACS
;
if
(
mode
==
SPLL_MODE_SLAVE
)
{
spll_resync_dmtd_counter
(
slave_ref_channel
);
while
(
!
spll_check_dmtd_resync
(
slave_ref_channel
))
;
}
helper_init
(
&
s
->
helper
,
spll_n_chan_ref
);
mpll_init
(
&
s
->
mpll
,
slave_ref_channel
,
spll_n_chan_ref
);
for
(
i
=
0
;
i
<
spll_n_chan_out
-
1
;
i
++
)
{
...
...
@@ -513,12 +503,12 @@ void spll_show_stats()
TRACE_DEV
(
"softpll: irq_count %d sequencer_state %d mode %d "
"alignment_state %d HL%d EL%d ML%d HY=%d "
"MY=%d
DelCnt
=%d
\n
"
,
"MY=%d
EY=%d DelCnt=%d extsc
=%d
\n
"
,
irq_count
,
softpll
.
seq_state
,
softpll
.
mode
,
softpll
.
ext
.
realign_state
,
softpll
.
helper
.
ld
.
locked
,
softpll
.
ext
.
ld
.
locked
,
softpll
.
mpll
.
ld
.
locked
,
softpll
.
helper
.
pi
.
y
,
softpll
.
mpll
.
pi
.
y
,
softpll
.
delock_count
);
softpll
.
helper
.
pi
.
y
,
softpll
.
mpll
.
pi
.
y
,
softpll
.
ext
.
pi
.
y
,
softpll
.
delock_count
,
softpll
.
ext
.
sample_n
);
}
...
...
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