FuncUnit.py revision 4556
113223Sodanrc@yahoo.com.br# Copyright (c) 2006-2007 The Regents of The University of Michigan
213223Sodanrc@yahoo.com.br# All rights reserved.
313223Sodanrc@yahoo.com.br#
413223Sodanrc@yahoo.com.br# Redistribution and use in source and binary forms, with or without
513223Sodanrc@yahoo.com.br# modification, are permitted provided that the following conditions are
613223Sodanrc@yahoo.com.br# met: redistributions of source code must retain the above copyright
713223Sodanrc@yahoo.com.br# notice, this list of conditions and the following disclaimer;
813223Sodanrc@yahoo.com.br# redistributions in binary form must reproduce the above copyright
913223Sodanrc@yahoo.com.br# notice, this list of conditions and the following disclaimer in the
1013223Sodanrc@yahoo.com.br# documentation and/or other materials provided with the distribution;
1113223Sodanrc@yahoo.com.br# neither the name of the copyright holders nor the names of its
1213223Sodanrc@yahoo.com.br# contributors may be used to endorse or promote products derived from
1313223Sodanrc@yahoo.com.br# this software without specific prior written permission.
1413223Sodanrc@yahoo.com.br#
1513223Sodanrc@yahoo.com.br# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1613223Sodanrc@yahoo.com.br# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1713223Sodanrc@yahoo.com.br# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1813223Sodanrc@yahoo.com.br# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1913223Sodanrc@yahoo.com.br# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2013223Sodanrc@yahoo.com.br# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2113223Sodanrc@yahoo.com.br# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2213223Sodanrc@yahoo.com.br# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2313223Sodanrc@yahoo.com.br# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2413223Sodanrc@yahoo.com.br# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2513223Sodanrc@yahoo.com.br# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2613223Sodanrc@yahoo.com.br#
2713223Sodanrc@yahoo.com.br# Authors: Kevin Lim
2813223Sodanrc@yahoo.com.br
2913223Sodanrc@yahoo.com.brfrom m5.SimObject import SimObject
3013223Sodanrc@yahoo.com.brfrom m5.params import *
3113223Sodanrc@yahoo.com.br
3213223Sodanrc@yahoo.com.brclass OpClass(Enum):
3313223Sodanrc@yahoo.com.br    vals = ['No_OpClass', 'IntAlu', 'IntMult', 'IntDiv', 'FloatAdd',
3413223Sodanrc@yahoo.com.br            'FloatCmp', 'FloatCvt', 'FloatMult', 'FloatDiv', 'FloatSqrt',
3513223Sodanrc@yahoo.com.br            'MemRead', 'MemWrite', 'IprAccess', 'InstPrefetch']
3613223Sodanrc@yahoo.com.br
3713223Sodanrc@yahoo.com.brclass OpDesc(SimObject):
3813223Sodanrc@yahoo.com.br    type = 'OpDesc'
3913223Sodanrc@yahoo.com.br    issueLat = Param.Int(1, "cycles until another can be issued")
4013223Sodanrc@yahoo.com.br    opClass = Param.OpClass("type of operation")
4113223Sodanrc@yahoo.com.br    opLat = Param.Int(1, "cycles until result is available")
4213223Sodanrc@yahoo.com.br
4313223Sodanrc@yahoo.com.brclass FUDesc(SimObject):
4413223Sodanrc@yahoo.com.br    type = 'FUDesc'
4513223Sodanrc@yahoo.com.br    count = Param.Int("number of these FU's available")
4613223Sodanrc@yahoo.com.br    opList = VectorParam.OpDesc("operation classes for this FU type")
4713223Sodanrc@yahoo.com.br