params.py (12252:981c156ecdde) params.py (12253:6e1d5605e82e)
1# Copyright (c) 2012-2014, 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 1549 unchanged lines hidden (view full) ---

1558 def __new__(cls, value):
1559 value = convert.toCurrent(value)
1560 return super(cls, Current).__new__(cls, value)
1561
1562 def __init__(self, value):
1563 value = convert.toCurrent(value)
1564 super(Current, self).__init__(value)
1565
1# Copyright (c) 2012-2014, 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 1549 unchanged lines hidden (view full) ---

1558 def __new__(cls, value):
1559 value = convert.toCurrent(value)
1560 return super(cls, Current).__new__(cls, value)
1561
1562 def __init__(self, value):
1563 value = convert.toCurrent(value)
1564 super(Current, self).__init__(value)
1565
1566class Energy(Float):
1567 ex_str = "1pJ"
1568
1569 def __new__(cls, value):
1570 value = convert.toEnergy(value)
1571 return super(cls, Energy).__new__(cls, value)
1572
1573 def __init__(self, value):
1574 value = convert.toEnergy(value)
1575 super(Energy, self).__init__(value)
1576
1566class NetworkBandwidth(float,ParamValue):
1567 cxx_type = 'float'
1568 ex_str = "1Gbps"
1569 cmd_line_settable = True
1570
1571 def __new__(cls, value):
1572 # convert to bits per second
1573 val = convert.toNetworkBandwidth(value)

--- 456 unchanged lines hidden (view full) ---

2030__all__ = ['Param', 'VectorParam',
2031 'Enum', 'Bool', 'String', 'Float',
2032 'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16',
2033 'Int32', 'UInt32', 'Int64', 'UInt64',
2034 'Counter', 'Addr', 'Tick', 'Percent',
2035 'TcpPort', 'UdpPort', 'EthernetAddr',
2036 'IpAddress', 'IpNetmask', 'IpWithPort',
2037 'MemorySize', 'MemorySize32',
1577class NetworkBandwidth(float,ParamValue):
1578 cxx_type = 'float'
1579 ex_str = "1Gbps"
1580 cmd_line_settable = True
1581
1582 def __new__(cls, value):
1583 # convert to bits per second
1584 val = convert.toNetworkBandwidth(value)

--- 456 unchanged lines hidden (view full) ---

2041__all__ = ['Param', 'VectorParam',
2042 'Enum', 'Bool', 'String', 'Float',
2043 'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16',
2044 'Int32', 'UInt32', 'Int64', 'UInt64',
2045 'Counter', 'Addr', 'Tick', 'Percent',
2046 'TcpPort', 'UdpPort', 'EthernetAddr',
2047 'IpAddress', 'IpNetmask', 'IpWithPort',
2048 'MemorySize', 'MemorySize32',
2038 'Latency', 'Frequency', 'Clock', 'Voltage', 'Current',
2049 'Latency', 'Frequency', 'Clock', 'Voltage', 'Current', 'Energy',
2039 'NetworkBandwidth', 'MemoryBandwidth',
2040 'AddrRange',
2041 'MaxAddr', 'MaxTick', 'AllMemory',
2042 'Time',
2043 'NextEthernetAddr', 'NULL',
2044 'MasterPort', 'SlavePort',
2045 'VectorMasterPort', 'VectorSlavePort']
2046
2047import SimObject
2050 'NetworkBandwidth', 'MemoryBandwidth',
2051 'AddrRange',
2052 'MaxAddr', 'MaxTick', 'AllMemory',
2053 'Time',
2054 'NextEthernetAddr', 'NULL',
2055 'MasterPort', 'SlavePort',
2056 'VectorMasterPort', 'VectorSlavePort']
2057
2058import SimObject