113759Sgiacomo.gabrielli@arm.com# Copyright (c) 2010, 2017 ARM Limited
27760SGiacomo.Gabrielli@arm.com# All rights reserved.
37760SGiacomo.Gabrielli@arm.com#
47760SGiacomo.Gabrielli@arm.com# The license below extends only to copyright in the software and shall
57760SGiacomo.Gabrielli@arm.com# not be construed as granting a license to any other intellectual
67760SGiacomo.Gabrielli@arm.com# property including but not limited to intellectual property relating
77760SGiacomo.Gabrielli@arm.com# to a hardware implementation of the functionality of the software
87760SGiacomo.Gabrielli@arm.com# licensed hereunder.  You may use the software subject to the license
97760SGiacomo.Gabrielli@arm.com# terms below provided that you ensure that this notice is replicated
107760SGiacomo.Gabrielli@arm.com# unmodified and in its entirety in all distributions of the software,
117760SGiacomo.Gabrielli@arm.com# modified or unmodified, in source code or in binary form.
127760SGiacomo.Gabrielli@arm.com#
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
294486Sbinkertn@umich.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
314486Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
324486Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
334486Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
344486Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
354486Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
364486Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
374486Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
384486Sbinkertn@umich.edu#
394486Sbinkertn@umich.edu# Authors: Kevin Lim
404486Sbinkertn@umich.edu
413223SN/Afrom m5.SimObject import SimObject
4210806Snilay@cs.wisc.edufrom m5.defines import buildEnv
433223SN/Afrom m5.params import *
4413665Sandreas.sandberg@arm.com
4513665Sandreas.sandberg@arm.comfrom m5.objects.FuncUnit import *
463223SN/A
473223SN/Aclass IntALU(FUDesc):
483223SN/A    opList = [ OpDesc(opClass='IntAlu') ]
493223SN/A    count = 6
503223SN/A
513223SN/Aclass IntMultDiv(FUDesc):
523223SN/A    opList = [ OpDesc(opClass='IntMult', opLat=3),
5310807Snilay@cs.wisc.edu               OpDesc(opClass='IntDiv', opLat=20, pipelined=False) ]
5410806Snilay@cs.wisc.edu
5510806Snilay@cs.wisc.edu    # DIV and IDIV instructions in x86 are implemented using a loop which
5610806Snilay@cs.wisc.edu    # issues division microops.  The latency of these microops should really be
5710806Snilay@cs.wisc.edu    # one (or a small number) cycle each since each of these computes one bit
5810806Snilay@cs.wisc.edu    # of the quotient.
5910806Snilay@cs.wisc.edu    if buildEnv['TARGET_ISA'] in ('x86'):
6010806Snilay@cs.wisc.edu        opList[1].opLat=1
6110806Snilay@cs.wisc.edu
623223SN/A    count=2
633223SN/A
643223SN/Aclass FP_ALU(FUDesc):
653223SN/A    opList = [ OpDesc(opClass='FloatAdd', opLat=2),
663223SN/A               OpDesc(opClass='FloatCmp', opLat=2),
673223SN/A               OpDesc(opClass='FloatCvt', opLat=2) ]
683223SN/A    count = 4
693223SN/A
703223SN/Aclass FP_MultDiv(FUDesc):
713223SN/A    opList = [ OpDesc(opClass='FloatMult', opLat=4),
7211683Sfernando.endo2@gmail.com               OpDesc(opClass='FloatMultAcc', opLat=5),
7311683Sfernando.endo2@gmail.com               OpDesc(opClass='FloatMisc', opLat=3),
7410807Snilay@cs.wisc.edu               OpDesc(opClass='FloatDiv', opLat=12, pipelined=False),
7510807Snilay@cs.wisc.edu               OpDesc(opClass='FloatSqrt', opLat=24, pipelined=False) ]
763223SN/A    count = 2
773223SN/A
787760SGiacomo.Gabrielli@arm.comclass SIMD_Unit(FUDesc):
797760SGiacomo.Gabrielli@arm.com    opList = [ OpDesc(opClass='SimdAdd'),
807760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdAddAcc'),
817760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdAlu'),
827760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdCmp'),
837760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdCvt'),
847760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdMisc'),
857760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdMult'),
867760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdMultAcc'),
877760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdShift'),
887760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdShiftAcc'),
8913759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdDiv'),
907760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdSqrt'),
917760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatAdd'),
927760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatAlu'),
937760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatCmp'),
947760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatCvt'),
957760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatDiv'),
967760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatMisc'),
977760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatMult'),
987760SGiacomo.Gabrielli@arm.com               OpDesc(opClass='SimdFloatMultAcc'),
9913759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdFloatSqrt'),
10013759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdReduceAdd'),
10113759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdReduceAlu'),
10213759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdReduceCmp'),
10313759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdFloatReduceAdd'),
10413759Sgiacomo.gabrielli@arm.com               OpDesc(opClass='SimdFloatReduceCmp') ]
1057760SGiacomo.Gabrielli@arm.com    count = 4
1067760SGiacomo.Gabrielli@arm.com
10713759Sgiacomo.gabrielli@arm.comclass PredALU(FUDesc):
10813759Sgiacomo.gabrielli@arm.com    opList = [ OpDesc(opClass='SimdPredAlu') ]
10913759Sgiacomo.gabrielli@arm.com    count = 1
11013759Sgiacomo.gabrielli@arm.com
1113223SN/Aclass ReadPort(FUDesc):
11211683Sfernando.endo2@gmail.com    opList = [ OpDesc(opClass='MemRead'),
11311683Sfernando.endo2@gmail.com               OpDesc(opClass='FloatMemRead') ]
1143223SN/A    count = 0
1153223SN/A
1163223SN/Aclass WritePort(FUDesc):
11711683Sfernando.endo2@gmail.com    opList = [ OpDesc(opClass='MemWrite'),
11811683Sfernando.endo2@gmail.com               OpDesc(opClass='FloatMemWrite') ]
1193223SN/A    count = 0
1203223SN/A
1213223SN/Aclass RdWrPort(FUDesc):
12211683Sfernando.endo2@gmail.com    opList = [ OpDesc(opClass='MemRead'), OpDesc(opClass='MemWrite'),
12311683Sfernando.endo2@gmail.com               OpDesc(opClass='FloatMemRead'), OpDesc(opClass='FloatMemWrite')]
1243223SN/A    count = 4
1253223SN/A
1263223SN/Aclass IprPort(FUDesc):
12710807Snilay@cs.wisc.edu    opList = [ OpDesc(opClass='IprAccess', opLat = 3, pipelined = False) ]
1283223SN/A    count = 1
1293223SN/A
130