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
f765433c
Commit
f765433c
authored
May 11, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csr: Add function to get a register address.
parent
9bf9462d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
csr.py
common/csr.py
+6
-0
No files found.
common/csr.py
View file @
f765433c
...
@@ -130,3 +130,9 @@ class CCSR:
...
@@ -130,3 +130,9 @@ class CCSR:
print
" -
%-48
s:0x
%
X (
%
d)"
%
(
field
[
1
][
1
],
value
,
value
)
print
" -
%-48
s:0x
%
X (
%
d)"
%
(
field
[
1
][
1
],
value
,
value
)
if
(
len
(
reg
[
1
][
2
])
!=
0
):
if
(
len
(
reg
[
1
][
2
])
!=
0
):
print
''
print
''
def
get_reg_addr
(
self
,
reg
):
if
(
reg
in
self
.
reg_map
[
1
]):
# test if register exist in register map
return
self
.
reg_map
[
1
][
reg
][
0
]
else
:
raise
CSRDeviceOperationError
(
self
.
base_addr
,
self
.
reg_map
,
'Requested register (
%
s) doesn
\'
t exist.'
%
reg
)
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