ClockedObject.py revision 9281
19157Sandreas.hansson@arm.com# Copyright (c) 2012 ARM Limited 29157Sandreas.hansson@arm.com# All rights reserved. 39157Sandreas.hansson@arm.com# 49157Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 59157Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 69157Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 79157Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 89157Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 99157Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 109157Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 119157Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 129157Sandreas.hansson@arm.com# 139157Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 149157Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 159157Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright 169157Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer; 179157Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright 189157Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the 199157Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution; 209157Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its 219157Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from 229157Sandreas.hansson@arm.com# this software without specific prior written permission. 239157Sandreas.hansson@arm.com# 249157Sandreas.hansson@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 259157Sandreas.hansson@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 269157Sandreas.hansson@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 279157Sandreas.hansson@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 289157Sandreas.hansson@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 299157Sandreas.hansson@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 309157Sandreas.hansson@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 319157Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 329157Sandreas.hansson@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 339157Sandreas.hansson@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 349157Sandreas.hansson@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 359157Sandreas.hansson@arm.com# 369157Sandreas.hansson@arm.com# Authors: Andreas Hansson 379157Sandreas.hansson@arm.com 389157Sandreas.hansson@arm.comfrom m5.SimObject import SimObject 399157Sandreas.hansson@arm.comfrom m5.params import * 409281Sandreas.hansson@arm.comfrom m5.proxy import * 419157Sandreas.hansson@arm.com 429157Sandreas.hansson@arm.comclass ClockedObject(SimObject): 439157Sandreas.hansson@arm.com type = 'ClockedObject' 449157Sandreas.hansson@arm.com abstract = True 459157Sandreas.hansson@arm.com 469281Sandreas.hansson@arm.com # Clock period of this object, with the default value being the 479281Sandreas.hansson@arm.com # clock period of the parent object, unproxied at instantiation 489281Sandreas.hansson@arm.com # time 499281Sandreas.hansson@arm.com clock = Param.Clock(Parent.clock, "Clock speed") 50