Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Dmytro Levit
Software
Commits
20bb25c4
Commit
20bb25c4
authored
4 years ago
by
Satoru Yamada
Browse files
Options
Downloads
Patches
Plain Diff
Convert pcie40_dma_check with C++.
parent
19f4dfe8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
6links
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Pcie40Applications/Makefile
+1
-1
1 addition, 1 deletion
Pcie40Applications/Makefile
Pcie40Applications/main_pcie40_dma.cpp
+18
-2
18 additions, 2 deletions
Pcie40Applications/main_pcie40_dma.cpp
with
19 additions
and
3 deletions
Pcie40Applications/Makefile
+
1
−
1
View file @
20bb25c4
...
...
@@ -59,7 +59,7 @@ PCIE40_UL_LDFLAGS = -L../Pcie40Libraries/lib -lpcie40 -L../Pcie40DriverLibraries
PCIE40_DMA_CHECK
:=
pcie40_dma_check
PCIE40_DMA_CHECK_OBJS
=
main_pcie40_dma_check.o
PCIE40_DMA_CHECK_CFLAGS
=
$(
CFLAGS
)
-I
$(
TOP
)
-I
$(
TOP
)
/../Pcie40Driver
PCIE40_DMA_CHECK_C
XX
FLAGS
=
$(
CFLAGS
)
-I
$(
TOP
)
-I
$(
TOP
)
/../Pcie40Driver
PCIE40_DMA_CHECK_INSTALL
=
$(
PREFIX
)
/bin
PCIE40_DMA_CHECK_LDFLAGS
=
-L
../Pcie40Libraries/lib
-lpcie40
-L
../Pcie40DriverLibraries/
-lpcie40driver_ecs
...
...
This diff is collapsed.
Click to expand it.
Pcie40Applications/main_pcie40_dma.cpp
+
18
−
2
View file @
20bb25c4
...
...
@@ -17,13 +17,29 @@ int main (int argc ,char** argv) {
else
printf
(
"SUCCESS: Device opened for ECS
\n
"
);
// Read DMA
res
=
pcie40_b2dmabufferreset
(
0
)
;
unsigned
int
*
data
;
// unsigned int data[ DMASIZE ] = { 0 } ;
unsigned
int
*
data
;
int
cnt
=
0
;
while
(
1
){
printf
(
"Reading... %d
\n
"
,
cnt
);
res
=
pcie40_b2dmapointerread
(
0
,
&
data
)
;
int
i
=
0
;
if
(
res
==
0
)
printf
(
"DMA Error
\n
"
)
;
else
{
for
(
i
=
0
;
i
<
DMASIZE
;
i
++
)
printf
(
"0X%08x
\n
"
,
data
[
i
]);
printf
(
"00000000 "
);
for
(
i
=
0
;
i
<
DMASIZE
;
i
++
){
printf
(
"%08x "
,
data
[
i
]);
if
(
(
i
%
8
)
==
7
){
printf
(
"
\n
"
);
printf
(
"%.8x "
,
i
+
1
);
}
}
}
usleep
(
500000
);
cnt
++
;
}
//
ecs_close
(
0
,
0
)
;
ecs_close
(
0
,
2
)
;
...
...
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