From: Florent Kermarrec Date: Thu, 7 Nov 2019 08:02:31 +0000 (+0100) Subject: integration/export: do not include soc.h in csr.h when with_access_functions=False X-Git-Tag: 24jan2021_ls180~877 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1714405c321bb8265201d86a336e7cfe8afa470;p=litex.git integration/export: do not include soc.h in csr.h when with_access_functions=False Idealy we should have another parameter for that. --- diff --git a/litex/soc/integration/export.py b/litex/soc/integration/export.py index 4fa5fb1c..ed3abcb6 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"