Skip to content

Commit

Permalink
integration/export: Fix get_csr_header/base_define when with_csr_base…
Browse files Browse the repository at this point in the history
…_define is set to False.
  • Loading branch information
enjoy-digital committed May 6, 2024
1 parent 76a7043 commit 86a43c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litex/soc/integration/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_csr_header(regions, constants, csr_base=None, with_csr_base_define=True,
r += "#endif\n"
for name, region in regions.items():
origin = region.origin - _csr_base
base_define = not isinstance(region, MockCSRRegion)
base_define = with_csr_base_define and (not isinstance(region, MockCSRRegion))
r += "\n/* "+name+" */\n"
r += f"#define CSR_{name.upper()}_BASE {_get_csr_addr(csr_base, origin, base_define)}\n"
if not isinstance(region.obj, Memory):
Expand Down

0 comments on commit 86a43c9

Please sign in to comment.