FuncUnitConfig.py revision 10806:b9410e821c41
16145Snate@binkert.org# Copyright (c) 2010 ARM Limited 26145Snate@binkert.org# All rights reserved. 36145Snate@binkert.org# 46145Snate@binkert.org# The license below extends only to copyright in the software and shall 56145Snate@binkert.org# not be construed as granting a license to any other intellectual 66145Snate@binkert.org# property including but not limited to intellectual property relating 76145Snate@binkert.org# to a hardware implementation of the functionality of the software 86145Snate@binkert.org# licensed hereunder. You may use the software subject to the license 96145Snate@binkert.org# terms below provided that you ensure that this notice is replicated 106145Snate@binkert.org# unmodified and in its entirety in all distributions of the software, 116145Snate@binkert.org# modified or unmodified, in source code or in binary form. 126145Snate@binkert.org# 136145Snate@binkert.org# Copyright (c) 2006-2007 The Regents of The University of Michigan 146145Snate@binkert.org# All rights reserved. 156145Snate@binkert.org# 166145Snate@binkert.org# Redistribution and use in source and binary forms, with or without 176145Snate@binkert.org# modification, are permitted provided that the following conditions are 186145Snate@binkert.org# met: redistributions of source code must retain the above copyright 196145Snate@binkert.org# notice, this list of conditions and the following disclaimer; 206145Snate@binkert.org# redistributions in binary form must reproduce the above copyright 216145Snate@binkert.org# notice, this list of conditions and the following disclaimer in the 226145Snate@binkert.org# documentation and/or other materials provided with the distribution; 236145Snate@binkert.org# neither the name of the copyright holders nor the names of its 246145Snate@binkert.org# contributors may be used to endorse or promote products derived from 256145Snate@binkert.org# this software without specific prior written permission. 266145Snate@binkert.org# 276145Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 286145Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 297039Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 307039Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 316145Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 327002Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 337002Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 346154Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 356154Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 367039Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 376154Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 386145Snate@binkert.org# 396145Snate@binkert.org# Authors: Kevin Lim 406145Snate@binkert.org 416145Snate@binkert.orgfrom m5.SimObject import SimObject 427039Snate@binkert.orgfrom m5.defines import buildEnv 437039Snate@binkert.orgfrom m5.params import * 447039Snate@binkert.orgfrom FuncUnit import * 457039Snate@binkert.org 467039Snate@binkert.orgclass IntALU(FUDesc): 477039Snate@binkert.org opList = [ OpDesc(opClass='IntAlu') ] 487039Snate@binkert.org count = 6 497039Snate@binkert.org 507039Snate@binkert.orgclass IntMultDiv(FUDesc): 517039Snate@binkert.org opList = [ OpDesc(opClass='IntMult', opLat=3), 526145Snate@binkert.org OpDesc(opClass='IntDiv', opLat=20, issueLat=19) ] 537039Snate@binkert.org 546145Snate@binkert.org # DIV and IDIV instructions in x86 are implemented using a loop which 557039Snate@binkert.org # issues division microops. The latency of these microops should really be 567039Snate@binkert.org # one (or a small number) cycle each since each of these computes one bit 577039Snate@binkert.org # of the quotient. 586145Snate@binkert.org if buildEnv['TARGET_ISA'] in ('x86'): 597039Snate@binkert.org opList[1].opLat=1 607039Snate@binkert.org opList[1].issueLat=1 617039Snate@binkert.org 627039Snate@binkert.org count=2 637039Snate@binkert.org 647039Snate@binkert.orgclass FP_ALU(FUDesc): 656145Snate@binkert.org opList = [ OpDesc(opClass='FloatAdd', opLat=2), 667039Snate@binkert.org OpDesc(opClass='FloatCmp', opLat=2), 677039Snate@binkert.org OpDesc(opClass='FloatCvt', opLat=2) ] 686145Snate@binkert.org count = 4 697039Snate@binkert.org 707039Snate@binkert.orgclass FP_MultDiv(FUDesc): 717039Snate@binkert.org opList = [ OpDesc(opClass='FloatMult', opLat=4), 727039Snate@binkert.org OpDesc(opClass='FloatDiv', opLat=12, issueLat=12), 736145Snate@binkert.org OpDesc(opClass='FloatSqrt', opLat=24, issueLat=24) ] 746145Snate@binkert.org count = 2 757039Snate@binkert.org 767039Snate@binkert.orgclass SIMD_Unit(FUDesc): 776145Snate@binkert.org opList = [ OpDesc(opClass='SimdAdd'), 787039Snate@binkert.org OpDesc(opClass='SimdAddAcc'), 797039Snate@binkert.org OpDesc(opClass='SimdAlu'), 807039Snate@binkert.org OpDesc(opClass='SimdCmp'), 816145Snate@binkert.org OpDesc(opClass='SimdCvt'), 826145Snate@binkert.org OpDesc(opClass='SimdMisc'), 837039Snate@binkert.org OpDesc(opClass='SimdMult'), 84 OpDesc(opClass='SimdMultAcc'), 85 OpDesc(opClass='SimdShift'), 86 OpDesc(opClass='SimdShiftAcc'), 87 OpDesc(opClass='SimdSqrt'), 88 OpDesc(opClass='SimdFloatAdd'), 89 OpDesc(opClass='SimdFloatAlu'), 90 OpDesc(opClass='SimdFloatCmp'), 91 OpDesc(opClass='SimdFloatCvt'), 92 OpDesc(opClass='SimdFloatDiv'), 93 OpDesc(opClass='SimdFloatMisc'), 94 OpDesc(opClass='SimdFloatMult'), 95 OpDesc(opClass='SimdFloatMultAcc'), 96 OpDesc(opClass='SimdFloatSqrt') ] 97 count = 4 98 99class ReadPort(FUDesc): 100 opList = [ OpDesc(opClass='MemRead') ] 101 count = 0 102 103class WritePort(FUDesc): 104 opList = [ OpDesc(opClass='MemWrite') ] 105 count = 0 106 107class RdWrPort(FUDesc): 108 opList = [ OpDesc(opClass='MemRead'), OpDesc(opClass='MemWrite') ] 109 count = 4 110 111class IprPort(FUDesc): 112 opList = [ OpDesc(opClass='IprAccess', opLat = 3, issueLat = 3) ] 113 count = 1 114 115