From f6f73cf13ca5b30a91d8a775aaa6daeb234cb66b Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Sat, 13 Jan 2018 19:05:26 +1100 Subject: [PATCH] cpu_interface: Fix indenting on constant generation. This was preventing constants from getting added to the csr.h header file. --- litex/soc/integration/cpu_interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litex/soc/integration/cpu_interface.py b/litex/soc/integration/cpu_interface.py index 524545448..38c5d5e72 100644 --- 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