integration/export: do not include soc.h in csr.h when with_access_functions=False
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 7 Nov 2019 08:02:31 +0000 (09:02 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 7 Nov 2019 08:02:31 +0000 (09:02 +0100)
Idealy we should have another parameter for that.

litex/soc/integration/export.py

index 4fa5fb1c6fae3c8b0d5ad3ecda1c2503dffb66ad..ed3abcb6069eb6c4a35969bbe8110f1bad8c1af9 100644 (file)
@@ -180,7 +180,8 @@ def _get_rw_functions_c(reg_name, reg_base, nwords, busword, alignment, read_onl
 def get_csr_header(regions, constants, with_access_functions=True):
     alignment = constants.get("CONFIG_CSR_ALIGNMENT", 32)
     r = generated_banner("//")
-    r += "#include <generated/soc.h>\n"
+    if with_access_functions: # FIXME
+        r += "#include <generated/soc.h>\n"
     r += "#ifndef __GENERATED_CSR_H\n#define __GENERATED_CSR_H\n"
     if with_access_functions:
         r += "#include <stdint.h>\n"