Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite - base
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
1
Merge Requests
1
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
Production Test Suite - base
Commits
f582ba4d
Commit
f582ba4d
authored
Dec 07, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common:gn4124: Add function to print all dma items for debug.
parent
ccfcfda4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
gn4124.py
common/gn4124.py
+16
-0
No files found.
common/gn4124.py
View file @
f582ba4d
...
@@ -204,6 +204,22 @@ class CGN4124:
...
@@ -204,6 +204,22 @@ class CGN4124:
self
.
wr_reg
(
self
.
HOST_BAR
,
self
.
HOST_DMA_ATTRIB
+
current_item_addr
,
attrib
)
self
.
wr_reg
(
self
.
HOST_BAR
,
self
.
HOST_DMA_ATTRIB
+
current_item_addr
,
attrib
)
self
.
dma_item_cnt
+=
1
self
.
dma_item_cnt
+=
1
# Print all DMA items
def
print_dma_items
(
self
):
print
(
"Host memory page addresses:"
)
for
page
in
self
.
pages
:
print
(
"0x
%
x"
%
page
)
print
(
"First item (in FPGA):"
)
for
addr
in
range
(
0x0
,
0x24
,
0x4
):
print
(
"0x
%02
X: 0x
%08
X"
%
(
addr
,
self
.
dma_csr
.
rd_reg
(
addr
)))
print
(
"Items in host memory:"
)
for
item
in
range
(
self
.
PAGE_SIZE
/
0x20
):
print
(
"Item
%
d:"
%
item
)
for
addr
in
range
(
0x0
,
0x20
,
0x4
):
print
(
"0x
%02
X: 0x
%08
X"
%
(
item
*
0x20
+
addr
,
self
.
rd_reg
(
self
.
HOST_BAR
,
item
*
0x20
+
addr
)))
# Start DMA transfer
# Start DMA transfer
def
start_dma
(
self
):
def
start_dma
(
self
):
self
.
dma_item_cnt
=
0
self
.
dma_item_cnt
=
0
...
...
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