Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
2ab718f3
Commit
2ab718f3
authored
Jun 18, 2015
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr-servo: reorder/clean/document fields of servo_state
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
0b70bc23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
wr-api.h
proto-ext-whiterabbit/wr-api.h
+13
-9
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+0
-7
No files found.
proto-ext-whiterabbit/wr-api.h
View file @
2ab718f3
...
...
@@ -133,25 +133,29 @@ int wr_servo_got_delay(struct pp_instance *ppi, Integer32 cf);
int
wr_servo_update
(
struct
pp_instance
*
ppi
);
struct
wr_servo_state_t
{
char
if_name
[
16
];
char
if_name
[
16
];
/* Informative, for wr_mon through shmem */
int
state
;
int
next_state
;
TimeInternal
mu
;
/* half of the RTT */
int64_t
picos_mu
;
int
valid
;
/* These fields are used by servo code, after asetting at init time */
int32_t
delta_tx_m
;
int32_t
delta_rx_m
;
int32_t
delta_tx_s
;
int32_t
delta_rx_s
;
int32_t
cur_setpoint
;
int64_t
delta_ms
;
int64_t
delta_ms_prev
;
TimeInternal
t1
,
t2
,
t3
,
t4
;
uint64_t
last_tics
;
int32_t
fiber_fix_alpha
;
int32_t
clock_period_ps
;
/* These fields are used by servo code, across iterations */
TimeInternal
t1
,
t2
,
t3
,
t4
;
int64_t
delta_ms_prev
;
int
missed_iters
;
int
valid
;
/* Following fields are for monitoring/diagnostics (use w/ shmem) */
TimeInternal
mu
;
int64_t
picos_mu
;
int32_t
cur_setpoint
;
int64_t
delta_ms
;
uint32_t
update_count
;
int
tracking_enabled
;
char
servo_state_name
[
32
];
...
...
proto-ext-whiterabbit/wr-servo.c
View file @
2ab718f3
...
...
@@ -236,7 +236,6 @@ int wr_servo_update(struct pp_instance *ppi)
struct
wr_servo_state_t
*
s
=
&
((
struct
wr_data_t
*
)
ppi
->
ext_data
)
->
servo_state
;
uint64_t
tics
;
uint64_t
big_delta_fix
;
uint64_t
delay_ms_fix
;
static
int
errcount
;
...
...
@@ -300,8 +299,6 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
delta_ms
=
delay_ms_fix
;
tics
=
ppi
->
t_ops
->
calc_timeout
(
ppi
,
0
);
if
(
wrp
->
ops
->
locking_poll
(
ppi
,
0
)
!=
WR_SPLL_READY
)
{
pp_diag
(
ppi
,
servo
,
1
,
"PLL OutOfLock, should restart sync
\n
"
);
wrp
->
ops
->
enable_timing_output
(
ppi
,
0
);
...
...
@@ -340,7 +337,6 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
next_state
=
WR_SYNC_NSEC
;
s
->
state
=
WR_WAIT_SYNC_IDLE
;
s
->
last_tics
=
tics
;
break
;
case
WR_SYNC_NSEC
:
...
...
@@ -348,7 +344,6 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
next_state
=
WR_SYNC_PHASE
;
s
->
state
=
WR_WAIT_SYNC_IDLE
;
s
->
last_tics
=
tics
;
break
;
case
WR_SYNC_PHASE
:
...
...
@@ -359,7 +354,6 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
next_state
=
WR_WAIT_OFFSET_STABLE
;
s
->
state
=
WR_WAIT_SYNC_IDLE
;
s
->
last_tics
=
tics
;
s
->
delta_ms_prev
=
s
->
delta_ms
;
break
;
...
...
@@ -402,7 +396,6 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
delta_ms_prev
=
s
->
delta_ms
;
s
->
next_state
=
WR_TRACK_PHASE
;
s
->
state
=
WR_WAIT_SYNC_IDLE
;
s
->
last_tics
=
tics
;
}
break
;
...
...
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