2015-10-17 09:33:04 +08:00
|
|
|
//=-HexagonScheduleV4.td - HexagonV4 Scheduling Definitions --*- tablegen -*-=//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// There are four SLOTS (four parallel pipelines) in Hexagon V4 machine.
|
|
|
|
// This file describes that machine information.
|
|
|
|
|
|
|
|
//
|
|
|
|
// |===========|==================================================|
|
|
|
|
// | PIPELINE | Instruction Classes |
|
|
|
|
// |===========|==================================================|
|
|
|
|
// | SLOT0 | LD ST ALU32 MEMOP NV SYSTEM |
|
|
|
|
// |-----------|--------------------------------------------------|
|
|
|
|
// | SLOT1 | LD ST ALU32 |
|
|
|
|
// |-----------|--------------------------------------------------|
|
|
|
|
// | SLOT2 | XTYPE ALU32 J JR |
|
|
|
|
// |-----------|--------------------------------------------------|
|
|
|
|
// | SLOT3 | XTYPE ALU32 J CR |
|
|
|
|
// |===========|==================================================|
|
|
|
|
|
|
|
|
def CJ_tc_1_SLOT23 : InstrItinClass;
|
|
|
|
def CJ_tc_2early_SLOT23 : InstrItinClass;
|
|
|
|
def COPROC_VMEM_vtc_long_SLOT01 : InstrItinClass;
|
|
|
|
def COPROC_VX_vtc_long_SLOT23 : InstrItinClass;
|
|
|
|
def COPROC_VX_vtc_SLOT23 : InstrItinClass;
|
|
|
|
def J_tc_3stall_SLOT2 : InstrItinClass;
|
|
|
|
def MAPPING_tc_1_SLOT0123 : InstrItinClass;
|
|
|
|
def M_tc_3stall_SLOT23 : InstrItinClass;
|
|
|
|
|
|
|
|
def HexagonItinerariesV55 :
|
|
|
|
ProcessorItineraries<[SLOT0, SLOT1, SLOT2, SLOT3, SLOT_ENDLOOP], [], [
|
|
|
|
// ALU32
|
|
|
|
InstrItinData<ALU32_2op_tc_1_SLOT0123 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<ALU32_2op_tc_2early_SLOT0123,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [2, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<ALU32_3op_tc_1_SLOT0123 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<ALU32_3op_tc_2_SLOT0123 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [2, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<ALU32_3op_tc_2early_SLOT0123,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [2, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<ALU32_ADDI_tc_1_SLOT0123 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// ALU64
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<ALU64_tc_1_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<ALU64_tc_2_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<ALU64_tc_2early_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<ALU64_tc_3x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// CR -> System
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<CR_tc_2_SLOT3 , [InstrStage<1, [SLOT3]>], [2, 1, 1]>,
|
|
|
|
InstrItinData<CR_tc_2early_SLOT3 , [InstrStage<1, [SLOT3]>], [2, 1, 1]>,
|
|
|
|
InstrItinData<CR_tc_3x_SLOT3 , [InstrStage<1, [SLOT3]>], [3, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Jump (conditional/unconditional/return etc)
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<CR_tc_2early_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1, 1]>,
|
|
|
|
InstrItinData<CR_tc_3x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1, 1]>,
|
|
|
|
InstrItinData<CJ_tc_1_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1, 1]>,
|
|
|
|
InstrItinData<CJ_tc_2early_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1, 1]>,
|
|
|
|
InstrItinData<J_tc_2early_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1, 1]>,
|
|
|
|
InstrItinData<J_tc_2early_CJUMP_UCJUMP_ARCHDEPSLOT,
|
|
|
|
[InstrStage<1, [SLOT2, SLOT3]>], [2, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// JR
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<J_tc_2early_SLOT2 , [InstrStage<1, [SLOT2]>], [2, 1, 1]>,
|
|
|
|
InstrItinData<J_tc_3stall_SLOT2 , [InstrStage<1, [SLOT2]>], [3, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Extender
|
|
|
|
InstrItinData<EXTENDER_tc_1_SLOT0123,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>], [1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Load
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<LD_tc_ld_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[2, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<LD_tc_ld_pi_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[2, 1]>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<LD_tc_3or4stall_SLOT0, [InstrStage<1, [SLOT0]>], [2, 1]>,
|
|
|
|
InstrItinData<LD_tc_ld_SLOT0 , [InstrStage<1, [SLOT0]>], [2, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// M
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<M_tc_1_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<M_tc_2_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<M_tc_2_acc_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<M_tc_3_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<M_tc_3x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<M_tc_3x_acc_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1, 1]>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<M_tc_3or4x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<M_tc_3or4x_acc_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<M_tc_3stall_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Store
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<ST_tc_st_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[1, 1, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<ST_tc_st_pi_SLOT01, [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[1, 1, 1]>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<ST_tc_3stall_SLOT0, [InstrStage<1, [SLOT0]>], [2, 1, 1]>,
|
|
|
|
InstrItinData<ST_tc_ld_SLOT0 , [InstrStage<1, [SLOT0]>], [2, 1, 1]>,
|
|
|
|
InstrItinData<ST_tc_st_SLOT0 , [InstrStage<1, [SLOT0]>], [1, 1, 1]>,
|
2017-02-10 23:33:13 +08:00
|
|
|
InstrItinData<ST_tc_st_pi_SLOT0 , [InstrStage<1, [SLOT0]>], [1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// S
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<S_2op_tc_1_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<S_2op_tc_2_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<S_2op_tc_2early_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<S_2op_tc_3or4x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_1_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_2_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_2early_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[2, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_3_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_3stall_SLOT23, [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
|
|
|
InstrItinData<S_3op_tc_3x_SLOT23 , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[3, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// New Value Compare Jump
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<NCJ_tc_3or4stall_SLOT0, [InstrStage<1, [SLOT0]>],
|
|
|
|
[3, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Mem ops
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<V2LDST_tc_st_SLOT0 , [InstrStage<1, [SLOT0]>],
|
|
|
|
[1, 1, 1, 1]>,
|
|
|
|
InstrItinData<V2LDST_tc_ld_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[2, 1, 1, 1]>,
|
|
|
|
InstrItinData<V2LDST_tc_st_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[1, 1, 1, 1]>,
|
|
|
|
InstrItinData<V4LDST_tc_st_SLOT0 , [InstrStage<1, [SLOT0]>],
|
|
|
|
[1, 1, 1, 1]>,
|
|
|
|
InstrItinData<V4LDST_tc_ld_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[3, 1, 1, 1]>,
|
|
|
|
InstrItinData<V4LDST_tc_st_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>],
|
|
|
|
[1, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Endloop
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<J_tc_2early_SLOT0123, [InstrStage<1, [SLOT_ENDLOOP]>],
|
|
|
|
[2]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Vector
|
|
|
|
InstrItinData<COPROC_VMEM_vtc_long_SLOT01,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1]>], [2, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<COPROC_VX_vtc_long_SLOT23 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT2, SLOT3]>], [3, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<COPROC_VX_vtc_SLOT23 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT2, SLOT3]>], [3, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<MAPPING_tc_1_SLOT0123 ,
|
2016-07-16 00:58:34 +08:00
|
|
|
[InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
// Misc
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrItinData<COMPOUND_CJ_ARCHDEPSLOT , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<COMPOUND , [InstrStage<1, [SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<DUPLEX , [InstrStage<1, [SLOT0]>], [1, 1, 1]>,
|
|
|
|
InstrItinData<PREFIX , [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
|
|
|
InstrItinData<PSEUDO , [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>],
|
|
|
|
[1, 1, 1]>,
|
2015-10-17 09:33:04 +08:00
|
|
|
InstrItinData<PSEUDOM, [InstrStage<1, [SLOT2, SLOT3], 0>,
|
2016-07-16 00:58:34 +08:00
|
|
|
InstrStage<1, [SLOT2, SLOT3]>], [1, 1, 1]>
|
2015-10-17 09:33:04 +08:00
|
|
|
]>;
|
|
|
|
|
|
|
|
def HexagonModelV55 : SchedMachineModel {
|
|
|
|
// Max issue per cycle == bundle width.
|
|
|
|
let IssueWidth = 4;
|
|
|
|
let Itineraries = HexagonItinerariesV55;
|
|
|
|
let LoadLatency = 1;
|
2016-03-02 04:03:21 +08:00
|
|
|
let CompleteModel = 0;
|
2015-10-17 09:33:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Hexagon V4 Resource Definitions -
|
|
|
|
//===----------------------------------------------------------------------===//
|