PowerModelState.py revision 11988
112336Sjason@lowepower.com# Copyright (c) 2016 ARM Limited
212336Sjason@lowepower.com# All rights reserved.
312336Sjason@lowepower.com#
412336Sjason@lowepower.com# The license below extends only to copyright in the software and shall
512336Sjason@lowepower.com# not be construed as granting a license to any other intellectual
612336Sjason@lowepower.com# property including but not limited to intellectual property relating
712336Sjason@lowepower.com# to a hardware implementation of the functionality of the software
812336Sjason@lowepower.com# licensed hereunder.  You may use the software subject to the license
912336Sjason@lowepower.com# terms below provided that you ensure that this notice is replicated
1012336Sjason@lowepower.com# unmodified and in its entirety in all distributions of the software,
1112336Sjason@lowepower.com# modified or unmodified, in source code or in binary form.
1212336Sjason@lowepower.com#
1312336Sjason@lowepower.com# Redistribution and use in source and binary forms, with or without
1412336Sjason@lowepower.com# modification, are permitted provided that the following conditions are
1512336Sjason@lowepower.com# met: redistributions of source code must retain the above copyright
1612336Sjason@lowepower.com# notice, this list of conditions and the following disclaimer;
1712336Sjason@lowepower.com# redistributions in binary form must reproduce the above copyright
1812336Sjason@lowepower.com# notice, this list of conditions and the following disclaimer in the
1912336Sjason@lowepower.com# documentation and/or other materials provided with the distribution;
2012336Sjason@lowepower.com# neither the name of the copyright holders nor the names of its
2112336Sjason@lowepower.com# contributors may be used to endorse or promote products derived from
2212336Sjason@lowepower.com# this software without specific prior written permission.
2312336Sjason@lowepower.com#
2412336Sjason@lowepower.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2512336Sjason@lowepower.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2612336Sjason@lowepower.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2712336Sjason@lowepower.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2812336Sjason@lowepower.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2912336Sjason@lowepower.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3012336Sjason@lowepower.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3112336Sjason@lowepower.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3212336Sjason@lowepower.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3312336Sjason@lowepower.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3412336Sjason@lowepower.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3512336Sjason@lowepower.com#
3612336Sjason@lowepower.com# Authors: David Guillen Fandos
3712336Sjason@lowepower.com
3812336Sjason@lowepower.comfrom m5.SimObject import *
3912336Sjason@lowepower.comfrom m5.params import *
4012336Sjason@lowepower.com
4112336Sjason@lowepower.com# Represents a power model for a simobj
4212336Sjason@lowepower.comclass PowerModelState(SimObject):
4312336Sjason@lowepower.com    type = 'PowerModelState'
4412336Sjason@lowepower.com    cxx_header = "sim/power/power_model.hh"
4512336Sjason@lowepower.com    abstract = True
46    cxx_class = 'PowerModelState'
47
48    cxx_exports = [
49        PyBindMethod("getDynamicPower"),
50        PyBindMethod("getStaticPower"),
51    ]
52
53
54
55