gem5  v20.1.0.0
sc_fifo_out.hh
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 
28 #ifndef __SYSTEMC_EXT_CHANNEL_SC_FIFO_OUT_HH__
29 #define __SYSTEMC_EXT_CHANNEL_SC_FIFO_OUT_HH__
30 
31 #include "../core/sc_port.hh"
32 #include "sc_fifo_out_if.hh"
33 
34 namespace sc_core
35 {
36 
37 class sc_event;
38 class sc_event_finder;
39 
40 template <class T>
41 class sc_fifo_out : public sc_port<sc_fifo_out_if<T>, 0>
42 {
43  public:
46  {}
47  explicit sc_fifo_out(const char *name) :
48  sc_port<sc_fifo_out_if<T>, 0>(name),
50  {}
51  virtual ~sc_fifo_out() {}
52 
53  // Deprecated binding constructors.
54  explicit sc_fifo_out(const sc_fifo_out_if<T> &interface) :
55  sc_port<sc_fifo_out_if<T>, 0>(interface),
57  {}
58  sc_fifo_out(const char *name, const sc_fifo_out_if<T> &interface) :
59  sc_port<sc_fifo_out_if<T>, 0>(name, interface),
61  {}
62  explicit sc_fifo_out(sc_port_b<sc_fifo_out_if<T> > &parent) :
63  sc_port<sc_fifo_out_if<T>, 0>(parent),
65  {}
66  sc_fifo_out(const char *name, sc_port_b<sc_fifo_out_if<T> > &parent) :
67  sc_port<sc_fifo_out_if<T>, 0>(name, parent),
69  {}
70  explicit sc_fifo_out(sc_port<sc_fifo_out_if<T>, 0> &parent) :
71  sc_port<sc_fifo_out_if<T>, 0>(parent),
73  {}
74  sc_fifo_out(const char *name, sc_port<sc_fifo_out_if<T>, 0> &parent) :
75  sc_port<sc_fifo_out_if<T>, 0>(name, parent),
77  {}
78 
79  void write(const T &t) { (*this)->write(t); }
80  bool nb_write(const T &t) { return (*this)->nb_write(t); }
81  const sc_event &
83  {
84  return (*this)->data_read_event();
85  }
87  int num_free() const { return (*this)->num_free(); }
88  virtual const char *kind() const { return "sc_fifo_out"; }
89 
90  private:
91  // Disabled
93  sc_fifo_out<T> &operator = (const sc_fifo_out<T> &) { return *this; }
94 
96 };
97 
98 } // namespace sc_core
99 
100 #endif //__SYSTEMC_EXT_CHANNEL_SC_FIFO_OUT_HH__
sc_core::sc_port_b
Definition: sc_port.hh:118
sc_core::sc_fifo_out::~sc_fifo_out
virtual ~sc_fifo_out()
Definition: sc_fifo_out.hh:51
sc_core::sc_fifo_out::_dataReadFinder
sc_event_finder_t< sc_fifo_out_if< T > > _dataReadFinder
Definition: sc_fifo_out.hh:95
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out()
Definition: sc_fifo_out.hh:44
sc_core::sc_port
Definition: sc_port.hh:249
sc_core::sc_fifo_out::data_read_event
const sc_event & data_read_event() const
Definition: sc_fifo_out.hh:82
sc_core
Definition: messages.cc:31
sc_core::sc_fifo_out
Definition: sc_fifo_out.hh:41
sc_core::sc_fifo_out_if
Definition: sc_fifo_out_if.hh:54
sc_core::sc_fifo_out::operator=
sc_fifo_out< T > & operator=(const sc_fifo_out< T > &)
Definition: sc_fifo_out.hh:93
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const char *name, sc_port< sc_fifo_out_if< T >, 0 > &parent)
Definition: sc_fifo_out.hh:74
sc_core::sc_fifo_out::data_read
sc_event_finder & data_read() const
Definition: sc_fifo_out.hh:86
sc_core::sc_fifo_out::kind
virtual const char * kind() const
Definition: sc_fifo_out.hh:88
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(sc_port< sc_fifo_out_if< T >, 0 > &parent)
Definition: sc_fifo_out.hh:70
sc_fifo_out_if.hh
sc_core::sc_event
Definition: sc_event.hh:169
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const char *name, const sc_fifo_out_if< T > &interface)
Definition: sc_fifo_out.hh:58
sc_core::sc_event_finder_t
Definition: sc_event.hh:224
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const char *name)
Definition: sc_fifo_out.hh:47
sc_core::sc_fifo_out::write
void write(const T &t)
Definition: sc_fifo_out.hh:79
sc_core::sc_fifo_out::num_free
int num_free() const
Definition: sc_fifo_out.hh:87
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(sc_port_b< sc_fifo_out_if< T > > &parent)
Definition: sc_fifo_out.hh:62
sc_core::sc_object::name
const char * name() const
Definition: sc_object.cc:44
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const char *name, sc_port_b< sc_fifo_out_if< T > > &parent)
Definition: sc_fifo_out.hh:66
sc_core::sc_event_finder
Definition: sc_event.hh:212
sc_core::sc_fifo_out::nb_write
bool nb_write(const T &t)
Definition: sc_fifo_out.hh:80
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const sc_fifo_out_if< T > &interface)
Definition: sc_fifo_out.hh:54
sc_core::sc_fifo_out::sc_fifo_out
sc_fifo_out(const sc_fifo_out< T > &)
Definition: sc_fifo_out.hh:92

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