gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
34namespace sc_core
35{
36
37class sc_event;
38class sc_event_finder;
39
40template <class T>
41class sc_fifo_out : public sc_port<sc_fifo_out_if<T>, 0>
42{
43 public:
47 explicit sc_fifo_out(const char *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 {}
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_event_finder_t< sc_fifo_out_if< T > > _dataReadFinder
sc_fifo_out(const char *name, const sc_fifo_out_if< T > &interface)
sc_fifo_out< T > & operator=(const sc_fifo_out< T > &)
sc_fifo_out(const char *name, sc_port_b< sc_fifo_out_if< T > > &parent)
sc_fifo_out(sc_port< sc_fifo_out_if< T >, 0 > &parent)
sc_fifo_out(const char *name)
bool nb_write(const T &t)
sc_fifo_out(const sc_fifo_out_if< T > &interface)
void write(const T &t)
sc_fifo_out(const sc_fifo_out< T > &)
sc_fifo_out(sc_port_b< sc_fifo_out_if< T > > &parent)
sc_fifo_out(const char *name, sc_port< sc_fifo_out_if< T >, 0 > &parent)
virtual const char * kind() const
sc_event_finder & data_read() const
const sc_event & data_read_event() const
const std::string & name()
Definition trace.cc:48

Generated on Tue Jun 18 2024 16:24:06 for gem5 by doxygen 1.11.0