gem5 v24.0.0.0
Loading...
Searching...
No Matches
qarma.hh
Go to the documentation of this file.
1// -*- mode:c++ -*-
2
3// Copyright (c) 2020 Metempsy Technology Consulting
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating
9// to a hardware implementation of the functionality of the software
10// licensed hereunder. You may use the software subject to the license
11// terms below provided that you ensure that this notice is replicated
12// unmodified and in its entirety in all distributions of the software,
13// modified or unmodified, in source code or in binary form.
14//
15// Redistribution and use in source and binary forms, with or without
16// modification, are permitted provided that the following conditions are
17// met: redistributions of source code must retain the above copyright
18// notice, this list of conditions and the following disclaimer;
19// redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the distribution;
22// neither the name of the copyright holders nor the names of its
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
38#ifndef __ARCH_ARM_QARMA_HH__
39#define __ARCH_ARM_QARMA_HH__
40
41#include "base/bitfield.hh"
42#include "base/bitunion.hh"
43
44namespace gem5
45{
46
47namespace QARMA
48{
49
51 Bitfield<63, 60> b15;
52 Bitfield<59, 56> b14;
53 Bitfield<55, 52> b13;
54 Bitfield<51, 48> b12;
55 Bitfield<47, 44> b11;
56 Bitfield<43, 40> b10;
57 Bitfield<39, 36> b9;
58 Bitfield<35, 32> b8;
59 Bitfield<31, 28> b7;
60 Bitfield<27, 24> b6;
61 Bitfield<23, 20> b5;
62 Bitfield<19, 16> b4;
63 Bitfield<15, 12> b3;
64 Bitfield<11, 8> b2;
65 Bitfield<7, 4> b1;
66 Bitfield<3, 0> b0;
68
69
70 uint8_t rotCell(uint8_t incell, int amount);
71
72 uint8_t tweakCellInvRot(uint8_t incell);
73
74 uint8_t tweakCellRot(uint8_t incell);
75
76 BIT64 tweakInvShuffle(BIT64 indata);
77
78 BIT64
79 tweakShuffle(BIT64 indata);
80
81 BIT64
82 PACCellInvShuffle(BIT64 indata);
83
84 BIT64
85 PACCellShuffle(BIT64 indata);
86
87 uint64_t PACInvSub(uint64_t tInput);
88
89 uint64_t PACSub(uint64_t tInput);
90
91 uint64_t PACMult(uint64_t tInput);
92
93 BIT64
94 computePAC(BIT64 data, BIT64 modifier, BIT64 key0, BIT64 key1);
95
96} // namespace QARMA
97} // namespace gem5
98
99#endif //__ARCH_ARM_QARMA_HH__
const char data[]
#define BitUnion64(name)
Use this to define conveniently sized values overlayed with bitfields.
Definition bitunion.hh:494
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Definition bitunion.hh:428
uint8_t tweakCellRot(uint8_t incell)
Definition qarma.cc:68
BIT64 tweakInvShuffle(BIT64 indata)
Definition qarma.cc:78
int amount
Definition qarma.hh:70
Bitfield< 27, 24 > b6
Definition qarma.hh:60
uint64_t PACInvSub(uint64_t tInput)
Definition qarma.cc:172
Bitfield< 55, 52 > b13
Definition qarma.hh:53
BIT64 PACCellInvShuffle(BIT64 indata)
Definition qarma.cc:125
uint8_t tweakCellInvRot(uint8_t incell)
Definition qarma.cc:58
BIT64 computePAC(BIT64 data, BIT64 modifier, BIT64 key0, BIT64 key1)
Definition qarma.cc:332
uint64_t PACSub(uint64_t tInput)
Definition qarma.cc:237
BIT64 tweakShuffle(BIT64 indata)
Definition qarma.cc:101
Bitfield< 15, 12 > b3
Definition qarma.hh:63
Bitfield< 39, 36 > b9
Definition qarma.hh:57
Bitfield< 7, 4 > b1
Definition qarma.hh:65
BIT64 PACCellShuffle(BIT64 indata)
Definition qarma.cc:148
Bitfield< 51, 48 > b12
Definition qarma.hh:54
Bitfield< 31, 28 > b7
Definition qarma.hh:59
Bitfield< 47, 44 > b11
Definition qarma.hh:55
uint64_t PACMult(uint64_t tInput)
Definition qarma.cc:301
Bitfield< 23, 20 > b5
Definition qarma.hh:61
Bitfield< 3, 0 > b0
Definition qarma.hh:66
Bitfield< 43, 40 > b10
Definition qarma.hh:56
Bitfield< 11, 8 > b2
Definition qarma.hh:64
Bitfield< 19, 16 > b4
Definition qarma.hh:62
Bitfield< 59, 56 > b14
Definition qarma.hh:52
Bitfield< 35, 32 > b8
Definition qarma.hh:58
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36

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