diff -r eee83900b2d6 -r aa9fb672e168 src/mem/bus.cc --- a/src/mem/bus.cc Thu Sep 20 14:24:45 2012 +0100 +++ b/src/mem/bus.cc Thu Sep 20 14:42:16 2012 +0100 @@ -61,15 +61,7 @@ useDefaultRange(p->use_default_range), defaultBlockSize(p->block_size), cachedBlockSize(0), cachedBlockSizeValid(false) -{ - //width, clock period, and header cycles must be positive - if (width <= 0) - fatal("Bus width must be positive\n"); - if (clock <= 0) - fatal("Bus clock period must be positive\n"); - if (headerCycles <= 0) - fatal("Number of header cycles must be positive\n"); -} +{} BaseBus::~BaseBus() { diff -r eee83900b2d6 -r aa9fb672e168 src/mem/Bus.py --- a/src/mem/Bus.py Thu Sep 20 14:24:45 2012 +0100 +++ b/src/mem/Bus.py Thu Sep 20 14:42:16 2012 +0100 @@ -50,9 +50,9 @@ # Override the default clock clock = '1GHz' header_cycles = Param.Cycles(1, "cycles of overhead per transaction") - width = Param.Int(8, "bus width (bytes)") - block_size = Param.Int(64, "The default block size if not set by " \ - "any connected module") + width = Param.Unsigned(8, "bus width (bytes)") + block_size = Param.Unsigned(64, "The default block size if not set by " \ + "any connected module") # The default port can be left unconnected, or be used to connect # a default slave port diff -r eee83900b2d6 -r aa9fb672e168 src/mem/bus.hh --- a/src/mem/bus.hh Thu Sep 20 14:24:45 2012 +0100 +++ b/src/mem/bus.hh Thu Sep 20 14:42:16 2012 +0100 @@ -228,9 +228,9 @@ }; /** cycles of overhead per transaction */ - int headerCycles; + const Cycles headerCycles; /** the width of the bus in bytes */ - int width; + const uint32_t width; typedef AddrRangeMap::iterator PortMapIter; typedef AddrRangeMap::const_iterator PortMapConstIter; @@ -346,10 +346,10 @@ address not handled by another port and not in default device's range will cause a fatal error. If false, just send all addresses not handled by another port to default device. */ - bool useDefaultRange; + const bool useDefaultRange; - unsigned defaultBlockSize; - unsigned cachedBlockSize; + const uint32_t defaultBlockSize; + uint32_t cachedBlockSize; bool cachedBlockSizeValid; BaseBus(const BaseBusParams *p);