Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pts-base
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor 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
This is an archived project. Repository and other project resources are read-only.
misc
pts-base
Commits
f582ba4d
Commit
f582ba4d
authored
12 years ago
by
Matthieu Cattin
Browse files
Options
Downloads
Patches
Plain Diff
common:gn4124: Add function to print all dma items for debug.
parent
ccfcfda4
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/gn4124.py
+16
-0
16 additions, 0 deletions
common/gn4124.py
with
16 additions
and
0 deletions
common/gn4124.py
+
16
−
0
View file @
f582ba4d
...
...
@@ -204,6 +204,22 @@ class CGN4124:
self
.
wr_reg
(
self
.
HOST_BAR
,
self
.
HOST_DMA_ATTRIB
+
current_item_addr
,
attrib
)
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%02X: 0x%08X
"
%
(
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%02X: 0x%08X
"
%
(
item
*
0x20
+
addr
,
self
.
rd_reg
(
self
.
HOST_BAR
,
item
*
0x20
+
addr
)))
# Start DMA transfer
def
start_dma
(
self
):
self
.
dma_item_cnt
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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