changeset f440cdaf1c2d in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=f440cdaf1c2d
description:
        Params: Fix an off by one error and a misleading comment.

diffstat:

 src/python/m5/params.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 611fe187288e -r f440cdaf1c2d src/python/m5/params.py
--- a/src/python/m5/params.py   Thu Nov 11 11:41:13 2010 -0800
+++ b/src/python/m5/params.py   Thu Nov 11 11:58:09 2010 -0800
@@ -658,7 +658,7 @@
             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 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)
 
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to