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
2e9d656e
Commit
2e9d656e
authored
Jul 29, 2021
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev/wdiags: put PHY Bitslide and PTP deltas in the wdiags
parent
8aebd99c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
wdiags.c
dev/wdiags.c
+17
-0
wdiags.h
include/dev/wdiags.h
+2
-0
wrc_diags_regs.h
include/hw/wrc_diags_regs.h
+10
-0
monitor_ppsi.c
monitor/monitor_ppsi.c
+3
-0
No files found.
dev/wdiags.c
View file @
2e9d656e
...
...
@@ -120,6 +120,11 @@ void wdiags_write_temp(uint32_t temp)
void
wdiags_init
()
{
int
i
;
for
(
i
=
0
;
i
<
64
;
i
++
)
wdiag_write
(
i
*
4
,
0
);
wdiag_write
(
WRC_DIAGS_VER
,
WDIAGS_VERSION
);
}
...
...
@@ -145,3 +150,15 @@ void wdiags_write_aux_clock_details( int clk_id, uint32_t mode, uint32_t phase,
wdiag_write
(
reg
,
v
);
}
void
wdiags_write_bitslide
(
int
bitslide
)
{
wdiag_write
(
WRC_DIAGS_WDIAG_BITSLIDE
,
bitslide
);
}
void
wdiags_write_ptp_deltas
(
int
dtxm
,
int
drxm
,
int
dtxs
,
int
drxs
)
{
wdiag_write
(
WRC_DIAGS_WDIAG_DELTA_RX_M
,
drxm
);
wdiag_write
(
WRC_DIAGS_WDIAG_DELTA_RX_S
,
drxs
);
wdiag_write
(
WRC_DIAGS_WDIAG_DELTA_TX_M
,
dtxm
);
wdiag_write
(
WRC_DIAGS_WDIAG_DELTA_TX_S
,
dtxs
);
}
\ No newline at end of file
include/dev/wdiags.h
View file @
2e9d656e
...
...
@@ -26,5 +26,7 @@ void wdiags_write_time(uint64_t sec, uint32_t nsec);
void
wdiags_write_temp
(
uint32_t
temp
);
void
wdiags_write_aux_clock_details
(
int
clk_id
,
uint32_t
mode
,
uint32_t
phase
,
int
enabled
,
int
ready
);
void
wdiags_init
(
void
);
void
wdiags_write_bitslide
(
int
bitslide
);
void
wdiags_write_ptp_deltas
(
int
dtxm
,
int
drxm
,
int
dtxs
,
int
drxs
);
#endif
include/hw/wrc_diags_regs.h
View file @
2e9d656e
...
...
@@ -105,6 +105,14 @@
/* WRPC Diag: Servo restart count */
#define WRC_DIAGS_WDIAG_SERVO_RESTART_COUNT 0x6cUL
#define WRC_DIAGS_WDIAG_BITSLIDE 0x70UL
#define WRC_DIAGS_WDIAG_DELTA_RX_M 0x74UL
#define WRC_DIAGS_WDIAG_DELTA_RX_S 0x78UL
#define WRC_DIAGS_WDIAG_DELTA_TX_M 0x7cUL
#define WRC_DIAGS_WDIAG_DELTA_TX_S 0x80UL
struct
wrc_diags
{
/* [0x0]: REG (rw) Version register */
uint32_t
VER
;
...
...
@@ -189,6 +197,8 @@ struct wrc_diags {
/* [0x6c]: REG (ro) WRPC Diag: Servo restart count */
uint32_t
WDIAG_SERVO_RESTART_COUNT
;
uint32_t
WDIAG_BITSLIDE
;
};
#endif
/* __CHEBY__WRC_DIAGS__H__ */
monitor/monitor_ppsi.c
View file @
2e9d656e
...
...
@@ -521,6 +521,8 @@ int wrc_wr_diags(void)
wdiags_write_servo_state
(
wr_mode
,
servostate
,
ss
->
picos_mu
,
ss
->
delta_ms
,
asym
,
ss
->
offset
,
ss
->
cur_setpoint
,
ss
->
update_count
,
0
,
0
);
// fixme: add wdiags v2
wdiags_write_ptp_deltas
(
ss
->
delta_tx_m
,
ss
->
delta_rx_m
,
ss
->
delta_tx_s
,
ss
->
delta_rx_s
);
}
/* auxiliar channels (if any) */
...
...
@@ -558,6 +560,7 @@ int wrc_wr_diags(void)
}
wdiags_write_bitslide
(
ep_get_bitslide
(
&
wrc_endpoint_dev
)
);
/* temperature */
temp
=
wrc_temp_get
(
"pcb"
);
...
...
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