From: Robert Jordens Date: Fri, 8 Nov 2013 07:25:38 +0000 (-0700) Subject: cpuif.py: add _ADDR and _SIZE defines for each register X-Git-Tag: 24jan2021_ls180~2823 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05944cf9097d60179b6b276d7fcfaf87e842706b;p=litex.git cpuif.py: add _ADDR and _SIZE defines for each register Signed-off-by: Robert Jordens --- diff --git a/misoclib/cpuif.py b/misoclib/cpuif.py index b2467741..5c30289c 100644 --- a/misoclib/cpuif.py +++ b/misoclib/cpuif.py @@ -2,6 +2,10 @@ from migen.bank.description import CSRStatus def _get_rw_functions(reg_name, reg_base, size, read_only): r = "" + + r += "#define CSR_"+reg_name.upper()+"_ADDR "+hex(reg_base)+"\n" + r += "#define CSR_"+reg_name.upper()+"_SIZE "+str(size)+"\n" + if size > 8: raise NotImplementedError("Register too large") elif size > 4: