summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Nash <benash@umich.edu>2005-07-01 13:06:35 -0400
committerBenjamin Nash <benash@umich.edu>2005-07-01 13:06:35 -0400
commit81b57af24118ad61329a848b3b66874e6e05ecb9 (patch)
treef847a6ce99a64466aac95b6b344eb136c843070b
parent6cf1740bf5be924a58178a6d53500110e068b656 (diff)
downloadgem5-81b57af24118ad61329a848b3b66874e6e05ecb9.tar.xz
Fix formatting, move default size (0x8) of TsunamiFake from C++ code to Python code.
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
-rw-r--r--dev/ide_disk.cc59
-rw-r--r--python/m5/objects/Tsunami.py2
2 files changed, 32 insertions, 29 deletions
diff --git a/dev/ide_disk.cc b/dev/ide_disk.cc
index 7096c6948..3d7bd19c0 100644
--- a/dev/ide_disk.cc
+++ b/dev/ide_disk.cc
@@ -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);
diff --git a/python/m5/objects/Tsunami.py b/python/m5/objects/Tsunami.py
index 8e16d5d1e..dd52bd11d 100644
--- a/python/m5/objects/Tsunami.py
+++ b/python/m5/objects/Tsunami.py
@@ -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'