Fix formatting, move default size (0x8) of TsunamiFake from C++ code to Python code.
authorBenjamin Nash <benash@umich.edu>
Fri, 1 Jul 2005 17:06:35 +0000 (13:06 -0400)
committerBenjamin Nash <benash@umich.edu>
Fri, 1 Jul 2005 17:06:35 +0000 (13:06 -0400)
dev/ide_disk.cc:
    Fix formatting.  Panic if unexpected register type is given.
python/m5/objects/Tsunami.py:
    Add default size of TsunamiFake device.

--HG--
extra : convert_revision : 03a35a2f6468b95746cba41ce7e93afeeb70ccef

dev/ide_disk.cc
python/m5/objects/Tsunami.py

index 7096c6948c7e86a702cdf7733da65daac84455bd..3d7bd19c0e3ef9a550979507576d9680a96f59b1 100644 (file)
@@ -220,34 +220,34 @@ IdeDisk::read(const Addr &offset, RegType_t type)
         else if (offset == DATA_OFFSET)
             action = ACT_DATA_READ_SHORT;
 
-            switch (offset) {
-              case DATA_OFFSET:
-                data = cmdReg.data;
-                break;
-              case ERROR_OFFSET:
-                data = cmdReg.error;
-                break;
-              case NSECTOR_OFFSET:
-                data = cmdReg.sec_count;
-                break;
-              case SECTOR_OFFSET:
-                data = cmdReg.sec_num;
-                break;
-              case LCYL_OFFSET:
-                data = cmdReg.cyl_low;
-                break;
-              case HCYL_OFFSET:
-                data = cmdReg.cyl_high;
-                break;
-              case SELECT_OFFSET:
-                data = cmdReg.drive;
-                break;
-              case STATUS_OFFSET:
-                data = status;
-                break;
-              default:
-                panic("Invalid IDE command register offset: %#x\n", offset);
-            }
+        switch (offset) {
+          case DATA_OFFSET:
+            data = cmdReg.data;
+            break;
+          case ERROR_OFFSET:
+            data = cmdReg.error;
+            break;
+          case NSECTOR_OFFSET:
+            data = cmdReg.sec_count;
+            break;
+          case SECTOR_OFFSET:
+            data = cmdReg.sec_num;
+            break;
+          case LCYL_OFFSET:
+            data = cmdReg.cyl_low;
+            break;
+          case HCYL_OFFSET:
+            data = cmdReg.cyl_high;
+            break;
+          case SELECT_OFFSET:
+            data = cmdReg.drive;
+            break;
+          case STATUS_OFFSET:
+            data = status;
+            break;
+          default:
+            panic("Invalid IDE command register offset: %#x\n", offset);
+        }
     }
     else if (type == CONTROL_BLOCK) {
         if (offset != ALTSTAT_OFFSET)
@@ -255,6 +255,9 @@ IdeDisk::read(const Addr &offset, RegType_t type)
 
         data = status;
     }
+    else {
+        panic("Invalid IDE register type: %#x\n", type);
+    }
 
     if (action != ACT_NONE)
         updateState(action);
index 8e16d5d1e62c36c49e6fbd69833fcafff2277b81..dd52bd11d7a8d4b2ac4b2fc09094205eb46a3709 100644 (file)
@@ -13,7 +13,7 @@ class TsunamiCChip(FooPioDevice):
 
 class TsunamiFake(FooPioDevice):
     type = 'TsunamiFake'
-    size = Param.Addr("Size of address range")
+    size = Param.Addr(0x8, "Size of address range")
 
 class TsunamiIO(FooPioDevice):
     type = 'TsunamiIO'