Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sdptr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
sdptr
Commits
68d95553
Commit
68d95553
authored
1 year ago
by
Pieter Donker
Browse files
Options
Downloads
Patches
Plain Diff
L2SDP-998
: add pps_error_cnt
parent
c1c5985b
No related branches found
No related tags found
1 merge request
!151
L2SDP-998: add pps_error_cnt
Pipeline
#64135
passed with warnings
1 year ago
Stage: quality-control
Changes
3
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/fpga_map.cpp
+1
-0
1 addition, 0 deletions
src/fpga_map.cpp
src/periph/fpga.cpp
+18
-3
18 additions, 3 deletions
src/periph/fpga.cpp
src/periph/fpga.h
+5
-2
5 additions, 2 deletions
src/periph/fpga.h
with
24 additions
and
5 deletions
src/fpga_map.cpp
+
1
−
0
View file @
68d95553
...
@@ -291,6 +291,7 @@ FpgaMap::FpgaMap()
...
@@ -291,6 +291,7 @@ FpgaMap::FpgaMap()
pointMap
->
add_register
(
"FPGA_pps_expected_cnt_RW"
,
PPS_EXPECTED_CNT
,
nFpgas
,
1
,
"RW"
,
REG_FORMAT_UINT32
);
pointMap
->
add_register
(
"FPGA_pps_expected_cnt_RW"
,
PPS_EXPECTED_CNT
,
nFpgas
,
1
,
"RW"
,
REG_FORMAT_UINT32
);
pointMap
->
add_register
(
"FPGA_pps_present_R"
,
PPS_PRESENT
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_BOOLEAN
);
pointMap
->
add_register
(
"FPGA_pps_present_R"
,
PPS_PRESENT
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_BOOLEAN
);
pointMap
->
add_register
(
"FPGA_pps_capture_cnt_R"
,
PPS_CAPTURE_CNT
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_UINT32
);
pointMap
->
add_register
(
"FPGA_pps_capture_cnt_R"
,
PPS_CAPTURE_CNT
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_UINT32
);
pointMap
->
add_register
(
"FPGA_pps_error_cnt_R"
,
PPS_ERROR_CNT
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_UINT32
);
pointMap
->
add_register
(
"FPGA_monitor_pps_offset_time_R"
,
MONITOR_PPS_OFFSET_TIME
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_DOUBLE
);
pointMap
->
add_register
(
"FPGA_monitor_pps_offset_time_R"
,
MONITOR_PPS_OFFSET_TIME
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_DOUBLE
);
pointMap
->
add_register
(
"FPGA_time_since_last_pps_R"
,
TIME_SINCE_LAST_PPS
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_DOUBLE
);
pointMap
->
add_register
(
"FPGA_time_since_last_pps_R"
,
TIME_SINCE_LAST_PPS
,
nFpgas
,
1
,
"RO"
,
REG_FORMAT_DOUBLE
);
...
...
This diff is collapsed.
Click to expand it.
src/periph/fpga.cpp
+
18
−
3
View file @
68d95553
...
@@ -117,6 +117,7 @@ Periph_fpga::Periph_fpga(uint global_nr, string ipaddr, uint udpport, uint n_fil
...
@@ -117,6 +117,7 @@ Periph_fpga::Periph_fpga(uint global_nr, string ipaddr, uint udpport, uint n_fil
pps_expected_cnt
(
0
),
pps_expected_cnt
(
0
),
pps_present
(
false
),
pps_present
(
false
),
pps_capture_cnt
(
0
),
pps_capture_cnt
(
0
),
pps_error_cnt
(
0
),
xst_ring_rx_bsn
{
0
},
xst_ring_rx_bsn
{
0
},
xst_ring_rx_nof_packets
{
0
},
xst_ring_rx_nof_packets
{
0
},
xst_ring_rx_nof_valid
{
0
},
xst_ring_rx_nof_valid
{
0
},
...
@@ -248,6 +249,7 @@ bool Periph_fpga::clear_fw_values()
...
@@ -248,6 +249,7 @@ bool Periph_fpga::clear_fw_values()
pps_expected_cnt
=
0
;
pps_expected_cnt
=
0
;
pps_present
=
false
;
pps_present
=
false
;
pps_capture_cnt
=
0
;
pps_capture_cnt
=
0
;
pps_error_cnt
=
0
;
xst_aligned_bsn
=
0
;
xst_aligned_bsn
=
0
;
xst_aligned_nof_packets
=
0
;
xst_aligned_nof_packets
=
0
;
xst_aligned_nof_valid
=
0
;
xst_aligned_nof_valid
=
0
;
...
@@ -401,6 +403,9 @@ bool Periph_fpga::read(char *data, const uint32_t cmd_id)
...
@@ -401,6 +403,9 @@ bool Periph_fpga::read(char *data, const uint32_t cmd_id)
case
PPS_CAPTURE_CNT
:
case
PPS_CAPTURE_CNT
:
retval
=
read_pps_capture_cnt
(
data
,
R_MEM
);
retval
=
read_pps_capture_cnt
(
data
,
R_MEM
);
break
;
break
;
case
PPS_ERROR_CNT
:
retval
=
read_pps_error_cnt
(
data
);
break
;
case
TIME_SINCE_LAST_PPS
:
case
TIME_SINCE_LAST_PPS
:
retval
=
read_time_since_last_pps
(
data
);
retval
=
read_time_since_last_pps
(
data
);
break
;
break
;
...
@@ -3819,11 +3824,13 @@ bool Periph_fpga::read_pps_capture_cnt(char *data, int mode)
...
@@ -3819,11 +3824,13 @@ bool Periph_fpga::read_pps_capture_cnt(char *data, int mode)
retval
=
Read
(
"mm/0/PIO_PPS/0/capture_cnt"
,
&
sdp_data
);
retval
=
Read
(
"mm/0/PIO_PPS/0/capture_cnt"
,
&
sdp_data
);
pps_capture_cnt
=
sdp_data
;
pps_capture_cnt
=
sdp_data
;
// check if capture count is as expected, and set pps_present
// check if capture count is as expected, and set pps_present
pps_present
=
false
;
if
(
pps_capture_cnt
==
pps_expected_cnt
)
{
if
(
pps_capture_cnt
==
pps_expected_cnt
)
{
pps_present
=
true
;
pps_present
=
true
;
}
}
else
{
pps_present
=
false
;
pps_error_cnt
++
;
}
}
}
uint32_t
*
_ptr
=
(
uint32_t
*
)
data
;
uint32_t
*
_ptr
=
(
uint32_t
*
)
data
;
...
@@ -3831,6 +3838,14 @@ bool Periph_fpga::read_pps_capture_cnt(char *data, int mode)
...
@@ -3831,6 +3838,14 @@ bool Periph_fpga::read_pps_capture_cnt(char *data, int mode)
return
retval
;
return
retval
;
}
}
bool
Periph_fpga
::
read_pps_error_cnt
(
char
*
data
)
{
bool
retval
=
true
;
uint32_t
*
_ptr
=
(
uint32_t
*
)
data
;
*
_ptr
=
pps_error_cnt
;
return
retval
;
}
bool
Periph_fpga
::
read_time_since_last_pps
(
char
*
data
)
bool
Periph_fpga
::
read_time_since_last_pps
(
char
*
data
)
{
{
bool
retval
=
true
;
bool
retval
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/periph/fpga.h
+
5
−
2
View file @
68d95553
...
@@ -57,8 +57,9 @@
...
@@ -57,8 +57,9 @@
#define PPS_PRESENT 100
#define PPS_PRESENT 100
#define PPS_EXPECTED_CNT 101
#define PPS_EXPECTED_CNT 101
#define PPS_CAPTURE_CNT 102
#define PPS_CAPTURE_CNT 102
#define TIME_SINCE_LAST_PPS 103
#define PPS_ERROR_CNT 103
#define MONITOR_PPS_OFFSET_TIME 104
#define TIME_SINCE_LAST_PPS 104
#define MONITOR_PPS_OFFSET_TIME 105
#define PROCESSING_ENABLE 110
#define PROCESSING_ENABLE 110
#define SIGNAL_INPUT_BSN 120
#define SIGNAL_INPUT_BSN 120
#define SIGNAL_INPUT_NOF_BLOCKS 121
#define SIGNAL_INPUT_NOF_BLOCKS 121
...
@@ -271,6 +272,7 @@ private:
...
@@ -271,6 +272,7 @@ private:
uint32_t
pps_expected_cnt
;
uint32_t
pps_expected_cnt
;
bool
pps_present
;
bool
pps_present
;
uint32_t
pps_capture_cnt
;
uint32_t
pps_capture_cnt
;
uint32_t
pps_error_cnt
;
int64_t
xst_ring_rx_bsn
[
C_N_pn_max
];
int64_t
xst_ring_rx_bsn
[
C_N_pn_max
];
int32_t
xst_ring_rx_nof_packets
[
C_N_pn_max
];
int32_t
xst_ring_rx_nof_packets
[
C_N_pn_max
];
int32_t
xst_ring_rx_nof_valid
[
C_N_pn_max
];
int32_t
xst_ring_rx_nof_valid
[
C_N_pn_max
];
...
@@ -489,6 +491,7 @@ private:
...
@@ -489,6 +491,7 @@ private:
bool
write_pps_expected_cnt
(
const
char
*
data
);
bool
write_pps_expected_cnt
(
const
char
*
data
);
bool
read_pps_present
(
char
*
data
,
int
mode
);
bool
read_pps_present
(
char
*
data
,
int
mode
);
bool
read_pps_capture_cnt
(
char
*
data
,
int
mode
);
bool
read_pps_capture_cnt
(
char
*
data
,
int
mode
);
bool
read_pps_error_cnt
(
char
*
data
);
bool
read_time_since_last_pps
(
char
*
data
);
bool
read_time_since_last_pps
(
char
*
data
);
bool
read_monitor_pps_offset_time
(
char
*
data
,
int
mode
);
bool
read_monitor_pps_offset_time
(
char
*
data
,
int
mode
);
bool
write_wdi_override
(
char
*
data
);
bool
write_wdi_override
(
char
*
data
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment