projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b6ba37
)
cpu_interface: Fix indenting on constant generation.
author
Tim 'mithro' Ansell
<me@mith.ro>
Sat, 13 Jan 2018 08:05:26 +0000
(19:05 +1100)
committer
Tim 'mithro' Ansell
<me@mith.ro>
Sat, 13 Jan 2018 08:05:26 +0000
(19:05 +1100)
This was preventing constants from getting added to the csr.h header
file.
litex/soc/integration/cpu_interface.py
patch
|
blob
|
history
diff --git
a/litex/soc/integration/cpu_interface.py
b/litex/soc/integration/cpu_interface.py
index 5245454486d705284c18021034f2543b46bda54d..38c5d5e724b8a8efcca96edb9d6173785f27e535 100644
(file)
--- a/
litex/soc/integration/cpu_interface.py
+++ b/
litex/soc/integration/cpu_interface.py
@@
-144,10
+144,10
@@
def get_csr_header(regions, constants, with_access_functions=True):
else:
value = str(value)
ctype = "int"
-
r += "#define "+name+" "+value+"\n"
-
if with_access_functions:
-
r += "static inline "+ctype+" "+name.lower()+"_read(void) {\n"
-
r += "\treturn "+value+";\n}\n"
+ r += "#define "+name+" "+value+"\n"
+ if with_access_functions:
+ r += "static inline "+ctype+" "+name.lower()+"_read(void) {\n"
+ r += "\treturn "+value+";\n}\n"
r += "\n#endif\n"
return r