Commit 9c7e6c41 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

C headers : add RAM base address define

parent 04a79f31
......@@ -57,6 +57,7 @@ function cgen_c_ramdefs(ram)
emit("/* definitions for RAM: "..ram.name.." */");
emit(string.format("#define "..prefix.."_BASE 0x%08x %-50s", ram.base * DATA_BUS_WIDTH/8, "/* base address */"));
emit(string.format("#define "..prefix.."_BYTES 0x%08x %-50s", ram.size * ram.width / 8, "/* size in bytes */"));
emit(string.format("#define "..prefix.."_WORDS 0x%08x %-50s", ram.size, "/* size in "..ram.width.."-bit words, 32-bit aligned */"));
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment