From f1714405c321bb8265201d86a336e7cfe8afa470 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 7 Nov 2019 09:02:31 +0100 Subject: [PATCH] integration/export: do not include soc.h in csr.h when with_access_functions=False Idealy we should have another parameter for that. --- litex/soc/integration/export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litex/soc/integration/export.py b/litex/soc/integration/export.py index 4fa5fb1c6..ed3abcb60 100644 --- a/litex/soc/integration/export.py +++ b/litex/soc/integration/export.py @@ -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 \n" + if with_access_functions: # FIXME + r += "#include \n" r += "#ifndef __GENERATED_CSR_H\n#define __GENERATED_CSR_H\n" if with_access_functions: r += "#include \n"