gem5  v21.1.0.2
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 gem5
45 {
46 
47 namespace QARMA
48 {
49 
50  BitUnion64(BIT64)
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;
67  EndBitUnion(BIT64)
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__
gem5::QARMA::b12
Bitfield< 51, 48 > b12
Definition: qarma.hh:54
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::QARMA::tweakShuffle
BIT64 tweakShuffle(BIT64 indata)
Definition: qarma.cc:101
gem5::QARMA::computePAC
BIT64 computePAC(BIT64 data, BIT64 modifier, BIT64 key0, BIT64 key1)
Definition: qarma.cc:332
gem5::QARMA::EndBitUnion
EndBitUnion(BIT64) uint8_t rotCell(uint8_t incell
gem5::QARMA::b2
Bitfield< 11, 8 > b2
Definition: qarma.hh:64
gem5::QARMA::b7
Bitfield< 31, 28 > b7
Definition: qarma.hh:59
gem5::QARMA::b4
Bitfield< 19, 16 > b4
Definition: qarma.hh:62
gem5::QARMA::PACCellShuffle
BIT64 PACCellShuffle(BIT64 indata)
Definition: qarma.cc:148
gem5::QARMA::b5
Bitfield< 23, 20 > b5
Definition: qarma.hh:61
gem5::QARMA::PACInvSub
uint64_t PACInvSub(uint64_t tInput)
Definition: qarma.cc:172
gem5::QARMA::b8
Bitfield< 35, 32 > b8
Definition: qarma.hh:58
gem5::QARMA::b14
Bitfield< 59, 56 > b14
Definition: qarma.hh:52
gem5::QARMA::b11
Bitfield< 47, 44 > b11
Definition: qarma.hh:55
gem5::QARMA::tweakInvShuffle
BIT64 tweakInvShuffle(BIT64 indata)
Definition: qarma.cc:78
bitfield.hh
gem5::QARMA::PACMult
uint64_t PACMult(uint64_t tInput)
Definition: qarma.cc:301
gem5::QARMA::amount
int amount
Definition: qarma.hh:70
gem5::QARMA::b6
Bitfield< 27, 24 > b6
Definition: qarma.hh:60
bitunion.hh
gem5::QARMA::PACCellInvShuffle
BIT64 PACCellInvShuffle(BIT64 indata)
Definition: qarma.cc:125
gem5::QARMA::PACSub
uint64_t PACSub(uint64_t tInput)
Definition: qarma.cc:237
gem5::QARMA::b1
Bitfield< 7, 4 > b1
Definition: qarma.hh:65
gem5::QARMA::b0
Bitfield< 3, 0 > b0
Definition: qarma.hh:66
gem5::QARMA::tweakCellRot
uint8_t tweakCellRot(uint8_t incell)
Definition: qarma.cc:68
gem5::QARMA::b10
Bitfield< 43, 40 > b10
Definition: qarma.hh:56
gem5::QARMA::b13
Bitfield< 55, 52 > b13
Definition: qarma.hh:53
gem5::QARMA::b3
Bitfield< 15, 12 > b3
Definition: qarma.hh:63
gem5::QARMA::b15
b15
Definition: qarma.hh:51
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::QARMA::BitUnion64
BitUnion64(BIT64) Bitfield< 63
gem5::QARMA::b9
Bitfield< 39, 36 > b9
Definition: qarma.hh:57
gem5::QARMA::tweakCellInvRot
uint8_t tweakCellInvRot(uint8_t incell)
Definition: qarma.cc:58

Generated on Tue Sep 21 2021 12:24:37 for gem5 by doxygen 1.8.17