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
e72b21c9
Commit
e72b21c9
authored
Jul 18, 2019
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update of SHMEM needed for Low Phase Drift Calibration
parent
13e4a0cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
hal_shmem.h
arch-wrs/include/libwr/hal_shmem.h
+25
-2
sfp_lib.h
arch-wrs/include/libwr/sfp_lib.h
+2
-1
main-loop.c
arch-wrs/main-loop.c
+2
-1
No files found.
arch-wrs/include/libwr/hal_shmem.h
View file @
e72b21c9
...
...
@@ -12,6 +12,23 @@
#define HAL_PORT_STATE_CALIBRATION 3
#define HAL_PORT_STATE_LOCKING 4
#define HAL_PORT_STATE_RESET 5
#define HAL_PORT_STATE_INIT 6
/* Port tx setup/calib machine states (hal_port_tx_setup_state) */
#define TX_SETUP_STATE_START 0
#define TX_SETUP_STATE_RESET_PCS 1
#define TX_SETUP_STATE_WAIT_LOCK 2
#define TX_SETUP_STATE_MEASURE_PHASE 3
#define TX_SETUP_DONE 4
#define TX_SETUP_VALIDATE 5
/* Port rx setup/calib machine states (hal_port_tx_setup_state) */
#define RX_SETUP_STATE_INIT 0
#define RX_SETUP_STATE_RESET_PCS 1
#define RX_SETUP_STATE_WAIT_LOCK 2
#define RX_SETUP_STATE_MEASURE_PHASE 3
#define RX_SETUP_DONE 4
#define RX_SETUP_VALIDATE 5
/* Read temperature from SFPs */
#define READ_SFP_DIAG_ENABLE 1
...
...
@@ -24,6 +41,10 @@
#define DEFAULT_T2_PHASE_TRANS 0
#define DEFAULT_T4_PHASE_TRANS 0
/* Low Phase Drift Calibration for tx and rx */
struct
hal_port_tx_setup_state
;
struct
hal_port_rx_setup_state
;
/* Port delay calibration parameters */
typedef
struct
hal_port_calibration
{
...
...
@@ -122,6 +143,9 @@ struct hal_port_state {
int
synchronized
;
// <>0 if port is synchronized
int
portInfoUpdated
;
// Set to 1 when updated
/* needed for the Low Phase Drift Calibration */
struct
hal_port_tx_setup_state
*
tx_setup_fsm
;
struct
hal_port_rx_setup_state
*
rx_setup_fsm
;
};
struct
hal_temp_sensors
{
...
...
@@ -132,8 +156,7 @@ struct hal_temp_sensors {
};
/* This is the overall structure stored in shared memory */
#define HAL_SHMEM_VERSION 12
/* Version 12, added monitor to
struct hal_port_state */
#define HAL_SHMEM_VERSION 13
/* Version 13, added Low Phase Drift Calib */
struct
hal_shmem_header
{
int
nports
;
...
...
arch-wrs/include/libwr/sfp_lib.h
View file @
e72b21c9
...
...
@@ -5,7 +5,8 @@
#define SFP_LED_WRMODE_SLAVE (1)
/* green */
#define SFP_LED_WRMODE_OTHER (2)
/* orange */
#define SFP_LED_WRMODE_MASTER (3)
/* yellow */
#define SFP_LED_WRMODE_OFF (4)
/* to off entire WRMODE LED */
#define SFP_LED_WRMODE_NO_LINK (4)
/* to off entire WRMODE LED */
#define SFP_LED_WRMODE_CALIBRATING (1)
/* green-blinking */
#define SFP_LED_WRMODE1 (1 << 0)
#define SFP_LED_WRMODE2 (1 << 1)
#define SFP_LED_SYNCED (1 << 2)
...
...
arch-wrs/main-loop.c
View file @
e72b21c9
...
...
@@ -55,7 +55,8 @@ static unsigned int run_all_state_machines(struct pp_globals *ppg)
ppi
->
link_up
=
(
p
->
state
!=
HAL_PORT_STATE_LINK_DOWN
&&
p
->
state
!=
HAL_PORT_STATE_DISABLED
);
p
->
state
!=
HAL_PORT_STATE_DISABLED
&&
p
->
state
!=
HAL_PORT_STATE_INIT
);
if
(
old_lu
!=
ppi
->
link_up
)
{
...
...
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