Params: Fix an off by one error and a misleading comment.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 11 Nov 2010 19:58:09 +0000 (11:58 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 11 Nov 2010 19:58:09 +0000 (11:58 -0800)
src/python/m5/params.py

index ca75472b0ef61b51791f94098c3f5af5ea199a40..33ac742c8d6729c8a6fc1e9099eae9b67bb70bba 100644 (file)
@@ -658,7 +658,7 @@ class EthernetAddr(ParamValue):
             raise TypeError, 'invalid ethernet address %s' % value
 
         for byte in bytes:
-            if not 0 <= int(byte) <= 256:
+            if not 0 <= int(byte) <= 0xff:
                 raise TypeError, 'invalid ethernet address %s' % value
 
         self.value = value
@@ -1023,7 +1023,7 @@ class NetworkBandwidth(float,ParamValue):
 class MemoryBandwidth(float,ParamValue):
     cxx_type = 'float'
     def __new__(cls, value):
-        # we want the number of ticks per byte of data
+        # convert to bytes per second
         val = convert.toMemoryBandwidth(value)
         return super(cls, MemoryBandwidth).__new__(cls, val)