From e74b7f7ebe291585d5f91a82eddcbd1632f1a6db Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 27 Mar 2024 16:49:09 +0100 Subject: [PATCH] integration/export: Fix MockCSRRegion C header export. Use full address for export since when used, CSR_BASE is related to the top level SoC and not to the imported external mapping. --- litex/soc/integration/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/integration/export.py b/litex/soc/integration/export.py index f04b03fef..5a0475cec 100644 --- a/litex/soc/integration/export.py +++ b/litex/soc/integration/export.py @@ -279,7 +279,7 @@ def get_csr_header(regions, constants, csr_base=None, with_csr_base_define=True, alignment = alignment, read_only = getattr(csr, "read_only", False), csr_base = csr_base, - with_csr_base_define = with_csr_base_define, + with_csr_base_define = with_csr_base_define and (not isinstance(region, MockCSRRegion)), with_access_functions = with_access_functions, ) origin += alignment//8*nr