projects
/
pinmux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab7e18b
)
add `define generator
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 20 Jul 2018 05:06:35 +0000
(06:06 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 20 Jul 2018 05:06:35 +0000
(06:06 +0100)
src/bsv/peripheral_gen.py
patch
|
blob
|
history
diff --git
a/src/bsv/peripheral_gen.py
b/src/bsv/peripheral_gen.py
index ab68dcbbe7cbae52da50d213aea0e99d4bb3d2cd..270bc80222b427c66acee2adf416536dfbc00915 100644
(file)
--- a/
src/bsv/peripheral_gen.py
+++ b/
src/bsv/peripheral_gen.py
@@
-1,6
+1,14
@@
class PBase(object):
pass
+ def axi_reg_def(self, start, name, idx):
+ name = name.upper()
+ offs = self.num_axi_regs32()*4
+ end = start + offs - 1
+ return (" `define%(name)s%(idx)dBase 'h%(start)08x'\n" \
+ " `define%(name)s%(idx)dEnd 'h%(end)08x'\n" % locals(),
+ offs)
+
class uart(PBase):
def importfn(self):