Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
300702a4
Commit
300702a4
authored
7 years ago
by
Maciej Lipinski
Committed by
Adam Wujek
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[tools] added verification of WB version (SW vs. GW)
parent
59e6659c
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/wr-streamers.c
+21
-0
21 additions, 0 deletions
tools/wr-streamers.c
tools/wrpc-diags.c
+21
-0
21 additions, 0 deletions
tools/wrpc-diags.c
with
42 additions
and
0 deletions
tools/wr-streamers.c
+
21
−
0
View file @
300702a4
...
...
@@ -446,6 +446,20 @@ static void sig_hndl()
exit
(
1
);
}
static
int
verify_reg_version
()
{
volatile
struct
WR_STREAMERS_WB
*
ptr
=
(
volatile
struct
WR_STREAMERS_WB
*
)
wrstm
->
base
;
uint32_t
ver
=
0
;
ver
=
iomemr32
(
wrstm
->
is_be
,
ptr
->
VER
);
fprintf
(
stderr
,
"Wishbone register version: in FPGA = 0x%x |"
" in SW = 0x%x
\n
"
,
ver
,
WBGEN2_WR_STREAMERS_VERSION
);
if
(
ver
!=
WBGEN2_WR_STREAMERS_VERSION
)
return
-
1
;
else
return
0
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
ret
;
...
...
@@ -465,6 +479,13 @@ int main(int argc, char *argv[])
return
-
1
;
}
ret
=
verify_reg_version
();
if
(
ret
)
{
fprintf
(
stderr
,
"Register version in FPGA and SW does not match
\n
"
);
dev_unmap
(
wrstm
);
return
-
1
;
}
ret
=
extest_register_user_cmd
(
wrstm_cmd
,
WRSTM_CMD_NB
);
if
(
ret
)
{
dev_unmap
(
wrstm
);
...
...
This diff is collapsed.
Click to expand it.
tools/wrpc-diags.c
+
21
−
0
View file @
300702a4
...
...
@@ -344,6 +344,20 @@ struct cmd_desc wrcdiag_cmd[WRCDIAG_CMD_NB + 1] = {
{
0
,
},
};
static
int
verify_reg_version
()
{
volatile
struct
WRC_DIAGS_WB
*
ptr
=
(
volatile
struct
WRC_DIAGS_WB
*
)
wrcdiag
->
base
;
uint32_t
ver
=
0
;
ver
=
iomemr32
(
wrcdiag
->
is_be
,
ptr
->
VER
);
fprintf
(
stderr
,
"Wishbone register version: in FPGA = 0x%x |"
" in SW = 0x%x
\n
"
,
ver
,
WBGEN2_WRC_DIAGS_VERSION
);
if
(
ver
!=
WBGEN2_WRC_DIAGS_VERSION
)
return
-
1
;
else
return
0
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
ret
;
...
...
@@ -363,6 +377,13 @@ int main(int argc, char *argv[])
return
-
1
;
}
ret
=
verify_reg_version
();
if
(
ret
)
{
fprintf
(
stderr
,
"Register version in FPGA and SW does not match
\n
"
);
dev_unmap
(
wrcdiag
);
return
-
1
;
}
ret
=
extest_register_user_cmd
(
wrcdiag_cmd
,
WRCDIAG_CMD_NB
);
if
(
ret
)
{
dev_unmap
(
wrcdiag
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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