gem5
v21.1.0.0
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
cpu
testers
gpu_ruby_test
cpu_thread.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017-2021 Advanced Micro Devices, Inc.
3
* All rights reserved.
4
*
5
* For use for simulation and test purposes only
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
*
10
* 1. Redistributions of source code must retain the above copyright notice,
11
* this list of conditions and the following disclaimer.
12
*
13
* 2. Redistributions in binary form must reproduce the above copyright notice,
14
* this list of conditions and the following disclaimer in the documentation
15
* and/or other materials provided with the distribution.
16
*
17
* 3. Neither the name of the copyright holder nor the names of its
18
* contributors may be used to endorse or promote products derived from this
19
* software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
#include "
cpu/testers/gpu_ruby_test/cpu_thread.hh
"
35
36
#include "debug/ProtocolTest.hh"
37
38
namespace
gem5
39
{
40
41
CpuThread::CpuThread
(
const
Params
&
p
)
42
:
TesterThread
(
p
)
43
{
44
threadName
=
"CpuThread(Thread ID "
+
std::to_string
(
threadId
) +
")"
;
45
threadEvent
.
setDesc
(
"CpuThread tick"
);
46
assert(
numLanes
== 1);
47
}
48
49
void
50
CpuThread::issueLoadOps
()
51
{
52
assert(
curAction
);
53
assert(
curAction
->
getType
() ==
Episode::Action::Type::LOAD
);
54
// we should not have any outstanding fence or atomic op at this point
55
assert(
pendingFenceCount
== 0);
56
assert(
pendingAtomicCount
== 0);
57
58
fatal
(
"CpuThread::issueLoadOps - not yet implemented"
);
59
}
60
61
void
62
CpuThread::issueStoreOps
()
63
{
64
assert(
curAction
);
65
assert(
curAction
->
getType
() ==
Episode::Action::Type::STORE
);
66
// we should not have any outstanding fence or atomic op at this point
67
assert(
pendingFenceCount
== 0);
68
assert(
pendingAtomicCount
== 0);
69
70
fatal
(
"CpuThread::issueStoreOps - not yet implemented"
);
71
}
72
73
void
74
CpuThread::issueAtomicOps
()
75
{
76
assert(
curAction
);
77
assert(
curAction
->
getType
() ==
Episode::Action::Type::ATOMIC
);
78
// we should not have any outstanding ops at this point
79
assert(
pendingFenceCount
== 0);
80
assert(
pendingLdStCount
== 0);
81
assert(
pendingAtomicCount
== 0);
82
83
fatal
(
"CpuThread::issueAtomicOps - not yet implemented"
);
84
}
85
86
void
87
CpuThread::issueAcquireOp
()
88
{
89
DPRINTF
(ProtocolTest,
"Issuing Acquire Op ...\n"
);
90
91
assert(
curAction
);
92
assert(
curAction
->
getType
() ==
Episode::Action::Type::ACQUIRE
);
93
// we should not have any outstanding ops at this point
94
assert(
pendingFenceCount
== 0);
95
assert(
pendingLdStCount
== 0);
96
assert(
pendingAtomicCount
== 0);
97
98
// no-op: Acquire does not apply to CPU threads
99
}
100
101
void
102
CpuThread::issueReleaseOp
()
103
{
104
DPRINTF
(ProtocolTest,
"Issuing Release Op ...\n"
);
105
106
assert(
curAction
);
107
assert(
curAction
->
getType
() ==
Episode::Action::Type::RELEASE
);
108
// we should not have any outstanding ops at this point
109
assert(
pendingFenceCount
== 0);
110
assert(
pendingLdStCount
== 0);
111
assert(
pendingAtomicCount
== 0);
112
113
// no-op: Release does not apply to CPU threads
114
}
115
116
void
117
CpuThread::hitCallback
(
PacketPtr
pkt)
118
{
119
fatal
(
"CpuThread::hitCallback - not yet implemented"
);
120
}
121
122
}
// namespace gem5
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition:
logging.hh:189
gem5::TesterThread::TesterThreadEvent::setDesc
void setDesc(std::string _description)
Definition:
tester_thread.hh:95
gem5::CpuThread::issueLoadOps
void issueLoadOps()
Definition:
cpu_thread.cc:50
gem5::Episode::Action::Type::STORE
@ STORE
gem5::TesterThread::curAction
const Episode::Action * curAction
Definition:
tester_thread.hh:160
gem5::Episode::Action::getType
Type getType() const
Definition:
episode.hh:68
gem5::TesterThread::pendingAtomicCount
int pendingAtomicCount
Definition:
tester_thread.hh:165
sc_dt::to_string
const std::string to_string(sc_enc enc)
Definition:
sc_fxdefs.cc:91
gem5::TesterThread::pendingFenceCount
int pendingFenceCount
Definition:
tester_thread.hh:164
gem5::TesterThread::threadEvent
TesterThreadEvent threadEvent
Definition:
tester_thread.hh:100
gem5::TesterThread
Definition:
tester_thread.hh:51
gem5::CpuThread::hitCallback
void hitCallback(PacketPtr pkt)
Definition:
cpu_thread.cc:117
gem5::TesterThread::pendingLdStCount
int pendingLdStCount
Definition:
tester_thread.hh:163
gem5::CpuThread::issueReleaseOp
void issueReleaseOp()
Definition:
cpu_thread.cc:102
gem5::CpuThread::CpuThread
CpuThread(const Params &p)
Definition:
cpu_thread.cc:41
DPRINTF
#define DPRINTF(x,...)
Definition:
trace.hh:186
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition:
packet.hh:283
gem5::TesterThread::threadId
int threadId
Definition:
tester_thread.hh:138
gem5::TesterThread::numLanes
int numLanes
Definition:
tester_thread.hh:140
gem5::MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:326
gem5::Episode::Action::Type::ATOMIC
@ ATOMIC
gem5::Episode::Action::Type::RELEASE
@ RELEASE
cpu_thread.hh
gem5::CpuThread::issueAtomicOps
void issueAtomicOps()
Definition:
cpu_thread.cc:74
gem5::CpuThread::Params
CpuThreadParams Params
Definition:
cpu_thread.hh:47
gem5::CpuThread::issueStoreOps
void issueStoreOps()
Definition:
cpu_thread.cc:62
gem5::Episode::Action::Type::ACQUIRE
@ ACQUIRE
gem5::CpuThread::issueAcquireOp
void issueAcquireOp()
Definition:
cpu_thread.cc:87
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
decoder.cc:40
gem5::TesterThread::threadName
std::string threadName
Definition:
tester_thread.hh:142
gem5::Episode::Action::Type::LOAD
@ LOAD
Generated on Wed Jul 28 2021 12:10:25 for gem5 by
doxygen
1.8.17