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
fbdab872
Commit
fbdab872
authored
3 years ago
by
Pieter Donker
Browse files
Options
Downloads
Patches
Plain Diff
L2SDP-436
, made some changes to get it working
parent
8c757c6c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!33
Resolve L2SDP-436
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/periph/fpga.cpp
+23
-3
23 additions, 3 deletions
src/periph/fpga.cpp
with
23 additions
and
3 deletions
src/periph/fpga.cpp
+
23
−
3
View file @
fbdab872
...
...
@@ -345,7 +345,7 @@ bool Periph_fpga::read(TermOutput& termout, const string addr,
retval
=
read_all_from_port
(
termout
,
"REG_SI"
,
"enable"
,
format
);
}
else
if
(
addr
==
"fpga/pps_expected_cnt"
)
{
retval
=
read_
all_from_port
(
termout
,
"PIO_PPS"
,
"
expected_cnt
"
,
format
);
retval
=
read_
pps_
expected_cnt
(
termout
,
format
);
}
else
if
(
addr
==
"fpga/pps_present"
)
{
retval
=
read_pps_present
(
termout
,
format
,
R_MEM
);
...
...
@@ -557,9 +557,11 @@ bool Periph_fpga::monitor(TermOutput& termout)
tictoc
.
tic
(
name
.
c_str
());
read_system_info
(
termout
);
// read_system_info() will set Online state.
if
(
Online
)
{
if
(
my_pps_expected_cnt
==
0
)
{
read_pps_expected_cnt
(
termout
,
REG_FORMAT_UINT32
);
}
read_time_since_last_pps
(
termout
,
REG_FORMAT_INT64
,
R_UCP
);
read_pps_capture_cnt
(
termout
,
REG_FORMAT_UINT32
,
R_UCP
);
read_pps_present
(
termout
,
REG_FORMAT_BOOLEAN
,
R_UCP
);
read_bsn_monitor_input_sync_timeout
(
termout
,
REG_FORMAT_INT64
,
R_UCP
);
read_bsn_monitor_input_bsn
(
termout
,
REG_FORMAT_INT64
,
R_UCP
);
read_xst_input_sync_at_bsn
(
termout
,
REG_FORMAT_INT64
,
R_UCP
);
...
...
@@ -2230,10 +2232,25 @@ bool Periph_fpga::read_all_from_port(TermOutput& termout, const string& port_nam
}*/
bool
Periph_fpga
::
read_pps_expected_cnt
(
TermOutput
&
termout
,
int
format
)
{
bool
retval
=
true
;
uint32_t
data
=
0
;
retval
=
Read
(
"mm/0/PIO_PPS/0/expected_cnt"
,
&
data
);
my_pps_expected_cnt
=
data
;
uint32_t
*
_ptr
=
(
uint32_t
*
)
termout
.
val
;
*
_ptr
=
my_pps_expected_cnt
;
termout
.
nof_vals
=
1
;
termout
.
datatype
=
format
;
return
retval
;
}
bool
Periph_fpga
::
write_pps_expected_cnt
(
const
char
*
data
)
{
uint32_t
*
_ptr
=
(
uint32_t
*
)
data
;
bool
retval
=
true
;
retval
=
Write
(
"mm/0/PIO_PPS/0/expected_cnt"
,
_ptr
);
return
retval
;
}
...
...
@@ -2257,7 +2274,10 @@ bool Periph_fpga::read_pps_capture_cnt(TermOutput& termout, int format, int mode
retval
=
Read
(
"mm/0/PIO_PPS/0/capture_cnt"
,
&
data
);
my_pps_capture_cnt
=
data
;
// check if capture count is as expected, and set pps_present
my_pps_present
=
(
my_pps_capture_cnt
==
my_pps_expected_cnt
);
my_pps_present
=
false
;
if
(
my_pps_capture_cnt
==
my_pps_expected_cnt
)
{
my_pps_present
=
true
;
}
}
uint32_t
*
_ptr
=
(
uint32_t
*
)
termout
.
val
;
...
...
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