gem5
v19.0.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
+
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
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
a
b
c
d
e
f
i
l
m
o
p
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
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
systemc
core
sc_prim.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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
* Authors: Gabe Black
28
*/
29
30
#include "
systemc/core/channel.hh
"
31
#include "
systemc/core/scheduler.hh
"
32
#include "
systemc/ext/channel/messages.hh
"
33
#include "
systemc/ext/core/sc_main.hh
"
34
#include "
systemc/ext/core/sc_prim.hh
"
35
36
namespace
sc_gem5
37
{
38
39
uint64_t
getChangeStamp
() {
return
scheduler
.
changeStamp
(); }
40
41
}
// namespace sc_gem5
42
43
namespace
sc_core
44
{
45
46
sc_prim_channel::sc_prim_channel() : _gem5_channel(nullptr)
47
{
48
if
(
sc_is_running
()) {
49
SC_REPORT_ERROR
(
SC_ID_INSERT_PRIM_CHANNEL_
,
"simulation running"
);
50
}
51
if
(::
sc_gem5::scheduler
.elaborationDone()) {
52
SC_REPORT_ERROR
(
SC_ID_INSERT_PRIM_CHANNEL_
,
"elaboration done"
);
53
}
54
_gem5_channel
=
new
sc_gem5::Channel
(
this
);
55
}
56
57
sc_prim_channel::sc_prim_channel
(
const
char
*_name) :
58
sc_object
(_name),
_gem5_channel
(nullptr)
59
{
60
if
(
sc_is_running
()) {
61
SC_REPORT_ERROR
(
SC_ID_INSERT_PRIM_CHANNEL_
,
"simulation running"
);
62
}
63
if
(::
sc_gem5::scheduler
.elaborationDone()) {
64
SC_REPORT_ERROR
(
SC_ID_INSERT_PRIM_CHANNEL_
,
"elaboration done"
);
65
}
66
_gem5_channel
=
new
sc_gem5::Channel
(
this
);
67
}
68
69
sc_prim_channel::~sc_prim_channel
() {
delete
_gem5_channel
; }
70
71
void
72
sc_prim_channel::request_update
()
73
{
74
_gem5_channel
->
requestUpdate
();
75
}
76
77
void
78
sc_prim_channel::async_request_update
()
79
{
80
_gem5_channel
->
asyncRequestUpdate
();
81
}
82
83
void
84
sc_prim_channel::next_trigger
()
85
{
86
::sc_core::next_trigger
();
87
}
88
89
void
90
sc_prim_channel::next_trigger
(
const
sc_event
&
e
)
91
{
92
::sc_core::next_trigger
(e);
93
}
94
95
void
96
sc_prim_channel::next_trigger
(
const
sc_event_or_list
&eol)
97
{
98
::sc_core::next_trigger
(eol);
99
}
100
101
void
102
sc_prim_channel::next_trigger
(
const
sc_event_and_list
&eal)
103
{
104
::sc_core::next_trigger
(eal);
105
}
106
107
void
108
sc_prim_channel::next_trigger
(
const
sc_time
&
t
)
109
{
110
::sc_core::next_trigger
(t);
111
}
112
113
void
114
sc_prim_channel::next_trigger
(
double
d
,
sc_time_unit
u
)
115
{
116
::sc_core::next_trigger
(d, u);
117
}
118
119
void
120
sc_prim_channel::next_trigger
(
const
sc_time
&
t
,
const
sc_event
&
e
)
121
{
122
::sc_core::next_trigger
(t, e);
123
}
124
125
void
126
sc_prim_channel::next_trigger
(
double
d
,
sc_time_unit
u
,
const
sc_event
&
e
)
127
{
128
::sc_core::next_trigger
(d, u, e);
129
}
130
131
void
132
sc_prim_channel::next_trigger
(
const
sc_time
&
t
,
const
sc_event_or_list
&eol)
133
{
134
::sc_core::next_trigger
(t, eol);
135
}
136
137
void
138
sc_prim_channel::next_trigger
(
139
double
d
,
sc_time_unit
u
,
const
sc_event_or_list
&eol)
140
{
141
::sc_core::next_trigger
(d, u, eol);
142
}
143
144
void
145
sc_prim_channel::next_trigger
(
const
sc_time
&
t
,
const
sc_event_and_list
&eal)
146
{
147
::sc_core::next_trigger
(t, eal);
148
}
149
150
void
151
sc_prim_channel::next_trigger
(
152
double
d
,
sc_time_unit
u
,
const
sc_event_and_list
&eal)
153
{
154
::sc_core::next_trigger
(d, u, eal);
155
}
156
157
bool
158
sc_prim_channel::timed_out
()
159
{
160
return ::sc_core::timed_out
();
161
}
162
163
void
164
sc_prim_channel::wait
()
165
{
166
::sc_core::wait
();
167
}
168
169
void
170
sc_prim_channel::wait
(
int
i
)
171
{
172
::sc_core::wait
(i);
173
}
174
175
void
176
sc_prim_channel::wait
(
const
sc_event
&
e
)
177
{
178
::sc_core::wait
(e);
179
}
180
181
void
182
sc_prim_channel::wait
(
const
sc_event_or_list
&eol)
183
{
184
::sc_core::wait
(eol);
185
}
186
187
void
188
sc_prim_channel::wait
(
const
sc_event_and_list
&eal)
189
{
190
::sc_core::wait
(eal);
191
}
192
193
void
194
sc_prim_channel::wait
(
const
sc_time
&
t
)
195
{
196
::sc_core::wait
(t);
197
}
198
199
void
200
sc_prim_channel::wait
(
double
d
,
sc_time_unit
u
)
201
{
202
::sc_core::wait
(d, u);
203
}
204
205
void
206
sc_prim_channel::wait
(
const
sc_time
&
t
,
const
sc_event
&
e
)
207
{
208
::sc_core::wait
(t, e);
209
}
210
211
void
212
sc_prim_channel::wait
(
double
d
,
sc_time_unit
u
,
const
sc_event
&
e
)
213
{
214
::sc_core::wait
(d, u, e);
215
}
216
217
void
218
sc_prim_channel::wait
(
const
sc_time
&
t
,
const
sc_event_or_list
&eol)
219
{
220
::sc_core::wait
(t, eol);
221
}
222
223
void
224
sc_prim_channel::wait
(
double
d
,
sc_time_unit
u
,
const
sc_event_or_list
&eol)
225
{
226
::sc_core::wait
(d, u, eol);
227
}
228
229
void
230
sc_prim_channel::wait
(
const
sc_time
&
t
,
const
sc_event_and_list
&eal)
231
{
232
::sc_core::wait
(t, eal);
233
}
234
235
void
236
sc_prim_channel::wait
(
double
d
,
sc_time_unit
u
,
const
sc_event_and_list
&eal)
237
{
238
::sc_core::wait
(d, u, eal);
239
}
240
241
}
// namespace sc_core
sc_gem5::getChangeStamp
uint64_t getChangeStamp()
Definition:
sc_prim.cc:39
sc_core::sc_prim_channel::_gem5_channel
sc_gem5::Channel * _gem5_channel
Definition:
sc_prim.hh:109
sc_core::sc_time
Definition:
sc_time.hh:51
sc_core::sc_is_running
bool sc_is_running()
Definition:
sc_main.cc:144
sc_core::sc_event_or_list
Definition:
sc_event.hh:95
scheduler.hh
ArmISA::i
Bitfield< 7 > i
Definition:
miscregs_types.hh:66
sc_gem5
Definition:
sc_clock.cc:44
sc_core::sc_time_unit
sc_time_unit
Definition:
sc_time.hh:42
sc_core::sc_prim_channel::wait
void wait()
Definition:
sc_prim.cc:164
sc_gem5::Channel::asyncRequestUpdate
void asyncRequestUpdate()
Definition:
channel.cc:55
sc_core::SC_ID_INSERT_PRIM_CHANNEL_
const char SC_ID_INSERT_PRIM_CHANNEL_[]
Definition:
messages.cc:52
sc_main.hh
sc_core::sc_event_and_list
Definition:
sc_event.hh:63
sc_core::sc_prim_channel::request_update
void request_update()
Definition:
sc_prim.cc:72
sc_core::sc_prim_channel::next_trigger
void next_trigger()
Definition:
sc_prim.cc:84
sc_core::sc_prim_channel::async_request_update
void async_request_update()
Definition:
sc_prim.cc:78
sc_core
Definition:
messages.cc:33
sc_core::sc_event
Definition:
sc_event.hh:171
ArmISA::u
Bitfield< 22 > u
Definition:
miscregs_types.hh:350
sc_gem5::Channel::requestUpdate
void requestUpdate()
Definition:
channel.cc:49
ArmISA::d
Bitfield< 9 > d
Definition:
miscregs_types.hh:63
channel.hh
sc_gem5::scheduler
Scheduler scheduler
Definition:
scheduler.cc:491
sc_core::sc_prim_channel::~sc_prim_channel
virtual ~sc_prim_channel()
Definition:
sc_prim.cc:69
sc_gem5::Scheduler::changeStamp
uint64_t changeStamp()
Definition:
scheduler.hh:366
messages.hh
ArmISA::e
Bitfield< 9 > e
Definition:
miscregs_types.hh:64
sc_core::sc_prim_channel::sc_prim_channel
sc_prim_channel()
Definition:
sc_prim.cc:46
sc_core::wait
void wait()
Definition:
sc_module.cc:655
sc_core::sc_object
Definition:
sc_object.hh:52
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition:
sc_report_handler.hh:129
sc_core::sc_prim_channel::timed_out
bool timed_out()
Definition:
sc_prim.cc:158
sc_core::next_trigger
void next_trigger()
Definition:
sc_module.cc:540
ArmISA::t
Bitfield< 5 > t
Definition:
miscregs_types.hh:70
sc_gem5::Channel
Definition:
channel.hh:41
sc_prim.hh
sc_core::timed_out
bool timed_out()
Definition:
sc_module.cc:628
Generated on Fri Feb 28 2020 16:27:03 for gem5 by
doxygen
1.8.13