FuncUnit.py revision 9184
14486Sbinkertn@umich.edu# Copyright (c) 2010 ARM Limited 27897Shestness@cs.utexas.edu# All rights reserved. 34486Sbinkertn@umich.edu# 44486Sbinkertn@umich.edu# The license below extends only to copyright in the software and shall 54486Sbinkertn@umich.edu# not be construed as granting a license to any other intellectual 64486Sbinkertn@umich.edu# property including but not limited to intellectual property relating 74486Sbinkertn@umich.edu# to a hardware implementation of the functionality of the software 84486Sbinkertn@umich.edu# licensed hereunder. You may use the software subject to the license 94486Sbinkertn@umich.edu# terms below provided that you ensure that this notice is replicated 104486Sbinkertn@umich.edu# unmodified and in its entirety in all distributions of the software, 114486Sbinkertn@umich.edu# modified or unmodified, in source code or in binary form. 124486Sbinkertn@umich.edu# 134486Sbinkertn@umich.edu# Copyright (c) 2006-2007 The Regents of The University of Michigan 144486Sbinkertn@umich.edu# All rights reserved. 154486Sbinkertn@umich.edu# 164486Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 174486Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 184486Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 194486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 204486Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 214486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 224486Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 234486Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 244486Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 254486Sbinkertn@umich.edu# this software without specific prior written permission. 264486Sbinkertn@umich.edu# 274486Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 284486Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 297897Shestness@cs.utexas.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 304486Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 313102SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 326654Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 333102SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 343102SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 356654Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 368931Sandreas.hansson@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 372212SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 389524SAndreas.Sandberg@ARM.com# 399524SAndreas.Sandberg@ARM.com# Authors: Kevin Lim 402902SN/A 418703Sandreas.hansson@arm.comfrom m5.SimObject import SimObject 421783SN/Afrom m5.params import * 439338SAndreas.Sandberg@arm.com 448839Sandreas.hansson@arm.comclass OpClass(Enum): 457673Snate@binkert.org vals = ['No_OpClass', 'IntAlu', 'IntMult', 'IntDiv', 'FloatAdd', 467673Snate@binkert.org 'FloatCmp', 'FloatCvt', 'FloatMult', 'FloatDiv', 'FloatSqrt', 478597Ssteve.reinhardt@amd.com 'SimdAdd', 'SimdAddAcc', 'SimdAlu', 'SimdCmp', 'SimdCvt', 488597Ssteve.reinhardt@amd.com 'SimdMisc', 'SimdMult', 'SimdMultAcc', 'SimdShift', 'SimdShiftAcc', 498597Ssteve.reinhardt@amd.com 'SimdSqrt', 'SimdFloatAdd', 'SimdFloatAlu', 'SimdFloatCmp', 508597Ssteve.reinhardt@amd.com 'SimdFloatCvt', 'SimdFloatDiv', 'SimdFloatMisc', 'SimdFloatMult', 518597Ssteve.reinhardt@amd.com 'SimdFloatMultAcc', 'SimdFloatSqrt', 528597Ssteve.reinhardt@amd.com 'MemRead', 'MemWrite', 'IprAccess', 'InstPrefetch'] 539524SAndreas.Sandberg@ARM.com 548597Ssteve.reinhardt@amd.comclass OpDesc(SimObject): 558597Ssteve.reinhardt@amd.com type = 'OpDesc' 564859Snate@binkert.org issueLat = Param.Cycles(1, "cycles until another can be issued") 578931Sandreas.hansson@arm.com opClass = Param.OpClass("type of operation") 588931Sandreas.hansson@arm.com opLat = Param.Cycles(1, "cycles until result is available") 592902SN/A 609408Sandreas.hansson@arm.comclass FUDesc(SimObject): 619408Sandreas.hansson@arm.com type = 'FUDesc' 629408Sandreas.hansson@arm.com count = Param.Int("number of these FU's available") 639408Sandreas.hansson@arm.com opList = VectorParam.OpDesc("operation classes for this FU type") 649408Sandreas.hansson@arm.com