event_finder.hh (13521:74fa3ac44057) event_finder.hh (13522:1b2565619f41)
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

--- 42 unchanged lines hidden (view full) ---

51};
52
53template <class IF, class T>
54inline const sc_core::sc_event &
55tlm_event_finder_t<IF, T>::find_event(sc_core::sc_interface *if_p) const
56{
57 const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) :
58 dynamic_cast<const IF *>(port()->_gem5Interface(0));
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

--- 42 unchanged lines hidden (view full) ---

51};
52
53template <class IF, class T>
54inline const sc_core::sc_event &
55tlm_event_finder_t<IF, T>::find_event(sc_core::sc_interface *if_p) const
56{
57 const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) :
58 dynamic_cast<const IF *>(port()->_gem5Interface(0));
59 static sc_core::sc_event none;
59 if (iface == nullptr) {
60 report_error(sc_core::SC_ID_FIND_EVENT_, "port is not bound");
60 if (iface == nullptr) {
61 report_error(sc_core::SC_ID_FIND_EVENT_, "port is not bound");
61 return sc_core::sc_event::none;
62 return none;
62 }
63 return (const_cast<IF *>(iface)->*m_event_method)(nullptr);
64}
65
66} // namespace tlm
67
68#endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__ */
63 }
64 return (const_cast<IF *>(iface)->*m_event_method)(nullptr);
65}
66
67} // namespace tlm
68
69#endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__ */