10b57cec5SDimitry Andric//===-- PPCScheduleP9.td - PPC P9 Scheduling Definitions ---*- tablegen -*-===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric// 90b57cec5SDimitry Andric// This file defines the itinerary class data for the POWER9 processor. 100b57cec5SDimitry Andric// 110b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 120b57cec5SDimitry Andricdef P9Model : SchedMachineModel { 130b57cec5SDimitry Andric // The maximum number of instructions to be issued at the same time. 140b57cec5SDimitry Andric // While a value of 8 is technically correct since 8 instructions can be 150b57cec5SDimitry Andric // fetched from the instruction cache. However, only 6 instructions may be 160b57cec5SDimitry Andric // actually dispatched at a time. 170b57cec5SDimitry Andric let IssueWidth = 8; 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric // Load latency is 4 or 5 cycles depending on the load. This latency assumes 200b57cec5SDimitry Andric // that we have a cache hit. For a cache miss the load latency will be more. 215ffd83dbSDimitry Andric // There are two instructions (lxvl, lxvll) that have a latency of 6 cycles. 220b57cec5SDimitry Andric // However it is not worth bumping this value up to 6 when the vast majority 230b57cec5SDimitry Andric // of instructions are 4 or 5 cycles. 240b57cec5SDimitry Andric let LoadLatency = 5; 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric // A total of 16 cycles to recover from a branch mispredict. 270b57cec5SDimitry Andric let MispredictPenalty = 16; 280b57cec5SDimitry Andric 290b57cec5SDimitry Andric // Try to make sure we have at least 10 dispatch groups in a loop. 300b57cec5SDimitry Andric // A dispatch group is 6 instructions. 310b57cec5SDimitry Andric let LoopMicroOpBufferSize = 60; 320b57cec5SDimitry Andric 330b57cec5SDimitry Andric // As iops are dispatched to a slice, they are held in an independent slice 340b57cec5SDimitry Andric // issue queue until all register sources and other dependencies have been 350b57cec5SDimitry Andric // resolved and they can be issued. Each of four execution slices has an 360b57cec5SDimitry Andric // 11-entry iop issue queue. 370b57cec5SDimitry Andric let MicroOpBufferSize = 44; 380b57cec5SDimitry Andric 390b57cec5SDimitry Andric let CompleteModel = 1; 400b57cec5SDimitry Andric 41e8d8bef9SDimitry Andric // Do not support SPE (Signal Processing Engine), prefixed instructions on 42e8d8bef9SDimitry Andric // Power 9, paired vector mem ops, MMA, PC relative mem ops, or instructions 43e8d8bef9SDimitry Andric // introduced in ISA 3.1. 44e8d8bef9SDimitry Andric let UnsupportedFeatures = [HasSPE, PrefixInstrs, PairedVectorMemops, MMA, 45*81ad6265SDimitry Andric PCRelativeMemops, IsISA3_1, IsISAFuture]; 460b57cec5SDimitry Andric} 470b57cec5SDimitry Andric 480b57cec5SDimitry Andriclet SchedModel = P9Model in { 490b57cec5SDimitry Andric 500b57cec5SDimitry Andric // ***************** Processor Resources ***************** 510b57cec5SDimitry Andric 520b57cec5SDimitry Andric // Dispatcher slots: 530b57cec5SDimitry Andric // x0, x1, x2, and x3 are the dedicated slice dispatch ports, where each 540b57cec5SDimitry Andric // corresponds to one of the four execution slices. 550b57cec5SDimitry Andric def DISPx02 : ProcResource<2>; 560b57cec5SDimitry Andric def DISPx13 : ProcResource<2>; 570b57cec5SDimitry Andric // The xa and xb ports can be used to send an iop to either of the two slices 580b57cec5SDimitry Andric // of the superslice, but are restricted to iops with only two primary sources. 590b57cec5SDimitry Andric def DISPxab : ProcResource<2>; 600b57cec5SDimitry Andric // b0 and b1 are dedicated dispatch ports into the branch slice. 610b57cec5SDimitry Andric def DISPb01 : ProcResource<2>; 620b57cec5SDimitry Andric 630b57cec5SDimitry Andric // Any non BR dispatch ports 640b57cec5SDimitry Andric def DISP_NBR 650b57cec5SDimitry Andric : ProcResGroup<[ DISPx02, DISPx13, DISPxab]>; 660b57cec5SDimitry Andric def DISP_SS : ProcResGroup<[ DISPx02, DISPx13]>; 670b57cec5SDimitry Andric 680b57cec5SDimitry Andric // Issue Ports 690b57cec5SDimitry Andric // An instruction can go down one of two issue queues. 700b57cec5SDimitry Andric // Address Generation (AGEN) mainly for loads and stores. 710b57cec5SDimitry Andric // Execution (EXEC) for most other instructions. 720b57cec5SDimitry Andric // Some instructions cannot be run on just any issue queue and may require an 730b57cec5SDimitry Andric // Even or an Odd queue. The EXECE represents the even queues and the EXECO 740b57cec5SDimitry Andric // represents the odd queues. 750b57cec5SDimitry Andric def IP_AGEN : ProcResource<4>; 760b57cec5SDimitry Andric def IP_EXEC : ProcResource<4>; 770b57cec5SDimitry Andric def IP_EXECE : ProcResource<2> { 780b57cec5SDimitry Andric //Even Exec Ports 790b57cec5SDimitry Andric let Super = IP_EXEC; 800b57cec5SDimitry Andric } 810b57cec5SDimitry Andric def IP_EXECO : ProcResource<2> { 820b57cec5SDimitry Andric //Odd Exec Ports 830b57cec5SDimitry Andric let Super = IP_EXEC; 840b57cec5SDimitry Andric } 850b57cec5SDimitry Andric 860b57cec5SDimitry Andric // Pipeline Groups 870b57cec5SDimitry Andric // Four ALU (Fixed Point Arithmetic) units in total. Two even, two Odd. 880b57cec5SDimitry Andric def ALU : ProcResource<4>; 890b57cec5SDimitry Andric def ALUE : ProcResource<2> { 900b57cec5SDimitry Andric //Even ALU pipelines 910b57cec5SDimitry Andric let Super = ALU; 920b57cec5SDimitry Andric } 930b57cec5SDimitry Andric def ALUO : ProcResource<2> { 940b57cec5SDimitry Andric //Odd ALU pipelines 950b57cec5SDimitry Andric let Super = ALU; 960b57cec5SDimitry Andric } 970b57cec5SDimitry Andric 980b57cec5SDimitry Andric // Two DIV (Fixed Point Divide) units. 990b57cec5SDimitry Andric def DIV : ProcResource<2>; 1000b57cec5SDimitry Andric 1010b57cec5SDimitry Andric // Four DP (Floating Point) units in total. Two even, two Odd. 1020b57cec5SDimitry Andric def DP : ProcResource<4>; 1030b57cec5SDimitry Andric def DPE : ProcResource<2> { 1040b57cec5SDimitry Andric //Even DP pipelines 1050b57cec5SDimitry Andric let Super = DP; 1060b57cec5SDimitry Andric } 1070b57cec5SDimitry Andric def DPO : ProcResource<2> { 1080b57cec5SDimitry Andric //Odd DP pipelines 1090b57cec5SDimitry Andric let Super = DP; 1100b57cec5SDimitry Andric } 1110b57cec5SDimitry Andric 1120b57cec5SDimitry Andric // Four LS (Load or Store) units. 1130b57cec5SDimitry Andric def LS : ProcResource<4>; 1140b57cec5SDimitry Andric 1150b57cec5SDimitry Andric // Two PM (Permute) units. 1160b57cec5SDimitry Andric def PM : ProcResource<2>; 1170b57cec5SDimitry Andric 1180b57cec5SDimitry Andric // Only one DFU (Decimal Floating Point and Quad Precision) unit. 1190b57cec5SDimitry Andric def DFU : ProcResource<1>; 1200b57cec5SDimitry Andric 1210b57cec5SDimitry Andric // Only one Branch unit. 1220b57cec5SDimitry Andric def BR : ProcResource<1> { 1230b57cec5SDimitry Andric let BufferSize = 16; 1240b57cec5SDimitry Andric } 1250b57cec5SDimitry Andric 1260b57cec5SDimitry Andric // Only one CY (Crypto) unit. 1270b57cec5SDimitry Andric def CY : ProcResource<1>; 1280b57cec5SDimitry Andric 1290b57cec5SDimitry Andric // ***************** SchedWriteRes Definitions ***************** 1300b57cec5SDimitry Andric 1310b57cec5SDimitry Andric // Dispatcher 1320b57cec5SDimitry Andric // Dispatch Rules: '-' or 'V' 1330b57cec5SDimitry Andric // Vector ('V') - vector iops (128-bit operand) take only one decode and 1340b57cec5SDimitry Andric // dispatch slot but are dispatched to both the even and odd slices of a 1350b57cec5SDimitry Andric // superslice. 1360b57cec5SDimitry Andric def DISP_1C : SchedWriteRes<[DISP_NBR]> { 1370b57cec5SDimitry Andric let NumMicroOps = 0; 1380b57cec5SDimitry Andric let Latency = 1; 1390b57cec5SDimitry Andric } 1400b57cec5SDimitry Andric // Dispatch Rules: 'E' 1410b57cec5SDimitry Andric // Even slice ('E')- certain operations must be sent only to an even slice. 1420b57cec5SDimitry Andric // Also consumes odd dispatch slice slot of the same superslice at dispatch 1430b57cec5SDimitry Andric def DISP_EVEN_1C : SchedWriteRes<[ DISPx02, DISPx13 ]> { 1440b57cec5SDimitry Andric let NumMicroOps = 0; 1450b57cec5SDimitry Andric let Latency = 1; 1460b57cec5SDimitry Andric } 1470b57cec5SDimitry Andric // Dispatch Rules: 'P' 1480b57cec5SDimitry Andric // Paired ('P') - certain cracked and expanded iops are paired such that they 1490b57cec5SDimitry Andric // must dispatch together to the same superslice. 1500b57cec5SDimitry Andric def DISP_PAIR_1C : SchedWriteRes<[ DISP_SS, DISP_SS]> { 1510b57cec5SDimitry Andric let NumMicroOps = 0; 1520b57cec5SDimitry Andric let Latency = 1; 1530b57cec5SDimitry Andric } 1540b57cec5SDimitry Andric // Tuple Restricted ('R') - certain iops preclude dispatching more than one 1550b57cec5SDimitry Andric // operation per slice for the super- slice to which they are dispatched 1560b57cec5SDimitry Andric def DISP_3SLOTS_1C : SchedWriteRes<[DISPx02, DISPx13, DISPxab]> { 1570b57cec5SDimitry Andric let NumMicroOps = 0; 1580b57cec5SDimitry Andric let Latency = 1; 1590b57cec5SDimitry Andric } 1600b57cec5SDimitry Andric // Each execution and branch slice can receive up to two iops per cycle 1610b57cec5SDimitry Andric def DISP_BR_1C : SchedWriteRes<[ DISPxab ]> { 1620b57cec5SDimitry Andric let NumMicroOps = 0; 1630b57cec5SDimitry Andric let Latency = 1; 1640b57cec5SDimitry Andric } 1650b57cec5SDimitry Andric 1660b57cec5SDimitry Andric // Issue Ports 1670b57cec5SDimitry Andric def IP_AGEN_1C : SchedWriteRes<[IP_AGEN]> { 1680b57cec5SDimitry Andric let NumMicroOps = 0; 1690b57cec5SDimitry Andric let Latency = 1; 1700b57cec5SDimitry Andric } 1710b57cec5SDimitry Andric 1720b57cec5SDimitry Andric def IP_EXEC_1C : SchedWriteRes<[IP_EXEC]> { 1730b57cec5SDimitry Andric let NumMicroOps = 0; 1740b57cec5SDimitry Andric let Latency = 1; 1750b57cec5SDimitry Andric } 1760b57cec5SDimitry Andric 1770b57cec5SDimitry Andric def IP_EXECE_1C : SchedWriteRes<[IP_EXECE]> { 1780b57cec5SDimitry Andric let NumMicroOps = 0; 1790b57cec5SDimitry Andric let Latency = 1; 1800b57cec5SDimitry Andric } 1810b57cec5SDimitry Andric 1820b57cec5SDimitry Andric def IP_EXECO_1C : SchedWriteRes<[IP_EXECO]> { 1830b57cec5SDimitry Andric let NumMicroOps = 0; 1840b57cec5SDimitry Andric let Latency = 1; 1850b57cec5SDimitry Andric } 1860b57cec5SDimitry Andric 1870b57cec5SDimitry Andric //Pipeline Groups 1880b57cec5SDimitry Andric 1890b57cec5SDimitry Andric // ALU Units 1900b57cec5SDimitry Andric // An ALU may take either 2 or 3 cycles to complete the operation. 1910b57cec5SDimitry Andric // However, the ALU unit is only ever busy for 1 cycle at a time and may 1920b57cec5SDimitry Andric // receive new instructions each cycle. 1930b57cec5SDimitry Andric def P9_ALU_2C : SchedWriteRes<[ALU]> { 1940b57cec5SDimitry Andric let Latency = 2; 1950b57cec5SDimitry Andric } 1960b57cec5SDimitry Andric 1970b57cec5SDimitry Andric def P9_ALUE_2C : SchedWriteRes<[ALUE]> { 1980b57cec5SDimitry Andric let Latency = 2; 1990b57cec5SDimitry Andric } 2000b57cec5SDimitry Andric 2010b57cec5SDimitry Andric def P9_ALUO_2C : SchedWriteRes<[ALUO]> { 2020b57cec5SDimitry Andric let Latency = 2; 2030b57cec5SDimitry Andric } 2040b57cec5SDimitry Andric 2050b57cec5SDimitry Andric def P9_ALU_3C : SchedWriteRes<[ALU]> { 2060b57cec5SDimitry Andric let Latency = 3; 2070b57cec5SDimitry Andric } 2080b57cec5SDimitry Andric 2090b57cec5SDimitry Andric def P9_ALUE_3C : SchedWriteRes<[ALUE]> { 2100b57cec5SDimitry Andric let Latency = 3; 2110b57cec5SDimitry Andric } 2120b57cec5SDimitry Andric 2130b57cec5SDimitry Andric def P9_ALUO_3C : SchedWriteRes<[ALUO]> { 2140b57cec5SDimitry Andric let Latency = 3; 2150b57cec5SDimitry Andric } 2160b57cec5SDimitry Andric 2170b57cec5SDimitry Andric // DIV Unit 2180b57cec5SDimitry Andric // A DIV unit may take from 5 to 40 cycles to complete. 2190b57cec5SDimitry Andric // Some DIV operations may keep the unit busy for up to 8 cycles. 2200b57cec5SDimitry Andric def P9_DIV_5C : SchedWriteRes<[DIV]> { 2210b57cec5SDimitry Andric let Latency = 5; 2220b57cec5SDimitry Andric } 2230b57cec5SDimitry Andric 2240b57cec5SDimitry Andric def P9_DIV_12C : SchedWriteRes<[DIV]> { 2250b57cec5SDimitry Andric let Latency = 12; 2260b57cec5SDimitry Andric } 2270b57cec5SDimitry Andric 2280b57cec5SDimitry Andric def P9_DIV_16C_8 : SchedWriteRes<[DIV]> { 2290b57cec5SDimitry Andric let ResourceCycles = [8]; 2300b57cec5SDimitry Andric let Latency = 16; 2310b57cec5SDimitry Andric } 2320b57cec5SDimitry Andric 2330b57cec5SDimitry Andric def P9_DIV_24C_8 : SchedWriteRes<[DIV]> { 2340b57cec5SDimitry Andric let ResourceCycles = [8]; 2350b57cec5SDimitry Andric let Latency = 24; 2360b57cec5SDimitry Andric } 2370b57cec5SDimitry Andric 2380b57cec5SDimitry Andric def P9_DIV_40C_8 : SchedWriteRes<[DIV]> { 2390b57cec5SDimitry Andric let ResourceCycles = [8]; 2400b57cec5SDimitry Andric let Latency = 40; 2410b57cec5SDimitry Andric } 2420b57cec5SDimitry Andric 2430b57cec5SDimitry Andric // DP Unit 2440b57cec5SDimitry Andric // A DP unit may take from 2 to 36 cycles to complete. 2450b57cec5SDimitry Andric // Some DP operations keep the unit busy for up to 10 cycles. 2460b57cec5SDimitry Andric def P9_DP_5C : SchedWriteRes<[DP]> { 2470b57cec5SDimitry Andric let Latency = 5; 2480b57cec5SDimitry Andric } 2490b57cec5SDimitry Andric 2500b57cec5SDimitry Andric def P9_DP_7C : SchedWriteRes<[DP]> { 2510b57cec5SDimitry Andric let Latency = 7; 2520b57cec5SDimitry Andric } 2530b57cec5SDimitry Andric 2540b57cec5SDimitry Andric def P9_DPE_7C : SchedWriteRes<[DPE]> { 2550b57cec5SDimitry Andric let Latency = 7; 2560b57cec5SDimitry Andric } 2570b57cec5SDimitry Andric 2580b57cec5SDimitry Andric def P9_DPO_7C : SchedWriteRes<[DPO]> { 2590b57cec5SDimitry Andric let Latency = 7; 2600b57cec5SDimitry Andric } 2610b57cec5SDimitry Andric 2620b57cec5SDimitry Andric def P9_DP_22C_5 : SchedWriteRes<[DP]> { 2630b57cec5SDimitry Andric let ResourceCycles = [5]; 2640b57cec5SDimitry Andric let Latency = 22; 2650b57cec5SDimitry Andric } 2660b57cec5SDimitry Andric 2670b57cec5SDimitry Andric def P9_DPO_24C_8 : SchedWriteRes<[DPO]> { 2680b57cec5SDimitry Andric let ResourceCycles = [8]; 2690b57cec5SDimitry Andric let Latency = 24; 2700b57cec5SDimitry Andric } 2710b57cec5SDimitry Andric 2720b57cec5SDimitry Andric def P9_DPE_24C_8 : SchedWriteRes<[DPE]> { 2730b57cec5SDimitry Andric let ResourceCycles = [8]; 2740b57cec5SDimitry Andric let Latency = 24; 2750b57cec5SDimitry Andric } 2760b57cec5SDimitry Andric 2770b57cec5SDimitry Andric def P9_DP_26C_5 : SchedWriteRes<[DP]> { 2780b57cec5SDimitry Andric let ResourceCycles = [5]; 2790b57cec5SDimitry Andric let Latency = 22; 2800b57cec5SDimitry Andric } 2810b57cec5SDimitry Andric 2820b57cec5SDimitry Andric def P9_DPE_27C_10 : SchedWriteRes<[DP]> { 2830b57cec5SDimitry Andric let ResourceCycles = [10]; 2840b57cec5SDimitry Andric let Latency = 27; 2850b57cec5SDimitry Andric } 2860b57cec5SDimitry Andric 2870b57cec5SDimitry Andric def P9_DPO_27C_10 : SchedWriteRes<[DP]> { 2880b57cec5SDimitry Andric let ResourceCycles = [10]; 2890b57cec5SDimitry Andric let Latency = 27; 2900b57cec5SDimitry Andric } 2910b57cec5SDimitry Andric 2920b57cec5SDimitry Andric def P9_DP_33C_8 : SchedWriteRes<[DP]> { 2930b57cec5SDimitry Andric let ResourceCycles = [8]; 2940b57cec5SDimitry Andric let Latency = 33; 2950b57cec5SDimitry Andric } 2960b57cec5SDimitry Andric 2970b57cec5SDimitry Andric def P9_DPE_33C_8 : SchedWriteRes<[DPE]> { 2980b57cec5SDimitry Andric let ResourceCycles = [8]; 2990b57cec5SDimitry Andric let Latency = 33; 3000b57cec5SDimitry Andric } 3010b57cec5SDimitry Andric 3020b57cec5SDimitry Andric def P9_DPO_33C_8 : SchedWriteRes<[DPO]> { 3030b57cec5SDimitry Andric let ResourceCycles = [8]; 3040b57cec5SDimitry Andric let Latency = 33; 3050b57cec5SDimitry Andric } 3060b57cec5SDimitry Andric 3070b57cec5SDimitry Andric def P9_DP_36C_10 : SchedWriteRes<[DP]> { 3080b57cec5SDimitry Andric let ResourceCycles = [10]; 3090b57cec5SDimitry Andric let Latency = 36; 3100b57cec5SDimitry Andric } 3110b57cec5SDimitry Andric 3120b57cec5SDimitry Andric def P9_DPE_36C_10 : SchedWriteRes<[DP]> { 3130b57cec5SDimitry Andric let ResourceCycles = [10]; 3140b57cec5SDimitry Andric let Latency = 36; 3150b57cec5SDimitry Andric } 3160b57cec5SDimitry Andric 3170b57cec5SDimitry Andric def P9_DPO_36C_10 : SchedWriteRes<[DP]> { 3180b57cec5SDimitry Andric let ResourceCycles = [10]; 3190b57cec5SDimitry Andric let Latency = 36; 3200b57cec5SDimitry Andric } 3210b57cec5SDimitry Andric 3220b57cec5SDimitry Andric // PM Unit 3230b57cec5SDimitry Andric // Three cycle permute operations. 3240b57cec5SDimitry Andric def P9_PM_3C : SchedWriteRes<[PM]> { 3250b57cec5SDimitry Andric let Latency = 3; 3260b57cec5SDimitry Andric } 3270b57cec5SDimitry Andric 3280b57cec5SDimitry Andric // Load and Store Units 3290b57cec5SDimitry Andric // Loads can have 4, 5 or 6 cycles of latency. 3300b57cec5SDimitry Andric // Stores are listed as having a single cycle of latency. This is not 3310b57cec5SDimitry Andric // completely accurate since it takes more than 1 cycle to actually store 3320b57cec5SDimitry Andric // the value. However, since the store does not produce a result it can be 3330b57cec5SDimitry Andric // considered complete after one cycle. 3340b57cec5SDimitry Andric def P9_LS_1C : SchedWriteRes<[LS]> { 3350b57cec5SDimitry Andric let Latency = 1; 3360b57cec5SDimitry Andric } 3370b57cec5SDimitry Andric 3380b57cec5SDimitry Andric def P9_LS_4C : SchedWriteRes<[LS]> { 3390b57cec5SDimitry Andric let Latency = 4; 3400b57cec5SDimitry Andric } 3410b57cec5SDimitry Andric 3420b57cec5SDimitry Andric def P9_LS_5C : SchedWriteRes<[LS]> { 3430b57cec5SDimitry Andric let Latency = 5; 3440b57cec5SDimitry Andric } 3450b57cec5SDimitry Andric 3460b57cec5SDimitry Andric def P9_LS_6C : SchedWriteRes<[LS]> { 3470b57cec5SDimitry Andric let Latency = 6; 3480b57cec5SDimitry Andric } 3490b57cec5SDimitry Andric 3500b57cec5SDimitry Andric // DFU Unit 3510b57cec5SDimitry Andric // Some of the most expensive ops use the DFU. 3520b57cec5SDimitry Andric // Can take from 12 cycles to 76 cycles to obtain a result. 3530b57cec5SDimitry Andric // The unit may be busy for up to 62 cycles. 3540b57cec5SDimitry Andric def P9_DFU_12C : SchedWriteRes<[DFU]> { 3550b57cec5SDimitry Andric let Latency = 12; 3560b57cec5SDimitry Andric } 3570b57cec5SDimitry Andric 3580b57cec5SDimitry Andric def P9_DFU_23C : SchedWriteRes<[DFU]> { 3590b57cec5SDimitry Andric let Latency = 23; 3600b57cec5SDimitry Andric let ResourceCycles = [11]; 3610b57cec5SDimitry Andric } 3620b57cec5SDimitry Andric 3630b57cec5SDimitry Andric def P9_DFU_24C : SchedWriteRes<[DFU]> { 3640b57cec5SDimitry Andric let Latency = 24; 3650b57cec5SDimitry Andric let ResourceCycles = [12]; 3660b57cec5SDimitry Andric } 3670b57cec5SDimitry Andric 3680b57cec5SDimitry Andric def P9_DFU_37C : SchedWriteRes<[DFU]> { 3690b57cec5SDimitry Andric let Latency = 37; 3700b57cec5SDimitry Andric let ResourceCycles = [25]; 3710b57cec5SDimitry Andric } 3720b57cec5SDimitry Andric 3730b57cec5SDimitry Andric def P9_DFU_58C : SchedWriteRes<[DFU]> { 3740b57cec5SDimitry Andric let Latency = 58; 3750b57cec5SDimitry Andric let ResourceCycles = [44]; 3760b57cec5SDimitry Andric } 3770b57cec5SDimitry Andric 3780b57cec5SDimitry Andric def P9_DFU_76C : SchedWriteRes<[DFU]> { 3790b57cec5SDimitry Andric let Latency = 76; 3800b57cec5SDimitry Andric let ResourceCycles = [62]; 3810b57cec5SDimitry Andric } 3820b57cec5SDimitry Andric 3830b57cec5SDimitry Andric // 2 or 5 cycle latencies for the branch unit. 3840b57cec5SDimitry Andric def P9_BR_2C : SchedWriteRes<[BR]> { 3850b57cec5SDimitry Andric let Latency = 2; 3860b57cec5SDimitry Andric } 3870b57cec5SDimitry Andric 3880b57cec5SDimitry Andric def P9_BR_5C : SchedWriteRes<[BR]> { 3890b57cec5SDimitry Andric let Latency = 5; 3900b57cec5SDimitry Andric } 3910b57cec5SDimitry Andric 3920b57cec5SDimitry Andric // 6 cycle latency for the crypto unit 3930b57cec5SDimitry Andric def P9_CY_6C : SchedWriteRes<[CY]> { 3940b57cec5SDimitry Andric let Latency = 6; 3950b57cec5SDimitry Andric } 3960b57cec5SDimitry Andric 3970b57cec5SDimitry Andric // ***************** WriteSeq Definitions ***************** 3980b57cec5SDimitry Andric 3990b57cec5SDimitry Andric // These are combinations of the resources listed above. 4000b57cec5SDimitry Andric // The idea is that some cracked instructions cannot be done in parallel and 4010b57cec5SDimitry Andric // so the latencies for their resources must be added. 4020b57cec5SDimitry Andric def P9_LoadAndALUOp_6C : WriteSequence<[P9_LS_4C, P9_ALU_2C]>; 4030b57cec5SDimitry Andric def P9_LoadAndALUOp_7C : WriteSequence<[P9_LS_5C, P9_ALU_2C]>; 4040b57cec5SDimitry Andric def P9_LoadAndALU2Op_7C : WriteSequence<[P9_LS_4C, P9_ALU_3C]>; 4050b57cec5SDimitry Andric def P9_LoadAndALU2Op_8C : WriteSequence<[P9_LS_5C, P9_ALU_3C]>; 4060b57cec5SDimitry Andric def P9_LoadAndPMOp_8C : WriteSequence<[P9_LS_5C, P9_PM_3C]>; 4070b57cec5SDimitry Andric def P9_IntDivAndALUOp_18C_8 : WriteSequence<[P9_DIV_16C_8, P9_ALU_2C]>; 4080b57cec5SDimitry Andric def P9_IntDivAndALUOp_26C_8 : WriteSequence<[P9_DIV_24C_8, P9_ALU_2C]>; 4090b57cec5SDimitry Andric def P9_IntDivAndALUOp_42C_8 : WriteSequence<[P9_DIV_40C_8, P9_ALU_2C]>; 4100b57cec5SDimitry Andric def P9_StoreAndALUOp_3C : WriteSequence<[P9_LS_1C, P9_ALU_2C]>; 4110b57cec5SDimitry Andric def P9_ALUOpAndALUOp_4C : WriteSequence<[P9_ALU_2C, P9_ALU_2C]>; 4120b57cec5SDimitry Andric def P9_ALU2OpAndALU2Op_6C : WriteSequence<[P9_ALU_3C, P9_ALU_3C]>; 4130b57cec5SDimitry Andric def P9_ALUOpAndALUOpAndALUOp_6C : 4140b57cec5SDimitry Andric WriteSequence<[P9_ALU_2C, P9_ALU_2C, P9_ALU_2C]>; 4150b57cec5SDimitry Andric def P9_DPOpAndALUOp_7C : WriteSequence<[P9_DP_5C, P9_ALU_2C]>; 4160b57cec5SDimitry Andric def P9_DPOpAndALU2Op_10C : WriteSequence<[P9_DP_7C, P9_ALU_3C]>; 4170b57cec5SDimitry Andric def P9_DPOpAndALU2Op_25C_5 : WriteSequence<[P9_DP_22C_5, P9_ALU_3C]>; 4180b57cec5SDimitry Andric def P9_DPOpAndALU2Op_29C_5 : WriteSequence<[P9_DP_26C_5, P9_ALU_3C]>; 4190b57cec5SDimitry Andric def P9_DPOpAndALU2Op_36C_8 : WriteSequence<[P9_DP_33C_8, P9_ALU_3C]>; 4200b57cec5SDimitry Andric def P9_DPOpAndALU2Op_39C_10 : WriteSequence<[P9_DP_36C_10, P9_ALU_3C]>; 4210b57cec5SDimitry Andric def P9_BROpAndALUOp_7C : WriteSequence<[P9_BR_5C, P9_ALU_2C]>; 4220b57cec5SDimitry Andric 4230b57cec5SDimitry Andric // Include the resource requirements of individual instructions. 4240b57cec5SDimitry Andric include "P9InstrResources.td" 4250b57cec5SDimitry Andric 4260b57cec5SDimitry Andric} 4270b57cec5SDimitry Andric 428