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