soc/cpuif: fix CSR base generation for memories (name is already fullname)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Apr 2015 11:57:37 +0000 (13:57 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Apr 2015 11:57:37 +0000 (13:57 +0200)
misoclib/soc/cpuif.py

index be58bd8de1d798c00f422f1e775fc436f6d91b9a..737d2c71a432a96448496dfb921e4bc702180bf0 100644 (file)
@@ -72,8 +72,7 @@ def get_csr_header(regions, interrupt_map):
        r = "#ifndef __GENERATED_CSR_H\n#define __GENERATED_CSR_H\n#include <hw/common.h>\n"
        for name, origin, busword, obj in regions:
                if isinstance(obj, Memory):
-                       fullname = name + "_" + obj.name_override
-                       r += "#define CSR_"+fullname.upper()+"_BASE "+hex(origin)+"\n"
+                       r += "#define CSR_"+name.upper()+"_BASE "+hex(origin)+"\n"
                else:
                        r += "\n/* "+name+" */\n"
                        r += "#define CSR_"+name.upper()+"_BASE "+hex(origin)+"\n"