1*0b57cec5SDimitry Andric//===-- PPCScheduleP9.td - PPC P9 Scheduling Definitions ---*- tablegen -*-===// 2*0b57cec5SDimitry Andric// 3*0b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric// 7*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric// 9*0b57cec5SDimitry Andric// This file defines the itinerary class data for the POWER9 processor. 10*0b57cec5SDimitry Andric// 11*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12*0b57cec5SDimitry Andricinclude "PPCInstrInfo.td" 13*0b57cec5SDimitry Andric 14*0b57cec5SDimitry Andricdef P9Model : SchedMachineModel { 15*0b57cec5SDimitry Andric // The maximum number of instructions to be issued at the same time. 16*0b57cec5SDimitry Andric // While a value of 8 is technically correct since 8 instructions can be 17*0b57cec5SDimitry Andric // fetched from the instruction cache. However, only 6 instructions may be 18*0b57cec5SDimitry Andric // actually dispatched at a time. 19*0b57cec5SDimitry Andric let IssueWidth = 8; 20*0b57cec5SDimitry Andric 21*0b57cec5SDimitry Andric // Load latency is 4 or 5 cycles depending on the load. This latency assumes 22*0b57cec5SDimitry Andric // that we have a cache hit. For a cache miss the load latency will be more. 23*0b57cec5SDimitry Andric // There are two instructions (lxvl, lxvll) that have a latencty of 6 cycles. 24*0b57cec5SDimitry Andric // However it is not worth bumping this value up to 6 when the vast majority 25*0b57cec5SDimitry Andric // of instructions are 4 or 5 cycles. 26*0b57cec5SDimitry Andric let LoadLatency = 5; 27*0b57cec5SDimitry Andric 28*0b57cec5SDimitry Andric // A total of 16 cycles to recover from a branch mispredict. 29*0b57cec5SDimitry Andric let MispredictPenalty = 16; 30*0b57cec5SDimitry Andric 31*0b57cec5SDimitry Andric // Try to make sure we have at least 10 dispatch groups in a loop. 32*0b57cec5SDimitry Andric // A dispatch group is 6 instructions. 33*0b57cec5SDimitry Andric let LoopMicroOpBufferSize = 60; 34*0b57cec5SDimitry Andric 35*0b57cec5SDimitry Andric // As iops are dispatched to a slice, they are held in an independent slice 36*0b57cec5SDimitry Andric // issue queue until all register sources and other dependencies have been 37*0b57cec5SDimitry Andric // resolved and they can be issued. Each of four execution slices has an 38*0b57cec5SDimitry Andric // 11-entry iop issue queue. 39*0b57cec5SDimitry Andric let MicroOpBufferSize = 44; 40*0b57cec5SDimitry Andric 41*0b57cec5SDimitry Andric let CompleteModel = 1; 42*0b57cec5SDimitry Andric 43*0b57cec5SDimitry Andric // Do not support QPX (Quad Processing eXtension) or SPE (Signal Procesing 44*0b57cec5SDimitry Andric // Engine) on Power 9. 45*0b57cec5SDimitry Andric let UnsupportedFeatures = [HasQPX, HasSPE]; 46*0b57cec5SDimitry Andric 47*0b57cec5SDimitry Andric} 48*0b57cec5SDimitry Andric 49*0b57cec5SDimitry Andriclet SchedModel = P9Model in { 50*0b57cec5SDimitry Andric 51*0b57cec5SDimitry Andric // ***************** Processor Resources ***************** 52*0b57cec5SDimitry Andric 53*0b57cec5SDimitry Andric // Dispatcher slots: 54*0b57cec5SDimitry Andric // x0, x1, x2, and x3 are the dedicated slice dispatch ports, where each 55*0b57cec5SDimitry Andric // corresponds to one of the four execution slices. 56*0b57cec5SDimitry Andric def DISPx02 : ProcResource<2>; 57*0b57cec5SDimitry Andric def DISPx13 : ProcResource<2>; 58*0b57cec5SDimitry Andric // The xa and xb ports can be used to send an iop to either of the two slices 59*0b57cec5SDimitry Andric // of the superslice, but are restricted to iops with only two primary sources. 60*0b57cec5SDimitry Andric def DISPxab : ProcResource<2>; 61*0b57cec5SDimitry Andric // b0 and b1 are dedicated dispatch ports into the branch slice. 62*0b57cec5SDimitry Andric def DISPb01 : ProcResource<2>; 63*0b57cec5SDimitry Andric 64*0b57cec5SDimitry Andric // Any non BR dispatch ports 65*0b57cec5SDimitry Andric def DISP_NBR 66*0b57cec5SDimitry Andric : ProcResGroup<[ DISPx02, DISPx13, DISPxab]>; 67*0b57cec5SDimitry Andric def DISP_SS : ProcResGroup<[ DISPx02, DISPx13]>; 68*0b57cec5SDimitry Andric 69*0b57cec5SDimitry Andric // Issue Ports 70*0b57cec5SDimitry Andric // An instruction can go down one of two issue queues. 71*0b57cec5SDimitry Andric // Address Generation (AGEN) mainly for loads and stores. 72*0b57cec5SDimitry Andric // Execution (EXEC) for most other instructions. 73*0b57cec5SDimitry Andric // Some instructions cannot be run on just any issue queue and may require an 74*0b57cec5SDimitry Andric // Even or an Odd queue. The EXECE represents the even queues and the EXECO 75*0b57cec5SDimitry Andric // represents the odd queues. 76*0b57cec5SDimitry Andric def IP_AGEN : ProcResource<4>; 77*0b57cec5SDimitry Andric def IP_EXEC : ProcResource<4>; 78*0b57cec5SDimitry Andric def IP_EXECE : ProcResource<2> { 79*0b57cec5SDimitry Andric //Even Exec Ports 80*0b57cec5SDimitry Andric let Super = IP_EXEC; 81*0b57cec5SDimitry Andric } 82*0b57cec5SDimitry Andric def IP_EXECO : ProcResource<2> { 83*0b57cec5SDimitry Andric //Odd Exec Ports 84*0b57cec5SDimitry Andric let Super = IP_EXEC; 85*0b57cec5SDimitry Andric } 86*0b57cec5SDimitry Andric 87*0b57cec5SDimitry Andric // Pipeline Groups 88*0b57cec5SDimitry Andric // Four ALU (Fixed Point Arithmetic) units in total. Two even, two Odd. 89*0b57cec5SDimitry Andric def ALU : ProcResource<4>; 90*0b57cec5SDimitry Andric def ALUE : ProcResource<2> { 91*0b57cec5SDimitry Andric //Even ALU pipelines 92*0b57cec5SDimitry Andric let Super = ALU; 93*0b57cec5SDimitry Andric } 94*0b57cec5SDimitry Andric def ALUO : ProcResource<2> { 95*0b57cec5SDimitry Andric //Odd ALU pipelines 96*0b57cec5SDimitry Andric let Super = ALU; 97*0b57cec5SDimitry Andric } 98*0b57cec5SDimitry Andric 99*0b57cec5SDimitry Andric // Two DIV (Fixed Point Divide) units. 100*0b57cec5SDimitry Andric def DIV : ProcResource<2>; 101*0b57cec5SDimitry Andric 102*0b57cec5SDimitry Andric // Four DP (Floating Point) units in total. Two even, two Odd. 103*0b57cec5SDimitry Andric def DP : ProcResource<4>; 104*0b57cec5SDimitry Andric def DPE : ProcResource<2> { 105*0b57cec5SDimitry Andric //Even DP pipelines 106*0b57cec5SDimitry Andric let Super = DP; 107*0b57cec5SDimitry Andric } 108*0b57cec5SDimitry Andric def DPO : ProcResource<2> { 109*0b57cec5SDimitry Andric //Odd DP pipelines 110*0b57cec5SDimitry Andric let Super = DP; 111*0b57cec5SDimitry Andric } 112*0b57cec5SDimitry Andric 113*0b57cec5SDimitry Andric // Four LS (Load or Store) units. 114*0b57cec5SDimitry Andric def LS : ProcResource<4>; 115*0b57cec5SDimitry Andric 116*0b57cec5SDimitry Andric // Two PM (Permute) units. 117*0b57cec5SDimitry Andric def PM : ProcResource<2>; 118*0b57cec5SDimitry Andric 119*0b57cec5SDimitry Andric // Only one DFU (Decimal Floating Point and Quad Precision) unit. 120*0b57cec5SDimitry Andric def DFU : ProcResource<1>; 121*0b57cec5SDimitry Andric 122*0b57cec5SDimitry Andric // Only one Branch unit. 123*0b57cec5SDimitry Andric def BR : ProcResource<1> { 124*0b57cec5SDimitry Andric let BufferSize = 16; 125*0b57cec5SDimitry Andric } 126*0b57cec5SDimitry Andric 127*0b57cec5SDimitry Andric // Only one CY (Crypto) unit. 128*0b57cec5SDimitry Andric def CY : ProcResource<1>; 129*0b57cec5SDimitry Andric 130*0b57cec5SDimitry Andric // ***************** SchedWriteRes Definitions ***************** 131*0b57cec5SDimitry Andric 132*0b57cec5SDimitry Andric // Dispatcher 133*0b57cec5SDimitry Andric // Dispatch Rules: '-' or 'V' 134*0b57cec5SDimitry Andric // Vector ('V') - vector iops (128-bit operand) take only one decode and 135*0b57cec5SDimitry Andric // dispatch slot but are dispatched to both the even and odd slices of a 136*0b57cec5SDimitry Andric // superslice. 137*0b57cec5SDimitry Andric def DISP_1C : SchedWriteRes<[DISP_NBR]> { 138*0b57cec5SDimitry Andric let NumMicroOps = 0; 139*0b57cec5SDimitry Andric let Latency = 1; 140*0b57cec5SDimitry Andric } 141*0b57cec5SDimitry Andric // Dispatch Rules: 'E' 142*0b57cec5SDimitry Andric // Even slice ('E')- certain operations must be sent only to an even slice. 143*0b57cec5SDimitry Andric // Also consumes odd dispatch slice slot of the same superslice at dispatch 144*0b57cec5SDimitry Andric def DISP_EVEN_1C : SchedWriteRes<[ DISPx02, DISPx13 ]> { 145*0b57cec5SDimitry Andric let NumMicroOps = 0; 146*0b57cec5SDimitry Andric let Latency = 1; 147*0b57cec5SDimitry Andric } 148*0b57cec5SDimitry Andric // Dispatch Rules: 'P' 149*0b57cec5SDimitry Andric // Paired ('P') - certain cracked and expanded iops are paired such that they 150*0b57cec5SDimitry Andric // must dispatch together to the same superslice. 151*0b57cec5SDimitry Andric def DISP_PAIR_1C : SchedWriteRes<[ DISP_SS, DISP_SS]> { 152*0b57cec5SDimitry Andric let NumMicroOps = 0; 153*0b57cec5SDimitry Andric let Latency = 1; 154*0b57cec5SDimitry Andric } 155*0b57cec5SDimitry Andric // Tuple Restricted ('R') - certain iops preclude dispatching more than one 156*0b57cec5SDimitry Andric // operation per slice for the super- slice to which they are dispatched 157*0b57cec5SDimitry Andric def DISP_3SLOTS_1C : SchedWriteRes<[DISPx02, DISPx13, DISPxab]> { 158*0b57cec5SDimitry Andric let NumMicroOps = 0; 159*0b57cec5SDimitry Andric let Latency = 1; 160*0b57cec5SDimitry Andric } 161*0b57cec5SDimitry Andric // Each execution and branch slice can receive up to two iops per cycle 162*0b57cec5SDimitry Andric def DISP_BR_1C : SchedWriteRes<[ DISPxab ]> { 163*0b57cec5SDimitry Andric let NumMicroOps = 0; 164*0b57cec5SDimitry Andric let Latency = 1; 165*0b57cec5SDimitry Andric } 166*0b57cec5SDimitry Andric 167*0b57cec5SDimitry Andric // Issue Ports 168*0b57cec5SDimitry Andric def IP_AGEN_1C : SchedWriteRes<[IP_AGEN]> { 169*0b57cec5SDimitry Andric let NumMicroOps = 0; 170*0b57cec5SDimitry Andric let Latency = 1; 171*0b57cec5SDimitry Andric } 172*0b57cec5SDimitry Andric 173*0b57cec5SDimitry Andric def IP_EXEC_1C : SchedWriteRes<[IP_EXEC]> { 174*0b57cec5SDimitry Andric let NumMicroOps = 0; 175*0b57cec5SDimitry Andric let Latency = 1; 176*0b57cec5SDimitry Andric } 177*0b57cec5SDimitry Andric 178*0b57cec5SDimitry Andric def IP_EXECE_1C : SchedWriteRes<[IP_EXECE]> { 179*0b57cec5SDimitry Andric let NumMicroOps = 0; 180*0b57cec5SDimitry Andric let Latency = 1; 181*0b57cec5SDimitry Andric } 182*0b57cec5SDimitry Andric 183*0b57cec5SDimitry Andric def IP_EXECO_1C : SchedWriteRes<[IP_EXECO]> { 184*0b57cec5SDimitry Andric let NumMicroOps = 0; 185*0b57cec5SDimitry Andric let Latency = 1; 186*0b57cec5SDimitry Andric } 187*0b57cec5SDimitry Andric 188*0b57cec5SDimitry Andric //Pipeline Groups 189*0b57cec5SDimitry Andric 190*0b57cec5SDimitry Andric // ALU Units 191*0b57cec5SDimitry Andric // An ALU may take either 2 or 3 cycles to complete the operation. 192*0b57cec5SDimitry Andric // However, the ALU unit is only ever busy for 1 cycle at a time and may 193*0b57cec5SDimitry Andric // receive new instructions each cycle. 194*0b57cec5SDimitry Andric def P9_ALU_2C : SchedWriteRes<[ALU]> { 195*0b57cec5SDimitry Andric let Latency = 2; 196*0b57cec5SDimitry Andric } 197*0b57cec5SDimitry Andric 198*0b57cec5SDimitry Andric def P9_ALUE_2C : SchedWriteRes<[ALUE]> { 199*0b57cec5SDimitry Andric let Latency = 2; 200*0b57cec5SDimitry Andric } 201*0b57cec5SDimitry Andric 202*0b57cec5SDimitry Andric def P9_ALUO_2C : SchedWriteRes<[ALUO]> { 203*0b57cec5SDimitry Andric let Latency = 2; 204*0b57cec5SDimitry Andric } 205*0b57cec5SDimitry Andric 206*0b57cec5SDimitry Andric def P9_ALU_3C : SchedWriteRes<[ALU]> { 207*0b57cec5SDimitry Andric let Latency = 3; 208*0b57cec5SDimitry Andric } 209*0b57cec5SDimitry Andric 210*0b57cec5SDimitry Andric def P9_ALUE_3C : SchedWriteRes<[ALUE]> { 211*0b57cec5SDimitry Andric let Latency = 3; 212*0b57cec5SDimitry Andric } 213*0b57cec5SDimitry Andric 214*0b57cec5SDimitry Andric def P9_ALUO_3C : SchedWriteRes<[ALUO]> { 215*0b57cec5SDimitry Andric let Latency = 3; 216*0b57cec5SDimitry Andric } 217*0b57cec5SDimitry Andric 218*0b57cec5SDimitry Andric // DIV Unit 219*0b57cec5SDimitry Andric // A DIV unit may take from 5 to 40 cycles to complete. 220*0b57cec5SDimitry Andric // Some DIV operations may keep the unit busy for up to 8 cycles. 221*0b57cec5SDimitry Andric def P9_DIV_5C : SchedWriteRes<[DIV]> { 222*0b57cec5SDimitry Andric let Latency = 5; 223*0b57cec5SDimitry Andric } 224*0b57cec5SDimitry Andric 225*0b57cec5SDimitry Andric def P9_DIV_12C : SchedWriteRes<[DIV]> { 226*0b57cec5SDimitry Andric let Latency = 12; 227*0b57cec5SDimitry Andric } 228*0b57cec5SDimitry Andric 229*0b57cec5SDimitry Andric def P9_DIV_16C_8 : SchedWriteRes<[DIV]> { 230*0b57cec5SDimitry Andric let ResourceCycles = [8]; 231*0b57cec5SDimitry Andric let Latency = 16; 232*0b57cec5SDimitry Andric } 233*0b57cec5SDimitry Andric 234*0b57cec5SDimitry Andric def P9_DIV_24C_8 : SchedWriteRes<[DIV]> { 235*0b57cec5SDimitry Andric let ResourceCycles = [8]; 236*0b57cec5SDimitry Andric let Latency = 24; 237*0b57cec5SDimitry Andric } 238*0b57cec5SDimitry Andric 239*0b57cec5SDimitry Andric def P9_DIV_40C_8 : SchedWriteRes<[DIV]> { 240*0b57cec5SDimitry Andric let ResourceCycles = [8]; 241*0b57cec5SDimitry Andric let Latency = 40; 242*0b57cec5SDimitry Andric } 243*0b57cec5SDimitry Andric 244*0b57cec5SDimitry Andric // DP Unit 245*0b57cec5SDimitry Andric // A DP unit may take from 2 to 36 cycles to complete. 246*0b57cec5SDimitry Andric // Some DP operations keep the unit busy for up to 10 cycles. 247*0b57cec5SDimitry Andric def P9_DP_5C : SchedWriteRes<[DP]> { 248*0b57cec5SDimitry Andric let Latency = 5; 249*0b57cec5SDimitry Andric } 250*0b57cec5SDimitry Andric 251*0b57cec5SDimitry Andric def P9_DP_7C : SchedWriteRes<[DP]> { 252*0b57cec5SDimitry Andric let Latency = 7; 253*0b57cec5SDimitry Andric } 254*0b57cec5SDimitry Andric 255*0b57cec5SDimitry Andric def P9_DPE_7C : SchedWriteRes<[DPE]> { 256*0b57cec5SDimitry Andric let Latency = 7; 257*0b57cec5SDimitry Andric } 258*0b57cec5SDimitry Andric 259*0b57cec5SDimitry Andric def P9_DPO_7C : SchedWriteRes<[DPO]> { 260*0b57cec5SDimitry Andric let Latency = 7; 261*0b57cec5SDimitry Andric } 262*0b57cec5SDimitry Andric 263*0b57cec5SDimitry Andric def P9_DP_22C_5 : SchedWriteRes<[DP]> { 264*0b57cec5SDimitry Andric let ResourceCycles = [5]; 265*0b57cec5SDimitry Andric let Latency = 22; 266*0b57cec5SDimitry Andric } 267*0b57cec5SDimitry Andric 268*0b57cec5SDimitry Andric def P9_DPO_24C_8 : SchedWriteRes<[DPO]> { 269*0b57cec5SDimitry Andric let ResourceCycles = [8]; 270*0b57cec5SDimitry Andric let Latency = 24; 271*0b57cec5SDimitry Andric } 272*0b57cec5SDimitry Andric 273*0b57cec5SDimitry Andric def P9_DPE_24C_8 : SchedWriteRes<[DPE]> { 274*0b57cec5SDimitry Andric let ResourceCycles = [8]; 275*0b57cec5SDimitry Andric let Latency = 24; 276*0b57cec5SDimitry Andric } 277*0b57cec5SDimitry Andric 278*0b57cec5SDimitry Andric def P9_DP_26C_5 : SchedWriteRes<[DP]> { 279*0b57cec5SDimitry Andric let ResourceCycles = [5]; 280*0b57cec5SDimitry Andric let Latency = 22; 281*0b57cec5SDimitry Andric } 282*0b57cec5SDimitry Andric 283*0b57cec5SDimitry Andric def P9_DPE_27C_10 : SchedWriteRes<[DP]> { 284*0b57cec5SDimitry Andric let ResourceCycles = [10]; 285*0b57cec5SDimitry Andric let Latency = 27; 286*0b57cec5SDimitry Andric } 287*0b57cec5SDimitry Andric 288*0b57cec5SDimitry Andric def P9_DPO_27C_10 : SchedWriteRes<[DP]> { 289*0b57cec5SDimitry Andric let ResourceCycles = [10]; 290*0b57cec5SDimitry Andric let Latency = 27; 291*0b57cec5SDimitry Andric } 292*0b57cec5SDimitry Andric 293*0b57cec5SDimitry Andric def P9_DP_33C_8 : SchedWriteRes<[DP]> { 294*0b57cec5SDimitry Andric let ResourceCycles = [8]; 295*0b57cec5SDimitry Andric let Latency = 33; 296*0b57cec5SDimitry Andric } 297*0b57cec5SDimitry Andric 298*0b57cec5SDimitry Andric def P9_DPE_33C_8 : SchedWriteRes<[DPE]> { 299*0b57cec5SDimitry Andric let ResourceCycles = [8]; 300*0b57cec5SDimitry Andric let Latency = 33; 301*0b57cec5SDimitry Andric } 302*0b57cec5SDimitry Andric 303*0b57cec5SDimitry Andric def P9_DPO_33C_8 : SchedWriteRes<[DPO]> { 304*0b57cec5SDimitry Andric let ResourceCycles = [8]; 305*0b57cec5SDimitry Andric let Latency = 33; 306*0b57cec5SDimitry Andric } 307*0b57cec5SDimitry Andric 308*0b57cec5SDimitry Andric def P9_DP_36C_10 : SchedWriteRes<[DP]> { 309*0b57cec5SDimitry Andric let ResourceCycles = [10]; 310*0b57cec5SDimitry Andric let Latency = 36; 311*0b57cec5SDimitry Andric } 312*0b57cec5SDimitry Andric 313*0b57cec5SDimitry Andric def P9_DPE_36C_10 : SchedWriteRes<[DP]> { 314*0b57cec5SDimitry Andric let ResourceCycles = [10]; 315*0b57cec5SDimitry Andric let Latency = 36; 316*0b57cec5SDimitry Andric } 317*0b57cec5SDimitry Andric 318*0b57cec5SDimitry Andric def P9_DPO_36C_10 : SchedWriteRes<[DP]> { 319*0b57cec5SDimitry Andric let ResourceCycles = [10]; 320*0b57cec5SDimitry Andric let Latency = 36; 321*0b57cec5SDimitry Andric } 322*0b57cec5SDimitry Andric 323*0b57cec5SDimitry Andric // PM Unit 324*0b57cec5SDimitry Andric // Three cycle permute operations. 325*0b57cec5SDimitry Andric def P9_PM_3C : SchedWriteRes<[PM]> { 326*0b57cec5SDimitry Andric let Latency = 3; 327*0b57cec5SDimitry Andric } 328*0b57cec5SDimitry Andric 329*0b57cec5SDimitry Andric // Load and Store Units 330*0b57cec5SDimitry Andric // Loads can have 4, 5 or 6 cycles of latency. 331*0b57cec5SDimitry Andric // Stores are listed as having a single cycle of latency. This is not 332*0b57cec5SDimitry Andric // completely accurate since it takes more than 1 cycle to actually store 333*0b57cec5SDimitry Andric // the value. However, since the store does not produce a result it can be 334*0b57cec5SDimitry Andric // considered complete after one cycle. 335*0b57cec5SDimitry Andric def P9_LS_1C : SchedWriteRes<[LS]> { 336*0b57cec5SDimitry Andric let Latency = 1; 337*0b57cec5SDimitry Andric } 338*0b57cec5SDimitry Andric 339*0b57cec5SDimitry Andric def P9_LS_4C : SchedWriteRes<[LS]> { 340*0b57cec5SDimitry Andric let Latency = 4; 341*0b57cec5SDimitry Andric } 342*0b57cec5SDimitry Andric 343*0b57cec5SDimitry Andric def P9_LS_5C : SchedWriteRes<[LS]> { 344*0b57cec5SDimitry Andric let Latency = 5; 345*0b57cec5SDimitry Andric } 346*0b57cec5SDimitry Andric 347*0b57cec5SDimitry Andric def P9_LS_6C : SchedWriteRes<[LS]> { 348*0b57cec5SDimitry Andric let Latency = 6; 349*0b57cec5SDimitry Andric } 350*0b57cec5SDimitry Andric 351*0b57cec5SDimitry Andric // DFU Unit 352*0b57cec5SDimitry Andric // Some of the most expensive ops use the DFU. 353*0b57cec5SDimitry Andric // Can take from 12 cycles to 76 cycles to obtain a result. 354*0b57cec5SDimitry Andric // The unit may be busy for up to 62 cycles. 355*0b57cec5SDimitry Andric def P9_DFU_12C : SchedWriteRes<[DFU]> { 356*0b57cec5SDimitry Andric let Latency = 12; 357*0b57cec5SDimitry Andric } 358*0b57cec5SDimitry Andric 359*0b57cec5SDimitry Andric def P9_DFU_23C : SchedWriteRes<[DFU]> { 360*0b57cec5SDimitry Andric let Latency = 23; 361*0b57cec5SDimitry Andric let ResourceCycles = [11]; 362*0b57cec5SDimitry Andric } 363*0b57cec5SDimitry Andric 364*0b57cec5SDimitry Andric def P9_DFU_24C : SchedWriteRes<[DFU]> { 365*0b57cec5SDimitry Andric let Latency = 24; 366*0b57cec5SDimitry Andric let ResourceCycles = [12]; 367*0b57cec5SDimitry Andric } 368*0b57cec5SDimitry Andric 369*0b57cec5SDimitry Andric def P9_DFU_37C : SchedWriteRes<[DFU]> { 370*0b57cec5SDimitry Andric let Latency = 37; 371*0b57cec5SDimitry Andric let ResourceCycles = [25]; 372*0b57cec5SDimitry Andric } 373*0b57cec5SDimitry Andric 374*0b57cec5SDimitry Andric def P9_DFU_58C : SchedWriteRes<[DFU]> { 375*0b57cec5SDimitry Andric let Latency = 58; 376*0b57cec5SDimitry Andric let ResourceCycles = [44]; 377*0b57cec5SDimitry Andric } 378*0b57cec5SDimitry Andric 379*0b57cec5SDimitry Andric def P9_DFU_76C : SchedWriteRes<[DFU]> { 380*0b57cec5SDimitry Andric let Latency = 76; 381*0b57cec5SDimitry Andric let ResourceCycles = [62]; 382*0b57cec5SDimitry Andric } 383*0b57cec5SDimitry Andric 384*0b57cec5SDimitry Andric // 2 or 5 cycle latencies for the branch unit. 385*0b57cec5SDimitry Andric def P9_BR_2C : SchedWriteRes<[BR]> { 386*0b57cec5SDimitry Andric let Latency = 2; 387*0b57cec5SDimitry Andric } 388*0b57cec5SDimitry Andric 389*0b57cec5SDimitry Andric def P9_BR_5C : SchedWriteRes<[BR]> { 390*0b57cec5SDimitry Andric let Latency = 5; 391*0b57cec5SDimitry Andric } 392*0b57cec5SDimitry Andric 393*0b57cec5SDimitry Andric // 6 cycle latency for the crypto unit 394*0b57cec5SDimitry Andric def P9_CY_6C : SchedWriteRes<[CY]> { 395*0b57cec5SDimitry Andric let Latency = 6; 396*0b57cec5SDimitry Andric } 397*0b57cec5SDimitry Andric 398*0b57cec5SDimitry Andric // ***************** WriteSeq Definitions ***************** 399*0b57cec5SDimitry Andric 400*0b57cec5SDimitry Andric // These are combinations of the resources listed above. 401*0b57cec5SDimitry Andric // The idea is that some cracked instructions cannot be done in parallel and 402*0b57cec5SDimitry Andric // so the latencies for their resources must be added. 403*0b57cec5SDimitry Andric def P9_LoadAndALUOp_6C : WriteSequence<[P9_LS_4C, P9_ALU_2C]>; 404*0b57cec5SDimitry Andric def P9_LoadAndALUOp_7C : WriteSequence<[P9_LS_5C, P9_ALU_2C]>; 405*0b57cec5SDimitry Andric def P9_LoadAndALU2Op_7C : WriteSequence<[P9_LS_4C, P9_ALU_3C]>; 406*0b57cec5SDimitry Andric def P9_LoadAndALU2Op_8C : WriteSequence<[P9_LS_5C, P9_ALU_3C]>; 407*0b57cec5SDimitry Andric def P9_LoadAndPMOp_8C : WriteSequence<[P9_LS_5C, P9_PM_3C]>; 408*0b57cec5SDimitry Andric def P9_LoadAndLoadOp_8C : WriteSequence<[P9_LS_4C, P9_LS_4C]>; 409*0b57cec5SDimitry Andric def P9_IntDivAndALUOp_18C_8 : WriteSequence<[P9_DIV_16C_8, P9_ALU_2C]>; 410*0b57cec5SDimitry Andric def P9_IntDivAndALUOp_26C_8 : WriteSequence<[P9_DIV_24C_8, P9_ALU_2C]>; 411*0b57cec5SDimitry Andric def P9_IntDivAndALUOp_42C_8 : WriteSequence<[P9_DIV_40C_8, P9_ALU_2C]>; 412*0b57cec5SDimitry Andric def P9_StoreAndALUOp_3C : WriteSequence<[P9_LS_1C, P9_ALU_2C]>; 413*0b57cec5SDimitry Andric def P9_ALUOpAndALUOp_4C : WriteSequence<[P9_ALU_2C, P9_ALU_2C]>; 414*0b57cec5SDimitry Andric def P9_ALU2OpAndALU2Op_6C : WriteSequence<[P9_ALU_3C, P9_ALU_3C]>; 415*0b57cec5SDimitry Andric def P9_ALUOpAndALUOpAndALUOp_6C : 416*0b57cec5SDimitry Andric WriteSequence<[P9_ALU_2C, P9_ALU_2C, P9_ALU_2C]>; 417*0b57cec5SDimitry Andric def P9_DPOpAndALUOp_7C : WriteSequence<[P9_DP_5C, P9_ALU_2C]>; 418*0b57cec5SDimitry Andric def P9_DPOpAndALU2Op_10C : WriteSequence<[P9_DP_7C, P9_ALU_3C]>; 419*0b57cec5SDimitry Andric def P9_DPOpAndALU2Op_25C_5 : WriteSequence<[P9_DP_22C_5, P9_ALU_3C]>; 420*0b57cec5SDimitry Andric def P9_DPOpAndALU2Op_29C_5 : WriteSequence<[P9_DP_26C_5, P9_ALU_3C]>; 421*0b57cec5SDimitry Andric def P9_DPOpAndALU2Op_36C_8 : WriteSequence<[P9_DP_33C_8, P9_ALU_3C]>; 422*0b57cec5SDimitry Andric def P9_DPOpAndALU2Op_39C_10 : WriteSequence<[P9_DP_36C_10, P9_ALU_3C]>; 423*0b57cec5SDimitry Andric def P9_BROpAndALUOp_7C : WriteSequence<[P9_BR_5C, P9_ALU_2C]>; 424*0b57cec5SDimitry Andric 425*0b57cec5SDimitry Andric // Include the resource requirements of individual instructions. 426*0b57cec5SDimitry Andric include "P9InstrResources.td" 427*0b57cec5SDimitry Andric 428*0b57cec5SDimitry Andric} 429*0b57cec5SDimitry Andric 430