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
4
Merge Requests
4
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
300702a4
Commit
300702a4
authored
Jun 20, 2017
by
Maciej Lipinski
Committed by
Adam Wujek
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tools] added verification of WB version (SW vs. GW)
parent
59e6659c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
wr-streamers.c
tools/wr-streamers.c
+21
-0
wrpc-diags.c
tools/wrpc-diags.c
+21
-0
No files found.
tools/wr-streamers.c
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
);
...
...
tools/wrpc-diags.c
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
);
...
...
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