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
systemc
ext
tlm_core
1
req_rsp
ports
event_finder.hh
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4
more contributor license agreements. See the NOTICE file distributed
5
with this work for additional information regarding copyright ownership.
6
Accellera licenses this file to you under the Apache License, Version 2.0
7
(the "License"); you may not use this file except in compliance with the
8
License. You may obtain a copy of the License at
9
10
http://www.apache.org/licenses/LICENSE-2.0
11
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
implied. See the License for the specific language governing
16
permissions and limitations under the License.
17
18
*****************************************************************************/
19
20
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__
21
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__
22
23
#include <sstream>
24
25
#include "../interfaces/tag.hh"
26
27
namespace
tlm
28
{
29
30
template
<
class
IF,
class
T>
31
class
tlm_event_finder_t :
public
sc_core::sc_event_finder_t
<IF>
32
{
33
public
:
34
tlm_event_finder_t
(
const
sc_core::sc_port_base
&port_,
35
const
sc_core::sc_event
&(IF::*event_method_)(
36
tlm_tag<T> *)
const
) :
37
sc_core
::
sc_event_finder_t
<IF>(port_),
m_event_method
(event_method_)
38
{}
39
40
virtual
~tlm_event_finder_t
() {}
41
42
virtual
const
sc_core::sc_event
&
43
find_event
(
sc_core::sc_interface
*if_p=
nullptr
)
const
;
44
45
private
:
46
const
sc_core::sc_event
&(IF::*
m_event_method
)(tlm_tag<T> *)
const
;
47
48
private
:
49
// disabled
50
tlm_event_finder_t
();
51
tlm_event_finder_t
(
const
tlm_event_finder_t<IF, T>
&);
52
tlm_event_finder_t<IF, T>
&
operator =
(
const
tlm_event_finder_t<IF, T>
&);
53
};
54
55
template
<
class
IF,
class
T>
56
inline
const
sc_core::sc_event
&
57
tlm_event_finder_t<IF, T>::find_event
(
sc_core::sc_interface
*if_p)
const
58
{
59
const
IF *iface = if_p ?
dynamic_cast<
const
IF *
>
(if_p) :
60
dynamic_cast<
const
IF *
>
(this->port()->_gem5Interface(0));
61
if
(iface ==
nullptr
) {
62
std::ostringstream out;
63
out <<
"port is not bound: port '"
<< this->port()->name() <<
64
"' ("
<< this->port()->kind() <<
")"
;
65
SC_REPORT_ERROR
(
sc_core::SC_ID_FIND_EVENT_
, out.str().c_str());
66
static
sc_core::sc_event
none
;
67
return
none
;
68
}
69
return
(
const_cast<
IF *
>
(iface)->*m_event_method)(
nullptr
);
70
}
71
72
}
// namespace tlm
73
74
#endif
/* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__ */
sc_core::sc_port_base
Definition:
sc_port.hh:74
sc_core::SC_ID_FIND_EVENT_
const char SC_ID_FIND_EVENT_[]
Definition:
messages.cc:57
tlm::tlm_event_finder_t::m_event_method
const sc_core::sc_event &(IF::* m_event_method)(tlm_tag< T > *) const
Definition:
event_finder.hh:80
sc_core
Definition:
messages.cc:31
sc_core::sc_interface
Definition:
sc_interface.hh:37
gem5::statistics::none
const FlagsType none
Nothing extra to print.
Definition:
info.hh:53
tlm::tlm_event_finder_t::find_event
virtual const sc_core::sc_event & find_event(sc_core::sc_interface *if_p=nullptr) const
Definition:
event_finder.hh:74
tlm::tlm_event_finder_t::~tlm_event_finder_t
virtual ~tlm_event_finder_t()
Definition:
event_finder.hh:74
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition:
sc_report_handler.hh:127
sc_core::sc_event
Definition:
sc_event.hh:169
tlm::tlm_event_finder_t::operator=
tlm_event_finder_t< IF, T > & operator=(const tlm_event_finder_t< IF, T > &)
tlm
Definition:
analysis_fifo.hh:27
sc_core::sc_event_finder_t
Definition:
sc_event.hh:224
tlm::tlm_event_finder_t
Definition:
event_finder.hh:48
sc_core::sc_event_finder_t::sc_event_finder_t
sc_event_finder_t(const sc_port_base &p, const sc_event &(IF::*_method)() const)
Definition:
sc_event.hh:227
tlm::tlm_event_finder_t::tlm_event_finder_t
tlm_event_finder_t()
Generated on Sun Jul 30 2023 01:57:02 for gem5 by
doxygen
1.8.17