projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
722edfe
)
Allow CSRElement objects to be autocompleted.
author
Tim 'mithro' Ansell
<mithro@mithis.com>
Fri, 16 Dec 2016 14:59:26 +0000
(15:59 +0100)
committer
Tim 'mithro' Ansell
<mithro@mithis.com>
Sat, 17 Dec 2016 13:14:53 +0000
(14:14 +0100)
litex/soc/tools/remote/csr_builder.py
patch
|
blob
|
history
diff --git
a/litex/soc/tools/remote/csr_builder.py
b/litex/soc/tools/remote/csr_builder.py
index fa170ea595c62079a44c7b829fe710733e9a867b..07edc61e2a83e589d8eb7d8a6dc9b14d5974f426 100644
(file)
--- a/
litex/soc/tools/remote/csr_builder.py
+++ b/
litex/soc/tools/remote/csr_builder.py
@@
-3,11
+3,15
@@
import csv
class CSRElements:
def __init__(self, d):
- self.d = d
+ self.__dict__.update(d)
+
+ @property
+ def d(self):
+ return self.__dict__
def __getattr__(self, attr):
try:
- return self.__dict__[
'd'][
attr]
+ return self.__dict__[attr]
except KeyError:
pass
raise KeyError("No such element " + attr)