diff --git a/misoclib/cpuif.py b/misoclib/cpuif.py index b24677416..5c30289c1 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: