gem5 v24.0.0.0
Loading...
Searching...
No Matches
vec.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010-2011, 2014, 2016-2019 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2007-2008 The Florida State University
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40
41#ifndef __ARCH_ARM_REGS_VEC_HH__
42#define __ARCH_ARM_REGS_VEC_HH__
43
44#include "arch/arm/types.hh"
47#include "cpu/reg_class.hh"
48#include "debug/VecPredRegs.hh"
49#include "debug/VecRegs.hh"
50
51namespace gem5
52{
53
54namespace ArmISA
55{
56
57// Number of VecElem per Vector Register considering only pre-SVE
58// Advanced SIMD registers.
59constexpr unsigned NumVecElemPerNeonVecReg = 4;
60// Number of VecElem per Vector Register, computed based on the vector length
62
63using VecElem = uint32_t;
66
72
73// Vec, PredVec
74// NumFloatV7ArchRegs: This in theory should be 32.
75// However in A32 gem5 is splitting double register accesses in two
76// subsequent single register ones. This means we would use a index
77// bigger than 31 when accessing D16-D31.
78const int NumFloatV7ArchRegs = 64; // S0-S31, D0-D31
79const int NumVecV7ArchRegs = 16; // Q0-Q15
80const int NumVecV8ArchRegs = 32; // V0-V31
81const int NumVecSpecialRegs = 8;
82const int NumVecIntrlvRegs = 4;
84const int NumVecPredRegs = 18; // P0-P15, FFR, UREG0
85
86// Vec, PredVec indices
89const int INTRLVREG1 = INTRLVREG0 + 1;
90const int INTRLVREG2 = INTRLVREG0 + 2;
91const int INTRLVREG3 = INTRLVREG0 + 3;
92const int VECREG_UREG0 = 32;
93const int PREDREG_FFR = 16;
94const int PREDREG_UREG0 = 17;
95
100
101inline constexpr RegClass vecRegClass =
103 ops(vecRegClassOps).
104 regType<VecRegContainer>();
105inline constexpr RegClass vecElemClass =
107 debug::VecRegs).
109inline constexpr RegClass vecPredRegClass =
111 debug::VecPredRegs).
113 regType<VecPredRegContainer>();
114
115} // namespace ArmISA
116} // namespace gem5
117
118#endif
Predicate register view.
typename std::conditional_t< Const, const VecPredRegContainer< NUM_BITS, Packed >, VecPredRegContainer< NUM_BITS, Packed > > Container
Container type alias.
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition vec_reg.hh:126
const int NumVecV8ArchRegs
Definition vec.hh:80
const int INTRLVREG3
Definition vec.hh:91
const int INTRLVREG1
Definition vec.hh:89
const int NumVecPredRegs
Definition vec.hh:84
const int VecSpecialElem
Definition vec.hh:87
static TypedRegClassOps< ArmISA::VecRegContainer > vecRegClassOps
Definition vec.hh:98
const int NumVecIntrlvRegs
Definition vec.hh:82
constexpr unsigned NumVecElemPerVecReg
Definition vec.hh:61
const int NumFloatV7ArchRegs
Definition vec.hh:78
constexpr RegClass vecElemClass
Definition vec.hh:105
const int NumVecV7ArchRegs
Definition vec.hh:79
const int VECREG_UREG0
Definition vec.hh:92
static VecElemRegClassOps< RegVal > vecRegElemClassOps(NumVecElemPerVecReg)
constexpr unsigned MaxSveVecLenInWords
Definition types.hh:496
constexpr unsigned NumVecElemPerNeonVecReg
Definition vec.hh:59
VecPredReg::Container VecPredRegContainer
Definition vec.hh:71
const int NumVecRegs
Definition vec.hh:83
constexpr RegClass vecPredRegClass
Definition vec.hh:109
static TypedRegClassOps< ArmISA::VecPredRegContainer > vecPredRegClassOps
Definition vec.hh:99
const int PREDREG_FFR
Definition vec.hh:93
const int NumVecSpecialRegs
Definition vec.hh:81
uint32_t VecElem
Definition vec.hh:63
const int PREDREG_UREG0
Definition vec.hh:94
const int INTRLVREG2
Definition vec.hh:90
constexpr RegClass vecRegClass
Definition vec.hh:101
const int INTRLVREG0
Definition vec.hh:88
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
constexpr char VecPredRegClassName[]
Definition reg_class.hh:79
constexpr char VecRegClassName[]
Definition reg_class.hh:77
@ VecPredRegClass
Definition reg_class.hh:67
@ VecRegClass
Vector Register.
Definition reg_class.hh:64
@ VecElemClass
Vector Register Native Elem lane.
Definition reg_class.hh:66
constexpr char VecElemClassName[]
Definition reg_class.hh:78
Vector Registers layout specification.

Generated on Tue Jun 18 2024 16:23:57 for gem5 by doxygen 1.11.0