gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
33
34#include "debug/ProtocolTest.hh"
35
36namespace gem5
37{
38
41{
42 threadName = "CpuThread(Thread ID " + std::to_string(threadId) + ")";
43 threadEvent.setDesc("CpuThread tick");
44 assert(numLanes == 1);
45}
46
47void
49{
50 assert(curAction);
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
59void
61{
62 assert(curAction);
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
71void
73{
74 assert(curAction);
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
84void
86{
87 DPRINTF(ProtocolTest, "Issuing Acquire Op ...\n");
88
89 assert(curAction);
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
99void
101{
102 DPRINTF(ProtocolTest, "Issuing Release Op ...\n");
103
104 assert(curAction);
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
114void
116{
117 fatal("CpuThread::hitCallback - not yet implemented");
118}
119
120} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:210
void issueLoadOps()
Definition cpu_thread.cc:48
void issueAcquireOp()
Definition cpu_thread.cc:85
void hitCallback(PacketPtr pkt)
void issueAtomicOps()
Definition cpu_thread.cc:72
void issueReleaseOp()
CpuThread(const Params &p)
Definition cpu_thread.cc:39
CpuThreadParams Params
Definition cpu_thread.hh:45
void issueStoreOps()
Definition cpu_thread.cc:60
Type getType() const
Definition episode.hh:66
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
void setDesc(std::string _description)
const Episode::Action * curAction
TesterThreadEvent threadEvent
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:200
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36

Generated on Tue Jun 18 2024 16:24:02 for gem5 by doxygen 1.11.0