new version of is_IO_Addr
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 27 Jul 2018 11:18:26 +0000 (12:18 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 27 Jul 2018 11:18:26 +0000 (12:18 +0100)
src/lib/MemoryMap.bsv

index 8d1c2a9..2ad44b3 100644 (file)
@@ -58,24 +58,24 @@ function Tuple2 #(Bool, Bit#(TLog#(Num_Slaves)))
 endfunction
 
 function Bool is_IO_Addr(Bit#(`PADDR) addr); // TODO Shuold be PADDR
-               if(addr>=`DebugBase && addr<=`DebugEnd)
-                       return (True);
-               else if(addr>=`SDRAMMemBase && addr<=`SDRAMMemEnd)
+        if(addr>=`DebugBase && addr<=`DebugEnd)
+            return (True);
+        else if(addr>=`SDRAMMemBase && addr<=`SDRAMMemEnd)
         `ifdef FlexBus
-                       return (True);
+                return (True);
         `else
-               return (False);
-               `endif
-               `ifdef BOOTROM
-                       else if(addr>=`BootRomBase && addr<=`BootRomEnd)
-                               return (False);
-               `endif
-               `ifdef TCMemory
-                       else if(addr>=`TCMBase && addr<=`TCMEnd)
-                               return (False);
-               `endif
-               else
-                       return True;
+            return (False);
+        `endif
+        `ifdef BOOTROM
+            else if(addr>=`BootRomBase && addr<=`BootRomEnd)
+                return (False);
+        `endif
+        `ifdef TCMemory
+            else if(addr>=`TCMBase && addr<=`TCMEnd)
+                return (False);
+        `endif
+        else
+            return True;
 endfunction
 
 endpackage