Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 - Software
Commits
2e5183ef
Commit
2e5183ef
authored
Nov 27, 2012
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: allow mappings != A32/D32
parent
03eb030b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Makefile
tools/Makefile
+1
-0
vme.c
tools/vme.c
+6
-6
No files found.
tools/Makefile
View file @
2e5183ef
CFLAGS
+=
-g
-Wall
CFLAGS
+=
-I
/acc/src/dsc/drivers/coht/vmebridge/include/
LDFLAGS
+=
-L
/acc/local/L865/lib
LDLIBS
+=
-lvmebus
...
...
tools/vme.c
View file @
2e5183ef
...
...
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
struct
vme_mapping
map
;
struct
vme_mapping
*
mapp
=
&
map
;
volatile
void
*
ptr
;
unsigned
long
vmebase
,
am
,
data_width
;
unsigned
int
vmebase
,
am
,
data_width
;
int
i
,
count
;
int
c
;
int
write
,
offsets_on
;
...
...
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
data_width
=
strtoul
(
optarg
,
NULL
,
0
);
break
;
case
'a'
:
am
=
VME_A32_USER_DATA_SCT
;
am
=
strtoul
(
optarg
,
NULL
,
0
)
;
break
;
case
'n'
:
count
=
strtoul
(
optarg
,
NULL
,
0
);
...
...
@@ -66,8 +66,8 @@ int main(int argc, char *argv[])
memset
(
mapp
,
0
,
sizeof
(
*
mapp
));
mapp
->
am
=
VME_A32_USER_DATA_SCT
;
mapp
->
data_width
=
VME_D32
;
mapp
->
am
=
am
;
mapp
->
data_width
=
data_width
;
mapp
->
sizel
=
0x80000
;
mapp
->
vme_addrl
=
vmebase
;
...
...
@@ -76,12 +76,12 @@ int main(int argc, char *argv[])
exit
(
1
);
}
fprintf
(
stderr
,
"vme 0x%08x kernel 0x%
08x user 0x%08x
\n
"
,
fprintf
(
stderr
,
"vme 0x%08x kernel 0x%
p user 0x%p
\n
"
,
vmebase
,
mapp
->
kernel_va
,
mapp
->
user_va
);
for
(
i
=
0
;
i
<
count
;
i
++
,
ptr
+=
4
)
{
if
(
!
write
)
{
if
(
offsets_on
)
printf
(
"%
08x
: "
,
ptr
);
printf
(
"%
p
: "
,
ptr
);
printf
(
"%08x
\n
"
,
ntohl
(
*
(
uint32_t
*
)
ptr
));
}
else
{
*
(
uint32_t
*
)
ptr
=
htonl
(
word
);
...
...
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