diff options
Diffstat (limited to 'python/m5')
-rw-r--r-- | python/m5/config.py | 10 | ||||
-rw-r--r-- | python/m5/convert.py | 10 | ||||
-rw-r--r-- | python/m5/objects/Root.mpy | 1 | ||||
-rw-r--r-- | python/m5/objects/SimConsole.mpy | 2 |
4 files changed, 12 insertions, 11 deletions
diff --git a/python/m5/config.py b/python/m5/config.py index a791bbebf..e260c57a7 100644 --- a/python/m5/config.py +++ b/python/m5/config.py @@ -1140,10 +1140,12 @@ class UInt32(CheckedInt): cppname = 'uint32_t'; size = 32; unsigned = True class Int64(CheckedInt): cppname = 'int64_t'; size = 64; unsigned = False class UInt64(CheckedInt): cppname = 'uint64_t'; size = 64; unsigned = True -class Counter(CheckedInt): cppname = 'Counter'; size = 64; unsigned = True -class Tick(CheckedInt): cppname = 'Tick'; size = 64; unsigned = True +class Counter(CheckedInt): cppname = 'Counter'; size = 64; unsigned = True +class Tick(CheckedInt): cppname = 'Tick'; size = 64; unsigned = True +class TcpPort(CheckedInt): cppname = 'uint16_t'; size = 16; unsigned = True +class UdpPort(CheckedInt): cppname = 'uint16_t'; size = 16; unsigned = True -class Percent(CheckedInt): cppname = 'int'; min = 0; max = 100 +class Percent(CheckedInt): cppname = 'int'; min = 0; max = 100 class MemorySize(CheckedInt): cppname = 'uint64_t' @@ -1283,7 +1285,7 @@ class NullSimObject(object): pass def _convert(cls, value): - if value == Nxone: + if value == None: return if isinstance(value, cls): diff --git a/python/m5/convert.py b/python/m5/convert.py index 6ccefd2fc..a89303687 100644 --- a/python/m5/convert.py +++ b/python/m5/convert.py @@ -153,15 +153,15 @@ def toNetworkBandwidth(value): raise TypeError, "wrong type '%s' should be str" % type(value) if value.endswith('Tbps'): - return float(value[:-3]) * tera + return float(value[:-4]) * tera elif value.endswith('Gbps'): - return float(value[:-3]) * giga + return float(value[:-4]) * giga elif value.endswith('Mbps'): - return float(value[:-3]) * mega + return float(value[:-4]) * mega elif value.endswith('kbps'): - return float(value[:-3]) * kilo + return float(value[:-4]) * kilo elif value.endswith('bps'): - return float(value[:-2]) + return float(value[:-3]) else: return float(value) diff --git a/python/m5/objects/Root.mpy b/python/m5/objects/Root.mpy index c535bd2dc..2493dc4ff 100644 --- a/python/m5/objects/Root.mpy +++ b/python/m5/objects/Root.mpy @@ -7,7 +7,6 @@ simobj Root(SimObject): type = 'Root' frequency = Param.RootFrequency('200MHz', "tick frequency") output_file = Param.String('cout', "file to dump simulator output to") - full_system = Param.Bool("Full system simulation?") hier = HierParams(do_data = False, do_events = True) checkpoint = Param.String('', "Checkpoint file") stats = Statistics() diff --git a/python/m5/objects/SimConsole.mpy b/python/m5/objects/SimConsole.mpy index 3588a949d..53ddaa25c 100644 --- a/python/m5/objects/SimConsole.mpy +++ b/python/m5/objects/SimConsole.mpy @@ -1,6 +1,6 @@ simobj ConsoleListener(SimObject): type = 'ConsoleListener' - port = Param.UInt16(3456, "listen port") + port = Param.TcpPort(3456, "listen port") simobj SimConsole(SimObject): type = 'SimConsole' |