gem5
v21.1.0.2
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
v
x
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
h
i
m
p
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
arch
generic
decoder.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Google, Inc.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met: redistributions of source code must retain the above copyright
7
* notice, this list of conditions and the following disclaimer;
8
* redistributions in binary form must reproduce the above copyright
9
* notice, this list of conditions and the following disclaimer in the
10
* documentation and/or other materials provided with the distribution;
11
* neither the name of the copyright holders nor the names of its
12
* contributors may be used to endorse or promote products derived from
13
* this software without specific prior written permission.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef __ARCH_GENERIC_DECODER_HH__
29
#define __ARCH_GENERIC_DECODER_HH__
30
31
#include "
base/bitfield.hh
"
32
#include "
base/intmath.hh
"
33
#include "
base/types.hh
"
34
#include "
cpu/static_inst_fwd.hh
"
35
36
namespace
gem5
37
{
38
39
class
InstDecoder
40
{
41
protected
:
42
void
*
_moreBytesPtr
;
43
size_t
_moreBytesSize
;
44
Addr
_pcMask
;
45
46
public
:
47
template
<
typename
MoreBytesType>
48
InstDecoder
(MoreBytesType *mb_buf) :
49
_moreBytesPtr
(mb_buf),
_moreBytesSize
(sizeof(MoreBytesType)),
50
_pcMask
(~
mask
(
floorLog2
(
_moreBytesSize
)))
51
{}
52
53
virtual
StaticInstPtr
fetchRomMicroop
(
54
MicroPC
micropc,
StaticInstPtr
curMacroop);
55
56
void
*
moreBytesPtr
()
const
{
return
_moreBytesPtr
; }
57
size_t
moreBytesSize
()
const
{
return
_moreBytesSize
; }
58
Addr
pcMask
()
const
{
return
_pcMask
; }
59
};
60
61
}
// namespace gem5
62
63
#endif // __ARCH_DECODER_GENERIC_HH__
gem5::InstDecoder::fetchRomMicroop
virtual StaticInstPtr fetchRomMicroop(MicroPC micropc, StaticInstPtr curMacroop)
Definition:
decoder.cc:36
gem5::InstDecoder::moreBytesPtr
void * moreBytesPtr() const
Definition:
decoder.hh:56
gem5::RefCountingPtr< StaticInst >
gem5::mask
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
Definition:
bitfield.hh:63
gem5::MicroPC
uint16_t MicroPC
Definition:
types.hh:149
bitfield.hh
gem5::InstDecoder
Definition:
decoder.hh:39
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition:
types.hh:147
gem5::InstDecoder::moreBytesSize
size_t moreBytesSize() const
Definition:
decoder.hh:57
gem5::InstDecoder::pcMask
Addr pcMask() const
Definition:
decoder.hh:58
types.hh
static_inst_fwd.hh
gem5::floorLog2
static constexpr std::enable_if_t< std::is_integral< T >::value, int > floorLog2(T x)
Definition:
intmath.hh:59
gem5::InstDecoder::_pcMask
Addr _pcMask
Definition:
decoder.hh:44
gem5::InstDecoder::_moreBytesSize
size_t _moreBytesSize
Definition:
decoder.hh:43
intmath.hh
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
decoder.cc:40
gem5::InstDecoder::_moreBytesPtr
void * _moreBytesPtr
Definition:
decoder.hh:42
gem5::InstDecoder::InstDecoder
InstDecoder(MoreBytesType *mb_buf)
Definition:
decoder.hh:48
Generated on Tue Sep 21 2021 12:24:21 for gem5 by
doxygen
1.8.17