gem5  v20.1.0.0
nonblocking_port.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_NONBLOCKING_PORT_HH__
21 #define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_NONBLOCKING_PORT_HH__
22 
23 #include "../interfaces/core_ifs.hh"
24 #include "event_finder.hh"
25 
26 namespace tlm
27 {
28 
29 template <typename T>
30 class tlm_nonblocking_get_port :
31  public sc_core::sc_port<tlm_nonblocking_get_if<T>, 1>
32 {
33  public:
34  typedef tlm_nonblocking_get_if<T> get_if_type;
35 
36  tlm_nonblocking_get_port(const char *port_name) :
37  sc_core::sc_port<tlm_nonblocking_get_if<T>, 1>(port_name)
38  {}
39 
41  ok_to_get() const
42  {
43  return *new tlm_event_finder_t<get_if_type, T >(
44  *this, &get_if_type::ok_to_get);
45  }
46 };
47 
48 template <typename T>
50  public sc_core::sc_port<tlm_nonblocking_peek_if<T>, 1>
51 {
52  public:
54 
55  tlm_nonblocking_peek_port(const char *port_name) :
57  {}
58 
60  ok_to_peek() const
61  {
63  *this, &peek_if_type::ok_to_peek);
64  }
65 };
66 
67 template <typename T>
69  public sc_core::sc_port<tlm_nonblocking_put_if<T>, 1>
70 {
71  public:
73 
74  tlm_nonblocking_put_port(const char *port_name) :
76  {}
77 
79  ok_to_put() const
80  {
82  *this, &put_if_type::ok_to_put);
83  }
84 };
85 
86 } // namespace tlm
87 
88 #endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_NONBLOCKING_PORT_HH__ */
tlm::tlm_nonblocking_get_port::get_if_type
tlm_nonblocking_get_if< T > get_if_type
Definition: nonblocking_port.hh:68
tlm::tlm_nonblocking_get_port::tlm_nonblocking_get_port
tlm_nonblocking_get_port(const char *port_name)
Definition: nonblocking_port.hh:70
sc_core::sc_port
Definition: sc_port.hh:249
tlm::tlm_nonblocking_get_port::ok_to_get
sc_core::sc_event_finder & ok_to_get() const
Definition: nonblocking_port.hh:75
sc_core
Definition: messages.cc:31
event_finder.hh
tlm::tlm_nonblocking_put_if::ok_to_put
virtual const sc_core::sc_event & ok_to_put(tlm_tag< T > *t=nullptr) const =0
tlm::tlm_nonblocking_peek_if
Definition: core_ifs.hh:118
sc_core::sc_port< tlm_nonblocking_get_if< T >, 1 >::sc_port
sc_port()
Definition: sc_port.hh:252
tlm::tlm_nonblocking_peek_port
Definition: nonblocking_port.hh:66
tlm::tlm_nonblocking_put_port
Definition: nonblocking_port.hh:85
tlm::tlm_nonblocking_get_if::ok_to_get
virtual const sc_core::sc_event & ok_to_get(tlm_tag< T > *t=nullptr) const =0
tlm::tlm_nonblocking_peek_port::tlm_nonblocking_peek_port
tlm_nonblocking_peek_port(const char *port_name)
Definition: nonblocking_port.hh:72
tlm::tlm_nonblocking_put_port::ok_to_put
sc_core::sc_event_finder & ok_to_put() const
Definition: nonblocking_port.hh:96
tlm::tlm_nonblocking_put_port::tlm_nonblocking_put_port
tlm_nonblocking_put_port(const char *port_name)
Definition: nonblocking_port.hh:91
tlm
Definition: analysis_fifo.hh:27
tlm::tlm_event_finder_t
Definition: event_finder.hh:48
tlm::tlm_nonblocking_put_port::put_if_type
tlm_nonblocking_put_if< T > put_if_type
Definition: nonblocking_port.hh:89
tlm::tlm_nonblocking_peek_if::ok_to_peek
virtual const sc_core::sc_event & ok_to_peek(tlm_tag< T > *t=nullptr) const =0
tlm::tlm_nonblocking_peek_port::ok_to_peek
sc_core::sc_event_finder & ok_to_peek() const
Definition: nonblocking_port.hh:77
tlm::tlm_nonblocking_peek_port::peek_if_type
tlm_nonblocking_peek_if< T > peek_if_type
Definition: nonblocking_port.hh:70
sc_core::sc_event_finder
Definition: sc_event.hh:212
tlm::tlm_nonblocking_put_if
Definition: core_ifs.hh:88

Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17