summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-11-11 11:58:09 -0800
committerGabe Black <gblack@eecs.umich.edu>2010-11-11 11:58:09 -0800
commit46472279c0eac0bb0d9c511adbf57686cc2eadf3 (patch)
tree49c75e9c5b3ca40a3038fc4874645b2104c87791
parent3c237f44c9cff846216ee2947605af4ffb8ee601 (diff)
downloadgem5-46472279c0eac0bb0d9c511adbf57686cc2eadf3.tar.xz
Params: Fix an off by one error and a misleading comment.
-rw-r--r--src/python/m5/params.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index ca75472b0..33ac742c8 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -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)