From ed5bdf3c233ae3d644d88d608da12e772cd385c4 Mon Sep 17 00:00:00 2001 From: Wei Song Date: Thu, 28 Apr 2016 16:31:56 +0100 Subject: [PATCH] print the base address of each SCR as indicated --- uncore/src/main/scala/scr.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uncore/src/main/scala/scr.scala b/uncore/src/main/scala/scr.scala index f076364d..29a591af 100644 --- a/uncore/src/main/scala/scr.scala +++ b/uncore/src/main/scala/scr.scala @@ -29,9 +29,11 @@ class SCRFileMap(prefix: String, maxAddress: Int, baseAddress: BigInt) { def as_c_header(): String = { addr2name.map{ case(address, name) => - "#define " + prefix + "__" + name + "__PADDR 0x%x".format(baseAddress + address) - "#define " + prefix + "__" + name + "__OFFSET 0x%x".format(address) - }.mkString("\n") + "\n" + List( + "#define " + prefix + "__" + name + "__PADDR 0x%x".format(baseAddress + address), + "#define " + prefix + "__" + name + "__OFFSET 0x%x".format(address) + ) + }.flatten.mkString("\n") + "\n" } }