Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Simple VME FMC Carrier SVEC
Commits
e7b84b83
Commit
e7b84b83
authored
Jun 03, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vmedma.c: add --verbose, disp data in BE32.
parent
ea24fca9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
vmedma.c
software/vmecore_test/vmedma.c
+18
-4
No files found.
software/vmecore_test/vmedma.c
View file @
e7b84b83
...
...
@@ -132,6 +132,7 @@ static const struct option options[] =
{
"2e"
,
required_argument
,
0
,
'e'
},
{
"dump"
,
no_argument
,
0
,
'd'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
"verbose"
,
no_argument
,
0
,
'v'
},
{
"vbs"
,
required_argument
,
0
,
OPT_VBS
},
{
"pbs"
,
required_argument
,
0
,
OPT_PBS
},
{
NULL
,
0
,
0
,
0
}
...
...
@@ -146,9 +147,10 @@ main (int argc, char **argv)
int
c
;
void
*
buf
;
int
flag_dump
=
0
;
int
flag_verbose
=
0
;
enum
vme_2esst_mode
vmode
=
VME_2eVME
;
while
((
c
=
getopt_long
(
argc
,
argv
,
"a:m:n:e:dh"
,
while
((
c
=
getopt_long
(
argc
,
argv
,
"a:m:n:e:dh
v
"
,
options
,
NULL
))
!=
-
1
)
switch
(
c
)
{
...
...
@@ -176,6 +178,9 @@ main (int argc, char **argv)
case
'd'
:
flag_dump
=
1
;
break
;
case
'v'
:
flag_verbose
=
1
;
break
;
case
OPT_VBS
:
vbs
=
convert_block_size
(
optarg
);
break
;
...
...
@@ -204,8 +209,9 @@ main (int argc, char **argv)
return
2
;
}
printf
(
"INFO: test DMA for am 0x%02x, mode: %u (addr: 0x%08x, len: 0x%0x)
\n
"
,
am
,
vmode
,
addr
,
len
);
if
(
flag_verbose
)
printf
(
"INFO: test DMA for am 0x%02x, mode: %u (addr: 0x%08x, len: 0x%0x)
\n
"
,
am
,
vmode
,
addr
,
len
);
if
(
posix_memalign
(
&
buf
,
4096
,
len
)
!=
0
)
{
...
...
@@ -217,7 +223,15 @@ main (int argc, char **argv)
if
(
flag_dump
)
for
(
unsigned
i
=
0
;
i
<
len
;
i
+=
4
)
printf
(
"%08x: %08x
\n
"
,
addr
+
i
,
((
unsigned
int
*
)
buf
)[
i
>>
2
]);
{
unsigned
int
v
;
/* Read as BE32. */
v
=
(
buf
[
i
]
<<
24
)
|
(
buf
[
i
+
1
]
<<
16
)
|
(
buf
[
i
+
2
]
<<
8
)
|
buf
[
i
+
3
];
printf
(
"%08x: %08x
\n
"
,
addr
+
i
,
v
);
}
free
(
buf
);
...
...
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