PowerModelState.py revision 11527
12440SN/A# Copyright (c) 2016 ARM Limited
22440SN/A# All rights reserved.
32440SN/A#
42440SN/A# The license below extends only to copyright in the software and shall
52440SN/A# not be construed as granting a license to any other intellectual
62440SN/A# property including but not limited to intellectual property relating
72440SN/A# to a hardware implementation of the functionality of the software
82440SN/A# licensed hereunder.  You may use the software subject to the license
92440SN/A# terms below provided that you ensure that this notice is replicated
102440SN/A# unmodified and in its entirety in all distributions of the software,
112440SN/A# modified or unmodified, in source code or in binary form.
122440SN/A#
132440SN/A# Redistribution and use in source and binary forms, with or without
142440SN/A# modification, are permitted provided that the following conditions are
152440SN/A# met: redistributions of source code must retain the above copyright
162440SN/A# notice, this list of conditions and the following disclaimer;
172440SN/A# redistributions in binary form must reproduce the above copyright
182440SN/A# notice, this list of conditions and the following disclaimer in the
192440SN/A# documentation and/or other materials provided with the distribution;
202440SN/A# neither the name of the copyright holders nor the names of its
212440SN/A# contributors may be used to endorse or promote products derived from
222440SN/A# this software without specific prior written permission.
232440SN/A#
242440SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
252440SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
262440SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
272665Ssaidi@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
282665Ssaidi@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
292665Ssaidi@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
302440SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
312440SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
322440SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
332440SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
342440SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
352972Sgblack@eecs.umich.edu#
366330Sgblack@eecs.umich.edu# Authors: David Guillen Fandos
378229Snate@binkert.org
382440SN/Afrom m5.SimObject import SimObject
395569Snate@binkert.orgfrom m5.params import *
407720Sgblack@eecs.umich.edu
413120Sgblack@eecs.umich.edu# Represents a power model for a simobj
428300Schander.sudanthi@arm.comclass PowerModelState(SimObject):
432440SN/A    type = 'PowerModelState'
445569Snate@binkert.org    cxx_header = "sim/power/power_model.hh"
455569Snate@binkert.org    abstract = True
467720Sgblack@eecs.umich.edu    cxx_class = 'PowerModelState'
477720Sgblack@eecs.umich.edu
487720Sgblack@eecs.umich.edu    @classmethod
497720Sgblack@eecs.umich.edu    def export_methods(cls, code):
507720Sgblack@eecs.umich.edu        code('''
517720Sgblack@eecs.umich.edu      double getDynamicPower() const;
527720Sgblack@eecs.umich.edu      double getStaticPower() const;
537720Sgblack@eecs.umich.edu''')
547707Sgblack@eecs.umich.edu
555569Snate@binkert.org
565569Snate@binkert.org