gem5  v20.1.0.0
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 
44 namespace QARMA
45 {
46 
47  BitUnion64(BIT64)
48  Bitfield<63, 60> b15;
49  Bitfield<59, 56> b14;
50  Bitfield<55, 52> b13;
51  Bitfield<51, 48> b12;
52  Bitfield<47, 44> b11;
53  Bitfield<43, 40> b10;
54  Bitfield<39, 36> b9;
55  Bitfield<35, 32> b8;
56  Bitfield<31, 28> b7;
57  Bitfield<27, 24> b6;
58  Bitfield<23, 20> b5;
59  Bitfield<19, 16> b4;
60  Bitfield<15, 12> b3;
61  Bitfield<11, 8> b2;
62  Bitfield<7, 4> b1;
63  Bitfield<3, 0> b0;
64  EndBitUnion(BIT64)
65 
66 
67  uint8_t rotCell(uint8_t incell, int amount);
68 
69  uint8_t tweakCellInvRot(uint8_t incell);
70 
71  uint8_t tweakCellRot(uint8_t incell);
72 
73  BIT64 tweakInvShuffle(BIT64 indata);
74 
75  BIT64
76  tweakShuffle(BIT64 indata);
77 
78  BIT64
79  PACCellInvShuffle(BIT64 indata);
80 
81  BIT64
82  PACCellShuffle(BIT64 indata);
83 
84  uint64_t PACInvSub(uint64_t tInput);
85 
86  uint64_t PACSub(uint64_t tInput);
87 
88  uint64_t PACMult(uint64_t tInput);
89 
90  BIT64
91  computePAC(BIT64 data, BIT64 modifier, BIT64 key0, BIT64 key1);
92 };
93 #endif //__ARCH_ARM_QARMA_HH__
QARMA::b1
Bitfield< 7, 4 > b1
Definition: qarma.hh:62
data
const char data[]
Definition: circlebuf.test.cc:42
QARMA::b10
Bitfield< 43, 40 > b10
Definition: qarma.hh:53
QARMA::tweakCellInvRot
uint8_t tweakCellInvRot(uint8_t incell)
Definition: qarma.cc:56
QARMA::amount
int amount
Definition: qarma.hh:67
QARMA::b11
Bitfield< 47, 44 > b11
Definition: qarma.hh:52
QARMA::b9
Bitfield< 39, 36 > b9
Definition: qarma.hh:54
QARMA::b15
b15
Definition: qarma.hh:48
bitfield.hh
QARMA
Definition: qarma.hh:44
QARMA::b13
Bitfield< 55, 52 > b13
Definition: qarma.hh:50
QARMA::b14
Bitfield< 59, 56 > b14
Definition: qarma.hh:49
bitunion.hh
QARMA::PACSub
uint64_t PACSub(uint64_t tInput)
Definition: qarma.cc:235
QARMA::tweakShuffle
BIT64 tweakShuffle(BIT64 indata)
Definition: qarma.cc:99
QARMA::b5
Bitfield< 23, 20 > b5
Definition: qarma.hh:58
QARMA::EndBitUnion
EndBitUnion(BIT64) uint8_t rotCell(uint8_t incell
QARMA::PACCellInvShuffle
BIT64 PACCellInvShuffle(BIT64 indata)
Definition: qarma.cc:123
QARMA::b6
Bitfield< 27, 24 > b6
Definition: qarma.hh:57
QARMA::b3
Bitfield< 15, 12 > b3
Definition: qarma.hh:60
QARMA::computePAC
BIT64 computePAC(BIT64 data, BIT64 modifier, BIT64 key0, BIT64 key1)
Definition: qarma.cc:330
QARMA::b8
Bitfield< 35, 32 > b8
Definition: qarma.hh:55
QARMA::BitUnion64
BitUnion64(BIT64) Bitfield< 63
QARMA::tweakInvShuffle
BIT64 tweakInvShuffle(BIT64 indata)
Definition: qarma.cc:76
QARMA::b2
Bitfield< 11, 8 > b2
Definition: qarma.hh:61
QARMA::b4
Bitfield< 19, 16 > b4
Definition: qarma.hh:59
QARMA::PACInvSub
uint64_t PACInvSub(uint64_t tInput)
Definition: qarma.cc:170
QARMA::PACCellShuffle
BIT64 PACCellShuffle(BIT64 indata)
Definition: qarma.cc:146
QARMA::PACMult
uint64_t PACMult(uint64_t tInput)
Definition: qarma.cc:299
QARMA::b0
Bitfield< 3, 0 > b0
Definition: qarma.hh:63
QARMA::b7
Bitfield< 31, 28 > b7
Definition: qarma.hh:56
QARMA::b12
Bitfield< 51, 48 > b12
Definition: qarma.hh:51
QARMA::tweakCellRot
uint8_t tweakCellRot(uint8_t incell)
Definition: qarma.cc:66

Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17