Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
Production Test Suite
Commits
cd5c1e14
Commit
cd5c1e14
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
ef7f55d7
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 @
cd5c1e14
...
...
@@ -130,3 +130,9 @@ class CCSR:
print
" -
%-48
s:0x
%
X (
%
d)"
%
(
field
[
1
][
1
],
value
,
value
)
if
(
len
(
reg
[
1
][
2
])
!=
0
):
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