FuncUnitConfig.py revision 10807:dac26eb4cb64
11917SN/A# Copyright (c) 2010 ARM Limited
21917SN/A# All rights reserved.
31917SN/A#
41917SN/A# The license below extends only to copyright in the software and shall
51917SN/A# not be construed as granting a license to any other intellectual
61917SN/A# property including but not limited to intellectual property relating
71917SN/A# to a hardware implementation of the functionality of the software
81917SN/A# licensed hereunder.  You may use the software subject to the license
91917SN/A# terms below provided that you ensure that this notice is replicated
101917SN/A# unmodified and in its entirety in all distributions of the software,
111917SN/A# modified or unmodified, in source code or in binary form.
121917SN/A#
131917SN/A# Copyright (c) 2006-2007 The Regents of The University of Michigan
141917SN/A# All rights reserved.
151917SN/A#
161917SN/A# Redistribution and use in source and binary forms, with or without
171917SN/A# modification, are permitted provided that the following conditions are
181917SN/A# met: redistributions of source code must retain the above copyright
191917SN/A# notice, this list of conditions and the following disclaimer;
201917SN/A# redistributions in binary form must reproduce the above copyright
211917SN/A# notice, this list of conditions and the following disclaimer in the
221917SN/A# documentation and/or other materials provided with the distribution;
231917SN/A# neither the name of the copyright holders nor the names of its
241917SN/A# contributors may be used to endorse or promote products derived from
251917SN/A# this software without specific prior written permission.
261917SN/A#
272665Ssaidi@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
282665Ssaidi@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
291917SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
301917SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
311917SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
321917SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
331917SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
341917SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
351917SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
361917SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
371917SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
381917SN/A#
392680Sktlim@umich.edu# Authors: Kevin Lim
402235SN/A
411917SN/Afrom m5.SimObject import SimObject
421917SN/Afrom m5.defines import buildEnv
432107SN/Afrom m5.params import *
441917SN/Afrom FuncUnit import *
452680Sktlim@umich.edu
462680Sktlim@umich.educlass IntALU(FUDesc):
471917SN/A    opList = [ OpDesc(opClass='IntAlu') ]
481917SN/A    count = 6
491917SN/A
502680Sktlim@umich.educlass IntMultDiv(FUDesc):
511917SN/A    opList = [ OpDesc(opClass='IntMult', opLat=3),
522680Sktlim@umich.edu               OpDesc(opClass='IntDiv', opLat=20, pipelined=False) ]
531917SN/A
542680Sktlim@umich.edu    # DIV and IDIV instructions in x86 are implemented using a loop which
551917SN/A    # issues division microops.  The latency of these microops should really be
562680Sktlim@umich.edu    # one (or a small number) cycle each since each of these computes one bit
571917SN/A    # of the quotient.
582680Sktlim@umich.edu    if buildEnv['TARGET_ISA'] in ('x86'):
591917SN/A        opList[1].opLat=1
602680Sktlim@umich.edu
611917SN/A    count=2
622680Sktlim@umich.edu
631917SN/Aclass FP_ALU(FUDesc):
642680Sktlim@umich.edu    opList = [ OpDesc(opClass='FloatAdd', opLat=2),
651917SN/A               OpDesc(opClass='FloatCmp', opLat=2),
662680Sktlim@umich.edu               OpDesc(opClass='FloatCvt', opLat=2) ]
671917SN/A    count = 4
682680Sktlim@umich.edu
691917SN/Aclass FP_MultDiv(FUDesc):
701917SN/A    opList = [ OpDesc(opClass='FloatMult', opLat=4),
711917SN/A               OpDesc(opClass='FloatDiv', opLat=12, pipelined=False),
721917SN/A               OpDesc(opClass='FloatSqrt', opLat=24, pipelined=False) ]
731917SN/A    count = 2
741917SN/A
751917SN/Aclass SIMD_Unit(FUDesc):
761917SN/A    opList = [ OpDesc(opClass='SimdAdd'),
771917SN/A               OpDesc(opClass='SimdAddAcc'),
782680Sktlim@umich.edu               OpDesc(opClass='SimdAlu'),
791917SN/A               OpDesc(opClass='SimdCmp'),
801917SN/A               OpDesc(opClass='SimdCvt'),
811917SN/A               OpDesc(opClass='SimdMisc'),
821917SN/A               OpDesc(opClass='SimdMult'),
831917SN/A               OpDesc(opClass='SimdMultAcc'),
841917SN/A               OpDesc(opClass='SimdShift'),
851917SN/A               OpDesc(opClass='SimdShiftAcc'),
861917SN/A               OpDesc(opClass='SimdSqrt'),
871917SN/A               OpDesc(opClass='SimdFloatAdd'),
882680Sktlim@umich.edu               OpDesc(opClass='SimdFloatAlu'),
891917SN/A               OpDesc(opClass='SimdFloatCmp'),
901917SN/A               OpDesc(opClass='SimdFloatCvt'),
911917SN/A               OpDesc(opClass='SimdFloatDiv'),
921917SN/A               OpDesc(opClass='SimdFloatMisc'),
931917SN/A               OpDesc(opClass='SimdFloatMult'),
941917SN/A               OpDesc(opClass='SimdFloatMultAcc'),
951917SN/A               OpDesc(opClass='SimdFloatSqrt') ]
961917SN/A    count = 4
971917SN/A
981917SN/Aclass ReadPort(FUDesc):
992680Sktlim@umich.edu    opList = [ OpDesc(opClass='MemRead') ]
1001917SN/A    count = 0
1011917SN/A
1021917SN/Aclass WritePort(FUDesc):
1031917SN/A    opList = [ OpDesc(opClass='MemWrite') ]
1041917SN/A    count = 0
1051917SN/A
1061977SN/Aclass RdWrPort(FUDesc):
1072680Sktlim@umich.edu    opList = [ OpDesc(opClass='MemRead'), OpDesc(opClass='MemWrite') ]
1081917SN/A    count = 4
1091977SN/A
1101977SN/Aclass IprPort(FUDesc):
1112680Sktlim@umich.edu    opList = [ OpDesc(opClass='IprAccess', opLat = 3, pipelined = False) ]
1122680Sktlim@umich.edu    count = 1
1131977SN/A
1142680Sktlim@umich.edu