cpuif.py: add _ADDR and _SIZE defines for each register
Signed-off-by: Robert Jordens <jordens@gmail.com>
This commit is contained in:
parent
5c5e62cc0d
commit
05944cf909
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue