integration/export/_get_csr_addr: Add back parenthesis around CSR_BASE + X.

This commit is contained in:
Florent Kermarrec 2022-06-14 15:03:18 +02:00
parent 49d0463394
commit d1a456a545
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ def get_soc_header(constants, with_access_functions=True):
def _get_csr_addr(csr_base, addr, with_csr_base_define=True): def _get_csr_addr(csr_base, addr, with_csr_base_define=True):
if with_csr_base_define: if with_csr_base_define:
return f"CSR_BASE + {hex(addr)}L" return f"(CSR_BASE + {hex(addr)}L)"
else: else:
return f"{hex(csr_base + addr)}L" return f"{hex(csr_base + addr)}L"